@techdocs/cli 0.0.0-nightly-20220823130 → 0.0.0-nightly-202201921950

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 (50) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/techdocs-preview-bundle/.config-schema.json +21 -20
  4. package/dist/techdocs-preview-bundle/index.html +1 -1
  5. package/dist/techdocs-preview-bundle/static/1553.7cf96a24.chunk.js +3 -0
  6. package/dist/techdocs-preview-bundle/static/{1553.d868b0ad.chunk.js.map → 1553.7cf96a24.chunk.js.map} +1 -1
  7. package/dist/techdocs-preview-bundle/static/{1959.db1025e8.chunk.js → 1959.e4e37559.chunk.js} +2 -2
  8. package/dist/techdocs-preview-bundle/static/{1959.db1025e8.chunk.js.map → 1959.e4e37559.chunk.js.map} +1 -1
  9. package/dist/techdocs-preview-bundle/static/3825.a9a691f4.chunk.js +3 -0
  10. package/dist/techdocs-preview-bundle/static/{3825.4d2029cf.chunk.js.map → 3825.a9a691f4.chunk.js.map} +1 -1
  11. package/dist/techdocs-preview-bundle/static/390.0ac36f38.chunk.js +3 -0
  12. package/dist/techdocs-preview-bundle/static/{390.7bd8ec9b.chunk.js.map → 390.0ac36f38.chunk.js.map} +1 -1
  13. package/dist/techdocs-preview-bundle/static/4022.2a4c3ef2.chunk.js +3 -0
  14. package/dist/techdocs-preview-bundle/static/{4022.ec2c6d90.chunk.js.map → 4022.2a4c3ef2.chunk.js.map} +1 -1
  15. package/dist/techdocs-preview-bundle/static/4960.f6567d97.chunk.js +3 -0
  16. package/dist/techdocs-preview-bundle/static/{4960.2e42685b.chunk.js.map → 4960.f6567d97.chunk.js.map} +1 -1
  17. package/dist/techdocs-preview-bundle/static/6235.17d44e1e.chunk.js +3 -0
  18. package/dist/techdocs-preview-bundle/static/{6235.3c2be1af.chunk.js.map → 6235.17d44e1e.chunk.js.map} +1 -1
  19. package/dist/techdocs-preview-bundle/static/8061.b7c32996.chunk.js +3 -0
  20. package/dist/techdocs-preview-bundle/static/{8061.0d986bf6.chunk.js.map → 8061.b7c32996.chunk.js.map} +1 -1
  21. package/dist/techdocs-preview-bundle/static/8792.7b20dc6e.chunk.js +3 -0
  22. package/dist/techdocs-preview-bundle/static/{8792.4d595bb1.chunk.js.map → 8792.7b20dc6e.chunk.js.map} +1 -1
  23. package/dist/techdocs-preview-bundle/static/9028.6f75c2de.chunk.js +3 -0
  24. package/dist/techdocs-preview-bundle/static/{9028.92f184a9.chunk.js.map → 9028.6f75c2de.chunk.js.map} +1 -1
  25. package/dist/techdocs-preview-bundle/static/main.bd87150d.js +150 -0
  26. package/dist/techdocs-preview-bundle/static/main.bd87150d.js.map +1 -0
  27. package/dist/techdocs-preview-bundle/static/{module-material-table.f1ed2ece.js → module-material-table.4d12af73.js} +2 -2
  28. package/dist/techdocs-preview-bundle/static/{module-material-table.f1ed2ece.js.map → module-material-table.4d12af73.js.map} +1 -1
  29. package/dist/techdocs-preview-bundle/static/module-material-ui.8110543e.js +37 -0
  30. package/dist/techdocs-preview-bundle/static/module-material-ui.8110543e.js.map +1 -0
  31. package/dist/techdocs-preview-bundle/static/{runtime.93cc9d71.js → runtime.bd87150d.js} +2 -2
  32. package/dist/techdocs-preview-bundle/static/{runtime.93cc9d71.js.map → runtime.bd87150d.js.map} +1 -1
  33. package/dist/techdocs-preview-bundle/static/vendor.bd87150d.js +150 -0
  34. package/dist/techdocs-preview-bundle/static/vendor.bd87150d.js.map +1 -0
  35. package/package.json +7 -7
  36. package/dist/techdocs-preview-bundle/static/1553.d868b0ad.chunk.js +0 -3
  37. package/dist/techdocs-preview-bundle/static/3825.4d2029cf.chunk.js +0 -3
  38. package/dist/techdocs-preview-bundle/static/390.7bd8ec9b.chunk.js +0 -3
  39. package/dist/techdocs-preview-bundle/static/4022.ec2c6d90.chunk.js +0 -3
  40. package/dist/techdocs-preview-bundle/static/4960.2e42685b.chunk.js +0 -3
  41. package/dist/techdocs-preview-bundle/static/6235.3c2be1af.chunk.js +0 -3
  42. package/dist/techdocs-preview-bundle/static/8061.0d986bf6.chunk.js +0 -3
  43. package/dist/techdocs-preview-bundle/static/8792.4d595bb1.chunk.js +0 -3
  44. package/dist/techdocs-preview-bundle/static/9028.92f184a9.chunk.js +0 -3
  45. package/dist/techdocs-preview-bundle/static/main.93cc9d71.js +0 -143
  46. package/dist/techdocs-preview-bundle/static/main.93cc9d71.js.map +0 -1
  47. package/dist/techdocs-preview-bundle/static/module-material-ui.0611edcd.js +0 -51
  48. package/dist/techdocs-preview-bundle/static/module-material-ui.0611edcd.js.map +0 -1
  49. package/dist/techdocs-preview-bundle/static/vendor.93cc9d71.js +0 -136
  50. package/dist/techdocs-preview-bundle/static/vendor.93cc9d71.js.map +0 -1
@@ -1,143 +0,0 @@
1
- var vi=Object.defineProperty;var Ri=(X,o,t)=>o in X?vi(X,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):X[o]=t;var _=(X,o,t)=>(Ri(X,typeof o!="symbol"?o+"":o,t),t),io=(X,o,t)=>{if(!o.has(X))throw TypeError("Cannot "+t)};var ee=(X,o,t)=>(io(X,o,"read from private field"),t?t.call(X):o.get(X)),En=(X,o,t)=>{if(o.has(X))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(X):o.set(X,t)},Tn=(X,o,t,r)=>(io(X,o,"write to private field"),r?r.call(X,t):o.set(X,t),t);(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[179],{30001:function(X,o,t){"use strict";t.d(o,{n3:function(){return c},MS:function(){return s}});var r=t(52890),e=t(10179),l=t(96279),h=t.n(l);const c=Symbol("CATALOG_FILTER_EXISTS");class s{constructor(d){_(this,"discoveryApi");_(this,"fetchApi");this.discoveryApi=d.discoveryApi,this.fetchApi=d.fetchApi||{fetch:h()}}async getEntityAncestors(d,y){const{kind:m,namespace:E,name:i}=(0,r.of)(d.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(m)}/${encodeURIComponent(E)}/${encodeURIComponent(i)}/ancestry`,y)}async getLocationById(d,y){return await this.requestOptional("GET",`/locations/${encodeURIComponent(d)}`,y)}async getEntities(d,y){const{filter:m=[],fields:E=[],offset:i,limit:S,after:b}=d!=null?d:{},T=[m].flat(),G=[];for(const I of T){const K=[];for(const[V,ot]of Object.entries(I))for(const vt of[ot].flat())vt===c?K.push(encodeURIComponent(V)):typeof vt=="string"&&K.push(`${encodeURIComponent(V)}=${encodeURIComponent(vt)}`);K.length&&G.push(`filter=${K.join(",")}`)}E.length&&G.push(`fields=${E.map(encodeURIComponent).join(",")}`),i!==void 0&&G.push(`offset=${i}`),S!==void 0&&G.push(`limit=${S}`),b!==void 0&&G.push(`after=${encodeURIComponent(b)}`);const j=G.length?`?${G.join("&")}`:"",D=await this.requestRequired("GET",`/entities${j}`,y),M=(I,K)=>{var vt,Zt;if(((vt=I.metadata)==null?void 0:vt.name)===void 0||I.kind===void 0||((Zt=K.metadata)==null?void 0:Zt.name)===void 0||K.kind===void 0)return 0;const V=(0,r.eE)(I),ot=(0,r.eE)(K);return V<ot?-1:V>ot?1:0};return{items:D.sort(M)}}async getEntityByName(d,y){const{kind:m,namespace:E="default",name:i}=d;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(m)}/${encodeURIComponent(E)}/${encodeURIComponent(i)}`,y)}async refreshEntity(d,y){const m=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(y==null?void 0:y.token)&&{Authorization:`Bearer ${y==null?void 0:y.token}`}},method:"POST",body:JSON.stringify({entityRef:d})});if(m.status!==200)throw new Error(await m.text())}async addLocation({type:d="url",target:y,dryRun:m,presence:E},i){const S=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${m?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(i==null?void 0:i.token)&&{Authorization:`Bearer ${i==null?void 0:i.token}`}},method:"POST",body:JSON.stringify({type:d,target:y,presence:E})});if(S.status!==201)throw new Error(await S.text());const{location:b,entities:T,exists:G}=await S.json();if(!b)throw new Error(`Location wasn't added: ${y}`);return{location:b,entities:T,exists:G}}async getOriginLocationByEntity(d,y){var i;const m=(i=d.metadata.annotations)==null?void 0:i[r.lb];return m?(await this.requestRequired("GET","/locations",y)).map(S=>S.data).find(S=>m===(0,r.Bt)(S)):void 0}async getLocationByEntity(d,y){var i;const m=(i=d.metadata.annotations)==null?void 0:i[r.Jl];return m?(await this.requestRequired("GET","/locations",y)).map(S=>S.data).find(S=>m===(0,r.Bt)(S)):void 0}async removeLocationById(d,y){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(d)}`,y)}async removeEntityByUid(d,y){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(d)}`,y)}async requestIgnored(d,y,m){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(m==null?void 0:m.token)?{Authorization:`Bearer ${m.token}`}:{},S=await this.fetchApi.fetch(E,{method:d,headers:i});if(!S.ok)throw await e.VL.fromResponse(S)}async requestRequired(d,y,m){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(m==null?void 0:m.token)?{Authorization:`Bearer ${m.token}`}:{},S=await this.fetchApi.fetch(E,{method:d,headers:i});if(!S.ok)throw await e.VL.fromResponse(S);return await S.json()}async requestOptional(d,y,m){const E=`${await this.discoveryApi.getBaseUrl("catalog")}${y}`,i=(m==null?void 0:m.token)?{Authorization:`Bearer ${m.token}`}:{},S=await this.fetchApi.fetch(E,{method:d,headers:i});if(!S.ok){if(S.status===404)return;throw await e.VL.fromResponse(S)}return await S.json()}}},52890:function(X,o,t){"use strict";t.d(o,{J1:function(){return h},sk:function(){return r},Jl:function(){return L},lb:function(){return J},w$:function(){return Vt},nP:function(){return oe},aS:function(){return Wt},hr:function(){return _t},S4:function(){return W},cz:function(){return St},M_:function(){return Tt},wX:function(){return et},wh:function(){return l},C_:function(){return Kt},of:function(){return qt},Me:function(){return yt},TH:function(){return me},eE:function(){return le},Bt:function(){return ft}});const r="default",e=null,l="backstage.io/view-url",h="backstage.io/edit-url";var c=t(76635),s=t.n(c);class u{constructor(Z=ENTITY_DEFAULT_NAMESPACE){_(this,"namespace");this.namespace=Z}async enforce(Z){return Z.metadata.namespace?Z:lodash.merge({metadata:{namespace:this.namespace}},Z)}}class d{static isValidPrefixAndOrSuffix(Z,tt,gt,Ht){if(typeof Z!="string")return!1;const te=Z.split(tt);return te.length===1?Ht(te[0]):te.length===2?gt(te[0])&&Ht(te[1]):!1}static isJsonSafe(Z){try{return s().isEqual(Z,JSON.parse(JSON.stringify(Z)))}catch{return!1}}static isValidDnsSubdomain(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=253&&Z.split(".").every(d.isValidDnsLabel)}static isValidDnsLabel(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(Z)}static isValidTag(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(Z)}static isValidUrl(Z){if(typeof Z!="string")return!1;try{return new URL(Z),!0}catch{return!1}}static isValidString(Z){var tt;return typeof Z=="string"&&((tt=Z==null?void 0:Z.trim())==null?void 0:tt.length)>=1}}var y=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}}}}}'),m=t(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"}}}`),i=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},"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}}}}}}'),S=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 b=new Map,T=[y,E,i,S];function G(lt){if(!(lt==null?void 0:lt.length))throw new TypeError("Unknown error");const Z=lt[0];throw new TypeError(`${Z.dataPath||"<root>"} ${Z.message}${Z.params?` - ${Object.entries(Z.params).map(([tt,gt])=>`${tt}: ${gt}`).join(", ")}`:""}`)}function j(lt,Z={}){var Be;const tt=(Be=Z==null?void 0:Z.disableCache)!=null?Be:!1,gt=tt?"":JSON.stringify(lt);if(!tt){const an=b.get(gt);if(an)return an}const Ht=D(lt),te=new m.ZP({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});Ht.length&&te.addSchema(Ht,void 0,void 0,!0);const pe=te.compile(lt);return tt||b.set(gt,pe),pe}function D(lt){if(typeof lt!="object")return[];const Z=new Set;lt.$id&&Z.add(lt.$id);const tt=new Array,gt=[lt];for(;gt.length;){const Ht=gt.pop();for(const te of M(Ht))if(!Z.has(te)){Z.add(te);const pe=T.find(Be=>Be.$id===te);pe&&(tt.push(pe),gt.push(pe))}}return tt}function*M(lt){const Z=[lt];for(;Z.length;){const tt=Z.pop();if(typeof tt=="object"&&tt)for(const[gt,Ht]of Object.entries(tt))gt==="$ref"&&typeof Ht=="string"?yield Ht.split("#")[0]:Z.push(Ht)}}function I(lt){const Z=compileAjvSchema(lt||entityEnvelopeSchema);return tt=>{if(Z(tt)===!0)return tt;throw throwAjvError(Z.errors)}}function K(lt){const Z=j(lt);return tt=>{var te;if(Z(tt)===!0)return tt;const Ht=(te=Z.errors)==null?void 0:te.filter(pe=>["/kind","/apiVersion"].includes(pe.dataPath));if((Ht==null?void 0:Ht.length)&&Ht.every(pe=>pe.keyword==="enum"))return!1;throw G(Z.errors)}}function V(lt){const Z=compileAjvSchema(lt||entitySchema);return tt=>{if(Z(tt)===!0)return tt;throw throwAjvError(Z.errors)}}class ot{static isValidApiVersion(Z){return d.isValidPrefixAndOrSuffix(Z,"/",d.isValidDnsSubdomain,tt=>tt.length>=1&&tt.length<=63&&/^[a-z0-9A-Z]+$/.test(tt))}static isValidKind(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(Z)}static isValidObjectName(Z){return typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(Z)}static isValidNamespace(Z){return d.isValidDnsLabel(Z)}static isValidLabelKey(Z){return d.isValidPrefixAndOrSuffix(Z,"/",d.isValidDnsSubdomain,ot.isValidObjectName)}static isValidLabelValue(Z){return Z===""||ot.isValidObjectName(Z)}static isValidAnnotationKey(Z){return d.isValidPrefixAndOrSuffix(Z,"/",d.isValidDnsSubdomain,ot.isValidObjectName)}static isValidAnnotationValue(Z){return typeof Z=="string"}}const vt={isValidApiVersion:ot.isValidApiVersion,isValidKind:ot.isValidKind,isValidEntityName:ot.isValidObjectName,isValidNamespace:ot.isValidNamespace,isValidLabelKey:ot.isValidLabelKey,isValidLabelValue:ot.isValidLabelValue,isValidAnnotationKey:ot.isValidAnnotationKey,isValidAnnotationValue:ot.isValidAnnotationValue,isValidTag:d.isValidTag};function Zt(lt={}){return{...vt,...lt}}class mt{constructor(Z=makeValidator()){_(this,"validators");this.validators=Z}async enforce(Z){var pe,Be,an,hn,Xn,Pn,In;function tt(ge,Ze,sn){if(Ze==null)throw new Error(`${ge} must have a value`);let On;try{On=sn(Ze)}catch(Ve){throw new Error(`${ge} could not be validated, ${Ve}`)}if(!On){let Ve;switch(sn.name){case"isValidLabelValue":case"isValidObjectName":Ve="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":Ve="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Ve="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Ve="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Ve="a string";break;case"isValidKind":Ve="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Ve="a string that is a valid url";break;case"isValidString":Ve="a non empty string";break;default:Ve=void 0;break}const Un=Ve?` expected ${Ve} but found "${Ze}".`:"";throw new Error(`"${ge}" is not valid;${Un} 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 gt(ge,Ze,sn){return Ze===void 0||tt(ge,Ze,sn)}tt("apiVersion",Z.apiVersion,this.validators.isValidApiVersion),tt("kind",Z.kind,this.validators.isValidKind),tt("metadata.name",Z.metadata.name,this.validators.isValidEntityName),gt("metadata.namespace",Z.metadata.namespace,this.validators.isValidNamespace);for(const[ge,Ze]of Object.entries((pe=Z.metadata.labels)!=null?pe:[]))tt(`labels.${ge}`,ge,this.validators.isValidLabelKey),tt(`labels.${ge}`,Ze,this.validators.isValidLabelValue);for(const[ge,Ze]of Object.entries((Be=Z.metadata.annotations)!=null?Be:[]))tt(`annotations.${ge}`,ge,this.validators.isValidAnnotationKey),tt(`annotations.${ge}`,Ze,this.validators.isValidAnnotationValue);const Ht=(an=Z.metadata.tags)!=null?an:[];for(let ge=0;ge<Ht.length;++ge)tt(`tags.${ge}`,Ht[ge],this.validators.isValidTag);const te=(hn=Z.metadata.links)!=null?hn:[];for(let ge=0;ge<te.length;++ge)tt(`links.${ge}.url`,(Xn=te[ge])==null?void 0:Xn.url,CommonValidatorFunctions.isValidUrl),gt(`links.${ge}.title`,(Pn=te[ge])==null?void 0:Pn.title,CommonValidatorFunctions.isValidString),gt(`links.${ge}.icon`,(In=te[ge])==null?void 0:In.icon,KubernetesValidatorFunctions.isValidObjectName);return Z}}class jt{constructor(){_(this,"validate")}async enforce(Z){if(!this.validate){const Ht=new Ajv({allowUnionTypes:!0});this.validate=Ht.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(Z)===!0)return Z;const[gt]=this.validate.errors||[];throw gt?new Error(`Malformed envelope, ${gt.dataPath||"<root>"} ${gt.message}`):new Error("Malformed envelope, Unknown error")}}function Lt(lt){var tt,gt;const Z=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(lt.trim());if(!Z)throw new TypeError(`Entity reference "${lt}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:(tt=Z[1])==null?void 0:tt.slice(0,-1),namespace:(gt=Z[2])==null?void 0:gt.slice(0,-1),name:Z[3]}}function Kt(lt){return{kind:lt.kind,namespace:lt.metadata.namespace||r,name:lt.metadata.name}}function ae(lt,Z={}){const{kind:tt,namespace:gt,name:Ht}=qt(lt,{defaultNamespace:ENTITY_DEFAULT_NAMESPACE,...Z});if(!tt)throw new Error(`Entity reference ${gt}/${Ht} did not contain a kind`);return{kind:tt,namespace:gt,name:Ht}}function qt(lt,Z={}){var te,pe;if(!lt)throw new Error("Entity reference must not be empty");if(typeof lt=="string"){const Be=Lt(lt);return{kind:(te=Be.kind)!=null?te:Z.defaultKind,namespace:(pe=Be.namespace)!=null?pe:Z.defaultNamespace,name:Be.name}}const{kind:tt,namespace:gt,name:Ht}=lt;if(tt==="")throw new Error("Entity reference kinds must not be empty");if(gt==="")throw new Error("Entity reference namespaces must not be empty");if(!Ht)throw new Error("Entity references must contain a name");return{kind:tt!=null?tt:Z.defaultKind,namespace:gt!=null?gt:Z.defaultNamespace,name:Ht}}function me(lt){let Z,tt,gt;return"metadata"in lt?(Z=lt.kind,tt=lt.metadata.namespace,gt=lt.metadata.name):(Z=lt.kind,tt=lt.namespace,gt=lt.name),(Z==null?void 0:Z.includes(":"))||(Z==null?void 0:Z.includes("/"))||(tt==null?void 0:tt.includes(":"))||(tt==null?void 0:tt.includes("/"))||gt.includes(":")||gt.includes("/")?{kind:Z,namespace:tt,name:gt}:`${Z?`${Z}:`:""}${tt?`${tt}/`:""}${gt}`}function le(lt){var Ht,te;let Z,tt,gt;return"metadata"in lt?(Z=lt.kind,tt=(Ht=lt.metadata.namespace)!=null?Ht:r,gt=lt.metadata.name):(Z=lt.kind,tt=(te=lt.namespace)!=null?te:r,gt=lt.name),`${Z.toLocaleLowerCase("en-US")}:${tt.toLocaleLowerCase("en-US")}/${gt.toLocaleLowerCase("en-US")}`}function ce(lt,Z,tt){const gt=lt.kind,Ht=lt.metadata.namespace||ENTITY_DEFAULT_NAMESPACE,te=lt.metadata.name;let pe,Be,an;if(typeof Z=="string"){const hn=Lt(Z);pe=hn.kind||(tt==null?void 0:tt.defaultKind),Be=hn.namespace||(tt==null?void 0:tt.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=hn.name}else pe=Z.kind||(tt==null?void 0:tt.defaultKind),Be=Z.namespace||(tt==null?void 0:tt.defaultNamespace)||ENTITY_DEFAULT_NAMESPACE,an=Z.name;if(!pe||!Be)throw new Error("Entity reference or context did not contain kind and namespace");return gt.toLocaleLowerCase("en-US")===pe.toLocaleLowerCase("en-US")&&Ht.toLocaleLowerCase("en-US")===Be.toLocaleLowerCase("en-US")&&te.toLocaleLowerCase("en-US")===an.toLocaleLowerCase("en-US")}var Ae=t(48834).Buffer;function Me(){return uuidv4()}function ye(){return Ae.from(uuidv4(),"utf8").toString("base64").replace(/[^\w]/g,"")}function ve(lt,Z){const tt=lodash.cloneDeep(lt),gt=lodash.cloneDeep(Z);return tt.metadata.labels||(tt.metadata.labels={}),gt.metadata.labels||(gt.metadata.labels={}),tt.metadata.annotations||(tt.metadata.annotations={}),gt.metadata.annotations||(gt.metadata.annotations={}),tt.metadata.tags||(tt.metadata.tags=[]),gt.metadata.tags||(gt.metadata.tags=[]),delete tt.metadata.uid,delete tt.metadata.etag,delete tt.metadata.generation,delete gt.metadata.uid,delete gt.metadata.etag,delete gt.metadata.generation,delete tt.relations,delete tt.status,delete gt.relations,delete gt.status,!lodash.isEqual(tt,gt)}function he(lt,Z){const{uid:tt,etag:gt,generation:Ht}=lt.metadata;if(!tt||!gt||!Ht)throw new Error("Previous entity must have uid, etag and generation");const te=lodash.cloneDeep(Z),pe=ve(lt,te),Be=!lodash.isEqual(lt.spec,te.spec);return te.metadata.uid=tt,te.metadata.etag=pe?ye():gt,te.metadata.generation=Be?Ht+1:Ht,te}class Ne{constructor(Z){this.policies=Z}async enforce(Z){let tt=Z;for(const gt of this.policies){const Ht=await gt.enforce(tt);if(!Ht)throw new Error(`Policy ${gt.constructor.name} did not return a result`);tt=Ht}return tt}}class Ue{constructor(Z){this.policies=Z}async enforce(Z){for(const tt of this.policies){const gt=await tt.enforce(Z);if(gt)return gt}throw new Error("The entity did not match any known policy")}}const Ie={allOf(lt){return new Ne(lt)},oneOf(lt){return new Ue(lt)}};var Le=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 fe(lt){const Z=K(lt);return{async check(tt){return Z(tt)===tt}}}const Re=fe(Le);var ze=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 xt=fe(ze);var se=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 ie=fe(se);var F=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 R=fe(F);var P=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 B=fe(P),W="ownedBy",q="ownerOf",ut="consumesApi",st="apiConsumedBy",Tt="providesApi",wt="apiProvidedBy",oe="dependsOn",Vt="dependencyOf",Rt="parentOf",Pt="childOf",_t="memberOf",ht="hasMember",St="partOf",Wt="hasPart";var zt=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 Dt=fe(zt);var re=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 Ft=fe(re);var Qt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta2","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"backstage.io/v1beta2","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","type":"website","parameters":{"required":["name","description"],"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"{{ parameters.repoUrl }}"},"if":"{{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"{{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1beta2"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template."},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template."}}]},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}},"additionalProperties":{"type":"string"}},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1}}}}}]}');const Xt=fe(Qt);var Y=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 v=fe(Y),L="backstage.io/managed-by-location",J="backstage.io/managed-by-origin-location",et="backstage.io/source-location";function yt(lt){if(typeof lt!="string")throw new TypeError(`Unable to parse location reference '${lt}', unexpected argument ${typeof lt}`);const Z=lt.indexOf(":");if(Z<0)throw new TypeError(`Unable to parse location reference '${lt}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const tt=lt.substr(0,Z).trim(),gt=lt.substr(Z+1).trim();if(!tt||!gt)throw new TypeError(`Unable to parse location reference '${lt}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(tt==="http"||tt==="https")throw new TypeError(`Invalid location reference '${lt}', please prefix it with 'url:', e.g. 'url:${lt}'`);return{type:tt,target:gt}}function ft(lt){const{type:Z,target:tt}=lt;if(Z){if(!tt)throw new TypeError("Unable to stringify location reference, empty target")}else throw new TypeError("Unable to stringify location reference, empty type");return`${Z}:${tt}`}function Bt(lt){var tt,gt,Ht,te,pe;const Z=(pe=(gt=(tt=lt.metadata)==null?void 0:tt.annotations)==null?void 0:gt[SOURCE_LOCATION_ANNOTATION])!=null?pe:(te=(Ht=lt.metadata)==null?void 0:Ht.annotations)==null?void 0:te[LOCATION_ANNOTATION];if(!Z)throw new Error(`Entity '${stringifyEntityRef(lt)}' is missing location`);return yt(Z)}var bt=t(9699);const Ee=bt.Ry({type:bt.Z_().required(),target:bt.Z_().required(),presence:bt.nK().oneOf(["required","optional"])}).noUnknown().required(),Xe=bt.Ry({id:bt.Z_().required(),type:bt.Z_().required(),target:bt.Z_().required(),presence:bt.nK().oneOf(["required","optional"])}).noUnknown().required(),on=bt.Ry({location:Ee}).noUnknown().required()},23235:function(X,o,t){"use strict";t.d(o,{C:function(){return e}});var r=t(98005);class e{constructor(){_(this,"subject",new r.J)}post(h){this.subject.next(h)}alert$(){return this.subject}}},47150:function(X,o,t){"use strict";t.d(o,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(X,o,t){"use strict";t.d(o,{C:function(){return l}});var r=t(98005);const e="theme";class l{constructor(c){_(this,"activeThemeId");_(this,"subject",new r.X(void 0));this.themes=c}static createWithStorage(c){var d;const s=new l(c);if(!window.localStorage)return s;const u=(d=window.localStorage.getItem(e))!=null?d:void 0;return s.setActiveThemeId(u),s.activeThemeId$().subscribe(y=>{y?window.localStorage.setItem(e,y):window.localStorage.removeItem(e)}),window.addEventListener("storage",y=>{var m;if(y.key===e){const E=(m=localStorage.getItem(e))!=null?m:void 0;s.setActiveThemeId(E)}}),s}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(c){this.activeThemeId=c,this.subject.next(c)}}},14721:function(X,o,t){"use strict";t.d(o,{m:function(){return y}});var r=t(9850),e=t.n(r),l=t(12782),h=t.n(l);const c=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function s(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function u(m){if(m===null)return"null";if(Array.isArray(m))return"array";const E=typeof m;return E==="number"&&isNaN(m)?"nan":E==="string"&&m===""?"empty-string":E}const d={type(m,E,i,S){return`Invalid type in config for key '${m}' in '${E}', got ${i}, wanted ${S}`},missing(m){return`Missing required config value at '${m}'`},convert(m,E,i){return`Unable to convert config value for key '${m}' in '${E}' to a ${i}`}};class y{constructor(E,i="mock-config",S,b=""){_(this,"filteredKeys");_(this,"notifiedFilteredKeys",new Set);this.data=E,this.context=i,this.fallback=S,this.prefix=b}static fromConfigs(E){return E.length===0?new y(void 0):E.reduce((i,{data:S,context:b,filteredKeys:T})=>{const G=new y(S,b,i);return G.filteredKeys=T,G},void 0)}has(E){var S,b;return this.readValue(E)!==void 0?!0:(b=(S=this.fallback)==null?void 0:S.has(E))!=null?b:!1}keys(){var S,b;const E=this.data?Object.keys(this.data):[],i=(b=(S=this.fallback)==null?void 0:S.keys())!=null?b:[];return[...new Set([...E,...i])]}get(E){const i=this.getOptional(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E!=null?E:"")));return i}getOptional(E){var b;const i=this.readValue(E),S=(b=this.fallback)==null?void 0:b.getOptional(E);return i===void 0?S:S===void 0?i:h()({},{value:e()(S)},{value:i},(T,G)=>!s(G)||!s(T)?G:void 0).value}getConfig(E){const i=this.getOptionalConfig(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalConfig(E){var b;const i=this.readValue(E),S=(b=this.fallback)==null?void 0:b.getOptionalConfig(E);if(s(i))return this.copy(i,E,S);if(i!==void 0)throw new TypeError(d.type(this.fullKey(E),this.context,u(i),"object"));return S}getConfigArray(E){const i=this.getOptionalConfigArray(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalConfigArray(E){const i=this.readConfigValue(E,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[b,T]of S.entries())if(!s(T))return{expected:"object-array",value:T,key:`${E}[${b}]`};return!0});if(!!i)return i.map((S,b)=>this.copy(S,`${E}[${b}]`))}getNumber(E){const i=this.getOptionalNumber(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalNumber(E){const i=this.readConfigValue(E,b=>typeof b=="number"||typeof b=="string"||{expected:"number"});if(typeof i=="number"||i===void 0)return i;const S=Number(i);if(!Number.isFinite(S))throw new Error(d.convert(this.fullKey(E),this.context,"number"));return S}getBoolean(E){const i=this.getOptionalBoolean(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalBoolean(E){return this.readConfigValue(E,i=>typeof i=="boolean"||{expected:"boolean"})}getString(E){const i=this.getOptionalString(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalString(E){return this.readConfigValue(E,i=>typeof i=="string"&&i!==""||{expected:"string"})}getStringArray(E){const i=this.getOptionalStringArray(E);if(i===void 0)throw new Error(d.missing(this.fullKey(E)));return i}getOptionalStringArray(E){return this.readConfigValue(E,i=>{if(!Array.isArray(i))return{expected:"string-array"};for(const[S,b]of i.entries())if(typeof b!="string"||b==="")return{expected:"string-array",value:b,key:`${E}[${S}]`};return!0})}fullKey(E){return`${this.prefix}${this.prefix?".":""}${E}`}copy(E,i,S){const b=new y(E,this.context,S,this.fullKey(i));return b.filteredKeys=this.filteredKeys,b}readConfigValue(E,i){var T;const S=this.readValue(E);if(S===void 0)return(T=this.fallback)==null?void 0:T.readConfigValue(E,i);const b=i(S);if(b!==!0){const{key:G=E,value:j=S,expected:D}=b;throw new TypeError(d.type(this.fullKey(G),this.context,u(j),D))}return S}readValue(E){const i=E?E.split("."):[];for(const b of i)if(!c.test(b))throw new TypeError(`Invalid config key '${E}'`);if(this.data===void 0)return;let S=this.data;for(const[b,T]of i.entries())if(s(S))S=S[T];else if(S!==void 0){const G=this.fullKey(i.slice(0,b).join("."));throw new TypeError(d.type(G,this.context,u(S),"object"))}return S}}},4333:function(X,o,t){"use strict";t.d(o,{p:function(){return e}});const r="Invalid discovery URL pattern,";class e{static compile(h){const c=h.split(/\{\{\s*pluginId\s*\}\}/),s=c.join("pluginId");let u;try{u=new URL(s)}catch{throw new Error(`${r} URL '${s}' is invalid`)}if(u.hash)throw new Error(`${r} URL must not have a hash`);if(u.search)throw new Error(`${r} URL must not have a query`);if(s.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new e(c)}constructor(h){this.parts=h}async getBaseUrl(h){return this.parts.join(h)}}},89536:function(X,o,t){"use strict";t.d(o,{KN:function(){return r},gr:function(){return l},Jv:function(){return h}});class r{constructor(s,u){this.alertApi=s,this.errorApi=u}post(s,u){return(u==null?void 0:u.hidden)||this.alertApi.post({message:s.message,severity:"error"}),this.errorApi.post(s,u)}error$(){return this.errorApi.error$()}}var e=t(98005);class l{constructor(){_(this,"subject",new e.J)}post(s,u){this.subject.next({error:s,context:u})}error$(){return this.subject}}class h{static forward(s,u){window.addEventListener("unhandledrejection",d=>{s.post(d.reason,u)})}}},14884:function(X,o,t){"use strict";t.d(o,{b:function(){return l}});var r=t(36964);function e(h){if(h.length<3)throw new Error(`The '${h}' feature flag must have a minimum length of three characters.`);if(h.length>150)throw new Error(`The '${h}' feature flag must not exceed 150 characters.`);if(!h.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${h}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){_(this,"registeredFeatureFlags",[]);_(this,"flags")}registerFlag(c){e(c.name),this.registeredFeatureFlags.push(c)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(c){return this.flags||(this.flags=this.load()),this.flags.get(c)===r.FeatureFlagState.Active}save(c){this.flags||(this.flags=this.load()),c.merge||this.flags.clear();for(const[u,d]of Object.entries(c.states))this.flags.set(u,d);const s=Array.from(this.flags.entries()).filter(([,u])=>u===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(s)))}load(){try{const c=window.localStorage.getItem("featureFlags");if(!c)return new Map;const s=JSON.parse(c);if(typeof s!="object"||s===null||Array.isArray(s))return new Map;const u=Object.entries(s).filter(([d,y])=>(e(d),y===r.FeatureFlagState.Active));return new Map(u)}catch{return new Map}}}},50160:function(X,o,t){"use strict";t.d(o,{I:function(){return c},j:function(){return r}});function r(s){var y;let u=s.baseImplementation||t.g.fetch;const d=[(y=s.middleware)!=null?y:[]].flat().reverse();for(const m of d)u=m.apply(u);return{fetch:u}}class e{static create(u){var E,i;const d=[];u.urlPrefixAllowlist?d.push(...u.urlPrefixAllowlist):u.config&&d.push(u.config.getString("backend.baseUrl"));const y=((E=u.header)==null?void 0:E.name)||"authorization",m=((i=u.header)==null?void 0:i.value)||(S=>`Bearer ${S}`);return new e(u.identityApi,d.map(S=>S.replace(/\/$/,"")),y,m)}constructor(u,d,y,m){this.identityApi=u,this.urlPrefixAllowlist=d,this.headerName=y,this.headerValue=m}apply(u){return async(d,y)=>{const m=new Request(d,y),{token:E}=await this.identityApi.getCredentials();return m.headers.get(this.headerName)||!this.urlPrefixAllowlist.some(i=>m.url===i||m.url.startsWith(`${i}/`))||typeof E!="string"||!E?u(d,y):(m.headers.set(this.headerName,this.headerValue(E)),u(m))}}}function l(s,u){return!u||u==="/"?s:`${s.replace(/\/$/,"")}/${u.replace(/^\//,"")}`}class h{constructor(u){this.discoveryApi=u}apply(u){return async(d,y)=>{const m=new Request(d,y),E="plugin://";if(!m.url.startsWith(E))return u(d,y);const{hostname:i,pathname:S,search:b,hash:T,username:G,password:j}=new URL(`http://${m.url.substring(E.length)}`);let D=await this.discoveryApi.getBaseUrl(i);if(G||j){const I=new URL(D),K=`${G}${j?`:${j}`:""}@`;D=`${I.protocol}//${K}${I.host}${I.pathname}`}const M=`${l(D,S)}${b}${T}`;return u(M,m)}}}class c{static resolvePluginProtocol(u){return new h(u.discoveryApi)}static injectIdentityAuth(u){return e.create(u)}constructor(){}}},11358:function(X,o,t){"use strict";t.d(o,{Y:function(){return c}});var r=t(98005);function e(s,u){for(const d of u)if(!s.has(d))return!1;return!0}function l(s,...u){const d=new Set(s);for(const y of u)for(const m of y)d.add(m);return d}class h{constructor(){_(this,"requests",[]);_(this,"subject",new r.X(this.getCurrentPending()))}request(u){return new Promise((d,y)=>{this.requests.push({scopes:u,resolve:d,reject:y}),this.subject.next(this.getCurrentPending())})}resolve(u,d){this.requests=this.requests.filter(y=>e(u,y.scopes)?(y.resolve(d),!1):!0),this.subject.next(this.getCurrentPending())}reject(u){this.requests.forEach(d=>d.reject(u)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const u=this.requests.length===0?void 0:this.requests.slice(1).reduce((d,y)=>l(d,y.scopes),this.requests[0].scopes);return{scopes:u,resolve:d=>{u&&this.resolve(u,d)},reject:d=>{u&&this.reject(d)}}}}class c{constructor(){_(this,"subject",new r.X([]));_(this,"currentRequests",[]);_(this,"handlerCount",0)}createAuthRequester(u){u.provider.id||console.warn("DEPRECATION WARNING: Not passing a provider id to createAuthRequester is deprecated, it will be required in the future");const d=new h,y=this.handlerCount;return this.handlerCount++,d.pending().subscribe({next:m=>{const E=this.currentRequests.slice(),i=this.makeAuthRequest(m,u);i?E[y]=i:delete E[y],this.currentRequests=E,this.subject.next(E.filter(Boolean))}}),m=>d.request(m)}makeAuthRequest(u,d){const{scopes:y}=u;if(!!y)return{provider:d.provider,trigger:async()=>{const m=await d.onAuthRequest(y);u.resolve(m)},reject:()=>{const m=new Error("Login failed, rejected by user");m.name="RejectedError",u.reject(m)}}}authRequest$(){return this.subject}}},56054:function(X,o,t){"use strict";t.d(o,{C:function(){return h}});var r=t(82394),e=t.n(r);const l=new Map;class h{constructor(s,u){_(this,"subscribers",new Set);_(this,"observable",new(e())(s=>(this.subscribers.add(s),()=>{this.subscribers.delete(s)})));this.namespace=s,this.errorApi=u}static create(s){var u;return new h((u=s.namespace)!=null?u:"",s.errorApi)}get(s){return this.snapshot(s).value}snapshot(s){let u,d="absent";try{const y=localStorage.getItem(this.getKeyName(s));y&&(u=JSON.parse(y,(m,E)=>(typeof E=="object"&&E!==null&&Object.freeze(E),E)),d="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${s}`))}return{key:s,value:u,newValue:u,presence:d}}forBucket(s){const u=`${this.namespace}/${s}`;return l.has(u)||l.set(u,new h(u,this.errorApi)),l.get(u)}async set(s,u){localStorage.setItem(this.getKeyName(s),JSON.stringify(u)),this.notifyChanges(s)}async remove(s){localStorage.removeItem(this.getKeyName(s)),this.notifyChanges(s)}observe$(s){return this.observable.filter(({key:u})=>u===s)}getKeyName(s){return`${this.namespace}/${encodeURIComponent(s)}`}notifyChanges(s){const u=this.snapshot(s);for(const d of this.subscribers)d.next(u)}}},59589:function(X,o,t){"use strict";t.d(o,{u:function(){return l}});var r=t(91205);const e={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u})}}},92293:function(X,o,t){"use strict";t.d(o,{Z:function(){return l}});var r=t(91205);const e={id:"auth0",title:"Auth0",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y,defaultScopes:m=["openid","email","profile"]}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u,defaultScopes:m})}}},6098:function(X,o,t){"use strict";t.d(o,{Z:function(){return l}});var r=t(91205);const e={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y,defaultScopes:m=["team"]}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u,defaultScopes:m})}}},44431:function(X,o,t){"use strict";t.d(o,{x:function(){return l.Z}});var r=t(19347),e=t.n(r);t.o(r,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),t.o(r,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),t.o(r,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),t.o(r,"ConfigReader")&&t.d(o,{ConfigReader:function(){return r.ConfigReader}}),t.o(r,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),t.o(r,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),t.o(r,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),t.o(r,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),t.o(r,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),t.o(r,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),t.o(r,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),t.o(r,"WebStorage")&&t.d(o,{WebStorage:function(){return r.WebStorage}}),t.o(r,"createFetchApi")&&t.d(o,{createFetchApi:function(){return r.createFetchApi}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var l=t(6098)},19347:function(){},55551:function(X,o,t){"use strict";t.d(o,{T:function(){return d}});var r=t(96176),e=t(54842),l=t(91405);class h{constructor(m){_(this,"stateTracker",new l.l);_(this,"sessionCanRefresh");_(this,"staticSessionManager");_(this,"refreshingSessionManager");this.sessionCanRefresh=m.sessionCanRefresh,this.staticSessionManager=m.staticSessionManager,this.refreshingSessionManager=m.refreshingSessionManager}async getSession(m){const E=await this.staticSessionManager.getSession({...m,optional:!0});if(E)return this.stateTracker.setIsSignedIn(!0),E;const i=await this.refreshingSessionManager.getSession(m);if(!i){this.stateTracker.setIsSignedIn(!1);return}return this.sessionCanRefresh(i)?(this.stateTracker.setIsSignedIn(!0),i):(this.staticSessionManager.setSession(i),this.stateTracker.setIsSignedIn(!0),i)}async removeSession(){await Promise.all([this.refreshingSessionManager.removeSession(),this.staticSessionManager.removeSession()]),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}var c=t(30195);const s=c.z.object({providerInfo:c.z.object({accessToken:c.z.string(),scopes:c.z.set(c.z.string()),expiresAt:c.z.date().optional()}),profile:c.z.object({email:c.z.string().optional(),displayName:c.z.string().optional(),picture:c.z.string().optional()}),backstageIdentity:c.z.object({id:c.z.string(),token:c.z.string(),identity:c.z.object({type:c.z.literal("user"),userEntityRef:c.z.string(),ownershipEntityRefs:c.z.array(c.z.string())})})}),u={id:"github",title:"GitHub",icon:()=>null};class d{static create(m){const{discoveryApi:E,environment:i="development",provider:S=u,oauthRequestApi:b,defaultScopes:T=["read:user"]}=m,G=new r.y({discoveryApi:E,environment:i,provider:S,oauthRequestApi:b,sessionTransform(I){return{...I,providerInfo:{accessToken:I.providerInfo.accessToken,scopes:d.normalizeScope(I.providerInfo.scope),expiresAt:I.providerInfo.expiresInSeconds?new Date(Date.now()+I.providerInfo.expiresInSeconds*1e3):void 0}}}}),j=new e.q2({connector:G,defaultScopes:new Set(T),sessionScopes:I=>I.providerInfo.scopes,sessionShouldRefresh:I=>{const{expiresAt:K}=I.providerInfo;return K?(K.getTime()-Date.now())/1e3<60*5:!1}}),D=new e.Hc({manager:new e.k1({connector:G,defaultScopes:new Set(T),sessionScopes:I=>I.providerInfo.scopes}),storageKey:`${S.id}Session`,schema:s,sessionScopes:I=>I.providerInfo.scopes}),M=new h({refreshingSessionManager:j,staticSessionManager:D,sessionCanRefresh:I=>I.providerInfo.expiresAt!==void 0});return new d(M)}constructor(m){this.sessionManager=m}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(m,E){var S;const i=await this.sessionManager.getSession({...E,scopes:d.normalizeScope(m)});return(S=i==null?void 0:i.providerInfo.accessToken)!=null?S:""}async getBackstageIdentity(m={}){const E=await this.sessionManager.getSession(m);return E==null?void 0:E.backstageIdentity}async getProfile(m={}){const E=await this.sessionManager.getSession(m);return E==null?void 0:E.profile}static normalizeScope(m){if(!m)return new Set;const E=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(E)}}},2922:function(X,o,t){"use strict";t.d(o,{a:function(){return l}});var r=t(91205);const e={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(c){const{discoveryApi:s,environment:u="development",provider:d=e,oauthRequestApi:y,defaultScopes:m=["read_user"]}=c;return r.L.create({discoveryApi:s,oauthRequestApi:y,provider:d,environment:u,defaultScopes:m})}}},59938:function(X,o,t){"use strict";t.d(o,{e:function(){return h}});var r=t(91205);const e={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class h{static create(s){const{discoveryApi:u,oauthRequestApi:d,environment:y="development",provider:m=e,defaultScopes:E=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=s;return r.L.create({discoveryApi:u,oauthRequestApi:d,provider:m,environment:y,defaultScopes:E,scopeTransform(i){return i.map(S=>S==="openid"?S:S==="profile"||S==="email"?`${l}userinfo.${S}`:S.startsWith(l)?S:`${l}${S}`)}})}}},91668:function(X,o,t){"use strict";t.d(o,{Td:function(){return r.T},aq:function(){return e.a},eE:function(){return l.e},OAuth2:function(){return h.L},OktaAuth:function(){return c.s},SamlAuth:function(){return s.n},Auth0Auth:function(){return u.Z},MicrosoftAuth:function(){return d._},OneLoginAuth:function(){return y.$},BitbucketAuth:function(){return m.x},AtlassianAuth:function(){return E.u}});var r=t(55551),e=t(2922),l=t(59938),h=t(91205);t.o(h,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),t.o(h,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return h.AppThemeSelector}}),t.o(h,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return h.AtlassianAuth}}),t.o(h,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return h.Auth0Auth}}),t.o(h,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return h.BitbucketAuth}}),t.o(h,"ConfigReader")&&t.d(o,{ConfigReader:function(){return h.ConfigReader}}),t.o(h,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return h.ErrorAlerter}}),t.o(h,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),t.o(h,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),t.o(h,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return h.FlatRoutes}}),t.o(h,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),t.o(h,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),t.o(h,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),t.o(h,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),t.o(h,"OktaAuth")&&t.d(o,{OktaAuth:function(){return h.OktaAuth}}),t.o(h,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return h.OneLoginAuth}}),t.o(h,"SamlAuth")&&t.d(o,{SamlAuth:function(){return h.SamlAuth}}),t.o(h,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),t.o(h,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),t.o(h,"WebStorage")&&t.d(o,{WebStorage:function(){return h.WebStorage}}),t.o(h,"createFetchApi")&&t.d(o,{createFetchApi:function(){return h.createFetchApi}}),t.o(h,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return h.createSpecializedApp}});var c=t(26079),s=t(67578),u=t(92293),d=t(38482),y=t(58381),m=t(44431);t.o(m,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),t.o(m,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return m.AppThemeSelector}}),t.o(m,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return m.AtlassianAuth}}),t.o(m,"ConfigReader")&&t.d(o,{ConfigReader:function(){return m.ConfigReader}}),t.o(m,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return m.ErrorAlerter}}),t.o(m,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),t.o(m,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),t.o(m,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return m.FlatRoutes}}),t.o(m,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),t.o(m,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),t.o(m,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),t.o(m,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),t.o(m,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),t.o(m,"WebStorage")&&t.d(o,{WebStorage:function(){return m.WebStorage}}),t.o(m,"createFetchApi")&&t.d(o,{createFetchApi:function(){return m.createFetchApi}}),t.o(m,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return m.createSpecializedApp}});var E=t(59589)},38482:function(X,o,t){"use strict";t.d(o,{_:function(){return l}});var r=t(91205);const e={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(c){const{environment:s="development",provider:u=e,oauthRequestApi:d,discoveryApi:y,defaultScopes:m=["openid","offline_access","profile","email","User.Read"]}=c;return r.L.create({discoveryApi:y,oauthRequestApi:d,provider:u,environment:s,defaultScopes:m})}}},95792:function(X,o,t){"use strict";t.d(o,{Z:function(){return h}});var r=t(96176),e=t(54842);const l={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class h{constructor(s){_(this,"sessionManager");_(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:u,environment:d="development",provider:y=l,oauthRequestApi:m,defaultScopes:E=[],scopeTransform:i=T=>T}=s,S=new r.y({discoveryApi:u,environment:d,provider:y,oauthRequestApi:m,sessionTransform(T){return{...T,providerInfo:{idToken:T.providerInfo.idToken,accessToken:T.providerInfo.accessToken,scopes:h.normalizeScopes(i,T.providerInfo.scope),expiresAt:new Date(Date.now()+T.providerInfo.expiresInSeconds*1e3)}}}}),b=new e.q2({connector:S,defaultScopes:new Set(E),sessionScopes:T=>T.providerInfo.scopes,sessionShouldRefresh:T=>(T.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new h({sessionManager:b,scopeTransform:i})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,u){var m;const d=h.normalizeScopes(this.scopeTransform,s),y=await this.sessionManager.getSession({...u,scopes:d});return(m=y==null?void 0:y.providerInfo.accessToken)!=null?m:""}async getIdToken(s={}){var d;const u=await this.sessionManager.getSession(s);return(d=u==null?void 0:u.providerInfo.idToken)!=null?d:""}async getBackstageIdentity(s={}){const u=await this.sessionManager.getSession(s);return u==null?void 0:u.backstageIdentity}async getProfile(s={}){const u=await this.sessionManager.getSession(s);return u==null?void 0:u.profile}static normalizeScopes(s,u){if(!u)return new Set;const d=Array.isArray(u)?u:u.split(/[\s|,]/).filter(Boolean);return new Set(s(d))}}},91205:function(X,o,t){"use strict";t.d(o,{L:function(){return r.Z}});var r=t(95792),e=t(5973),l=t.n(e);t.o(e,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return e.AlertApiForwarder}}),t.o(e,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return e.AppThemeSelector}}),t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"ConfigReader")&&t.d(o,{ConfigReader:function(){return e.ConfigReader}}),t.o(e,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return e.ErrorAlerter}}),t.o(e,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return e.ErrorApiForwarder}}),t.o(e,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return e.FetchMiddlewares}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return e.LocalStorageFeatureFlags}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return e.NoOpAnalyticsApi}}),t.o(e,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return e.OAuthRequestManager}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}}),t.o(e,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return e.UnhandledErrorForwarder}}),t.o(e,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return e.UrlPatternDiscovery}}),t.o(e,"WebStorage")&&t.d(o,{WebStorage:function(){return e.WebStorage}}),t.o(e,"createFetchApi")&&t.d(o,{createFetchApi:function(){return e.createFetchApi}}),t.o(e,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return e.createSpecializedApp}})},5973:function(){},26079:function(X,o,t){"use strict";t.d(o,{s:function(){return c}});var r=t(91205);const e={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="okta.";class c{static create(u){const{discoveryApi:d,environment:y="development",provider:m=e,oauthRequestApi:E,defaultScopes:i=["openid","email","profile","offline_access"]}=u;return r.L.create({discoveryApi:d,oauthRequestApi:E,provider:m,environment:y,defaultScopes:i,scopeTransform(S){return S.map(b=>l.has(b)||b.startsWith(h)?b:`${h}${b}`)}})}}},58381:function(X,o,t){"use strict";t.d(o,{$:function(){return c}});var r=t(91205);const e={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="onelogin.";class c{static create(u){const{discoveryApi:d,environment:y="development",provider:m=e,oauthRequestApi:E}=u;return r.L.create({discoveryApi:d,oauthRequestApi:E,provider:m,environment:y,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(i){return i.map(S=>l.has(S)||S.startsWith(h)?S:`${h}${S}`)}})}}},67578:function(X,o,t){"use strict";t.d(o,{n:function(){return u}});var r=t(17678);class e{constructor(y){_(this,"discoveryApi");_(this,"environment");_(this,"provider");const{discoveryApi:m,environment:E,provider:i}=y;this.discoveryApi=m,this.environment=E,this.provider=i}async createSession(){const y=await this.buildUrl("/start"),m=await(0,r.d)({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return{...m,id:m.profile.email}}async refreshSession(){}async removeSession(){const y=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!y.ok){const m=new Error(`Logout request failed, ${y.statusText}`);throw m.status=y.status,m}}async buildUrl(y){return`${await this.discoveryApi.getBaseUrl("auth")}/${this.provider.id}${y}?env=${this.environment}`}}var l=t(54842),h=t(30195);const c=h.z.object({userId:h.z.string(),profile:h.z.object({email:h.z.string().optional(),displayName:h.z.string().optional(),picture:h.z.string().optional()}),backstageIdentity:h.z.object({id:h.z.string(),token:h.z.string(),identity:h.z.object({type:h.z.literal("user"),userEntityRef:h.z.string(),ownershipEntityRefs:h.z.array(h.z.string())})})}),s={id:"saml",title:"SAML",icon:()=>null};class u{static create(y){const{discoveryApi:m,environment:E="development",provider:i=s}=y,S=new e({discoveryApi:m,environment:E,provider:i}),b=new l.k1({connector:S}),T=new l.Hc({manager:b,storageKey:`${i.id}Session`,schema:c});return new u(T)}sessionState$(){return this.sessionManager.sessionState$()}constructor(y){this.sessionManager=y}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(y={}){const m=await this.sessionManager.getSession(y);return m==null?void 0:m.backstageIdentity}async getProfile(y={}){const m=await this.sessionManager.getSession(y);return m==null?void 0:m.profile}}},91631:function(X,o,t){"use strict";t.d(o,{AtlassianAuth:function(){return r.AtlassianAuth},Auth0Auth:function(){return r.Auth0Auth},GithubAuth:function(){return r.Td},GitlabAuth:function(){return r.aq},GoogleAuth:function(){return r.eE},MicrosoftAuth:function(){return r.MicrosoftAuth},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},SamlAuth:function(){return r.SamlAuth},AlertApiForwarder:function(){return e.C},NoOpAnalyticsApi:function(){return l.g},AppThemeSelector:function(){return h.C},ConfigReader:function(){return c.m},UrlPatternDiscovery:function(){return s.p},ErrorAlerter:function(){return u.KN},ErrorApiForwarder:function(){return u.gr},UnhandledErrorForwarder:function(){return u.Jv},LocalStorageFeatureFlags:function(){return d.b},FetchMiddlewares:function(){return y.I},createFetchApi:function(){return y.j},OAuthRequestManager:function(){return m.Y},WebStorage:function(){return E.C}});var r=t(91668);t.o(r,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),t.o(r,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),t.o(r,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),t.o(r,"ConfigReader")&&t.d(o,{ConfigReader:function(){return r.ConfigReader}}),t.o(r,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),t.o(r,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),t.o(r,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),t.o(r,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),t.o(r,"OAuth2")&&t.d(o,{OAuth2:function(){return r.OAuth2}}),t.o(r,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),t.o(r,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),t.o(r,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),t.o(r,"WebStorage")&&t.d(o,{WebStorage:function(){return r.WebStorage}}),t.o(r,"createFetchApi")&&t.d(o,{createFetchApi:function(){return r.createFetchApi}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var e=t(23235),l=t(47150),h=t(58652),c=t(14721),s=t(4333),u=t(89536),d=t(14884),y=t(50160),m=t(11358),E=t(56054)},56494:function(X,o,t){"use strict";t.d(o,{ApiProvider:function(){return r.gs},ApiRegistry:function(){return r.GW},AlertApiForwarder:function(){return e.AlertApiForwarder},AppThemeSelector:function(){return e.AppThemeSelector},ConfigReader:function(){return e.ConfigReader},ErrorAlerter:function(){return e.ErrorAlerter},ErrorApiForwarder:function(){return e.ErrorApiForwarder},FetchMiddlewares:function(){return e.FetchMiddlewares},LocalStorageFeatureFlags:function(){return e.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return e.NoOpAnalyticsApi},OAuthRequestManager:function(){return e.OAuthRequestManager},UnhandledErrorForwarder:function(){return e.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return e.UrlPatternDiscovery},WebStorage:function(){return e.WebStorage},createFetchApi:function(){return e.createFetchApi}});var r=t(76105);t.o(r,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),t.o(r,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return r.AppThemeSelector}}),t.o(r,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),t.o(r,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),t.o(r,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),t.o(r,"ConfigReader")&&t.d(o,{ConfigReader:function(){return r.ConfigReader}}),t.o(r,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return r.ErrorAlerter}}),t.o(r,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),t.o(r,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"GithubAuth")&&t.d(o,{GithubAuth:function(){return r.GithubAuth}}),t.o(r,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),t.o(r,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),t.o(r,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),t.o(r,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),t.o(r,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),t.o(r,"OAuth2")&&t.d(o,{OAuth2:function(){return r.OAuth2}}),t.o(r,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),t.o(r,"OktaAuth")&&t.d(o,{OktaAuth:function(){return r.OktaAuth}}),t.o(r,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),t.o(r,"SamlAuth")&&t.d(o,{SamlAuth:function(){return r.SamlAuth}}),t.o(r,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),t.o(r,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),t.o(r,"WebStorage")&&t.d(o,{WebStorage:function(){return r.WebStorage}}),t.o(r,"createFetchApi")&&t.d(o,{createFetchApi:function(){return r.createFetchApi}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var e=t(91631);t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"GithubAuth")&&t.d(o,{GithubAuth:function(){return e.GithubAuth}}),t.o(e,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return e.GitlabAuth}}),t.o(e,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return e.GoogleAuth}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"OAuth2")&&t.d(o,{OAuth2:function(){return e.OAuth2}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}}),t.o(e,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return e.createSpecializedApp}})},80396:function(X,o,t){"use strict";t.d(o,{p:function(){return e}});var r;(function(l){l[l.default=10]="default";const h=50;l[l.app=h]="app",l[l.static=100]="static"})(r||(r={}));class e{constructor(){_(this,"factories",new Map)}register(h,c){const s=r[h],u=this.factories.get(c.api.id);return u&&u.priority>=s?!1:(this.factories.set(c.api.id,{priority:s,factory:c}),!0)}get(h){const c=this.factories.get(h.id);if(!!c)return c.factory}getAllApis(){const h=new Set;for(const{factory:c}of this.factories.values())h.add(c.api);return h}}},14406:function(X,o,t){"use strict";t.d(o,{g:function(){return u}});var r=t(2784),e=t(13980),l=t.n(e);class h{constructor(...y){_(this,"holders");this.holders=y}get(y){for(const m of this.holders){const E=m.get(y);if(E)return E}}}var c=t(76241);const s=(0,c.CT)("api-context"),u=d=>{var S;const{apis:y,children:m}=d,E=(S=(0,r.useContext)(s))==null?void 0:S.atVersion(1),i=E?new h(y,E):y;return r.createElement(s.Provider,{value:(0,c.EI)({1:i}),children:m})};u.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},31964:function(X,o,t){"use strict";t.d(o,{G:function(){return e}});class r{constructor(){_(this,"apis",[])}add(h,c){return this.apis.push([h.id,c]),c}build(){return new e(new Map(this.apis))}}class e{static builder(){return new r}static from(h){return new e(new Map(h.map(([c,s])=>[c.id,s])))}static with(h,c){return new e(new Map([[h.id,c]]))}constructor(h){this.apis=h}with(h,c){return new e(new Map([...this.apis,[h.id,c]]))}get(h){return this.apis.get(h.id)}}},12132:function(X,o,t){"use strict";t.d(o,{M:function(){return r}});class r{constructor(l){_(this,"apis",new Map);this.factories=l}static validateFactories(l,h){for(const c of h){const s=[c],u=new Set;for(;s.length;){const d=s.shift(),y=l.get(d);if(!!y)for(const m of Object.values(y.deps)){if(m.id===c.id)throw new Error(`Circular dependency of api factory for ${c}`);u.has(m)||(u.add(m),s.push(m))}}}}get(l){return this.load(l)}load(l,h=[]){const c=this.apis.get(l.id);if(c)return c;const s=this.factories.get(l);if(!s)return;if(h.includes(s.api))throw new Error(`Circular dependency of api factory for ${s.api}`);const u=this.loadDeps(l,s.deps,[...h,s.api]),d=s.factory(u);return this.apis.set(l.id,d),d}loadDeps(l,h,c){const s={};for(const u in h)if(h.hasOwnProperty(u)){const d=h[u],y=this.load(d,c);if(!y)throw new Error(`No API factory available for dependency ${d} of dependent ${l}`);s[u]=y}return s}}},76105:function(X,o,t){"use strict";t.d(o,{gs:function(){return r.g},GW:function(){return e.G},MM:function(){return l.M},pv:function(){return h.p}});var r=t(14406),e=t(31964),l=t(12132),h=t(80396),c=t(82488),s=t.n(c);t.o(c,"AlertApiForwarder")&&t.d(o,{AlertApiForwarder:function(){return c.AlertApiForwarder}}),t.o(c,"AppThemeSelector")&&t.d(o,{AppThemeSelector:function(){return c.AppThemeSelector}}),t.o(c,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return c.AtlassianAuth}}),t.o(c,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return c.Auth0Auth}}),t.o(c,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return c.BitbucketAuth}}),t.o(c,"ConfigReader")&&t.d(o,{ConfigReader:function(){return c.ConfigReader}}),t.o(c,"ErrorAlerter")&&t.d(o,{ErrorAlerter:function(){return c.ErrorAlerter}}),t.o(c,"ErrorApiForwarder")&&t.d(o,{ErrorApiForwarder:function(){return c.ErrorApiForwarder}}),t.o(c,"FetchMiddlewares")&&t.d(o,{FetchMiddlewares:function(){return c.FetchMiddlewares}}),t.o(c,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return c.FlatRoutes}}),t.o(c,"GithubAuth")&&t.d(o,{GithubAuth:function(){return c.GithubAuth}}),t.o(c,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return c.GitlabAuth}}),t.o(c,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return c.GoogleAuth}}),t.o(c,"LocalStorageFeatureFlags")&&t.d(o,{LocalStorageFeatureFlags:function(){return c.LocalStorageFeatureFlags}}),t.o(c,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),t.o(c,"NoOpAnalyticsApi")&&t.d(o,{NoOpAnalyticsApi:function(){return c.NoOpAnalyticsApi}}),t.o(c,"OAuth2")&&t.d(o,{OAuth2:function(){return c.OAuth2}}),t.o(c,"OAuthRequestManager")&&t.d(o,{OAuthRequestManager:function(){return c.OAuthRequestManager}}),t.o(c,"OktaAuth")&&t.d(o,{OktaAuth:function(){return c.OktaAuth}}),t.o(c,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return c.OneLoginAuth}}),t.o(c,"SamlAuth")&&t.d(o,{SamlAuth:function(){return c.SamlAuth}}),t.o(c,"UnhandledErrorForwarder")&&t.d(o,{UnhandledErrorForwarder:function(){return c.UnhandledErrorForwarder}}),t.o(c,"UrlPatternDiscovery")&&t.d(o,{UrlPatternDiscovery:function(){return c.UrlPatternDiscovery}}),t.o(c,"WebStorage")&&t.d(o,{WebStorage:function(){return c.WebStorage}}),t.o(c,"createFetchApi")&&t.d(o,{createFetchApi:function(){return c.createFetchApi}}),t.o(c,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return c.createSpecializedApp}})},82488:function(){},92166:function(X,o,t){"use strict";t.d(o,{b:function(){return ie}});var r=t(2784),e=t(10289),l=t(64279),h=t(56494),c=t(36964),s=t(41682),u=t(76105);function d(F){const R={};for(const B in F.collectors)F.collectors.hasOwnProperty(B)&&(R[B]=F.collectors[B]());const P=[{node:r.Children.toArray(F.root),parent:void 0,contexts:{}}];for(;P.length!==0;){const{node:B,parent:W,contexts:q}=P.shift();r.Children.forEach(B,ut=>{if(!(0,r.isValidElement)(ut))return;const st={};for(const Tt in R)if(R.hasOwnProperty(Tt)){const wt=R[Tt];st[Tt]=wt.visit(wt.accumulator,ut,W,q[Tt])}for(const Tt of F.discoverers){const wt=Tt(ut);wt&&P.push({node:wt,parent:ut,contexts:st})}})}return Object.fromEntries(Object.entries(R).map(([B,W])=>[B,W.accumulator]))}function y(F,R){return()=>({accumulator:F(),visit:R})}function m(F){var R;return(R=F.props)==null?void 0:R.children}function E(F){var R,P,B;if(((R=F.props)==null?void 0:R.path)&&((P=F.props)==null?void 0:P.element))return(B=F.props)==null?void 0:B.element}const i=y(()=>new Set,(F,R)=>{const P=(0,c.getComponentData)(R,"core.plugin");P&&F.add(P)});var S=t(88934);function b(F){var B;const R=(B=F.props)==null?void 0:B.element;let P=(0,c.getComponentData)(F,"core.mountPoint");return!P&&(0,r.isValidElement)(R)&&(P=(0,c.getComponentData)(R,"core.mountPoint")),P}const T=y(()=>new Map,(F,R,P,B)=>{var ut,st;let W=B;if((P==null?void 0:P.props.element)===R)return W;if((0,c.getComponentData)(R,"core.gatherMountPoints")){const Tt=(ut=R.props)==null?void 0:ut.path;if(!Tt)throw new Error("Mount point gatherer must have a path");W=Tt}const q=b(R);if(q){let Tt=(st=R.props)==null?void 0:st.path;if(W&&(Tt?W=void 0:Tt=W),!Tt)throw new Error("Mounted routable extension must have a path");F.set(q,Tt)}return W}),G=y(()=>new Map,(F,R,P,B)=>{var ut;if((P==null?void 0:P.props.element)===R)return B;let W=B;const q=b(R);return q&&(B&&"sticky"in B?(F.set(q,B.sticky),((ut=R.props)==null?void 0:ut.path)?W=q:W=B):(F.set(q,B),W=q)),(0,c.getComponentData)(R,"core.gatherMountPoints")?{sticky:W}:W}),j={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},D=y(()=>Array(),(F,R,P,B)=>{var wt,oe,Vt;const W=(wt=B==null?void 0:B.children)!=null?wt:F;if((P==null?void 0:P.props.element)===R)return B;const q=(oe=R.props)==null?void 0:oe.path,ut=Boolean((Vt=R.props)==null?void 0:Vt.caseSensitive),st=b(R);if(st){if(q){const Rt={caseSensitive:ut,path:q,element:"mounted",routeRefs:new Set([st]),children:[j],plugin:(0,c.getComponentData)(R.props.element,"core.plugin")};return W.push(Rt),Rt}B==null||B.routeRefs.add(st)}if((0,c.getComponentData)(R,"core.gatherMountPoints")){if(!q)throw new Error("Mount point gatherer must have a path");const Rt={caseSensitive:ut,path:q,element:"gathered",routeRefs:new Set,children:[j],plugin:B==null?void 0:B.plugin};return W.push(Rt),Rt}return B}),M=y(()=>new Set,(F,R)=>{if(R.type===S.L){const P=R.props;F.add("with"in P?P.with:P.without)}});var I=t(76241);const K=(0,I.uW)("route-ref-type",()=>Symbol("route-ref-type"));function V(F){return F[K]==="absolute"}function ot(F){return F[K]==="sub"}function vt(F){return F[K]==="external"}function Zt(...F){const R=F.join("/").replace(/\/\/+/g,"/");return R!=="/"&&R.endsWith("/")?R.slice(0,-1):R}function mt(F,R,P){let B,W="";if(V(F))B=F;else if(ot(F))B=F.parent,W=F.path;else if(vt(F)){const st=P.get(F);if(!st)return[void 0,""];if(V(st))B=st;else if(ot(st))B=st.parent,W=st.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${st}`)}else throw F[K]?new Error(`Unknown or invalid route ref type, ${F[K]}`):new Error(`Unknown object passed to useRouteRef, got ${F}`);if(!B)return[void 0,""];const q=R.get(B);if(!q)return[void 0,""];const ut=Zt(q,W);return[B,ut]}function jt(F,R,P,B,W){var oe;const q=(oe=(0,e.fp)(W,R))!=null?oe:[],ut=Array();let st=-1;for(let Vt=F;Vt&&(st=q.findIndex(Rt=>Rt.route.routeRefs.has(Vt)),st===-1);Vt=B.get(Vt))ut.unshift(Vt);ut.length===0&&(st-=1);const Tt=st===-1?"":q[st].pathname,wt=Zt(...ut.slice(0,-1).map(Vt=>{const Rt=P.get(Vt);if(!Rt)throw new Error(`No path for ${Vt}`);if(Rt.includes(":"))throw new Error(`Cannot route to ${F} with parent ${Vt} as it has parameters`);return Rt}));return Tt+wt}class Lt{constructor(R,P,B,W,q){this.routePaths=R,this.routeParents=P,this.routeObjects=B,this.routeBindings=W,this.appBasePath=q}resolve(R,P){const[B,W]=mt(R,this.routePaths,this.routeBindings);if(!B)return;let q;typeof P=="string"?q=this.trimPath(P):P.pathname?q={...P,pathname:this.trimPath(P.pathname)}:q=P;const ut=this.appBasePath+jt(B,q,this.routePaths,this.routeParents,this.routeObjects);return(...[Tt])=>ut+(0,e.Gn)(W,Tt)}trimPath(R){return R&&(R.startsWith(this.appBasePath)?R.slice(this.appBasePath.length):R)}}const Kt=(0,I.CT)("routing-context"),ae=({routePaths:F,routeParents:R,routeObjects:P,routeBindings:B,basePath:W="",children:q})=>{const ut=new Lt(F,R,P,B,W),st=(0,I.EI)({1:ut});return r.createElement(Kt.Provider,{value:st},q)},qt=(F,R)=>{var P,B;try{const W=(0,e.fp)(R,{pathname:F}),q=(P=W==null?void 0:W.filter(st=>{var Tt;return((Tt=st==null?void 0:st.route.routeRefs)==null?void 0:Tt.size)>0}).pop())==null?void 0:P.route;if(!q)return{};let ut;return q.routeRefs.size===1&&(ut=q.routeRefs.values().next().value),{extension:"App",pluginId:((B=q.plugin)==null?void 0:B.getId())||"root",...ut?{routeRef:ut.id}:{}}}catch{return{}}},me=({pathname:F,search:R,hash:P})=>{const B=(0,c.useAnalytics)();return(0,r.useEffect)(()=>{B.captureEvent("navigate",`${F}${R}${P}`)},[B,F,R,P]),null},le=({tree:F})=>{const{pathname:R,search:P,hash:B}=(0,e.TH)(),{routeObjects:W}=(0,r.useMemo)(()=>d({root:F,discoverers:[m,E],collectors:{routeObjects:D}}),[F]);return r.createElement(c.AnalyticsContext,{attributes:qt(R,W)},r.createElement(me,{pathname:R,search:P,hash:B}))};function ce(F,R){const P=new Set(R.values());P.delete(void 0);for(const B of R.keys()){if(P.has(B))continue;let W=B,q="";for(;W;){const st=F.get(W);if(!st)throw new Error(`No path for ${W}`);q=`${st}${q}`,W=R.get(W)}const ut=q.match(/:(\w+)/g);if(ut){for(let st=0;st<ut.length;st++)for(let Tt=st+1;Tt<ut.length;Tt++)if(ut[Tt]===ut[st])throw new Error(`Parameter ${ut[Tt]} is duplicated in path ${q}`)}}}const Ae=(0,I.CT)("app-context"),Me=({appContext:F,children:R})=>{const P=(0,I.EI)({1:F});return r.createElement(Ae.Provider,{value:P,children:R})};function ye(F){return new Error(`Tried to access IdentityApi ${F} before app was loaded`)}class ve{constructor(){_(this,"target")}setTarget(R){this.target=R}getUserId(){if(!this.target)throw ye("getUserId");return this.target.getUserId()}getProfile(){if(!this.target)throw ye("getProfile");return this.target.getProfile()}async getProfileInfo(){if(!this.target)throw ye("getProfileInfo");return this.target.getProfileInfo()}async getBackstageIdentity(){if(!this.target)throw ye("getBackstageIdentity");return this.target.getBackstageIdentity()}async getCredentials(){if(!this.target)throw ye("getCredentials");return this.target.getCredentials()}async getIdToken(){if(!this.target)throw ye("getIdToken");return this.target.getIdToken()}async signOut(){if(!this.target)throw ye("signOut");await this.target.signOut(),location.reload()}}var he=t(72164);function Ne(F,R,P){if(F!==void 0){const W=P.find(q=>q.id===F);if(W)return W}if(R){const W=P.find(q=>q.variant==="dark");if(W)return W}const B=P.find(W=>W.variant==="light");return B||P[0]}const Ue=()=>{const F=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[R,P]=(0,r.useState)(F.matches);return(0,r.useEffect)(()=>{const B=W=>{P(W.matches)};return F.addListener(B),()=>{F.removeListener(B)}},[F]),R};function Ie({children:F}){const R=(0,c.useApi)(c.appThemeApiRef),P=(0,he.Z)(R.activeThemeId$(),R.getActiveThemeId()),B=Boolean(window.matchMedia)?Ue():!1,W=Ne(P,B,R.getInstalledThemes());if(!W)throw new Error("App has no themes");return r.createElement(W.Provider,{children:F})}const Le=async(F="__APP_INJECTED_RUNTIME_CONFIG__")=>{const R=[{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(!R)throw new Error("No static configuration provided");if(!Array.isArray(R))throw new Error("Static configuration has invalid format");const P=R.slice();if(F!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const W=JSON.parse(F);Array.isArray(W)?P.push(...W):P.push({data:W,context:"env"})}catch(W){throw new Error(`Failed to load runtime configuration, ${W}`)}const B=window.__APP_CONFIG__;return B&&P.push({context:"window",data:B}),P};function fe(F){const R=new Map;return F&&F({bind:(B,W)=>{for(const[q,ut]of Object.entries(W)){const st=B[q];if(!st)throw new Error(`Key ${q} is not an existing external route`);if(!ut&&!st.optional)throw new Error(`External route ${q} is required but was undefined`);ut&&R.set(st,ut)}}}),R}function Re(F){var P;let{pathname:R}=new URL((P=F.getOptionalString("app.baseUrl"))!=null?P:"/","http://dummy.dev");return R=R.replace(/\/*$/,""),R}function ze(F,R,P){var Tt;const B=Boolean(F),W=(0,l.default)(F||(()=>Promise.resolve([])));let q;if(B&&W.loading){const{Progress:wt}=R;q=r.createElement(wt,null)}else if(W.error){const{BootErrorPage:wt}=R;q=r.createElement(wt,{step:"load-config",error:W.error})}const{ThemeProvider:ut=Ie}=R;return q?{node:r.createElement(h.ApiProvider,{apis:h.ApiRegistry.from([[c.appThemeApiRef,P]])},r.createElement(ut,null,q))}:{api:h.ConfigReader.fromConfigs((Tt=W.value)!=null?Tt:[])}}class xt{constructor(R){this.app=R}getPlugins(){return this.app.getPlugins()}getSystemIcon(R){return this.app.getSystemIcon(R)}getComponents(){return this.app.getComponents()}}class se{constructor(R){_(this,"apiHolder");_(this,"configApi");_(this,"apis");_(this,"icons");_(this,"plugins");_(this,"components");_(this,"themes");_(this,"configLoader");_(this,"defaultApis");_(this,"bindRoutes");_(this,"appIdentityProxy",new ve);_(this,"apiFactoryRegistry");var P,B,W,q;this.apis=(P=R.apis)!=null?P:[],this.icons=R.icons,this.plugins=new Set((B=R.plugins)!=null?B:[]),this.components=R.components,this.themes=R.themes,this.configLoader=(W=R.configLoader)!=null?W:Le,this.defaultApis=(q=R.defaultApis)!=null?q:[],this.bindRoutes=R.bindRoutes,this.apiFactoryRegistry=new u.pv}getPlugins(){return Array.from(this.plugins)}getSystemIcon(R){return this.icons[R]}getComponents(){return this.components}getProvider(){const R=new xt(this);return({children:B})=>{const W=(0,r.useMemo)(()=>h.AppThemeSelector.createWithStorage(this.themes),[]),{routePaths:q,routeParents:ut,routeObjects:st,featureFlags:Tt}=(0,r.useMemo)(()=>{const Rt=d({root:B,discoverers:[m,E],collectors:{routePaths:T,routeParents:G,routeObjects:D,collectedPlugins:i,featureFlags:M}});return ce(Rt.routePaths,Rt.routeParents),Rt.collectedPlugins.forEach(Pt=>this.plugins.add(Pt)),this.verifyPlugins(this.plugins),this.getApiHolder(),Rt},[B]),wt=ze(this.configLoader,this.components,W),oe="api"in wt;if(oe){const{api:Rt}=wt;this.configApi=Rt}if((0,r.useEffect)(()=>{if(oe){const Rt=this.getApiHolder().get(c.featureFlagsApiRef);for(const Pt of this.plugins.values())if("getFeatureFlags"in Pt)for(const _t of Pt.getFeatureFlags())Rt.registerFlag({name:_t.name,pluginId:Pt.getId()});else for(const _t of Pt.output())switch(_t.type){case"feature-flag":{Rt.registerFlag({name:_t.name,pluginId:Pt.getId()});break}default:break}for(const Pt of Tt)Rt.registerFlag({name:Pt,pluginId:""})}},[oe,wt,Tt]),"node"in wt)return wt.node;const{ThemeProvider:Vt=Ie}=this.components;return r.createElement(h.ApiProvider,{apis:this.getApiHolder()},r.createElement(Me,{appContext:R},r.createElement(Vt,null,r.createElement(ae,{routePaths:q,routeParents:ut,routeObjects:st,routeBindings:fe(this.bindRoutes),basePath:Re(wt.api)},B))))}}getRouter(){const{Router:R,SignInPage:P}=this.components,B=({component:q,children:ut})=>{const[st,Tt]=(0,r.useState)();return st?(this.appIdentityProxy.setTarget(st),ut):r.createElement(q,{onSignInSuccess:Tt})};return({children:q})=>{const ut=(0,c.useApi)(c.configApiRef),st=`${Re(ut)}/*`;return P?r.createElement(R,null,r.createElement(le,{tree:q}),r.createElement(B,{component:P},r.createElement(e.Z5,null,r.createElement(e.AW,{path:st,element:r.createElement(r.Fragment,null,q)})))):(this.appIdentityProxy.setTarget(s.UserIdentity.createGuest()),r.createElement(R,null,r.createElement(le,{tree:q}),r.createElement(e.Z5,null,r.createElement(e.AW,{path:st,element:r.createElement(r.Fragment,null,q)}))))}}getApiHolder(){if(this.apiHolder){for(const R of this.plugins)for(const P of R.getApis())this.apiFactoryRegistry.get(P.api)||this.apiFactoryRegistry.register("default",P);return u.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:c.appThemeApiRef,deps:{},factory:()=>h.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:c.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:c.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:c.featureFlagsApiRef,deps:{},factory:()=>new h.LocalStorageFeatureFlags});for(const R of this.defaultApis)this.apiFactoryRegistry.register("default",R);for(const R of this.plugins)for(const P of R.getApis())if(!this.apiFactoryRegistry.register("default",P))throw new Error(`Plugin ${R.getId()} tried to register duplicate or forbidden API factory for ${P.api}`);for(const R of this.apis)if(!this.apiFactoryRegistry.register("app",R))throw new Error(`Duplicate or forbidden API factory for ${R.api} in app`);return u.MM.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new u.MM(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(R){const P=new Set;for(const B of R){const W=B.getId();if(P.has(W))throw new Error(`Duplicate plugin found '${W}'`);P.add(W)}}}function ie(F){return new se(F)}},44056:function(X,o,t){"use strict";t.d(o,{b:function(){return r.b}});var r=t(92166),e=t(73495),l=t.n(e);t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"GithubAuth")&&t.d(o,{GithubAuth:function(){return e.GithubAuth}}),t.o(e,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return e.GitlabAuth}}),t.o(e,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return e.GoogleAuth}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"OAuth2")&&t.d(o,{OAuth2:function(){return e.OAuth2}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}})},73495:function(){},49208:function(X,o,t){"use strict";t.d(o,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return e.b},FlatRoutes:function(){return l.w}});var r=t(56494);t.o(r,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return r.AtlassianAuth}}),t.o(r,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return r.Auth0Auth}}),t.o(r,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return r.BitbucketAuth}}),t.o(r,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return r.FlatRoutes}}),t.o(r,"GithubAuth")&&t.d(o,{GithubAuth:function(){return r.GithubAuth}}),t.o(r,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return r.GitlabAuth}}),t.o(r,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return r.GoogleAuth}}),t.o(r,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),t.o(r,"OAuth2")&&t.d(o,{OAuth2:function(){return r.OAuth2}}),t.o(r,"OktaAuth")&&t.d(o,{OktaAuth:function(){return r.OktaAuth}}),t.o(r,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return r.OneLoginAuth}}),t.o(r,"SamlAuth")&&t.d(o,{SamlAuth:function(){return r.SamlAuth}}),t.o(r,"createSpecializedApp")&&t.d(o,{createSpecializedApp:function(){return r.createSpecializedApp}});var e=t(44056);t.o(e,"AtlassianAuth")&&t.d(o,{AtlassianAuth:function(){return e.AtlassianAuth}}),t.o(e,"Auth0Auth")&&t.d(o,{Auth0Auth:function(){return e.Auth0Auth}}),t.o(e,"BitbucketAuth")&&t.d(o,{BitbucketAuth:function(){return e.BitbucketAuth}}),t.o(e,"FlatRoutes")&&t.d(o,{FlatRoutes:function(){return e.FlatRoutes}}),t.o(e,"GithubAuth")&&t.d(o,{GithubAuth:function(){return e.GithubAuth}}),t.o(e,"GitlabAuth")&&t.d(o,{GitlabAuth:function(){return e.GitlabAuth}}),t.o(e,"GoogleAuth")&&t.d(o,{GoogleAuth:function(){return e.GoogleAuth}}),t.o(e,"MicrosoftAuth")&&t.d(o,{MicrosoftAuth:function(){return e.MicrosoftAuth}}),t.o(e,"OAuth2")&&t.d(o,{OAuth2:function(){return e.OAuth2}}),t.o(e,"OktaAuth")&&t.d(o,{OktaAuth:function(){return e.OktaAuth}}),t.o(e,"OneLoginAuth")&&t.d(o,{OneLoginAuth:function(){return e.OneLoginAuth}}),t.o(e,"SamlAuth")&&t.d(o,{SamlAuth:function(){return e.SamlAuth}});var l=t(63938)},96176:function(X,o,t){"use strict";t.d(o,{y:function(){return l}});var r=t(17678);function e(h){return[...h].join(" ")}class l{constructor(c){_(this,"discoveryApi");_(this,"environment");_(this,"provider");_(this,"joinScopesFunc");_(this,"authRequester");_(this,"sessionTransform");const{discoveryApi:s,environment:u,provider:d,joinScopes:y=e,oauthRequestApi:m,sessionTransform:E=i=>i}=c;this.authRequester=m.createAuthRequester({provider:d,onAuthRequest:i=>this.showPopup(i)}),this.discoveryApi=s,this.environment=u,this.provider=d,this.joinScopesFunc=y,this.sessionTransform=E}async createSession(c){return c.instantPopup?this.showPopup(c.scopes):this.authRequester(c.scopes)}async refreshSession(){const c=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(u=>{throw new Error(`Auth refresh request failed, ${u}`)});if(!c.ok){const u=new Error(`Auth refresh request failed, ${c.statusText}`);throw u.status=c.status,u}const s=await c.json();if(s.error){const u=new Error(s.error.message);throw s.error.name&&(u.name=s.error.name),u}return await this.sessionTransform(s)}async removeSession(){const c=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(s=>{throw new Error(`Logout request failed, ${s}`)});if(!c.ok){const s=new Error(`Logout request failed, ${c.statusText}`);throw s.status=c.status,s}}async showPopup(c){const s=this.joinScopesFunc(c),u=await this.buildUrl("/start",{scope:s,origin:location.origin}),d=await(0,r.d)({url:u,name:`${this.provider.title} Login`,origin:new URL(u).origin,width:450,height:730});return await this.sessionTransform(d)}async buildUrl(c,s){const u=await this.discoveryApi.getBaseUrl("auth"),d=this.buildQueryString({...s,env:this.environment});return`${u}/${this.provider.id}${c}${d}`}buildQueryString(c){if(!c)return"";const s=Object.entries(c).map(([u,d])=>{if(typeof d=="string")return`${encodeURIComponent(u)}=${encodeURIComponent(d)}`;if(d)return encodeURIComponent(u)}).filter(Boolean).join("&");return s?`?${s}`:""}}},91405:function(X,o,t){"use strict";t.d(o,{l:function(){return l}});var r=t(98005),e=t(36964);class l{constructor(){_(this,"subject",new r.X(e.SessionState.SignedOut));_(this,"signedIn",!1)}setIsSignedIn(c){this.signedIn!==c&&(this.signedIn=c,this.subject.next(this.signedIn?e.SessionState.SignedIn:e.SessionState.SignedOut))}sessionState$(){return this.subject}}},54842:function(X,o,t){"use strict";t.d(o,{Hc:function(){return s},q2:function(){return h},k1:function(){return c}});function r(u,d){for(const y of d)if(!u.has(y))return!1;return!0}class e{constructor(d){this.options=d}sessionExistsAndHasScope(d,y){if(!d)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const m=this.options.sessionScopes(d);return r(m,y)}getExtendedScope(d,y){const m=new Set(this.options.defaultScopes);if(d&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(d);for(const i of E)m.add(i)}if(y)for(const E of y)m.add(E);return m}}var l=t(91405);class h{constructor(d){_(this,"connector");_(this,"helper");_(this,"sessionScopesFunc");_(this,"sessionShouldRefreshFunc");_(this,"stateTracker",new l.l);_(this,"refreshPromise");_(this,"currentSession");const{connector:y,defaultScopes:m=new Set,sessionScopes:E,sessionShouldRefresh:i}=d;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=i,this.helper=new e({sessionScopes:E,defaultScopes:m})}async getSession(d){if(this.helper.sessionExistsAndHasScope(this.currentSession,d.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const m=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),i=this.sessionScopesFunc(m);return r(i,E)&&(this.currentSession=m),m}catch(m){if(d.optional)return;throw m}}if(!this.currentSession&&!d.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(d)}catch{}if(!d.optional)return this.currentSession=await this.connector.createSession({...d,scopes:this.helper.getExtendedScope(this.currentSession,d.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 d=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),d}finally{delete this.refreshPromise}}}class c{constructor(d){_(this,"connector");_(this,"helper");_(this,"stateTracker",new l.l);_(this,"currentSession");const{connector:y,defaultScopes:m=new Set,sessionScopes:E}=d;this.connector=y,this.helper=new e({sessionScopes:E,defaultScopes:m})}setSession(d){this.currentSession=d,this.stateTracker.setIsSignedIn(Boolean(d))}async getSession(d){if(this.helper.sessionExistsAndHasScope(this.currentSession,d.scopes))return this.currentSession;if(!d.optional)return this.currentSession=await this.connector.createSession({...d,scopes:this.helper.getExtendedScope(this.currentSession,d.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}class s{constructor(d){_(this,"manager");_(this,"storageKey");_(this,"schema");_(this,"sessionShouldRefreshFunc");_(this,"helper");const{manager:y,storageKey:m,schema:E,sessionScopes:i,sessionShouldRefresh:S=()=>!1}=d;this.manager=y,this.storageKey=m,this.schema=E,this.sessionShouldRefreshFunc=S,this.helper=new e({sessionScopes:i,defaultScopes:new Set})}setSession(d){this.manager.setSession(d),this.saveSession(d)}async getSession(d){const{scopes:y}=d,m=this.loadSession();if(this.helper.sessionExistsAndHasScope(m,y)&&!this.sessionShouldRefreshFunc(m))return this.manager.setSession(m),m;const E=await this.manager.getSession(d);return this.saveSession(E),E}async removeSession(){localStorage.removeItem(this.storageKey),await this.manager.removeSession()}sessionState$(){return this.manager.sessionState$()}loadSession(){try{const d=localStorage.getItem(this.storageKey);if(d){const y=JSON.parse(d,(m,E)=>(E==null?void 0:E.__type)==="Set"?new Set(E.__value):E);try{return this.schema.parse(y)}catch(m){throw console.log(`Failed to load session from local storage because it did not conform to the expected schema, ${m}`),m}}return}catch{localStorage.removeItem(this.storageKey);return}}saveSession(d){if(d===void 0){localStorage.removeItem(this.storageKey);return}try{this.schema.parse(d)}catch(y){console.warn(`Failed to save session to local storage because it did not conform to the expected schema, ${y}`);return}localStorage.setItem(this.storageKey,JSON.stringify(d,(y,m)=>m instanceof Set?{__type:"Set",__value:Array.from(m)}:m))}}},17678:function(X,o,t){"use strict";t.d(o,{d:function(){return r}});function r(e){return new Promise((l,h)=>{const c=e.width||500,s=e.height||700,u=window.screen.width/2-c/2,d=window.screen.height/2-s/2,y=window.open(e.url,e.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${c},height=${s},top=${d},left=${u}`);let m="";if(!y||typeof y.closed=="undefined"||y.closed){const b=new Error("Failed to open auth popup.");b.name="PopupRejectedError",h(b);return}const E=b=>{if(b.source!==y||b.origin!==e.origin)return;const{data:T}=b;if(T.type==="config_info"){m=T.targetOrigin;return}if(T.type!=="authorization_response")return;const G=T;if("error"in G){const j=new Error(G.error.message);j.name=G.error.name,h(j)}else l(G.response);S()},i=setInterval(()=>{if(y.closed){const b=`Login failed, ${m&&m!==window.location.origin?`Incorrect app origin, expected ${m}`:"popup was closed"}`,T=new Error(b);T.name="PopupClosedError",h(T),S()}},100);function S(){window.removeEventListener("message",E),clearInterval(i)}window.addEventListener("message",E)})}},98005:function(X,o,t){"use strict";t.d(o,{J:function(){return l},X:function(){return h}});var r=t(82394),e=t.n(r);class l{constructor(){_(this,"isClosed",!1);_(this,"terminatingError");_(this,"observable",new(e())(s=>this.isClosed?(this.terminatingError?s.error(this.terminatingError):s.complete(),()=>{}):(this.subscribers.add(s),()=>{this.subscribers.delete(s)})));_(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(s){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(u=>u.next(s))}error(s){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(u=>u.error(s))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,u,d){const y=typeof s=="function"?{next:s,error:u,complete:d}:s;return this.observable.subscribe(y)}}class h{constructor(s){_(this,"isClosed");_(this,"currentValue");_(this,"terminatingError");_(this,"observable");_(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=s,this.terminatingError=void 0,this.observable=new(e())(u=>this.isClosed?(this.terminatingError?u.error(this.terminatingError):u.complete(),()=>{}):(u.next(this.currentValue),this.subscribers.add(u),()=>{this.subscribers.delete(u)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(s){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=s,this.subscribers.forEach(u=>u.next(s))}error(s){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=s,this.subscribers.forEach(u=>u.error(s))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(s=>s.complete())}subscribe(s,u,d){const y=typeof s=="function"?{next:s,error:u,complete:d}:s;return this.observable.subscribe(y)}}},88934:function(X,o,t){"use strict";t.d(o,{L:function(){return l}});var r=t(36964),e=t(2784);const l=h=>{const{children:c}=h,s=(0,r.useApi)(r.featureFlagsApiRef),u="with"in h?s.isActive(h.with):!s.isActive(h.without);return e.createElement(e.Fragment,null,u?c:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(X,o,t){"use strict";t.d(o,{w:function(){return h}});var r=t(2784),e=t(10289),l=t(36964);const h=s=>{const u=(0,l.useApp)(),{NotFoundErrorPage:d}=u.getComponents(),y=(0,l.useElementFilter)(s.children,m=>m.getElements().flatMap(E=>{var S;let i=E.props.path;return i===""?[]:(i=(S=i==null?void 0:i.replace(/\/\*$/,""))!=null?S:"/",[{path:i,element:E,children:E.props.children?[{path:i==="/"?"/":"/*",element:E.props.children}]:void 0}])}).sort((E,i)=>i.path.localeCompare(E.path)).map(E=>(E.path=E.path==="/"?"/":`${E.path}/*`,E)));return y.push({element:r.createElement(d,null),path:"/*"}),(0,e.V$)(y)};var c=t(88934)},41682:function(X,o,t){"use strict";t.d(o,{Button:function(){return j},CodeSnippet:function(){return jt},Content:function(){return Na},ContentHeader:function(){return fs},CreateButton:function(){return ae},DependencyGraph:function(){return Pt},DependencyGraphTypes:function(){return r},EmptyState:function(){return J},ErrorPage:function(){return ys},ErrorPanel:function(){return Ze},Header:function(){return Va},HeaderIconLinkRow:function(){return dr},HeaderLabel:function(){return Ls},HeaderTabs:function(){return Ua},InfoCard:function(){return $t},ItemCardGrid:function(){return Ms},ItemCardHeader:function(){return Fs},Link:function(){return T},LogViewer:function(){return Ir},MissingAnnotationEmptyState:function(){return ft},OverflowTooltip:function(){return pr},Page:function(){return Ka},PageWithHeader:function(){return $s},Progress:function(){return Nr},ResponseErrorPanel:function(){return Ve},RoutedTabs:function(){return $a},Select:function(){return $r},Sidebar:function(){return Hs},SidebarContext:function(){return vr},SidebarDivider:function(){return ks},SidebarItem:function(){return _a},SidebarPage:function(){return ws},SidebarPinStateContext:function(){return ha},SubvalueCell:function(){return Uo},SupportButton:function(){return Oo},Table:function(){return rs},UserIdentity:function(){return nr},WarningPanel:function(){return Pn},sidebarConfig:function(){return dn},useQueryParamState:function(){return Ro}});var r={};t.r(r),t.d(r,{Nm:function(){return qt},ht:function(){return ce},LJ:function(){return le}});var e=t(2784),l=t(36964),h=t(19928);function c(n){const[a,f]=useState([]),g=useApi(alertApiRef);if(useEffect(()=>{const x=g.alert$().subscribe(w=>f(Q=>Q.concat(w)));return()=>{x.unsubscribe()}},[g]),a.length===0)return null;const[p]=a,C=()=>{f(x=>x.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:C,"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 s=t(79692),u=t(12420);const d=(0,s.Z)(n=>(0,u.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function y(n){const{displayName:a,picture:f,customStyles:g}=n,p=d();return React.createElement(MaterialAvatar,{alt:a,src:f,className:p.avatar,style:{backgroundColor:stringToColor(a||f||""),...g}},a&&extractInitials(a))}var m=t(77277),E=t(86689),i=t(62833);const S=n=>/^([a-z+.-]+):/.test(n),b=n=>{var a;return n instanceof Array?n.map(b).join(" ").trim():typeof n=="object"&&n?b((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},T=e.forwardRef(({onClick:n,...a},f)=>{const g=(0,l.useAnalytics)(),p=String(a.to),C=b(a.children)||p,x=S(p),w=x&&!!/^https?:/.exec(p),Q=z=>{n==null||n(z),g.captureEvent("click",C,{attributes:{to:p}})};return x?e.createElement(E.Z,{ref:f,href:p,onClick:Q,...w?{target:"_blank",rel:"noopener"}:{},...a}):e.createElement(E.Z,{ref:f,component:i.rU,onClick:Q,...a})}),G=e.forwardRef((n,a)=>e.createElement(T,{ref:a,...n,color:"initial"})),j=e.forwardRef((n,a)=>e.createElement(m.Z,{ref:a,component:G,...n}));var D=t(60364),M=t(61837),I=t(80030),K=t(19353),V=t(95074);function ot(n){const{text:a,tooltipDelay:f=1e3,tooltipText:g="Text copied to clipboard"}=n,p=(0,l.useApi)(l.errorApiRef),[C,x]=(0,e.useState)(!1),[{error:w},Q]=(0,V.Z)();(0,e.useEffect)(()=>{w&&p.post(w)},[w,p]);const z=at=>{at.stopPropagation(),x(!0),Q(a)};return e.createElement(e.Fragment,null,e.createElement(I.ZP,{id:"copy-test-tooltip",title:g,placement:"top",leaveDelay:f,onClose:()=>x(!1),open:C},e.createElement(M.Z,{onClick:z},e.createElement(K.Z,null))))}var vt=t(96259),Zt=t(397),mt=t(74943);function jt(n){const{text:a,language:f,showLineNumbers:g=!1,highlightedNumbers:p,customStyle:C,showCopyCodeButton:x=!1}=n,w=(0,D.Z)(),Q=w.palette.type==="dark"?Zt.Z:mt.Z,z=w.palette.type==="dark"?"#256bf3":"#e6ffed";return e.createElement("div",{style:{position:"relative"}},e.createElement(vt.Z,{customStyle:C,language:f,style:Q,showLineNumbers:g,wrapLines:!0,lineNumberStyle:{color:w.palette.textVerySubtle},lineProps:at=>(p==null?void 0:p.includes(at))?{style:{backgroundColor:z}}:{}},a),x&&e.createElement("div",{style:{position:"absolute",top:0,right:0}},e.createElement(ot,{text:a})))}var Lt=t(41156),Kt=t(88188);function ae(n){const{title:a,to:f}=n,g=(0,Lt.Z)(p=>p.breakpoints.down("xs"));return f?g?e.createElement(M.Z,{component:i.rU,color:"primary",title:a,size:"small",to:f},e.createElement(Kt.Z,null)):e.createElement(m.Z,{component:i.rU,variant:"contained",color:"primary",to:f},a):null}var qt;(function(n){const a="TB";n.TOP_BOTTOM=a;const f="BT";n.BOTTOM_TOP=f;const g="LR";n.LEFT_RIGHT=g;const p="RL";n.RIGHT_LEFT=p})(qt||(qt={}));var me;(function(n){const a="UL";n.UP_LEFT=a;const f="UR";n.UP_RIGHT=f;const g="DL";n.DOWN_LEFT=g;const p="DR";n.DOWN_RIGHT=p})(me||(me={}));var le;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const f="tight-tree";n.TIGHT_TREE=f;const g="longest-path";n.LONGEST_PATH=g})(le||(le={}));var ce;(function(n){const a="l";n.LEFT=a;const f="r";n.RIGHT=f;const g="c";n.CENTER=g})(ce||(ce={}));var Ae=t(13387),Me=t(11105),ye=t(97963),ve=t(46506),he=t.n(ve),Ne=t(54073),Ue=t.n(Ne),Ie=t(10368);const Le=(0,s.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function fe({node:{id:n}}){const a=Le(),[f,g]=e.useState(0),[p,C]=e.useState(0),x=e.useRef(null);e.useLayoutEffect(()=>{if(x.current){let{height:at,width:it}=x.current.getBBox();at=Math.round(at),it=Math.round(it),(at!==p||it!==f)&&(g(it),C(at))}},[f,p]);const w=10,Q=f+w*2,z=p+w*2;return e.createElement("g",null,e.createElement("rect",{className:a.node,width:Q,height:z,rx:10}),e.createElement("text",{ref:x,className:a.text,y:z/2,x:Q/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Re="arrow-marker",ze="node",xt="edge",se="label",ie=(0,Ie.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),F=n=>e.createElement(fe,{...n});function R({render:n=F,setNode:a,node:f}){const{width:g,height:p,x:C=0,y:x=0}=f,w=f,Q=ie(),z=e.useRef(null);return e.useLayoutEffect(()=>{if(z.current){let{height:at,width:it}=z.current.getBBox();at=Math.round(at),it=Math.round(it),(at!==p||it!==g)&&a(f.id,{...f,height:at,width:it})}},[f,g,p,a]),e.createElement("g",{ref:z,"data-testid":ze,className:Q.node,transform:`translate(${C-g/2},${x-p/2})`},n({node:w}))}var P=t(55876),B=t(66481),W=t(19574),q=t.n(W);const ut=(0,Ie.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function st({edge:{label:n}}){const a=ut();return e.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Tt=(0,Ie.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),wt=n=>e.createElement(st,{...n}),oe=P.Z().x(n=>n.x).y(n=>n.y).curve(B.Z);function Vt({render:n=wt,setEdge:a,id:f,edge:g}){const{x:p=0,y:C=0,width:x,height:w,points:Q}=g,z=g,at=Tt(),it=e.useRef(null);e.useLayoutEffect(()=>{if(it.current){let{height:At,width:It}=it.current.getBBox();At=Math.round(At),It=Math.round(It),(At!==w||It!==x)&&a(f,{...g,height:At,width:It})}},[g,w,x,a,f]);let Et="";if(Q){const At=Q.filter(It=>q()(It.x)&&q()(It.y));Et=oe(At)||""}return e.createElement(e.Fragment,null,Et&&e.createElement("path",{"data-testid":xt,className:at.path,markerEnd:`url(#${Re})`,d:Et}),z.label?e.createElement("g",{ref:it,"data-testid":se,className:at.label,transform:`translate(${p},${C})`},n({edge:z})):null)}const Rt="workspace";function Pt(n){var ar,so;const{edges:a,nodes:f,renderNode:g,direction:p=qt.TOP_BOTTOM,align:C,nodeMargin:x=50,edgeMargin:w=10,rankMargin:Q=50,paddingX:z=0,paddingY:at=0,acyclicer:it,ranker:Et=le.NETWORK_SIMPLEX,labelPosition:At=ce.RIGHT,labelOffset:It=10,edgeRanks:ue=1,edgeWeight:en=1,renderLabel:qe,defs:He,zoom:Yt="enabled",...De}=n,Pe=(0,ye.Z)(),[_e,Kn]=e.useState(100),[fn,Kr]=e.useState(100),Fe=e.useRef(new(he()).graphlib.Graph),[Nn,Aa]=e.useState(((ar=Fe.current.graph())==null?void 0:ar.width)||0),[Jn,va]=e.useState(((so=Fe.current.graph())==null?void 0:so.height)||0),[Jr,Yr]=e.useState([]),[Ra,nn]=e.useState([]),mn=Math.max(Nn,_e),yn=Math.max(Jn,fn),Yn=e.useMemo(()=>Ue()(je=>{if(!je)return;const rn=Me.Z(je),We=Me.Z(je.getElementById(Rt));function Sn(){rn.call(Ae.sP().scaleExtent([1,10]).on("zoom",Fn=>{Fn.transform.x=Math.min(0,Math.max(Fn.transform.x,mn-mn*Fn.transform.k)),Fn.transform.y=Math.min(0,Math.max(Fn.transform.y,yn-yn*Fn.transform.k)),We.attr("transform",Fn.transform)}))}Yt==="enabled"?Sn():Yt==="enable-on-click"&&rn.on("click",()=>Sn());const{width:Cn,height:Qr}=je.getBoundingClientRect();_e!==Cn&&Kn(Cn),fn!==Qr&&Kr(Qr)},100),[fn,_e,mn,yn,Yt]),Ye=e.useCallback(()=>{const je=Fe.current.nodes(),rn=Fe.current.edges();je.forEach(We=>{f.some(Cn=>Cn.id===We)||Fe.current.removeNode(We)}),rn.forEach(We=>{a.some(Cn=>Cn.from===We.v&&Cn.to===We.w)||Fe.current.removeEdge(We.v,We.w)}),f.forEach(We=>{const Sn=Fe.current.nodes().find(Cn=>We.id===Cn);if(Sn&&Fe.current.node(Sn)){const{width:Cn,height:Qr,x:Fn,y:Ai}=Fe.current.node(Sn);Fe.current.setNode(Sn,{...We,width:Cn,height:Qr,x:Fn,y:Ai})}else Fe.current.setNode(We.id,{...We,width:0,height:0})}),a.forEach(We=>{Fe.current.setEdge(We.from,We.to,{...We,label:We.label,width:0,height:0,labelpos:At,labeloffset:It,weight:en,minlen:ue})})},[a,f,At,It,en,ue]),Qe=e.useMemo(()=>Ue()(()=>{he().layout(Fe.current);const{height:je,width:rn}=Fe.current.graph(),We=Math.max(0,je||0),Sn=Math.max(0,rn||0);Aa(Sn),va(We),Yr(Fe.current.nodes()),nn(Fe.current.edges())},250,{leading:!0}),[]);e.useEffect(()=>(Fe.current.setGraph({rankdir:p,align:C,nodesep:x,edgesep:w,ranksep:Q,marginx:z,marginy:at,acyclicer:it,ranker:Et}),Ye(),Qe(),Qe.cancel),[it,C,p,w,z,at,x,Q,Et,Ye,Qe]);function rr(je,rn){return Fe.current.setNode(je,rn),Qe(),Fe.current}function Qn(je,rn){return Fe.current.setEdge(je,rn),Qe(),Fe.current}return e.createElement("svg",{ref:Yn,...De,width:"100%",height:yn,viewBox:`0 0 ${mn} ${yn}`},e.createElement("defs",null,e.createElement("marker",{id:Re,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},e.createElement("path",{fill:Pe.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),He),e.createElement("g",{id:Rt},e.createElement("svg",{width:Nn,height:Jn,y:yn/2-Jn/2,x:mn/2-Nn/2,viewBox:`0 0 ${Nn} ${Jn}`},Ra.map(je=>{const rn=Fe.current.edge(je);return rn?e.createElement(Vt,{key:`${je.v}-${je.w}`,id:je,setEdge:Qn,render:qe,edge:rn}):null}),Jr.map(je=>{const rn=Fe.current.node(je);return rn?e.createElement(R,{key:je,setNode:rr,render:g,node:rn}):null}))))}var _t=t(72779),ht=t.n(_t);const St=(0,s.Z)(n=>{var a;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Wt=n=>{var At;const{variant:a,message:f,id:g,fixed:p=!1}=n,C=St(),w=useApi(storageApiRef).forBucket("notifications"),Q=(At=w.get("dismissedBanners"))!=null?At:[],[z,at]=useState(new Set(Q)),it=useObservable(w.observe$("dismissedBanners"));useEffect(()=>{var It;if(it==null?void 0:it.newValue){const ue=(It=it==null?void 0:it.newValue)!=null?It:[];at(new Set(ue))}},[it==null?void 0:it.newValue]);const Et=()=>{w.set("dismissedBanners",[...z,g])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!z.has(g),classes:{root:classNames(C.root,!p&&C.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(C.content,C[a]),message:C.message},message:f,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Et},React.createElement(Close,{className:C.icon}))]}))};var zt=t(60905),Dt=t(90436),re=t(86284),Ft=t(96465),Qt=t(19133),Xt=t(3871);const Y=(0,s.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),v=({missing:n})=>{const a=Y();switch(n){case"field":return e.createElement("img",{src:re,className:a.generalImg,alt:"annotation is missing"});case"info":return e.createElement("img",{src:Ft,alt:"no Information",className:a.generalImg});case"content":return e.createElement("img",{src:Qt,alt:"create Component",className:a.generalImg});case"data":return e.createElement("img",{src:Xt,alt:"no Build",className:a.generalImg});default:return null}},L=(0,s.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function J(n){const{title:a,description:f,missing:g,action:p}=n,C=L();return e.createElement(zt.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:C.root,spacing:2},e.createElement(zt.Z,{item:!0,xs:12,md:6},e.createElement(zt.Z,{container:!0,direction:"column"},e.createElement(zt.Z,{item:!0,xs:!0},e.createElement(Dt.Z,{variant:"h5"},a)),e.createElement(zt.Z,{item:!0,xs:!0},e.createElement(Dt.Z,{variant:"body1"},f)),e.createElement(zt.Z,{item:!0,xs:!0,className:C.action},p))),e.createElement(zt.Z,{item:!0,xs:12,md:6,className:C.imageContainer},e.createElement(v,{missing:g})))}const et=`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`,yt=(0,s.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function ft(n){const{annotation:a}=n,f=yt(),g=e.createElement(e.Fragment,null,"The ",e.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return e.createElement(J,{missing:"field",title:"Missing Annotation",description:g,action:e.createElement(e.Fragment,null,e.createElement(Dt.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),e.createElement("div",{className:f.code},e.createElement(jt,{text:et.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),e.createElement(m.Z,{color:"primary",component:T,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var Bt=t(11776),bt=t(38402),Ee=t(49378),Xe=t(41128),on=t(27616),lt=t(8284),Z=t(70660),tt=t(91750),gt=t(38016);const Ht=(n,a)=>(a.palette.type==="light"?Xe._j:Xe.$n)(a.palette[n].light,.6),te=(n,a)=>(a.palette.type==="light"?Xe.$n:Xe._j)(a.palette[n].light,.9),pe=(0,s.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Ht(a,n)}})),Be=({severity:n})=>{const a=pe({severity:n});return e.createElement(tt.Z,{classes:a})},an=({severity:n})=>{const a=pe({severity:n});return e.createElement(gt.Z,{classes:a})},hn=(0,s.Z)(n=>({panel:{backgroundColor:({severity:a})=>te(a,n),color:({severity:a})=>Ht(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Ht(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Ht(a,n),backgroundColor:({severity:a})=>te(a,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Xn=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function Pn(n){const{severity:a="warning",title:f,message:g,children:p,defaultExpanded:C}=n,x=hn({severity:a}),w=Xn(a)+(f?`: ${f}`:"");return e.createElement(on.Z,{defaultExpanded:C!=null?C:!1,className:x.panel,role:"alert"},e.createElement(lt.Z,{expandIcon:e.createElement(an,{severity:a}),className:x.summary},e.createElement(Be,{severity:a}),e.createElement(Dt.Z,{className:x.summaryText,variant:"subtitle1"},w)),(g||p)&&e.createElement(Z.Z,null,e.createElement(zt.Z,{container:!0},g&&e.createElement(zt.Z,{item:!0,xs:12},e.createElement(Dt.Z,{className:x.message,variant:"body1"},g)),p&&e.createElement(zt.Z,{item:!0,xs:12,className:x.details},p))))}const In=(0,s.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),ge=({error:n,message:a,stack:f,children:g})=>{const p=In();return e.createElement(Bt.Z,{dense:!0},e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),e.createElement(ot,{text:n})),e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),e.createElement(ot,{text:a})),f&&e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:f}),e.createElement(ot,{text:f})),g)};function Ze(n){const{title:a,error:f,defaultExpanded:g,children:p}=n;return e.createElement(Pn,{severity:"error",title:a!=null?a:f.message,defaultExpanded:g},e.createElement(ge,{error:f.name,message:f.message,stack:f.stack,children:p}))}var sn=t(85256);const On=(0,s.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Ve(n){var It;const{title:a,error:f,defaultExpanded:g}=n,p=On();if(f.name!=="ResponseError")return e.createElement(Ze,{title:a!=null?a:f.message,defaultExpanded:g,error:f});const{data:C,cause:x}=f,{request:w,response:Q}=C,z=`${Q.statusCode}: ${x.name}`,at=w&&`${w.method} ${w.url}`,it=x.message.replace(/\\n/g,`
12
- `),Et=(It=x.stack)==null?void 0:It.replace(/\\n/g,`
13
- `),At=JSON.stringify(C,void 0,2);return e.createElement(Ze,{title:a!=null?a:f.message,defaultExpanded:g,error:{name:z,message:it,stack:Et}},at&&e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Request",secondary:w?`${at}`:void 0}),e.createElement(ot,{text:at})),e.createElement(e.Fragment,null,e.createElement(sn.Z,{component:"li",className:p.divider}),e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Ee.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),e.createElement(jt,{language:"json",text:At,showCopyCodeButton:!0})))}var Un=t(9832);function or(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function $n(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function Rr(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),C=p||or(n);return p||$n(C),C.appendChild(a.current),function(){a.current.remove(),C.childNodes.length===-1&&C.remove()}},[n]);function f(){return a.current||(a.current=document.createElement("div")),a.current}return f()}var Zn=null;const wn="core.calloutSeen";function sr(){const[n,a]=useState(()=>{const g=localStorage.getItem(wn);return g?JSON.parse(g):{}}),f=useCallback((g,p)=>{const C=localStorage.getItem(wn),w={...C?JSON.parse(C):{},[g]:p};a(w),localStorage.setItem(wn,JSON.stringify(w))},[]);return{states:n,setState:f}}function ir(n){const{states:a,setState:f}=sr(),g=useCallback(()=>{f(n,!0)},[f,n]);return{seen:a[n]===!0,markSeen:g}}function lr(n){const{seen:a,markSeen:f}=ir(n);return{show:a===!1,hide:f}}const kn=(0,s.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 Sr(n){const{featureId:a,title:f,description:g,children:p}=n,{show:C,hide:x}=useShowCallout(a),w=usePortal("core.callout"),Q=useRef(null),[z,at]=useState(),it=kn(),Et=useCallback(()=>{if(Q.current){const At=Q.current.getBoundingClientRect(),It=Math.max(At.width,At.height),ue=800,en=At.x-(It-At.width)/2-ue,qe=At.y-(It-At.height)/2-ue,He=It+2*ue,Yt=450,De=At.x+At.width/2-Yt,Pe=At.y-(It-At.height)/2+It+20;at({dotLeft:en,dotTop:qe,dotSize:He,borderWidth:ue,textTop:Pe,textLeft:De,textWidth:Yt})}},[]);return useEffect(()=>(window.addEventListener("resize",Et),window.addEventListener("scroll",Et),()=>{window.removeEventListener("resize",Et),window.removeEventListener("scroll",Et)}),[Et]),useLayoutEffect(Et,[Q.current,Et]),C?React.createElement(React.Fragment,null,React.createElement("div",{className:it.featureWrapper,ref:Q},p),createPortal(React.createElement("div",{className:it.backdrop},React.createElement(ClickAwayListener,{onClickAway:x},React.createElement(React.Fragment,null,React.createElement("div",{className:it.dot,"data-testid":"dot",style:{left:z==null?void 0:z.dotLeft,top:z==null?void 0:z.dotTop,width:z==null?void 0:z.dotSize,height:z==null?void 0:z.dotSize,borderWidth:z==null?void 0:z.borderWidth},onClick:x,onKeyDown:x,role:"button",tabIndex:0},React.createElement("div",{className:it.pulseCircle})),React.createElement("div",{className:it.text,"data-testid":"text",style:{left:z==null?void 0:z.textLeft,top:z==null?void 0:z.textTop,width:z==null?void 0:z.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},f),React.createElement(Typography,null,g))))),w)):React.createElement(React.Fragment,null,p)}var cr=t(35292);const Wn=(0,s.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function Cr({color:n="primary",disabled:a=!1,href:f="#",icon:g=e.createElement(cr.Z,null),label:p,onClick:C,title:x}){const w=Wn();return a?e.createElement(E.Z,{title:x,className:ht()(w.link,w.disabled),underline:"none"},g,e.createElement("span",{className:w.label},p)):e.createElement(E.Z,{title:x,className:ht()(w.link,w[n]),to:f,component:T,onClick:C},g,e.createElement("span",{className:w.label},p))}const ur=(0,s.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function dr(n){const{links:a}=n,f=ur();return e.createElement("nav",{className:f.links},a.map((g,p)=>e.createElement(Cr,{key:p+1,...g})))}const fr=n=>{const a=n==="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
- `},qn=100,zn=10,mr=(0,s.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:qn,height:`calc(100% + ${zn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-zn,background:`linear-gradient(90deg, ${fr(n.palette.type)})`},fadeRight:{right:-zn,background:`linear-gradient(270deg, ${fr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function An(n){const[[a,f],g]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){g([0,0]);return}const C=()=>{const x=p.scrollLeft,w=p.scrollWidth-p.offsetWidth-p.scrollLeft;g([x,w])};return C(),p.addEventListener("scroll",C),window.addEventListener("resize",C),()=>{p.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[n]),[a,f]}function gn(n,a,f){const[g,p]=React.useState(0);return React.useLayoutEffect(()=>{if(g===0)return;const C=performance.now(),x=requestAnimationFrame(w=>{if(!n.current)return;const Q=w-C,z=Math.abs(g)*Q/a,it=Math.max(f,z)*Math.sign(g);n.current.scrollBy({left:it});const Et=g-it;Math.sign(g)!==Math.sign(Et)?p(0):p(Et)});return()=>cancelAnimationFrame(x)},[n,g,a,f]),p}function Tr(n){const{scrollStep:a=100,scrollSpeed:f=50,minScrollDistance:g=5,children:p,...C}=n,x=mr(n),w=React.useRef(),[Q,z]=An(w),at=gn(w,f,g),it=Et=>{!w.current||at(Et?a:-a)};return React.createElement("div",{...C,className:x.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:x.container,ref:w},p),React.createElement("div",{className:classNames(x.fade,x.fadeLeft,{[x.fadeHidden]:Q===0})}),React.createElement("div",{className:classNames(x.fade,x.fadeRight,{[x.fadeHidden]:z===0})}),Q>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>it(!1),className:classNames(x.button,x.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),z>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>it(!0),className:classNames(x.button,x.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Pr=(0,s.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function hr(n){const a=Pr(n),{shorthand:f,alpha:g}=n;return f?React.createElement("span",{className:a[g?"alpha":"beta"],style:{fontSize:"120%"}},g?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[g?"alpha":"beta"]},g?"Alpha":"Beta")}const tn=(0,e.lazy)(()=>Promise.all([t.e(1110),t.e(8718)]).then(t.bind(t,98718)).then(n=>({default:n.RealLogViewer})));function Ir(n){const{Progress:a}=(0,l.useApp)().getComponents();return e.createElement(e.Suspense,{fallback:e.createElement(a,null)},e.createElement(tn,{...n}))}const _n=(0,s.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Lr={code:({inline:n,className:a,children:f,...g})=>{const p=String(f).replace(/\n+$/,""),C=/language-(\w+)/.exec(a||"");return!n&&C?e.createElement(jt,{language:C[1],text:p}):e.createElement("code",{className:a,...g},f)}};function Or(n){const{content:a,dialect:f="gfm"}=n,g=_n();return React.createElement(ReactMarkdown,{remarkPlugins:f==="gfm"?[gfm]:[],className:g.markdown,children:a,components:Lr})}var xr=t(10179);const Dr=(0,s.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Xr=({request:n,busy:a,setBusy:f})=>{const g=Dr(),[p,C]=useState(),x=async()=>{f(!0);try{await n.trigger()}catch(Q){C(isError(Q)?Q.message:"An unspecified error occurred")}finally{f(!1)}},w=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:a,classes:{root:g.root}},React.createElement(ListItemAvatar,null,React.createElement(w,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:x},"Log in"))};var Fr=null;const Br=(0,s.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function kr(n){const a=Br(),[f,g]=useState(!1),p=useApi(oauthRequestApiRef),C=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),x=()=>{C.forEach(w=>w.reject())};return React.createElement(Dialog,{open:Boolean(C.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,C.map(w=>React.createElement(LoginRequestListItem,{key:w.provider.title,request:w,busy:f,setBusy:g})))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:x},"Reject All")))}var br=t(15277),Mr=t.n(br),Bn=t(90736);const gr=(0,s.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function pr(n){var x;const[a,f]=(0,e.useState)(!1),g=(0,Bn.default)(),p=gr(),C=w=>{g()&&f(w)};return e.createElement(I.ZP,{title:(x=n.title)!=null?x:n.text||"",placement:n.placement,disableHoverListener:!a},e.createElement(Mr(),{text:n.text,line:n.line,onToggled:C,containerClassName:p.container}))}var yr=t(67358);function Nr(n){const[a,f]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{const g=setTimeout(()=>f(!0),250);return()=>clearTimeout(g)},[]),a?e.createElement(yr.Z,{...n,"data-testid":"progress"}):e.createElement("div",{style:{display:"none"}})}var Ur=t(94339),Er=t(14503),U=t(24579),N=t(32552),$=t(15459),k=t(95544),ct=t(27597);const nt=(0,s.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function dt(n){const{link:a,title:f,onClick:g}=n,p=nt();return e.createElement("div",null,e.createElement(sn.Z,null),e.createElement(T,{to:a,onClick:g,underline:"none"},e.createElement(k.Z,{display:"flex",alignItems:"center",className:p.root},e.createElement(k.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},e.createElement(Dt.Z,null,e.createElement("strong",null,f))),e.createElement(ct.Z,{className:p.arrow}))))}const Nt=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return e.createElement(e.Fragment,null,"Please contact ",a," for help.");if(!a.href)return e.createElement(e.Fragment,null,"Please contact ",a.name," for help.")}else return null;return e.createElement(j,{to:a.href,variant:"contained"},a.name)},kt=class extends e.Component{constructor(a){super(a);this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,f){console.error(`ErrorBoundary, error: ${a}, info: ${f}`),this.setState({error:a,errorInfo:f})}render(){const{slackChannel:a,children:f}=this.props,{error:g}=this.state;return g?e.createElement(Ze,{title:"Something Went Wrong",error:g},e.createElement(Nt,{slackChannel:a})):f}},ne=(0,s.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{}}),{name:"BackstageInfoCard"}),Jt=(0,$.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Er.Z),Ot={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 $t(n){const{title:a,subheader:f,divider:g=!0,deepLink:p,slackChannel:C,errorBoundaryProps:x,variant:w,children:Q,headerStyle:z,headerProps:at,action:it,actionsClassName:Et,actions:At,cardClassName:It,actionsTopRight:ue,className:en,noPadding:qe,titleTypographyProps:He}=n,Yt=ne();let De={},Pe={};w&&w.split(/[\s]+/g).forEach(fn=>{De={...De,...Ot.card[fn]},Pe={...Pe,...Ot.cardContent[fn]}});const _e=x||(C?{slackChannel:C}:{});return e.createElement(Ur.Z,{style:De,className:en},e.createElement(kt,{..._e},a&&e.createElement(N.Z,{classes:{root:Yt.header,title:Yt.headerTitle,subheader:Yt.headerSubheader,avatar:Yt.headerAvatar,action:Yt.headerAction,content:Yt.headerContent},title:a,subheader:f,action:it,style:{...z},titleTypographyProps:He,...at}),ue&&e.createElement(Jt,null,ue),g&&e.createElement(sn.Z,null),e.createElement(U.Z,{className:ht()(It,{[Yt.noPadding]:qe}),style:Pe},Q),At&&e.createElement(Er.Z,{className:Et},At),p&&e.createElement(dt,{...p})))}var Se=t(94137);const Oe=(0,s.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),be={fractional:!0,inverse:!1,unit:"%",max:100},ke=({palette:n,value:a,inverse:f,max:g})=>{if(isNaN(a))return"#ddd";const p=g||be.max,C=f?p-a:a;return C<p/3?n.status.error:C<p*(2/3)?n.status.warning:n.status.ok};function Ke(n){const{getColor:a=ke}=n,f=Oe(n),{palette:g}=useTheme(),{value:p,fractional:C,inverse:x,unit:w,max:Q}={...be,...n},z=C?Math.round(p*Q):p,at=Q!==100?Math.round(p):z;return React.createElement("div",{className:f.root},React.createElement(Circle,{strokeLinecap:"butt",percent:z,strokeWidth:12,trailWidth:12,strokeColor:a({palette:g,value:at,inverse:x,max:Q}),className:f.circle}),React.createElement("div",{className:f.overlay},isNaN(p)?"N/A":`${at}${w}`))}const Je=(0,s.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function ln(n){const a=Je(n),{title:f,subheader:g,progress:p,inverse:C,deepLink:x,variant:w,getColor:Q}=n,z={inverse:C,getColor:Q,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:f,subheader:g,deepLink:x,variant:w},React.createElement(Gauge,{...z})))}function $e(n){const{value:a,getColor:f=getProgressColor}=n,{palette:g}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const C=f({palette:g,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:C})))}var pn=t(21324),Ln=t(7089),we=t(1292),Ge=t(42494),bn=t(74603),Hn=t(12231),qr=t(73698),_r=t(72379);const ta=(0,s.Z)(()=>(0,u.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ca=()=>{const n=ta();return e.createElement(_r.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const ea=(0,s.Z)(()=>(0,u.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var na=()=>{const n=ea();return e.createElement(_r.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const ra=(0,$.Z)(n=>(0,u.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(bn.Z),aa=(0,s.Z)(n=>(0,u.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function $r(n){const{multiple:a,items:f,label:g,placeholder:p,selected:C,onChange:x,triggerReset:w,native:Q=!1,disabled:z=!1}=n,at=aa(),[it,Et]=(0,e.useState)(C||(a?[]:"")),[At,It]=(0,e.useState)(!1);(0,e.useEffect)(()=>{Et(a?[]:"")},[w,a]),(0,e.useEffect)(()=>{C!==void 0&&Et(C)},[C]);const ue=Yt=>{Et(Yt.target.value),x(Yt.target.value)},en=Yt=>{if(z){Yt.preventDefault();return}It(De=>a&&!(Yt.target instanceof HTMLElement)?!0:!De)},qe=()=>{It(!1)},He=Yt=>()=>{const De=it.filter(Pe=>Pe!==Yt);Et(De),x(De)};return e.createElement("div",{className:at.root},e.createElement(Dt.Z,{variant:"button"},g),e.createElement(we.Z,{onClickAway:qe},e.createElement(Ge.Z,{className:at.formControl},e.createElement(qr.Z,{value:it,native:Q,disabled:z,"data-testid":"select",displayEmpty:!0,multiple:a,onChange:ue,onClick:en,open:At,input:e.createElement(ra,null),renderValue:Yt=>{var De;return a&&it.length!==0?e.createElement("div",{className:at.chips},Yt.map(Pe=>{var _e,Kn;return e.createElement(Ln.Z,{key:(_e=f.find(fn=>fn.value===Pe))==null?void 0:_e.value,label:(Kn=f.find(fn=>fn.value===Pe))==null?void 0:Kn.label,clickable:!0,onDelete:He(Pe),className:at.chip})})):e.createElement(Dt.Z,null,it.length===0?p||"":(De=f.find(Pe=>Pe.value===Yt))==null?void 0:De.label)},IconComponent:()=>At?e.createElement(na,null):e.createElement(Ca,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&e.createElement(Hn.Z,{value:[]},p),Q?f&&f.map(Yt=>e.createElement("option",{value:Yt.value,key:Yt.value},Yt.label)):f&&f.map(Yt=>e.createElement(Hn.Z,{key:Yt.value,value:Yt.value},a&&e.createElement(pn.Z,{color:"primary",checked:it.includes(Yt.value)||!1,className:at.checkbox}),Yt.label))))))}const tr=()=>{},oa=e.createContext({stepperLength:0,stepIndex:0,setStepIndex:tr,stepHistory:[],setStepHistory:tr,onStepChange:tr});function Pa(n){const{children:a,elevated:f,onStepChange:g,activeStep:p=0}=n,[C,x]=useState(p),[w,Q]=useState([0]);useEffect(()=>{x(p)},[p]);const z=[];let at;return Children.forEach(a,it=>{isValidElement(it)&&(it.props.end?at=it:z.push(it))}),React.createElement(React.Fragment,null,React.createElement(oa.Provider,{value:{stepIndex:C,setStepIndex:x,stepHistory:w,setStepHistory:Q,onStepChange:g,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:C,orientation:"vertical",elevation:f?2:0},z)),C>=Children.count(a)-1&&at)}const sa=(0,s.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Ia=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),ia=({text:n,handleClick:a,disabled:f,last:g,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:f,"data-testid":`nextButton-${p}`,onClick:a},n||(g?"Finish":"Next")),A=({text:n,handleClick:a,disabled:f,stepIndex:g})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${g}`,disabled:f},n||"Back"),O=({actions:n={},children:a})=>{const f=sa(),{stepperLength:g,stepIndex:p,setStepIndex:C,stepHistory:x,setStepHistory:w,onStepChange:Q}=useContext(VerticalStepperContext),z=(At,It)=>{It&&It(),Q&&Q(p,At),C(At)},at=()=>{const At=n.nextStep?n.nextStep(p,g-1):p+1;z(At,n.onNext),w([...x,At])},it=()=>{x.pop(),z(x[x.length-1],n.onBack),w([...x])},Et=()=>{z(0,n.onRestart),w([0])};return React.createElement("div",{className:f.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(A,{text:n.backText,handleClick:it,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(ia,{text:n.nextText,handleClick:at,disabled:!!g&&p>=g||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Ia,{text:n.restartText,handleClick:Et,stepIndex:p}),a)},H=(0,s.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function rt(n){const{title:a,children:f,end:g,actions:p,...C}=n,x=H();return g?React.createElement("div",{className:x.end},React.createElement(Typography,{variant:"h6"},a),f,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...C},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,f,React.createElement(SimpleStepperFooter,{actions:p})))}const pt=(0,s.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function Mt(n){const a=pt(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Ct(n){const a=pt(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Gt(n){const a=pt(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function Ut(n){const a=pt(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function de(n){const a=pt(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function xe(n){const a=pt(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Ce=t(74600),Te=t(15584);const cn=n=>(0,u.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),un={root:{border:"0",verticalAlign:"top"}},Mn=n=>(0,u.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),er=n=>(0,u.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),jn=(0,$.Z)(cn,{name:"BackstageMetadataTableTitleCell"})(Te.Z),Vn=(0,$.Z)(un,{name:"BackstageMetadataTableCell"})(Te.Z),la=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),La=({title:n,children:a,...f})=>React.createElement(TableRow,null,n&&React.createElement(jn,null,n),React.createElement(Vn,{colSpan:n?1:2,...f},a)),xn=(0,$.Z)(Mn,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>e.createElement("ul",{className:n.root},a)),Si=(0,$.Z)(er,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>e.createElement("li",{className:n.root},a)),Oa=(0,u.Z)({root:{margin:"0 0",listStyleType:"none"}}),lo=n=>(0,u.Z)({root:{...Oa.root,paddingLeft:n.spacing(1)}}),xa=(0,$.Z)(Oa,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>e.createElement(xn,{classes:n},a)),Da=(0,$.Z)(lo,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>e.createElement(xn,{classes:n},a));function co(n,a){const f=n.map((g,p)=>React.createElement(MetadataListItem,{key:p},ca(g)));return a?React.createElement(Da,null,f):React.createElement(xa,null,f)}function uo(n,a,f){const g=Object.keys(n).map(p=>{const C=ca(n[p],!0),x=f&&f.titleFormat?f.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${x}: `,C)});return a?React.createElement(Da,null,g):React.createElement(xa,null,g)}function ca(n,a,f){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?uo(n,a,f):Array.isArray(n)?co(n,f):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const fo=({value:n,options:a})=>React.createElement(Fragment,null,ca(n,a)),mo=({title:n,value:a,options:f})=>React.createElement(MetadataTableItem,{title:f&&f.titleFormat?f.titleFormat(n):startCase(n)},React.createElement(fo,{value:a,options:f}));function ho(n,a){return Object.keys(n).map(f=>React.createElement(mo,{key:f,title:f,value:n[f],options:a}))}function Ci(n){const{metadata:a,dense:f=!0,options:g}=n,p=ho(a,g||{});return React.createElement(MetadataTable,{dense:f},p)}var go=t(49429),po=t(86136),Fa=t(79784),Ar=t(76635),yo=t(19126),Zr=t.n(yo),Eo=t(48760);function Ao(n){return Zr().stringify(n,{strictNullHandling:!0})}function Ba(n){return Zr().parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function ba(n,a){return Ba(n)[a]}function vo(n,a,f){const g={...Ba(n),[a]:f};return Ao(g)}function Ro(n,a=250){const[f,g]=(0,i.lr)(),p=f.toString(),[C,x]=(0,e.useState)(ba(p,n));return(0,e.useEffect)(()=>{const w=ba(p,n);x(Q=>(0,Ar.isEqual)(w,Q)?Q:w)},[p,x,n]),(0,Eo.Z)(()=>{const w=vo(p,n,C);p!==w&&g(w,{replace:!0})},a,[g,C,p,n]),[C,x]}const So={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 Ma(){const a=(0,l.useApi)(l.configApiRef).getOptionalConfig("app.support");return a?{url:a.getString("url"),items:a.getConfigArray("items").flatMap(f=>{var g;return{title:f.getString("title"),icon:f.getOptionalString("icon"),links:((g=f.getOptionalConfigArray("links"))!=null?g:[]).flatMap(p=>({url:p.getString("url"),title:p.getString("title")}))}})}:So}var Co=t(80079);function vn(n,a){const g=(0,l.useApp)().getSystemIcon(n);return g?e.createElement(g,{...a}):e.createElement(Co.Z,{...a})}function Ti(n){return vn("brokenImage",n)}function Pi(n){return vn("catalog",n)}function Ii(n){return vn("chat",n)}function Li(n){return vn("dashboard",n)}function Oi(n){return vn("docs",n)}function xi(n){return vn("email",n)}function Di(n){return vn("github",n)}function Fi(n){return vn("group",n)}function wr(n){return vn("help",n)}function Bi(n){return vn("user",n)}function bi(n){return vn("warning",n)}const To=(0,s.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Po=({icon:n})=>{var g;const a=(0,l.useApp)(),f=n&&(g=a.getSystemIcon(n))!=null?g:wr;return e.createElement(f,null)},Io=({link:n})=>{var a;return e.createElement(T,{to:n.url},(a=n.title)!=null?a:n.url)},Lo=({item:n})=>{var a;return e.createElement(bt.Z,null,e.createElement(po.Z,null,e.createElement(Po,{icon:n.icon})),e.createElement(Ee.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((f,g,p)=>[...f,p>0&&e.createElement("br",{key:p}),e.createElement(Io,{link:g,key:g.url})],[])}))};function Oo(n){const{title:a,children:f}=n,{items:g}=Ma(),[p,C]=(0,e.useState)(!1),[x,w]=(0,e.useState)(null),Q=To(),z=(0,Lt.Z)(Et=>Et.breakpoints.down("sm")),at=Et=>{w(Et.currentTarget),C(!0)},it=()=>{C(!1)};return e.createElement(e.Fragment,null,e.createElement(k.Z,{display:"flex",ml:1},z?e.createElement(M.Z,{color:"primary",size:"small",onClick:at,"data-testid":"support-button"},e.createElement(wr,null)):e.createElement(m.Z,{"data-testid":"support-button",color:"primary",onClick:at,startIcon:e.createElement(wr,null)},"Support")),e.createElement(Fa.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:it},e.createElement(Bt.Z,{className:Q.popoverList},a&&e.createElement(bt.Z,{alignItems:"flex-start"},e.createElement(Dt.Z,{variant:"subtitle1"},a)),e.Children.map(f,(Et,At)=>e.createElement(bt.Z,{alignItems:"flex-start",key:`child-${At}`},Et)),g&&g.map((Et,At)=>e.createElement(Lo,{item:Et,key:`item-${At}`}))),e.createElement(go.Z,null,e.createElement(m.Z,{color:"primary",onClick:it},"Close"))))}var ua=t(18671),Dn=t(10289);const xo=(0,s.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Na(n){const{className:a,stretch:f,noPadding:g,children:p,...C}=n,x=xo();return e.createElement("article",{...C,className:ht()(x.root,a,{[x.stretch]:f,[x.noPadding]:g})},p)}var Do=t(6487),Fo=t(99152);const Bo=(0,s.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Ua(n){const{tabs:a,onChange:f,selectedIndex:g}=n,[p,C]=(0,e.useState)(g!=null?g:0),x=Bo(),w=(Q,z)=>{g===void 0&&C(z),f&&f(z)};return(0,e.useEffect)(()=>{g!==void 0&&C(g)},[g]),e.createElement("div",{className:x.tabsWrapper},e.createElement(Fo.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:w,value:p},a.map((Q,z)=>e.createElement(Do.Z,{...Q.tabProps,"data-testid":`header-tab-${z}`,label:Q.label,key:Q.id,value:z,className:x.defaultTab,classes:{selected:x.selected,root:x.tabRoot}}))))}function bo(n){var w,Q,z;const a=(0,Dn.UO)(),g=n.map(({path:at,children:it})=>({caseSensitive:!1,path:`${at}/*`,element:it})).sort((at,it)=>it.path.replace(/\/\*$/,"").localeCompare(at.path.replace(/\/\*$/,""))),p=(w=(0,Dn.V$)(g))!=null?w:n[0].children,[C]=(Q=(0,Dn.fp)(g,`/${a["*"]}`))!=null?Q:[],x=C?n.findIndex(at=>`${at.path}/*`===C.route.path):0;return{index:x===-1?0:x,element:p,route:(z=n[x])!=null?z:n[0]}}function $a(n){const{routes:a}=n,f=(0,Dn.s0)(),{index:g,route:p,element:C}=bo(a),x=(0,e.useMemo)(()=>a.map(Q=>({id:Q.path,label:Q.title,tabProps:Q.tabProps})),[a]),w=Q=>f(a[Q].path.replace(/\/\*$/,"").replace(/^\//,""));return e.createElement(e.Fragment,null,e.createElement(Ua,{tabs:x,selectedIndex:g,onChange:w}),e.createElement(Na,null,e.createElement(ua.q,{title:p.title}),C))}const da=()=>null;(0,l.attachComponentData)(da,"core.gatherMountPoints",!0);function Za(n){const a=e.createElement(da,{path:"",title:""},e.createElement("div",null)).type;return e.Children.toArray(n).flatMap(f=>{if(!(0,e.isValidElement)(f))return[];if(f.type===e.Fragment)return Za(f.props.children);if(f.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:g,title:p,children:C,tabProps:x}=f.props;return[{path:g,title:p,children:C,tabProps:x}]})}function Mo(n){const a=Za(n.children);return e.createElement($a,{routes:a})}Mo.Route=da;const No=(0,s.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Uo(n){const{value:a,subvalue:f}=n,g=No();return e.createElement(e.Fragment,null,e.createElement("div",{className:g.value},a),e.createElement("div",{className:g.subvalue},f))}var $o=t(21070),Zo=t(90324),wo=t(98281),Wo=t(48049),wa=t(51209),Wa=t(33375),zo=t(44233),Ho=t(27604),fa=t(36444),jo=t(37971),Vo=t(59709),Go=t(17373),Ko=t(3702),Jo=t(93111),Wr=t(67222);const Yo=(0,s.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),Qo=n=>{var Q;const a=Yo(),{onChangeFilters:f}=n,[g,p]=(0,e.useState)({...n.selectedFilters}),[C,x]=(0,e.useState)(!1),w=()=>{p({}),x(z=>!z)};return(0,e.useEffect)(()=>{f(g)},[g,f]),e.createElement("div",{className:a.root},e.createElement("div",{className:a.header},e.createElement("div",{className:a.value},"Filters"),e.createElement(m.Z,{color:"primary",onClick:w},"Clear all")),e.createElement("div",{className:a.filters},((Q=n.filters)==null?void 0:Q.length)&&n.filters.map(z=>e.createElement($r,{triggerReset:C,key:z.element.label,...z.element,selected:g[z.element.label],onChange:at=>p({...g,[z.element.label]:at})}))))},Xo={Add:(0,e.forwardRef)((n,a)=>e.createElement($o.Z,{...n,ref:a})),Check:(0,e.forwardRef)((n,a)=>e.createElement(wo.Z,{...n,ref:a})),Clear:(0,e.forwardRef)((n,a)=>e.createElement(Wa.Z,{...n,ref:a})),Delete:(0,e.forwardRef)((n,a)=>e.createElement(zo.Z,{...n,ref:a})),DetailPanel:(0,e.forwardRef)((n,a)=>e.createElement(wa.Z,{...n,ref:a})),Edit:(0,e.forwardRef)((n,a)=>e.createElement(Ho.Z,{...n,ref:a})),Export:(0,e.forwardRef)((n,a)=>e.createElement(Ko.Z,{...n,ref:a})),Filter:(0,e.forwardRef)((n,a)=>e.createElement(fa.Z,{...n,ref:a})),FirstPage:(0,e.forwardRef)((n,a)=>e.createElement(jo.Z,{...n,ref:a})),LastPage:(0,e.forwardRef)((n,a)=>e.createElement(Vo.Z,{...n,ref:a})),NextPage:(0,e.forwardRef)((n,a)=>e.createElement(wa.Z,{...n,ref:a})),PreviousPage:(0,e.forwardRef)((n,a)=>e.createElement(Wo.Z,{...n,ref:a})),ResetSearch:(0,e.forwardRef)((n,a)=>e.createElement(Wa.Z,{...n,ref:a})),Search:(0,e.forwardRef)((n,a)=>e.createElement(fa.Z,{...n,ref:a})),SortArrow:(0,e.forwardRef)((n,a)=>e.createElement(Zo.Z,{...n,ref:a})),ThirdStateCheck:(0,e.forwardRef)((n,a)=>e.createElement(Go.Z,{...n,ref:a})),ViewColumn:(0,e.forwardRef)((n,a)=>e.createElement(Jo.Z,{...n,ref:a}))};function za(n,a){const f=a.split(".");let g=n[f[0]];for(let p=1;p<f.length;++p){if(g===void 0)return g;const C=f[p];g=g[C]}return g}const ko=(0,$.Z)(n=>({header:{padding:n.spacing(1,2,1,2.5),borderTop:`1px solid ${n.palette.grey.A100}`,borderBottom:`1px solid ${n.palette.grey.A100}`,color:n.palette.textSubtle,fontWeight:n.typography.fontWeightBold,position:"static",wordBreak:"normal"}}),{name:"BackstageTableHeader"})(Wr.W$),Ha=(0,$.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Wr.UW),qo=(0,s.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),_o=(0,s.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ts(n,a){return n.map(f=>{const g={};let p=f.cellStyle||{};if(f.highlight)if(g.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const C=p;p=(x,w,Q)=>({...C(x,w,Q),fontWeight:a.typography.fontWeightBold})}return{...f,headerStyle:g,cellStyle:p}})}function es(n,a){return(0,Ar.transform)(n,(f,g,p)=>{(0,Ar.isEqual)(g,a[p])||(f[p]=g)})}const ja={search:"",filtersOpen:!1,filters:{}};function ns(n){const{toolbarRef:a,setSearch:f,hasFilters:g,selectedFiltersLength:p,toggleFilters:C}=n,x=qo(),w=(0,e.useCallback)(Q=>{n.onSearchChanged(Q),f(Q)},[n,f]);return g?e.createElement("div",{className:x.root},e.createElement("div",{className:x.root},e.createElement(M.Z,{onClick:C,"aria-label":"filter list"},e.createElement(fa.Z,null)),e.createElement(Dt.Z,{className:x.title},"Filters (",p,")")),e.createElement(Ha,{...n,ref:a,onSearchChanged:w})):e.createElement(Ha,{...n,ref:a,onSearchChanged:w})}function rs(n){const{data:a,columns:f,options:g,title:p,subtitle:C,filters:x,initialState:w,emptyContent:Q,onStateChange:z,...at}=n,it=_o(),Et=(0,D.Z)(),At={...ja,...w},[It,ue]=(0,e.useState)(At.filtersOpen),en=(0,e.useCallback)(()=>ue(nn=>!nn),[ue]),[qe,He]=(0,e.useState)(0),[Yt,De]=(0,e.useState)(a),[Pe,_e]=(0,e.useState)(At.filters),Kn=ts(f,Et),[fn,Kr]=(0,e.useState)(At.search);(0,e.useEffect)(()=>{if(z){const nn=es({search:fn,filtersOpen:It,filters:Pe},ja);z(nn)}},[fn,It,Pe,z]);const Fe={headerStyle:{textTransform:"uppercase"}},Nn=(0,e.useCallback)(nn=>{var mn;return(mn=f.find(yn=>yn.title===nn))==null?void 0:mn.field},[f]);(0,e.useEffect)(()=>{if(typeof a=="function")return;if(!Pe){De(a);return}const nn=Object.values(Pe);if(a&&nn.flat().length){const mn=a.filter(yn=>!!Object.entries(Pe).filter(([,Yn])=>!!Yn.length).every(([Yn,Ye])=>{const Qe=za(yn,Nn(Yn));return Array.isArray(Qe)&&Array.isArray(Ye)?Qe.some(rr=>Ye.includes(rr)):Array.isArray(Qe)?Qe.includes(Ye):Array.isArray(Ye)?Ye.includes(Qe):Qe===Ye}));De(mn)}else De(a);He(nn.flat().length)},[a,Pe,Nn]);const Aa=(nn,mn)=>{const yn=Ye=>{const Qe=new Set,rr=Qn=>{Qn!=null&&Qe.add(Qn)};return mn&&mn.forEach(Qn=>{const ar=za(Qn,Nn(Ye));Array.isArray(ar)?ar.forEach(rr):rr(ar)}),Qe},Yn=Ye=>({placeholder:"All results",label:Ye.column,multiple:Ye.type==="multiple-select",items:[...yn(Ye.column)].sort().map(Qe=>({label:Qe,value:Qe}))});return nn.map(Ye=>({type:Ye.type,element:Yn(Ye)}))},Jn=!!(x==null?void 0:x.length),va=(0,e.useCallback)(nn=>e.createElement(ns,{setSearch:Kr,hasFilters:Jn,selectedFiltersLength:qe,toggleFilters:en,...nn}),[en,Jn,qe,Kr]),Jr=typeof a!="function"&&a.length===0,Yr=f.length,Ra=(0,e.useCallback)(nn=>Q&&Jr?e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{colSpan:Yr},Q))):e.createElement(Wr.os,{...nn}),[Jr,Q,Yr]);return e.createElement("div",{className:it.root},It&&a&&typeof a!="function"&&(x==null?void 0:x.length)&&e.createElement(Qo,{filters:Aa(x,a),selectedFilters:Pe,onChangeFilters:_e}),e.createElement(Wr.ZP,{components:{Header:ko,Toolbar:va,Body:Ra},options:{...Fe,...g},columns:Kn,icons:Xo,title:e.createElement(e.Fragment,null,e.createElement(Dt.Z,{variant:"h5",component:"h3"},p),C&&e.createElement(Dt.Z,{color:"textSecondary",variant:"body1"},C)),data:typeof a=="function"?a:Yt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...at}))}const Mi=n=>{const{children:a,value:f,index:g,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:f!==g,"aria-labelledby":`scrollable-auto-tab-${g}`,...p},f===g&&React.createElement(Box,{p:3},a))},as=(0,s.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),Ni=n=>{const a=as(n),{ariaLabel:f,onClick:g}=n;return React.createElement(IconButton,{onClick:g,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":f},n.children)},os=(n,a)=>a?n?"20px":"0":"40px",ss=(0,s.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>os(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}})),Ui=n=>{const a=ss(n),{isFirstNav:f,isFirstIndex:g,...p}=n;return React.createElement(Tab,{className:a.root,disableRipple:!0,...p})},is=(0,s.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),$i=n=>{const a=is(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ls=(0,s.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Zi(n){const{tabs:a}=n,f=ls(),[g,p]=useState([0,0]),[C,x]=useState(0),[w,Q]=useState(0),[z,at]=useState([[]]),it=useRef(),{width:Et}=useWindowSize(),At=(He,Yt)=>{p([C,Yt])},It=()=>{x(C-1)},ue=()=>{x(C+1)},en=()=>C+1<z.length;useEffect(()=>{const He=20,Yt=C===0?1:2,De=it.current.offsetWidth-He-Yt*30,Pe=g[0]*w+g[1],_e=Math.floor(De/170);Q(_e),at(chunkArray(a,_e)),p([Math.floor(Pe/_e),Pe%_e])},[Et,a]);const qe=C===g[0]?g[1]:!1;return React.createElement("div",{className:f.root},React.createElement(AppBar,{ref:it,className:f.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:qe,onChange:At,selectionFollowsFocus:!0},C!==0&&React.createElement(StyledIcon,{onClick:It,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),z[C].map((He,Yt)=>React.createElement(StyledTab,{value:Yt,isFirstIndex:Yt===0,isFirstNav:C===0,key:Yt,icon:He.icon||void 0,label:He.label||void 0})),en()&&React.createElement(StyledIcon,{isNext:!0,onClick:ue,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),qe!==!1?z[C].map((He,Yt)=>React.createElement(TabPanel,{key:Yt,value:Yt,index:qe},He.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:g[1],index:g[1]},z[g[0]][g[1]].content))}var wi=t(44311);function cs(n,a){const f=n[n.length-1];if(!!f)return f>=.9?a.palette.status.ok:f>=.5?a.palette.status.warning:a.palette.status.error}function Wi(n){var f;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(f=n.color)!=null?f:cs(n.data,a)})):null}const us=n=>(0,s.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:n.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"}),ds=({title:n="Unknown page",className:a})=>e.createElement(Dt.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function fs(n){const{description:a,title:f,titleComponent:g=void 0,children:p,textAlign:C="left"}=n,x=us({textAlign:C})(),w=g||e.createElement(ds,{title:f,className:x.title});return e.createElement(e.Fragment,null,e.createElement(ua.q,{title:f}),e.createElement("div",{className:x.container},e.createElement("div",{className:x.leftItemsBox},w,a&&e.createElement(Dt.Z,{className:x.description,variant:"body2"},a)),e.createElement("div",{className:x.rightItemsBox},p)))}var ms=t(29788);const hs=(0,s.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),gs=()=>{const n=hs();return e.createElement("img",{src:ms,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ps=(0,s.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function ys(n){const{status:a,statusMessage:f,additionalInfo:g}=n,p=ps(),C=(0,Dn.s0)(),x=Ma();return e.createElement(zt.Z,{container:!0,spacing:0,className:p.container},e.createElement(gs,null),e.createElement(zt.Z,{item:!0,xs:12,sm:8,md:4},e.createElement(Dt.Z,{"data-testid":"error",variant:"body1",className:p.subtitle},"ERROR ",a,": ",f),e.createElement(Dt.Z,{variant:"body1",className:p.subtitle},g),e.createElement(Dt.Z,{variant:"h2",className:p.title},"Looks like someone dropped the mic!"),e.createElement(Dt.Z,{variant:"h6"},e.createElement(T,{to:"#","data-testid":"go-back-link",onClick:()=>C(-1)},"Go back"),"... or please ",e.createElement(T,{to:x.url},"contact support")," if you think this is a bug.")))}var Es=t(16173);const As=(0,$.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Dt.Z),ma=(0,$.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(k.Z);function vs(n){const{children:a,...f}=n,[g,p]=e.useState(null),C=e.Children.toArray(a),[x,w,...Q]=C,z=Q.length?Q.pop():C[C.length-1],at=C.length>3,it=It=>{p(It.currentTarget)},Et=()=>{p(null)},At=Boolean(g);return e.createElement(e.Fragment,null,e.createElement(Es.Z,{"aria-label":"breadcrumb",...f},C.length>1&&e.createElement(ma,{clone:!0},x),C.length>2&&e.createElement(ma,{clone:!0},w),at&&e.createElement(As,{onClick:it},"..."),e.createElement(k.Z,{style:{fontStyle:"italic"}},z)),e.createElement(Fa.ZP,{open:At,anchorEl:g,onClose:Et,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},e.createElement(Bt.Z,null,Q.map((It,ue)=>e.createElement(bt.Z,{key:ue,button:!0},e.createElement(ma,{clone:!0},It))))))}const Rs=(0,s.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover"},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-all",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.common.white,opacity:.8,display:"inline-block",marginTop:n.spacing(1)},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),Ss=({type:n,typeLink:a,classes:f,pageTitle:g})=>n?a?e.createElement(vs,{className:f.breadcrumb},e.createElement(T,{to:a},n),e.createElement(Dt.Z,null,g)):e.createElement(Dt.Z,{className:f.type},n):null,Cs=({pageTitle:n,classes:a,tooltip:f})=>{const g=e.createElement(Dt.Z,{className:a.title,variant:"h1"},n);return f?e.createElement(I.ZP,{title:f,placement:"top-start"},g):g},Ts=({classes:n,subtitle:a})=>a?typeof a!="string"?e.createElement(e.Fragment,null,a):e.createElement(Dt.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function Va(n){const{children:a,pageTitleOverride:f,style:g,subtitle:p,title:C,tooltip:x,type:w,typeLink:Q}=n,z=Rs(),it=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Et=f||C,At=C||f,It=`${Et} | %s | ${it}`,ue=`${Et} | ${it}`;return e.createElement(e.Fragment,null,e.createElement(ua.q,{titleTemplate:It,defaultTitle:ue}),e.createElement("header",{style:g,className:z.header},e.createElement(k.Z,{className:z.leftItemsBox},e.createElement(Ss,{classes:z,type:w,typeLink:Q,pageTitle:At}),e.createElement(Cs,{classes:z,pageTitle:At,tooltip:x}),e.createElement(Ts,{classes:z,subtitle:p})),e.createElement(zt.Z,{container:!0,className:z.rightItemsBox,spacing:4},a)))}const Ps=(0,s.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),Is=({value:n,className:a})=>e.createElement(Dt.Z,{className:a},n);function Ls(n){const{label:a,value:f,url:g}=n,p=Ps(),C=e.createElement(Is,{className:p.value,value:f||"<Unknown>"});return e.createElement(zt.Z,{item:!0},e.createElement("span",{className:p.root},e.createElement(Dt.Z,{className:p.label},a),g?e.createElement(T,{to:g},C):C))}const Os={hour:"2-digit",minute:"2-digit"};function Ga(n){const a=new Date,f=window.navigator.language,g=[];if(!n.has("homepage.clocks"))return g;const p=n.getConfigArray("homepage.clocks");for(const C of p)if(C.has("label")&&C.has("timezone")){let x=C.getString("label");const w={timeZone:C.getString("timezone"),...Os};try{new Date().toLocaleString(f,w)}catch{console.warn(`The timezone ${w.timeZone} is invalid. Defaulting to GMT`),w.timeZone="GMT",x="GMT"}const Q=a.toLocaleTimeString(f,w);g.push({time:Q,label:x})}return g}function zi(n){const a=useApi(configApiRef),f=[],[g,p]=React.useState(f);return React.useEffect(()=>{p(Ga(a));const C=setInterval(()=>{p(Ga(a))},1e3);return()=>{clearInterval(C)}},[a]),g.length!==0?React.createElement(React.Fragment,null,g.map(C=>React.createElement(HeaderLabel,{label:C.label,value:C.time,key:C.label}))):null}const xs=n=>(0,u.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),Ds=(0,s.Z)(xs,{name:"BackstageItemCardHeader"});function Fs(n){const{title:a,subtitle:f,children:g}=n,p=Ds(n);return e.createElement("div",{className:p.root},f&&e.createElement(Dt.Z,{variant:"subtitle2",component:"h3"},f),a&&e.createElement(Dt.Z,{variant:"h6",component:"h4"},a),g)}function Hi(n){const{description:a,tags:f,title:g,type:p,subtitle:C,label:x,onClick:w,href:Q}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:g,subtitle:C||p})),React.createElement(CardContent,null,(f==null?void 0:f.length)?React.createElement(Box,null,f.map((z,at)=>React.createElement(Chip,{size:"small",label:z,key:at}))):null,a),React.createElement(CardActions,null,!Q&&React.createElement(Button,{to:"#",onClick:w,color:"primary"},x),Q&&React.createElement(Button,{to:Q,color:"primary"},x)))}const Bs=n=>(0,u.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),bs=(0,s.Z)(Bs,{name:"BackstageItemCardGrid"});function Ms(n){const{children:a,...f}=n,g=bs(f);return e.createElement("div",{className:g.root,...f},a)}var Ns=t(41547);const Us=(0,s.Z)(()=>({root:{display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:"100vh",overflowY:"auto"}}),{name:"BackstagePage"});function Ka(n){const{themeId:a,children:f}=n,g=Us();return e.createElement(Ns.Z,{theme:p=>({...p,page:p.getPageTheme({themeId:a})})},e.createElement("div",{className:g.root},f))}function $s(n){const{themeId:a,children:f,...g}=n;return e.createElement(Ka,{themeId:a},e.createElement(Va,{...g}),f)}const Gn=72,zr=24,Hr=18,dn={drawerWidthClosed:Gn,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Gn,iconSize:Gn-zr*2,iconPadding:zr,selectedIndicatorWidth:3,userBadgePadding:Hr,userBadgeDiameter:Gn-Hr*2},Ja={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Gn,iconSize:Gn-zr*2,iconPadding:zr,selectedIndicatorWidth:3,userBadgePadding:Hr,userBadgeDiameter:Gn-Hr*2},ji="@backstage/core/sidebar-intro-dismissed",vr=(0,e.createContext)({isOpen:!1,setOpen:n=>{}}),Ya=(0,e.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var jr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(jr||(jr={}));const Qa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(jr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(jr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Zs=(0,s.Z)({root:{width:"100%",minHeight:"100%",transition:"padding-left 0.1s ease-out",paddingLeft:({isPinned:n})=>n?dn.drawerWidthOpen:dn.drawerWidthClosed}},{name:"BackstageSidebarPage"}),ha=(0,e.createContext)({isPinned:!0,toggleSidebarPinState:()=>{}});function ws(n){const[a,f]=(0,e.useState)(()=>Qa.getSidebarPinState());(0,e.useEffect)(()=>{Qa.setSidebarPinState(a)},[a]);const g=()=>f(!a),p=Zs({isPinned:a});return e.createElement(ha.Provider,{value:{isPinned:a,toggleSidebarPinState:g}},e.createElement("div",{className:p.root},n.children))}const Ws=(0,s.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Vi=()=>{const n=Ws();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var Gi=null;const zs=(0,s.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Ki=()=>{const n=zs();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var Ji=null;const Xa=(0,s.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,padding:0,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:dn.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},expandButton:{background:"none",border:"none",color:n.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},drawerOpen:{width:dn.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}}),{name:"BackstageSidebar"});var Rn;(function(n){const a=0;n[n.Closed=a]="Closed";const f=a+1;n[n.Idle=f]="Idle";const g=f+1;n[n.Open=g]="Open"})(Rn||(Rn={}));function Hs(n){const{disableExpandOnHover:a=!1,openDelayMs:f=dn.defaultOpenDelayMs,closeDelayMs:g=dn.defaultCloseDelayMs,children:p}=n,C=Xa(),x=(0,Lt.Z)(ue=>ue.breakpoints.down("md")),[w,Q]=(0,e.useState)(Rn.Closed),z=(0,e.useRef)(),{isPinned:at}=(0,e.useContext)(ha),it=()=>{at||(z.current&&(clearTimeout(z.current),z.current=void 0),w!==Rn.Open&&!x&&(z.current=window.setTimeout(()=>{z.current=void 0,Q(Rn.Open)},f),Q(Rn.Idle)))},Et=()=>{at||(z.current&&(clearTimeout(z.current),z.current=void 0),w===Rn.Idle?Q(Rn.Closed):w===Rn.Open&&(z.current=window.setTimeout(()=>{z.current=void 0,Q(Rn.Closed)},g)))},At=w===Rn.Open&&!x||at,It=ue=>{ue?it():Et()};return e.createElement("div",{className:C.root,"data-testid":"sidebar-root",onMouseEnter:a?()=>{}:it,onFocus:a?()=>{}:it,onMouseLeave:a?()=>{}:Et,onBlur:a?()=>{}:Et},e.createElement(vr.Provider,{value:{isOpen:At,setOpen:It}},e.createElement("div",{className:ht()(C.drawer,{[C.drawerOpen]:At})},p)))}const Yi=()=>{const n=Xa(),{isOpen:a,setOpen:f}=useContext(SidebarContext),{isPinned:g}=useContext(SidebarPinStateContext),p=useMediaQuery(x=>x.breakpoints.down("md")),C=()=>{f(!a)};return g||p?null:React.createElement("button",{onClick:C,className:n.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:n.arrows},a?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))};function js(n,a){const f=new URLSearchParams(a.search).toString(),g=Zr().parse(f),p=new URLSearchParams(n.search).toString(),C=Zr().parse(p);return(0,Ar.isEqual)(a.pathname,n.pathname)&&(0,Ar.isMatch)(C,g)}const Vs=(0,s.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.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:n.palette.navigation.color,display:"flex",justifyContent:"center",fontSize:"14px"}})),Qi=n=>{const{title:a,to:f,icon:g,dropdownItems:p}=n,C=Vs(),{setIsHoveredOn:x}=useContext(SidebarItemWithSubmenuContext),w=()=>{x(!1)},Q=useResolvedPath(f),z=useLocation();let at=isLocationMatch(z,Q);const[it,Et]=useState(!1),At=()=>{Et(!it)};return p!==void 0?(p.some(It=>{const ue=resolvePath(It.to);return at=isLocationMatch(z,ue),at}),React.createElement("div",{className:C.itemContainer},React.createElement("button",{onClick:At,className:classnames(C.item,at?C.selected:void 0)},React.createElement(g,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:C.label},a),it?React.createElement(ArrowDropUpIcon,{className:C.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:C.dropdownArrow})),p&&it&&React.createElement("div",{className:C.dropdown},p.map((It,ue)=>React.createElement(Link,{component:NavLink,to:It.to,underline:"none",className:C.dropdownItem,onClick:w,key:ue},React.createElement(Typography,{className:C.textContent},It.title)))))):React.createElement("div",{className:C.itemContainer},React.createElement(Link,{component:NavLink,to:f,underline:"none",className:classnames(C.item,at?C.selected:void 0),onClick:w},React.createElement(g,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:C.label},a)))},Gs=n=>(0,s.Z)(a=>{var f,g;return{root:{zIndex:1e3,position:"relative",overflow:"visible",width:a.spacing(7)+1},drawer:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:n.left,top:0,bottom:0,padding:0,background:(g=(f=a.palette.navigation.submenu)==null?void 0:f.background)!=null?g:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:Ja.drawerWidthClosed,borderRight:"1px solid #383838","& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}},drawerOpen:{width:Ja.drawerWidthOpen},title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20}}}),Ks=n=>{const{isOpen:a}=(0,e.useContext)(vr),f=a?dn.drawerWidthOpen:dn.drawerWidthClosed,g=Gs({left:f})(),{isHoveredOn:p}=(0,e.useContext)(Ya);return e.createElement("div",{className:ht()(g.drawer,{[g.drawerOpen]:p})},e.createElement(Dt.Z,{variant:"h5",className:g.title},n.title),n.children)};var Vr=t(76600),ka=t(26739),Js=t(98989);const ga=(0,s.Z)(n=>{var C,x,w,Q;const{selectedIndicatorWidth:a,drawerWidthClosed:f,drawerWidthOpen:g,iconContainerWidth:p}=dn;return{root:{color:n.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"auto",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:f,justifyContent:"center"},open:{width:g},highlightable:{"&:hover":{background:(x=(C=n.palette.navigation.navItem)==null?void 0:C.hoverBackground)!=null?x:"#404040"}},highlighted:{background:(Q=(w=n.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:-n.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:n.typography.fontSize},searchFieldHTMLInput:{padding:`${n.spacing(2)} 0 ${n.spacing(2)}`},searchContainer:{width:g-p},secondaryAction:{width:n.spacing(6),textAlign:"center",marginRight:n.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{position:"absolute",right:0},selected:{"&$root":{borderLeft:`solid ${a}px ${n.palette.navigation.indicator}`,color:n.palette.navigation.selectedColor},"&$closed":{width:f},"& $closedItemIcon":{paddingRight:a},"& $iconContainer":{marginLeft:-a}}}},{name:"BackstageSidebarItem"});function Ys(n,a){const f=[];let g=!1,p;return e.Children.forEach(n,C=>{!e.isValidElement(C)||(p=C.props.children)}),e.Children.forEach(p,C=>{!e.isValidElement(C)||(C.props.dropdownItems?C.props.dropdownItems.map(x=>f.push(x.to)):C.props.to&&f.push(C.props.to))}),g=f.some(C=>{const x=(0,Dn.i3)(C);return js(a,x)}),g}const Qs=({text:n,hasNotifications:a=!1,icon:f,children:g})=>{const p=ga(),[C,x]=(0,e.useState)(!1),w=(0,Dn.TH)(),Q=Ys(g,w),z=()=>{x(!0)},at=()=>{x(!1)},{isOpen:it}=(0,e.useContext)(vr),Et=e.createElement(ka.Z,{color:"secondary",variant:"dot",overlap:"circular",className:it?"":p.closedItemIcon,invisible:!a},e.createElement(f,{fontSize:"small"})),At=e.createElement(e.Fragment,null,e.createElement("div",{"data-testid":"login-button",className:p.iconContainer},Et),n&&e.createElement(Dt.Z,{variant:"subtitle2",className:p.label},n),e.createElement("div",{className:p.secondaryAction})),It=Et;return e.createElement(Ya.Provider,{value:{isHoveredOn:C,setIsHoveredOn:x}},e.createElement("div",{onMouseLeave:at,className:ht()(C&&p.highlighted)},e.createElement("div",{onMouseEnter:z,"data-testid":"item-with-submenu",className:ht()(p.root,it?p.open:p.closed,Q&&p.selected,p.highlightable,C&&p.highlighted)},it?At:It,!C&&e.createElement(Js.Z,{fontSize:"small",className:p.submenuArrow})),C&&g))};function qa(n){return n.to===void 0}const Xs=e.forwardRef(function({to:a,end:f,style:g,className:p,activeStyle:C,caseSensitive:x,activeClassName:w="active","aria-current":Q="page",...z},at){let{pathname:it}=(0,Dn.TH)(),{pathname:Et}=(0,Dn.WU)(a);x||(it=it.toLocaleLowerCase("en-US"),Et=Et.toLocaleLowerCase("en-US"));let At=it===Et;!At&&!f&&(At=it.startsWith(`${Et}/`));const It=At?Q:void 0;return e.createElement(i.rU,{...z,to:a,ref:at,"aria-current":It,style:{...g,...At?C:void 0},className:ht()([p,At?w:void 0])})}),_a=(0,e.forwardRef)((n,a)=>{const{icon:f,text:g,hasNotifications:p=!1,disableHighlight:C=!1,onClick:x,children:w,className:Q,...z}=n,at=ga(),{isOpen:it}=(0,e.useContext)(vr),Et=e.createElement(ka.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:ht()({[at.closedItemIcon]:!it})},e.createElement(f,{fontSize:"small"})),At=Et,It=e.createElement(e.Fragment,null,e.createElement("div",{"data-testid":"login-button",className:at.iconContainer},Et),g&&e.createElement(Dt.Z,{variant:"subtitle2",className:at.label},g),e.createElement("div",{className:at.secondaryAction},w)),ue=it?It:At,en={onClick:x,className:ht()(Q,at.root,it?at.open:at.closed,qa(n)&&at.buttonItem,{[at.highlightable]:!C})};let qe=!1,He;const Yt=e.createElement(Ks,null,e.createElement(e.Fragment,null)).type,De=(0,l.useElementFilter)(w,Pe=>Pe.getElements().filter(_e=>_e.type===Yt));if(De.length>1)throw new Error("Cannot render more than one SidebarSubmenu inside a SidebarItem");return De.length===1&&(qe=!0,He=De[0]),qe?e.createElement(Qs,{text:g,icon:f,hasNotifications:p},He):qa(n)?e.createElement("button",{"aria-label":g,...en,ref:a},ue):e.createElement(Xs,{...en,activeClassName:at.selected,to:n.to?n.to:"",ref:a,"aria-label":g||n.to,...z},ue)});function Xi(n){const[a,f]=useState(""),g=ga(),p=n.icon?n.icon:SearchIcon,C=()=>{n.onSearch(a),f("")},x=at=>{at.key==="Enter"&&(at.preventDefault(),C())},w=at=>{f(at.target.value)},Q=at=>{at.preventDefault(),at.stopPropagation()},z=at=>{C(),at.preventDefault()};return React.createElement("div",{className:g.searchRoot},React.createElement(_a,{icon:p,to:n.to,onClick:z,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:a,onClick:Q,onChange:w,onKeyDown:x,className:g.searchContainer,InputProps:{disableUnderline:!0,className:g.searchField},inputProps:{className:g.searchFieldHTMLInput}})))}const ki=(0,Vr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),qi=(0,Vr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),ks=(0,Vr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),_s=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),_i=(0,Vr.Z)("div")(({theme:n})=>{const a=_s(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),ti=(0,s.Z)(n=>({introCard:{color:"#b5b5b5",fontSize:12,width:dn.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:dn.iconPadding,paddingRight:dn.iconPadding},introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function ei(n){const a=ti(),{text:f,onClose:g}=n,p=()=>g();return React.createElement("div",{className:a.introCard},React.createElement(Typography,{variant:"subtitle2"},f),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 to=n=>{const{text:a,onDismiss:f}=n,[g,p]=useState(!1),C=()=>{p(!0)};return React.createElement(Collapse,{in:!g,onExited:f},React.createElement(ei,{text:a,onClose:C}))},ni=null,ri="And your recently viewed plugins will pop up here!";function tl(n){const{isOpen:a}=useContext(SidebarContext),f={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[g,p]=useLocalStorage(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:C,recentlyViewedItemsDismissed:x}=g!=null?g:{},w=()=>{p(z=>({...f,...z,starredItemsDismissed:!0}))},Q=()=>{p(z=>({...f,...z,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!C&&React.createElement(React.Fragment,null,React.createElement(to,{text:ni,onDismiss:w}),React.createElement(SidebarDivider,null)),!x&&React.createElement(to,{text:ri,onDismiss:Q})):null}const ai=(0,s.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),pa=({children:n})=>{const a=ai();return e.createElement(zt.Z,{component:"li",item:!0,classes:a},n)};class ya{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 oi(n){const[a,f,g]=n.split(".");return JSON.parse(atob(f))}class Ea{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new Ea(a)}async getIdToken(){var a,f;return(f=(a=this.result).getIdToken)==null?void 0:f.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:f,ent:g}=oi(a);return{type:"user",userEntityRef:f,ownershipEntityRefs:g!=null?g:[]}}async getCredentials(){var f,g;return{token:await((g=(f=this.result).getIdToken)==null?void 0:g.call(f))}}async signOut(){var a,f;return(f=(a=this.result).signOut)==null?void 0:f.call(a)}}class nr{constructor(a,f,g){_(this,"profilePromise");this.identity=a,this.authApi=f,this.profile=g}static createGuest(){return new ya}static fromLegacy(a){return Ea.fromResult(a)}static create(a){return new nr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,f=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!f)throw new TypeError(`Invalid user entity reference "${a}"`);return f[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:n,onSignInSuccess:a})=>{const{apiRef:f,title:g,message:p}=n,C=(0,l.useApi)(f),x=(0,l.useApi)(l.errorApiRef),w=async()=>{try{const Q=await C.getBackstageIdentity({instantPopup:!0});if(!Q)throw new Error(`The ${g} provider is not configured to support sign-in`);const z=await C.getProfile();a(nr.create({identity:Q.identity,profile:z,authApi:C}))}catch(Q){x.post(new xr.SP("Login failed",Q))}};return e.createElement(pa,null,e.createElement($t,{variant:"fullHeight",title:g,actions:e.createElement(m.Z,{color:"primary",variant:"outlined",onClick:w},"Sign In")},e.createElement(Dt.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const f=n.get(a),g=await f.getBackstageIdentity({optional:!0});if(!g)return;const p=await f.getProfile();return nr.create({identity:g.identity,profile:p,authApi:f})}},ii={Component:({onSignInSuccess:n})=>e.createElement(pa,null,e.createElement($t,{title:"Guest",variant:"fullHeight",actions:e.createElement(m.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ya)},"Enter")},e.createElement(Dt.Z,{variant:"body1"},"Enter as a Guest User.",e.createElement("br",null),"You will not have a verified identity,",e.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new ya};var li=t(94106),eo=t(86619),no=t(74828),ci=t(45455),ui=t.n(ci);const di=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,fi=(0,s.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),ro=n=>{const{ref:a,...f}=n;return{inputRef:a,...f}},mi={Component:({onSignInSuccess:n})=>{const a=fi(),{register:f,handleSubmit:g,formState:p}=(0,li.cI)({mode:"onChange"}),{errors:C}=p,x=({userId:w})=>{n(nr.fromLegacy({userId:w,profile:{email:`${w}@example.com`}}))};return e.createElement(pa,null,e.createElement($t,{title:"Custom User",variant:"fullHeight"},e.createElement(Dt.Z,{variant:"body1"},"Enter your own User ID and credentials.",e.createElement("br",null),"This selection will not be stored."),e.createElement("form",{className:a.form,onSubmit:g(x)},e.createElement(Ge.Z,null,e.createElement(eo.Z,{...ro(f("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(C.userId)}),C.userId&&e.createElement(no.Z,{error:!0},C.userId.message)),e.createElement(Ge.Z,null,e.createElement(eo.Z,{...ro(f("idToken",{required:!1,validate:w=>!w||di.test(w)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(C.idToken)}),C.idToken&&e.createElement(no.Z,{error:!0},C.idToken.message)),e.createElement(m.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p==null?void 0:p.isDirty)||!ui()(C)},"Continue"))))},loader:async()=>{}},Gr="@backstage/core:SignInPage:provider",ao={guest:ii,custom:mi,common:si};function oo(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function il(n){return n.reduce((f,g)=>{if(typeof g=="string")return oo(g,f),f[g]={components:ao[g],id:g},f;const{id:p}=g;return oo(p,f),f[p]={components:ao.common,id:p,config:g},f},{})}const ll=(n,a)=>{const f=useApi(errorApiRef),g=useApiHolder(),[p,C]=useState(!0),x=useCallback(Q=>{a(IdentityApiSignOutProxy.from({identityApi:Q,signOut:async()=>{var z;localStorage.removeItem(Gr),await((z=Q.signOut)==null?void 0:z.call(Q))}}))},[a]);useLayoutEffect(()=>{var it;if(!p)return;const Q=localStorage.getItem(Gr);if(Q===null){C(!1);return}const z=n[Q];if(!z){C(!1);return}let at=!1;return z.components.loader(g,(it=z.config)==null?void 0:it.apiRef).then(Et=>{at||(Et?x(Et):C(!1))}).catch(Et=>{at||(localStorage.removeItem(Gr),f.post(Et),C(!1))}),()=>{at=!0}},[p,f,a,g,n,x]);const w=useMemo(()=>Object.keys(n).map(Q=>{const z=n[Q],{Component:at}=z.components,it=Et=>{localStorage.setItem(Gr,z.id),x(Et)};return React.createElement(at,{key:z.id,config:z.config,onSignInSuccess:it})}),[n,x]);return[p,w]},hi=({onSignInSuccess:n,providers:a=[],title:f,align:g="left"})=>{const p=useApi(configApiRef),C=useStyles(),x=getSignInProviders(a),[w,Q]=useSignInProviders(x,n);return w?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,f&&React.createElement(ContentHeader,{title:f,textAlign:g}),React.createElement(Grid,{container:!0,justifyContent:g==="center"?g:"flex-start",spacing:2,component:"ul",classes:C},Q)))},gi=({provider:n,auto:a,onSignInSuccess:f})=>{const g=useStyles(),p=useApi(n.apiRef),C=useApi(configApiRef),[x,w]=useState(),[Q,z]=useState(!1),at=async({checkExisting:it,showPopup:Et})=>{try{let At;if(it&&(At=await p.getBackstageIdentity({optional:!0})),!At&&(Et||a)&&(z(!0),At=await p.getBackstageIdentity({instantPopup:!0}),!At))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!At){z(!0);return}const It=await p.getProfile();f(UserIdentity.create({identity:At.identity,authApi:p,profile:It}))}catch(At){w(At),z(!0)}};return useMount(()=>at({checkExisting:!0})),Q?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:C.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:g},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{at({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),x&&x.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},x.message)))))):React.createElement(Progress,null)};function cl(n){return"provider"in n?React.createElement(gi,{...n}):React.createElement(hi,{...n})}const pi=(0,s.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),yi=(0,$.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(N.Z);function ul(n){const{slackChannel:a,errorBoundaryProps:f,children:g,title:p,deepLink:C,value:x,onChange:w}=n,Q=pi(),[z,at]=useState(0),it=w||((It,ue)=>at(ue));let Et;x?React.Children.map(g,It=>{(It==null?void 0:It.props.value)===x&&(Et=It==null?void 0:It.props.children)}):React.Children.map(g,(It,ue)=>{ue===z&&(Et=It==null?void 0:It.props.children)});const At=f||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...At},p&&React.createElement(yi,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Q,value:x||z,onChange:it},g),React.createElement(Divider,null),React.createElement(CardContent,null,Et),C&&React.createElement(BottomLink,{...C})))}const Ei=(0,s.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function dl(n){const{children:a,...f}=n,g=Ei();return React.createElement(Tab,{disableRipple:!0,classes:g,...f})}},88609:function(X,o,t){"use strict";t.d(o,{Os:function(){return h},fC:function(){return c}});var r=t(76241),e=t(2784);const l=(0,r.CT)("analytics-context"),h=()=>{const u=(0,e.useContext)(l);if(u===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const d=u.atVersion(1);if(d===void 0)throw new Error("No context found for version 1.");return d},c=u=>{const{attributes:d,children:y}=u,E={...h(),...d},i=(0,r.EI)({1:E});return e.createElement(l.Provider,{value:i},y)};function s(u,d){const y=m=>React.createElement(c,{attributes:d},React.createElement(u,{...m}));return y.displayName=`WithAnalyticsContext(${u.displayName||u.name||"Component"})`,y}},28461:function(X,o,t){"use strict";t.d(o,{f:function(){return r.fC},z:function(){return s}});var r=t(88609),e=t(27399),l=t(2784);class h{constructor(d,y={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=d,this.context=y}setContext(d){this.context=d}captureEvent(d,y,{value:m,attributes:E}={}){try{this.analyticsApi.captureEvent({action:d,subject:y,value:m,attributes:E,context:this.context})}catch(i){console.warn("Error during analytics event capture. %o",i)}}}function c(){try{return(0,e.useApi)(e.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function s(){const u=(0,l.useRef)(null),d=(0,r.Os)(),y=c();function m(){return u.current===null&&(u.current=new h(y)),u.current}const E=m();return E.setContext(d),E}},39135:function(X,o,t){"use strict";t.d(o,{CL:function(){return K},sM:function(){return e},$v:function(){return T},v_:function(){return G},hg:function(){return j},uB:function(){return b},iW:function(){return u},bq:function(){return S},Ds:function(){return D},NW:function(){return M},VE:function(){return I},W0:function(){return V},gP:function(){return ot},F4:function(){return h},ux:function(){return s},Kp:function(){return l},$4:function(){return vt},p_:function(){return d},br:function(){return y},ZM:function(){return Zt},eC:function(){return m},D:function(){return c},gW:function(){return i},Yp:function(){return E},E6:function(){return mt}});var r=t(86833),e;(function(jt){const Lt="SignedIn";jt.SignedIn=Lt;const Kt="SignedOut";jt.SignedOut=Kt})(e||(e={}));const l=(0,r.T0)({id:"core.auth.google"}),h=(0,r.T0)({id:"core.auth.github"}),c=(0,r.T0)({id:"core.auth.okta"}),s=(0,r.T0)({id:"core.auth.gitlab"}),u=(0,r.T0)({id:"core.auth.auth0"}),d=(0,r.T0)({id:"core.auth.microsoft"}),y=(0,r.T0)({id:"core.auth.oauth2"}),m=(0,r.T0)({id:"core.auth.oidc"}),E=(0,r.T0)({id:"core.auth.saml"}),i=(0,r.T0)({id:"core.auth.onelogin"}),S=(0,r.T0)({id:"core.auth.bitbucket"}),b=(0,r.T0)({id:"core.auth.atlassian"}),T=(0,r.T0)({id:"core.alert"}),G=(0,r.T0)({id:"core.analytics"}),j=(0,r.T0)({id:"core.apptheme"}),D=(0,r.T0)({id:"core.config"}),M=(0,r.T0)({id:"core.discovery"}),I=(0,r.T0)({id:"core.error"});var K;(function(jt){const Lt=0;jt[jt.None=Lt]="None";const Kt=1;jt[jt.Active=Kt]="Active"})(K||(K={}));const V=(0,r.T0)({id:"core.featureflags"}),ot=(0,r.T0)({id:"core.fetch"}),vt=(0,r.T0)({id:"core.identity"}),Zt=(0,r.T0)({id:"core.oauthrequest"}),mt=(0,r.T0)({id:"core.storage"})},27399:function(X,o,t){"use strict";t.d(o,{createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.T0},useApi:function(){return r.h_},useApiHolder:function(){return r.I_},FeatureFlagState:function(){return e.CL},SessionState:function(){return e.sM},alertApiRef:function(){return e.$v},analyticsApiRef:function(){return e.v_},appThemeApiRef:function(){return e.hg},atlassianAuthApiRef:function(){return e.uB},auth0AuthApiRef:function(){return e.iW},bitbucketAuthApiRef:function(){return e.bq},configApiRef:function(){return e.Ds},discoveryApiRef:function(){return e.NW},errorApiRef:function(){return e.VE},featureFlagsApiRef:function(){return e.W0},fetchApiRef:function(){return e.gP},githubAuthApiRef:function(){return e.F4},gitlabAuthApiRef:function(){return e.ux},googleAuthApiRef:function(){return e.Kp},identityApiRef:function(){return e.$4},microsoftAuthApiRef:function(){return e.p_},oauth2ApiRef:function(){return e.br},oauthRequestApiRef:function(){return e.ZM},oidcAuthApiRef:function(){return e.eC},oktaAuthApiRef:function(){return e.D},oneloginAuthApiRef:function(){return e.gW},samlAuthApiRef:function(){return e.Yp},storageApiRef:function(){return e.E6}});var r=t(86833);t.o(r,"FeatureFlagState")&&t.d(o,{FeatureFlagState:function(){return r.FeatureFlagState}}),t.o(r,"SessionState")&&t.d(o,{SessionState:function(){return r.SessionState}}),t.o(r,"alertApiRef")&&t.d(o,{alertApiRef:function(){return r.alertApiRef}}),t.o(r,"analyticsApiRef")&&t.d(o,{analyticsApiRef:function(){return r.analyticsApiRef}}),t.o(r,"appThemeApiRef")&&t.d(o,{appThemeApiRef:function(){return r.appThemeApiRef}}),t.o(r,"atlassianAuthApiRef")&&t.d(o,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),t.o(r,"attachComponentData")&&t.d(o,{attachComponentData:function(){return r.attachComponentData}}),t.o(r,"auth0AuthApiRef")&&t.d(o,{auth0AuthApiRef:function(){return r.auth0AuthApiRef}}),t.o(r,"bitbucketAuthApiRef")&&t.d(o,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),t.o(r,"configApiRef")&&t.d(o,{configApiRef:function(){return r.configApiRef}}),t.o(r,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return r.createComponentExtension}}),t.o(r,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),t.o(r,"createPlugin")&&t.d(o,{createPlugin:function(){return r.createPlugin}}),t.o(r,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return r.createRoutableExtension}}),t.o(r,"createRouteRef")&&t.d(o,{createRouteRef:function(){return r.createRouteRef}}),t.o(r,"discoveryApiRef")&&t.d(o,{discoveryApiRef:function(){return r.discoveryApiRef}}),t.o(r,"errorApiRef")&&t.d(o,{errorApiRef:function(){return r.errorApiRef}}),t.o(r,"featureFlagsApiRef")&&t.d(o,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),t.o(r,"fetchApiRef")&&t.d(o,{fetchApiRef:function(){return r.fetchApiRef}}),t.o(r,"getComponentData")&&t.d(o,{getComponentData:function(){return r.getComponentData}}),t.o(r,"githubAuthApiRef")&&t.d(o,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),t.o(r,"gitlabAuthApiRef")&&t.d(o,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),t.o(r,"googleAuthApiRef")&&t.d(o,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),t.o(r,"identityApiRef")&&t.d(o,{identityApiRef:function(){return r.identityApiRef}}),t.o(r,"microsoftAuthApiRef")&&t.d(o,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),t.o(r,"oauth2ApiRef")&&t.d(o,{oauth2ApiRef:function(){return r.oauth2ApiRef}}),t.o(r,"oauthRequestApiRef")&&t.d(o,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),t.o(r,"oidcAuthApiRef")&&t.d(o,{oidcAuthApiRef:function(){return r.oidcAuthApiRef}}),t.o(r,"oktaAuthApiRef")&&t.d(o,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),t.o(r,"oneloginAuthApiRef")&&t.d(o,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),t.o(r,"samlAuthApiRef")&&t.d(o,{samlAuthApiRef:function(){return r.samlAuthApiRef}}),t.o(r,"storageApiRef")&&t.d(o,{storageApiRef:function(){return r.storageApiRef}}),t.o(r,"useApp")&&t.d(o,{useApp:function(){return r.useApp}}),t.o(r,"useElementFilter")&&t.d(o,{useElementFilter:function(){return r.useElementFilter}}),t.o(r,"useRouteRef")&&t.d(o,{useRouteRef:function(){return r.useRouteRef}}),t.o(r,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return r.useRouteRefParams}});var e=t(39135)},90515:function(X,o,t){"use strict";t.d(o,{T:function(){return e}});class r{constructor(h){if(this.config=h,!h.id.split(".").flatMap(s=>s.split("-")).every(s=>s.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${h.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 e(l){return new r(l)}},25182:function(X,o,t){"use strict";t.d(o,{n:function(){return r}});function r(e,l){return"id"in e?{api:e,deps:{},factory:()=>l}:e}},86833:function(X,o,t){"use strict";t.d(o,{h_:function(){return r.h_},I_:function(){return r.I_},T0:function(){return e.T},createApiFactory:function(){return c.n}});var r=t(5761),e=t(90515),l=t(16362),h=t.n(l);t.o(l,"FeatureFlagState")&&t.d(o,{FeatureFlagState:function(){return l.FeatureFlagState}}),t.o(l,"SessionState")&&t.d(o,{SessionState:function(){return l.SessionState}}),t.o(l,"alertApiRef")&&t.d(o,{alertApiRef:function(){return l.alertApiRef}}),t.o(l,"analyticsApiRef")&&t.d(o,{analyticsApiRef:function(){return l.analyticsApiRef}}),t.o(l,"appThemeApiRef")&&t.d(o,{appThemeApiRef:function(){return l.appThemeApiRef}}),t.o(l,"atlassianAuthApiRef")&&t.d(o,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),t.o(l,"attachComponentData")&&t.d(o,{attachComponentData:function(){return l.attachComponentData}}),t.o(l,"auth0AuthApiRef")&&t.d(o,{auth0AuthApiRef:function(){return l.auth0AuthApiRef}}),t.o(l,"bitbucketAuthApiRef")&&t.d(o,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),t.o(l,"configApiRef")&&t.d(o,{configApiRef:function(){return l.configApiRef}}),t.o(l,"createApiFactory")&&t.d(o,{createApiFactory:function(){return l.createApiFactory}}),t.o(l,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),t.o(l,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),t.o(l,"createPlugin")&&t.d(o,{createPlugin:function(){return l.createPlugin}}),t.o(l,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),t.o(l,"createRouteRef")&&t.d(o,{createRouteRef:function(){return l.createRouteRef}}),t.o(l,"discoveryApiRef")&&t.d(o,{discoveryApiRef:function(){return l.discoveryApiRef}}),t.o(l,"errorApiRef")&&t.d(o,{errorApiRef:function(){return l.errorApiRef}}),t.o(l,"featureFlagsApiRef")&&t.d(o,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),t.o(l,"fetchApiRef")&&t.d(o,{fetchApiRef:function(){return l.fetchApiRef}}),t.o(l,"getComponentData")&&t.d(o,{getComponentData:function(){return l.getComponentData}}),t.o(l,"githubAuthApiRef")&&t.d(o,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),t.o(l,"gitlabAuthApiRef")&&t.d(o,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),t.o(l,"googleAuthApiRef")&&t.d(o,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),t.o(l,"identityApiRef")&&t.d(o,{identityApiRef:function(){return l.identityApiRef}}),t.o(l,"microsoftAuthApiRef")&&t.d(o,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),t.o(l,"oauth2ApiRef")&&t.d(o,{oauth2ApiRef:function(){return l.oauth2ApiRef}}),t.o(l,"oauthRequestApiRef")&&t.d(o,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),t.o(l,"oidcAuthApiRef")&&t.d(o,{oidcAuthApiRef:function(){return l.oidcAuthApiRef}}),t.o(l,"oktaAuthApiRef")&&t.d(o,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),t.o(l,"oneloginAuthApiRef")&&t.d(o,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),t.o(l,"samlAuthApiRef")&&t.d(o,{samlAuthApiRef:function(){return l.samlAuthApiRef}}),t.o(l,"storageApiRef")&&t.d(o,{storageApiRef:function(){return l.storageApiRef}}),t.o(l,"useApp")&&t.d(o,{useApp:function(){return l.useApp}}),t.o(l,"useElementFilter")&&t.d(o,{useElementFilter:function(){return l.useElementFilter}}),t.o(l,"useRouteRef")&&t.d(o,{useRouteRef:function(){return l.useRouteRef}}),t.o(l,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var c=t(25182)},16362:function(){},5761:function(X,o,t){"use strict";t.d(o,{I_:function(){return l},h_:function(){return h}});var r=t(2784),e=t(76241);function l(){const s=(0,e.Vt)("api-context");if(!s)throw new Error("API context is not available");const u=s.atVersion(1);if(!u)throw new Error("ApiContext v1 not available");return u}function h(s){const d=l().get(s);if(!d)throw new Error(`No implementation available for ${s}`);return d}function c(s){return function(d){const y=E=>{const i=l(),S={};for(const b in s)if(s.hasOwnProperty(b)){const T=s[b],G=i.get(T);if(!G)throw new Error(`No implementation available for ${T}`);S[b]=G}return React.createElement(d,{...E,...S})},m=d.displayName||d.name||"Component";return y.displayName=`withApis(${m})`,y}}},31311:function(X,o,t){"use strict";t.d(o,{q:function(){return r.q}});var r=t(32483),e=t(67229),l=t.n(e);t.o(e,"attachComponentData")&&t.d(o,{attachComponentData:function(){return e.attachComponentData}}),t.o(e,"createApiFactory")&&t.d(o,{createApiFactory:function(){return e.createApiFactory}}),t.o(e,"createApiRef")&&t.d(o,{createApiRef:function(){return e.createApiRef}}),t.o(e,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return e.createComponentExtension}}),t.o(e,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return e.createExternalRouteRef}}),t.o(e,"createPlugin")&&t.d(o,{createPlugin:function(){return e.createPlugin}}),t.o(e,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return e.createRoutableExtension}}),t.o(e,"createRouteRef")&&t.d(o,{createRouteRef:function(){return e.createRouteRef}}),t.o(e,"getComponentData")&&t.d(o,{getComponentData:function(){return e.getComponentData}}),t.o(e,"useApi")&&t.d(o,{useApi:function(){return e.useApi}}),t.o(e,"useApiHolder")&&t.d(o,{useApiHolder:function(){return e.useApiHolder}}),t.o(e,"useElementFilter")&&t.d(o,{useElementFilter:function(){return e.useElementFilter}}),t.o(e,"useRouteRef")&&t.d(o,{useRouteRef:function(){return e.useRouteRef}}),t.o(e,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return e.useRouteRefParams}})},67229:function(){},32483:function(X,o,t){"use strict";t.d(o,{q:function(){return e}});var r=t(76241);const e=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const h=l.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},74181:function(X,o,t){"use strict";t.d(o,{R5:function(){return h},CO:function(){return i},P4:function(){return E},IY:function(){return c},vJ:function(){return j}});var r=t(76241);const e=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function h(D,M,I){var ot;const K=D;let V=(ot=K[l])!=null?ot:e.get(D);if(V||(V={map:new Map},Object.defineProperty(K,l,{enumerable:!1,configurable:!0,writable:!1,value:V}),e.set(D,V)),V.map.has(M)){const vt=D.displayName||D.name;throw new Error(`Attempted to attach duplicate data "${M}" to component "${vt}"`)}V.map.set(M,I)}function c(D,M){var V;if(!D)return;const I=D.type;if(!I)return;const K=(V=I[l])!=null?V:e.get(I);if(!!K)return K.map.get(M)}var s=t(2784),u=t(88609),d=t(31311),y=t(82772);class m extends s.Component{constructor(){super(...arguments);_(this,"state",{error:void 0});_(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:I,plugin:K}=this.props,{ErrorBoundaryFallback:V}=I.getComponents();return M?s.createElement(V,{error:M,resetError:this.handleErrorReset,plugin:K}):this.props.children}}function E(D){const{component:M,mountPoint:I,name:K}=D;return S({component:{lazy:()=>M().then(V=>{const ot=Zt=>{try{(0,y.tg)(I)}catch(mt){if(typeof mt=="object"&&mt!==null){const{message:jt}=mt;if(typeof jt=="string"&&jt.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${I} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw mt}return s.createElement(V,{...Zt})},vt=K||V.displayName||V.name||"LazyComponent";return ot.displayName=`RoutableExtension(${vt})`,ot},V=>vt=>{const Zt=(0,d.q)(),{BootErrorPage:mt}=Zt.getComponents();return s.createElement(mt,{step:"load-chunk",error:V})})},data:{"core.mountPoint":I},name:K})}function i(D){const{component:M,name:I}=D;return S({component:M,name:I})}function S(D){const{data:M={},name:I}=D;I||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let K;if("lazy"in D.component){const ot=D.component.lazy;K=(0,s.lazy)(()=>ot().then(vt=>({default:vt})))}else K=D.component.sync;const V=I||K.displayName||K.name||"Component";return{expose(ot){const vt=Zt=>{const mt=(0,d.q)(),{Progress:jt}=mt.getComponents(),Lt=M==null?void 0:M["core.mountPoint"];return s.createElement(s.Suspense,{fallback:s.createElement(jt,null)},s.createElement(m,{app:mt,plugin:ot},s.createElement(u.fC,{attributes:{pluginId:ot.getId(),...I&&{extension:I},...Lt&&{routeRef:Lt.id}}},s.createElement(K,{...Zt}))))};h(vt,"core.plugin",ot);for(const[Zt,mt]of Object.entries(M))h(vt,Zt,mt);return vt.displayName=`Extension(${V})`,vt}}}var b=t(27399);function T(D,M,I,K){return s.Children.toArray(D).flatMap(V=>{if(!(0,s.isValidElement)(V))return[];if(V.type===s.Fragment)return T(V.props.children,M,I,K);if(c(V,"core.featureFlagged")){const ot=V.props;return("with"in ot?M.isActive(ot.with):!M.isActive(ot.without))?T(V.props.children,M,I,K):[]}if(I===void 0||I(V))return[V];if(K)throw new Error(K);return T(V.props.children,M,I,K)})}class G{constructor(M,I){this.node=M,this.featureFlagsApi=I}selectByComponentData(M){const I=T(this.node,this.featureFlagsApi,K=>c(K,M.key)!==void 0,M.withStrictError);return new G(I,this.featureFlagsApi)}findComponentData(M){return T(this.node,this.featureFlagsApi,K=>c(K,M.key)!==void 0).map(K=>c(K,M.key)).filter(K=>K!==void 0)}getElements(){return T(this.node,this.featureFlagsApi)}}function j(D,M,I=[]){const K=(0,b.useApi)(b.featureFlagsApiRef),V=new G(D,K);return(0,s.useMemo)(()=>M(V),[D,...I])}},80274:function(){},36964:function(X,o,t){"use strict";t.d(o,{AnalyticsContext:function(){return r.f},useAnalytics:function(){return r.z},FeatureFlagState:function(){return e.FeatureFlagState},SessionState:function(){return e.SessionState},alertApiRef:function(){return e.alertApiRef},analyticsApiRef:function(){return e.analyticsApiRef},appThemeApiRef:function(){return e.appThemeApiRef},atlassianAuthApiRef:function(){return e.atlassianAuthApiRef},auth0AuthApiRef:function(){return e.auth0AuthApiRef},bitbucketAuthApiRef:function(){return e.bitbucketAuthApiRef},configApiRef:function(){return e.configApiRef},discoveryApiRef:function(){return e.discoveryApiRef},errorApiRef:function(){return e.errorApiRef},featureFlagsApiRef:function(){return e.featureFlagsApiRef},fetchApiRef:function(){return e.fetchApiRef},githubAuthApiRef:function(){return e.githubAuthApiRef},gitlabAuthApiRef:function(){return e.gitlabAuthApiRef},googleAuthApiRef:function(){return e.googleAuthApiRef},identityApiRef:function(){return e.identityApiRef},microsoftAuthApiRef:function(){return e.microsoftAuthApiRef},oauth2ApiRef:function(){return e.oauth2ApiRef},oauthRequestApiRef:function(){return e.oauthRequestApiRef},oidcAuthApiRef:function(){return e.oidcAuthApiRef},oktaAuthApiRef:function(){return e.oktaAuthApiRef},oneloginAuthApiRef:function(){return e.oneloginAuthApiRef},samlAuthApiRef:function(){return e.samlAuthApiRef},storageApiRef:function(){return e.storageApiRef},useApp:function(){return l.q},attachComponentData:function(){return h.R5},createComponentExtension:function(){return h.CO},createRoutableExtension:function(){return h.P4},getComponentData:function(){return h.IY},useElementFilter:function(){return h.vJ},createPlugin:function(){return u.r},createExternalRouteRef:function(){return d.x8},createRouteRef:function(){return d.NT},useRouteRef:function(){return d.tg},useRouteRefParams:function(){return d.Oi}});var r=t(28461),e=t(27399);t.o(e,"attachComponentData")&&t.d(o,{attachComponentData:function(){return e.attachComponentData}}),t.o(e,"createApiFactory")&&t.d(o,{createApiFactory:function(){return e.createApiFactory}}),t.o(e,"createApiRef")&&t.d(o,{createApiRef:function(){return e.createApiRef}}),t.o(e,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return e.createComponentExtension}}),t.o(e,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return e.createExternalRouteRef}}),t.o(e,"createPlugin")&&t.d(o,{createPlugin:function(){return e.createPlugin}}),t.o(e,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return e.createRoutableExtension}}),t.o(e,"createRouteRef")&&t.d(o,{createRouteRef:function(){return e.createRouteRef}}),t.o(e,"getComponentData")&&t.d(o,{getComponentData:function(){return e.getComponentData}}),t.o(e,"useApi")&&t.d(o,{useApi:function(){return e.useApi}}),t.o(e,"useApiHolder")&&t.d(o,{useApiHolder:function(){return e.useApiHolder}}),t.o(e,"useApp")&&t.d(o,{useApp:function(){return e.useApp}}),t.o(e,"useElementFilter")&&t.d(o,{useElementFilter:function(){return e.useElementFilter}}),t.o(e,"useRouteRef")&&t.d(o,{useRouteRef:function(){return e.useRouteRef}}),t.o(e,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return e.useRouteRefParams}});var l=t(31311);t.o(l,"attachComponentData")&&t.d(o,{attachComponentData:function(){return l.attachComponentData}}),t.o(l,"createApiFactory")&&t.d(o,{createApiFactory:function(){return l.createApiFactory}}),t.o(l,"createApiRef")&&t.d(o,{createApiRef:function(){return l.createApiRef}}),t.o(l,"createComponentExtension")&&t.d(o,{createComponentExtension:function(){return l.createComponentExtension}}),t.o(l,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),t.o(l,"createPlugin")&&t.d(o,{createPlugin:function(){return l.createPlugin}}),t.o(l,"createRoutableExtension")&&t.d(o,{createRoutableExtension:function(){return l.createRoutableExtension}}),t.o(l,"createRouteRef")&&t.d(o,{createRouteRef:function(){return l.createRouteRef}}),t.o(l,"getComponentData")&&t.d(o,{getComponentData:function(){return l.getComponentData}}),t.o(l,"useApi")&&t.d(o,{useApi:function(){return l.useApi}}),t.o(l,"useApiHolder")&&t.d(o,{useApiHolder:function(){return l.useApiHolder}}),t.o(l,"useElementFilter")&&t.d(o,{useElementFilter:function(){return l.useElementFilter}}),t.o(l,"useRouteRef")&&t.d(o,{useRouteRef:function(){return l.useRouteRef}}),t.o(l,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return l.useRouteRefParams}});var h=t(74181),c=t(80274),s=t.n(c);t.o(c,"createApiFactory")&&t.d(o,{createApiFactory:function(){return c.createApiFactory}}),t.o(c,"createApiRef")&&t.d(o,{createApiRef:function(){return c.createApiRef}}),t.o(c,"createExternalRouteRef")&&t.d(o,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),t.o(c,"createPlugin")&&t.d(o,{createPlugin:function(){return c.createPlugin}}),t.o(c,"createRouteRef")&&t.d(o,{createRouteRef:function(){return c.createRouteRef}}),t.o(c,"useApi")&&t.d(o,{useApi:function(){return c.useApi}}),t.o(c,"useApiHolder")&&t.d(o,{useApiHolder:function(){return c.useApiHolder}}),t.o(c,"useRouteRef")&&t.d(o,{useRouteRef:function(){return c.useRouteRef}}),t.o(c,"useRouteRefParams")&&t.d(o,{useRouteRefParams:function(){return c.useRouteRefParams}});var u=t(96896),d=t(82772)},96896:function(X,o,t){"use strict";t.d(o,{r:function(){return e}});class r{constructor(h){_(this,"storedOutput");this.config=h}getId(){return this.config.id}getApis(){var h;return(h=this.config.apis)!=null?h:[]}getFeatureFlags(){return this.output().filter(({type:c})=>c==="feature-flag").map(({name:c})=>({name:c}))}get routes(){var h;return(h=this.config.routes)!=null?h:{}}get externalRoutes(){var h;return(h=this.config.externalRoutes)!=null?h:{}}output(){if(this.storedOutput)return this.storedOutput;const h=new Array;if(this.storedOutput=h,this.config.featureFlags)for(const c of this.config.featureFlags)h.push({type:"feature-flag",name:c.name});return this.config.register?(this.config.register({featureFlags:{register(c){h.push({type:"feature-flag",name:c})}}}),this.storedOutput):h}provide(h){return h.expose(this)}toString(){return`plugin{${this.config.id}}`}}function e(l){return new r(l)}},82772:function(X,o,t){var b,T,G;"use strict";t.d(o,{x8:function(){return y},NT:function(){return h},tg:function(){return i},Oi:function(){return S}});var r=t(76241);const e=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(D,M){_(this,b,"absolute");this.id=D,this.params=M}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}b=e;function h(j){var D;return new l(j.id,(D=j.params)!=null?D:[])}const c=/^\w+$/;class s{constructor(D,M,I,K){_(this,T,"sub");this.id=D,this.path=M,this.parent=I,this.params=K}toString(){return`routeRef{type=sub,id=${this.id}}`}}T=e;function u(j){const{id:D,path:M,parent:I}=j,K=M.split("/").filter(vt=>vt.startsWith(":")).map(vt=>vt.substring(1)),V=[...I.params,...K];if(I.params.some(vt=>K.includes(vt)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!M.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${M}'`);if(M.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${M}'`);for(const vt of K)if(!c.test(vt))throw new Error(`SubRouteRef path has invalid param, got '${vt}'`);return new s(D,M,I,V)}class d{constructor(D,M,I){_(this,G,"external");this.id=D,this.params=M,this.optional=I}toString(){return`routeRef{type=external,id=${this.id}}`}}G=e;function y(j){var D;return new d(j.id,(D=j.params)!=null?D:[],Boolean(j.optional))}var m=t(2784),E=t(10289);function i(j){const D=(0,E.TH)(),M=(0,r.Vt)("routing-context");if(!M)throw new Error("Routing context is not available");const I=M.atVersion(1),K=(0,m.useMemo)(()=>I&&I.resolve(j,D),[I,j,D]);if(!M)throw new Error("useRouteRef used outside of routing context");if(!I)throw new Error("RoutingContext v1 not available");const V="optional"in j&&j.optional;if(!K&&!V)throw new Error(`No path for ${j}`);return K}function S(j){return(0,E.UO)()}},63865:function(X,o,t){"use strict";var r={};t.r(r),t.d(r,{TechDocsPlugin:function(){return Ot}});var e=t(2784),l=t(9832),h=t(10289),c=t(49208),s=t(36964);const u=(0,s.createApiRef)({id:"plugin.permission.api"});var d;(function(A){const O="DENY";A.DENY=O;const H="ALLOW";A.ALLOW=H;const rt="CONDITIONAL";A.CONDITIONAL=rt})(d||(d={}));var y=t(10179),m=t(96279),E=t.n(m),i=t(9571),S=t(30195);const b=S.z.lazy(()=>S.z.object({rule:S.z.string(),params:S.z.array(S.z.unknown())}).or(S.z.object({anyOf:S.z.array(b)})).or(S.z.object({allOf:S.z.array(b)})).or(S.z.object({not:b}))),T=S.z.array(S.z.object({id:S.z.string(),result:S.z.literal(d.ALLOW).or(S.z.literal(d.DENY))}).or(S.z.object({id:S.z.string(),result:S.z.literal(d.CONDITIONAL),conditions:b})));class G{constructor(O){_(this,"enabled");_(this,"discovery");var H;this.discovery=O.discovery,this.enabled=(H=O.config.getOptionalBoolean("permission.enabled"))!=null?H:!1}async authorize(O,H){if(!this.enabled)return O.map(Ut=>({result:d.ALLOW}));const rt=O.map(Ut=>({id:i.Z(),...Ut})),pt=await this.discovery.getBaseUrl("permission"),Mt=await E()(`${pt}/authorize`,{method:"POST",body:JSON.stringify(rt),headers:{...this.getAuthorizationHeader(H==null?void 0:H.token),"content-type":"application/json"}});if(!Mt.ok)throw await y.VL.fromResponse(Mt);const Ct=await Mt.json();this.assertValidResponses(rt,Ct);const Gt=Ct.reduce((Ut,de)=>(Ut[de.id]=de,Ut),{});return rt.map(Ut=>Gt[Ut.id])}getAuthorizationHeader(O){return O?{Authorization:`Bearer ${O}`}:{}}assertValidResponses(O,H){const pt=T.parse(H).map(Ct=>Ct.id);if(!O.every(Ct=>pt.includes(Ct.id)))throw new Error("Unexpected authorization response from permission-backend")}}class j{constructor(O,H){this.permissionClient=O,this.identityApi=H}static create(O){const{config:H,discovery:rt,identity:pt}=O,Mt=new G({discovery:rt,config:H});return new j(Mt,pt)}async authorize(O){return(await this.permissionClient.authorize([O],{token:await this.identityApi.getIdToken()}))[0]}}const D=(A,O)=>{const H=useApi(permissionApiRef),{loading:rt,error:pt,value:Mt}=useAsync(async()=>{const{result:Ct}=await H.authorize({permission:A,resourceRef:O});return Ct},[H,A,O]);return rt?{loading:!0,allowed:!1}:pt?{error:pt,loading:!1,allowed:!1}:{loading:!1,allowed:Mt===AuthorizeResult.ALLOW}},M=A=>{const{permission:O,resourceRef:H,errorComponent:rt,...pt}=A,Mt=usePermission(O,H),Ct=useApp(),{NotFoundErrorPage:Gt}=Ct.getComponents();let Ut=rt===void 0?React.createElement(Gt,null):rt;return Mt.loading?Ut=null:Mt.allowed&&(Ut=A.element),React.createElement(Route,{...pt,element:Ut})},I=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:A})=>c.UrlPatternDiscovery.compile(`${A.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new c.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new c.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:A})=>{const O=new c.ErrorAlerter(A,new c.ErrorApiForwarder);return c.UnhandledErrorForwarder.forward(O,{hidden:!1}),O}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:A})=>c.WebStorage.create({errorApi:A})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:A,identityApi:O,discoveryApi:H})=>(0,c.createFetchApi)({middleware:[c.FetchMiddlewares.resolvePluginProtocol({discoveryApi:H}),c.FetchMiddlewares.injectIdentityAuth({identityApi:O,config:A})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new c.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.GoogleAuth.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.MicrosoftAuth.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.GithubAuth.create({discoveryApi:A,oauthRequestApi:O,defaultScopes:["read:user"],environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.OktaAuth.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.GitlabAuth.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.auth0AuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.Auth0Auth.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oauth2ApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.OAuth2.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.samlAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,configApi:O})=>c.SamlAuth.create({discoveryApi:A,environment:O.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.OneLoginAuth.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oidcAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.OAuth2.create({discoveryApi:A,oauthRequestApi:O,provider:{id:"oidc",title:"Your Identity Provider",icon:()=>null},environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.BitbucketAuth.create({discoveryApi:A,oauthRequestApi:O,defaultScopes:["team"],environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:A,oauthRequestApi:O,configApi:H})=>c.AtlassianAuth.create({discoveryApi:A,oauthRequestApi:O,environment:H.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:u,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:A,discovery:O,identity:H})=>j.create({config:A,discovery:O,identity:H})})];var K=t(77277),V=t(41682),ot=t(62833);function vt({children:A}){return(0,h.GV)()?e.createElement(e.Fragment,null,A):e.createElement(h.VA,null,A)}const Zt=()=>e.createElement(V.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),mt=({step:A,error:O})=>{let H="";return A==="load-config"?H=`The configuration failed to load, someone should have a look at this error: ${O.message}`:A==="load-chunk"&&(H=`Lazy loaded chunk failed to load, try to reload the page: ${O.message}`),e.createElement(vt,null,e.createElement(V.ErrorPage,{status:"501",statusMessage:H}))},jt=({error:A,resetError:O,plugin:H})=>e.createElement(V.ErrorPanel,{title:`Error in ${H==null?void 0:H.getId()}`,defaultExpanded:!0,error:A},e.createElement(K.Z,{variant:"outlined",onClick:O},"Retry")),Lt={Progress:V.Progress,Router:ot.VK,NotFoundErrorPage:Zt,BootErrorPage:mt,ErrorBoundaryFallback:jt};var Kt=t(43642),ae=t(80079),qt=t(90941),me=t(32915),le=t(40562),ce=t(21853),Ae=t(60744),Me=t(66569),ye=t(30254),ve=t(13384),he=t(15933),Ne=t(58838),Ue=t(86737),Ie=t(4989),Le=t(44407),fe=t(18628),Re=t(84219),ze=t(98685),xt=t(39781);const se={brokenImage:ae.Z,catalog:fe.Z,scaffolder:me.Z,techdocs:le.Z,search:ce.Z,chat:Ae.Z,dashboard:Me.Z,docs:ye.Z,email:ve.Z,github:Ne.Z,group:Re.Z,help:Ue.Z,"kind:api":he.Z,"kind:component":Le.Z,"kind:domain":Kt.Z,"kind:group":Re.Z,"kind:location":Ie.Z,"kind:system":qt.Z,"kind:user":ze.Z,user:ze.Z,warning:xt.Z};var ie=t(73689),F=t(48032);const R={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")`},P={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 B(A,O){const rt=`linear-gradient(90deg, ${(A.length===1?[A[0],A[0]]:A).join(", ")})`,pt=`${O}, ${rt}`;return{colors:A,shape:O,backgroundImage:pt}}const W={home:B(P.teal,R.wave),documentation:B(P.pinkSea,R.wave2),tool:B(P.purpleSky,R.round),service:B(P.marineBlue,R.wave),website:B(P.veryBlue,R.wave),library:B(P.rubyRed,R.wave),other:B(P.darkGrey,R.wave),app:B(P.toastyOrange,R.wave),apis:B(P.teal,R.wave2)},q='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function ut(A){const{palette:O,fontFamily:H=q,defaultPageTheme:rt,pageTheme:pt=W}=A;if(!pt[rt])throw new Error(`${rt} is not defined in pageTheme.`);return{palette:O,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:H,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:pt[rt],getPageTheme:({themeId:Mt})=>{var Ct;return(Ct=pt[Mt])!=null?Ct:pt[rt]}}}function st(A){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:A.typography.fontFamily},body:{height:"100%",fontFamily:A.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:A.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:A.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:A.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:A.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:A.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,F.darken)(A.palette.link,.3),background:(0,F.lighten)(A.palette.link,.95)},[A.breakpoints.up("md")]:{minWidth:120,fontSize:A.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:A.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:A.spacing(1),marginBottom:A.spacing(1),color:A.palette.grey[900]},outlined:{color:A.palette.text.primary},label:{lineHeight:`${A.spacing(2.5)}px`,fontWeight:A.typography.fontWeightMedium,fontSize:`${A.spacing(1.75)}px`},labelSmall:{fontSize:`${A.spacing(1.5)}px`},deleteIcon:{color:A.palette.grey[500],width:`${A.spacing(3)}px`,height:`${A.spacing(3)}px`,margin:`0 ${A.spacing(.75)}px 0 -${A.spacing(.75)}px`},deleteIconSmall:{width:`${A.spacing(2)}px`,height:`${A.spacing(2)}px`,margin:`0 ${A.spacing(.5)}px 0 -${A.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function Tt(A){const O=ut(A),H=(0,ie.Z)(O),rt=st(H);return{...H,overrides:rt}}var wt=t(34505);const oe=Tt({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:wt.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:W}),Vt=Tt({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:wt.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:W});var Rt=t(98192),Pt=t(15222),_t=t(41547),ht=t(87561);const St=[{id:"light",title:"Light Theme",variant:"light",icon:e.createElement(Pt.Z,null),Provider:({children:A})=>e.createElement(_t.Z,{theme:oe},e.createElement(ht.ZP,null,A))},{id:"dark",title:"Dark Theme",variant:"dark",icon:e.createElement(Rt.Z,null),Provider:({children:A})=>e.createElement(_t.Z,{theme:Vt},e.createElement(ht.ZP,null,A))}];function Wt(A){var O,H,rt;return(0,c.createSpecializedApp)({...A,apis:(O=A==null?void 0:A.apis)!=null?O:[],bindRoutes:A==null?void 0:A.bindRoutes,components:{...Lt,...A==null?void 0:A.components},configLoader:A==null?void 0:A.configLoader,defaultApis:I,icons:{...se,...A==null?void 0:A.icons},plugins:(H=A==null?void 0:A.plugins)!=null?H:[],themes:(rt=A==null?void 0:A.themes)!=null?rt:St})}var zt=t(39398),Dt=t(49782),re=t(79692);const Ft=(0,re.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),Qt=({result:A})=>{const O=Ft();return React.createElement(Link,{to:A.location},React.createElement(ListItem,{alignItems:"flex-start",className:O.flexContainer},React.createElement(ListItemText,{className:O.itemText,primaryTypographyProps:{variant:"h6"},primary:A.title,secondary:A.text}),React.createElement(Box,null,A.kind&&React.createElement(Chip,{label:`Kind: ${A.kind}`,size:"small"}),A.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${A.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))};var Xt=t(91730),Y=t(17499),v=t(52890),L=t(85653),J=t(95544),et=t(99688),yt=t(12231),ft=t(86136),Bt=t(49378),bt=t(85256),Ee=t(61837),Xe=t(79784),on=t(50758),lt=t(49166),Z=t(43054);const tt=(0,re.Z)({button:{color:"white"}}),gt=({UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:O,onUnregisterEntity:H})=>{var xe;const[rt,pt]=(0,e.useState)(),Mt=tt(),Ct=Ce=>{pt(Ce.currentTarget)},Gt=()=>{pt(void 0)},Ut=A&&[...A.map(Ce=>e.createElement(yt.Z,{key:Ce.title,onClick:()=>{Gt(),Ce.onClick()}},e.createElement(ft.Z,null,e.createElement(Ce.Icon,{fontSize:"small"})),e.createElement(Bt.Z,{primary:Ce.title}))),e.createElement(bt.Z,{key:"the divider is here!"})],de=(xe=O==null?void 0:O.disableUnregister)!=null?xe:!1;return e.createElement(e.Fragment,null,e.createElement(Ee.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Ct,"data-testid":"menu-button",className:Mt.button},e.createElement(Z.Z,null)),e.createElement(Xe.ZP,{open:Boolean(rt),onClose:Gt,anchorEl:rt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},e.createElement(on.Z,null,Ut,e.createElement(yt.Z,{onClick:()=>{Gt(),H()},disabled:de},e.createElement(ft.Z,null,e.createElement(lt.Z,{fontSize:"small"})),e.createElement(Bt.Z,{primary:"Unregister entity"})))))},Ht="plugin.catalog.entityLayoutRoute",te=()=>null;(0,s.attachComponentData)(te,Ht,!0),(0,s.attachComponentData)(te,"core.gatherMountPoints",!0);const pe=({entity:A,title:O})=>e.createElement(J.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},e.createElement(J.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},O),A&&e.createElement(L.FavoriteEntity,{entity:A})),Be=(A,O,H,rt)=>{var Gt,Ut,de,xe,Ce;const pt=(Gt=A!=null?A:rt==null?void 0:rt.kind)!=null?Gt:"",Mt=(Ut=O!=null?O:rt==null?void 0:rt.metadata.namespace)!=null?Ut:"";return{headerTitle:`${(Ce=(xe=(de=rt==null?void 0:rt.metadata.title)!=null?de:H)!=null?xe:rt==null?void 0:rt.metadata.name)!=null?Ce:""}${Mt&&Mt!==v.sk?` in ${Mt}`:""}`,headerType:(()=>{let Te=pt.toLocaleLowerCase("en-US");return rt&&rt.spec&&"type"in rt.spec&&(Te+=" \u2014 ",Te+=rt.spec.type.toLocaleLowerCase("en-US")),Te})()}},an=({entity:A})=>{var H;const O=(0,L.getEntityRelations)(A,v.S4);return e.createElement(e.Fragment,null,O.length>0&&e.createElement(V.HeaderLabel,{label:"Owner",value:e.createElement(L.EntityRefLinks,{entityRefs:O,defaultKind:"Group",color:"inherit"})}),((H=A.spec)==null?void 0:H.lifecycle)&&e.createElement(V.HeaderLabel,{label:"Lifecycle",value:A.spec.lifecycle}))},hn=({UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:O,children:H})=>{var jn,Vn,la;const{kind:rt,namespace:pt,name:Mt}=(0,L.useEntityCompoundName)(),{entity:Ct,loading:Gt,error:Ut}=(0,e.useContext)(L.EntityContext),de=(0,s.useElementFilter)(H,La=>La.selectByComponentData({key:Ht,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:xn})=>xn.if&&Ct&&!xn.if(Ct)?[]:[{path:xn.path,title:xn.title,children:xn.children,tabProps:xn.tabProps}]),[Ct]),{headerTitle:xe,headerType:Ce}=Be(rt,pt,Mt,Ct),[Te,cn]=(0,e.useState)(!1),un=(0,h.s0)(),Mn=async()=>{cn(!1),un("/")},er=()=>cn(!0);return e.createElement(V.Page,{themeId:(la=(Vn=(jn=Ct==null?void 0:Ct.spec)==null?void 0:jn.type)==null?void 0:Vn.toString())!=null?la:"home"},e.createElement(V.Header,{title:e.createElement(pe,{title:xe,entity:Ct}),pageTitleOverride:xe,type:Ce},Ct&&e.createElement(e.Fragment,null,e.createElement(an,{entity:Ct}),e.createElement(gt,{UNSTABLE_extraContextMenuItems:A,UNSTABLE_contextMenuOptions:O,onUnregisterEntity:er}))),Gt&&e.createElement(V.Progress,null),Ct&&e.createElement(V.RoutedTabs,{routes:de}),Ut&&e.createElement(V.Content,null,e.createElement(et.Z,{severity:"error"},Ut.toString())),!Gt&&!Ut&&!Ct&&e.createElement(V.Content,null,e.createElement(V.WarningPanel,{title:"Entity not found"},"There is no ",rt," with the requested"," ",e.createElement(V.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),e.createElement(L.UnregisterEntityDialog,{open:Te,entity:Ct,onConfirm:Mn,onClose:()=>cn(!1)}))};hn.Route=te;const Xn=({open:A,onClose:O,onConfirm:H,entity:rt})=>{const[pt,Mt]=useState(!1),Ct=useApi(catalogApiRef),Gt=useApi(alertApiRef),Ut=async()=>{Mt(!0);try{const de=rt.metadata.uid;await Ct.removeEntityByUid(de),H()}catch(de){assertError(de),Gt.post({message:de.message})}finally{Mt(!1)}};return React.createElement(Dialog,{open:A,onClose:O},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:pt,onClick:Ut},"Delete"),React.createElement(Button,{onClick:O,color:"primary"},"Cancel")))},Pn=A=>{var O,H;return((H=(O=A==null?void 0:A.metadata)==null?void 0:O.annotations)==null?void 0:H["backstage.io/orphan"])==="true"},In=()=>{const A=useNavigate(),O=useRouteRef(catalogRouteRef),[H,rt]=useState(!1),{entity:pt}=useEntity(),Mt=async()=>{rt(!1),A(O())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>rt(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:H,entity:pt,onConfirm:Mt,onClose:()=>rt(!1)}))};var ge=t(30001);const Ze=A=>A.error&&A.level==="error"&&A.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function sn(A,O){return{items:(await O.getEntityAncestors({entityRef:A})).items.map(pt=>{var Gt,Ut;return{errors:((Ut=(Gt=pt.entity.status)==null?void 0:Gt.items)!=null?Ut:[]).filter(Ze).map(de=>de.error).filter(de=>Boolean(de)),entity:pt.entity}}).filter(pt=>pt.errors.length>0)}}const On=async(A,O)=>{const H=O.apis.get(catalogApiRef);if(!H)throw new Error(`No implementation available for ${catalogApiRef}`);return(await sn(stringifyEntityRef(A),H)).items.length>0},Ve=()=>{const{entity:A}=useEntity(),O=stringifyEntityRef(A),H=useApi(catalogApiRef),{loading:rt,error:pt,value:Mt}=useAsync(async()=>sn(O,H),[O,H]);return pt?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:pt})):rt||!Mt?null:React.createElement(React.Fragment,null,Mt.items.map((Ct,Gt)=>React.createElement(Box,{key:Gt,mb:1},!compareEntityToRef(A,stringifyEntityRef(Ct.entity))&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:Ct.entity})),Ct.errors.map((Ut,de)=>React.createElement(ResponseErrorPanel,{key:de,error:Ut})))))};var Un=t(18671);const or=(A,O,H=0)=>{if(!A)return H;const rt=O.findIndex(pt=>pt.id===A.route.path);return~rt?rt:H},$n={Layout:({children:A})=>{var Ce,Te,cn;const O=[],H=[],rt=(0,h.UO)(),pt=(0,h.s0)();e.Children.forEach(A,un=>{if(!e.isValidElement(un))return;if(un.type!==$n.Content)throw new Error("This component only accepts Content elements as direct children. Check the code of the EntityPage.");const Mn=un.props.path;H.push({id:Mn,label:un.props.title}),O.push({path:Mn,element:un.props.element})}),((Te=(Ce=O==null?void 0:O[0])==null?void 0:Ce.path)!=null?Te:"")!==""&&O.push({path:"/*",element:e.createElement(h.Fg,{to:O[0].path})});const[Mt]=(cn=(0,h.fp)(O,`/${rt["*"]}`))!=null?cn:[],Ct=or(Mt,H),Gt=H[Ct],Ut=Gt==null?void 0:Gt.label,de=un=>pt(H[un].id.replace(/\/\*$/,"").replace(/^\//,"")),xe=(0,h.V$)(O);return Gt?e.createElement(e.Fragment,null,e.createElement(V.HeaderTabs,{tabs:H,selectedIndex:Ct,onChange:de}),e.createElement(V.Content,null,e.createElement(Un.q,{title:Ut}),xe)):null},Content:A=>null},Rr=({entity:A,title:O})=>e.createElement(J.Z,{display:"inline-flex",alignItems:"center",height:"1em"},O,A&&e.createElement(L.FavoriteEntity,{entity:A})),Zn=({entity:A})=>{var H;const O=(0,L.getEntityRelations)(A,v.S4);return e.createElement(e.Fragment,null,O.length>0&&e.createElement(V.HeaderLabel,{label:"Owner",value:e.createElement(L.EntityRefLinks,{entityRefs:O,defaultKind:"Group",color:"inherit"})}),((H=A.spec)==null?void 0:H.lifecycle)&&e.createElement(V.HeaderLabel,{label:"Lifecycle",value:A.spec.lifecycle}))},wn=(A,O,H,rt)=>({headerTitle:`${H}${O&&O!==v.sk?` in ${O}`:""}`,headerType:(()=>{let pt=A.toLocaleLowerCase("en-US");return rt&&rt.spec&&"type"in rt.spec&&(pt+=" \u2014 ",pt+=rt.spec.type.toLocaleLowerCase("en-US")),pt})()}),sr=({children:A,UNSTABLE_extraContextMenuItems:O,UNSTABLE_contextMenuOptions:H})=>{var er,jn,Vn;const{kind:rt,namespace:pt,name:Mt}=(0,L.useEntityCompoundName)(),{entity:Ct,loading:Gt,error:Ut}=(0,e.useContext)(L.EntityContext),{headerTitle:de,headerType:xe}=wn(rt,pt,Mt,Ct),[Ce,Te]=(0,e.useState)(!1),cn=(0,h.s0)(),un=async()=>{Te(!1),cn("/")},Mn=()=>Te(!0);return e.createElement(V.Page,{themeId:(Vn=(jn=(er=Ct==null?void 0:Ct.spec)==null?void 0:er.type)==null?void 0:jn.toString())!=null?Vn:"home"},e.createElement(V.Header,{title:e.createElement(Rr,{title:de,entity:Ct}),pageTitleOverride:de,type:xe},Ct&&e.createElement(e.Fragment,null,e.createElement(Zn,{entity:Ct}),e.createElement(gt,{UNSTABLE_extraContextMenuItems:O,UNSTABLE_contextMenuOptions:H,onUnregisterEntity:Mn}))),Gt&&e.createElement(V.Content,null,e.createElement(V.Progress,null)),Ct&&e.createElement($n.Layout,null,A),Ut&&e.createElement(V.Content,null,e.createElement(V.ResponseErrorPanel,{error:Ut})),!Gt&&!Ut&&!Ct&&e.createElement(V.Content,null,e.createElement(V.WarningPanel,{title:"Entity not found"},"There is no ",rt," with the requested"," ",e.createElement(V.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),e.createElement(L.UnregisterEntityDialog,{open:Ce,entity:Ct,onConfirm:un,onClose:()=>Te(!1)}))};sr.Content=$n.Content;var ir=t(64279);const lr="core.backstage.entitySwitch",kn=A=>null;(0,s.attachComponentData)(kn,lr,!0);const Sr=({children:A})=>{var Mt,Ct;const{entity:O}=(0,L.useEntity)(),H=(0,s.useApiHolder)(),rt=(0,s.useElementFilter)(A,Gt=>Gt.selectByComponentData({key:lr,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Ut=>{var Ce;const{if:de,children:xe}=Ut.props;return[{if:(Ce=de==null?void 0:de(O,{apis:H}))!=null?Ce:!0,children:xe}]}),[H,O]);return rt.some(Gt=>typeof Gt.if=="object"&&"then"in Gt.if)?e.createElement(cr,{results:rt}):(Ct=(Mt=rt.find(Gt=>Gt.if))==null?void 0:Mt.children)!=null?Ct:null};function cr({results:A}){const{loading:O,value:H}=(0,ir.default)(async()=>{var pt;const rt=A.map(async({if:Mt,children:Ct})=>{try{if(await Mt)return Ct}catch{}return null});return(pt=(await Promise.all(rt)).find(Boolean))!=null?pt:null},[A]);return O||!H?null:H}Sr.Case=kn;var Wn=t(26997),Cr=t(7758),ur=t(219);const dr=(0,re.Z)(A=>({illo:{maxWidth:"60%",top:100,right:20,position:"absolute",[A.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",top:"unset",right:"unset",margin:`${A.spacing(10)}px auto ${A.spacing(4)}px`}}})),fr=()=>{const A=dr();return React.createElement("img",{src:IlloSvgUrl,className:A.illo,alt:"Illustration on entity not found page"})},qn=(0,re.Z)(A=>({container:{paddingTop:A.spacing(24),paddingLeft:A.spacing(8),[A.breakpoints.down("xs")]:{padding:A.spacing(2)}},title:{paddingBottom:A.spacing(2),[A.breakpoints.down("xs")]:{fontSize:32}},body:{paddingBottom:A.spacing(6),[A.breakpoints.down("xs")]:{paddingBottom:A.spacing(5)}}})),zn=()=>{const A=qn();return React.createElement(Grid,{container:!0,spacing:0,className:A.container},React.createElement(Illo,null),React.createElement(Grid,{item:!0,xs:12,sm:6},React.createElement(Typography,{variant:"h2",className:A.title},"Entity was not found"),React.createElement(Typography,{variant:"body1",className:A.body},"Want to help us build this? Check out our Getting Started documentation."),React.createElement(Button,{variant:"contained",color:"primary",href:"https://backstage.io/docs"},"DOCS")))},mr=()=>React.createElement(EntityPageLayout,null,React.createElement(EntityPageLayout.Content,{path:"/",title:"Overview",element:React.createElement(Content,null,React.createElement(Typography,{variant:"h2"},"This is the default entity page."),React.createElement(Typography,{variant:"body1"},"To override this component with your custom implementation, read docs on"," ",React.createElement(Link,{to:"https://backstage.io/docs"},"backstage.io/docs")))})),An=({EntityPage:A})=>{const{entity:O,loading:H,error:rt}=useEntity();return H?React.createElement(EntityPageLayout,null):rt||!O?React.createElement(EntityNotFound,null):React.createElement(A,null)},gn=()=>{var Ct;const{optionalNamespaceAndName:A,"*":O}=useParams(),[H,rt]=A.split(":").reverse(),pt=(Ct=rt==null?void 0:rt.toLocaleLowerCase("en-US"))!=null?Ct:ENTITY_DEFAULT_NAMESPACE,Mt=O?`/${O}`:"";return React.createElement(Navigate,{to:`../../${pt}/component/${H}${Mt}`})},Tr=A=>React.createElement(AsyncEntityProvider,{...useEntityFromUrl(),...A}),Pr=({EntityPage:A=mr})=>React.createElement(Routes,null,React.createElement(Route,{path:"/",element:React.createElement(CatalogPage,null)}),React.createElement(Route,{path:"/:namespace/:kind/:name",element:React.createElement(Tr,null,React.createElement(An,{EntityPage:A}))}),React.createElement(Route,{path:"Component/:optionalNamespaceAndName/*",element:React.createElement(gn,null)}));var hr=t(47851);const tn=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:L.Ah,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:A,fetchApi:O})=>new ge.MS({discoveryApi:A,fetchApi:O})}),(0,s.createApiFactory)({api:L.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:A})=>new L.DefaultStarredEntitiesApi({storageApi:A})})],routes:{catalogIndex:L.M4,catalogEntity:L.wi},externalRoutes:{createComponent:hr.y,viewTechDoc:hr.j}}),Ir=tn.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>Promise.resolve().then(t.bind(t,7758)).then(A=>A.CatalogPage),mountPoint:L.M4})),_n=tn.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>t.e(6650).then(t.bind(t,76650)).then(A=>A.CatalogEntityPage),mountPoint:L.wi})),Lr=tn.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(t.bind(t,39398)).then(A=>A.AboutCard)}})),Or=tn.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>t.e(1959).then(t.bind(t,81959)).then(A=>A.EntityLinksCard)}})),xr=tn.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>t.e(390).then(t.bind(t,60390)).then(A=>A.HasSystemsCard)}})),Dr=tn.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>t.e(4022).then(t.bind(t,4022)).then(A=>A.HasComponentsCard)}})),Xr=tn.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>t.e(8792).then(t.bind(t,38792)).then(A=>A.HasSubcomponentsCard)}})),Fr=tn.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>t.e(1553).then(t.bind(t,11553)).then(A=>A.HasResourcesCard)}})),Br=tn.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>t.e(8061).then(t.bind(t,48061)).then(A=>A.DependsOnComponentsCard)}})),kr=tn.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>t.e(6235).then(t.bind(t,56235)).then(A=>A.DependencyOfComponentsCard)}})),br=tn.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>t.e(9028).then(t.bind(t,59028)).then(A=>A.DependsOnResourcesCard)}})),Mr=tn.provide((0,s.createComponentExtension)({name:"EntitySystemDiagramCard",component:{lazy:()=>t.e(4960).then(t.bind(t,14960)).then(A=>A.SystemDiagramCard)}}));var Bn=t(3337),gr=t(76372);class pr{constructor({configApi:O,discoveryApi:H,identityApi:rt}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=O,this.discoveryApi=H,this.identityApi=rt}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:rt,name:pt}=O,Ct=`${await this.getApiOrigin()}/metadata/techdocs/${rt}/${H}/${pt}`,Gt=await this.identityApi.getIdToken(),Ut=await fetch(`${Ct}`,{headers:Gt?{Authorization:`Bearer ${Gt}`}:{}});if(!Ut.ok)throw await y.VL.fromResponse(Ut);return await Ut.json()}async getEntityMetadata(O){const{kind:H,namespace:rt,name:pt}=O,Ct=`${await this.getApiOrigin()}/metadata/entity/${rt}/${H}/${pt}`,Gt=await this.identityApi.getIdToken(),Ut=await fetch(`${Ct}`,{headers:Gt?{Authorization:`Bearer ${Gt}`}:{}});if(!Ut.ok)throw await y.VL.fromResponse(Ut);return await Ut.json()}}class yr{constructor({configApi:O,discoveryApi:H,identityApi:rt}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=O,this.discoveryApi=H,this.identityApi=rt}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:rt,namespace:pt,name:Mt}=O,Gt=`${await this.getStorageUrl()}/${pt}/${rt}/${Mt}/${H}`,Ut=await this.identityApi.getIdToken(),de=await fetch(`${Gt.endsWith("/")?Gt:`${Gt}/`}index.html`,{headers:Ut?{Authorization:`Bearer ${Ut}`}:{}});let xe="";switch(de.status){case 404:throw xe="Page not found. ",H||(xe+="This could be because there is no index.md file in the root of the docs directory of this repository."),new y.dR(xe);case 500:throw xe="Could not generate documentation or an error in the TechDocs backend. ",new Error(xe);default:break}return de.text()}async syncEntityDocs(O,H=()=>{}){const{kind:rt,namespace:pt,name:Mt}=O,Gt=`${await this.getApiOrigin()}/sync/${pt}/${rt}/${Mt}`,Ut=await this.identityApi.getIdToken();return new Promise((de,xe)=>{const Ce=new gr.EventSourcePolyfill(Gt,{withCredentials:!0,headers:Ut?{Authorization:`Bearer ${Ut}`}:{}});Ce.addEventListener("log",Te=>{Te.data&&H(JSON.parse(Te.data))}),Ce.addEventListener("finish",Te=>{let cn=!1;Te.data&&({updated:cn}=JSON.parse(Te.data)),de(cn?"updated":"cached")}),Ce.onerror=Te=>{switch(Ce.close(),Te.status){case 404:xe(new y.dR(Te.message));return;default:xe(new Error(Te.data));return}}})}async getBaseUrl(O,H,rt){const{kind:pt,namespace:Mt,name:Ct}=H,Ut=`${await this.getApiOrigin()}/static/docs/${Mt}/${pt}/${Ct}/${rt}`;return new URL(O,Ut.endsWith("/")?Ut:`${Ut}/`).toString()}}var Nr=t(71226),Ur=t(95074),Er=t(76635),U=t(83201),N=t(50294),$=t(67430);const k=({columns:A,actions:O})=>{var Ce,Te;const{loading:H,error:rt,entities:pt,filters:Mt}=(0,L.useEntityListProvider)(),{isStarredEntity:Ct,toggleStarredEntity:Gt}=(0,L.useStarredEntities)(),[,Ut]=(0,Ur.Z)(),de=(0,Er.capitalize)((Te=(Ce=Mt.user)==null?void 0:Ce.value)!=null?Te:"all"),xe=[N.createCopyDocsUrlAction(Ut),N.createStarEntityAction(Ct,Gt)];return rt?e.createElement(V.WarningPanel,{severity:"error",title:"Could not load available documentation."},e.createElement(V.CodeSnippet,{language:"text",text:rt.toString()})):e.createElement(U.DocsTable,{title:de,entities:pt,loading:H,actions:O||xe,columns:A})};k.columns=$,k.actions=N;var ct=t(1114);class nt{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":L.n3}}}const dt=()=>{const{updateFilters:A}=(0,L.useEntityListProvider)();return(0,e.useEffect)(()=>{A({techdocs:new nt})},[A]),null},Nt=({initialFilter:A="all",columns:O,actions:H})=>e.createElement(ct.j,null,e.createElement(V.Content,null,e.createElement(V.ContentHeader,{title:""},e.createElement(V.SupportButton,null,"Discover documentation in your ecosystem.")),e.createElement(L.EntityListProvider,null,e.createElement(Wn.q7,null,e.createElement(Wn.Gh,null,e.createElement(dt,null),e.createElement(L.UserListPicker,{initialFilter:A}),e.createElement(L.EntityOwnerPicker,null),e.createElement(L.EntityTagPicker,null)),e.createElement(Wn.Nz,null,e.createElement(k,{actions:H,columns:O}))))));var kt=t(10187);const ne=()=>{const{loading:A,error:O,entities:H}=useEntityListProvider();return O?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:O.toString()})):A||!H?React.createElement(Progress,null):(H.sort((rt,pt)=>{var Mt,Ct;return((Mt=rt.metadata.title)!=null?Mt:rt.metadata.name).localeCompare((Ct=pt.metadata.title)!=null?Ct:pt.metadata.name)}),React.createElement(DocsCardGrid,{entities:H}))};var Jt=t(68725);const Ot=(0,s.createPlugin)({id:"techdocs",apis:[(0,s.createApiFactory)({api:Bn.D,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:O,identityApi:H})=>new yr({configApi:A,discoveryApi:O,identityApi:H})}),(0,s.createApiFactory)({api:Bn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:O,identityApi:H})=>new pr({configApi:A,discoveryApi:O,identityApi:H})})],routes:{root:Jt._Z,docRoot:Jt.Fw,entityContent:Jt.pd}}),$t=Ot.provide((0,s.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(t.bind(t,94067)).then(A=>A.Router),mountPoint:Jt._Z})),Se=Ot.provide((0,s.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(t.bind(t,94067)).then(A=>A.EmbeddedDocsRouter),mountPoint:Jt.pd})),Oe=Ot.provide((0,s.createComponentExtension)({name:"DocsCardGrid",component:{lazy:()=>Promise.resolve().then(t.bind(t,10187)).then(A=>A.DocsCardGrid)}})),be=Ot.provide((0,s.createComponentExtension)({name:"DocsTable",component:{lazy:()=>Promise.resolve().then(t.bind(t,83201)).then(A=>A.DocsTable)}})),ke=Ot.provide((0,s.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>Promise.resolve().then(t.bind(t,57110)).then(A=>A.TechDocsCustomHome),mountPoint:Jt._Z})),Ke=Ot.provide((0,s.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(t.bind(t,41481)).then(A=>A.TechDocsIndexPage),mountPoint:Jt._Z})),Je=Ot.provide((0,s.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(t.bind(t,31752)).then(A=>A.TechDocsPage),mountPoint:Jt.Fw}));var ln=t(73873),$e=t(94067),pn=t(36356);class Ln{constructor({configApi:O,discoveryApi:H,identityApi:rt}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=O,this.discoveryApi=H,this.identityApi=rt}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 pt=`${await this.getApiOrigin()}/${H}`,Mt=await fetch(`${pt.endsWith("/")?pt:`${pt}/`}index.html`);if(Mt.status===404)throw new Error("Page not found");return Mt.text()}async syncEntityDocs(O){return"cached"}async getBaseUrl(O,H,rt){const pt=await this.getApiOrigin();return new URL(O,`${pt}/${rt}`).toString()}}class we{constructor({configApi:O,discoveryApi:H,identityApi:rt}){_(this,"configApi");_(this,"discoveryApi");_(this,"identityApi");this.configApi=O,this.discoveryApi=H,this.identityApi=rt}async getApiOrigin(){var O;return(O=this.configApi.getOptionalString("techdocs.requestUrl"))!=null?O:await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(O){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(O){return{site_name:"Live preview environment",site_description:""}}}const Ge=[(0,s.createApiFactory)({api:Bn.D,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:O,identityApi:H})=>new Ln({configApi:A,discoveryApi:O,identityApi:H})}),(0,s.createApiFactory)({api:Bn.g,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:A,discoveryApi:O,identityApi:H})=>new we({configApi:A,discoveryApi:O,identityApi:H})}),(0,s.createApiFactory)({api:pn.q3,deps:{configApi:s.configApiRef},factory:({configApi:A})=>pn.ae.fromConfig(A)})];var bn=t(86689),Hn=t(58845);const qr=(0,re.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var ta=()=>{const A=qr();return e.createElement("svg",{className:A.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},e.createElement("path",{className:A.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Sa=(0,re.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var ea=()=>{const A=Sa();return e.createElement("svg",{className:A.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},e.createElement("path",{className:A.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const Ta=(0,re.Z)({root:{width:V.sidebarConfig.drawerWidthClosed,height:3*V.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:V.sidebarConfig.drawerWidthClosed,marginLeft:24}}),na=()=>{const A=Ta(),{isOpen:O}=(0,e.useContext)(V.SidebarContext);return e.createElement("div",{className:A.root},e.createElement(bn.Z,{component:ot.OL,to:"/docs/default/component/local/",underline:"none",className:A.link},O?e.createElement(ta,null):e.createElement(ea,null)))},ra=({children:A})=>e.createElement(V.SidebarPage,null,e.createElement(V.Sidebar,null,e.createElement(na,null),e.createElement(V.SidebarDivider,null),e.createElement(V.SidebarItem,{icon:Hn.Z,to:"docs/default/component/local/",text:"Docs Preview"})),A),aa=()=>{const A={site_name:"Live preview environment",site_description:""};return e.createElement(ln.EV,null,({entityRef:O,onReady:H})=>e.createElement(e.Fragment,null,e.createElement(ln.nN,{techDocsMetadata:A,entityRef:O}),e.createElement(V.Content,{"data-testid":"techdocs-content"},e.createElement(ln.Ej,{onReady:H,entityRef:O,withSearch:!1}))))},$r=e.createElement(aa,null),tr=Wt({apis:Ge,plugins:Object.values(r)}),oa=tr.getProvider(),Pa=tr.getRouter(),sa=e.createElement(c.FlatRoutes,null,e.createElement(h.Fg,{key:"/",to:"/docs/default/component/local/"}),e.createElement(h.AW,{path:"/catalog/:namespace/:kind/:name",element:e.createElement(_n,null)}),e.createElement(h.AW,{path:"/docs",element:e.createElement(Ke,null)},e.createElement(Nt,null)),e.createElement(h.AW,{path:"/docs/:namespace/:kind/:name/*",element:e.createElement(Je,null)},$r));var ia=()=>e.createElement(oa,null,e.createElement(Pa,null,e.createElement(ra,null,sa)));l.render(e.createElement(ia,null),document.getElementById("root"))},10179:function(X,o,t){"use strict";t.d(o,{SP:function(){return b},dR:function(){return E},VL:function(){return j},BD:function(){return e}});function r(D){if(typeof D!="object"||D===null||Array.isArray(D))return!1;const M=D;return!(typeof M.name!="string"||M.name===""||typeof M.message!="string")}function e(D){if(typeof D!="object"||D===null||Array.isArray(D))throw new Error(`Encountered invalid error, not an object, got '${D}'`);const M=D;if(typeof M.name!="string"||M.name==="")throw new Error(`Encountered error object without a name, got '${D}'`);if(typeof M.message!="string")throw new Error(`Encountered error object without a message, got '${D}'`)}var l=t(24852);function h(D,M){const I=serializeErrorInternal(D),K={name:"Unknown",message:"<no reason given>",...I};return(M==null?void 0:M.includeStack)||delete K.stack,K}function c(D){const M=(0,l.deserializeError)(D);return D.stack||(M.stack=void 0),M}function s(D){if(r(D)){const M=String(D);return M!=="[object Object]"?M:`${D.name}: ${D.message}`}return`unknown error '${D}'`}class u extends Error{constructor(M,I){var V;let K=M;if(I!==void 0){const ot=s(I);K?K+=`; caused by ${ot}`:K=`caused by ${ot}`}super(K);_(this,"cause");(V=Error.captureStackTrace)==null||V.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(I)?I:void 0}}class d extends null{}class y extends null{}class m extends null{}class E extends u{}class i extends null{}class S extends null{}class b extends u{constructor(M,I){super(M,I);this.name=r(I)?I.name:"Error"}}async function T(D){return G(D)}async function G(D){var M;try{const I=await D.text();if(I){if((M=D.headers.get("content-type"))==null?void 0:M.startsWith("application/json"))try{const K=JSON.parse(I);if(K.error&&K.response)return K}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}, ${I}`},response:{statusCode:D.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${D.status} ${D.statusText}`},response:{statusCode:D.status}}}class j extends Error{constructor(M){super(M.message);_(this,"response");_(this,"body");_(this,"cause");this.name="ResponseError",this.response=M.response,this.body=M.data,this.cause=M.cause}static async fromResponse(M){const I=await G(M),K=I.response.statusCode||M.status,V=I.error.name||M.statusText,ot=`Request failed with ${K} ${V}`,vt=c(I.error);return new j({message:ot,response:M,data:I,cause:vt})}get data(){return console.warn("ErrorResponse.data is deprecated, use .body instead."),this.body}}},36356:function(X,o,t){var E,i,S,b;"use strict";t.d(o,{nW:function(){return m},ae:function(){return s},q3:function(){return u}});var r=t(36964);const e=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(j){En(this,E,void 0);Tn(this,E,j)}async getCredentials(j){const D=new URL(j.url),M=ee(this,E).find(I=>I.isUrlSupported(D));if(!M)throw new Error(`No authentication provider available for access to '${j.url}'`);return M.getCredentials(j)}}E=new WeakMap;const T=class{constructor(j,D,M){En(this,i,void 0);En(this,S,void 0);En(this,b,void 0);Tn(this,i,j),Tn(this,S,D),Tn(this,b,M)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef},factory:({github:j,gitlab:D,azure:M})=>T.merge(T.forGithub(j),T.forGitlab(D),T.forAzure(M))})}static forAuthApi(j,D){return new T(j,D.host,D.scopeMapping)}static forGithub(j,D){var I;const M=(I=D==null?void 0:D.host)!=null?I:"github.com";return new T(j,M,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(j,D){var I;const M=(I=D==null?void 0:D.host)!=null?I:"gitlab.com";return new T(j,M,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(j,D){var I;const M=(I=D==null?void 0:D.host)!=null?I:"dev.azure.com";return new T(j,M,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(j,D){var I;const M=(I=D==null?void 0:D.host)!=null?I:"bitbucket.org";return new T(j,M,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...j){return new l(j)}isUrlSupported(j){return j.host===ee(this,S)}async getCredentials(j){const{url:D,additionalScope:M,...I}=j,K=ee(this,b).default.slice();(M==null?void 0:M.repoWrite)&&K.push(...ee(this,b).repoWrite);const V=await ee(this,i).getAccessToken(K,I);return{token:V,headers:{Authorization:`Bearer ${V}`}}}};let h=T;i=new WeakMap,S=new WeakMap,b=new WeakMap;var c=t(94594);class s{static fromConfig(j){return c.Lx.fromConfig(j)}}const u=(0,r.createApiRef)({id:"integration.scmintegrations"});var d=t(73250),y=t(2784);const m=G=>{var K;const{type:j}=G,D=(0,r.useApp)(),M=d.Z,I=j&&(K=D.getSystemIcon(j))!=null?K:M;return y.createElement(I,null)}},94594:function(X,o,t){var Vt,Rt,Pt,_t,ht,St,Wt;"use strict";t.d(o,{Lx:function(){return oe},Pb:function(){return fe}});var r=t(82717),e=t.n(r),l=t(76635);function h(Y){const v=new URL("http://example.com");return v.host=Y,v.host===Y}function c(Y){try{return new URL(Y),!0}catch{return!1}}function s(Y,v){return{list(){return Y},byUrl(L){try{const J=typeof L=="string"?new URL(L):L;return Y.find(et=>v(et)===J.host)}catch{return}},byHost(L){return Y.find(J=>v(J)===L)}}}function u(Y){const{url:v,base:L,lineNumber:J}=Y;try{return new URL(v),v}catch{}let et;if(v.startsWith("/")){const{filepath:yt}=e()(L);et=new URL(L);const ft=(0,l.trimEnd)(et.pathname.substring(0,et.pathname.length-yt.length),"/");et.pathname=`${ft}${v}`}else et=new URL(v,L);return et.search=new URL(L).search,J&&(et.hash=`L${J}`),et.toString()}const d="GB",zt=class{constructor(v,L,J,et,yt,ft){En(this,Vt,void 0);En(this,Rt,void 0);En(this,Pt,void 0);En(this,_t,void 0);En(this,ht,void 0);En(this,St,void 0);En(this,Wt,(...v)=>{const L=new URL(ee(this,Vt));return L.pathname=v.map(J=>encodeURIComponent(J)).join("/"),L});Tn(this,Vt,v),Tn(this,Rt,L),Tn(this,Pt,J),Tn(this,_t,et),Tn(this,ht,yt),Tn(this,St,ft)}static fromRepoUrl(v){var Xe;const L=new URL(v);let J,et,yt;const ft=L.pathname.split("/").map(on=>decodeURIComponent(on));if(ft[2]==="_git"?(J=ft[1],et=yt=ft[3]):ft[3]==="_git"&&(J=ft[1],et=ft[2],yt=ft[4]),!J||!et||!yt)throw new Error("Azure URL must point to a git repository");const Bt=(Xe=L.searchParams.get("path"))!=null?Xe:void 0;let bt;const Ee=L.searchParams.get("version");if(Ee){if(Ee.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");bt=Ee.slice(2)}return new zt(L.origin,J,et,yt,Bt,bt)}toRepoUrl(){let v;return ee(this,Pt)===ee(this,_t)?v=ee(this,Wt).call(this,ee(this,Rt),"_git",ee(this,_t)):v=ee(this,Wt).call(this,ee(this,Rt),ee(this,Pt),"_git",ee(this,_t)),ee(this,ht)&&v.searchParams.set("path",ee(this,ht)),ee(this,St)&&v.searchParams.set("version",d+ee(this,St)),v.toString()}toFileUrl(){if(!ee(this,ht))throw new Error("Azure URL must point to a specific path to be able to download a file");const v=ee(this,Wt).call(this,ee(this,Rt),ee(this,Pt),"_apis","git","repositories",ee(this,_t),"items");return v.searchParams.set("api-version","6.0"),v.searchParams.set("path",ee(this,ht)),ee(this,St)&&v.searchParams.set("version",ee(this,St)),v.toString()}toArchiveUrl(){const v=ee(this,Wt).call(this,ee(this,Rt),ee(this,Pt),"_apis","git","repositories",ee(this,_t),"items");return v.searchParams.set("recursionLevel","full"),v.searchParams.set("download","true"),v.searchParams.set("api-version","6.0"),ee(this,ht)&&v.searchParams.set("scopePath",ee(this,ht)),ee(this,St)&&v.searchParams.set("version",ee(this,St)),v.toString()}toCommitsUrl(){const v=ee(this,Wt).call(this,ee(this,Rt),ee(this,Pt),"_apis","git","repositories",ee(this,_t),"commits");return v.searchParams.set("api-version","6.0"),ee(this,St)&&v.searchParams.set("searchCriteria.itemVersion.version",ee(this,St)),v.toString()}getOwner(){return ee(this,Rt)}getProject(){return ee(this,Pt)}getRepo(){return ee(this,_t)}getPath(){return ee(this,ht)}getRef(){return ee(this,St)}};let y=zt;Vt=new WeakMap,Rt=new WeakMap,Pt=new WeakMap,_t=new WeakMap,ht=new WeakMap,St=new WeakMap,Wt=new WeakMap;const m="dev.azure.com";function E(Y){var J;const v=(J=Y.getOptionalString("host"))!=null?J:m,L=Y.getOptionalString("token");if(!h(v))throw new Error(`Invalid Azure integration config, '${v}' is not a valid host`);return{host:v,token:L}}function i(Y){const v=Y.map(E);return v.some(L=>L.host===m)||v.push({host:m}),v}const Dt=class{constructor(v){this.integrationConfig=v}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){var et;const{url:L,base:J}=v;if(c(L))return L;try{const yt=y.fromRepoUrl(J),ft=new URL(J),Bt=new URL(`https://a.com${(et=yt.getPath())!=null?et:""}`),bt=new URL(L,Bt).pathname;return ft.searchParams.set("path",bt),v.lineNumber&&(ft.searchParams.set("line",String(v.lineNumber)),ft.searchParams.set("lineEnd",String(v.lineNumber+1)),ft.searchParams.set("lineStartColumn","1"),ft.searchParams.set("lineEndColumn","1")),ft.toString()}catch{return new URL(L,J).toString()}}resolveEditUrl(v){return v}};let S=Dt;_(S,"factory",({config:v})=>{var J;const L=i((J=v.getOptionalConfigArray("integrations.azure"))!=null?J:[]);return s(L.map(et=>new Dt(et)),et=>et.config.host)});var b=t(48834).Buffer;function T(Y){return AzureUrl.fromRepoUrl(Y).toFileUrl()}function G(Y){return AzureUrl.fromRepoUrl(Y).toArchiveUrl()}function j(Y){return AzureUrl.fromRepoUrl(Y).toCommitsUrl()}function D(Y,v){const L=v?{...v}:{};if(Y.token){const J=b.from(`:${Y.token}`,"utf8");L.Authorization=`Basic ${J.toString("base64")}`}return{headers:L}}const M="bitbucket.org",I="https://api.bitbucket.org/2.0";function K(Y){var ft;const v=(ft=Y.getOptionalString("host"))!=null?ft:M;let L=Y.getOptionalString("apiBaseUrl");const J=Y.getOptionalString("token"),et=Y.getOptionalString("username"),yt=Y.getOptionalString("appPassword");if(!h(v))throw new Error(`Invalid Bitbucket integration config, '${v}' is not a valid host`);return L?L=(0,l.trimEnd)(L,"/"):v===M&&(L=I),{host:v,apiBaseUrl:L,token:J,username:et,appPassword:yt}}function V(Y){const v=Y.map(K);return v.some(L=>L.host===M)||v.push({host:M,apiBaseUrl:I}),v}const re=class{constructor(v){this.integrationConfig=v}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){const L=u(v);if(v.lineNumber){const J=new URL(L),et=J.pathname.split("/").slice(-1)[0];return J.hash=`${et}-${v.lineNumber}`,J.toString()}return L}resolveEditUrl(v){const L=e()(v),J=new URL(v);return J.searchParams.set("mode","edit"),J.searchParams.set("spa","0"),J.searchParams.set("at",L.ref),J.toString()}};let ot=re;_(ot,"factory",({config:v})=>{var J;const L=V((J=v.getOptionalConfigArray("integrations.bitbucket"))!=null?J:[]);return s(L.map(et=>new re(et)),et=>et.config.host)});var vt=t(96279),Zt=t(48834).Buffer;async function mt(Y,v){const{name:L,owner:J,resource:et}=parseGitUrl(Y),yt=et==="bitbucket.org";let ft=yt?`${v.apiBaseUrl}/repositories/${J}/${L}`:`${v.apiBaseUrl}/projects/${J}/repos/${L}/default-branch`,Bt=await fetch(ft,Kt(v));if(Bt.status===404&&!yt&&(ft=`${v.apiBaseUrl}/projects/${J}/repos/${L}/branches/default`,Bt=await fetch(ft,Kt(v))),!Bt.ok){const Ee=`Failed to retrieve default branch from ${ft}, ${Bt.status} ${Bt.statusText}`;throw new Error(Ee)}let bt;if(yt)bt=(await Bt.json()).mainbranch.name;else{const{displayId:Ee}=await Bt.json();bt=Ee}if(!bt)throw new Error(`Failed to read default branch from ${ft}. Response ${Bt.status} ${Bt.json()}`);return bt}async function jt(Y,v){const{name:L,owner:J,ref:et,protocol:yt,resource:ft,filepath:Bt}=parseGitUrl(Y),bt=ft==="bitbucket.org";let Ee=et;Ee||(Ee=await mt(Y,v));const Xe=Bt?`&path=${encodeURIComponent(Bt)}`:"";return bt?`${yt}://${ft}/${J}/${L}/get/${Ee}.tar.gz`:`${v.apiBaseUrl}/projects/${J}/repos/${L}/archive?format=tgz&at=${Ee}&prefix=${J}-${L}${Xe}`}function Lt(Y,v){try{const{owner:L,name:J,ref:et,filepathtype:yt,filepath:ft}=parseGitUrl(Y);if(!L||!J||yt!=="browse"&&yt!=="raw"&&yt!=="src")throw new Error("Invalid Bitbucket URL or file path");const Bt=ft.replace(/^\//,"");if(v.host==="bitbucket.org"){if(!et)throw new Error("Invalid Bitbucket URL or file path");return`${v.apiBaseUrl}/repositories/${L}/${J}/src/${et}/${Bt}`}return`${v.apiBaseUrl}/projects/${L}/repos/${J}/raw/${Bt}?at=${et}`}catch(L){throw new Error(`Incorrect URL: ${Y}, ${L}`)}}function Kt(Y){const v={};if(Y.token)v.Authorization=`Bearer ${Y.token}`;else if(Y.username&&Y.appPassword){const L=Zt.from(`${Y.username}:${Y.appPassword}`,"utf8");v.Authorization=`Basic ${L.toString("base64")}`}return{headers:v}}const ae="github.com",qt="https://api.github.com",me="https://raw.githubusercontent.com";function le(Y){var ft,Bt;const v=(ft=Y.getOptionalString("host"))!=null?ft:ae;let L=Y.getOptionalString("apiBaseUrl"),J=Y.getOptionalString("rawBaseUrl");const et=Y.getOptionalString("token"),yt=(Bt=Y.getOptionalConfigArray("apps"))==null?void 0:Bt.map(bt=>({appId:bt.getNumber("appId"),clientId:bt.getString("clientId"),clientSecret:bt.getString("clientSecret"),webhookSecret:bt.getString("webhookSecret"),privateKey:bt.getString("privateKey"),allowedInstallationOwners:bt.getOptionalStringArray("allowedInstallationOwners")}));if(!h(v))throw new Error(`Invalid GitHub integration config, '${v}' is not a valid host`);return L?L=(0,l.trimEnd)(L,"/"):v===ae&&(L=qt),J?J=(0,l.trimEnd)(J,"/"):v===ae&&(J=me),{host:v,apiBaseUrl:L,rawBaseUrl:J,token:et,apps:yt}}function ce(Y){const v=Y.map(le);return v.some(L=>L.host===ae)||v.push({host:ae,apiBaseUrl:qt,rawBaseUrl:me}),v}function Ae(Y,v,L){try{const{owner:J,name:et,ref:yt,filepathtype:ft,filepath:Bt}=parseGitUrl(Y);if(!J||!et||!yt||ft!=="blob"&&ft!=="raw"&&ft!=="tree")throw new Error("Invalid GitHub URL or file path");const bt=Bt.replace(/^\//,"");return ye(v,L)==="api"?`${v.apiBaseUrl}/repos/${J}/${et}/contents/${bt}?ref=${yt}`:`${v.rawBaseUrl}/${J}/${et}/${yt}/${bt}`}catch(J){throw new Error(`Incorrect URL: ${Y}, ${J}`)}}function Me(Y,v){const L={};return ye(Y,v)==="api"&&(L.Accept="application/vnd.github.v3.raw"),v.token&&(L.Authorization=`token ${v.token}`),{headers:L}}function ye(Y,v){return Y.apiBaseUrl&&(v.token||!Y.rawBaseUrl)?"api":"raw"}class ve{constructor(){_(this,"tokenCache",new Map);_(this,"isNotExpired",v=>v.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(v,L){const J=this.tokenCache.get(v);if(J&&this.isNotExpired(J.expiresAt))return{accessToken:J.token};const et=await L();return this.tokenCache.set(v,et),{accessToken:et.token}}}const he={Accept:"application/vnd.github.machine-man-preview+json"};class Ne{constructor(v,L){_(this,"appClient");_(this,"baseUrl");_(this,"baseAuthConfig");_(this,"cache",new ve);_(this,"allowedInstallationOwners");this.allowedInstallationOwners=v.allowedInstallationOwners,this.baseUrl=L,this.baseAuthConfig={appId:v.appId,privateKey:v.privateKey.replace(/\\n/gm,`
31
- `)},this.appClient=new Octokit({baseUrl:L,headers:he,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(v,L){var ft;const{installationId:J,suspended:et}=await this.getInstallationData(v);if(this.allowedInstallationOwners&&!((ft=this.allowedInstallationOwners)==null?void 0:ft.includes(v)))throw new Error(`The GitHub application for ${v} is not included in the allowed installation list (${J}).`);if(et)throw new Error(`The GitHub application for ${v} is suspended`);const yt=L?`${v}/${L}`:v;return this.cache.getOrCreateToken(yt,async()=>{const Bt=await this.appClient.apps.createInstallationAccessToken({installation_id:J,headers:he});if(L&&Bt.data.repository_selection==="selected"){const bt=new Octokit({baseUrl:this.baseUrl,auth:Bt.data.token});if(!(await bt.paginate(bt.apps.listReposAccessibleToInstallation)).some(on=>on.name===L))throw new Error(`The Backstage GitHub application used in the ${v} organization does not have access to a repository with the name ${L}`)}return{token:Bt.data.token,expiresAt:DateTime.fromISO(Bt.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(v){const J=(await this.getInstallations()).find(yt=>{var ft,Bt;return((Bt=(ft=yt.account)==null?void 0:ft.login)==null?void 0:Bt.toLocaleLowerCase("en-US"))===v.toLocaleLowerCase("en-US")});if(J)return{installationId:J.id,suspended:Boolean(J.suspended_by)};const et=new Error(`No app installation found for ${v} in ${this.baseAuthConfig.appId}`);throw et.name="NotFoundError",et}}class Ue{constructor(v){_(this,"apps");var L,J;this.apps=(J=(L=v.apps)==null?void 0:L.map(et=>new Ne(et,v.apiBaseUrl)))!=null?J:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(L=>L.getInstallations()))).flat():[]}async getAppToken(v,L){if(this.apps.length===0)return;const J=await Promise.all(this.apps.map(Bt=>Bt.getInstallationCredentials(v,L).then(bt=>({credentials:bt,error:void 0}),bt=>({credentials:void 0,error:bt})))),et=J.find(Bt=>Bt.credentials);if(et)return et.credentials.accessToken;const ft=J.map(Bt=>Bt.error).find(Bt=>Bt.name!=="NotFoundError");if(ft)throw ft}}class Ie{constructor(v,L){this.githubAppCredentialsMux=v,this.token=L}async getCredentials(v){const L=parseGitUrl(v.url),J=L.owner||L.name,et=L.owner?L.name:void 0;let yt="app",ft=await this.githubAppCredentialsMux.getAppToken(J,et);return ft||(yt="token",ft=this.token),{headers:ft?{Authorization:`Bearer ${ft}`}:void 0,token:ft,type:yt}}}_(Ie,"create",null);const Ft=class{constructor(v){this.integrationConfig=v}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){return fe(u(v),"tree")}resolveEditUrl(v){return fe(v,"edit")}};let Le=Ft;_(Le,"factory",({config:v})=>{var J;const L=ce((J=v.getOptionalConfigArray("integrations.github"))!=null?J:[]);return s(L.map(et=>new Ft(et)),et=>et.config.host)});function fe(Y,v){return Y.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(L,J,et,yt)=>`//${J}/${et}/${yt}/${v}/`)}const Re="gitlab.com",ze="https://gitlab.com/api/v4";function xt(Y){const v=Y.getString("host");let L=Y.getOptionalString("apiBaseUrl");const J=Y.getOptionalString("token");let et=Y.getOptionalString("baseUrl");if(L?L=(0,l.trimEnd)(L,"/"):v===Re&&(L=ze),et?et=(0,l.trimEnd)(et,"/"):et=`https://${v}`,v.includes(":"))throw new Error(`Invalid GitLab integration config, host '${v}' should just be the host name (e.g. "github.com"), not a URL`);if(h(v)){if(!L||!c(L))throw new Error(`Invalid GitLab integration config, '${L}' is not a valid apiBaseUrl`);if(!c(et))throw new Error(`Invalid GitLab integration config, '${et}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${v}' is not a valid host`);return{host:v,token:J,apiBaseUrl:L,baseUrl:et}}function se(Y){const v=Y.map(xt);return v.some(L=>L.host===Re)||v.push({host:Re,apiBaseUrl:ze,baseUrl:`https://${Re}`}),v}async function ie(Y,v){if(Y.includes("/-/blob/")){const L=await B(Y,v);return P(Y,L).toString()}return R(Y).toString()}function F(Y){const{token:v=""}=Y;return{headers:{"PRIVATE-TOKEN":v}}}function R(Y){try{const v=new URL(Y),[L,J,et,yt,...ft]=v.pathname.split("/");if(L!==""||J===""||et===""||yt!=="blob"||!ft.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return v.pathname=[L,J,et,"raw",...ft].join("/"),v}catch(v){throw new Error(`Incorrect url: ${Y}, ${v}`)}}function P(Y,v){try{const L=new URL(Y),J=L.pathname.split("/-/blob/")[1],[et,...yt]=J.split("/");return L.pathname=["/api/v4/projects",v,"repository/files",encodeURIComponent(decodeURIComponent(yt.join("/"))),"raw"].join("/"),L.search=`?ref=${et}`,L}catch(L){throw new Error(`Incorrect url: ${Y}, ${L}`)}}async function B(Y,v){const L=new URL(Y);if(!L.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const J=L.pathname.split("/-/blob/")[0],et=new URL(`${L.protocol+L.hostname}/api/v4/projects/${encodeURIComponent(J.replace(/^\//,""))}`),yt=await fetch(et.toString(),F(v)),ft=await yt.json();if(!yt.ok)throw new Error(`GitLab Error '${ft.error}', ${ft.error_description}`);return Number(ft.id)}catch(J){throw new Error(`Could not get GitLab project ID for: ${Y}, ${J}`)}}const Qt=class{constructor(v){this.integrationConfig=v}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(v){return u(v)}resolveEditUrl(v){return q(v,"edit")}};let W=Qt;_(W,"factory",({config:v})=>{var J;const L=se((J=v.getOptionalConfigArray("integrations.gitlab"))!=null?J:[]);return s(L.map(et=>new Qt(et)),et=>et.config.host)});function q(Y,v){return Y.replace(/\/\-\/(blob|tree|edit)\//,`/-/${v}/`)}const ut="amazonaws.com";function st(Y){var bt;const v=Y.getOptionalString("endpoint"),L=(bt=Y.getOptionalBoolean("s3ForcePathStyle"))!=null?bt:!1;let J,et;if(v){try{const Ee=new URL(v);J=Ee.host,et=Ee.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${v}' is not a valid URL`)}if(et!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${v}'`)}else J=ut;const yt=Y.getOptionalString("accessKeyId"),ft=Y.getOptionalString("secretAccessKey"),Bt=Y.getOptionalString("roleArn");return{host:J,endpoint:v,s3ForcePathStyle:L,accessKeyId:yt,secretAccessKey:ft,roleArn:Bt}}function Tt(Y){const v=Y.map(st);return v.some(L=>L.host===ut)||v.push({host:ut}),v}const Xt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(v){this.integrationConfig=v}resolveUrl(v){return u(v)}resolveEditUrl(v){return v}};let wt=Xt;_(wt,"factory",({config:v})=>{var J;const L=Tt((J=v.getOptionalConfigArray("integrations.awsS3"))!=null?J:[]);return s(L.map(et=>new Xt(et)),et=>et.config.host)});class oe{constructor(v){_(this,"byType");this.byType=v}static fromConfig(v){return new oe({awsS3:wt.factory({config:v}),azure:S.factory({config:v}),bitbucket:ot.factory({config:v}),github:Le.factory({config:v}),gitlab:W.factory({config:v})})}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(v=>v.list())}byUrl(v){return Object.values(this.byType).map(L=>L.byUrl(v)).find(Boolean)}byHost(v){return Object.values(this.byType).map(L=>L.byHost(v)).find(Boolean)}resolveUrl(v){const L=this.byUrl(v.base);return L?L.resolveUrl(v):u(v)}resolveEditUrl(v){const L=this.byUrl(v);return L?L.resolveEditUrl(v):v}}},76241:function(X,o,t){"use strict";t.d(o,{CT:function(){return s},EI:function(){return y},uW:function(){return h},Vt:function(){return u}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const e=r(),l=m=>`__@backstage/${m}__`;function h(m,E){const i=l(m);let S=e[i];return S||(S=E(),e[i]=S,S)}var c=t(2784);function s(m){return h(m,()=>(0,c.createContext)(void 0))}function u(m){return(0,c.useContext)(s(m))}function d(m){return{set(E){globalThis[`__@backstage/${m}__`]=createContext(createVersionedValueMap(E))},reset(){delete globalThis[`__@backstage/${m}__`]}}}function y(m){return Object.freeze(m),{atVersion(E){return m[E]}}}},85653:function(X,o,t){"use strict";t.d(o,{AsyncEntityProvider:function(){return Zt},n3:function(){return e.n3},DefaultStarredEntitiesApi:function(){return m},EntityContext:function(){return V},EntityKindFilter:function(){return B},EntityLifecyclePicker:function(){return Ht},EntityListProvider:function(){return Le},EntityOwnerPicker:function(){return an},EntityRefLink:function(){return R},EntityRefLinks:function(){return P},EntityTable:function(){return Zn},EntityTagPicker:function(){return lr},EntityTypePicker:function(){return cr},FavoriteEntity:function(){return mr},UnregisterEntityDialog:function(){return Xr},UserListPicker:function(){return Nr},Ah:function(){return h},M4:function(){return j},wi:function(){return M},favoriteEntityIcon:function(){return zn},favoriteEntityTooltip:function(){return qn},formatEntityRefTitle:function(){return se},getEntityMetadataEditUrl:function(){return ve},getEntityMetadataViewUrl:function(){return ye},getEntityRelations:function(){return he},getEntitySourceLocation:function(){return Ne},isOwnerOf:function(){return Ue},starredEntitiesApiRef:function(){return E},useEntity:function(){return Kt},useEntityCompoundName:function(){return K},useEntityFromUrl:function(){return Lt},useEntityKinds:function(){return Vt},useEntityListProvider:function(){return fe},useOwnUser:function(){return Rt},useRelatedEntities:function(){return _t},useStarredEntities:function(){return Wt}});var r={};t.r(r),t.d(r,{createDomainColumn:function(){return Ze},createEntityRefColumn:function(){return Pn},createEntityRelationColumn:function(){return In},createMetadataDescriptionColumn:function(){return On},createOwnerColumn:function(){return ge},createSpecLifecycleColumn:function(){return Ve},createSpecTypeColumn:function(){return Un},createSystemColumn:function(){return sn}});var e=t(30001),l=t(36964);const h=(0,l.createApiRef)({id:"plugin.catalog.service"});var c=t(82394),s=t.n(c),u=t(52890),d=t(76635);async function y({storageApi:U}){var nt;const N=U.forBucket("settings"),$=U.forBucket("starredEntities"),k=N.get("starredEntities");if(!(0,d.isArray)(k))return;const ct=new Set((nt=$.get("entityRefs"))!=null?nt:[]);k.filter(d.isString).map(dt=>dt.split(":")).filter(dt=>dt.length===4&&dt[0]==="entity").map(([dt,Nt,kt,ne])=>(0,u.eE)({kind:Nt,namespace:kt,name:ne})).forEach(dt=>ct.add(dt)),await $.set("entityRefs",Array.from(ct)),await N.remove("starredEntities")}class m{constructor(N){_(this,"settingsStore");_(this,"starredEntities");_(this,"subscribers",new Set);_(this,"observable",new(s())(N=>(N.next(this.starredEntities),this.subscribers.add(N),()=>{this.subscribers.delete(N)})));var $;y(N).then(),this.settingsStore=N.storageApi.forBucket("starredEntities"),this.starredEntities=new Set(($=this.settingsStore.get("entityRefs"))!=null?$:[]),this.settingsStore.observe$("entityRefs").subscribe({next:k=>{var ct;this.starredEntities=new Set((ct=k.newValue)!=null?ct:[]),this.notifyChanges()}})}async toggleStarred(N){this.starredEntities.has(N)?this.starredEntities.delete(N):this.starredEntities.add(N),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}isStarred(N){return this.starredEntities.has(N)}notifyChanges(){for(const N of this.subscribers)N.next(this.starredEntities)}}const E=(0,l.createApiRef)({id:"catalog-react.starred-entities"});var i=t(2784),S=t(76241),b=t(10289),T=t(77446);const j=(0,l.createRouteRef)({id:"catalog"}),M=(0,l.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]});function I(U){var N,$;return{kind:U.kind.toLocaleLowerCase("en-US"),namespace:($=(N=U.metadata.namespace)==null?void 0:N.toLocaleLowerCase("en-US"))!=null?$:ENTITY_DEFAULT_NAMESPACE,name:U.metadata.name}}const K=()=>{const{kind:U,namespace:N,name:$}=(0,l.useRouteRefParams)(M);return{kind:U,namespace:N,name:$}},V=(0,i.createContext)({entity:void 0,loading:!0,error:void 0,refresh:()=>{}}),ot=V.Provider,vt=(0,S.CT)("entity-context"),Zt=({children:U,entity:N,loading:$,error:k,refresh:ct})=>{const nt={entity:N,loading:$,error:k,refresh:ct};return i.createElement(ot,{value:nt},i.createElement(vt.Provider,{value:(0,S.EI)({1:nt})},U))},mt=({entity:U,children:N})=>React.createElement(Zt,{entity:U,loading:!Boolean(U),error:void 0,refresh:void 0,children:N}),jt=({value:U,children:N})=>i.createElement(Zt,{...U,children:N});V.Provider=jt;const Lt=()=>{const{kind:U,namespace:N,name:$}=K(),k=(0,b.s0)(),ct=(0,l.useApi)(l.errorApiRef),nt=(0,l.useApi)(h),{value:dt,error:Nt,loading:kt,retry:ne}=(0,T.Z)(()=>nt.getEntityByName({kind:U,namespace:N,name:$}),[nt,U,N,$]);return(0,i.useEffect)(()=>{$||(ct.post(new Error("No name provided!")),k("/"))},[ct,k,Nt,kt,dt,$]),{entity:dt,loading:kt,error:Nt,refresh:ne}};function Kt(){const U=(0,S.Vt)("entity-context");if(!U)return{entity:void 0,loading:!0,error:void 0,refresh:()=>{}};const N=U.atVersion(1);if(!N)throw new Error("EntityContext v1 not available");const{entity:$,loading:k,error:ct,refresh:nt}=N;return{entity:$,loading:k,error:ct,refresh:nt}}var ae=t(19126),qt=t.n(ae),me=t(69294),le=t(48760),ce=t(90736);function Ae(U){return U.reduce((N,$)=>({...N,...$.getCatalogFilters?$.getCatalogFilters():{}}),{})}function Me(U){return N=>U.every($=>!$.filterEntity||$.filterEntity(N))}function ye(U){var N;return(N=U.metadata.annotations)==null?void 0:N[u.wh]}function ve(U){var N;return(N=U.metadata.annotations)==null?void 0:N[u.J1]}function he(U,N,$){var ct,nt;let k=((nt=(ct=U==null?void 0:U.relations)==null?void 0:ct.filter(dt=>dt.type===N))==null?void 0:nt.map(dt=>dt.target))||[];return($==null?void 0:$.kind)&&(k=k==null?void 0:k.filter(dt=>dt.kind.toLocaleLowerCase("en-US")===$.kind.toLocaleLowerCase("en-US"))),k}function Ne(U,N){var k;const $=(k=U.metadata.annotations)==null?void 0:k[u.wX];if(!!$)try{const ct=(0,u.Me)($),nt=N.byUrl(ct.target);return{locationTargetUrl:ct.target,integrationType:nt==null?void 0:nt.type}}catch{return}}function Ue(U,N){const $=new Set([...he(U,u.hr,{kind:"group"}),...U?[(0,u.C_)(U)]:[]].map(u.eE)),k=he(N,u.S4).map(u.eE);for(const ct of k)if($.has(ct))return!0;return!1}const Ie=(0,i.createContext)(void 0),Le=({children:U})=>{const N=(0,ce.default)(),$=(0,l.useApi)(h),[k,ct]=(0,i.useState)({}),[nt,dt]=(0,i.useState)(()=>{var Se;const $t=qt().parse(window.location.search,{ignoreQueryPrefix:!0});return{appliedFilters:{},entities:[],backendEntities:[],queryParameters:(Se=$t.filters)!=null?Se:{}}}),[{loading:Nt,error:kt},ne]=(0,me.default)(async()=>{var Ke;const $t=(0,d.compact)(Object.values(k)),Se=Me($t),Oe=Ae($t),be=Ae((0,d.compact)(Object.values(nt.appliedFilters))),ke=Object.keys(k).reduce((Je,ln)=>{const $e=k[ln];return($e==null?void 0:$e.toQueryValue)&&(Je[ln]=$e.toQueryValue()),Je},{});if((0,d.isEqual)(be,Oe))dt({appliedFilters:k,backendEntities:nt.backendEntities,entities:nt.backendEntities.filter(Se),queryParameters:ke});else{const Je=await $.getEntities({filter:Oe});dt({appliedFilters:k,backendEntities:Je.items,entities:Je.items.filter(Se),queryParameters:ke})}if(N()){const Je=qt().parse(window.location.search,{ignoreQueryPrefix:!0}),ln=qt().stringify({...Je,filters:ke},{addQueryPrefix:!0}),$e=`${window.location.pathname}${ln}`;(Ke=window.history)==null||Ke.replaceState(null,document.title,$e)}},[$,k,nt],{loading:!0});(0,le.Z)(ne,10,[k]);const Jt=(0,i.useCallback)($t=>{ct(Se=>{const Oe=typeof $t=="function"?$t(Se):$t;return{...Se,...Oe}})},[]),Ot=(0,i.useMemo)(()=>({filters:nt.appliedFilters,entities:nt.entities,backendEntities:nt.backendEntities,updateFilters:Jt,queryParameters:nt.queryParameters,loading:Nt,error:kt}),[nt,Jt,Nt,kt]);return i.createElement(Ie.Provider,{value:Ot},U)};function fe(){const U=(0,i.useContext)(Ie);if(!U)throw new Error("useEntityListProvider must be used within EntityListProvider");return U}var Re=t(64279),ze=t(18149),xt=t.n(ze);function se(U,N){const $=N==null?void 0:N.defaultKind;let k,ct,nt;return"metadata"in U?(k=U.kind,ct=U.metadata.namespace,nt=U.metadata.name):(k=U.kind,ct=U.namespace,nt=U.name),ct===u.sk&&(ct=void 0),k=k.toLocaleLowerCase("en-US"),`${(0,u.TH)({kind:$&&$.toLocaleLowerCase("en-US")===k?void 0:k,name:nt,namespace:ct})}`}var ie=t(41682),F=t(80030);const R=(0,i.forwardRef)((U,N)=>{var Oe;const{entityRef:$,defaultKind:k,title:ct,children:nt,...dt}=U,Nt=(0,l.useRouteRef)(M);let kt,ne,Jt;"metadata"in $?(kt=$.kind,ne=$.metadata.namespace,Jt=$.metadata.name):(kt=$.kind,ne=$.namespace,Jt=$.name),kt=kt.toLocaleLowerCase("en-US");const Ot={kind:kt,namespace:(Oe=ne==null?void 0:ne.toLocaleLowerCase("en-US"))!=null?Oe:u.sk,name:Jt},$t=se($,{defaultKind:k}),Se=i.createElement(ie.Link,{...dt,ref:N,to:Nt(Ot)},nt,!nt&&(ct!=null?ct:$t));return ct?i.createElement(F.ZP,{title:$t},Se):Se}),P=({entityRefs:U,defaultKind:N,...$})=>i.createElement(i.Fragment,null,U.map((k,ct)=>i.createElement(i.Fragment,{key:ct},ct>0&&", ",i.createElement(R,{...$,entityRef:k,defaultKind:N}))));class B{constructor(N){this.value=N}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class W{constructor(N){this.value=N}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class q{constructor(N){this.values=N}filterEntity(N){return this.values.every($=>{var k;return((k=N.metadata.tags)!=null?k:[]).includes($)})}toQueryValue(){return this.values}}class ut{constructor(N){this.value=N}filterEntity(N){var k;const $=this.value.toLocaleUpperCase("en-US");return N.metadata.name.toLocaleUpperCase("en-US").includes($)||`${N.metadata.title}`.toLocaleUpperCase("en-US").includes($)||((k=N.metadata.tags)==null?void 0:k.join("").toLocaleUpperCase("en-US").indexOf($))!==-1}}class st{constructor(N){this.values=N}filterEntity(N){return this.values.some($=>he(N,u.S4).some(k=>se(k,{defaultKind:"group"})===$))}toQueryValue(){return this.values}}class Tt{constructor(N){this.values=N}filterEntity(N){return this.values.some($=>{var k;return((k=N.spec)==null?void 0:k.lifecycle)===$})}toQueryValue(){return this.values}}class wt{constructor(N,$,k){this.value=N,this.isOwnedEntity=$,this.isStarredEntity=k}filterEntity(N){switch(this.value){case"owned":return this.isOwnedEntity(N);case"starred":return this.isStarredEntity(N);default:return!0}}toQueryValue(){return this.value}}function oe(){var be;const U=(0,l.useApi)(h),{filters:{kind:N,type:$},queryParameters:k,updateFilters:ct}=fe(),nt=[k.type].flat().filter(Boolean),[dt,Nt]=(0,i.useState)(nt.length?nt:(be=$==null?void 0:$.getTypes())!=null?be:[]),[kt,ne]=(0,i.useState)([]),Jt=(0,i.useMemo)(()=>N==null?void 0:N.value,[N]),{error:Ot,loading:$t,value:Se}=(0,Re.default)(async()=>Jt?await U.getEntities({filter:{kind:Jt},fields:["spec.type"]}).then(Ke=>Ke.items):[],[Jt,U]),Oe=(0,i.useRef)(Se);return(0,i.useEffect)(()=>{const ke=Oe.current;if(Oe.current=Se,$t||!Jt||ke===Se||!Se)return;const Ke=Se.reduce(($e,pn)=>{var we;if(typeof((we=pn.spec)==null?void 0:we.type)!="string")return $e;const Ln=pn.spec.type.toLocaleLowerCase("en-US");return $e[Ln]||($e[Ln]=0),$e[Ln]+=1,$e},{}),Je=Object.entries(Ke).sort(([,$e],[,pn])=>pn-$e).map(([$e])=>$e);ne(Je);const ln=dt.filter($e=>Je.includes($e));xt()(dt,ln)||Nt(ln)},[$t,Jt,dt,Nt,Se]),(0,i.useEffect)(()=>{ct({type:dt.length?new W(dt):void 0})},[dt,ct]),{loading:$t,error:Ot,availableTypes:kt,selectedTypes:dt,setSelectedTypes:Nt}}function Vt(){const U=(0,l.useApi)(h),{error:N,loading:$,value:k}=(0,Re.default)(async()=>{const ct=await U.getEntities({fields:["kind"]}).then(nt=>nt.items);return[...new Set(ct.map(nt=>nt.kind))].sort()});return{error:N,loading:$,kinds:k}}function Rt(){const U=(0,l.useApi)(h),N=(0,l.useApi)(l.identityApiRef);return(0,Re.default)(()=>U.getEntityByName({kind:"User",namespace:"default",name:N.getUserId()}),[U,N])}const Pt=20;function _t(U,{type:N,kind:$}){const k=(0,l.useApi)(h),{loading:ct,value:nt,error:dt}=(0,Re.default)(async()=>{const Nt=U.relations&&U.relations.filter(Ot=>(!N||Ot.type.toLocaleLowerCase("en-US")===N.toLocaleLowerCase("en-US"))&&(!$||Ot.target.kind.toLocaleLowerCase("en-US")===$.toLocaleLowerCase("en-US")));if(!Nt)return[];const kt=Object.values((0,d.groupBy)(Nt,({target:Ot})=>`${Ot.kind}:${Ot.namespace}`.toLocaleLowerCase("en-US"))),ne=[];for(const Ot of kt)ne.push({kind:Ot[0].target.kind,namespace:Ot[0].target.namespace,nameBatches:(0,d.chunk)(Ot.map($t=>$t.target.name),Pt)});return(await Promise.all(ne.flatMap(Ot=>Ot.nameBatches.map($t=>k.getEntities({filter:{kind:Ot.kind,"metadata.namespace":Ot.namespace,"metadata.name":$t}}))))).flatMap(Ot=>Ot.items)},[U,N]);return{entities:nt,loading:ct,error:dt}}var ht=t(72164);function St(U){return typeof U=="string"?U:(0,u.eE)(U)}function Wt(){const U=(0,l.useApi)(E),N=(0,ht.Z)(U.starredEntitie$(),new Set),$=(0,i.useCallback)(ct=>N.has(St(ct)),[N]),k=(0,i.useCallback)(ct=>U.toggleStarred(St(ct)).then(),[U]);return{starredEntities:N,toggleStarredEntity:k,isStarredEntity:$}}function zt(U){return typeof U=="string"?U:(0,u.eE)(U)}function Dt(U){const N=(0,l.useApi)(E),[$,k]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{const nt=N.starredEntitie$().subscribe({next(dt){k(dt.has(zt(U)))}});return()=>{nt.unsubscribe()}},[U,N]),{toggleStarredEntity:(0,i.useCallback)(()=>N.toggleStarred(zt(U)).then(),[U,N]),isStarredEntity:$}}var re=t(51949);function Ft(U){try{const N=(0,u.of)(U,{defaultKind:"User",defaultNamespace:"default"});return(0,u.eE)(N)}catch{return U}}async function Qt(U){const N=U.getUserId(),$=await U.getIdToken(),k=[];if(N&&k.push(Ft(N)),$)try{const ct=(0,re.Z)($);(ct==null?void 0:ct.ent)&&[ct.ent].flat().filter(nt=>typeof nt=="string").map(nt=>nt.toLocaleLowerCase("en-US")).forEach(nt=>k.push(nt))}catch{}return k}async function Xt(U,N){const $=new Array,k=N.find(ct=>ct.startsWith("user:"));if(k){const ct=await U.getEntityByName((0,u.of)(k));if(ct){const nt=he(ct,u.hr,{kind:"Group"});for(const dt of nt)$.push((0,u.eE)(dt))}}return $}function Y(){const U=(0,l.useApi)(l.identityApiRef),N=(0,l.useApi)(h),{loading:$,value:k}=(0,Re.default)(async()=>{const nt=await Qt(U),dt=await Xt(N,nt);return new Set([...nt,...dt])},[]),ct=(0,i.useMemo)(()=>{const nt=new Set(k!=null?k:[]);return dt=>{const Nt=("metadata"in dt?he(dt,u.S4):[dt]).map(u.eE);for(const kt of Nt)if(nt.has(kt))return!0;return!1}},[k]);return(0,i.useMemo)(()=>({loading:$,isOwnedEntity:ct}),[$,ct])}function v(U){const N=useApi(identityApiRef),$=useApi(catalogApiRef),{loading:k,value:ct}=useAsync(async()=>{const dt=await loadIdentityOwnerRefs(N),Nt=await loadCatalogOwnerRefs($,dt);return await $.getEntities(U?{filter:{kind:U,[`relations.${RELATION_OWNED_BY}`]:[...dt,...Nt]}}:{filter:{[`relations.${RELATION_OWNED_BY}`]:[...dt,...Nt]}})},[]),nt=useMemo(()=>ct,[ct]);return useMemo(()=>({loading:k,ownedEntities:nt}),[k,nt])}const L=({initialFilter:U,hidden:N})=>{var nt;const{updateFilters:$,queryParameters:k}=useEntityListProvider(),[ct]=useState((nt=[k.kind].flat()[0])!=null?nt:U);return useEffect(()=>{$({kind:ct?new EntityKindFilter(ct):void 0})},[ct,$]),N?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var J=t(79692),et=t(95544),yt=t(90436),ft=t(5806),Bt=t(21324),bt=t(86619),Ee=t(19996),Xe=t(25505),on=t(38016),lt=t(88013);const Z=(0,J.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),tt=i.createElement(Xe.Z,{fontSize:"small"}),gt=i.createElement(Ee.Z,{fontSize:"small"}),Ht=()=>{var ne,Jt;const U=Z(),{updateFilters:N,backendEntities:$,filters:k,queryParameters:ct}=fe(),nt=[ct.lifecycles].flat().filter(Boolean),[dt,Nt]=(0,i.useState)(nt.length?nt:(Jt=(ne=k.lifecycles)==null?void 0:ne.values)!=null?Jt:[]);(0,i.useEffect)(()=>{N({lifecycles:dt.length?new Tt(dt):void 0})},[dt,N]);const kt=(0,i.useMemo)(()=>[...new Set($.map(Ot=>{var $t;return($t=Ot.spec)==null?void 0:$t.lifecycle}).filter(Boolean))].sort(),[$]);return kt.length?i.createElement(et.Z,{pb:1,pt:1},i.createElement(yt.Z,{variant:"button"},"Lifecycle"),i.createElement(lt.ZP,{"aria-label":"Lifecycle",multiple:!0,options:kt,value:dt,onChange:(Ot,$t)=>Nt($t),renderOption:(Ot,{selected:$t})=>i.createElement(ft.Z,{control:i.createElement(Bt.Z,{icon:tt,checkedIcon:gt,checked:$t}),label:Ot}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Ot=>i.createElement(bt.Z,{...Ot,className:U.input,variant:"outlined"})})):null},te=(0,J.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),pe=i.createElement(Xe.Z,{fontSize:"small"}),Be=i.createElement(Ee.Z,{fontSize:"small"}),an=()=>{var ne,Jt;const U=te(),{updateFilters:N,backendEntities:$,filters:k,queryParameters:ct}=fe(),nt=[ct.owners].flat().filter(Boolean),[dt,Nt]=(0,i.useState)(nt.length?nt:(Jt=(ne=k.owners)==null?void 0:ne.values)!=null?Jt:[]);(0,i.useEffect)(()=>{N({owners:dt.length?new st(dt):void 0})},[dt,N]);const kt=(0,i.useMemo)(()=>[...new Set($.flatMap(Ot=>he(Ot,u.S4).map($t=>se($t,{defaultKind:"group"}))).filter(Boolean))].sort(),[$]);return kt.length?i.createElement(et.Z,{pb:1,pt:1},i.createElement(yt.Z,{variant:"button"},"Owner"),i.createElement(lt.ZP,{multiple:!0,"aria-label":"Owner",options:kt,value:dt,onChange:(Ot,$t)=>Nt($t),renderOption:(Ot,{selected:$t})=>i.createElement(ft.Z,{control:i.createElement(Bt.Z,{icon:pe,checkedIcon:Be,checked:$t}),label:Ot}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"owner-picker-expand"}),renderInput:Ot=>i.createElement(bt.Z,{...Ot,className:U.input,variant:"outlined"})})):null},hn=(0,J.Z)(U=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),Xn=()=>{var nt,dt;const U=hn(),{filters:N,updateFilters:$}=useEntityListProvider(),[k,ct]=useState((dt=(nt=N.text)==null?void 0:nt.value)!=null?dt:"");return useDebounce(()=>{$({text:k.length?new EntityTextFilter(k):void 0})},250,[k,$]),React.createElement(Toolbar,{className:U.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{id:"input-with-icon-adornment",className:U.input,placeholder:"Search",autoComplete:"off",onChange:Nt=>ct(Nt.target.value),value:k,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>ct(""),edge:"end",disabled:k.length===0},React.createElement(Clear,null)))})))};function Pn({defaultKind:U}){function N($){var k;return((k=$.metadata)==null?void 0:k.title)||se($,{defaultKind:U})}return{title:"Name",highlight:!0,customFilterAndSearch($,k){return N(k).includes($)},customSort($,k){return N($).localeCompare(N(k))},render:$=>{var k;return i.createElement(R,{entityRef:$,defaultKind:U,title:(k=$.metadata)==null?void 0:k.title})}}}function In({title:U,relation:N,defaultKind:$,filter:k}){function ct(dt){return he(dt,N,k)}function nt(dt){return ct(dt).map(Nt=>se(Nt,{defaultKind:$})).join(", ")}return{title:U,customFilterAndSearch(dt,Nt){return nt(Nt).includes(dt)},customSort(dt,Nt){return nt(dt).localeCompare(nt(Nt))},render:dt=>i.createElement(P,{entityRefs:ct(dt),defaultKind:$})}}function ge(){return In({title:"Owner",relation:u.S4,defaultKind:"group"})}function Ze(){return In({title:"Domain",relation:u.cz,defaultKind:"domain",filter:{kind:"domain"}})}function sn(){return In({title:"System",relation:u.cz,defaultKind:"system",filter:{kind:"system"}})}function On(){return{title:"Description",field:"metadata.description",render:U=>i.createElement(ie.OverflowTooltip,{text:U.metadata.description,placement:"bottom-start",line:2}),width:"auto"}}function Ve(){return{title:"Lifecycle",field:"spec.lifecycle"}}function Un(){return{title:"Type",field:"spec.type"}}const or=[Pn({defaultKind:"system"}),Ze(),ge(),On()],$n=[Pn({defaultKind:"component"}),sn(),ge(),Un(),Ve(),On()],Rr=(0,J.Z)(U=>({empty:{padding:U.spacing(2),display:"flex",justifyContent:"center"}}));function Zn({entities:U,title:N,emptyContent:$,variant:k="gridItem",columns:ct}){const nt=Rr(),dt={minWidth:"0",width:"100%"};return k==="gridItem"&&(dt.height="calc(100% - 10px)"),i.createElement(ie.Table,{columns:ct,title:N,style:dt,emptyContent:$&&i.createElement("div",{className:nt.empty},$),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:U})}Zn.columns=r,Zn.systemEntityColumns=or,Zn.componentEntityColumns=$n;const wn=(0,J.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),sr=i.createElement(Xe.Z,{fontSize:"small"}),ir=i.createElement(Ee.Z,{fontSize:"small"}),lr=()=>{var ne,Jt;const U=wn(),{updateFilters:N,backendEntities:$,filters:k,queryParameters:ct}=fe(),nt=[ct.tags].flat().filter(Boolean),[dt,Nt]=(0,i.useState)(nt.length?nt:(Jt=(ne=k.tags)==null?void 0:ne.values)!=null?Jt:[]);(0,i.useEffect)(()=>{N({tags:dt.length?new q(dt):void 0})},[dt,N]);const kt=(0,i.useMemo)(()=>[...new Set($.flatMap(Ot=>Ot.metadata.tags).filter(Boolean))].sort(),[$]);return kt.length?i.createElement(et.Z,{pb:1,pt:1},i.createElement(yt.Z,{variant:"button"},"Tags"),i.createElement(lt.ZP,{multiple:!0,"aria-label":"Tags",options:kt,value:dt,onChange:(Ot,$t)=>Nt($t),renderOption:(Ot,{selected:$t})=>i.createElement(ft.Z,{control:i.createElement(Bt.Z,{icon:sr,checkedIcon:ir,checked:$t}),label:Ot}),size:"small",popupIcon:i.createElement(on.Z,{"data-testid":"tag-picker-expand"}),renderInput:Ot=>i.createElement(bt.Z,{...Ot,className:U.input,variant:"outlined"})})):null};var kn=t(82108),Sr=t.n(kn);const cr=U=>{var ne;const{hidden:N,initialFilter:$}=U,k=(0,l.useApi)(l.alertApiRef),{error:ct,availableTypes:nt,selectedTypes:dt,setSelectedTypes:Nt}=oe();if((0,i.useEffect)(()=>{ct&&k.post({message:"Failed to load entity types",severity:"error"}),$&&Nt([$])},[ct,k,$,Nt]),nt.length===0||ct)return null;const kt=[{value:"all",label:"All"},...nt.map(Jt=>({value:Jt,label:Sr()(Jt)}))];return N?null:i.createElement(et.Z,{pb:1,pt:1},i.createElement(ie.Select,{label:"Type",items:kt,selected:(ne=kt.length>1?dt[0]:void 0)!=null?ne:"all",onChange:Jt=>Nt(Jt==="all"?[]:[String(Jt)])}))};var Wn=t(15459),Cr=t(61837),ur=t(11640),dr=t(28347);const fr=(0,Wn.Z)({root:{color:"#f3ba37"}})(ur.Z),qn=U=>U?"Remove from favorites":"Add to favorites",zn=U=>U?i.createElement(fr,null):i.createElement(dr.Z,null),mr=U=>{const{toggleStarredEntity:N,isStarredEntity:$}=Dt(U.entity);return i.createElement(Cr.Z,{color:"inherit",...U,onClick:()=>N()},i.createElement(F.ZP,{title:qn($)},zn($)))};var An=t(77277),gn=t(55999),Tr=t(85256),Pr=t(8629),hr=t(79249),tn=t(38724),Ir=t(49429),_n=t(99688);function Lr(U){var Se;const N=(0,l.useApi)(h),$=(Se=U.metadata.annotations)==null?void 0:Se[u.lb],k=U.metadata.uid,ct=$==="bootstrap:bootstrap",nt=(0,Re.default)(async()=>{const Oe=N.getOriginLocationByEntity(U);let be;if(!$)be=Promise.resolve([]);else{const ke=`metadata.annotations.${u.lb}`;be=N.getEntities({filter:{[ke]:$},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(Ke=>Ke.items)}return Promise.all([Oe,be]).then(([ke,Ke])=>({location:ke,colocatedEntities:Ke}))},[N,U]),dt=(0,i.useCallback)(async function(){const{location:be,colocatedEntities:ke}=nt.value;await N.removeLocationById(be.id),await Promise.allSettled(ke.map(Ke=>N.removeEntityByUid(Ke.metadata.uid)))},[N,nt]),Nt=(0,i.useCallback)(async function(){await N.removeEntityByUid(k)},[N,k]);if(ct)return{type:"bootstrap",location:$,deleteEntity:Nt};const{loading:kt,error:ne,value:Jt}=nt;if(kt)return{type:"loading"};if(ne)return{type:"error",error:ne};const{location:Ot,colocatedEntities:$t}=Jt;return Ot?{type:"unregister",location:$,colocatedEntities:$t.map(u.C_),unregisterLocation:dt,deleteEntity:Nt}:{type:"only-delete",deleteEntity:Nt}}var Or=t(10179);const xr=(0,J.Z)({advancedButton:{fontSize:"0.7em"}}),Dr=({entity:U,onConfirm:N})=>{var Se;const $=(0,l.useApi)(l.alertApiRef),k=(0,l.useApi)(l.configApiRef),ct=xr(),nt=Lr(U),[dt,Nt]=(0,i.useState)(!1),[kt,ne]=(0,i.useState)(!1),Jt=(Se=k.getOptionalString("app.title"))!=null?Se:"Backstage",Ot=(0,i.useCallback)(async function(){if("unregisterLocation"in nt){ne(!0);try{await nt.unregisterLocation(),N()}catch(be){(0,Or.BD)(be),$.post({message:be.message})}finally{ne(!1)}}},[$,N,nt]),$t=(0,i.useCallback)(async function(){if("deleteEntity"in nt){ne(!0);try{await nt.deleteEntity(),N()}catch(be){(0,Or.BD)(be),$.post({message:be.message})}finally{ne(!1)}}},[$,N,nt]);return nt.type==="loading"?i.createElement(ie.Progress,null):nt.type==="error"?i.createElement(ie.ResponseErrorPanel,{error:nt.error}):nt.type==="bootstrap"?i.createElement(i.Fragment,null,i.createElement(_n.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',nt.location,'"). If you believe this is in error, please contact the ',Jt," ","integrator."),i.createElement(et.Z,{marginTop:2},!dt&&i.createElement(An.Z,{variant:"text",size:"small",color:"primary",className:ct.advancedButton,onClick:()=>Nt(!0)},"Advanced Options"),dt&&i.createElement(i.Fragment,null,i.createElement(gn.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."),i.createElement(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:$t},"Delete Entity")))):nt.type==="only-delete"?i.createElement(i.Fragment,null,i.createElement(gn.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."),i.createElement(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:$t},"Delete Entity")):nt.type==="unregister"?i.createElement(i.Fragment,null,i.createElement(gn.Z,null,"This action will unregister the following entities:"),i.createElement(gn.Z,{component:"ul"},nt.colocatedEntities.map(Oe=>i.createElement("li",{key:`${Oe.kind}:${Oe.namespace}/${Oe.name}`},i.createElement(R,{entityRef:Oe})))),i.createElement(gn.Z,null,"Located at the following location:"),i.createElement(gn.Z,{component:"ul"},i.createElement("li",null,nt.location)),i.createElement(gn.Z,null,"To undo, just re-register the entity in ",Jt,"."),i.createElement(et.Z,{marginTop:2},i.createElement(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:Ot},"Unregister Location"),!dt&&i.createElement(et.Z,{component:"span",marginLeft:2},i.createElement(An.Z,{variant:"text",size:"small",color:"primary",className:ct.advancedButton,onClick:()=>Nt(!0)},"Advanced Options"))),dt&&i.createElement(i.Fragment,null,i.createElement(et.Z,{paddingTop:4,paddingBottom:4},i.createElement(Tr.Z,null)),i.createElement(gn.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."),i.createElement(An.Z,{variant:"contained",color:"secondary",disabled:kt,onClick:$t},"Delete Entity"))):i.createElement(_n.Z,{severity:"error"},"Internal error: Unknown state")},Xr=({open:U,onConfirm:N,onClose:$,entity:k})=>i.createElement(Pr.Z,{open:U,onClose:$},i.createElement(hr.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),i.createElement(tn.Z,null,i.createElement(Dr,{entity:k,onConfirm:N})),i.createElement(Ir.Z,null,i.createElement(An.Z,{onClick:$,color:"primary"},"Cancel")));var Fr=t(94339),Br=t(11776),kr=t(12231),br=t(86136),Mr=t(49378),Bn=t(9520),gr=t(47603);const pr=(0,J.Z)(U=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:U.spacing(1,0,1,0)},title:{margin:U.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:U.palette.text.primary},menuItem:{minHeight:U.spacing(6)},groupWrapper:{margin:U.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function yr(U){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:gr.Z},{id:"starred",label:"Starred",icon:ur.Z}]},{name:U!=null?U:"Company",items:[{id:"all",label:"All"}]}]}const Nr=({initialFilter:U,availableFilters:N})=>{var pn,Ln;const $=pr(),ct=(pn=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?pn:"Company",{filters:nt,updateFilters:dt,backendEntities:Nt,queryParameters:kt}=fe(),ne=["starred","all"],Jt=yr(ct).map(we=>({...we,items:we.items.filter(({id:Ge})=>["group","user"].some(bn=>bn===kt.kind)?ne.includes(Ge):!N||N.includes(Ge))})).filter(({items:we})=>!!we.length),{isStarredEntity:Ot}=Wt(),{isOwnedEntity:$t}=Y(),Se=(0,i.useMemo)(()=>new wt("owned",$t,Ot),[$t,Ot]),Oe=(0,i.useMemo)(()=>new wt("starred",$t,Ot),[$t,Ot]),[be,ke]=(0,i.useState)(Nt),Ke=be.filter(we=>Se.filterEntity(we)).length,[Je,ln]=(0,i.useState)(Ke>0?(Ln=[kt.user].flat()[0])!=null?Ln:U:"all");(0,i.useEffect)(()=>{dt({user:Je?new wt(Je,$t,Ot):void 0})},[Je,$t,Ot,dt]),(0,i.useEffect)(()=>{const we=Me((0,d.compact)(Object.values({...nt,user:void 0})));ke(Nt.filter(we))},[nt,Nt]);function $e(we){switch(we){case"owned":return Ke;case"starred":return be.filter(Ge=>Oe.filterEntity(Ge)).length;default:return be.length}}return i.createElement(Fr.Z,{className:$.root},Jt.map(we=>i.createElement(i.Fragment,{key:we.name},i.createElement(yt.Z,{variant:"subtitle2",className:$.title},we.name),i.createElement(Fr.Z,{className:$.groupWrapper},i.createElement(Br.Z,{disablePadding:!0,dense:!0},we.items.map(Ge=>{var bn,Hn;return i.createElement(kr.Z,{key:Ge.id,button:!0,divider:!0,onClick:()=>ln(Ge.id),selected:Ge.id===((bn=nt.user)==null?void 0:bn.value),className:$.menuItem},Ge.icon&&i.createElement(br.Z,{className:$.listIcon},i.createElement(Ge.icon,{fontSize:"small"})),i.createElement(Mr.Z,null,i.createElement(yt.Z,{variant:"body1","data-testid":`user-picker-${Ge.id}`},Ge.label)),i.createElement(Bn.Z,null,(Hn=$e(Ge.id))!=null?Hn:"-"))}))))))},Ur=({children:U,value:N})=>{var kt;const[$,k]=useState((kt=N==null?void 0:N.filters)!=null?kt:{}),ct=useCallback(ne=>{k(Jt=>{const Ot=typeof ne=="function"?ne(Jt):ne;return{...Jt,...Ot}})},[]),nt={entities:[],backendEntities:[],updateFilters:ct,filters:$,loading:!1,queryParameters:{}},{filters:dt,...Nt}=N!=null?N:{};return React.createElement(EntityListContext.Provider,{value:{...nt,...Nt}},U)};var Er=t(92787)},92787:function(){},39398:function(X,o,t){"use strict";t.r(o),t.d(o,{AboutCard:function(){return Zt},AboutContent:function(){return ot},AboutField:function(){return K}});var r=t(52890),e=t(41682),l=t(36964),h=t(36356),c=t(85653),s=t(79692),u=t(94339),d=t(32552),y=t(61837),m=t(85256),E=t(24579),i=t(52866),S=t(30254),b=t(27604),T=t(2784),G=t(47851),j=t(60905),D=t(90436),M=t(7089);const I=(0,s.Z)(mt=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:mt.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}})),K=({label:mt,value:jt,gridSizes:Lt,children:Kt})=>{const ae=I(),qt=(0,l.useElementFilter)(Kt,le=>le.getElements()),me=qt.length>0?qt:T.createElement(D.Z,{variant:"body2",className:ae.value},jt||"unknown");return T.createElement(j.Z,{item:!0,...Lt},T.createElement(D.Z,{variant:"subtitle2",className:ae.label},mt),me)},V=(0,s.Z)({description:{wordBreak:"break-word"}}),ot=({entity:mt})=>{var he,Ne,Ue,Ie,Le,fe;const jt=V(),Lt=mt.kind.toLocaleLowerCase("en-US")==="system",Kt=mt.kind.toLocaleLowerCase("en-US")==="resource",ae=mt.kind.toLocaleLowerCase("en-US")==="component",qt=mt.kind.toLocaleLowerCase("en-US")==="api",me=mt.kind.toLocaleLowerCase("en-US")==="template",le=mt.kind.toLocaleLowerCase("en-US")==="location",ce=mt.kind.toLocaleLowerCase("en-US")==="group",Ae=(0,c.getEntityRelations)(mt,r.cz,{kind:"system"}),Me=(0,c.getEntityRelations)(mt,r.cz,{kind:"component"}),ye=(0,c.getEntityRelations)(mt,r.cz,{kind:"domain"}),ve=(0,c.getEntityRelations)(mt,r.S4);return T.createElement(j.Z,{container:!0},T.createElement(K,{label:"Description",gridSizes:{xs:12}},T.createElement(D.Z,{variant:"body2",paragraph:!0,className:jt.description},((he=mt==null?void 0:mt.metadata)==null?void 0:he.description)||"No description")),T.createElement(K,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},ve.length>0&&T.createElement(c.EntityRefLinks,{entityRefs:ve,defaultKind:"group"})),(Lt||ye.length>0)&&T.createElement(K,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},ye.length>0&&T.createElement(c.EntityRefLinks,{entityRefs:ye,defaultKind:"domain"})),(qt||ae||Kt||Ae.length>0)&&T.createElement(K,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ae.length>0&&T.createElement(c.EntityRefLinks,{entityRefs:Ae,defaultKind:"system"})),ae&&Me.length>0&&T.createElement(K,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},T.createElement(c.EntityRefLinks,{entityRefs:Me,defaultKind:"component"})),(qt||ae||Kt||me||ce||le||typeof((Ne=mt==null?void 0:mt.spec)==null?void 0:Ne.type)=="string")&&T.createElement(K,{label:"Type",value:(Ue=mt==null?void 0:mt.spec)==null?void 0:Ue.type,gridSizes:{xs:12,sm:6,lg:4}}),(qt||ae||typeof((Ie=mt==null?void 0:mt.spec)==null?void 0:Ie.lifecycle)=="string")&&T.createElement(K,{label:"Lifecycle",value:(Le=mt==null?void 0:mt.spec)==null?void 0:Le.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),T.createElement(K,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((fe=mt==null?void 0:mt.metadata)==null?void 0:fe.tags)||[]).map(Re=>T.createElement(M.Z,{key:Re,size:"small",label:Re}))))},vt=(0,s.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 Zt({variant:mt}){var Ie,Le;const jt=vt(),{entity:Lt}=(0,c.useEntity)(),Kt=(0,l.useApi)(h.q3),ae=(0,l.useApi)(c.Ah),qt=(0,l.useApi)(l.alertApiRef),me=(0,l.useRouteRef)(G.j),le=(0,c.getEntitySourceLocation)(Lt,Kt),ce=(0,c.getEntityMetadataEditUrl)(Lt),Ae={label:"View Source",disabled:!le,icon:T.createElement(h.nW,{type:le==null?void 0:le.integrationType}),href:le==null?void 0:le.locationTargetUrl},Me={label:"View TechDocs",disabled:!((Ie=Lt.metadata.annotations)==null?void 0:Ie["backstage.io/techdocs-ref"])||!me,icon:T.createElement(S.Z,null),href:me&&me({namespace:Lt.metadata.namespace||r.sk,kind:Lt.kind,name:Lt.metadata.name})};let ye="";mt==="gridItem"?ye=jt.gridItemCard:mt==="fullHeight"&&(ye=jt.fullHeightCard);let ve="";mt==="gridItem"?ve=jt.gridItemCardContent:mt==="fullHeight"&&(ve=jt.fullHeightCardContent);const he=(Le=Lt.metadata.annotations)==null?void 0:Le[r.Jl],Ne=(he==null?void 0:he.startsWith("url:"))||(he==null?void 0:he.startsWith("file:")),Ue=(0,T.useCallback)(async()=>{await ae.refreshEntity((0,r.eE)(Lt)),qt.post({message:"Refresh scheduled",severity:"info"})},[ae,qt,Lt]);return T.createElement(u.Z,{className:ye},T.createElement(d.Z,{title:"About",action:T.createElement(T.Fragment,null,Ne&&T.createElement(y.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ue},T.createElement(i.Z,null)),T.createElement(y.Z,{component:e.Link,"aria-label":"Edit",disabled:!ce,title:"Edit Metadata",to:ce!=null?ce:"#"},T.createElement(b.Z,null))),subheader:T.createElement(e.HeaderIconLinkRow,{links:[Ae,Me]})}),T.createElement(m.Z,null),T.createElement(E.Z,{className:ve},T.createElement(ot,{entity:Lt})))}},49782:function(X,o,t){"use strict";t.d(o,{K:function(){return m}});var r=t(2784),e=t(79692),l=t(12420),h=t(97580),c=t(73698),s=t(74603),u=t(12231),d=t(85653);const y=(0,e.Z)(E=>(0,l.Z)({root:{...E.typography.h4}})),m=({initialFilter:E="component"})=>{var M;const i=y(),{kinds:S=[]}=(0,d.useEntityKinds)(),{updateFilters:b,queryParameters:T}=(0,d.useEntityListProvider)(),[G,j]=(0,r.useState)(((M=[T.kind].flat()[0])!=null?M:E).toLocaleLowerCase("en-US"));(0,r.useEffect)(()=>{b({kind:G?new d.EntityKindFilter(G):void 0})},[G,b]);const D=[(0,h.Z)(G)].concat(S).sort().reduce((I,K)=>(I[K.toLocaleLowerCase("en-US")]=K,I),{});return r.createElement(c.Z,{input:r.createElement(s.Z,{value:G}),value:G,onChange:I=>j(I.target.value),classes:i},Object.keys(D).map(I=>r.createElement(u.Z,{value:I,key:I},`${D[I]}s`)))}},7758:function(X,o,t){"use strict";t.r(o),t.d(o,{CatalogPage:function(){return E},DefaultCatalogPage:function(){return m}});var r=t(2784),e=t(10289),l=t(41682),h=t(36964),c=t(85653),s=t(47851),u=t(91730),d=t(26997),y=t(49782);const m=({columns:i,actions:S,initiallySelectedFilter:b="owned"})=>{var j;const T=(j=(0,h.useApi)(h.configApiRef).getOptionalString("organization.name"))!=null?j:"Backstage",G=(0,h.useRouteRef)(s.y);return r.createElement(l.PageWithHeader,{title:`${T} Catalog`,themeId:"home"},r.createElement(c.EntityListProvider,null,r.createElement(l.Content,null,r.createElement(l.ContentHeader,{titleComponent:r.createElement(y.K,null)},r.createElement(l.CreateButton,{title:"Create Component",to:G&&G()}),r.createElement(l.SupportButton,null,"All your software catalog entities")),r.createElement(d.q7,null,r.createElement(d.Gh,null,r.createElement(c.EntityTypePicker,null),r.createElement(c.UserListPicker,{initialFilter:b}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityLifecyclePicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(d.Nz,null,r.createElement(u.E,{columns:i,actions:S}))))))},E=i=>(0,e.pC)()||r.createElement(m,{...i})},17499:function(X,o,t){"use strict";t.r(o),t.d(o,{createNameColumn:function(){return c},createSystemColumn:function(){return s},createOwnerColumn:function(){return u},createSpecTypeColumn:function(){return d},createSpecLifecycleColumn:function(){return y},createMetadataDescriptionColumn:function(){return m},createTagsColumn:function(){return E}});var r=t(2784),e=t(85653),l=t(7089),h=t(41682);function c(i){function S(b){var T;return((T=b.metadata)==null?void 0:T.title)||(0,e.formatEntityRefTitle)(b,{defaultKind:i==null?void 0:i.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:b},{entity:T}){return S(b).localeCompare(S(T))},render:({entity:b})=>{var T;return r.createElement(e.EntityRefLink,{entityRef:b,defaultKind:(i==null?void 0:i.defaultKind)||"Component",title:(T=b.metadata)==null?void 0:T.title})}}}function s(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:i})=>r.createElement(e.EntityRefLinks,{entityRefs:i.partOfSystemRelations,defaultKind:"system"})}}function u(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:i})=>r.createElement(e.EntityRefLinks,{entityRefs:i.ownedByRelations,defaultKind:"group"})}}function d(){return{title:"Type",field:"entity.spec.type",hidden:!0}}function y(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}}function m(){return{title:"Description",field:"entity.metadata.description",render:({entity:i})=>r.createElement(h.OverflowTooltip,{text:i.metadata.description,placement:"bottom-start"}),width:"auto"}}function E(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:i})=>r.createElement(r.Fragment,null,i.metadata.tags&&i.metadata.tags.map(S=>r.createElement(l.Z,{key:S,label:S,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}},91730:function(X,o,t){"use strict";t.d(o,{E:function(){return y}});var r=t(52890),e=t(85653),l=t(27604),h=t(2997),c=t(76635),s=t(2784),u=t(17499),d=t(41682);const y=({columns:m,actions:E})=>{var Zt,mt,jt;const{isStarredEntity:i,toggleStarredEntity:S}=(0,e.useStarredEntities)(),{loading:b,error:T,entities:G,filters:j}=(0,e.useEntityListProvider)(),D=(0,s.useMemo)(()=>{var Lt;return[u.createNameColumn({defaultKind:(Lt=j.kind)==null?void 0:Lt.value}),u.createSystemColumn(),u.createOwnerColumn(),u.createSpecTypeColumn(),u.createSpecLifecycleColumn(),u.createMetadataDescriptionColumn(),u.createTagsColumn()]},[(Zt=j.kind)==null?void 0:Zt.value]),M=j.type===void 0,I=(0,c.capitalize)((jt=(mt=j.user)==null?void 0:mt.value)!=null?jt:"all");if(T)return s.createElement("div",null,s.createElement(d.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},s.createElement(d.CodeSnippet,{language:"text",text:T.toString()})));const K=[({entity:Lt})=>{const Kt=(0,e.getEntityMetadataViewUrl)(Lt);return{icon:()=>s.createElement(h.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Kt,onClick:()=>{!Kt||window.open(Kt,"_blank")}}},({entity:Lt})=>{const Kt=(0,e.getEntityMetadataEditUrl)(Lt);return{icon:()=>s.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Kt,onClick:()=>{!Kt||window.open(Kt,"_blank")}}},({entity:Lt})=>{const Kt=i(Lt);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,e.favoriteEntityIcon)(Kt),tooltip:(0,e.favoriteEntityTooltip)(Kt),onClick:()=>S(Lt)}}],V=G.map(Lt=>{const Kt=(0,e.getEntityRelations)(Lt,r.cz,{kind:"system"}),ae=(0,e.getEntityRelations)(Lt,r.S4);return{entity:Lt,resolved:{name:(0,e.formatEntityRefTitle)(Lt,{defaultKind:"Component"}),ownedByRelationsTitle:ae.map(qt=>(0,e.formatEntityRefTitle)(qt,{defaultKind:"group"})).join(", "),ownedByRelations:ae,partOfSystemRelationTitle:Kt.map(qt=>(0,e.formatEntityRefTitle)(qt,{defaultKind:"system"})).join(", "),partOfSystemRelations:Kt}}}),ot=(m||D).find(Lt=>Lt.title==="Type");ot&&(ot.hidden=!M);const vt=V.length>20;return s.createElement(d.Table,{isLoading:b,columns:m||D,options:{paging:vt,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!b,padding:"dense",pageSizeOptions:[20,50,100]},title:`${I} (${G.length})`,data:V,actions:E||K})};y.columns=u},26997:function(X,o,t){"use strict";t.d(o,{Nz:function(){return i},Gh:function(){return E},q7:function(){return l}});var r=t(60905),e=t(2784);const l=({children:S})=>e.createElement(r.Z,{container:!0,style:{position:"relative"}},S);var h=t(41156),c=t(60364),s=t(77277),u=t(4190),d=t(95544),y=t(90436),m=t(36444);const E=({children:S})=>{const b=(0,h.Z)(D=>D.breakpoints.down("md")),T=(0,c.Z)(),[G,j]=(0,e.useState)(!1);return b?e.createElement(e.Fragment,null,e.createElement(s.Z,{style:{marginTop:T.spacing(1),marginLeft:T.spacing(1)},onClick:()=>j(!0),startIcon:e.createElement(m.Z,null)},"Filters"),e.createElement(u.ZP,{open:G,onClose:()=>j(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},e.createElement(d.Z,{m:2},e.createElement(y.Z,{variant:"h6",component:"h2",style:{marginBottom:T.spacing(1)}},"Filters"),S))):e.createElement(r.Z,{item:!0,lg:2},S)},i=({children:S})=>e.createElement(r.Z,{item:!0,xs:12,lg:10},S)},47851:function(X,o,t){"use strict";t.d(o,{y:function(){return e},j:function(){return l}});var r=t(36964);const e=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]})},91512:function(X,o,t){"use strict";t.d(o,{g:function(){return c},w:function(){return s}});var r=t(36964),e=t(10179),l=t(19126),h=t.n(l);const c=(0,r.createApiRef)({id:"plugin.search.queryservice"});class s{constructor(d){_(this,"discoveryApi");_(this,"identityApi");this.discoveryApi=d.discoveryApi,this.identityApi=d.identityApi}async query(d){const y=await this.identityApi.getIdToken(),m=h().stringify(d),E=`${await this.discoveryApi.getBaseUrl("search/query")}?${m}`,i=await fetch(E,{headers:y?{Authorization:`Bearer ${y}`}:{}});if(!i.ok)throw await e.VL.fromResponse(i);return i.json()}}},19941:function(X,o,t){"use strict";t.r(o),t.d(o,{DefaultResultListItem:function(){return d}});var r=t(2784),e=t(38402),l=t(86136),h=t(49378),c=t(95544),s=t(85256),u=t(41682);const d=({result:y,icon:m,secondaryAction:E})=>r.createElement(u.Link,{to:y.location},r.createElement(e.Z,{alignItems:"center"},m&&r.createElement(l.Z,null,m),r.createElement(h.Z,{primaryTypographyProps:{variant:"h6"},primary:y.title,secondary:y.text}),E&&r.createElement(c.Z,{alignItems:"flex-end"},E)),r.createElement(s.Z,null))},1795:function(X,o,t){"use strict";t.r(o),t.d(o,{SearchBar:function(){return S},SearchBarBase:function(){return i}});var r=t(2784),e=t(48760),l=t(36964),h=t(50581),c=t(61837),s=t(74603),u=t(21853),d=t(33375),y=t(22313);const m=({children:b})=>{const T=(0,l.useAnalytics)(),{term:G}=(0,y.Rx)();return(0,r.useEffect)(()=>{G&&T.captureEvent("search",G)},[T,G]),r.createElement(r.Fragment,null,b)},E=()=>(0,r.useContext)(y.ci)!==void 0,i=({onChange:b,onKeyDown:T,onSubmit:G,debounceTime:j=200,clearButton:D=!0,fullWidth:M=!0,value:I,inputProps:K={},endAdornment:V,...ot})=>{const vt=(0,l.useApi)(l.configApiRef),[Zt,mt]=(0,r.useState)(I),jt=E();(0,r.useEffect)(()=>{mt(Ae=>Ae!==I?I:Ae)},[I]),(0,e.Z)(()=>b(Zt),j,[Zt]);const Lt=(0,r.useCallback)(Ae=>{mt(Ae.target.value)},[mt]),Kt=(0,r.useCallback)(Ae=>{T&&T(Ae),G&&Ae.key==="Enter"&&G()},[T,G]),ae=(0,r.useCallback)(()=>{b("")},[b]),qt=`Search in ${vt.getOptionalString("app.title")||"Backstage"}`,me=r.createElement(h.Z,{position:"start"},r.createElement(c.Z,{"aria-label":"Query",disabled:!0},r.createElement(u.Z,null))),le=r.createElement(h.Z,{position:"end"},r.createElement(c.Z,{"aria-label":"Clear",onClick:ae},r.createElement(d.Z,null))),ce=r.createElement(m,null,r.createElement(s.Z,{"data-testid":"search-bar-next",value:Zt,placeholder:qt,startAdornment:me,endAdornment:D?le:V,inputProps:{"aria-label":"Search",...K},fullWidth:M,onChange:Lt,onKeyDown:Kt,...ot}));return jt?ce:r.createElement(y.Nd,null,ce)},S=({onChange:b,...T})=>{const{term:G,setTerm:j}=(0,y.Rx)(),D=M=>{b?b(M):j(M)};return r.createElement(i,{value:G,onChange:D,...T})}},22313:function(X,o,t){"use strict";t.d(o,{ci:function(){return s},Nd:function(){return u},Rx:function(){return d}});var r=t(36964),e=t(2784),l=t(64279),h=t(1849),c=t(91512);const s=(0,e.createContext)(void 0),u=({initialState:y={term:"",pageCursor:void 0,filters:{},types:[]},children:m})=>{var ae,qt,me,le;const E=(0,r.useApi)(c.g),[i,S]=(0,e.useState)(y.pageCursor),[b,T]=(0,e.useState)(y.filters),[G,j]=(0,e.useState)(y.term),[D,M]=(0,e.useState)(y.types),[I,K]=(0,e.useState)(!1),V=(0,e.useCallback)(()=>K(ce=>!ce),[]),ot=(0,h.Z)(G),vt=(0,l.default)(()=>E.query({term:G,filters:b,pageCursor:i,types:D}),[G,b,D,i]),Zt=!vt.loading&&!vt.error&&((ae=vt.value)==null?void 0:ae.nextPageCursor),mt=!vt.loading&&!vt.error&&((qt=vt.value)==null?void 0:qt.previousPageCursor),jt=(0,e.useCallback)(()=>{var ce;S((ce=vt.value)==null?void 0:ce.nextPageCursor)},[(me=vt.value)==null?void 0:me.nextPageCursor]),Lt=(0,e.useCallback)(()=>{var ce;S((ce=vt.value)==null?void 0:ce.previousPageCursor)},[(le=vt.value)==null?void 0:le.previousPageCursor]);(0,e.useEffect)(()=>{G&&ot&&G!==ot&&S(void 0)},[G,ot,y.pageCursor]);const Kt={result:vt,filters:b,setFilters:T,open:I,toggleModal:V,term:G,setTerm:j,types:D,setTypes:M,pageCursor:i,setPageCursor:S,fetchNextPage:Zt?jt:void 0,fetchPreviousPage:mt?Lt:void 0};return e.createElement(r.AnalyticsContext,{attributes:{searchTypes:D.sort().join(",")}},e.createElement(s.Provider,{value:Kt,children:m}))},d=()=>{const y=(0,e.useContext)(s);if(y===void 0)throw new Error("useSearch must be used within a SearchContextProvider");return y}},65678:function(X,o,t){"use strict";t.d(o,{s:function(){return V}});var r=t(2784),e=t(8629),l=t(79249),h=t(27556),c=t(38724),s=t(60905),u=t(85256),d=t(11776),y=t(49429),m=t(69001),E=t(79692),i=t(1795),S=t(19941),b=t(39332),T=t(22313),G=t(8542),j=t(36964),D=t(41682),M=t(20863);const I=(0,E.Z)(ot=>({container:{borderRadius:30,display:"flex",height:"2.4em"},input:{flex:1},paperFullWidth:{height:"calc(100% - 128px)"},dialogActionsContainer:{padding:ot.spacing(1,3)},viewResultsLink:{verticalAlign:"0.5em"}})),K=({open:ot=!0,toggleModal:vt})=>{const Zt=(0,j.useRouteRef)(M._Z),mt=I(),{term:jt}=(0,T.Rx)(),Lt=()=>{vt()},Kt=()=>{Lt()};return r.createElement(e.Z,{classes:{paperFullWidth:mt.paperFullWidth},onClose:vt,"aria-labelledby":"search-modal-title",open:ot,fullWidth:!0,maxWidth:"lg"},r.createElement(l.Z,null,r.createElement(h.Z,{className:mt.container},r.createElement(i.SearchBar,{className:mt.input}))),r.createElement(c.Z,null,r.createElement(s.Z,{container:!0,direction:"row-reverse",justifyContent:"flex-start",alignItems:"center"},r.createElement(s.Z,{item:!0},r.createElement(D.Link,{onClick:vt,to:`${Zt()}?query=${jt}`},r.createElement("span",{className:mt.viewResultsLink},"View Full Results"),r.createElement(m.Z,{color:"primary"})))),r.createElement(u.Z,null),r.createElement(b.SearchResult,null,({results:ae})=>r.createElement(d.Z,null,ae.map(({document:qt})=>r.createElement("div",{role:"button",tabIndex:0,key:`${qt.location}-btn`,onClick:Lt,onKeyPress:Kt},r.createElement(S.DefaultResultListItem,{key:qt.location,result:qt})))))),r.createElement(y.Z,{className:mt.dialogActionsContainer},r.createElement(s.Z,{container:!0,direction:"row"},r.createElement(s.Z,{item:!0,xs:12},r.createElement(G.G,null)))))},V=({open:ot=!0,toggleModal:vt})=>r.createElement(T.Nd,null,r.createElement(K,{open:ot,toggleModal:vt}))},3992:function(X,o,t){"use strict";t.r(o),t.d(o,{SearchPage:function(){return ze}});var r=t(2784),e=t(1849),l=t(19126),h=t.n(l),c=t(10289),s=t(22313),u=t(60905),d=t(48760),y=t(79692),m=t(27556),E=t(74603),i=t(61837),S=t(21853),b=t(33375);const T=(0,y.Z)(()=>({root:{display:"flex",alignItems:"center"},input:{flex:1}})),G=({searchQuery:xt,handleSearch:se,handleClearSearchBar:ie})=>{const F=T();return r.createElement(m.Z,{component:"form",onSubmit:R=>se(R),className:F.root},r.createElement(i.Z,{disabled:!0,type:"submit","aria-label":"search"},r.createElement(S.Z,null)),r.createElement(E.Z,{className:F.input,placeholder:"Search in Backstage",value:xt,onChange:R=>se(R),inputProps:{"aria-label":"search backstage"}}),r.createElement(i.Z,{"aria-label":"search",onClick:()=>ie()},r.createElement(b.Z,null)))};var j=t(85256),D=t(90436),M=t(99688),I=t(64279),K=t(85653),V=t(36444);const ot=(0,y.Z)(xt=>({filters:{width:"250px",display:"flex"},icon:{margin:xt.spacing(-1,0,0,0)}})),vt=({numberOfSelectedFilters:xt,handleToggleFilters:se})=>{const ie=ot();return r.createElement("div",{className:ie.filters},r.createElement(i.Z,{className:ie.icon,"aria-label":"settings",onClick:se},r.createElement(V.Z,null)),r.createElement(D.Z,{variant:"h6"},"Filters (",xt||0,")"))};var Zt=t(94339),mt=t(32552),jt=t(77277),Lt=t(24579),Kt=t(73698),ae=t(12231),qt=t(11776),me=t(38402),le=t(21324),ce=t(49378);const Ae=(0,y.Z)(xt=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:xt.spacing(0,1,0,1)},dropdown:{width:"100%"}})),Me=({filters:xt,filterOptions:se,resetFilters:ie,updateSelected:F,updateChecked:R})=>{const P=Ae();return r.createElement(Zt.Z,{className:P.filters},r.createElement(mt.Z,{title:r.createElement(D.Z,{variant:"h6"},"Filters"),action:r.createElement(jt.Z,{color:"primary",onClick:()=>ie()},"CLEAR ALL")}),r.createElement(j.Z,null),se.kind.length===0&&se.lifecycle.length===0&&r.createElement(Lt.Z,null,r.createElement(D.Z,{variant:"subtitle2"},"Filters cannot be applied to available results")),se.kind.length>0&&r.createElement(Lt.Z,null,r.createElement(D.Z,{variant:"subtitle2"},"Kind"),r.createElement(Kt.Z,{id:"outlined-select",onChange:B=>{var W;return F((W=B==null?void 0:B.target)==null?void 0:W.value)},variant:"outlined",className:P.dropdown,value:xt.selected},se.kind.map(B=>r.createElement(ae.Z,{selected:B==="",dense:!0,key:B,value:B},B)))),se.lifecycle.length>0&&r.createElement(Lt.Z,null,r.createElement(D.Z,{variant:"subtitle2"},"Lifecycle"),r.createElement(qt.Z,{disablePadding:!0,dense:!0},se.lifecycle.map(B=>r.createElement(me.Z,{key:B,dense:!0,button:!0,onClick:()=>R(B)},r.createElement(le.Z,{edge:"start",disableRipple:!0,className:P.checkbox,color:"primary",checked:xt.checked.includes(B),tabIndex:-1,value:B,name:B}),r.createElement(ce.Z,{id:B,primary:B}))))))};var ye=t(52890),ve=t(41682),he=t(36964);const Ne=(0,y.Z)(xt=>({searchQuery:{color:xt.palette.text.primary,background:xt.palette.background.default,borderRadius:"10%"},tableHeader:{margin:xt.spacing(1,0,0,0),display:"flex"},divider:{width:"1px",margin:xt.spacing(0,2),padding:xt.spacing(2,0)}})),Ue=[{title:"Name",field:"name",highlight:!0,render:xt=>r.createElement(ve.Link,{to:xt.url||""},xt.name)},{title:"Description",field:"description"},{title:"Owner",field:"owner"},{title:"Kind",field:"kind"},{title:"LifeCycle",field:"lifecycle"}],Ie=({searchQuery:xt,numberOfSelectedFilters:se,numberOfResults:ie,handleToggleFilters:F})=>{const R=Ne();return r.createElement("div",{className:R.tableHeader},r.createElement(vt,{numberOfSelectedFilters:se,handleToggleFilters:F}),r.createElement(j.Z,{className:R.divider,orientation:"vertical"}),r.createElement(u.Z,{item:!0,xs:12},xt?r.createElement(D.Z,{variant:"h6"},`${ie} `,ie>1?"results for ":"result for ",r.createElement("span",{className:R.searchQuery},'"',xt,'"')," "):r.createElement(D.Z,{variant:"h6"},`${ie} results`)))},Le=({searchQuery:xt})=>{const se=(0,he.useApi)(K.Ah),[ie,F]=(0,r.useState)(!1),[R,P]=(0,r.useState)({selected:"",checked:[]}),[B,W]=(0,r.useState)([]),{loading:q,error:ut,value:st}=(0,I.default)(async()=>(await se.getEntities()).items.map(Pt=>{var _t,ht,St,Wt,zt;return{name:Pt.metadata.name,description:Pt.metadata.description,owner:typeof((_t=Pt.spec)==null?void 0:_t.owner)=="string"?(ht=Pt.spec)==null?void 0:ht.owner:void 0,kind:Pt.kind,lifecycle:typeof((St=Pt.spec)==null?void 0:St.lifecycle)=="string"?(Wt=Pt.spec)==null?void 0:Wt.lifecycle:void 0,url:`/catalog/${((zt=Pt.metadata.namespace)==null?void 0:zt.toLocaleLowerCase("en-US"))||ye.sk}/${Pt.kind.toLocaleLowerCase("en-US")}/${Pt.metadata.name}`}}),[]);if((0,r.useEffect)(()=>{if(st){let Rt=st;R.selected!==""&&(Rt=st.filter(Pt=>R.selected.includes(Pt.kind))),R.checked.length>0&&(Rt=Rt.filter(Pt=>Pt.lifecycle&&R.checked.includes(Pt.lifecycle))),xt&&(Rt=Rt.filter(Pt=>{var _t,ht,St;return((_t=Pt.name)==null?void 0:_t.toLocaleLowerCase("en-US").includes(xt))||((ht=Pt.name)==null?void 0:ht.toLocaleLowerCase("en-US").includes(xt.split(" ").join("-")))||((St=Pt.description)==null?void 0:St.toLocaleLowerCase("en-US").includes(xt))})),W(Rt)}},[R,xt,st]),q)return r.createElement(ve.Progress,null);if(ut)return r.createElement(M.Z,{severity:"error"},"Error encountered while fetching search results. ",ut.toString());if(!st||st.length===0)return r.createElement(ve.EmptyState,{missing:"data",title:"Sorry, no results were found"});const Tt=()=>{P({selected:"",checked:[]})},wt=Rt=>{P(Pt=>({...Pt,selected:Rt}))},oe=Rt=>{if(R.checked.includes(Rt)){P(Pt=>({...Pt,checked:Pt.checked.filter(_t=>_t!==Rt)}));return}P(Pt=>({...Pt,checked:[...Pt.checked,Rt]}))},Vt=st.reduce((Rt,Pt)=>(Pt.kind&&Rt.kind.indexOf(Pt.kind)<0&&Rt.kind.push(Pt.kind),Pt.lifecycle&&Rt.lifecycle.indexOf(Pt.lifecycle)<0&&Rt.lifecycle.push(Pt.lifecycle),Rt),{kind:[],lifecycle:[]});return r.createElement(r.Fragment,null,r.createElement(u.Z,{container:!0},ie&&r.createElement(u.Z,{item:!0,xs:3},r.createElement(Me,{filters:R,filterOptions:Vt,resetFilters:Tt,updateSelected:wt,updateChecked:oe})),r.createElement(u.Z,{item:!0,xs:ie?9:12},r.createElement(ve.Table,{options:{paging:!0,pageSize:20,search:!1},data:B,columns:Ue,title:r.createElement(Ie,{searchQuery:xt,numberOfResults:B.length,numberOfSelectedFilters:(R.selected!==""?1:0)+R.checked.length,handleToggleFilters:()=>F(!ie)})}))))},fe=()=>{const[xt,se]=(0,ve.useQueryParamState)("query"),[ie,F]=(0,r.useState)(xt!=null?xt:""),R=B=>{B.preventDefault(),F(B.target.value)};(0,r.useEffect)(()=>F(xt!=null?xt:""),[xt]),(0,d.Z)(()=>{se(ie)},200,[ie]);const P=()=>{F("")};return r.createElement(ve.Page,{themeId:"home"},r.createElement(ve.Header,{title:"Search"}),r.createElement(ve.Content,null,r.createElement(u.Z,{container:!0,direction:"row"},r.createElement(u.Z,{item:!0,xs:12},r.createElement(G,{handleSearch:R,handleClearSearchBar:P,searchQuery:ie})),r.createElement(u.Z,{item:!0,xs:12},r.createElement(Le,{searchQuery:(xt!=null?xt:"").toLocaleLowerCase("en-US")})))))},Re=()=>{const xt=(0,c.TH)(),{term:se,setTerm:ie,types:F,setTypes:R,pageCursor:P,setPageCursor:B,filters:W,setFilters:q}=(0,s.Rx)(),ut=(0,e.Z)(xt.search);return(0,r.useEffect)(()=>{if(xt.search===ut)return;const st=h().parse(xt.search.substring(1),{arrayLimit:0})||{};st.filters&&q(st.filters),st.query&&ie(st.query),st.pageCursor&&B(st.pageCursor),st.types&&R(st.types)},[ut,xt,ie,R,B,q]),(0,r.useEffect)(()=>{const st=h().stringify({query:se,types:F,pageCursor:P,filters:W},{arrayFormat:"brackets"}),Tt=`${window.location.pathname}?${st}`;window.history.replaceState(null,document.title,Tt)},[se,F,P,W]),null},ze=()=>{const xt=(0,c.pC)();return r.createElement(s.Nd,null,r.createElement(Re,null),xt||r.createElement(fe,null))}},39332:function(X,o,t){"use strict";t.r(o),t.d(o,{SearchResult:function(){return h}});var r=t(41682),e=t(2784),l=t(22313);const h=({children:c})=>{const{result:{loading:s,error:u,value:d}}=(0,l.Rx)();return s?e.createElement(r.Progress,null):u?e.createElement(r.ResponseErrorPanel,{title:"Error encountered while fetching search results",error:u}):(d==null?void 0:d.results.length)?e.createElement(e.Fragment,null,c({results:d.results})):e.createElement(r.EmptyState,{missing:"data",title:"Sorry, no results were found"})}},8542:function(X,o,t){"use strict";t.d(o,{G:function(){return d}});var r=t(79692),e=t(77277),l=t(35352),h=t(27742),c=t(2784),s=t(22313);const u=(0,r.Z)(y=>({root:{display:"flex",justifyContent:"space-between",gap:y.spacing(2),margin:y.spacing(2,0)}})),d=()=>{const{fetchNextPage:y,fetchPreviousPage:m}=(0,s.Rx)(),E=u();return!y&&!m?c.createElement(c.Fragment,null):c.createElement("nav",{"arial-label":"pagination navigation",className:E.root},c.createElement(e.Z,{"aria-label":"previous page",disabled:!m,onClick:m,startIcon:c.createElement(l.Z,null)},"Previous"),c.createElement(e.Z,{"aria-label":"next page",disabled:!y,onClick:y,endIcon:c.createElement(h.Z,null)},"Next"))}},20863:function(X,o,t){"use strict";t.d(o,{_Z:function(){return l}});var r=t(91512),e=t(36964);const l=(0,e.createRouteRef)({id:"search"}),h=(0,e.createRouteRef)({id:"search:next"}),c=(0,e.createPlugin)({id:"search",apis:[(0,e.createApiFactory)({api:r.g,deps:{discoveryApi:e.discoveryApiRef,identityApi:e.identityApiRef},factory:({discoveryApi:T,identityApi:G})=>new r.w({discoveryApi:T,identityApi:G})})],routes:{root:l,nextRoot:h}}),s=c.provide((0,e.createRoutableExtension)({name:"SearchPage",component:()=>Promise.resolve().then(t.bind(t,3992)).then(T=>T.SearchPage),mountPoint:l})),u=c.provide((0,e.createRoutableExtension)({name:"SearchPageNext",component:()=>Promise.resolve().then(t.bind(t,3992)).then(T=>T.SearchPage),mountPoint:h})),d=c.provide((0,e.createComponentExtension)({name:"SearchBar",component:{lazy:()=>Promise.resolve().then(t.bind(t,1795)).then(T=>T.SearchBar)}})),y=c.provide((0,e.createComponentExtension)({name:"SearchBarNext",component:{lazy:()=>Promise.resolve().then(t.bind(t,1795)).then(T=>T.SearchBar)}})),m=c.provide((0,e.createComponentExtension)({name:"SearchResult",component:{lazy:()=>Promise.resolve().then(t.bind(t,39332)).then(T=>T.SearchResult)}})),E=c.provide((0,e.createComponentExtension)({name:"SearchResultNext",component:{lazy:()=>Promise.resolve().then(t.bind(t,39332)).then(T=>T.SearchResult)}})),i=c.provide((0,e.createComponentExtension)({name:"SidebarSearchModal",component:{lazy:()=>t.e(3825).then(t.bind(t,43825)).then(T=>T.SidebarSearchModal)}})),S=c.provide((0,e.createComponentExtension)({name:"DefaultResultListItem",component:{lazy:()=>Promise.resolve().then(t.bind(t,19941)).then(T=>T.DefaultResultListItem)}})),b=c.provide((0,e.createComponentExtension)({name:"HomePageSearchBar",component:{lazy:()=>t.e(6105).then(t.bind(t,46105)).then(T=>T.HomePageSearchBar)}}))},94067:function(X,o,t){"use strict";t.r(o),t.d(o,{EmbeddedDocsRouter:function(){return b},Router:function(){return S},isTechDocsAvailable:function(){return i}});var r=t(2784),e=t(85653),l=t(10289),h=t(41481),c=t(31752),s=t(73873),u=t(97589),d=t(36964);const y=({entity:T})=>{var j;const G=(0,d.useApi)(d.configApiRef);return r.createElement(s.Ej,{withSearch:!1,entityRef:{namespace:(0,u.D)((j=T.metadata.namespace)!=null?j:"default",G),kind:(0,u.D)(T.kind,G),name:(0,u.D)(T.metadata.name,G)}})};var m=t(41682);const E="backstage.io/techdocs-ref",i=T=>{var G,j;return Boolean((j=(G=T==null?void 0:T.metadata)==null?void 0:G.annotations)==null?void 0:j[E])},S=()=>r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/",element:r.createElement(h.TechDocsIndexPage,null)}),r.createElement(l.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(c.TechDocsPage,null)})),b=T=>{var D;const{entity:G}=(0,e.useEntity)();return((D=G.metadata.annotations)==null?void 0:D[E])?r.createElement(l.Z5,null,r.createElement(l.AW,{path:"/*",element:r.createElement(y,{entity:G})})):r.createElement(m.MissingAnnotationEmptyState,{annotation:E})}},3337:function(X,o,t){"use strict";t.d(o,{D:function(){return e},g:function(){return l}});var r=t(36964);const e=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},71226:function(X,o,t){"use strict";t.d(o,{O:function(){return m}});var r=t(2784),e=t(79692),l=t(49378),h=t(38402),c=t(85256),s=t(41682),u=t(15277),d=t.n(u);const y=(0,e.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),m=({result:E,lineClamp:i=5,asListItem:S=!0,asLink:b=!0,title:T})=>{const G=y(),j=()=>{var I;return r.createElement(l.Z,{className:G.itemText,primaryTypographyProps:{variant:"h6"},primary:T||`${E.title} | ${(I=E.entityTitle)!=null?I:E.name} docs`,secondary:r.createElement(d(),{line:i,truncateText:"\u2026",text:E.text,element:"span"})})},D=({children:I})=>b?r.createElement(s.Link,{to:E.location},I):r.createElement(r.Fragment,null,I),M=({children:I})=>S?r.createElement(r.Fragment,null,r.createElement(h.Z,{alignItems:"flex-start",className:G.flexContainer},I),r.createElement(c.Z,{component:"li"})):r.createElement(r.Fragment,null,I);return r.createElement(D,null,r.createElement(M,null,r.createElement(j,null)))}},97589:function(X,o,t){"use strict";t.d(o,{D:function(){return r}});function r(e,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?e:e.toLocaleLowerCase("en-US")}},10187:function(X,o,t){"use strict";t.r(o),t.d(o,{DocsCardGrid:function(){return m}});var r=t(2784),e=t(36964),l=t(94339),h=t(16111),c=t(24579),s=t(14503),u=t(68725),d=t(41682),y=t(97589);const m=({entities:E})=>{const i=(0,e.useRouteRef)(u.Fw),S=(0,e.useApi)(e.configApiRef);return E?r.createElement(d.ItemCardGrid,{"data-testid":"docs-explore"},(E==null?void 0:E.length)?E.map((b,T)=>{var G,j;return r.createElement(l.Z,{key:T},r.createElement(h.Z,null,r.createElement(d.ItemCardHeader,{title:(G=b.metadata.title)!=null?G:b.metadata.name})),r.createElement(c.Z,null,b.metadata.description),r.createElement(s.Z,null,r.createElement(d.Button,{to:i({namespace:(0,y.D)((j=b.metadata.namespace)!=null?j:"default",S),kind:(0,y.D)(b.kind,S),name:(0,y.D)(b.metadata.name,S)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null}},83201:function(X,o,t){"use strict";t.r(o),t.d(o,{DocsTable:function(){return E}});var r=t(2784),e=t(95074),l=t(36964),h=t(52890),c=t(85653),s=t(68725),u=t(41682),d=t(50294),y=t(67430),m=t(97589);const E=({entities:i,title:S,loading:b,columns:T,actions:G})=>{const[,j]=(0,e.Z)(),D=(0,l.useRouteRef)(s.Fw),M=(0,l.useApi)(l.configApiRef);if(!i)return null;const I=i.map(ot=>{var Zt;const vt=(0,c.getEntityRelations)(ot,h.S4);return{entity:ot,resolved:{docsUrl:D({namespace:(0,m.D)((Zt=ot.metadata.namespace)!=null?Zt:"default",M),kind:(0,m.D)(ot.kind,M),name:(0,m.D)(ot.metadata.name,M)}),ownedByRelations:vt,ownedByRelationsTitle:vt.map(mt=>(0,c.formatEntityRefTitle)(mt,{defaultKind:"group"})).join(", ")}}}),K=[y.createNameColumn(),y.createOwnerColumn(),y.createTypeColumn()],V=[d.createCopyDocsUrlAction(j)];return r.createElement(r.Fragment,null,b||I&&I.length>0?r.createElement(u.Table,{isLoading:b,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:I,columns:T||K,actions:G||V,title:S?`${S} (${I.length})`:`All (${I.length})`}):r.createElement(u.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(u.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))}},57110:function(X,o,t){"use strict";t.r(o),t.d(o,{TechDocsCustomHome:function(){return i}});var r=t(2784),e=t(64279),l=t(79692),h=t(85653),c=t(83201),s=t(10187),u=t(1114),d=t(41682),y=t(36964);const m={DocsTable:c.DocsTable,DocsCardGrid:s.DocsCardGrid},E=({config:S,entities:b,index:T})=>{const j=(0,l.Z)({panelContainer:{marginBottom:"2rem",...S.panelCSS?S.panelCSS:{}}})(),{value:D}=(0,h.useOwnUser)(),M=m[S.panelType],I=b.filter(K=>S.filterPredicate==="ownedByUser"?D?(0,h.isOwnerOf)(D,K):!1:typeof S.filterPredicate=="function"&&S.filterPredicate(K));return r.createElement(r.Fragment,null,r.createElement(d.ContentHeader,{title:S.title,description:S.description},T===0?r.createElement(d.SupportButton,null,"Discover documentation in your ecosystem."):null),r.createElement("div",{className:j.panelContainer},r.createElement(M,{"data-testid":"techdocs-custom-panel",entities:I})))},i=({tabsConfig:S})=>{const[b,T]=(0,r.useState)(0),G=(0,y.useApi)(h.Ah),{value:j,loading:D,error:M}=(0,e.default)(async()=>(await G.getEntities({filter:{"metadata.annotations.backstage.io/techdocs-ref":h.n3},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(V=>{var ot;return!!((ot=V.metadata.annotations)==null?void 0:ot["backstage.io/techdocs-ref"])})),I=S[b];return D?r.createElement(u.j,null,r.createElement(d.Content,null,r.createElement(d.Progress,null))):M?r.createElement(u.j,null,r.createElement(d.Content,null,r.createElement(d.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(d.CodeSnippet,{language:"text",text:M.toString()})))):r.createElement(u.j,null,r.createElement(d.HeaderTabs,{selectedIndex:b,onChange:K=>T(K),tabs:S.map(({label:K},V)=>({id:V.toString(),label:K}))}),r.createElement(d.Content,{"data-testid":"techdocs-content"},I.panels.map((K,V)=>r.createElement(E,{key:V,config:K,entities:j||[],index:V}))))}},41481:function(X,o,t){"use strict";t.r(o),t.d(o,{TechDocsIndexPage:function(){return c}});var r=t(2784),e=t(10289),l=t(57110);const h=()=>{const s=[{label:"Overview",panels:[{title:"Overview",description:"Explore your internal technical ecosystem through documentation.",panelType:"DocsCardGrid",filterPredicate:()=>!0}]},{label:"Owned Documents",panels:[{title:"Owned documents",description:"Access your documentation.",panelType:"DocsTable",filterPredicate:"ownedByUser"}]}];return r.createElement(l.TechDocsCustomHome,{tabsConfig:s})},c=()=>(0,e.pC)()||r.createElement(h,null)},1114:function(X,o,t){"use strict";t.d(o,{j:function(){return h}});var r=t(2784),e=t(41682),l=t(36964);const h=({children:c})=>{var d;const u=`Documentation available in ${(d=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?d:"Backstage"}`;return r.createElement(e.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},c)}},50294:function(X,o,t){"use strict";t.r(o),t.d(o,{createCopyDocsUrlAction:function(){return h},createStarEntityAction:function(){return c}});var r=t(2784),e=t(39981),l=t(85653);function h(s){return u=>({icon:()=>r.createElement(e.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${u.resolved.docsUrl}`)})}function c(s,u){return({entity:d})=>{const y=s(d);return{cellStyle:{paddingLeft:"1em"},icon:()=>(0,l.favoriteEntityIcon)(y),tooltip:(0,l.favoriteEntityTooltip)(y),onClick:()=>u(d)}}}},67430:function(X,o,t){"use strict";t.r(o),t.d(o,{createNameColumn:function(){return c},createOwnerColumn:function(){return s},createTypeColumn:function(){return u}});var r=t(2784),e=t(41682),l=t(85653);function h(d){return d.metadata.title||d.metadata.name}function c(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:d=>r.createElement(e.SubvalueCell,{value:r.createElement(e.Link,{to:d.resolved.docsUrl},h(d.entity)),subvalue:d.entity.metadata.description})}}function s(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:d})=>r.createElement(l.EntityRefLinks,{entityRefs:d.ownedByRelations,defaultKind:"group"})}}function u(){return{title:"Type",field:"entity.spec.type"}}},75448:function(X,o,t){"use strict";t.d(o,{Ej:function(){return ie},DK:function(){return ze}});var r=t(2784),e=t(10289),l=t(79692),h=t(60364),c=t(60905),s=t(36964),u=t(36356),d=t(41682),y=t(3337);const m=(F,R,P)=>{const B=F==="src"&&R.endsWith(".svg"),W=!R.match(/^([a-z]*:)?\/\//i),q=R.startsWith(P);return B&&(W||q)},E=({techdocsStorageApi:F,entityId:R,path:P})=>async B=>{const W=await F.getApiOrigin(),q=async(ut,st)=>{for(const Tt of ut)if(Tt.hasAttribute(st)){const wt=Tt.getAttribute(st);if(!wt)return;const oe=await F.getBaseUrl(wt,R,P);if(m(st,wt,W))try{const Rt=await(await fetch(oe,{credentials:"include"})).text();Tt.setAttribute(st,`data:image/svg+xml;base64,${btoa(Rt)}`)}catch{Tt.setAttribute("alt",`Error: ${wt}`)}else Tt.setAttribute(st,oe)}};return await Promise.all([q(B.querySelectorAll("img"),"src"),q(B.querySelectorAll("script"),"src"),q(B.querySelectorAll("link"),"href"),q(B.querySelectorAll("a[download]"),"href")]),B};var i=t(94594),S=t(67097),b=t(9832),T=t(82717),G=t.n(T);const j=F=>R=>{const P=R.querySelector('[title="Edit this page"]');if(!P||!P.href)return R;const B=new URL(P.href),W=F.byUrl(B);if((W==null?void 0:W.type)!=="github"&&(W==null?void 0:W.type)!=="gitlab")return R;const q=R.querySelector("article>h1").childNodes[0].textContent,ut=encodeURIComponent(`Documentation Feedback: ${q}`),st=encodeURIComponent(`Page source:
32
- ${P.href}
33
-
34
- Feedback:`),Tt=(W==null?void 0:W.type)==="github"?(0,i.Pb)(B.href,"blob"):B.href,wt=G()(Tt),oe=`/${wt.organization}/${wt.name}`,Vt=P.cloneNode();switch(W==null?void 0:W.type){case"gitlab":Vt.href=`${B.origin}${oe}/issues/new?issue[title]=${ut}&issue[description]=${st}`;break;case"github":Vt.href=`${B.origin}${oe}/issues/new?title=${ut}&body=${st}`;break;default:return R}return b.render(r.createElement(S.Z),Vt),Vt.style.paddingLeft="5px",Vt.title="Leave feedback for this page",Vt.id="git-feedback-link",P==null||P.insertAdjacentElement("beforebegin",Vt),R},D=()=>F=>(((P,B)=>{Array.from(P).filter(W=>W.hasAttribute(B)).forEach(W=>{const q=W.getAttribute(B);if(q){q.match(/^https?:\/\//i)&&W.setAttribute("target","_blank");try{const ut=M(window.location.href);W.setAttribute(B,new URL(q,ut).toString())}catch{W.replaceWith(W.textContent||q)}}})})(Array.from(F.getElementsByTagName("a")),"href"),F);function M(F){const R=new URL(F);return!R.pathname.endsWith("/")&&!R.pathname.endsWith(".html")&&(R.pathname+="/"),R.toString()}const I=({baseUrl:F,onClick:R})=>P=>(Array.from(P.getElementsByTagName("a")).forEach(B=>{B.addEventListener("click",W=>{const ut=B.getAttribute("href");!ut||ut.startsWith(F)&&(W.preventDefault(),R(W,ut))})}),P),K=()=>F=>{var R;return(R=F.querySelector(".md-header"))==null||R.remove(),F},V=()=>F=>{var R;return(R=F.querySelector(".md-footer-copyright"))==null||R.remove(),F},ot=({docStorageUrl:F,onLoading:R,onLoaded:P})=>B=>{const W=Array.from(B.querySelectorAll('head > link[rel="stylesheet"]')).filter(ut=>{var st;return(st=ut.getAttribute("href"))==null?void 0:st.startsWith(F)});let q=W.length;return q>0&&R(B),W.forEach(ut=>ut.addEventListener("load",()=>{q-=1,q===0&&P(B)})),B};var vt=t(35368),Zt=t.n(vt);const mt=/main\.[A-Fa-f0-9]{8}\.min\.css$/,jt=/^https:\/\/fonts\.googleapis\.com/,Lt=/^https:\/\/fonts\.gstatic\.com/,Kt=F=>{if(F.nodeName&&F.nodeName==="LINK"){const R=F.getAttribute("href")||"";R.match(mt)&&F.setAttribute("rel","stylesheet"),R.match(jt)&&F.setAttribute("rel","stylesheet"),R.match(Lt)&&F.setAttribute("rel","preconnect")}return F},ae=F=>R=>{if(R.nodeName==="IFRAME"){const P=R.getAttribute("src");if(!P)return R.remove(),R;try{const B=new URL(P);F.some(q=>B.host===q)||R.remove()}catch(B){console.warn(`Invalid iframe src, ${B}`),R.remove()}}return R},qt=F=>{const R=(F==null?void 0:F.getOptionalStringArray("allowedIframeHosts"))||[];return P=>{Zt().addHook("afterSanitizeAttributes",Kt);const B=["link"];return R.length>0&&(Zt().addHook("beforeSanitizeElements",ae(R)),B.push("iframe")),Zt().sanitize(P.innerHTML,{ADD_TAGS:B,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},me=({css:F})=>R=>(R.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${F}</style>`),R),le=()=>F=>(setTimeout(()=>{var R;if(window.location.hash){const P=window.location.hash.slice(1);(R=F==null?void 0:F.querySelector(`#${P}`))==null||R.scrollIntoView()}},200),F),ce=async(F,R)=>{let P;if(typeof F=="string")P=new DOMParser().parseFromString(F,"text/html").documentElement;else if(F instanceof Element)P=F;else throw new Error("dom is not a recognized type");for(const B of R)P=await B(P);return P};var Ae=t(7735),Me=t(25921),ye=t(64279),ve=t(77446);function he({contentLoading:F,content:R,activeSyncState:P}){return F||P==="BUILD_READY_RELOAD"||!R&&P==="CHECKING"?"CHECKING":!R&&P==="BUILDING"?"INITIAL_BUILD":R?P==="BUILDING"?"CONTENT_STALE_REFRESHING":P==="BUILD_READY"?"CONTENT_STALE_READY":P==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Ne(F,R){const P={...F};switch(R.type){case"sync":R.state==="CHECKING"&&(P.buildLog=[]),P.activeSyncState=R.state,P.syncError=R.syncError;break;case"contentLoading":P.contentLoading=!0,P.contentError=void 0;break;case"content":typeof R.path=="string"&&(P.path=R.path),P.contentLoading=!1,P.content=R.content,P.contentError=R.contentError;break;case"buildLog":P.buildLog=P.buildLog.concat(R.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(P.activeSyncState)&&["contentLoading","content"].includes(R.type)&&(P.activeSyncState="UP_TO_DATE",P.buildLog=[]),P}function Ue(F,R,P,B){var oe,Vt;const[W,q]=(0,r.useReducer)(Ne,{activeSyncState:"CHECKING",path:B,contentLoading:!0,buildLog:[]}),ut=(0,s.useApi)(y.D),{retry:st}=(0,ve.Z)(async()=>{q({type:"contentLoading"});try{const Rt=await ut.getEntityDocs({kind:F,namespace:R,name:P},B);return q({type:"content",content:Rt,path:B}),Rt}catch(Rt){q({type:"content",contentError:Rt,path:B})}},[ut,F,R,P,B]),Tt=(0,r.useRef)({content:void 0,reload:()=>{}});return Tt.current={content:W.content,reload:st},(0,ye.default)(async()=>{q({type:"sync",state:"CHECKING"});const Rt=setTimeout(()=>{q({type:"sync",state:"BUILDING"})},1e3);try{switch(await ut.syncEntityDocs({kind:F,namespace:R,name:P},_t=>{q({type:"buildLog",log:_t})})){case"updated":Tt.current.content?q({type:"sync",state:"BUILD_READY"}):(Tt.current.reload(),q({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":q({type:"sync",state:"UP_TO_DATE"});break;default:q({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Pt){q({type:"sync",state:"ERROR",syncError:Pt})}finally{clearTimeout(Rt)}},[F,P,R,ut,q,Tt]),{state:(0,r.useMemo)(()=>he({activeSyncState:W.activeSyncState,contentLoading:W.contentLoading,content:W.content}),[W.activeSyncState,W.content,W.contentLoading]),contentReload:st,path:W.path,content:W.content,contentErrorMessage:(oe=W.contentError)==null?void 0:oe.toString(),syncErrorMessage:(Vt=W.syncError)==null?void 0:Vt.toString(),buildLog:W.buildLog}}const Ie=(0,l.Z)(F=>({searchBar:{marginLeft:"20rem",maxWidth:"calc(100% - 20rem * 2 - 3rem)",marginTop:F.spacing(1),"@media screen and (max-width: 76.1875em)":{marginLeft:"10rem",maxWidth:"calc(100% - 10rem)"}}})),Le=(0,r.createContext)({}),fe=({children:F,entityRef:R})=>{const{"*":P}=(0,e.UO)(),{kind:B,namespace:W,name:q}=R,ut=Ue(B,W,q,P);return r.createElement(Le.Provider,{value:ut},F)},Re=(F,R)=>P=>React.createElement(fe,{entityRef:R},React.createElement(F,{...P})),ze=()=>(0,r.useContext)(Le),xt=F=>{const R=(0,e.s0)(),P=(0,h.Z)(),B=(0,s.useApi)(y.D),W=(0,s.useApi)(u.q3),q=(0,s.useApi)(s.configApiRef),{namespace:ut="",kind:st="",name:Tt=""}=F,{state:wt,path:oe,content:Vt}=ze(),[Rt,Pt]=(0,r.useState)(),[_t,ht]=(0,r.useState)(null),{isPinned:St}=(0,r.useContext)(d.SidebarPinStateContext),Wt=(0,r.useCallback)(()=>{if(!_t||!Rt)return;const Ft=_t.querySelector(".md-container > .md-tabs");Rt.forEach(Qt=>{const Xt=Math.max(_t.getBoundingClientRect().top,0);Qt.style.top=Ft?`${Xt+Ft.getBoundingClientRect().height}px`:`${Xt}px`})},[_t,Rt]);(0,r.useEffect)(()=>(Wt(),window.addEventListener("scroll",Wt,!0),window.addEventListener("resize",Wt),()=>{window.removeEventListener("scroll",Wt,!0),window.removeEventListener("resize",Wt)}),[Wt,wt]);const zt=(0,r.useCallback)(()=>{if(!_t)return;const Ft=_t.querySelector(".md-footer");Ft&&(Ft.style.width=`${_t.getBoundingClientRect().width}px`)},[_t]);(0,r.useEffect)(()=>(zt(),window.addEventListener("resize",zt),()=>{window.removeEventListener("resize",zt)}));const Dt=(0,r.useCallback)((Ft,Qt)=>ce(Ft,[qt(q.getOptionalConfig("techdocs.sanitizer")),E({techdocsStorageApi:B,entityId:{kind:st,name:Tt,namespace:ut},path:Qt}),D(),K(),V(),j(W),me({css:`
35
- body {
36
- font-family: ${P.typography.fontFamily};
37
- --md-text-color: ${P.palette.text.primary};
38
- --md-text-link-color: ${P.palette.primary.main};
39
-
40
- --md-code-fg-color: ${P.palette.text.primary};
41
- --md-code-bg-color: ${P.palette.background.paper};
42
- }
43
- .md-main__inner { margin-top: 0; }
44
- .md-sidebar { position: fixed; bottom: 100px; width: 20rem; }
45
- .md-sidebar--secondary { right: 2rem; }
46
- .md-content { margin-bottom: 50px }
47
- .md-footer { position: fixed; bottom: 0px; }
48
- .md-footer-nav__link { width: 20rem;}
49
- .md-content { margin-left: 20rem; max-width: calc(100% - 20rem * 2 - 3rem); }
50
- .md-typeset { font-size: 1rem; }
51
- .md-typeset h1, .md-typeset h2, .md-typeset h3 { font-weight: bold; }
52
- .md-nav { font-size: 1rem; }
53
- .md-grid { max-width: 90vw; margin: 0 }
54
- .md-typeset table:not([class]) {
55
- font-size: 1rem;
56
- border: 1px solid ${P.palette.text.primary};
57
- border-bottom: none;
58
- border-collapse: collapse;
59
- }
60
- .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
61
- border-bottom: 1px solid ${P.palette.text.primary};
62
- }
63
- .md-typeset table:not([class]) th { font-weight: bold; }
64
- .md-typeset .admonition, .md-typeset details {
65
- font-size: 1rem;
66
- }
67
-
68
- /* style the checkmarks of the task list */
69
- .md-typeset .task-list-control .task-list-indicator::before {
70
- background-color: ${P.palette.action.disabledBackground};
71
- }
72
- .md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
73
- background-color: ${P.palette.success.main};
74
- }
75
- /**/
76
-
77
- @media screen and (max-width: 76.1875em) {
78
- .md-nav {
79
- background-color: ${P.palette.background.default};
80
- transition: none !important
81
- }
82
- .md-sidebar--secondary { display: none; }
83
- .md-sidebar--primary { left: ${St?"242px":"72px"}; width: 10rem }
84
- .md-content { margin-left: 10rem; max-width: calc(100% - 10rem); }
85
- .md-content__inner { font-size: 0.9rem }
86
- .md-footer {
87
- position: static;
88
- padding-left: 10rem;
89
- }
90
- .md-footer-nav__link {
91
- /* footer links begin to overlap at small sizes without setting width */
92
- width: 50%;
93
- }
94
- .md-nav--primary .md-nav__title {
95
- white-space: normal;
96
- height: auto;
97
- line-height: 1rem;
98
- cursor: auto;
99
- }
100
- .md-nav--primary > .md-nav__title [for="none"] {
101
- padding-top: 0;
102
- }
103
- }
104
- `}),me({css:`
105
- .md-nav__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
106
- transition: none;
107
- }
108
- `}),me({css:`
109
- .md-typeset pre > code::-webkit-scrollbar-thumb {
110
- background-color: hsla(0, 0%, 0%, 0.32);
111
- }
112
- .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
113
- background-color: hsla(0, 0%, 0%, 0.87);
114
- }
115
- `}),me({css:`
116
- :host {
117
- --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>');
118
- --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>');
119
- --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>');
120
- --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>');
121
- --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>');
122
- --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>');
123
- --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>');
124
- --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>');
125
- --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>');
126
- --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>');
127
- --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>');
128
- --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>');
129
- }
130
- :host {
131
- --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>');
132
- }
133
- :host {
134
- --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.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
135
- }
136
- :host {
137
- --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>');
138
- --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>');
139
- }
140
- `})]),[st,Tt,ut,W,B,q,P.palette.action.disabledBackground,P.palette.background.default,P.palette.background.paper,P.palette.primary.main,P.palette.success.main,P.palette.text.primary,P.typography.fontFamily,St]),re=(0,r.useCallback)(async Ft=>ce(Ft,[le(),I({baseUrl:window.location.origin,onClick:(Qt,Xt)=>{var L,J;const Y=Qt.ctrlKey||Qt.metaKey,v=new URL(Xt);v.hash?Y?window.open(`${v.pathname}${v.hash}`,"_blank"):(R(`${v.pathname}${v.hash}`),(L=Ft==null?void 0:Ft.querySelector(`#${v.hash.slice(1)}`))==null||L.scrollIntoView()):Y?window.open(v.pathname,"_blank"):(R(v.pathname),(J=Ft==null?void 0:Ft.querySelector(".md-content__inner"))==null||J.scrollIntoView())}}),ot({docStorageUrl:await B.getApiOrigin(),onLoading:Qt=>{Qt.style.setProperty("opacity","0")},onLoaded:Qt=>{var Xt;Qt.style.removeProperty("opacity"),(Xt=Qt.querySelector(".md-nav__title"))==null||Xt.removeAttribute("for"),Pt(Array.from(Qt.querySelectorAll(".md-sidebar")))}})]),[R,B]);return(0,r.useEffect)(()=>{if(!Vt)return()=>{};let Ft=!0;return Dt(Vt,oe).then(async Qt=>{if(!(Qt==null?void 0:Qt.innerHTML)||!Ft)return;window.scroll({top:0});const Xt=await re(Qt);ht(Xt)}),()=>{Ft=!1}},[Vt,oe,Dt,re]),_t},se=({entityRef:F,onReady:R=()=>{},withSearch:P=!0})=>{var st,Tt;const B=Ie(),W=xt(F),q=(0,r.useRef)(null),ut=(0,r.useRef)(R);return(0,r.useEffect)(()=>{ut.current=R},[R]),(0,r.useEffect)(()=>{if(!W||!q.current)return;const wt=q.current,oe=wt.shadowRoot||wt.attachShadow({mode:"open"});Array.from(oe.children).forEach(Vt=>oe.removeChild(Vt)),oe.appendChild(W),ut.current()},[W]),r.createElement(r.Fragment,null,r.createElement(Me.N,null),P&&((Tt=(st=q==null?void 0:q.current)==null?void 0:st.shadowRoot)==null?void 0:Tt.innerHTML)&&r.createElement(c.Z,{container:!0,className:B.searchBar},r.createElement(Ae.S,{entityId:F})),r.createElement("div",{"data-testid":"techdocs-content-shadowroot",ref:q}))},ie=({entityRef:F,onReady:R=()=>{},withSearch:P=!0})=>r.createElement(fe,{entityRef:F},r.createElement(se,{entityRef:F,onReady:R,withSearch:P}))},94252:function(X,o,t){"use strict";t.d(o,{T:function(){return h}});var r=t(2784),e=t(36964),l=t(41682);const h=({errorMessage:c})=>{const s=(0,e.useApi)(e.configApiRef).getOptionalString("techdocs.builder");let u="";return s!=="local"&&(u="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."),r.createElement(l.ErrorPage,{status:"404",statusMessage:c||"Documentation not found",additionalInfo:u})}},31752:function(X,o,t){"use strict";t.r(o),t.d(o,{TechDocsPage:function(){return E}});var r=t(2784),e=t(10289),l=t(64279),h=t(3337),c=t(94252),s=t(36964),u=t(41682),d=t(75448),y=t(46025);const m=()=>{const[i,S]=(0,r.useState)(!1),{namespace:b,kind:T,name:G}=(0,e.UO)(),j=(0,s.useApi)(h.g),{value:D}=(0,l.default)(()=>i?j.getTechDocsMetadata({kind:T,namespace:b,name:G}):Promise.resolve(void 0),[T,b,G,j,i]),{value:M,error:I}=(0,l.default)(()=>j.getEntityMetadata({kind:T,namespace:b,name:G}),[T,b,G,j]),K=(0,r.useCallback)(()=>{S(!0)},[S]);return I?r.createElement(c.T,{errorMessage:I.message}):r.createElement(u.Page,{themeId:"documentation"},r.createElement(y.n,{techDocsMetadata:D,entityMetadata:M,entityRef:{kind:T,namespace:b,name:G}}),r.createElement(u.Content,{"data-testid":"techdocs-content"},r.createElement(d.Ej,{onReady:K,entityRef:{kind:T,namespace:b,name:G}})))},E=({children:i})=>{const S=(0,e.pC)(),[b,T]=(0,r.useState)(!1),{namespace:G,kind:j,name:D}=(0,e.UO)(),M=(0,s.useApi)(h.g),{value:I}=(0,l.default)(()=>b?M.getTechDocsMetadata({kind:j,namespace:G,name:D}):Promise.resolve(void 0),[j,G,D,M,b]),{value:K,error:V}=(0,l.default)(()=>M.getEntityMetadata({kind:j,namespace:G,name:D}),[j,G,D,M]),ot=(0,r.useCallback)(()=>{T(!0)},[T]);return V?r.createElement(c.T,{errorMessage:V.message}):i?r.createElement(u.Page,{themeId:"documentation"},i instanceof Function?i({techdocsMetadataValue:I,entityMetadataValue:K,entityRef:{kind:j,namespace:G,name:D},onReady:ot}):i):S||r.createElement(m,null)}},46025:function(X,o,t){"use strict";t.d(o,{n:function(){return d}});var r=t(52890),e=t(41682),l=t(36964),h=t(85653),c=t(73250),s=t(2784),u=t(68725);const d=({entityRef:y,entityMetadata:m,techDocsMetadata:E})=>{const{name:i}=y,{site_name:S,site_description:b}=E||{},{locationMetadata:T,spec:G}=m||{},j=G==null?void 0:G.lifecycle,D=m?(0,h.getEntityRelations)(m,r.S4):[],M=(0,l.useRouteRef)(u._Z)(),I=s.createElement(s.Fragment,null,s.createElement(e.HeaderLabel,{label:"Component",value:s.createElement(h.EntityRefLink,{color:"inherit",entityRef:y,defaultKind:"Component"})}),D.length>0&&s.createElement(e.HeaderLabel,{label:"Owner",value:s.createElement(h.EntityRefLinks,{color:"inherit",entityRefs:D,defaultKind:"group"})}),j?s.createElement(e.HeaderLabel,{label:"Lifecycle",value:j}):null,T&&T.type!=="dir"&&T.type!=="file"?s.createElement(e.HeaderLabel,{label:"",value:s.createElement("a",{href:T.target,target:"_blank",rel:"noopener noreferrer"},s.createElement(c.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return s.createElement(e.Header,{title:S||".",pageTitleOverride:S||i,subtitle:b&&b!=="None"?b:"",type:"Docs",typeLink:M},I)}},7735:function(X,o,t){"use strict";t.d(o,{S:function(){return _t}});var r=t(91512),e=t(2784),l=t(79692);const h=(0,l.Z)(ht=>({filters:{width:"250px",display:"flex"},icon:{margin:ht.spacing(-1,0,0,0)}})),c=({numberOfSelectedFilters:ht,handleToggleFilters:St})=>{const Wt=h();return React.createElement("div",{className:Wt.filters},React.createElement(IconButton,{className:Wt.icon,"aria-label":"settings",onClick:St},React.createElement(FilterListIcon,null)),React.createElement(Typography,{variant:"h6"},"Filters (",ht||0,")"))},s=(0,l.Z)(ht=>({filters:{background:"transparent",boxShadow:"0px 0px 0px 0px"},checkbox:{padding:ht.spacing(0,1,0,1)},dropdown:{width:"100%"}})),u=({filters:ht,filterOptions:St,resetFilters:Wt,updateSelected:zt,updateChecked:Dt})=>{const re=s();return React.createElement(Card,{className:re.filters},React.createElement(CardHeader,{title:React.createElement(Typography,{variant:"h6"},"Filters"),action:React.createElement(Button,{color:"primary",onClick:()=>Wt()},"CLEAR ALL")}),React.createElement(Divider,null),St.kind.length===0&&St.lifecycle.length===0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Filters cannot be applied to available results")),St.kind.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Kind"),React.createElement(Select,{id:"outlined-select",onChange:Ft=>{var Qt;return zt((Qt=Ft==null?void 0:Ft.target)==null?void 0:Qt.value)},variant:"outlined",className:re.dropdown,value:ht.selected},St.kind.map(Ft=>React.createElement(MenuItem,{selected:Ft==="",dense:!0,key:Ft,value:Ft},Ft)))),St.lifecycle.length>0&&React.createElement(CardContent,null,React.createElement(Typography,{variant:"subtitle2"},"Lifecycle"),React.createElement(List,{disablePadding:!0,dense:!0},St.lifecycle.map(Ft=>React.createElement(ListItem,{key:Ft,dense:!0,button:!0,onClick:()=>Dt(Ft)},React.createElement(Checkbox,{edge:"start",disableRipple:!0,className:re.checkbox,color:"primary",checked:ht.checked.includes(Ft),tabIndex:-1,value:Ft,name:Ft}),React.createElement(ListItemText,{id:Ft,primary:Ft}))))))};var d=t(1795),y=t(22313),m=t(42494),E=t(84899),i=t(5806),S=t(21324),b=t(56939),T=t(73698),G=t(12231);const j=(0,l.Z)({label:{textTransform:"capitalize"}}),D=({className:ht,name:St,defaultValue:Wt,values:zt=[]})=>{const Dt=j(),{filters:re,setFilters:Ft}=(0,y.Rx)();(0,e.useEffect)(()=>{Array.isArray(Wt)&&Ft(Xt=>({...Xt,[St]:Wt}))},[]);const Qt=Xt=>{const{target:{value:Y,checked:v}}=Xt;Ft(L=>{const{[St]:J,...et}=L,yt=(J||[]).filter(Bt=>Bt!==Y),ft=v?[...yt,Y]:yt;return ft.length?{...et,[St]:ft}:et})};return e.createElement(m.Z,{className:ht,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},e.createElement(E.Z,{className:Dt.label},St),zt.map(Xt=>{var Y;return e.createElement(i.Z,{key:Xt,control:e.createElement(S.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Xt},value:Xt,name:Xt,onChange:Qt,checked:((Y=re[St])!=null?Y:[]).includes(Xt)}),label:Xt})}))},M=({className:ht,name:St,defaultValue:Wt,values:zt=[]})=>{const Dt=j(),{filters:re,setFilters:Ft}=(0,y.Rx)();(0,e.useEffect)(()=>{typeof Wt=="string"&&Ft(Xt=>({...Xt,[St]:Wt}))},[]);const Qt=Xt=>{const{target:{value:Y}}=Xt;Ft(v=>{const{[St]:L,...J}=v;return Y?{...J,[St]:Y}:J})};return e.createElement(m.Z,{className:ht,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},e.createElement(b.Z,{className:Dt.label,margin:"dense"},St),e.createElement(T.Z,{variant:"outlined",value:re[St]||"",onChange:Qt},e.createElement(G.Z,{value:""},e.createElement("em",null,"All")),zt.map(Xt=>e.createElement(G.Z,{key:Xt,value:Xt},Xt))))},I=({component:ht,...St})=>e.createElement(ht,{...St});I.Checkbox=ht=>e.createElement(I,{...ht,component:D}),I.Select=ht=>e.createElement(I,{...ht,component:M});const K=null;var V=t(65678),ot=t(3992),vt=t(8542),Zt=t(7089),mt=t(49378),jt=t(62155),Lt=t(94339),Kt=t(32552),ae=t(24579),qt=t(27616),me=t(8284),le=t(70660),ce=t(11776),Ae=t(85256),Me=t(38402),ye=t(86136),ve=t(38016),he=t(56881);const Ne=(0,l.Z)(ht=>({card:{backgroundColor:"rgba(0, 0, 0, .11)"},cardContent:{paddingTop:ht.spacing(1)},icon:{color:ht.palette.common.black},list:{width:"100%"},listItemIcon:{width:"24px",height:"24px"},accordion:{backgroundColor:ht.palette.background.paper},accordionSummary:{minHeight:"auto","&.Mui-expanded":{minHeight:"auto"}},accordionSummaryContent:{margin:ht.spacing(2,0),"&.Mui-expanded":{margin:ht.spacing(2,0)}},accordionDetails:{padding:ht.spacing(0,0,1)}})),Ue=ht=>{const St=Ne(),{setPageCursor:Wt,setTypes:zt,types:Dt}=(0,y.Rx)(),[re,Ft]=(0,e.useState)(!0),{defaultValue:Qt,name:Xt,types:Y}=ht,v=()=>Ft(yt=>!yt),L=yt=>()=>{zt(yt!==""?[yt]:[]),Wt(void 0),Ft(!1)};(0,e.useEffect)(()=>{Qt&&zt([Qt])},[]);const J=[{value:"",name:"All",icon:e.createElement(he.Z,null)},...Y],et=Dt[0]||"";return e.createElement(Lt.Z,{className:St.card},e.createElement(Kt.Z,{title:Xt,titleTypographyProps:{variant:"overline"}}),e.createElement(ae.Z,{className:St.cardContent},e.createElement(qt.Z,{className:St.accordion,expanded:re,onChange:v},e.createElement(me.Z,{classes:{root:St.accordionSummary,content:St.accordionSummaryContent},expandIcon:e.createElement(ve.Z,{className:St.icon}),IconButtonProps:{size:"small"}},re?"Collapse":J.filter(yt=>yt.value===et)[0].name),e.createElement(le.Z,{classes:{root:St.accordionDetails}},e.createElement(ce.Z,{className:St.list,component:"nav","aria-label":"filter by type",disablePadding:!0,dense:!0},J.map(yt=>e.createElement(e.Fragment,{key:yt.value},e.createElement(Ae.Z,null),e.createElement(Me.Z,{selected:Dt[0]===yt.value||Dt.length===0&&yt.value==="",onClick:L(yt.value),button:!0},e.createElement(ye.Z,null,(0,e.cloneElement)(yt.icon,{className:St.listItemIcon})),e.createElement(mt.Z,{primary:yt.name})))))))))};var Ie=t(99152),Le=t(6487);const fe=(0,l.Z)(ht=>({tabs:{borderBottom:`1px solid ${ht.palette.textVerySubtle}`,padding:ht.spacing(0,4)},tab:{height:"50px",fontWeight:ht.typography.fontWeightBold,fontSize:ht.typography.pxToRem(13),color:ht.palette.textSubtle,minWidth:"130px"}})),Re=ht=>{const St=fe(),{setPageCursor:Wt,setTypes:zt,types:Dt}=(0,y.Rx)(),{defaultValue:re,types:Ft}=ht,Qt=(Y,v)=>{zt(v!==""?[v]:[]),Wt(void 0)};(0,e.useEffect)(()=>{re&&zt([re])},[]);const Xt=[{value:"",name:"All"},...Ft];return e.createElement(Ie.Z,{className:St.tabs,indicatorColor:"primary",value:Dt.length===0?"":Dt[0],onChange:Qt},Xt.map(Y=>e.createElement(Le.Z,{className:St.tab,disableRipple:!0,label:Y.name,value:Y.value})))},ze=(0,l.Z)(ht=>({label:{textTransform:"capitalize"},chips:{display:"flex",flexWrap:"wrap",marginTop:ht.spacing(1)},chip:{margin:2}})),xt=ht=>{const{className:St,defaultValue:Wt,name:zt,values:Dt=[]}=ht,re=ze(),{types:Ft,setTypes:Qt}=(0,y.Rx)();(0,jt.Z)(()=>{Ft.length||(Wt&&Array.isArray(Wt)?Qt(Wt):Wt&&Qt([Wt]))});const Xt=Y=>{const v=Y.target.value;Qt(v)};return e.createElement(m.Z,{className:St,variant:"filled",fullWidth:!0,"data-testid":"search-typefilter-next"},e.createElement(b.Z,{className:re.label,margin:"dense"},zt),e.createElement(T.Z,{multiple:!0,variant:"outlined",value:Ft,onChange:Xt,placeholder:"All Results",renderValue:Y=>e.createElement("div",{className:re.chips},Y.map(v=>e.createElement(Zt.Z,{key:v,label:v,className:re.chip,size:"small"})))},Dt.map(Y=>e.createElement(G.Z,{key:Y,value:Y},e.createElement(S.Z,{checked:Ft.indexOf(Y)>-1}),e.createElement(mt.Z,{primary:Y})))))};xt.Accordion=ht=>e.createElement(Ue,{...ht}),xt.Tabs=ht=>e.createElement(Re,{...ht});var se=t(19126),ie=t(20863),F=t(41682),R=t(36964);const P=ht=>{const St=useRouteRef(rootRouteRef),Wt=useNavigate(),zt=useCallback(Dt=>{const re=qs.stringify({query:Dt},{addQueryPrefix:!0});Wt(`${St()}${re}`)},[Wt,St]);return React.createElement(SidebarSearchField,{icon:ht.icon,onSearch:zt,to:"/search"})};var B=t(60905),W=t(86619),q=t(50581),ut=t(61837),st=t(4614),Tt=t(21853),wt=t(88013),oe=t(10289),Vt=t(48760),Rt=t(71226);const Pt=({entityId:ht,debounceTime:St=150})=>{const[Wt,zt]=(0,e.useState)(!1),Dt=(0,oe.s0)(),{term:re,setTerm:Ft,result:{loading:Qt,value:Xt}}=(0,y.Rx)(),[Y,v]=(0,e.useState)([]);(0,e.useEffect)(()=>{let ft=!0;if(ft&&Xt){const Bt=Xt.results.slice(0,10);v(Bt)}return()=>{ft=!1}},[Qt,Xt]);const[L,J]=(0,e.useState)(re);(0,Vt.Z)(()=>Ft(L),St,[L]);const et=ft=>{Wt||zt(!0),J(ft.target.value)},yt=(ft,Bt)=>{if(Bt==null?void 0:Bt.document){const{location:bt}=Bt.document;Dt(bt)}};return e.createElement(B.Z,{item:!0,xs:12},e.createElement(wt.ZP,{"data-testid":"techdocs-search-bar",size:"small",open:Wt,getOptionLabel:()=>"",filterOptions:ft=>ft,onClose:()=>{zt(!1)},onFocus:()=>{zt(!0)},onChange:yt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Y,renderOption:({document:ft})=>e.createElement(Rt.O,{result:ft,lineClamp:3,asListItem:!1,asLink:!1,title:ft.title}),loading:Qt,renderInput:ft=>e.createElement(W.Z,{...ft,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${ht.name} docs`,value:L,onChange:et,InputProps:{...ft.InputProps,startAdornment:e.createElement(q.Z,{position:"start"},e.createElement(ut.Z,{"aria-label":"Query",disabled:!0},e.createElement(Tt.Z,null))),endAdornment:e.createElement(e.Fragment,null,Qt?e.createElement(st.Z,{color:"inherit",size:20}):null,ft.InputProps.endAdornment)}})}))},_t=ht=>{const St={term:"",types:["techdocs"],pageCursor:"",filters:ht.entityId};return e.createElement(y.Nd,{initialState:St},e.createElement(Pt,{...ht}))}},25921:function(X,o,t){"use strict";t.d(o,{N:function(){return M}});var r=t(2784),e=t(41682),l=t(79692),h=t(4614),c=t(77277),s=t(99688),u=t(12420),d=t(60905),y=t(90436),m=t(61837),E=t(4190),i=t(87685);const S=(0,l.Z)(I=>(0,u.Z)({paper:{width:"100%",[I.breakpoints.up("sm")]:{width:"75%"},[I.breakpoints.up("md")]:{width:"50%"},padding:I.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:I.palette.background.default}})),b=({buildLog:I,onClose:K})=>{const V=S(),ot=I.length===0?"Waiting for logs...":I.join(`
141
- `);return r.createElement(d.Z,{container:!0,direction:"column",className:V.root,spacing:0,wrap:"nowrap"},r.createElement(d.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(y.Z,{variant:"h5"},"Build Details"),r.createElement(m.Z,{key:"dismiss",title:"Close the drawer",onClick:K,color:"inherit"},r.createElement(i.Z,null))),r.createElement(e.LogViewer,{text:ot,classes:{root:V.logs}}))},T=({buildLog:I})=>{const K=S(),[V,ot]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(c.Z,{color:"inherit",onClick:()=>ot(!0)},"Show Build Logs"),r.createElement(E.ZP,{classes:{paper:K.paper},anchor:"right",open:V,onClose:()=>ot(!1)},r.createElement(b,{buildLog:I,onClose:()=>ot(!1)})))};var G=t(94252),j=t(75448);const D=(0,l.Z)(()=>({message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),M=()=>{let I=null;const K=D(),{state:V,contentReload:ot,contentErrorMessage:vt,syncErrorMessage:Zt,buildLog:mt}=(0,j.DK)(),jt=V==="CHECKING"?r.createElement(e.Progress,null):null;return V==="INITIAL_BUILD"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(T,{buildLog:mt})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),V==="CONTENT_STALE_REFRESHING"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(T,{buildLog:mt})},"A newer version of this documentation is being prepared and will be available shortly.")),V==="CONTENT_STALE_READY"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"success",action:r.createElement(c.Z,{color:"inherit",onClick:()=>ot()},"Refresh")},"A newer version of this documentation is now available, please refresh to view.")),V==="CONTENT_STALE_ERROR"&&(I=r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:mt}),classes:{message:K.message}},"Building a newer version of this documentation failed."," ",Zt)),V==="CONTENT_NOT_FOUND"&&(I=r.createElement(r.Fragment,null,Zt&&r.createElement(s.Z,{variant:"outlined",severity:"error",action:r.createElement(T,{buildLog:mt}),classes:{message:K.message}},"Building a newer version of this documentation failed."," ",Zt),r.createElement(G.T,{errorMessage:vt}))),r.createElement(r.Fragment,null,jt,I)}},73873:function(X,o,t){"use strict";t.d(o,{Ej:function(){return r.Ej},EV:function(){return e.TechDocsPage},nN:function(){return l.n}});var r=t(75448),e=t(31752),l=t(46025),h=t(25921),c=t(7735)},68725:function(X,o,t){"use strict";t.d(o,{_Z:function(){return e},Fw:function(){return l},pd:function(){return h}});var r=t(36964);const e=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},19133:function(X,o,t){"use strict";X.exports=t.p+"static/createComponent.975d1e1e..svg"},86284:function(X,o,t){"use strict";X.exports=t.p+"static/missingAnnotation.67f79e98..svg"},3871:function(X,o,t){"use strict";X.exports=t.p+"static/noBuild.1715fa71..svg"},96465:function(X,o,t){"use strict";X.exports=t.p+"static/noInformation.4b426325..svg"},29788:function(X,o,t){"use strict";X.exports=t.p+"static/mic-drop.fe3ef4d0..svg"},219:function(X,o,t){"use strict";X.exports=t.p+"static/illo.7884c54f..svg"},53260:function(){}},function(X){var o=function(r){return X(X.s=r)};X.O(0,[2370,6202,9284,2126,7012,5218,4983,4736],function(){return o(88649),o(63865)});var t=X.O()}]);
142
-
143
- //# sourceMappingURL=main.93cc9d71.js.map