@techdocs/cli 1.1.1-next.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/cjs/{serve-aa1ff626.cjs.js → serve-48337ec4.cjs.js} +5 -5
- package/dist/cjs/serve-48337ec4.cjs.js.map +1 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/1553.0a1ffcc9.chunk.js +3 -0
- package/dist/embedded-app/static/{1553.a6edce0e.chunk.js.map → 1553.0a1ffcc9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1959.55365235.chunk.js → 1959.54b727f3.chunk.js} +2 -2
- package/dist/embedded-app/static/{1959.55365235.chunk.js.map → 1959.54b727f3.chunk.js.map} +1 -1
- package/dist/embedded-app/static/2426.75b31251.chunk.js +3 -0
- package/dist/embedded-app/static/{2426.b371eaed.chunk.js.map → 2426.75b31251.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3860.8a0dac3d.chunk.js +3 -0
- package/dist/embedded-app/static/3860.8a0dac3d.chunk.js.map +1 -0
- package/dist/embedded-app/static/390.97868757.chunk.js +3 -0
- package/dist/embedded-app/static/{390.5623153b.chunk.js.map → 390.97868757.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4022.f3d67914.chunk.js +3 -0
- package/dist/embedded-app/static/{4022.6f52e9cc.chunk.js.map → 4022.f3d67914.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6235.5c01917c.chunk.js +3 -0
- package/dist/embedded-app/static/{6235.7e3710fd.chunk.js.map → 6235.5c01917c.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7110.4f2d78ba.chunk.js +3 -0
- package/dist/embedded-app/static/{7110.7d2c1934.chunk.js.map → 7110.4f2d78ba.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7758.e94e2380.chunk.js +3 -0
- package/dist/embedded-app/static/{7758.f316879f.chunk.js.map → 7758.e94e2380.chunk.js.map} +1 -1
- package/dist/embedded-app/static/8061.a19d3b9a.chunk.js +3 -0
- package/dist/embedded-app/static/{8061.3f3d9ba3.chunk.js.map → 8061.a19d3b9a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/8792.2624b294.chunk.js +3 -0
- package/dist/embedded-app/static/{8792.b1d581fc.chunk.js.map → 8792.2624b294.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9028.e4b797db.chunk.js +3 -0
- package/dist/embedded-app/static/{9028.abe94909.chunk.js.map → 9028.e4b797db.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.f8792fde.js +476 -0
- package/dist/embedded-app/static/main.f8792fde.js.map +1 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js +25 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.84a6ac87.js → module-material-ui.2f7d5af1.js} +2 -2
- package/dist/embedded-app/static/module-material-ui.2f7d5af1.js.map +1 -0
- package/dist/embedded-app/static/{runtime.42d41e6f.js → runtime.f8792fde.js} +2 -2
- package/dist/embedded-app/static/runtime.f8792fde.js.map +1 -0
- package/dist/embedded-app/static/vendor.f8792fde.js +103 -0
- package/dist/embedded-app/static/vendor.f8792fde.js.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/package.json +9 -9
- package/dist/cjs/serve-aa1ff626.cjs.js.map +0 -1
- package/dist/embedded-app/static/1553.a6edce0e.chunk.js +0 -3
- package/dist/embedded-app/static/2426.b371eaed.chunk.js +0 -3
- package/dist/embedded-app/static/3860.da7e5f63.chunk.js +0 -3
- package/dist/embedded-app/static/3860.da7e5f63.chunk.js.map +0 -1
- package/dist/embedded-app/static/390.5623153b.chunk.js +0 -3
- package/dist/embedded-app/static/4022.6f52e9cc.chunk.js +0 -3
- package/dist/embedded-app/static/6235.7e3710fd.chunk.js +0 -3
- package/dist/embedded-app/static/7110.7d2c1934.chunk.js +0 -3
- package/dist/embedded-app/static/7758.f316879f.chunk.js +0 -3
- package/dist/embedded-app/static/8061.3f3d9ba3.chunk.js +0 -3
- package/dist/embedded-app/static/8792.b1d581fc.chunk.js +0 -3
- package/dist/embedded-app/static/9028.abe94909.chunk.js +0 -3
- package/dist/embedded-app/static/main.42d41e6f.js +0 -476
- package/dist/embedded-app/static/main.42d41e6f.js.map +0 -1
- package/dist/embedded-app/static/module-aria-query.f720b73c.js +0 -9
- package/dist/embedded-app/static/module-aria-query.f720b73c.js.map +0 -1
- package/dist/embedded-app/static/module-hot-loader.7955a91c.js +0 -32
- package/dist/embedded-app/static/module-hot-loader.7955a91c.js.map +0 -1
- package/dist/embedded-app/static/module-material-ui.84a6ac87.js.map +0 -1
- package/dist/embedded-app/static/module-testing-library.633b23c6.js +0 -57
- package/dist/embedded-app/static/module-testing-library.633b23c6.js.map +0 -1
- package/dist/embedded-app/static/runtime.42d41e6f.js.map +0 -1
- package/dist/embedded-app/static/vendor.42d41e6f.js +0 -117
- package/dist/embedded-app/static/vendor.42d41e6f.js.map +0 -1
|
@@ -1,476 +0,0 @@
|
|
|
1
|
-
(()=>{var Ws=Object.defineProperty;var Hs=(q,i,e)=>i in q?Ws(q,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):q[i]=e;var Q=(q,i,e)=>(Hs(q,typeof i!="symbol"?i+"":i,e),e),ia=(q,i,e)=>{if(!i.has(q))throw TypeError("Cannot "+e)};var Je=(q,i,e)=>(ia(q,i,"read from private field"),e?e.call(q):i.get(q)),In=(q,i,e)=>{if(i.has(q))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(q):i.set(q,e)},Un=(q,i,e,r)=>(ia(q,i,"write to private field"),r?r.call(q,e):i.set(q,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(q,i,e){"use strict";e.d(i,{n3:function(){return v},MS:function(){return m}});var r=e(48023),t=e(10179),c=e(96279),h=e.n(c);const v=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(s){Q(this,"discoveryApi");Q(this,"fetchApi");this.discoveryApi=s.discoveryApi,this.fetchApi=s.fetchApi||{fetch:h()}}async getEntityAncestors(s,f){const{kind:y,namespace:u,name:A}=(0,r.of)(s.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}/ancestry`,f)}async getLocationById(s,f){return await this.requestOptional("GET",`/locations/${encodeURIComponent(s)}`,f)}async getEntities(s,f){const{filter:y=[],fields:u=[],offset:A,limit:b,after:S}=s!=null?s:{},D=[];for(const $ of[y].flat()){const B=[];for(const[x,Y]of Object.entries($))for(const te of[Y].flat())te===v?B.push(encodeURIComponent(x)):typeof te=="string"&&B.push(`${encodeURIComponent(x)}=${encodeURIComponent(te)}`);B.length&&D.push(`filter=${B.join(",")}`)}u.length&&D.push(`fields=${u.map(encodeURIComponent).join(",")}`),A!==void 0&&D.push(`offset=${A}`),b!==void 0&&D.push(`limit=${b}`),S!==void 0&&D.push(`after=${encodeURIComponent(S)}`);const _=D.length?`?${D.join("&")}`:"",M=await this.requestRequired("GET",`/entities${_}`,f),L=($,B)=>{var te,Ee;if(((te=$.metadata)==null?void 0:te.name)===void 0||$.kind===void 0||((Ee=B.metadata)==null?void 0:Ee.name)===void 0||B.kind===void 0)return 0;const x=(0,r.eE)($),Y=(0,r.eE)(B);return x<Y?-1:x>Y?1:0};return{items:M.sort(L)}}async getEntityByRef(s,f){const{kind:y,namespace:u,name:A}=(0,r.of)(s);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,f)}async getEntityByName(s,f){const{kind:y,namespace:u="default",name:A}=s;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,f)}async refreshEntity(s,f){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(f==null?void 0:f.token)&&{Authorization:`Bearer ${f==null?void 0:f.token}`}},method:"POST",body:JSON.stringify({entityRef:s})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(s,f){const{filter:y=[],facets:u}=s,A=[];for(const S of[y].flat()){const D=[];for(const[_,M]of Object.entries(S))for(const L of[M].flat())L===v?D.push(encodeURIComponent(_)):typeof L=="string"&&D.push(`${encodeURIComponent(_)}=${encodeURIComponent(L)}`);D.length&&A.push(`filter=${D.join(",")}`)}for(const S of u)A.push(`facet=${encodeURIComponent(S)}`);const b=A.length?`?${A.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${b}`,f)}async addLocation({type:s="url",target:f,dryRun:y},u){const A=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({type:s,target:f})});if(A.status!==201)throw new Error(await A.text());const{location:b,entities:S,exists:D}=await A.json();if(!b)throw new Error(`Location wasn't added: ${f}`);return{location:b,entities:S,exists:D}}async getLocationByRef(s,f){return(await this.requestRequired("GET","/locations",f)).map(u=>u.data).find(u=>s===(0,r.NZ)(u))}async removeLocationById(s,f){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(s)}`,f)}async removeEntityByUid(s,f){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(s)}`,f)}async requestIgnored(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(u,{method:s,headers:A});if(!b.ok)throw await t.VL.fromResponse(b)}async requestRequired(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(u,{method:s,headers:A});if(!b.ok)throw await t.VL.fromResponse(b);return await b.json()}async requestOptional(s,f,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${f}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},b=await this.fetchApi.fetch(u,{method:s,headers:A});if(!b.ok){if(b.status===404)return;throw await t.VL.fromResponse(b)}return await b.json()}}},48023:function(q,i,e){"use strict";e.d(i,{Tf:function(){return c},P1:function(){return sn},q1:function(){return z},M6:function(){return R},l2:function(){return t},zG:function(){return r},w$:function(){return ae},nP:function(){return j},aS:function(){return He},S4:function(){return Mt},cz:function(){return Se},iB:function(){return Ie},of:function(){return Ze},Ou:function(){return P},eE:function(){return ke},NZ:function(){return ce}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url";var h=e(76635),v=e.n(h);class m{constructor(F=DEFAULT_NAMESPACE){Q(this,"namespace");this.namespace=F}async enforce(F){return F.metadata.namespace?F:lodash.merge({metadata:{namespace:this.namespace}},F)}}class a{static isValidPrefixAndOrSuffix(F,re,de,Pe){if(typeof F!="string")return!1;const pe=F.split(re);return pe.length===1?Pe(pe[0]):pe.length===2?de(pe[0])&&Pe(pe[1]):!1}static isJsonSafe(F){try{return v().isEqual(F,JSON.parse(JSON.stringify(F)))}catch{return!1}}static isValidDnsSubdomain(F){return typeof F=="string"&&F.length>=1&&F.length<=253&&F.split(".").every(a.isValidDnsLabel)}static isValidDnsLabel(F){return typeof F=="string"&&F.length>=1&&F.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(F)}static isValidTag(F){return typeof F=="string"&&F.length>=1&&F.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(F)}static isValidUrl(F){if(typeof F!="string")return!1;try{return new URL(F),!0}catch{return!1}}static isValidString(F){var re;return typeof F=="string"&&((re=F==null?void 0:F.trim())==null?void 0:re.length)>=1}static isNonEmptyString(F){var re;return typeof F=="string"&&((re=F==null?void 0:F.trim())==null?void 0:re.length)>=1}}var s=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),f=e(48231),y=e.n(f),u=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"}}}`),A=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}}}'),b=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 S=new Map,D=[s,u,A,b];function _(Z){if(!(Z!=null&&Z.length))throw new TypeError("Unknown error");const F=Z[0];throw new TypeError(`${F.instancePath||"<root>"} ${F.message}${F.params?` - ${Object.entries(F.params).map(([re,de])=>`${re}: ${de}`).join(", ")}`:""}`)}function M(Z,F={}){var ze;const re=(ze=F==null?void 0:F.disableCache)!=null?ze:!1,de=re?"":JSON.stringify(Z);if(!re){const et=S.get(de);if(et)return et}const Pe=L(Z),pe=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});Pe.length&&pe.addSchema(Pe,void 0,void 0,!0);const Me=pe.compile(Z);return re||S.set(de,Me),Me}function L(Z){if(typeof Z!="object")return[];const F=new Set;Z.$id&&F.add(Z.$id);const re=new Array,de=[Z];for(;de.length;){const Pe=de.pop();for(const pe of $(Pe))if(!F.has(pe)){F.add(pe);const Me=D.find(ze=>ze.$id===pe);Me&&(re.push(Me),de.push(Me))}}return re}function*$(Z){const F=[Z];for(;F.length;){const re=F.pop();if(typeof re=="object"&&re)for(const[de,Pe]of Object.entries(re))de==="$ref"&&typeof Pe=="string"?yield Pe.split("#")[0]:F.push(Pe)}}function B(Z){const F=compileAjvSchema(Z||entityEnvelopeSchema);return re=>{if(F(re)===!0)return re;throw throwAjvError(F.errors)}}function x(Z){const F=M(Z);return re=>{var pe;if(F(re)===!0)return re;const Pe=(pe=F.errors)==null?void 0:pe.filter(Me=>["/kind","/apiVersion"].includes(Me.instancePath));if((Pe==null?void 0:Pe.length)&&Pe.every(Me=>Me.keyword==="enum"))return!1;throw _(F.errors)}}function Y(Z){const F=compileAjvSchema(Z||entitySchema);return re=>{if(F(re)===!0)return re;throw throwAjvError(F.errors)}}class te{static isValidApiVersion(F){return a.isValidPrefixAndOrSuffix(F,"/",a.isValidDnsSubdomain,re=>re.length>=1&&re.length<=63&&/^[a-z0-9A-Z]+$/.test(re))}static isValidKind(F){return typeof F=="string"&&F.length>=1&&F.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(F)}static isValidObjectName(F){return typeof F=="string"&&F.length>=1&&F.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(F)}static isValidNamespace(F){return a.isValidDnsLabel(F)}static isValidLabelKey(F){return a.isValidPrefixAndOrSuffix(F,"/",a.isValidDnsSubdomain,te.isValidObjectName)}static isValidLabelValue(F){return F===""||te.isValidObjectName(F)}static isValidAnnotationKey(F){return a.isValidPrefixAndOrSuffix(F,"/",a.isValidDnsSubdomain,te.isValidObjectName)}static isValidAnnotationValue(F){return typeof F=="string"}}const Ee={isValidApiVersion:te.isValidApiVersion,isValidKind:te.isValidKind,isValidEntityName:te.isValidObjectName,isValidNamespace:te.isValidNamespace,isValidLabelKey:te.isValidLabelKey,isValidLabelValue:te.isValidLabelValue,isValidAnnotationKey:te.isValidAnnotationKey,isValidAnnotationValue:te.isValidAnnotationValue,isValidTag:Z=>typeof Z=="string"&&Z.length>=1&&Z.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(Z)};function Ge(Z={}){return{...Ee,...Z}}class Ke{constructor(F=makeValidator()){Q(this,"validators");this.validators=F}async enforce(F){var Me,ze,et,St,at,ut,Wt;function re(Ye,yt,$t){if(yt==null)throw new Error(`${Ye} must have a value`);let dt;try{dt=$t(yt)}catch(Qe){throw new Error(`${Ye} could not be validated, ${Qe}`)}if(!dt){let Qe;switch($t.name){case"isValidLabelValue":case"isValidObjectName":Qe="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":Qe="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Qe="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Qe="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Qe="a string";break;case"isValidKind":Qe="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Qe="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":Qe="a non empty string";break;default:Qe=void 0;break}const Xe=Qe?` expected ${Qe} but found "${yt}".`:"";throw new Error(`"${Ye}" is not valid;${Xe} 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 de(Ye,yt,$t){return yt===void 0||re(Ye,yt,$t)}re("apiVersion",F.apiVersion,this.validators.isValidApiVersion),re("kind",F.kind,this.validators.isValidKind),re("metadata.name",F.metadata.name,this.validators.isValidEntityName),de("metadata.namespace",F.metadata.namespace,this.validators.isValidNamespace);for(const[Ye,yt]of Object.entries((Me=F.metadata.labels)!=null?Me:[]))re(`labels.${Ye}`,Ye,this.validators.isValidLabelKey),re(`labels.${Ye}`,yt,this.validators.isValidLabelValue);for(const[Ye,yt]of Object.entries((ze=F.metadata.annotations)!=null?ze:[]))re(`annotations.${Ye}`,Ye,this.validators.isValidAnnotationKey),re(`annotations.${Ye}`,yt,this.validators.isValidAnnotationValue);const Pe=(et=F.metadata.tags)!=null?et:[];for(let Ye=0;Ye<Pe.length;++Ye)re(`tags.${Ye}`,Pe[Ye],this.validators.isValidTag);const pe=(St=F.metadata.links)!=null?St:[];for(let Ye=0;Ye<pe.length;++Ye)re(`links.${Ye}.url`,(at=pe[Ye])==null?void 0:at.url,CommonValidatorFunctions.isValidUrl),de(`links.${Ye}.title`,(ut=pe[Ye])==null?void 0:ut.title,CommonValidatorFunctions.isNonEmptyString),de(`links.${Ye}.icon`,(Wt=pe[Ye])==null?void 0:Wt.icon,KubernetesValidatorFunctions.isValidObjectName);return F}}class fe{constructor(){Q(this,"validate")}async enforce(F){if(!this.validate){const Pe=new Ajv({allowUnionTypes:!0});this.validate=Pe.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(F)===!0)return F;const[de]=this.validate.errors||[];throw de?new Error(`Malformed envelope, ${de.instancePath||"<root>"} ${de.message}`):new Error("Malformed envelope, Unknown error")}}function ye(Z){let F=Z.indexOf(":");const re=Z.indexOf("/");re!==-1&&re<F&&(F=-1);const de=F===-1?void 0:Z.slice(0,F),Pe=re===-1?void 0:Z.slice(F+1,re),pe=Z.slice(Math.max(F+1,re+1));if(de===""||Pe===""||pe==="")throw new TypeError(`Entity reference "${Z}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:de,namespace:Pe,name:pe}}function Ie(Z){return{kind:Z.kind,namespace:Z.metadata.namespace||r,name:Z.metadata.name}}function Ze(Z,F){var ze,et,St,at;if(!Z)throw new Error("Entity reference must not be empty");const re=F==null?void 0:F.defaultKind,de=(F==null?void 0:F.defaultNamespace)||r;let Pe,pe,Me;if(typeof Z=="string"){const ut=ye(Z);Pe=(ze=ut.kind)!=null?ze:re,pe=(et=ut.namespace)!=null?et:de,Me=ut.name}else Pe=(St=Z.kind)!=null?St:re,pe=(at=Z.namespace)!=null?at:de,Me=Z.name;if(Pe)if(pe){if(!Me){const ut=JSON.stringify(Z);throw new Error(`Entity reference ${ut} had missing or empty name`)}}else{const ut=JSON.stringify(Z);throw new Error(`Entity reference ${ut} had missing or empty namespace`)}else{const ut=JSON.stringify(Z);throw new Error(`Entity reference ${ut} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:Pe,namespace:pe,name:Me}}function ke(Z){var Pe,pe;let F,re,de;return"metadata"in Z?(F=Z.kind,re=(Pe=Z.metadata.namespace)!=null?Pe:r,de=Z.metadata.name):(F=Z.kind,re=(pe=Z.namespace)!=null?pe:r,de=Z.name),`${F.toLocaleLowerCase("en-US")}:${re.toLocaleLowerCase("en-US")}/${de.toLocaleLowerCase("en-US")}`}class ct{constructor(F){this.policies=F}async enforce(F){let re=F;for(const de of this.policies){const Pe=await de.enforce(re);if(!Pe)throw new Error(`Policy ${de.constructor.name} did not return a result`);re=Pe}return re}}class st{constructor(F){this.policies=F}async enforce(F){for(const re of this.policies){const de=await re.enforce(F);if(de)return de}throw new Error("The entity did not match any known policy")}}const Ce={allOf(Z){return new ct(Z)},oneOf(Z){return new st(Z)}};var Ne=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(Z){const F=x(Z);return{async check(re){return F(re)===re}}}const lt=Fe(Ne);var Ve=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(Ve);var ht=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 wt=Fe(ht);var jt=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 Lt=Fe(jt);var Gt=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 zt=Fe(Gt),Mt="ownedBy",An="ownerOf",Vt="consumesApi",Et="apiConsumedBy",un="providesApi",se="apiProvidedBy",j="dependsOn",ae="dependencyOf",ue="parentOf",ve="childOf",Le="memberOf",we="hasMember",Se="partOf",He="hasPart";var ft=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 Tt=Fe(ft);var vt=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"SystemV1alpha1","description":"A system is a collection of resources and components. The system may expose or consume one or several APIs. It is viewed as abstraction level that provides potential consumers insights into exposed features without needing a too detailed view into the details of all components. This also gives the owning team the possibility to decide about published artifacts and APIs.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"System","metadata":{"name":"artist-engagement-portal","description":"Handy tools to keep artists in the loop"},"spec":{"owner":"artist-relations-team","domain":"artists"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["System"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"domain":{"type":"string","description":"An entity reference to the domain that the system belongs to.","examples":["artists"],"minLength":1}}}}}]}');const ot=Fe(vt);var Rt=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 mt=Fe(Rt),sn="backstage.io/managed-by-location",z="backstage.io/managed-by-origin-location",R="backstage.io/source-location";function P(Z){if(typeof Z!="string")throw new TypeError(`Unable to parse location ref '${Z}', unexpected argument ${typeof Z}`);const F=Z.indexOf(":");if(F<0)throw new TypeError(`Unable to parse location ref '${Z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const re=Z.substring(0,F).trim(),de=Z.substring(F+1).trim();if(!re||!de)throw new TypeError(`Unable to parse location ref '${Z}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(re==="http"||re==="https")throw new TypeError(`Invalid location ref '${Z}', please prefix it with 'url:', e.g. 'url:${Z}'`);return{type:re,target:de}}function ce(Z){const{type:F,target:re}=Z;if(F){if(!re)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${F}:${re}`}function me(Z){var re,de,Pe,pe,Me;const F=(Me=(de=(re=Z.metadata)==null?void 0:re.annotations)==null?void 0:de[ANNOTATION_SOURCE_LOCATION])!=null?Me:(pe=(Pe=Z.metadata)==null?void 0:Pe.annotations)==null?void 0:pe[ANNOTATION_LOCATION];if(!F)throw new Error(`Entity '${stringifyEntityRef(Z)}' is missing location`);return P(F)}},62159:function(q,i,e){"use strict";e.d(i,{m:function(){return f}});var r=e(9850),t=e.n(r),c=e(12782),h=e.n(c);const v=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function m(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function a(y){if(y===null)return"null";if(Array.isArray(y))return"array";const u=typeof y;return u==="number"&&isNaN(y)?"nan":u==="string"&&y===""?"empty-string":u}const s={type(y,u,A,b){return`Invalid type in config for key '${y}' in '${u}', got ${A}, wanted ${b}`},missing(y){return`Missing required config value at '${y}'`},convert(y,u,A){return`Unable to convert config value for key '${y}' in '${u}' to a ${A}`}};class f{constructor(u,A="mock-config",b,S=""){Q(this,"filteredKeys");Q(this,"notifiedFilteredKeys",new Set);this.data=u,this.context=A,this.fallback=b,this.prefix=S}static fromConfigs(u){return u.length===0?new f(void 0):u.reduce((A,{data:b,context:S,filteredKeys:D,deprecatedKeys:_})=>{const M=new f(b,S,A);if(M.filteredKeys=D,_)for(const{key:L,description:$}of _)console.warn(`The configuration key '${L}' of ${S} is deprecated and may be removed soon. ${$||""}`);return M},void 0)}has(u){var b,S;return this.readValue(u)!==void 0?!0:(S=(b=this.fallback)==null?void 0:b.has(u))!=null?S:!1}keys(){var b,S;const u=this.data?Object.keys(this.data):[],A=(S=(b=this.fallback)==null?void 0:b.keys())!=null?S:[];return[...new Set([...u,...A])]}get(u){const A=this.getOptional(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u!=null?u:"")));return A}getOptional(u){var S;const A=t()(this.readValue(u)),b=(S=this.fallback)==null?void 0:S.getOptional(u);return A===void 0?b:b===void 0?A:h()({},{value:b},{value:A},(D,_)=>!m(_)||!m(D)?_:void 0).value}getConfig(u){const A=this.getOptionalConfig(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfig(u){var S;const A=this.readValue(u),b=(S=this.fallback)==null?void 0:S.getOptionalConfig(u);if(m(A))return this.copy(A,u,b);if(A!==void 0)throw new TypeError(s.type(this.fullKey(u),this.context,a(A),"object"));return b}getConfigArray(u){const A=this.getOptionalConfigArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfigArray(u){const A=this.readConfigValue(u,b=>{if(!Array.isArray(b))return{expected:"object-array"};for(const[S,D]of b.entries())if(!m(D))return{expected:"object-array",value:D,key:`${u}[${S}]`};return!0});if(!!A)return A.map((b,S)=>this.copy(b,`${u}[${S}]`))}getNumber(u){const A=this.getOptionalNumber(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalNumber(u){const A=this.readConfigValue(u,S=>typeof S=="number"||typeof S=="string"||{expected:"number"});if(typeof A=="number"||A===void 0)return A;const b=Number(A);if(!Number.isFinite(b))throw new Error(s.convert(this.fullKey(u),this.context,"number"));return b}getBoolean(u){const A=this.getOptionalBoolean(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalBoolean(u){return this.readConfigValue(u,A=>typeof A=="boolean"||{expected:"boolean"})}getString(u){const A=this.getOptionalString(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalString(u){return this.readConfigValue(u,A=>typeof A=="string"&&A!==""||{expected:"string"})}getStringArray(u){const A=this.getOptionalStringArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalStringArray(u){return this.readConfigValue(u,A=>{if(!Array.isArray(A))return{expected:"string-array"};for(const[b,S]of A.entries())if(typeof S!="string"||S==="")return{expected:"string-array",value:S,key:`${u}[${b}]`};return!0})}fullKey(u){return`${this.prefix}${this.prefix?".":""}${u}`}copy(u,A,b){const S=new f(u,this.context,b,this.fullKey(A));return S.filteredKeys=this.filteredKeys,S}readConfigValue(u,A){var D;const b=this.readValue(u);if(b===void 0)return(D=this.fallback)==null?void 0:D.readConfigValue(u,A);const S=A(b);if(S!==!0){const{key:_=u,value:M=b,expected:L}=S;throw new TypeError(s.type(this.fullKey(_),this.context,a(M),L))}return b}readValue(u){const A=u?u.split("."):[];for(const S of A)if(!v.test(S))throw new TypeError(`Invalid config key '${u}'`);if(this.data===void 0)return;let b=this.data;for(const[S,D]of A.entries())if(m(b))b=b[D];else if(b!==void 0){const _=this.fullKey(A.slice(0,S).join("."));throw new TypeError(s.type(_,this.context,a(b),"object"))}return b}}},23235:function(q,i,e){"use strict";e.d(i,{C:function(){return t}});var r=e(98005);class t{constructor(){Q(this,"subject",new r.J)}post(h){this.subject.next(h)}alert$(){return this.subject}}},47150:function(q,i,e){"use strict";e.d(i,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(q,i,e){"use strict";e.d(i,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(v){Q(this,"activeThemeId");Q(this,"subject",new r.X(void 0));this.themes=v}static createWithStorage(v){var s;const m=new c(v);if(!window.localStorage)return m;const a=(s=window.localStorage.getItem(t))!=null?s:void 0;return m.setActiveThemeId(a),m.activeThemeId$().subscribe(f=>{f?window.localStorage.setItem(t,f):window.localStorage.removeItem(t)}),window.addEventListener("storage",f=>{var y;if(f.key===t){const u=(y=localStorage.getItem(t))!=null?y:void 0;m.setActiveThemeId(u)}}),m}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(v){this.activeThemeId=v,this.subject.next(v)}}},22053:function(q,i,e){"use strict";e.d(i,{m:function(){return r.m}});var r=e(62159)},4333:function(q,i,e){"use strict";e.d(i,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(h){const v=h.split(/\{\{\s*pluginId\s*\}\}/),m=v.join("pluginId");let a;try{a=new URL(m)}catch{throw new Error(`${r} URL '${m}' is invalid`)}if(a.hash)throw new Error(`${r} URL must not have a hash`);if(a.search)throw new Error(`${r} URL must not have a query`);if(m.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(v)}constructor(h){this.parts=h}async getBaseUrl(h){return this.parts.join(h)}}},89536:function(q,i,e){"use strict";e.d(i,{KN:function(){return r},gr:function(){return c},Jv:function(){return h}});class r{constructor(m,a){this.alertApi=m,this.errorApi=a}post(m,a){return a!=null&&a.hidden||this.alertApi.post({message:m.message,severity:"error"}),this.errorApi.post(m,a)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){Q(this,"subject",new t.J)}post(m,a){this.subject.next({error:m,context:a})}error$(){return this.subject}}class h{static forward(m,a){window.addEventListener("unhandledrejection",s=>{m.post(s.reason,a)})}}},14884:function(q,i,e){"use strict";e.d(i,{b:function(){return c}});var r=e(36964);function t(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 c{constructor(){Q(this,"registeredFeatureFlags",[]);Q(this,"flags")}registerFlag(v){t(v.name),this.registeredFeatureFlags.push(v)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(v){return this.flags||(this.flags=this.load()),this.flags.get(v)===r.FeatureFlagState.Active}save(v){this.flags||(this.flags=this.load()),v.merge||this.flags.clear();for(const[a,s]of Object.entries(v.states))this.flags.set(a,s);const m=Array.from(this.flags.entries()).filter(([,a])=>a===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(m)))}load(){try{const v=window.localStorage.getItem("featureFlags");if(!v)return new Map;const m=JSON.parse(v);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const a=Object.entries(m).filter(([s,f])=>(t(s),f===r.FeatureFlagState.Active));return new Map(a)}catch{return new Map}}}},50160:function(q,i,e){"use strict";e.d(i,{I:function(){return a},j:function(){return r}});function r(s){var u;let f=s.baseImplementation||e.g.fetch;const y=[(u=s.middleware)!=null?u:[]].flat().reverse();for(const A of y)f=A.apply(f);return{fetch:f}}class t{static create(f){var b,S;const y=c(f),u=((b=f.header)==null?void 0:b.name)||"authorization",A=((S=f.header)==null?void 0:S.value)||(D=>`Bearer ${D}`);return new t(f.identityApi,y,u,A)}constructor(f,y,u,A){this.identityApi=f,this.allowUrl=y,this.headerName=u,this.headerValue=A}apply(f){return async(y,u)=>{const A=new Request(y,u),{token:b}=await this.identityApi.getCredentials();return A.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(A.url)?f(y,u):(A.headers.set(this.headerName,this.headerValue(b)),f(A))}}}function c(s){return s.allowUrl?s.allowUrl:s.urlPrefixAllowlist?h(s.urlPrefixAllowlist):s.config?h([s.config.getString("backend.baseUrl")]):()=>!1}function h(s){const f=s.map(y=>y.replace(/\/$/,""));return y=>f.some(u=>y===u||y.startsWith(`${u}/`))}function v(s,f){return!f||f==="/"?s:`${s.replace(/\/$/,"")}/${f.replace(/^\//,"")}`}class m{constructor(f){this.discoveryApi=f}apply(f){return async(y,u)=>{const A=new Request(y,u),b="plugin://";if(!A.url.startsWith(b))return f(y,u);const{hostname:S,pathname:D,search:_,hash:M,username:L,password:$}=new URL(`http://${A.url.substring(b.length)}`);let B=await this.discoveryApi.getBaseUrl(S);if(L||$){const Y=new URL(B),te=`${L}${$?`:${$}`:""}@`;B=`${Y.protocol}//${te}${Y.host}${Y.pathname}`}const x=`${v(B,D)}${_}${M}`;return f(x,typeof y=="string"?u:y)}}}class a{static resolvePluginProtocol(f){return new m(f.discoveryApi)}static injectIdentityAuth(f){return t.create(f)}constructor(){}}},11358:function(q,i,e){"use strict";e.d(i,{Y:function(){return v}});var r=e(98005);function t(m,a){for(const s of a)if(!m.has(s))return!1;return!0}function c(m,...a){const s=new Set(m);for(const f of a)for(const y of f)s.add(y);return s}class h{constructor(){Q(this,"requests",[]);Q(this,"subject",new r.X(this.getCurrentPending()))}request(a){return new Promise((s,f)=>{this.requests.push({scopes:a,resolve:s,reject:f}),this.subject.next(this.getCurrentPending())})}resolve(a,s){this.requests=this.requests.filter(f=>t(a,f.scopes)?(f.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(a){this.requests.forEach(s=>s.reject(a)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const a=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,f)=>c(s,f.scopes),this.requests[0].scopes);return{scopes:a,resolve:s=>{a&&this.resolve(a,s)},reject:s=>{a&&this.reject(s)}}}}class v{constructor(){Q(this,"subject",new r.X([]));Q(this,"currentRequests",[]);Q(this,"handlerCount",0)}createAuthRequester(a){const s=new h,f=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:y=>{const u=this.currentRequests.slice(),A=this.makeAuthRequest(y,a);A?u[f]=A:delete u[f],this.currentRequests=u,this.subject.next(u.filter(Boolean))}}),y=>s.request(y)}makeAuthRequest(a,s){const{scopes:f}=a;if(!!f)return{provider:s.provider,trigger:async()=>{const y=await s.onAuthRequest(f);a.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",a.reject(y)}}}authRequest$(){return this.subject}}},56054:function(q,i,e){"use strict";e.d(i,{C:function(){return h}});var r=e(82394),t=e.n(r);const c=new Map;class h{constructor(m,a){Q(this,"subscribers",new Set);Q(this,"observable",new(t())(m=>(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));this.namespace=m,this.errorApi=a}static create(m){var a;return new h((a=m.namespace)!=null?a:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let a,s="absent";try{const f=localStorage.getItem(this.getKeyName(m));f&&(a=JSON.parse(f,(y,u)=>(typeof u=="object"&&u!==null&&Object.freeze(u),u)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:a,presence:s}}forBucket(m){const a=`${this.namespace}/${m}`;return c.has(a)||c.set(a,new h(a,this.errorApi)),c.get(a)}async set(m,a){localStorage.setItem(this.getKeyName(m),JSON.stringify(a)),this.notifyChanges(m)}async remove(m){localStorage.removeItem(this.getKeyName(m)),this.notifyChanges(m)}observe$(m){return this.observable.filter(({key:a})=>a===m)}getKeyName(m){return`${this.namespace}/${encodeURIComponent(m)}`}notifyChanges(m){const a=this.snapshot(m);for(const s of this.subscribers)s.next(a)}}},59589:function(q,i,e){"use strict";e.d(i,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a})}}},6098:function(q,i,e){"use strict";e.d(i,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["team"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},44431:function(q,i,e){"use strict";e.d(i,{BitbucketAuth:function(){return c.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(q,i,e){"use strict";e.d(i,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["read:user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},2922:function(q,i,e){"use strict";e.d(i,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:f,defaultScopes:y=["read_user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:f,provider:s,environment:a,defaultScopes:y})}}},59938:function(q,i,e){"use strict";e.d(i,{e:function(){return h}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class h{static create(m){const{discoveryApi:a,oauthRequestApi:s,environment:f="development",provider:y=t,defaultScopes:u=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:s,provider:y,environment:f,defaultScopes:u,scopeTransform(A){return A.map(b=>b==="openid"?b:b==="profile"||b==="email"?`${c}userinfo.${b}`:b.startsWith(c)?b:`${c}${b}`)}})}}},91668:function(q,i,e){"use strict";e.d(i,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return f.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return v.s},OneLoginAuth:function(){return s.$}});var r=e(44474),t=e(2922),c=e(59938),h=e(91205);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}});var v=e(26079),m=e(67604),a=e(38482),s=e(58381),f=e(44431);e.o(f,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return f.AlertApiForwarder}}),e.o(f,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return f.AppThemeSelector}}),e.o(f,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return f.AtlassianAuth}}),e.o(f,"ConfigReader")&&e.d(i,{ConfigReader:function(){return f.ConfigReader}}),e.o(f,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return f.ErrorAlerter}}),e.o(f,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return f.ErrorApiForwarder}}),e.o(f,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return f.FetchMiddlewares}}),e.o(f,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return f.FlatRoutes}}),e.o(f,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return f.LocalStorageFeatureFlags}}),e.o(f,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return f.NoOpAnalyticsApi}}),e.o(f,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return f.OAuthRequestManager}}),e.o(f,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return f.UnhandledErrorForwarder}}),e.o(f,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return f.UrlPatternDiscovery}}),e.o(f,"WebStorage")&&e.d(i,{WebStorage:function(){return f.WebStorage}}),e.o(f,"createFetchApi")&&e.d(i,{createFetchApi:function(){return f.createFetchApi}}),e.o(f,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return f.createSpecializedApp}}),e.o(f,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return f.defaultConfigLoader}});var y=e(59589)},38482:function(q,i,e){"use strict";e.d(i,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(v){const{environment:m="development",provider:a=t,oauthRequestApi:s,discoveryApi:f,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=v;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:s,provider:a,environment:m,defaultScopes:y})}}},73124:function(q,i,e){"use strict";e.d(i,{Z:function(){return m}});function r(a){return new Promise((s,f)=>{const y=a.width||500,u=a.height||700,A=window.screen.width/2-y/2,b=window.screen.height/2-u/2,S=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${u},top=${b},left=${A}`);let D="";if(!S||typeof S.closed=="undefined"||S.closed){const $=new Error("Failed to open auth popup.");$.name="PopupRejectedError",f($);return}const _=$=>{if($.source!==S||$.origin!==a.origin)return;const{data:B}=$;if(B.type==="config_info"){D=B.targetOrigin;return}if(B.type!=="authorization_response")return;const x=B;if("error"in x){const Y=new Error(x.error.message);Y.name=x.error.name,f(Y)}else s(x.response);L()},M=setInterval(()=>{if(S.closed){const $=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,B=new Error($);B.name="PopupClosedError",f(B),L()}},100);function L(){window.removeEventListener("message",_),clearInterval(M)}window.addEventListener("message",_)})}function t(a){return[...a].join(" ")}class c{constructor(s){Q(this,"discoveryApi");Q(this,"environment");Q(this,"provider");Q(this,"joinScopesFunc");Q(this,"authRequester");Q(this,"sessionTransform");const{discoveryApi:f,environment:y,provider:u,joinScopes:A=t,oauthRequestApi:b,sessionTransform:S=D=>D}=s;this.authRequester=b.createAuthRequester({provider:u,onAuthRequest:D=>this.showPopup(D)}),this.discoveryApi=f,this.environment=y,this.provider=u,this.joinScopesFunc=A,this.sessionTransform=S}async createSession(s){return s.instantPopup?this.showPopup(s.scopes):this.authRequester(s.scopes)}async refreshSession(){const s=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(y=>{throw new Error(`Auth refresh request failed, ${y}`)});if(!s.ok){const y=new Error(`Auth refresh request failed, ${s.statusText}`);throw y.status=s.status,y}const f=await s.json();if(f.error){const y=new Error(f.error.message);throw f.error.name&&(y.name=f.error.name),y}return await this.sessionTransform(f)}async removeSession(){const s=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(f=>{throw new Error(`Logout request failed, ${f}`)});if(!s.ok){const f=new Error(`Logout request failed, ${s.statusText}`);throw f.status=s.status,f}}async showPopup(s){const f=this.joinScopesFunc(s),y=await this.buildUrl("/start",{scope:f,origin:location.origin}),u=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(u)}async buildUrl(s,f){const y=await this.discoveryApi.getBaseUrl("auth"),u=this.buildQueryString({...f,env:this.environment});return`${y}/${this.provider.id}${s}${u}`}buildQueryString(s){if(!s)return"";const f=Object.entries(s).map(([y,u])=>{if(typeof u=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(u)}`;if(u)return encodeURIComponent(y)}).filter(Boolean).join("&");return f?`?${f}`:""}}var h=e(57018);const v={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(s){Q(this,"sessionManager");Q(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:f,environment:y="development",provider:u=v,oauthRequestApi:A,defaultScopes:b=[],scopeTransform:S=M=>M}=s,D=new c({discoveryApi:f,environment:y,provider:u,oauthRequestApi:A,sessionTransform(M){return{...M,providerInfo:{idToken:M.providerInfo.idToken,accessToken:M.providerInfo.accessToken,scopes:m.normalizeScopes(S,M.providerInfo.scope),expiresAt:new Date(Date.now()+M.providerInfo.expiresInSeconds*1e3)}}}}),_=new h.RefreshingAuthSessionManager({connector:D,defaultScopes:new Set(b),sessionScopes:M=>M.providerInfo.scopes,sessionShouldRefresh:M=>(M.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:_,scopeTransform:S})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,f){var A;const y=m.normalizeScopes(this.scopeTransform,s),u=await this.sessionManager.getSession({...f,scopes:y});return(A=u==null?void 0:u.providerInfo.accessToken)!=null?A:""}async getIdToken(s={}){var y;const f=await this.sessionManager.getSession(s);return(y=f==null?void 0:f.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(s={}){const f=await this.sessionManager.getSession(s);return f==null?void 0:f.backstageIdentity}async getProfile(s={}){const f=await this.sessionManager.getSession(s);return f==null?void 0:f.profile}static normalizeScopes(s,f){if(!f)return new Set;const y=Array.isArray(f)?f:f.split(/[\s|,]/).filter(Boolean);return new Set(s(y))}}},91205:function(q,i,e){"use strict";e.d(i,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(i,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(i,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(i,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(q,i,e){"use strict";e.d(i,{s:function(){return v}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="okta.";class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=t,oauthRequestApi:u,defaultScopes:A=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:f,defaultScopes:A,scopeTransform(b){return b.map(S=>c.has(S)||S.startsWith(h)?S:`${h}${S}`)}})}}},58381:function(q,i,e){"use strict";e.d(i,{$:function(){return v}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="onelogin.";class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=t,oauthRequestApi:u}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:f,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(A){return A.map(b=>c.has(b)||b.startsWith(h)?b:`${h}${b}`)}})}}},67604:function(q,i,e){"use strict";var r=e(57018),t=e(30195);const c=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),h={id:"saml",title:"SAML",icon:()=>null};class v{static create(a){const{discoveryApi:s,environment:f="development",provider:y=h}=a,u=new DirectAuthConnector({discoveryApi:s,environment:f,provider:y}),A=new StaticAuthSessionManager({connector:u}),b=new AuthSessionStore({manager:A,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new v(b)}sessionState$(){return this.sessionManager.sessionState$()}constructor(a){this.sessionManager=a}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(a={}){const s=await this.sessionManager.getSession(a);return s==null?void 0:s.backstageIdentity}async getProfile(a={}){const s=await this.sessionManager.getSession(a);return s==null?void 0:s.profile}}},91631:function(q,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return h.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return v.m},ErrorAlerter:function(){return a.KN},ErrorApiForwarder:function(){return a.gr},FetchMiddlewares:function(){return f.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return s.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return c.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return a.Jv},UrlPatternDiscovery:function(){return m.p},WebStorage:function(){return u.C},createFetchApi:function(){return f.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),h=e(58652),v=e(22053),m=e(4333),a=e(89536),s=e(14884),f=e(50160),y=e(11358),u=e(56054)},56494:function(q,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(q,i,e){"use strict";e.d(i,{p:function(){return t}});var r;(function(c){c[c.default=10]="default";const h=50;c[c.app=h]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){Q(this,"factories",new Map)}register(h,v){const m=r[h],a=this.factories.get(v.api.id);return a&&a.priority>=m?!1:(this.factories.set(v.api.id,{priority:m,factory:v}),!0)}get(h){const v=this.factories.get(h.id);if(!!v)return v.factory}getAllApis(){const h=new Set;for(const{factory:v}of this.factories.values())h.add(v.api);return h}}},14406:function(q,i,e){"use strict";e.d(i,{g:function(){return a}});var r=e(2784),t=e(13980),c=e.n(t);class h{constructor(...f){Q(this,"holders");this.holders=f}get(f){for(const y of this.holders){const u=y.get(f);if(u)return u}}}var v=e(76241);const m=(0,v.CT)("api-context"),a=s=>{var b;const{apis:f,children:y}=s,u=(b=(0,r.useContext)(m))==null?void 0:b.atVersion(1),A=u?new h(f,u):f;return r.createElement(m.Provider,{value:(0,v.EI)({1:A}),children:y})};a.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(q,i,e){"use strict";e.d(i,{M:function(){return r}});class r{constructor(c){Q(this,"apis",new Map);this.factories=c}static validateFactories(c,h){for(const v of h){const m=[v],a=new Set;for(;m.length;){const s=m.shift(),f=c.get(s);if(!!f)for(const y of Object.values(f.deps)){if(y.id===v.id)throw new Error(`Circular dependency of api factory for ${v}`);a.has(y)||(a.add(y),m.push(y))}}}}get(c){return this.load(c)}load(c,h=[]){const v=this.apis.get(c.id);if(v)return v;const m=this.factories.get(c);if(!m)return;if(h.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const a=this.loadDeps(c,m.deps,[...h,m.api]),s=m.factory(a);return this.apis.set(c.id,s),s}loadDeps(c,h,v){const m={};for(const a in h)if(h.hasOwnProperty(a)){const s=h[a],f=this.load(s,v);if(!f)throw new Error(`No API factory available for dependency ${s} of dependent ${c}`);m[a]=f}return m}}},76105:function(q,i,e){"use strict";e.d(i,{ApiFactoryRegistry:function(){return c.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),c=e(80396),h=e(82488),v=e.n(h);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"GithubAuth")&&e.d(i,{GithubAuth:function(){return h.GithubAuth}}),e.o(h,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return h.GitlabAuth}}),e.o(h,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return h.GoogleAuth}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}})},82488:function(){},82370:function(q,i,e){"use strict";e.d(i,{b:function(){return un}});var r=e(2784),t=e(10289),c=e(64279),h=e(56494),v=e(36964),m=e(76105);function a(se){const j={};for(const ue in se.collectors)se.collectors.hasOwnProperty(ue)&&(j[ue]=se.collectors[ue]());const ae=[{node:r.Children.toArray(se.root),parent:void 0,contexts:{}}];for(;ae.length!==0;){const{node:ue,parent:ve,contexts:Le}=ae.shift();r.Children.forEach(ue,we=>{if(!(0,r.isValidElement)(we))return;const Se={};for(const He in j)if(j.hasOwnProperty(He)){const ft=j[He];Se[He]=ft.visit(ft.accumulator,we,ve,Le[He])}for(const He of se.discoverers){const ft=He(we);ft&&ae.push({node:ft,parent:we,contexts:Se})}})}return Object.fromEntries(Object.entries(j).map(([ue,ve])=>[ue,ve.accumulator]))}function s(se,j){return()=>({accumulator:se(),visit:j})}function f(se){var j;return(j=se.props)==null?void 0:j.children}function y(se){var j,ae,ue;if(((j=se.props)==null?void 0:j.path)&&((ae=se.props)==null?void 0:ae.element))return(ue=se.props)==null?void 0:ue.element}const u=s(()=>new Set,(se,j)=>{const ae=(0,v.getComponentData)(j,"core.plugin");ae&&se.add(ae)});var A=e(88934);const b={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},S=s(()=>({paths:new Map,parents:new Map,objects:new Array}),(se,j,ae,ue)=>{var mt,sn,z,R,P;if((ae==null?void 0:ae.props.element)===j)return ue;let ve=ue==null?void 0:ue.obj,Le=ue==null?void 0:ue.routeRef,we=ue==null?void 0:ue.sticky;const Se=(mt=j.props)==null?void 0:mt.path,He=(sn=ve==null?void 0:ve.children)!=null?sn:se.objects,ft=Boolean((z=j.props)==null?void 0:z.caseSensitive);let Tt=ue==null?void 0:ue.path;if((0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");Tt=Se}const vt=(R=j.props)==null?void 0:R.element;let ot=(0,v.getComponentData)(j,"core.mountPoint");if(!ot&&(0,r.isValidElement)(vt)&&(ot=(0,v.getComponentData)(vt,"core.mountPoint")),ot){let ce=Se;if(Tt&&(ce?Tt=void 0:ce=Tt),!ce)throw new Error("Mounted routable extension must have a path");se.paths.set(ot,ce),Le&&we?(se.parents.set(ot,Le),Se&&(Le=ot,we=!1)):(se.parents.set(ot,Le),Le=ot),Se?(ve={caseSensitive:ft,path:Se,element:"mounted",routeRefs:new Set([ot]),children:[b],plugin:(0,v.getComponentData)(j.props.element,"core.plugin")},He.push(ve)):ve==null||ve.routeRefs.add(ot)}if((0,v.getComponentData)(j,"core.gatherMountPoints")&&(we=!0),(0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Se)throw new Error("Mount point gatherer must have a path");ot||(ve={caseSensitive:ft,path:Se,element:"gathered",routeRefs:new Set,children:[b],plugin:(P=ue==null?void 0:ue.obj)==null?void 0:P.plugin},He.push(ve))}return{obj:ve,path:Tt,routeRef:Le,sticky:we}}),D=s(()=>new Set,(se,j)=>{if(j.type===A.L){const ae=j.props;se.add("with"in ae?ae.with:ae.without)}});var _=e(76241);const M=(0,_.uW)("route-ref-type",()=>Symbol("route-ref-type"));function L(se){return se[M]==="absolute"}function $(se){return se[M]==="sub"}function B(se){return se[M]==="external"}function x(...se){const j=se.join("/").replace(/\/\/+/g,"/");return j!=="/"&&j.endsWith("/")?j.slice(0,-1):j}function Y(se,j,ae){let ue,ve="";if(L(se))ue=se;else if($(se))ue=se.parent,ve=se.path;else if(B(se)){const Se=ae.get(se);if(!Se)return[void 0,""];if(L(Se))ue=Se;else if($(Se))ue=Se.parent,ve=Se.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Se}`)}else throw se[M]?new Error(`Unknown or invalid route ref type, ${se[M]}`):new Error(`Unknown object passed to useRouteRef, got ${se}`);if(!ue)return[void 0,""];const Le=j.get(ue);if(!Le)return[void 0,""];const we=x(Le,ve);return[ue,we]}function te(se,j,ae,ue,ve){var Tt;const Le=(Tt=(0,t.fp)(ve,j))!=null?Tt:[],we=Array();let Se=-1;for(let vt=se;vt&&(Se=Le.findIndex(ot=>ot.route.routeRefs.has(vt)),Se===-1);vt=ue.get(vt))we.unshift(vt);we.length===0&&(Se-=1);const He=Se===-1?"":Le[Se].pathname,ft=x(...we.slice(0,-1).map(vt=>{const ot=ae.get(vt);if(!ot)throw new Error(`No path for ${vt}`);if(ot.includes(":"))throw new Error(`Cannot route to ${se} with parent ${vt} as it has parameters`);return ot}));return He+ft}class Ee{constructor(j,ae,ue,ve,Le){this.routePaths=j,this.routeParents=ae,this.routeObjects=ue,this.routeBindings=ve,this.appBasePath=Le}resolve(j,ae){const[ue,ve]=Y(j,this.routePaths,this.routeBindings);if(!ue)return;let Le;typeof ae=="string"?Le=this.trimPath(ae):ae.pathname?Le={...ae,pathname:this.trimPath(ae.pathname)}:Le=ae;const we=this.appBasePath+te(ue,Le,this.routePaths,this.routeParents,this.routeObjects);return(...[He])=>we+(0,t.Gn)(ve,He)}trimPath(j){return j&&(j.startsWith(this.appBasePath)?j.slice(this.appBasePath.length):j)}}const Ge=(0,_.CT)("routing-context"),Ke=({routePaths:se,routeParents:j,routeObjects:ae,routeBindings:ue,basePath:ve="",children:Le})=>{const we=new Ee(se,j,ae,ue,ve),Se=(0,_.EI)({1:we});return r.createElement(Ge.Provider,{value:Se},Le)},fe=(se,j)=>{var ae,ue;try{const ve=(0,t.fp)(j,{pathname:se}),Le=(ae=ve==null?void 0:ve.filter(Se=>{var He;return((He=Se==null?void 0:Se.route.routeRefs)==null?void 0:He.size)>0}).pop())==null?void 0:ae.route;if(!Le)return{};let we;return Le.routeRefs.size===1&&(we=Le.routeRefs.values().next().value),{extension:"App",pluginId:((ue=Le.plugin)==null?void 0:ue.getId())||"root",...we?{routeRef:we.id}:{}}}catch{return{}}},ye=({pathname:se,search:j,hash:ae})=>{const ue=(0,v.useAnalytics)();return(0,r.useEffect)(()=>{ue.captureEvent("navigate",`${se}${j}${ae}`)},[ue,se,j,ae]),null},Ie=({routeObjects:se})=>{const{pathname:j,search:ae,hash:ue}=(0,t.TH)();return r.createElement(v.AnalyticsContext,{attributes:fe(j,se)},r.createElement(ye,{pathname:j,search:ae,hash:ue}))};function Ze(se,j){const ae=new Set(j.values());ae.delete(void 0);for(const ue of j.keys()){if(ae.has(ue))continue;let ve=ue,Le="";for(;ve;){const Se=se.get(ve);if(!Se)throw new Error(`No path for ${ve}`);Le=`${Se}${Le}`,ve=j.get(ve)}const we=Le.match(/:(\w+)/g);if(we){for(let Se=0;Se<we.length;Se++)for(let He=Se+1;He<we.length;He++)if(we[He]===we[Se])throw new Error(`Parameter ${we[He]} is duplicated in path ${Le}`)}}}function ke(se,j){for(const ae of j)if(!!ae.externalRoutes){for(const[ue,ve]of Object.entries(ae.externalRoutes))if(!ve.optional&&!se.has(ve))throw new Error(`External route '${ue}' of the '${ae.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const ct=(0,_.CT)("app-context"),st=({appContext:se,children:j})=>{const ae=(0,_.EI)({1:se});return r.createElement(ct.Provider,{value:ae,children:j})};function Ce(se){return new Error(`Tried to access IdentityApi ${se} before app was loaded`)}function Ne(se){console.warn(`WARNING: Call to ${se} is deprecated and will break in the future`)}class Fe{constructor(){Q(this,"target");Q(this,"waitForTarget");Q(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(j=>{this.resolveTarget=j})}setTarget(j){this.target=j,this.resolveTarget(j)}getUserId(){if(!this.target)throw Ce("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ne("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Ce("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ne("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(j=>j.getProfileInfo())}async getBackstageIdentity(){const j=await this.waitForTarget.then(ae=>ae.getBackstageIdentity());return j.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${j.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),j}async getCredentials(){return this.waitForTarget.then(j=>j.getCredentials())}async getIdToken(){return this.waitForTarget.then(j=>{if(!j.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ne("getIdToken"),j.getIdToken()})}async signOut(){await this.waitForTarget.then(j=>j.signOut()),location.reload()}}var lt=e(72164);function Ve(se,j,ae){if(se!==void 0){const ve=ae.find(Le=>Le.id===se);if(ve)return ve}if(j){const ve=ae.find(Le=>Le.variant==="dark");if(ve)return ve}const ue=ae.find(ve=>ve.variant==="light");return ue||ae[0]}const xt=()=>{const se=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[j,ae]=(0,r.useState)(se.matches);return(0,r.useEffect)(()=>{const ue=ve=>{ae(ve.matches)};return se.addListener(ue),()=>{se.removeListener(ue)}},[se]),j};function ht({children:se}){const j=(0,v.useApi)(v.appThemeApiRef),ae=(0,lt.Z)(j.activeThemeId$(),j.getActiveThemeId()),ue=Boolean(window.matchMedia)?xt():!1,ve=Ve(ae,ue,j.getInstalledThemes());if(!ve)throw new Error("App has no themes");return r.createElement(ve.Provider,{children:se})}var wt=e(46611);class jt{constructor(){Q(this,"apis",[])}add(j,ae){return this.apis.push([j.id,ae]),ae}build(){return new Lt(new Map(this.apis))}}class Lt{static builder(){return new jt}static from(j){return new Lt(new Map(j.map(([ae,ue])=>[ae.id,ue])))}static with(j,ae){return new Lt(new Map([[j.id,ae]]))}constructor(j){this.apis=j}with(j,ae){return new Lt(new Map([...this.apis,[j.id,ae]]))}get(j){return this.apis.get(j.id)}}function Gt(se){const j=new Map;return se&&se({bind:(ue,ve)=>{for(const[Le,we]of Object.entries(ve)){const Se=ue[Le];if(!Se)throw new Error(`Key ${Le} is not an existing external route`);if(!we&&!Se.optional)throw new Error(`External route ${Le} is required but was undefined`);we&&j.set(Se,we)}}}),j}const zt=(0,r.createContext)({routeObjects:[]});function Mt(se){var ae;let{pathname:j}=new URL((ae=se.getOptionalString("app.baseUrl"))!=null?ae:"/","http://dummy.dev");return j=j.replace(/\/*$/,""),j}function An(se,j,ae){var He;const ue=Boolean(se),ve=(0,c.default)(se||(()=>Promise.resolve([])));let Le;if(ue&&ve.loading){const{Progress:ft}=j;Le=r.createElement(ft,null)}else if(ve.error){const{BootErrorPage:ft}=j;Le=r.createElement(ft,{step:"load-config",error:ve.error})}const{ThemeProvider:we=ht}=j;return Le?{node:r.createElement(h.ApiProvider,{apis:Lt.with(v.appThemeApiRef,ae)},r.createElement(we,null,Le))}:{api:h.ConfigReader.fromConfigs((He=ve.value)!=null?He:[])}}class Vt{constructor(j){this.app=j}getPlugins(){return this.app.getPlugins()}getSystemIcon(j){return this.app.getSystemIcon(j)}getComponents(){return this.app.getComponents()}}class Et{constructor(j){Q(this,"apiHolder");Q(this,"configApi");Q(this,"apis");Q(this,"icons");Q(this,"plugins");Q(this,"components");Q(this,"themes");Q(this,"configLoader");Q(this,"defaultApis");Q(this,"bindRoutes");Q(this,"appIdentityProxy",new Fe);Q(this,"apiFactoryRegistry");var ae,ue,ve,Le;this.apis=(ae=j.apis)!=null?ae:[],this.icons=j.icons,this.plugins=new Set((ue=j.plugins)!=null?ue:[]),this.components=j.components,this.themes=j.themes,this.configLoader=(ve=j.configLoader)!=null?ve:wt.t,this.defaultApis=(Le=j.defaultApis)!=null?Le:[],this.bindRoutes=j.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(j){return this.icons[j]}getComponents(){return this.components}getProvider(){const j=new Vt(this);let ae=!1;return({children:ve})=>{const Le=(0,r.useMemo)(()=>h.AppThemeSelector.createWithStorage(this.themes),[]),{routing:we,featureFlags:Se,routeBindings:He}=(0,r.useMemo)(()=>{const ot=a({root:ve,discoverers:[f,y],collectors:{routing:S,collectedPlugins:u,featureFlags:D}});return ot.collectedPlugins.forEach(Rt=>this.plugins.add(Rt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ot,routeBindings:Gt(this.bindRoutes)}},[ve]);ae||(ae=!0,Ze(we.paths,we.parents),ke(He,this.plugins));const ft=An(this.configLoader,this.components,Le),Tt="api"in ft;if(Tt){const{api:ot}=ft;this.configApi=ot}if((0,r.useEffect)(()=>{if(Tt){const ot=this.getApiHolder().get(v.featureFlagsApiRef);for(const Rt of this.plugins.values())if("getFeatureFlags"in Rt)for(const mt of Rt.getFeatureFlags())ot.registerFlag({name:mt.name,pluginId:Rt.getId()});else for(const mt of Rt.output())mt.type==="feature-flag"&&ot.registerFlag({name:mt.name,pluginId:Rt.getId()});for(const Rt of Se)ot.registerFlag({name:Rt,pluginId:""})}},[Tt,ft,Se]),"node"in ft)return ft.node;const{ThemeProvider:vt=ht}=this.components;return r.createElement(h.ApiProvider,{apis:this.getApiHolder()},r.createElement(st,{appContext:j},r.createElement(vt,null,r.createElement(Ke,{routePaths:we.paths,routeParents:we.parents,routeObjects:we.objects,routeBindings:He,basePath:Mt(ft.api)},r.createElement(zt.Provider,{value:{routeObjects:we.objects}},ve)))))}}getRouter(){const{Router:j,SignInPage:ae}=this.components,ue=({component:Le,children:we})=>{const[Se,He]=(0,r.useState)();return Se?(this.appIdentityProxy.setTarget(Se),we):r.createElement(Le,{onSignInSuccess:He})};return({children:Le})=>{const we=(0,v.useApi)(v.configApiRef),Se=`${Mt(we)}/*`,{routeObjects:He}=(0,r.useContext)(zt);return ae?r.createElement(j,null,r.createElement(Ie,{routeObjects:He}),r.createElement(ue,{component:ae},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Se,element:r.createElement(r.Fragment,null,Le)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),r.createElement(j,null,r.createElement(Ie,{routeObjects:He}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Se,element:r.createElement(r.Fragment,null,Le)}))))}}getApiHolder(){if(this.apiHolder){for(const j of this.plugins)for(const ae of j.getApis())this.apiFactoryRegistry.get(ae.api)||this.apiFactoryRegistry.register("default",ae);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:v.appThemeApiRef,deps:{},factory:()=>h.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:v.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:v.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:v.featureFlagsApiRef,deps:{},factory:()=>new h.LocalStorageFeatureFlags});for(const j of this.defaultApis)this.apiFactoryRegistry.register("default",j);for(const j of this.plugins)for(const ae of j.getApis())if(!this.apiFactoryRegistry.register("default",ae))throw new Error(`Plugin ${j.getId()} tried to register duplicate or forbidden API factory for ${ae.api}`);for(const j of this.apis)if(!this.apiFactoryRegistry.register("app",j))throw new Error(`Duplicate or forbidden API factory for ${j.api} in app`);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(j){const ae=new Set;for(const ue of j){const ve=ue.getId();if(ae.has(ve))throw new Error(`Duplicate plugin found '${ve}'`);ae.add(ve)}}}function un(se){return new Et(se)}},46611:function(q,i,e){"use strict";e.d(i,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const h=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?h.push(...m):h.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const v=window.__APP_CONFIG__;return v&&h.push({context:"window",data:v}),h}},44056:function(q,i,e){"use strict";e.d(i,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),c=e(73495),h=e.n(c);e.o(c,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(i,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(i,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(q,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return c.w},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 t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(q,i,e){"use strict";e.d(i,{RefreshingAuthSessionManager:function(){return m}});function r(s,f){for(const y of f)if(!s.has(y))return!1;return!0}class t{constructor(f){this.options=f}sessionExistsAndHasScope(f,y){if(!f)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const u=this.options.sessionScopes(f);return r(u,y)}getExtendedScope(f,y){const u=new Set(this.options.defaultScopes);if(f&&this.options.sessionScopes!==void 0){const A=this.options.sessionScopes(f);for(const b of A)u.add(b)}if(y)for(const A of y)u.add(A);return u}}var c=e(98005),h=e(36964);class v{constructor(){Q(this,"subject",new c.X(h.SessionState.SignedOut));Q(this,"signedIn",!1)}setIsSignedIn(f){this.signedIn!==f&&(this.signedIn=f,this.subject.next(this.signedIn?h.SessionState.SignedIn:h.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(f){Q(this,"connector");Q(this,"helper");Q(this,"sessionScopesFunc");Q(this,"sessionShouldRefreshFunc");Q(this,"stateTracker",new v);Q(this,"refreshPromise");Q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A,sessionShouldRefresh:b}=f;this.connector=y,this.sessionScopesFunc=A,this.sessionShouldRefreshFunc=b,this.helper=new t({sessionScopes:A,defaultScopes:u})}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const u=await this.collapsedSessionRefresh(),A=this.sessionScopesFunc(this.currentSession),b=this.sessionScopesFunc(u);return r(b,A)&&(this.currentSession=u),u}catch(u){if(f.optional)return;throw u}}if(!this.currentSession&&!f.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(f)}catch{}if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.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 f=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),f}finally{delete this.refreshPromise}}}class a{constructor(f){Q(this,"connector");Q(this,"helper");Q(this,"stateTracker",new SessionStateTracker);Q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A}=f;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:A,defaultScopes:u})}setSession(f){this.currentSession=f,this.stateTracker.setIsSignedIn(Boolean(f))}async getSession(f){if(this.helper.sessionExistsAndHasScope(this.currentSession,f.scopes))return this.currentSession;if(!f.optional)return this.currentSession=await this.connector.createSession({...f,scopes:this.helper.getExtendedScope(this.currentSession,f.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(q,i,e){"use strict";e.d(i,{J:function(){return c},X:function(){return h}});var r=e(82394),t=e.n(r);class c{constructor(){Q(this,"isClosed",!1);Q(this,"terminatingError");Q(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));Q(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,s){const f=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(f)}}class h{constructor(m){Q(this,"isClosed");Q(this,"currentValue");Q(this,"terminatingError");Q(this,"observable");Q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,this.terminatingError=void 0,this.observable=new(t())(a=>this.isClosed?(this.terminatingError?a.error(this.terminatingError):a.complete(),()=>{}):(a.next(this.currentValue),this.subscribers.add(a),()=>{this.subscribers.delete(a)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=m,this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,s){const f=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(f)}}},88934:function(q,i,e){"use strict";e.d(i,{L:function(){return c}});var r=e(36964),t=e(2784);const c=h=>{const{children:v}=h,m=(0,r.useApi)(r.featureFlagsApiRef),a="with"in h?m.isActive(h.with):!m.isActive(h.without);return t.createElement(t.Fragment,null,a?v:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(q,i,e){"use strict";e.d(i,{w:function(){return h}});var r=e(2784),t=e(10289),c=e(36964);const h=m=>{const a=(0,c.useApp)(),{NotFoundErrorPage:s}=a.getComponents(),f=(0,c.useElementFilter)(m.children,y=>y.getElements().flatMap(u=>{var b;let A=u.props.path;return A===""?[]:(A=(b=A==null?void 0:A.replace(/\/\*$/,""))!=null?b:"/",[{path:A,element:u,children:u.props.children?[{path:A==="/"?"/":"/*",element:u.props.children}]:void 0}])}).sort((u,A)=>A.path.localeCompare(u.path)).map(u=>(u.path=u.path==="/"?"/":`${u.path}/*`,u)));return f.push({element:r.createElement(s,null),path:"/*"}),(0,t.V$)(f)};var v=e(88934)},9118:function(q,i,e){"use strict";e.d(i,{Button:function(){return M},CodeSnippet:function(){return fe},Content:function(){return Wo},ContentHeader:function(){return qi},CreateButton:function(){return Ze},DependencyGraph:function(){return ot},DependencyGraphTypes:function(){return r},EmptyState:function(){return pe},ErrorPage:function(){return rs},ErrorPanel:function(){return cn},Header:function(){return Qo},HeaderIconLinkRow:function(){return Ln},HeaderLabel:function(){return ms},HeaderTabs:function(){return Ho},InfoCard:function(){return tt},ItemCardGrid:function(){return As},ItemCardHeader:function(){return ys},Link:function(){return D},LogViewer:function(){return Or},MissingAnnotationEmptyState:function(){return et},OverflowTooltip:function(){return Br},Page:function(){return qo},PageWithHeader:function(){return Cs},Progress:function(){return dr},ResponseErrorPanel:function(){return Jn},RoutedTabs:function(){return jo},Select:function(){return _e},Sidebar:function(){return ka},SidebarContext:function(){return Wr},SidebarDivider:function(){return li},SidebarItem:function(){return Zo},SidebarPage:function(){return wa},SidebarPinStateContext:function(){return Cr},SubvalueCell:function(){return Si},SupportButton:function(){return xa},Table:function(){return ji},WarningPanel:function(){return en},sidebarConfig:function(){return kn}});var r={};e.r(r),e.d(r,{Nm:function(){return ke},ht:function(){return Ce},LJ:function(){return st}});var t=e(2784),c=e(36964),h=e(19928);function v(n){const[o,l]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const O=d.alert$().subscribe(U=>l(k=>k.concat(U)));return()=>{O.unsubscribe()}},[d]),o.length===0)return null;const[p]=o,E=()=>{l(O=>O.filter(U=>U!==p))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:E,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:p.severity},React.createElement("span",null,p.message.toString(),o.length>1&&React.createElement("em",null,` (${o.length-1} older ${pluralize("message",o.length-1)})`))))}var m=e(79692),a=e(12420);const s=(0,m.Z)(n=>(0,a.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function f(n){const{displayName:o,picture:l,customStyles:d}=n,p=s();return React.createElement(MaterialAvatar,{alt:o,src:l,className:p.avatar,style:{backgroundColor:stringToColor(o||l||""),...d}},o&&extractInitials(o))}var y=e(77277),u=e(86689),A=e(62833);const b=n=>/^([a-z+.-]+):/.test(n),S=n=>{var o;return n instanceof Array?n.map(S).join(" ").trim():typeof n=="object"&&n?S((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},D=t.forwardRef(({onClick:n,noTrack:o,...l},d)=>{const p=(0,c.useAnalytics)(),E=String(l.to),O=S(l.children)||E,U=b(E),k=U&&!!/^https?:/.exec(E),G=oe=>{n==null||n(oe),o||p.captureEvent("click",O,{attributes:{to:E}})};return U?t.createElement(u.Z,{ref:d,href:E,onClick:G,...k?{target:"_blank",rel:"noopener"}:{},...l}):t.createElement(u.Z,{ref:d,component:A.rU,onClick:G,...l})}),_=t.forwardRef((n,o)=>t.createElement(D,{ref:o,...n,color:"initial"})),M=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:_,...n}));var L=e(60364),$=e(61837),B=e(80030),x=e(19353),Y=e(95074);function te(n){const{text:o,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard"}=n,p=(0,c.useApi)(c.errorApiRef),[E,O]=(0,t.useState)(!1),[{error:U},k]=(0,Y.Z)();(0,t.useEffect)(()=>{U&&p.post(U)},[U,p]);const G=oe=>{oe.stopPropagation(),O(!0),k(o)};return t.createElement(t.Fragment,null,t.createElement(B.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>O(!1),open:E},t.createElement($.Z,{onClick:G},t.createElement(x.Z,null))))}var Ee=e(55768),Ge=e(26639),Ke=e(39595);function fe(n){const{text:o,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:E,showCopyCodeButton:O=!1}=n,U=(0,L.Z)(),k=U.palette.type==="dark"?Ge.Z:Ke.Z,G=U.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Ee.Z,{customStyle:E,language:l,style:k,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:U.palette.textVerySubtle},lineProps:oe=>p!=null&&p.includes(oe)?{style:{backgroundColor:G}}:{}},o),O&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(te,{text:o})))}var ye=e(41156),Ie=e(88188);function Ze(n){const{title:o,to:l}=n,d=(0,ye.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement($.Z,{component:A.rU,color:"primary",title:o,size:"small",to:l},t.createElement(Ie.Z,null)):t.createElement(y.Z,{component:A.rU,variant:"contained",color:"primary",to:l},o):null}var ke;(function(n){const o="TB";n.TOP_BOTTOM=o;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(ke||(ke={}));var ct;(function(n){const o="UL";n.UP_LEFT=o;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(ct||(ct={}));var st;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const l="tight-tree";n.TIGHT_TREE=l;const d="longest-path";n.LONGEST_PATH=d})(st||(st={}));var Ce;(function(n){const o="l";n.LEFT=o;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(Ce||(Ce={}));var Ne=e(13387),Fe=e(11105),lt=e(97963),Ve=e(46506),xt=e.n(Ve),ht=e(54073),wt=e.n(ht),jt=e(10368);const Lt=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Gt({node:{id:n}}){const o=Lt(),[l,d]=t.useState(0),[p,E]=t.useState(0),O=t.useRef(null);t.useLayoutEffect(()=>{if(O.current){let{height:oe,width:ee}=O.current.getBBox();oe=Math.round(oe),ee=Math.round(ee),(oe!==p||ee!==l)&&(d(ee),E(oe))}},[l,p]);const U=10,k=l+U*2,G=p+U*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:k,height:G,rx:10}),t.createElement("text",{ref:O,className:o.text,y:G/2,x:k/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const zt="arrow-marker",Mt="node",An="edge",Vt="label",Et=(0,jt.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),un=n=>t.createElement(Gt,{...n});function se({render:n=un,setNode:o,node:l}){const{width:d,height:p,x:E=0,y:O=0}=l,U=l,k=Et(),G=t.useRef(null);return t.useLayoutEffect(()=>{if(G.current){let{height:oe,width:ee}=G.current.getBBox();oe=Math.round(oe),ee=Math.round(ee),(oe!==p||ee!==d)&&o(l.id,{...l,height:oe,width:ee})}},[l,d,p,o]),t.createElement("g",{ref:G,"data-testid":Mt,className:k.node,transform:`translate(${E-d/2},${O-p/2})`},n({node:U}))}var j=e(40408),ae=e(49810),ue=e(19574),ve=e.n(ue);const Le=(0,jt.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function we({edge:{label:n}}){const o=Le();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Se=(0,jt.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"}),He=n=>t.createElement(we,{...n}),ft=j.Z().x(n=>n.x).y(n=>n.y).curve(ae.Z);function Tt({render:n=He,setEdge:o,id:l,edge:d}){const{x:p=0,y:E=0,width:O,height:U,points:k}=d,G=d,oe=Se(),ee=t.useRef(null);t.useLayoutEffect(()=>{if(ee.current){let{height:Ae,width:Te}=ee.current.getBBox();Ae=Math.round(Ae),Te=Math.round(Te),(Ae!==U||Te!==O)&&o(l,{...d,height:Ae,width:Te})}},[d,U,O,o,l]);let Re="";if(k){const Ae=k.filter(Te=>ve()(Te.x)&&ve()(Te.y));Re=ft(Ae)||""}return t.createElement(t.Fragment,null,Re&&t.createElement("path",{"data-testid":An,className:oe.path,markerEnd:`url(#${zt})`,d:Re}),G.label?t.createElement("g",{ref:ee,"data-testid":Vt,className:oe.label,transform:`translate(${p},${E})`},n({edge:G})):null)}const vt="workspace";function ot(n){var br,aa;const{edges:o,nodes:l,renderNode:d,direction:p=ke.TOP_BOTTOM,align:E,nodeMargin:O=50,edgeMargin:U=10,rankMargin:k=50,paddingX:G=0,paddingY:oe=0,acyclicer:ee,ranker:Re=st.NETWORK_SIMPLEX,labelPosition:Ae=Ce.RIGHT,labelOffset:Te=10,edgeRanks:it=1,edgeWeight:Pt=1,renderLabel:kt,defs:nn,zoom:rt="enabled",...It}=n,Ot=(0,lt.Z)(),[ln,nr]=t.useState(100),[Mn,jr]=t.useState(100),Ct=t.useRef(new(xt()).graphlib.Graph),[rr,fo]=t.useState(((br=Ct.current.graph())==null?void 0:br.width)||0),[hr,mo]=t.useState(((aa=Ct.current.graph())==null?void 0:aa.height)||0),[qr,_r]=t.useState([]),[ho,mn]=t.useState([]),Pn=Math.max(rr,ln),$n=Math.max(hr,Mn),gr=t.useMemo(()=>wt()(Xt=>{if(!Xt)return;const hn=Fe.Z(Xt),Yt=Fe.Z(Xt.getElementById(vt));function zn(){hn.call(Ne.sP().scaleExtent([1,10]).on("zoom",Yn=>{Yn.transform.x=Math.min(0,Math.max(Yn.transform.x,Pn-Pn*Yn.transform.k)),Yn.transform.y=Math.min(0,Math.max(Yn.transform.y,$n-$n*Yn.transform.k)),Yt.attr("transform",Yn.transform)}))}rt==="enabled"?zn():rt==="enable-on-click"&&hn.on("click",()=>zn());const{width:Wn,height:eo}=Xt.getBoundingClientRect();ln!==Wn&&nr(Wn),Mn!==eo&&jr(eo)},100),[Mn,ln,Pn,$n,rt]),on=t.useCallback(()=>{const Xt=Ct.current.nodes(),hn=Ct.current.edges();Xt.forEach(Yt=>{l.some(Wn=>Wn.id===Yt)||Ct.current.removeNode(Yt)}),hn.forEach(Yt=>{o.some(Wn=>Wn.from===Yt.v&&Wn.to===Yt.w)||Ct.current.removeEdge(Yt.v,Yt.w)}),l.forEach(Yt=>{const zn=Ct.current.nodes().find(Wn=>Yt.id===Wn);if(zn&&Ct.current.node(zn)){const{width:Wn,height:eo,x:Yn,y:zs}=Ct.current.node(zn);Ct.current.setNode(zn,{...Yt,width:Wn,height:eo,x:Yn,y:zs})}else Ct.current.setNode(Yt.id,{...Yt,width:0,height:0})}),o.forEach(Yt=>{Ct.current.setEdge(Yt.from,Yt.to,{...Yt,label:Yt.label,width:0,height:0,labelpos:Ae,labeloffset:Te,weight:Pt,minlen:it})})},[o,l,Ae,Te,Pt,it]),an=t.useMemo(()=>wt()(()=>{xt().layout(Ct.current);const{height:Xt,width:hn}=Ct.current.graph(),Yt=Math.max(0,Xt||0),zn=Math.max(0,hn||0);fo(zn),mo(Yt),_r(Ct.current.nodes()),mn(Ct.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Ct.current.setGraph({rankdir:p,align:E,nodesep:O,edgesep:U,ranksep:k,marginx:G,marginy:oe,acyclicer:ee,ranker:Re}),on(),an(),an.cancel),[ee,E,p,U,G,oe,O,k,Re,on,an]);function Tr(Xt,hn){return Ct.current.setNode(Xt,hn),an(),Ct.current}function pr(Xt,hn){return Ct.current.setEdge(Xt,hn),an(),Ct.current}return t.createElement("svg",{ref:gr,...It,width:"100%",height:$n,viewBox:`0 0 ${Pn} ${$n}`},t.createElement("defs",null,t.createElement("marker",{id:zt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ot.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),nn),t.createElement("g",{id:vt},t.createElement("svg",{width:rr,height:hr,y:$n/2-hr/2,x:Pn/2-rr/2,viewBox:`0 0 ${rr} ${hr}`},ho.map(Xt=>{const hn=Ct.current.edge(Xt);return hn?t.createElement(Tt,{key:`${Xt.v}-${Xt.w}`,id:Xt,setEdge:pr,render:kt,edge:hn}):null}),qr.map(Xt=>{const hn=Ct.current.node(Xt);return hn?t.createElement(se,{key:Xt,setNode:Tr,render:d,node:hn}):null}))))}var Rt=e(72779),mt=e.n(Rt);const sn=(0,m.Z)(n=>{var o;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:(o=n.palette.banner.warning)!=null?o:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),z=n=>{var Ae;const{variant:o,message:l,id:d,fixed:p=!1}=n,E=sn(),U=useApi(storageApiRef).forBucket("notifications"),k=(Ae=U.snapshot("dismissedBanners").value)!=null?Ae:[],[G,oe]=useState(new Set(k)),ee=useObservable(U.observe$("dismissedBanners"));useEffect(()=>{var Te;if(ee!=null&&ee.value){const it=(Te=ee==null?void 0:ee.value)!=null?Te:[];oe(new Set(it))}},[ee==null?void 0:ee.value]);const Re=()=>{U.set("dismissedBanners",[...G,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!G.has(d),classes:{root:classNames(E.root,!p&&E.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(E.content,E[o]),message:E.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Re},React.createElement(Close,{className:E.icon}))]}))};var R=e(60905),P=e(90436),ce=e(86284),me=e(96465),Z=e(19133),F=e(3871);const re=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),de=({missing:n})=>{const o=re();switch(n){case"field":return t.createElement("img",{src:ce,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:me,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:Z,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:F,alt:"no Build",className:o.generalImg});default:return null}},Pe=(0,m.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 pe(n){const{title:o,description:l,missing:d,action:p}=n,E=Pe();return t.createElement(R.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:E.root,spacing:2},t.createElement(R.Z,{item:!0,xs:12,md:6},t.createElement(R.Z,{container:!0,direction:"column"},t.createElement(R.Z,{item:!0,xs:!0},t.createElement(P.Z,{variant:"h5"},o)),t.createElement(R.Z,{item:!0,xs:!0},t.createElement(P.Z,{variant:"body1"},l)),t.createElement(R.Z,{item:!0,xs:!0,className:E.action},p))),t.createElement(R.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(de,{missing:d})))}const Me=`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`,ze=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function et(n){const{annotation:o}=n,l=ze(),d=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,o)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(pe,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(P.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:l.code},t.createElement(fe,{text:Me.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:D,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var St=e(11776),at=e(38402),ut=e(49378),Wt=e(41128),Ye=e(27616),yt=e(8284),$t=e(70660),dt=e(91750),Qe=e(38016);const Xe=(n,o)=>(o.palette.type==="light"?Wt._j:Wt.$n)(o.palette[n].light,.6),bt=(n,o)=>(o.palette.type==="light"?Wt.$n:Wt._j)(o.palette[n].light,.9),qt=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>Xe(o,n)}})),Ht=({severity:n})=>{const o=qt({severity:n});return t.createElement(dt.Z,{classes:o})},Ut=({severity:n})=>{const o=qt({severity:n});return t.createElement(Qe.Z,{classes:o})},_t=(0,m.Z)(n=>({panel:{backgroundColor:({severity:o})=>bt(o,n),color:({severity:o})=>Xe(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>Xe(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>Xe(o,n),backgroundColor:({severity:o})=>bt(o,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"}),rn=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function en(n){const{severity:o="warning",title:l,message:d,children:p,defaultExpanded:E}=n,O=_t({severity:o}),U=rn(o)+(l?`: ${l}`:"");return t.createElement(Ye.Z,{defaultExpanded:E!=null?E:!1,className:O.panel,role:"alert"},t.createElement(yt.Z,{expandIcon:t.createElement(Ut,{severity:o}),className:O.summary},t.createElement(Ht,{severity:o}),t.createElement(P.Z,{className:O.summaryText,variant:"subtitle1"},U)),(d||p)&&t.createElement($t.Z,null,t.createElement(R.Z,{container:!0},d&&t.createElement(R.Z,{item:!0,xs:12},t.createElement(P.Z,{className:O.message,variant:"body1"},d)),p&&t.createElement(R.Z,{item:!0,xs:12,className:O.details},p))))}const Kt=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Jt=({error:n,message:o,stack:l,children:d})=>{const p=Kt();return t.createElement(St.Z,{dense:!0},t.createElement(at.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(te,{text:n})),t.createElement(at.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Message",secondary:o}),t.createElement(te,{text:o})),l&&t.createElement(at.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(te,{text:l})),d)};function cn(n){const{title:o,error:l,defaultExpanded:d,children:p}=n;return t.createElement(en,{severity:"error",title:o!=null?o:l.message,defaultExpanded:d},t.createElement(Jt,{error:l.name,message:l.message,stack:l.stack,children:p}))}var Nn=e(85256);const Gn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Jn(n){var Te;const{title:o,error:l,defaultExpanded:d}=n,p=Gn();if(l.name!=="ResponseError")return t.createElement(cn,{title:o!=null?o:l.message,defaultExpanded:d,error:l});const{body:E,cause:O}=l,{request:U,response:k}=E,G=`${k.statusCode}: ${O.name}`,oe=U&&`${U.method} ${U.url}`,ee=O.message.replace(/\\n/g,`
|
|
12
|
-
`),Re=(Te=O.stack)==null?void 0:Te.replace(/\\n/g,`
|
|
13
|
-
`),Ae=JSON.stringify(E,void 0,2);return t.createElement(cn,{title:o!=null?o:l.message,defaultExpanded:d,error:{name:G,message:ee,stack:Re}},oe&&t.createElement(at.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Request",secondary:U?`${oe}`:void 0}),t.createElement(te,{text:oe})),t.createElement(t.Fragment,null,t.createElement(Nn.Z,{component:"li",className:p.divider}),t.createElement(at.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(fe,{language:"json",text:Ae,showCopyCodeButton:!0})))}var Qn=e(47093);function Xn(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function Qt(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function or(n){const o=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),E=p||Xn(n);return p||Qt(E),E.appendChild(o.current),function(){o.current.remove(),E.childNodes.length===-1&&E.remove()}},[n]);function l(){return o.current||(o.current=document.createElement("div")),o.current}return l()}var N=null;const g="core.calloutSeen";function C(){const[n,o]=useState(()=>{const d=localStorage.getItem(g);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const E=localStorage.getItem(g),U={...E?JSON.parse(E):{},[d]:p};o(U),localStorage.setItem(g,JSON.stringify(U))},[]);return{states:n,setState:l}}function w(n){const{states:o,setState:l}=C(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:o[n]===!0,markSeen:d}}function V(n){const{seen:o,markSeen:l}=w(n);return{show:o===!1,hide:l}}const he=(0,m.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 ie(n){const{featureId:o,title:l,description:d,children:p}=n,{show:E,hide:O}=useShowCallout(o),U=usePortal("core.callout"),k=useRef(null),[G,oe]=useState(),ee=he(),Re=useCallback(()=>{if(k.current){const Ae=k.current.getBoundingClientRect(),Te=Math.max(Ae.width,Ae.height),it=800,Pt=Ae.x-(Te-Ae.width)/2-it,kt=Ae.y-(Te-Ae.height)/2-it,nn=Te+2*it,rt=450,It=Ae.x+Ae.width/2-rt,Ot=Ae.y-(Te-Ae.height)/2+Te+20;oe({dotLeft:Pt,dotTop:kt,dotSize:nn,borderWidth:it,textTop:Ot,textLeft:It,textWidth:rt})}},[]);return useEffect(()=>(window.addEventListener("resize",Re),window.addEventListener("scroll",Re),()=>{window.removeEventListener("resize",Re),window.removeEventListener("scroll",Re)}),[Re]),useLayoutEffect(Re,[k.current,Re]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:ee.featureWrapper,ref:k},p),createPortal(React.createElement("div",{className:ee.backdrop},React.createElement(ClickAwayListener,{onClickAway:O},React.createElement(React.Fragment,null,React.createElement("div",{className:ee.dot,"data-testid":"dot",style:{left:G==null?void 0:G.dotLeft,top:G==null?void 0:G.dotTop,width:G==null?void 0:G.dotSize,height:G==null?void 0:G.dotSize,borderWidth:G==null?void 0:G.borderWidth},onClick:O,onKeyDown:O,role:"button",tabIndex:0},React.createElement("div",{className:ee.pulseCircle})),React.createElement("div",{className:ee.text,"data-testid":"text",style:{left:G==null?void 0:G.textLeft,top:G==null?void 0:G.textTop,width:G==null?void 0:G.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),U)):React.createElement(React.Fragment,null,p)}var De=e(35292);const nt=(0,m.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 Nt({color:n="primary",disabled:o=!1,href:l="#",icon:d=t.createElement(De.Z,null),label:p,onClick:E,title:O}){const U=nt();return o?t.createElement(u.Z,{title:O,className:mt()(U.link,U.disabled),underline:"none"},d,t.createElement("span",{className:U.label},p)):t.createElement(u.Z,{title:O,className:mt()(U.link,U[n]),to:l,component:D,onClick:E},d,t.createElement("span",{className:U.label},p))}const gn=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Ln(n){const{links:o}=n,l=gn();return t.createElement("nav",{className:l.links},o.map((d,p)=>t.createElement(Nt,{key:p+1,...d})))}const yr=n=>{const o=n==="dark"?"16%":"97%";return`
|
|
14
|
-
hsl(0, 0%, ${o}) 0%,
|
|
15
|
-
hsla(0, 0%, ${o}, 0.987) 8.1%,
|
|
16
|
-
hsla(0, 0%, ${o}, 0.951) 15.5%,
|
|
17
|
-
hsla(0, 0%, ${o}, 0.896) 22.5%,
|
|
18
|
-
hsla(0, 0%, ${o}, 0.825) 29%,
|
|
19
|
-
hsla(0, 0%, ${o}, 0.741) 35.3%,
|
|
20
|
-
hsla(0, 0%, ${o}, 0.648) 41.2%,
|
|
21
|
-
hsla(0, 0%, ${o}, 0.55) 47.1%,
|
|
22
|
-
hsla(0, 0%, ${o}, 0.45) 52.9%,
|
|
23
|
-
hsla(0, 0%, ${o}, 0.352) 58.8%,
|
|
24
|
-
hsla(0, 0%, ${o}, 0.259) 64.7%,
|
|
25
|
-
hsla(0, 0%, ${o}, 0.175) 71%,
|
|
26
|
-
hsla(0, 0%, ${o}, 0.104) 77.5%,
|
|
27
|
-
hsla(0, 0%, ${o}, 0.049) 84.5%,
|
|
28
|
-
hsla(0, 0%, ${o}, 0.013) 91.9%,
|
|
29
|
-
hsla(0, 0%, ${o}, 0) 100%
|
|
30
|
-
`},ar=100,ir=10,Pr=(0,m.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:ar,height:`calc(100% + ${ir}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-ir,background:`linear-gradient(90deg, ${yr(n.palette.type)})`},fadeRight:{right:-ir,background:`linear-gradient(270deg, ${yr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Ir(n){const[[o,l],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const E=()=>{const O=p.scrollLeft,U=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([O,U])};return E(),p.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{p.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,l]}function Lr(n,o,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const E=performance.now(),O=requestAnimationFrame(U=>{if(!n.current)return;const k=U-E,G=Math.abs(d)*k/o,ee=Math.max(l,G)*Math.sign(d);n.current.scrollBy({left:ee});const Re=d-ee;Math.sign(d)!==Math.sign(Re)?p(0):p(Re)});return()=>cancelAnimationFrame(O)},[n,d,o,l]),p}function Hn(n){const{scrollStep:o=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...E}=n,O=Pr(n),U=React.useRef(),[k,G]=Ir(U),oe=Lr(U,l,d),ee=Re=>{!U.current||oe(Re?o:-o)};return React.createElement("div",{...E,className:O.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:O.container,ref:U},p),React.createElement("div",{className:classNames(O.fade,O.fadeLeft,{[O.fadeHidden]:k===0})}),React.createElement("div",{className:classNames(O.fade,O.fadeRight,{[O.fadeHidden]:G===0})}),k>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ee(!1),className:classNames(O.button,O.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),G>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ee(!0),className:classNames(O.button,O.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Rn=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function qn(n){const o=Rn(n),{shorthand:l,alpha:d}=n;return l?React.createElement("span",{className:o[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:o[d?"alpha":"beta"]},d?"Alpha":"Beta")}const _n=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Or(n){const{Progress:o}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(_n,{...n}))}const xr=(0,m.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"}),sr={code:({inline:n,className:o,children:l,...d})=>{const p=String(l).replace(/\n+$/,""),E=/language-(\w+)/.exec(o||"");return!n&&E?t.createElement(fe,{language:E[1],text:p}):t.createElement("code",{className:o,...d},l)}};function to(n){const{content:o,dialect:l="gfm",linkTarget:d}=n,p=xr();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:p.markdown,children:o,components:sr,linkTarget:d})}var Dr=e(10179);const cr=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),On=({request:n,busy:o,setBusy:l})=>{const d=cr(),[p,E]=useState(),O=async()=>{l(!0);try{await n.trigger()}catch(k){E(isError(k)?k.message:"An unspecified error occurred")}finally{l(!1)}},U=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:o,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(U,{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:O},"Log in"))};var lr=null;const er=(0,m.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Er(n){const o=er(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),O=()=>{E.forEach(U=>U.reject())};return React.createElement(Dialog,{open:Boolean(E.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog}},React.createElement(DialogTitle,{classes:{root:o.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,E.map(U=>React.createElement(LoginRequestListItem,{key:U.provider.title,request:U,busy:l,setBusy:d})))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:O},"Reject All")))}var vr=e(15277),Fr=e.n(vr),xn=e(29862);const ur=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Br(n){var O;const[o,l]=(0,t.useState)(!1),d=(0,xn.t)(),p=ur(),E=U=>{d()&&l(U)};return t.createElement(B.ZP,{title:(O=n.title)!=null?O:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(Fr(),{text:n.text,line:n.line,onToggled:E,containerClassName:p.container}))}var wr=e(67358);function dr(n){const[o,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(wr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Mr=e(94339),Ar=e(14503),$r=e(24579),Rr=e(32552),dn=e(15459),Dn=e(95544),H=e(27597);const ne=(0,m.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 ge(n){const{link:o,title:l,onClick:d}=n,p=ne();return t.createElement("div",null,t.createElement(Nn.Z,null),t.createElement(D,{to:o,onClick:d,underline:"none"},t.createElement(Dn.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(Dn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(P.Z,null,t.createElement("strong",null,l))),t.createElement(H.Z,{className:p.arrow}))))}const Be=n=>{const{slackChannel:o}=n;if(o){if(typeof o=="string")return t.createElement(t.Fragment,null,"Please contact ",o," for help.");if(!o.href)return t.createElement(t.Fragment,null,"Please contact ",o.name," for help.")}else return null;return t.createElement(M,{to:o.href,variant:"contained"},o.name)},qe=class extends t.Component{constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,l){console.error(`ErrorBoundary, error: ${o}, info: ${l}`),this.setState({error:o,errorInfo:l})}render(){const{slackChannel:o,children:l}=this.props,{error:d}=this.state;return d?t.createElement(cn,{title:"Something Went Wrong",error:d},t.createElement(Be,{slackChannel:o})):l}},gt=(0,m.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:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),pt=(0,dn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Ar.Z),Dt={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 tt(n){const{title:o,subheader:l,divider:d=!0,deepLink:p,slackChannel:E,errorBoundaryProps:O,variant:U,children:k,headerStyle:G,headerProps:oe,icon:ee,action:Re,actionsClassName:Ae,actions:Te,cardClassName:it,actionsTopRight:Pt,className:kt,noPadding:nn,titleTypographyProps:rt}=n,It=gt();let Ot={},ln={};U&&U.split(/[\s]+/g).forEach(Ct=>{Ot={...Ot,...Dt.card[Ct]},ln={...ln,...Dt.cardContent[Ct]}});const nr=()=>t.createElement("div",{className:It.headerSubheader},l&&t.createElement("div",{className:It.subheader},l),ee),Mn=O||(E?{slackChannel:E}:{});return t.createElement(Mr.Z,{style:Ot,className:kt},t.createElement(qe,{...Mn},o&&t.createElement(Rr.Z,{classes:{root:It.header,title:It.headerTitle,subheader:It.headerSubheader,avatar:It.headerAvatar,action:It.headerAction,content:It.headerContent},title:o,subheader:nr(),action:Re,style:{...G},titleTypographyProps:rt,...oe}),Pt&&t.createElement(pt,null,Pt),d&&t.createElement(Nn.Z,null),t.createElement($r.Z,{className:mt()(it,{[It.noPadding]:nn}),style:ln},k),Te&&t.createElement(Ar.Z,{className:Ae},Te),p&&t.createElement(ge,{...p})))}var Ft=e(39307);const Bt=(0,m.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},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),pn={fractional:!0,inverse:!1,unit:"%",max:100},yn=({palette:n,value:o,inverse:l,max:d})=>{if(isNaN(o))return"#ddd";const p=d||pn.max,E=l?p-o:o;return E<p/3?n.status.error:E<p*(2/3)?n.status.warning:n.status.ok};function tr(n){const[o,l]=useState(null),{getColor:d=yn}=n,p=Bt(n),{palette:E}=useTheme(),{value:O,fractional:U,inverse:k,unit:G,max:oe,description:ee}={...pn,...n},Re=U?Math.round(O*oe):O,Ae=oe!==100?Math.round(O):Re,[Te,it]=useState(!1);return useEffect(()=>{const Pt=o,kt=()=>it(!0),nn=()=>it(!1);return Pt&&ee?(Pt.addEventListener("mouseenter",kt),Pt.addEventListener("mouseleave",nn),()=>{Pt.removeEventListener("mouseenter",kt),Pt.removeEventListener("mouseleave",nn)}):()=>{it(!1)}},[ee,o]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Re,strokeWidth:12,trailWidth:12,strokeColor:d({palette:E,value:Ae,inverse:k,max:oe}),className:p.circle}),ee&&Te?React.createElement("div",{className:p.description},ee):React.createElement("div",{className:p.overlay},isNaN(O)?"N/A":`${Ae}${G}`))}const Fn=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function Gr(n){const o=Fn(n),{title:l,subheader:d,progress:p,inverse:E,deepLink:O,description:U,icon:k,variant:G,getColor:oe}=n,ee={inverse:E,description:U,getColor:oe,value:p};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:O,variant:G,icon:k},React.createElement(Gauge,{...ee})))}function fr(n){const{value:o,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let p=Math.round(o*100*100)/100;p>100&&(p=100);const E=l({palette:d,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:E})))}var Ur=e(21324),mr=e(7089),T=e(1292),I=e(42494),W=e(74603),K=e(12231),X=e(73698),J=e(72379);const le=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ue=()=>{const n=le();return t.createElement(J.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const Oe=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var $e=()=>{const n=Oe();return t.createElement(J.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const je=(0,dn.Z)(n=>(0,a.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"})(W.Z),At=(0,m.Z)(n=>(0,a.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 _e(n){const{multiple:o,items:l,label:d,placeholder:p,selected:E,onChange:O,triggerReset:U,native:k=!1,disabled:G=!1}=n,oe=At(),[ee,Re]=(0,t.useState)(E||(o?[]:"")),[Ae,Te]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Re(o?[]:"")},[U,o]),(0,t.useEffect)(()=>{E!==void 0&&Re(E)},[E]);const it=rt=>{Re(rt.target.value),O(rt.target.value)},Pt=rt=>{if(G){rt.preventDefault();return}Te(It=>o&&!(rt.target instanceof HTMLElement)?!0:!It)},kt=()=>{Te(!1)},nn=rt=>()=>{const It=ee.filter(Ot=>Ot!==rt);Re(It),O(It)};return t.createElement("div",{className:oe.root},t.createElement(P.Z,{variant:"button"},d),t.createElement(T.Z,{onClickAway:kt},t.createElement(I.Z,{className:oe.formControl},t.createElement(X.Z,{value:ee,native:k,disabled:G,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:it,onClick:Pt,open:Ae,input:t.createElement(je,null),renderValue:rt=>{var It;return o&&ee.length!==0?t.createElement("div",{className:oe.chips},rt.map(Ot=>{var ln,nr;return t.createElement(mr.Z,{key:(ln=l.find(Mn=>Mn.value===Ot))==null?void 0:ln.value,label:(nr=l.find(Mn=>Mn.value===Ot))==null?void 0:nr.label,clickable:!0,onDelete:nn(Ot),className:oe.chip})})):t.createElement(P.Z,null,ee.length===0?p||"":(It=l.find(Ot=>Ot.value===rt))==null?void 0:It.label)},IconComponent:()=>Ae?t.createElement($e,null):t.createElement(Ue,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!o&&t.createElement(K.Z,{value:[]},p),k?l&&l.map(rt=>t.createElement("option",{value:rt.value,key:rt.value},rt.label)):l&&l.map(rt=>t.createElement(K.Z,{key:rt.value,value:rt.value},o&&t.createElement(Ur.Z,{color:"primary",checked:ee.includes(rt.value)||!1,className:oe.checkbox}),rt.label))))))}const We=()=>{},Zt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:We,stepHistory:[],setStepHistory:We,onStepChange:We});function tn(n){const{children:o,elevated:l,onStepChange:d,activeStep:p=0}=n,[E,O]=useState(p),[U,k]=useState([0]);useEffect(()=>{O(p)},[p]);const G=[];let oe;return Children.forEach(o,ee=>{isValidElement(ee)&&(ee.props.end?oe=ee:G.push(ee))}),React.createElement(React.Fragment,null,React.createElement(Zt.Provider,{value:{stepIndex:E,setStepIndex:O,stepHistory:U,setStepHistory:k,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:l?2:0},G)),E>=Children.count(o)-1&&oe)}const Vn=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Sn=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),fn=({text:n,handleClick:o,disabled:l,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:o},n||(d?"Finish":"Next")),En=({text:n,handleClick:o,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Bn=({actions:n={},children:o})=>{const l=Vn(),{stepperLength:d,stepIndex:p,setStepIndex:E,stepHistory:O,setStepHistory:U,onStepChange:k}=useContext(VerticalStepperContext),G=(Ae,Te)=>{Te&&Te(),k&&k(p,Ae),E(Ae)},oe=()=>{const Ae=n.nextStep?n.nextStep(p,d-1):p+1;G(Ae,n.onNext),U([...O,Ae])},ee=()=>{O.pop(),G(O[O.length-1],n.onBack),U([...O])},Re=()=>{G(0,n.onRestart),U([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(En,{text:n.backText,handleClick:ee,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(fn,{text:n.nextText,handleClick:oe,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Sn,{text:n.restartText,handleClick:Re,stepIndex:p}),o)},Sr=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Nr(n){const{title:o,children:l,end:d,actions:p,...E}=n,O=Sr();return d?React.createElement("div",{className:O.end},React.createElement(Typography,{variant:"h6"},o),l,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...E},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},o)),React.createElement(StepContent,null,l,React.createElement(SimpleStepperFooter,{actions:p})))}const Kn=(0,m.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 Cn(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Tn(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Zr(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function no(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function js(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Gs(n){const o=Kn(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Vs=e(74600),go=e(15584);const sa=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),ca={root:{border:"0",verticalAlign:"top"}},la=n=>(0,a.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),ua=n=>(0,a.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),da=(0,dn.Z)(sa,{name:"BackstageMetadataTableTitleCell"})(go.Z),fa=(0,dn.Z)(ca,{name:"BackstageMetadataTableCell"})(go.Z),Ks=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),ks=({title:n,children:o,...l})=>React.createElement(TableRow,null,n&&React.createElement(da,null,n),React.createElement(fa,{colSpan:n?1:2,...l},o)),po=(0,dn.Z)(la,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Ys=(0,dn.Z)(ua,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),yo=(0,a.Z)({root:{margin:"0 0",listStyleType:"none"}}),ma=n=>(0,a.Z)({root:{...yo.root,paddingLeft:n.spacing(1)}}),Eo=(0,dn.Z)(yo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o)),vo=(0,dn.Z)(ma,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o));function ha(n,o){const l=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ro(d)));return o?React.createElement(vo,null,l):React.createElement(Eo,null,l)}function ga(n,o,l){const d=Object.keys(n).map(p=>{const E=ro(n[p],!0),O=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${O}: `,E)});return o?React.createElement(vo,null,d):React.createElement(Eo,null,d)}function ro(n,o,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?ga(n,o,l):Array.isArray(n)?ha(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const pa=({value:n,options:o})=>React.createElement(Fragment,null,ro(n,o)),ya=({title:n,value:o,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(pa,{value:o,options:l}));function Ea(n,o){return Object.keys(n).map(l=>React.createElement(ya,{key:l,title:l,value:n[l],options:o}))}function Js(n){const{metadata:o,dense:l=!0,options:d}=n,p=Ea(o,d||{});return React.createElement(MetadataTable,{dense:l},p)}var va=e(49429),Aa=e(86136),Ao=e(79784),zr=e(76635),Ra=e(19126),Ro=e.n(Ra);function Sa(n){return qs.stringify(n,{strictNullHandling:!0})}function So(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Co(n,o){return So(n)[o]}function Ca(n,o,l){const d={...So(n),[o]:l};return Sa(d)}function Qs(n,o=250){const[l,d]=useSearchParams(),p=l.toString(),[E,O]=useState(Co(p,n));return useEffect(()=>{const U=Co(p,n);O(k=>isEqual(U,k)?k:U)},[p,O,n]),useDebouncedEffect(()=>{const U=Ca(p,n,E);p!==U&&d(U,{replace:!0})},[d,E,p,n],o),[E,O]}const Ta={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function To(){const o=(0,c.useApiHolder)().get(c.configApiRef),l=o==null?void 0:o.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(E=>({url:E.getString("url"),title:E.getString("title")}))}})}:Ta}var ba=e(80079);function Zn(n,o){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(ba.Z,{...o})}function Xs(n){return Zn("brokenImage",n)}function _s(n){return Zn("catalog",n)}function ec(n){return Zn("chat",n)}function tc(n){return Zn("dashboard",n)}function nc(n){return Zn("docs",n)}function rc(n){return Zn("email",n)}function oc(n){return Zn("github",n)}function ac(n){return Zn("group",n)}function Vr(n){return Zn("help",n)}function ic(n){return Zn("user",n)}function sc(n){return Zn("warning",n)}const Pa=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Ia=({icon:n})=>{var d;const o=(0,c.useApp)(),l=n&&(d=o.getSystemIcon(n))!=null?d:Vr;return t.createElement(l,null)},La=({link:n})=>{var o;return t.createElement(D,{to:n.url},(o=n.title)!=null?o:n.url)},Oa=({item:n})=>{var o;return t.createElement(at.Z,null,t.createElement(Aa.Z,null,t.createElement(Ia,{icon:n.icon})),t.createElement(ut.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((l,d,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(La,{link:d,key:d.url})],[])}))};function xa(n){const{title:o,children:l}=n,{items:d}=To(),[p,E]=(0,t.useState)(!1),[O,U]=(0,t.useState)(null),k=Pa(),G=(0,ye.Z)(Re=>Re.breakpoints.down("sm")),oe=Re=>{U(Re.currentTarget),E(!0)},ee=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(Dn.Z,{display:"flex",ml:1},G?t.createElement($.Z,{color:"primary",size:"small",onClick:oe,"data-testid":"support-button"},t.createElement(Vr,null)):t.createElement(y.Z,{"data-testid":"support-button",color:"primary",onClick:oe,startIcon:t.createElement(Vr,null)},"Support")),t.createElement(Ao.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ee},t.createElement(St.Z,{className:k.popoverList},o&&t.createElement(at.Z,{alignItems:"flex-start"},t.createElement(P.Z,{variant:"subtitle1"},o)),t.Children.map(l,(Re,Ae)=>t.createElement(at.Z,{alignItems:"flex-start",key:`child-${Ae}`},Re)),d&&d.map((Re,Ae)=>t.createElement(Oa,{item:Re,key:`item-${Ae}`}))),t.createElement(va.Z,null,t.createElement(y.Z,{color:"primary",onClick:ee},"Close"))))}var oo=e(18671),wn=e(10289);const Kr=72,bo=24,Po=18,kn={drawerWidthClosed:Kr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Kr,iconSize:Kr-bo*2,iconPadding:bo,selectedIndicatorWidth:3,userBadgePadding:Po,userBadgeDiameter:Kr-Po*2,mobileSidebarHeight:56},Da=n=>({...kn,...n,iconContainerWidth:kn.drawerWidthClosed,iconSize:kn.drawerWidthClosed-kn.iconPadding*2,userBadgeDiameter:kn.drawerWidthClosed-kn.userBadgePadding*2}),Io={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:kn.defaultOpenDelayMs+200},Fa=n=>({...Io,...n}),cc="@backstage/core/sidebar-intro-dismissed",Wr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),jn=(0,t.createContext)({sidebarConfig:kn,submenuConfig:Io}),Lo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var kr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(kr||(kr={}));const Oo={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(kr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(kr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Ba=(0,m.Z)(n=>({root:o=>({width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:()=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:o.sidebarConfig.mobileSidebarHeight}}),content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),Cr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),xo=(0,t.createContext)({content:{contentRef:void 0}});function wa(n){const[o,l]=(0,t.useState)(()=>Oo.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(jn),p=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{Oo.setSidebarPinState(o)},[o]);const O=(0,ye.Z)(G=>G.breakpoints.down("xs"),{noSsr:!0}),U=()=>l(!o),k=Ba({isPinned:o,sidebarConfig:d});return t.createElement(Cr.Provider,{value:{isPinned:o,toggleSidebarPinState:U,isMobile:O}},t.createElement(xo.Provider,{value:E},t.createElement("div",{className:k.root},n.children)))}function Do(){const{content:n}=(0,t.useContext)(xo);return{focusContent:(0,t.useCallback)(()=>{var l,d;(d=(l=n==null?void 0:n.contentRef)==null?void 0:l.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var Ma=e(50023),$a=e(4190),Ua=e(87685),Na=e(44882),Za=e(57998);const za=(0,m.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:o=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${o.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),Wa=n=>{const{to:o,label:l,icon:d,value:p}=n,{sidebarConfig:E}=(0,t.useContext)(jn),O=za({sidebarConfig:E}),U=(0,wn.TH)(),{selectedMenuItemIndex:k,setSelectedMenuItemIndex:G}=(0,t.useContext)(wo),oe=(Re,Ae)=>{G(Ae===k?-1:Ae)},ee=p===k&&k>=0||p!==k&&!(k>=0)&&o===U.pathname;return t.createElement(Za.Z,{label:l,icon:d,component:D,to:o||U.pathname,onChange:oe,value:p,selected:ee,classes:O})},Fo=n=>{const{children:o,to:l,label:d,icon:p,value:E}=n,{isMobile:O}=(0,t.useContext)(Cr);return O?t.createElement(Wa,{to:l,label:d,icon:p,value:E}):t.createElement(t.Fragment,null,o)},Bo=(0,m.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:o=>({background:n.palette.navigation.background,width:"100%",bottom:`${o.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${o.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:o=>({marginBottom:`${o.sidebarConfig.mobileSidebarHeight}px`})})),Ha=n=>(0,zr.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),ja=t.createElement(Fo).type,Ga=({children:n,label:o="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(jn),E=Bo({sidebarConfig:p});return t.createElement($a.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:E.marginMobileSidebar}}},classes:{root:E.marginMobileSidebar,paperAnchorBottom:E.overlay}},t.createElement(Dn.Z,{className:E.overlayHeader},t.createElement(P.Z,{variant:"h3"},o),t.createElement($.Z,{onClick:d,classes:{root:E.overlayHeaderClose}},t.createElement(Ua.Z,null))),t.createElement(Dn.Z,null,n))},wo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Va=n=>{const{sidebarConfig:o}=(0,t.useContext)(jn),{children:l}=n,d=Bo({sidebarConfig:o}),p=(0,wn.TH)(),[E,O]=(0,t.useState)(-1);(0,t.useEffect)(()=>{O(-1)},[p.pathname]);let U=(0,c.useElementFilter)(l,G=>G.getElements().filter(oe=>oe.type===ja));if(l)U.length?U=Ha(U):U.push(t.createElement(Fo,{key:"default_menu",icon:t.createElement(Na.Z,null)},l));else return null;const k=E>=0&&!U[E].props.to;return t.createElement(Wr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(wo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:O}},t.createElement(Ga,{label:U[E]&&U[E].props.label,open:k,onClose:()=>O(-1)},U[E]&&U[E].props.children),t.createElement(Ma.Z,{className:d.root,"data-testid":"mobile-sidebar-root"},U)))},Mo=(0,m.Z)(n=>({drawer:o=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:o.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:o=>({width:o.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var bn;(function(n){n[n.Closed=0]="Closed";const l=0+1;n[n.Idle=l]="Idle";const d=l+1;n[n.Open=d]="Open"})(bn||(bn={}));const Ka=n=>{const{sidebarConfig:o}=(0,t.useContext)(jn),{openDelayMs:l=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:p,children:E}=n,O=Mo({sidebarConfig:o}),U=(0,ye.Z)(kt=>kt.breakpoints.down("md"),{noSsr:!0}),[k,G]=(0,t.useState)(bn.Closed),oe=(0,t.useRef)(),{isPinned:ee,toggleSidebarPinState:Re}=(0,t.useContext)(Cr),Ae=()=>{ee||p||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),k!==bn.Open&&!U&&(oe.current=window.setTimeout(()=>{oe.current=void 0,G(bn.Open)},l),G(bn.Idle)))},Te=()=>{ee||p||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),k===bn.Idle?G(bn.Closed):k===bn.Open&&(oe.current=window.setTimeout(()=>{oe.current=void 0,G(bn.Closed)},d)))},it=k===bn.Open&&!U||ee,Pt=kt=>{kt?(G(bn.Open),Re()):(G(bn.Closed),Re())};return t.createElement("div",{style:{}},t.createElement(Ya,null),t.createElement(Wr.Provider,{value:{isOpen:it,setOpen:Pt}},t.createElement("div",{className:O.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Ae,onFocus:p?()=>{}:Ae,onMouseLeave:p?()=>{}:Te,onBlur:p?()=>{}:Te},t.createElement("div",{className:mt()(O.drawer,{[O.drawerOpen]:it})},E))))},ka=n=>{var k,G;const o=Da((k=n.sidebarOptions)!=null?k:{}),l=Fa((G=n.submenuOptions)!=null?G:{}),{children:d,disableExpandOnHover:p,openDelayMs:E,closeDelayMs:O}=n,{isMobile:U}=(0,t.useContext)(Cr);return U?t.createElement(Va,null,d):t.createElement(jn.Provider,{value:{sidebarConfig:o,submenuConfig:l}},t.createElement(Ka,{openDelayMs:E,closeDelayMs:O,disableExpandOnHover:p},d))};function Ya(){const{sidebarConfig:n}=(0,t.useContext)(jn),{focusContent:o,contentRef:l}=Do(),d=Mo({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:mt()(d.visuallyHidden)},"Skip to content"):null}function $o(n,o){const l=new URLSearchParams(o.search).toString(),d=Ro().parse(l),p=new URLSearchParams(n.search).toString(),E=Ro().parse(p);return(0,zr.isEqual)(o.pathname,n.pathname)&&(0,zr.isMatch)(E,d)}const Ja=(0,m.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",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),lc=n=>{const{title:o,to:l,icon:d,dropdownItems:p}=n,E=Ja(),{setIsHoveredOn:O}=useContext(SidebarItemWithSubmenuContext),U=()=>{O(!1)},k=useResolvedPath(l),G=useLocation();let oe=isLocationMatch(G,k);const[ee,Re]=useState(!1),Ae=()=>{Re(!ee)};return p!==void 0?(p.some(Te=>{const it=resolvePath(Te.to);return oe=isLocationMatch(G,it),oe}),React.createElement("div",{className:E.itemContainer},React.createElement("button",{onClick:Ae,onTouchStart:Te=>Te.stopPropagation(),className:classnames(E.item,oe?E.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o),ee?React.createElement(ArrowDropUpIcon,{className:E.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:E.dropdownArrow})),p&&ee&&React.createElement("div",{className:E.dropdown},p.map((Te,it)=>React.createElement(Link,{to:Te.to,underline:"none",className:E.dropdownItem,onClick:U,onTouchStart:Pt=>Pt.stopPropagation(),key:it},React.createElement(Typography,{className:E.textContent},Te.title)))))):React.createElement("div",{className:E.itemContainer},React.createElement(Link,{to:l,underline:"none",className:classnames(E.item,oe?E.selected:void 0),onClick:U,onTouchStart:Te=>Te.stopPropagation()},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o)))},Qa=(0,m.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:o=>{var l,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:o.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:o.submenuConfig.drawerWidthClosed,transitionDelay:`${o.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:o=>({width:o.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Xa=n=>{const{isOpen:o}=(0,t.useContext)(Wr),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(jn),p=o?l.drawerWidthOpen:l.drawerWidthClosed,E=Qa({left:p,submenuConfig:d}),{isHoveredOn:O}=(0,t.useContext)(Lo),[U,k]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{k(O)},[O]),t.createElement("div",{className:mt()(E.drawer,{[E.drawerOpen]:U})},t.createElement(P.Z,{variant:"h5",className:E.title},n.title),n.children)};var Yr=e(76600),qa=e(26739),_a=e(98989),ei=e(59797),ti=e(83543);const ni=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),uc=()=>{const n=ni();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 dc=null;const ri=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fc=()=>{const n=ri();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 mc=null;const oi=n=>(0,m.Z)(o=>{var l,d,p,E;return{root:{color:o.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[o.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(l=o.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(E=(p=o.palette.navigation.navItem)==null?void 0:p.hoverBackground)!=null?E:"#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:n.iconContainerWidth,marginRight:-o.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:o.typography.fontSize},searchFieldHTMLInput:{padding:o.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:o.spacing(6),textAlign:"center",marginRight:o.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:o.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${o.palette.navigation.indicator}`,color:o.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Jr(n){return(0,t.useMemo)(()=>oi(n),[n])()}const ai=(n,o)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:E}})=>{if(!d){if(E!=null&&E.length){E.forEach(({to:O})=>d=d||$o(o,(0,wn.i3)(O)));return}p&&(d=$o(o,(0,wn.i3)(p)))}}),d},[o.pathname]);function Uo(n){return n.to===void 0}const ii=t.createElement(Xa).type,si=t.forwardRef(function({to:o,end:l,style:d,className:p,activeStyle:E,caseSensitive:O,activeClassName:U="active","aria-current":k="page",...G},oe){let{pathname:ee}=(0,wn.TH)(),{pathname:Re}=(0,wn.WU)(o);O||(ee=ee.toLocaleLowerCase("en-US"),Re=Re.toLocaleLowerCase("en-US"));let Ae=ee===Re;!Ae&&!l&&(Ae=ee.startsWith(`${Re}/`));const Te=Ae?k:void 0;return t.createElement(A.rU,{...G,to:o,ref:oe,"aria-current":Te,style:{...d,...Ae?E:void 0},className:mt()([p,Ae?U:void 0])})}),No=(0,t.forwardRef)((n,o)=>{const{icon:l,text:d,hasNotifications:p=!1,disableHighlight:E=!1,onClick:O,children:U,className:k,...G}=n,{sidebarConfig:oe}=(0,t.useContext)(jn),ee=Jr(oe),{isOpen:Re}=(0,t.useContext)(Wr),Ae=t.createElement(qa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:mt()({[ee.closedItemIcon]:!Re})},t.createElement(l,{fontSize:"small"})),Te=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ee.iconContainer},Ae),d&&t.createElement(P.Z,{variant:"subtitle2",className:ee.label},d),t.createElement("div",{className:ee.secondaryAction},U)),it=Re?Te:Ae,Pt={onClick:O,className:mt()(k,ee.root,Re?ee.open:ee.closed,Uo(n)&&ee.buttonItem,{[ee.highlightable]:!E})};return Uo(n)?t.createElement("button",{"aria-label":d,...Pt,ref:o},it):t.createElement(si,{...Pt,activeClassName:ee.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...G},it)}),ci=({children:n,...o})=>{const{sidebarConfig:l}=(0,t.useContext)(jn),d=Jr(l),[p,E]=(0,t.useState)(!1),O=(0,wn.TH)(),U=ai(n,O),k=(0,ye.Z)(Re=>Re.breakpoints.down("sm")),G=()=>{E(!0)},oe=()=>{E(!1)},ee=()=>k?p?t.createElement(ei.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(ti.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(_a.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Lo.Provider,{value:{isHoveredOn:p,setIsHoveredOn:E}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:oe,onTouchStart:p?oe:G,onMouseEnter:G,className:mt()(p&&d.highlighted)},t.createElement(No,{className:U?d.selected:"",...o},ee()),p&&n))},Zo=(0,t.forwardRef)((n,o)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===ii));return l?t.createElement(ci,{...n},l):t.createElement(No,{...n,ref:o})});function hc(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[l,d]=useState(""),p=Jr(o),E=n.icon?n.icon:SearchIcon,O=()=>{n.onSearch(l),d("")},U=ee=>{ee.key==="Enter"&&(ee.preventDefault(),O())},k=ee=>{d(ee.target.value)},G=ee=>{ee.preventDefault(),ee.stopPropagation()},oe=ee=>{O(),ee.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(Zo,{icon:E,to:n.to,onClick:oe,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:G,onChange:k,onKeyDown:U,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const gc=(0,Yr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),pc=(0,Yr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),li=(0,Yr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ui=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),yc=(0,Yr.Z)("div")(({theme:n})=>{const o=ui(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),Ec=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),o=Jr(n),{isOpen:l,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(O=>O.breakpoints.down("md"),{noSsr:!0}))return null;const E=()=>{d(!l)};return React.createElement("button",{onClick:E,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:o.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},di=(0,m.Z)(n=>({introCard:o=>({color:"#b5b5b5",fontSize:12,width:o.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:o.sidebarConfig.iconPadding,paddingRight:o.sidebarConfig.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 fi(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),l=di({sidebarConfig:o}),{text:d,onClose:p}=n,E=()=>p();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:E,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const zo=n=>{const{text:o,onDismiss:l}=n,[d,p]=useState(!1),E=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(fi,{text:o,onClose:E}))},mi=null,hi="And your recently viewed plugins will pop up here!";function vc(n){const{isOpen:o}=useContext(SidebarContext),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:E,recentlyViewedItemsDismissed:O}=d!=null?d:{},U=()=>{p(G=>({...l,...G,starredItemsDismissed:!0}))},k=()=>{p(G=>({...l,...G,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(zo,{text:mi,onDismiss:U}),React.createElement(SidebarDivider,null)),!O&&React.createElement(zo,{text:hi,onDismiss:k})):null}const gi=(0,m.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 Wo(n){const{className:o,stretch:l,noPadding:d,children:p,...E}=n,{contentRef:O}=Do(),U=gi();return t.createElement("article",{ref:O,tabIndex:-1,...E,className:mt()(U.root,o,{[U.stretch]:l,[U.noPadding]:d})},p)}var pi=e(6487),yi=e(99152);const Ei=(0,m.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 Ho(n){const{tabs:o,onChange:l,selectedIndex:d}=n,[p,E]=(0,t.useState)(d!=null?d:0),O=Ei(),U=(k,G)=>{d===void 0&&E(G),l&&l(G)};return(0,t.useEffect)(()=>{d!==void 0&&E(d)},[d]),t.createElement("div",{className:O.tabsWrapper},t.createElement(yi.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:U,value:p},o.map((k,G)=>t.createElement(pi.Z,{...k.tabProps,"data-testid":`header-tab-${G}`,label:k.label,key:k.id,value:G,className:O.defaultTab,classes:{selected:O.selected,root:O.tabRoot}}))))}function vi(n){var U,k,G;const o=(0,wn.UO)(),d=n.map(({path:oe,children:ee})=>({caseSensitive:!1,path:`${oe}/*`,element:ee})).sort((oe,ee)=>ee.path.replace(/\/\*$/,"").localeCompare(oe.path.replace(/\/\*$/,""))),p=(U=(0,wn.V$)(d))!=null?U:n[0].children,[E]=(k=(0,wn.fp)(d,`/${o["*"]}`))!=null?k:[],O=E?n.findIndex(oe=>`${oe.path}/*`===E.route.path):0;return{index:O===-1?0:O,element:p,route:(G=n[O])!=null?G:n[0]}}function jo(n){const{routes:o}=n,l=(0,wn.s0)(),{index:d,route:p,element:E}=vi(o),O=(0,t.useMemo)(()=>o.map(k=>({id:k.path,label:k.title,tabProps:k.tabProps})),[o]),U=k=>l(o[k].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ho,{tabs:O,selectedIndex:d,onChange:U}),t.createElement(Wo,null,t.createElement(oo.q,{title:p.title}),E))}const ao=()=>null;(0,c.attachComponentData)(ao,"core.gatherMountPoints",!0);function Go(n){const o=t.createElement(ao,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(l=>{if(!(0,t.isValidElement)(l))return[];if(l.type===t.Fragment)return Go(l.props.children);if(l.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:E,tabProps:O}=l.props;return[{path:d,title:p,children:E,tabProps:O}]})}function Ai(n){const o=Go(n.children);return t.createElement(jo,{routes:o})}Ai.Route=ao;const Ri=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Si(n){const{value:o,subvalue:l}=n,d=Ri();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},l))}var Ci=e(21070),Ti=e(90324),bi=e(98281),Pi=e(48049),Vo=e(51209),Ko=e(33375),Ii=e(44233),Li=e(27604),io=e(36444),Oi=e(37971),xi=e(59709),Di=e(17373),Fi=e(3702),Bi=e(93111),Qr=e(67222);const wi=(0,m.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"}),Mi=n=>{var k;const o=wi(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[E,O]=(0,t.useState)(!1),U=()=>{p({}),O(G=>!G)};return(0,t.useEffect)(()=>{l(d)},[d,l]),t.createElement("div",{className:o.root},t.createElement("div",{className:o.header},t.createElement("div",{className:o.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:U},"Clear all")),t.createElement("div",{className:o.filters},((k=n.filters)==null?void 0:k.length)&&n.filters.map(G=>t.createElement(_e,{triggerReset:E,key:G.element.label,...G.element,selected:d[G.element.label],onChange:oe=>p({...d,[G.element.label]:oe})}))))},$i={Add:(0,t.forwardRef)((n,o)=>t.createElement(Ci.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(bi.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Ii.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(Vo.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Li.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Fi.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(Oi.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(xi.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(Vo.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Pi.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ti.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Di.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Bi.Z,{...n,ref:o}))};function ko(n,o){const l=o.split(".");let d=n[l[0]];for(let p=1;p<l.length;++p){if(d===void 0)return d;const E=l[p];d=d[E]}return d}const Ui=(0,dn.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"})(Qr.W$),Yo=(0,dn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(Qr.UW),Ni=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Zi=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function zi(n,o){return n.map(l=>{const d={};let p=l.cellStyle||{};if(l.highlight)if(d.color=o.palette.textContrast,typeof p=="object")p.fontWeight=o.typography.fontWeightBold;else{const E=p;p=(O,U,k)=>({...E(O,U,k),fontWeight:o.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function Wi(n,o){return(0,zr.transform)(n,(l,d,p)=>{(0,zr.isEqual)(d,o[p])||(l[p]=d)})}const Jo={search:"",filtersOpen:!1,filters:{}};function Hi(n){const{toolbarRef:o,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:E}=n,O=Ni(),U=(0,t.useCallback)(k=>{n.onSearchChanged(k),l(k)},[n,l]);return d?t.createElement("div",{className:O.root},t.createElement("div",{className:O.root},t.createElement($.Z,{onClick:E,"aria-label":"filter list"},t.createElement(io.Z,null)),t.createElement(P.Z,{className:O.title},"Filters (",p,")")),t.createElement(Yo,{...n,ref:o,onSearchChanged:U})):t.createElement(Yo,{...n,ref:o,onSearchChanged:U})}function ji(n){const{data:o,columns:l,options:d,title:p,subtitle:E,filters:O,initialState:U,emptyContent:k,onStateChange:G,...oe}=n,ee=Zi(),Re=(0,L.Z)(),Ae={...Jo,...U},[Te,it]=(0,t.useState)(Ae.filtersOpen),Pt=(0,t.useCallback)(()=>it(mn=>!mn),[it]),[kt,nn]=(0,t.useState)(0),[rt,It]=(0,t.useState)(o),[Ot,ln]=(0,t.useState)(Ae.filters),nr=zi(l,Re),[Mn,jr]=(0,t.useState)(Ae.search);(0,t.useEffect)(()=>{if(G){const mn=Wi({search:Mn,filtersOpen:Te,filters:Ot},Jo);G(mn)}},[Mn,Te,Ot,G]);const Ct={headerStyle:{textTransform:"uppercase"}},rr=(0,t.useCallback)(mn=>{var Pn;return(Pn=l.find($n=>$n.title===mn))==null?void 0:Pn.field},[l]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Ot){It(o);return}const mn=Object.values(Ot);if(o&&mn.flat().length){const Pn=o.filter($n=>!!Object.entries(Ot).filter(([,gr])=>!!gr.length).every(([gr,on])=>{const an=ko($n,rr(gr));return Array.isArray(an)&&Array.isArray(on)?an.some(Tr=>on.includes(Tr)):Array.isArray(an)?an.includes(on):Array.isArray(on)?on.includes(an):an===on}));It(Pn)}else It(o);nn(mn.flat().length)},[o,Ot,rr]);const fo=(mn,Pn)=>{const $n=on=>{const an=new Set,Tr=pr=>{pr!=null&&an.add(pr)};return Pn&&Pn.forEach(pr=>{const br=ko(pr,rr(on));Array.isArray(br)?br.forEach(Tr):Tr(br)}),an},gr=on=>({placeholder:"All results",label:on.column,multiple:on.type==="multiple-select",items:[...$n(on.column)].sort().map(an=>({label:an,value:an}))});return mn.map(on=>({type:on.type,element:gr(on)}))},hr=!!(O!=null&&O.length),mo=(0,t.useCallback)(mn=>t.createElement(Hi,{setSearch:jr,hasFilters:hr,selectedFiltersLength:kt,toggleFilters:Pt,...mn}),[Pt,hr,kt,jr]),qr=typeof o!="function"&&o.length===0,_r=l.length,ho=(0,t.useCallback)(mn=>k&&qr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:_r},k))):t.createElement(Qr.os,{...mn}),[qr,k,_r]);return t.createElement("div",{className:ee.root},Te&&o&&typeof o!="function"&&(O==null?void 0:O.length)&&t.createElement(Mi,{filters:fo(O,o),selectedFilters:Ot,onChangeFilters:ln}),t.createElement(Qr.ZP,{components:{Header:Ui,Toolbar:mo,Body:ho},options:{...Ct,...d},columns:nr,icons:$i,title:t.createElement(t.Fragment,null,t.createElement(P.Z,{variant:"h5",component:"h3"},p),E&&t.createElement(P.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:rt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...oe}))}const Ac=n=>{const{children:o,value:l,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},l===d&&React.createElement(Box,{p:3},o))},Gi=(0,m.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"}),Rc=n=>{const o=Gi(n),{ariaLabel:l,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},Vi=(n,o)=>o?n?"20px":"0":"40px",Ki=(0,m.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>Vi(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Sc=n=>{const o=Ki(n),{isFirstNav:l,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...p})},ki=(0,m.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Cc=n=>{const o=ki(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Yi=(0,m.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 Tc(n){const{tabs:o}=n,l=Yi(),[d,p]=useState([0,0]),[E,O]=useState(0),[U,k]=useState(0),[G,oe]=useState([[]]),ee=useRef(),{width:Re}=useWindowSize(),Ae=(nn,rt)=>{p([E,rt])},Te=()=>{O(E-1)},it=()=>{O(E+1)},Pt=()=>E+1<G.length;useEffect(()=>{const rt=E===0?1:2,It=ee.current.offsetWidth-20-rt*30,Ot=d[0]*U+d[1],ln=Math.floor(It/170);k(ln),oe(chunkArray(o,ln)),p([Math.floor(Ot/ln),Ot%ln])},[Re,o]);const kt=E===d[0]?d[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:ee,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:kt,onChange:Ae,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:Te,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),G[E].map((nn,rt)=>React.createElement(StyledTab,{value:rt,isFirstIndex:rt===0,isFirstNav:E===0,key:rt,icon:nn.icon||void 0,label:nn.label||void 0})),Pt()&&React.createElement(StyledIcon,{isNext:!0,onClick:it,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),kt!==!1?G[E].map((nn,rt)=>React.createElement(TabPanel,{key:rt,value:rt,index:kt},nn.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},G[d[0]][d[1]].content))}var bc=e(44311);function Ji(n,o){const l=n[n.length-1];if(!!l)return l>=.9?o.palette.status.ok:l>=.5?o.palette.status.warning:o.palette.status.error}function Pc(n){var l;const o=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:(l=n.color)!=null?l:Ji(n.data,o)})):null}const Qi=n=>(0,m.Z)(o=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:o.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:o.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),Xi=({title:n="Unknown page",className:o})=>t.createElement(P.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function qi(n){const{description:o,title:l,titleComponent:d=void 0,children:p,textAlign:E="left"}=n,O=Qi({textAlign:E})(),U=d||t.createElement(Xi,{title:l,className:O.title});return t.createElement(t.Fragment,null,t.createElement(oo.q,{title:l}),t.createElement("div",{className:O.container},t.createElement("div",{className:O.leftItemsBox},U,o&&t.createElement(P.Z,{className:O.description,variant:"body2"},o)),t.createElement("div",{className:O.rightItemsBox},p)))}var _i=e(29788);const es=(0,m.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"}),ts=()=>{const n=es();return t.createElement("img",{src:_i,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ns=(0,m.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 rs(n){const{status:o,statusMessage:l,additionalInfo:d,supportUrl:p}=n,E=ns(),O=(0,wn.s0)(),U=To();return t.createElement(R.Z,{container:!0,spacing:0,className:E.container},t.createElement(ts,null),t.createElement(R.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(P.Z,{"data-testid":"error",variant:"body1",className:E.subtitle},"ERROR ",o,": ",l),t.createElement(P.Z,{variant:"body1",className:E.subtitle},d),t.createElement(P.Z,{variant:"h2",className:E.title},"Looks like someone dropped the mic!"),t.createElement(P.Z,{variant:"h6"},t.createElement(D,{to:"#","data-testid":"go-back-link",onClick:()=>O(-1)},"Go back"),"... or please"," ",t.createElement(D,{to:p||U.url},"contact support")," if you think this is a bug.")))}var os=e(16173);const as=(0,dn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(P.Z),so=(0,dn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Dn.Z);function is(n){const{children:o,...l}=n,[d,p]=t.useState(null),E=t.Children.toArray(o),[O,U,...k]=E,G=k.length?k.pop():E[E.length-1],oe=E.length>3,ee=Te=>{p(Te.currentTarget)},Re=()=>{p(null)},Ae=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(os.Z,{"aria-label":"breadcrumb",...l},E.length>1&&t.createElement(so,{clone:!0},O),E.length>2&&t.createElement(so,{clone:!0},U),oe&&t.createElement(as,{onClick:ee},"..."),t.createElement(Dn.Z,{style:{fontStyle:"italic"}},G)),t.createElement(Ao.ZP,{open:Ae,anchorEl:d,onClose:Re,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(St.Z,null,k.map((Te,it)=>t.createElement(at.Z,{key:it,button:!0},t.createElement(so,{clone:!0},Te))))))}const ss=(0,m.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},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"}),cs=({type:n,typeLink:o,classes:l,pageTitle:d})=>n?o?t.createElement(is,{className:l.breadcrumb},t.createElement(D,{to:o},n),t.createElement(P.Z,null,d)):t.createElement(P.Z,{className:l.type},n):null,ls=({pageTitle:n,classes:o,tooltip:l})=>{const d=t.createElement(P.Z,{className:o.title,variant:"h1"},n);return l?t.createElement(B.ZP,{title:l,placement:"top-start"},d):d},us=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(P.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function Qo(n){const{children:o,pageTitleOverride:l,style:d,subtitle:p,title:E,tooltip:O,type:U,typeLink:k}=n,G=ss(),ee=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",Re=l||E,Ae=E||l,Te=`${Re} | %s | ${ee}`,it=`${Re} | ${ee}`;return t.createElement(t.Fragment,null,t.createElement(oo.q,{titleTemplate:Te,defaultTitle:it}),t.createElement("header",{style:d,className:G.header},t.createElement(Dn.Z,{className:G.leftItemsBox},t.createElement(cs,{classes:G,type:U,typeLink:k,pageTitle:Ae}),t.createElement(ls,{classes:G,pageTitle:Ae,tooltip:O}),t.createElement(us,{classes:G,subtitle:p})),t.createElement(R.Z,{container:!0,className:G.rightItemsBox,spacing:4},o)))}const ds=(0,m.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"}),fs=({value:n,className:o})=>t.createElement(P.Z,{className:o},n);function ms(n){const{label:o,value:l,url:d}=n,p=ds(),E=t.createElement(fs,{className:p.value,value:l||"<Unknown>"});return t.createElement(R.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(P.Z,{className:p.label},o),d?t.createElement(D,{to:d},E):E))}const hs={hour:"2-digit",minute:"2-digit"};function Xo(n){const o=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const E of p)if(E.has("label")&&E.has("timezone")){let O=E.getString("label");const U={timeZone:E.getString("timezone"),...hs};try{new Date().toLocaleString(l,U)}catch{console.warn(`The timezone ${U.timeZone} is invalid. Defaulting to GMT`),U.timeZone="GMT",O="GMT"}const k=o.toLocaleTimeString(l,U);d.push({time:k,label:O})}return d}function Ic(n){const o=useApi(configApiRef),l=[],[d,p]=React.useState(l);return React.useEffect(()=>{p(Xo(o));const E=setInterval(()=>{p(Xo(o))},1e3);return()=>{clearInterval(E)}},[o]),d.length!==0?React.createElement(React.Fragment,null,d.map(E=>React.createElement(HeaderLabel,{label:E.label,value:E.time,key:E.label}))):null}const gs=n=>(0,a.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),ps=(0,m.Z)(gs,{name:"BackstageItemCardHeader"});function ys(n){const{title:o,subtitle:l,children:d}=n,p=ps(n);return t.createElement("div",{className:p.root},l&&t.createElement(P.Z,{variant:"subtitle2",component:"h3"},l),o&&t.createElement(P.Z,{variant:"h6",component:"h4"},o),d)}function Lc(n){const{description:o,tags:l,title:d,type:p,subtitle:E,label:O,onClick:U,href:k}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:E||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((G,oe)=>React.createElement(Chip,{size:"small",label:G,key:oe}))):null,o),React.createElement(CardActions,null,!k&&React.createElement(Button,{to:"#",onClick:U,color:"primary"},O),k&&React.createElement(Button,{to:k,color:"primary"},O)))}const Es=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),vs=(0,m.Z)(Es,{name:"BackstageItemCardGrid"});function As(n){const{children:o,...l}=n,d=vs(l);return t.createElement("div",{className:d.root,...l},o)}var Rs=e(41547);const Ss=(0,m.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function qo(n){const{themeId:o,children:l}=n,{isMobile:d}=(0,t.useContext)(Cr),p=Ss({isMobile:d});return t.createElement(Rs.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("div",{className:p.root},l))}function Cs(n){const{themeId:o,children:l,...d}=n;return t.createElement(qo,{themeId:o},t.createElement(Qo,{...d}),l)}var vn=e(30195);const Oc=vn.z.object({providerInfo:vn.z.object({}).catchall(vn.z.unknown()).optional(),profile:vn.z.object({email:vn.z.string().optional(),displayName:vn.z.string().optional(),picture:vn.z.string().optional()}),backstageIdentity:vn.z.object({token:vn.z.string(),identity:vn.z.object({type:vn.z.literal("user"),userEntityRef:vn.z.string(),ownershipEntityRefs:vn.z.array(vn.z.string())})})}),_o={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Ts(n){const o=new Date(Date.now()+_o.defaultTokenExpiryMillis);if(!n)return o;const[l,d,p]=n.split("."),E=JSON.parse(atob(d));return typeof E.exp!="number"?o:new Date(E.exp*1e3-_o.tokenExpiryMarginMillis)}class xc{constructor(o){Q(this,"options");Q(this,"abortController");Q(this,"state");this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),l=o.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!d)throw new TypeError(`Invalid user entity reference "${l}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const o=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Ts(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:l,previous:o},l}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!l.ok)throw await ResponseError.fromResponse(l);return proxiedSessionSchema.parse(await l.json())}}const Dc=n=>{const o=useApi(discoveryApiRef),[{status:l,error:d},{execute:p}]=useAsync(async()=>{const E=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await E.start(),n.onSignInSuccess(E)});return useMountEffect(p),l==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},bs=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),co=({children:n})=>{const o=bs();return t.createElement(R.Z,{component:"li",item:!0,classes:o},n)};class lo{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 o="user:default/guest";return{type:"user",userEntityRef:o,ownershipEntityRefs:[o]}}async getCredentials(){return{}}async signOut(){}}function Ps(n){const[o,l,d]=n.split(".");return JSON.parse(atob(l))}class uo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new uo(o)}async getIdToken(){var o,l;return(l=(o=this.result).getIdToken)==null?void 0:l.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:d}=Ps(o);return{type:"user",userEntityRef:l,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var l,d;return{token:await((d=(l=this.result).getIdToken)==null?void 0:d.call(l))}}async signOut(){var o,l;return(l=(o=this.result).signOut)==null?void 0:l.call(o)}}class Hr{constructor(o,l,d){Q(this,"profilePromise");this.identity=o,this.authApi=l,this.profile=d}static createGuest(){return new lo}static fromLegacy(o){return uo.fromResult(o)}static create(o){return new Hr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!l)throw new TypeError(`Invalid user entity reference "${o}"`);return l[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(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Is={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:l,title:d,message:p}=n,E=(0,c.useApi)(l),O=(0,c.useApi)(c.errorApiRef),U=async()=>{try{const k=await E.getBackstageIdentity({instantPopup:!0});if(!k)throw new Error(`The ${d} provider is not configured to support sign-in`);const G=await E.getProfile();o(Hr.create({identity:k.identity,profile:G,authApi:E}))}catch(k){O.post(new Dr.SP("Login failed",k))}};return t.createElement(co,null,t.createElement(tt,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:U},"Sign In")},t.createElement(P.Z,{variant:"body1"},p)))},loader:async(n,o)=>{const l=n.get(o),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const p=await l.getProfile();return Hr.create({identity:d.identity,profile:p,authApi:l})}},Ls={Component:({onSignInSuccess:n})=>t.createElement(co,null,t.createElement(tt,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new lo)},"Enter")},t.createElement(P.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new lo};var Os=e(63955),ea=e(86619),ta=e(74828),xs=e(45455),Ds=e.n(xs);const Fs=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Bs=(0,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),na=n=>{const{ref:o,...l}=n;return{inputRef:o,...l}},ws={Component:({onSignInSuccess:n})=>{const o=Bs(),{register:l,handleSubmit:d,formState:p}=(0,Os.cI)({mode:"onChange"}),{errors:E}=p,O=({userId:U})=>{n(Hr.fromLegacy({userId:U,profile:{email:`${U}@example.com`}}))};return t.createElement(co,null,t.createElement(tt,{title:"Custom User",variant:"fullHeight"},t.createElement(P.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:o.form,onSubmit:d(O)},t.createElement(I.Z,null,t.createElement(ea.Z,{...na(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(E.userId)}),E.userId&&t.createElement(ta.Z,{error:!0},E.userId.message)),t.createElement(I.Z,null,t.createElement(ea.Z,{...na(l("idToken",{required:!1,validate:U=>!U||Fs.test(U)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(E.idToken)}),E.idToken&&t.createElement(ta.Z,{error:!0},E.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(p!=null&&p.isDirty)||!Ds()(E)},"Continue"))))},loader:async()=>{}},Xr="@backstage/core:SignInPage:provider",ra={guest:Ls,custom:ws,common:Is};function oa(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Nc(n){return n.reduce((l,d)=>{if(typeof d=="string")return oa(d,l),l[d]={components:ra[d],id:d},l;const{id:p}=d;return oa(p,l),l[p]={components:ra.common,id:p,config:d},l},{})}const Zc=(n,o)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,E]=useState(!0),O=useCallback(k=>{o(IdentityApiSignOutProxy.from({identityApi:k,signOut:async()=>{var G;localStorage.removeItem(Xr),await((G=k.signOut)==null?void 0:G.call(k))}}))},[o]);useLayoutEffect(()=>{var ee;if(!p)return;const k=localStorage.getItem(Xr);if(k===null){E(!1);return}const G=n[k];if(!G){E(!1);return}let oe=!1;return G.components.loader(d,(ee=G.config)==null?void 0:ee.apiRef).then(Re=>{oe||(Re?O(Re):E(!1))}).catch(Re=>{oe||(localStorage.removeItem(Xr),l.post(Re),E(!1))}),()=>{oe=!0}},[p,l,o,d,n,O]);const U=useMemo(()=>Object.keys(n).map(k=>{const G=n[k],{Component:oe}=G.components,ee=Re=>{localStorage.setItem(Xr,G.id),O(Re)};return React.createElement(oe,{key:G.id,config:G.config,onSignInSuccess:ee})}),[n,O]);return[p,U]},Ms=({onSignInSuccess:n,providers:o=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),E=useStyles(),O=getSignInProviders(o),[U,k]=useSignInProviders(O,n);return U?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:E},k)))},$s=({provider:n,auto:o,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),E=useApi(configApiRef),[O,U]=useState(),[k,G]=useState(!1),oe=async({checkExisting:ee,showPopup:Re})=>{try{let Ae;if(ee&&(Ae=await p.getBackstageIdentity({optional:!0})),!Ae&&(Re||o)&&(G(!0),Ae=await p.getBackstageIdentity({instantPopup:!0}),!Ae))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Ae){G(!0);return}const Te=await p.getProfile();l(UserIdentity.create({identity:Ae.identity,authApi:p,profile:Te}))}catch(Ae){U(Ae),G(!0)}};return useMountEffect(()=>oe({checkExisting:!0})),k?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:E.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{oe({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),O&&O.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},O.message)))))):React.createElement(Progress,null)};function zc(n){return"provider"in n?React.createElement($s,{...n}):React.createElement(Ms,{...n})}const Us=(0,m.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"}),Ns=(0,dn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(Rr.Z);function Wc(n){const{slackChannel:o,errorBoundaryProps:l,children:d,title:p,deepLink:E,value:O,onChange:U}=n,k=Us(),[G,oe]=useState(0),ee=U||((Te,it)=>oe(it));let Re;O?React.Children.map(d,Te=>{React.isValidElement(Te)&&(Te==null?void 0:Te.props.value)===O&&(Re=Te==null?void 0:Te.props.children)}):React.Children.map(d,(Te,it)=>{React.isValidElement(Te)&&it===G&&(Re=Te==null?void 0:Te.props.children)});const Ae=l||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Ae},p&&React.createElement(Ns,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:k,value:O||G,onChange:ee},d),React.createElement(Divider,null),React.createElement(CardContent,null,Re),E&&React.createElement(BottomLink,{...E})))}const Zs=(0,m.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 Hc(n){const{children:o,...l}=n,d=Zs();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},88609:function(q,i,e){"use strict";e.d(i,{Os:function(){return h},fC:function(){return v}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),h=()=>{const a=(0,t.useContext)(c);if(a===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const s=a.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s},v=a=>{const{attributes:s,children:f}=a,u={...h(),...s},A=(0,r.EI)({1:u});return t.createElement(c.Provider,{value:A},f)};function m(a,s){const f=y=>React.createElement(v,{attributes:s},React.createElement(a,{...y}));return f.displayName=`WithAnalyticsContext(${a.displayName||a.name||"Component"})`,f}},28461:function(q,i,e){"use strict";e.d(i,{f:function(){return r.fC},z:function(){return m}});var r=e(88609),t=e(27399),c=e(2784);class h{constructor(s,f={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=s,this.context=f}setContext(s){this.context=s}captureEvent(s,f,{value:y,attributes:u}={}){try{this.analyticsApi.captureEvent({action:s,subject:f,value:y,attributes:u,context:this.context})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}function v(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const a=(0,c.useRef)(null),s=(0,r.Os)(),f=v();function y(){return a.current===null&&(a.current=new h(f)),a.current}const u=y();return u.setContext(s),u}},39135:function(q,i,e){"use strict";e.d(i,{CL:function(){return M},sM:function(){return t},$v:function(){return u},v_:function(){return A},hg:function(){return b},uB:function(){return y},bq:function(){return f},Ds:function(){return S},NW:function(){return D},VE:function(){return _},W0:function(){return L},gP:function(){return $},F4:function(){return h},ux:function(){return m},Kp:function(){return c},$4:function(){return B},p_:function(){return a},ZM:function(){return x},D:function(){return v},gW:function(){return s},E6:function(){return Y}});var r=e(86833),t;(function(te){const Ee="SignedIn";te.SignedIn=Ee;const Ge="SignedOut";te.SignedOut=Ge})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),h=(0,r.createApiRef)({id:"core.auth.github"}),v=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),a=(0,r.createApiRef)({id:"core.auth.microsoft"}),s=(0,r.createApiRef)({id:"core.auth.onelogin"}),f=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),u=(0,r.createApiRef)({id:"core.alert"}),A=(0,r.createApiRef)({id:"core.analytics"}),b=(0,r.createApiRef)({id:"core.apptheme"}),S=(0,r.createApiRef)({id:"core.config"}),D=(0,r.createApiRef)({id:"core.discovery"}),_=(0,r.createApiRef)({id:"core.error"});var M;(function(te){te[te.None=0]="None";const Ge=1;te[te.Active=Ge]="Active"})(M||(M={}));const L=(0,r.createApiRef)({id:"core.featureflags"}),$=(0,r.createApiRef)({id:"core.fetch"}),B=(0,r.createApiRef)({id:"core.identity"}),x=(0,r.createApiRef)({id:"core.oauthrequest"}),Y=(0,r.createApiRef)({id:"core.storage"})},27399:function(q,i,e){"use strict";e.d(i,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(i,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(i,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(i,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(i,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(i,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(i,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(i,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(i,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(i,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(i,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(i,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(i,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(i,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(i,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(q,i,e){"use strict";e.d(i,{T:function(){return t}});class r{constructor(h){if(this.config=h,!h.id.split(".").flatMap(m=>m.split("-")).every(m=>m.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 t(c){return new r(c)}},25182:function(q,i,e){"use strict";e.d(i,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(q,i,e){"use strict";e.d(i,{createApiFactory:function(){return v.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),c=e(16362),h=e.n(c);e.o(c,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(i,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(i,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(i,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(i,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(i,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(i,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(i,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(i,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(i,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(i,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(i,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(i,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(i,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(i,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(i,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return c.useRouteRefParams}});var v=e(25182)},16362:function(){},5761:function(q,i,e){"use strict";e.d(i,{I_:function(){return c},h_:function(){return h}});var r=e(2784),t=e(76241);function c(){const m=(0,t.Vt)("api-context");if(!m)throw new Error("API context is not available");const a=m.atVersion(1);if(!a)throw new Error("ApiContext v1 not available");return a}function h(m){const s=c().get(m);if(!s)throw new Error(`No implementation available for ${m}`);return s}function v(m){return function(s){const f=u=>{const A=c(),b={};for(const S in m)if(m.hasOwnProperty(S)){const D=m[S],_=A.get(D);if(!_)throw new Error(`No implementation available for ${D}`);b[S]=_}return React.createElement(s,{...u,...b})},y=s.displayName||s.name||"Component";return f.displayName=`withApis(${y})`,f}}},31311:function(q,i,e){"use strict";e.d(i,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(q,i,e){"use strict";e.d(i,{q:function(){return t}});var r=e(76241);const t=()=>{const c=(0,r.Vt)("app-context");if(!c)throw new Error("App context is not available");const h=c.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},74181:function(q,i,e){"use strict";e.d(i,{R5:function(){return h},CO:function(){return A},YO:function(){return b},P4:function(){return u},IY:function(){return v},vJ:function(){return M}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function h(L,$,B){var te;const x=L;let Y=(te=x[c])!=null?te:t.get(L);if(Y||(Y={map:new Map},Object.defineProperty(x,c,{enumerable:!1,configurable:!0,writable:!1,value:Y}),t.set(L,Y)),Y.map.has($)){const Ee=L.displayName||L.name;throw new Error(`Attempted to attach duplicate data "${$}" to component "${Ee}"`)}Y.map.set($,B)}function v(L,$){var Y;if(!L)return;const B=L.type;if(!B)return;const x=(Y=B[c])!=null?Y:t.get(B);if(!!x)return x.map.get($)}var m=e(2784),a=e(88609),s=e(31311),f=e(82772);class y extends m.Component{constructor(){super(...arguments);Q(this,"state",{error:void 0});Q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(B){return{error:B}}render(){const{error:B}=this.state,{app:x,plugin:Y}=this.props,{ErrorBoundaryFallback:te}=x.getComponents();return B?m.createElement(te,{error:B,resetError:this.handleErrorReset,plugin:Y}):this.props.children}}function u(L){const{component:$,mountPoint:B,name:x}=L;return b({component:{lazy:()=>$().then(Y=>{const te=Ge=>{try{(0,f.tg)(B)}catch(Ke){if(typeof Ke=="object"&&Ke!==null){const{message:fe}=Ke;if(typeof fe=="string"&&fe.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${B} 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 Ke}return m.createElement(Y,{...Ge})},Ee=x||Y.displayName||Y.name||"LazyComponent";return te.displayName=`RoutableExtension(${Ee})`,te},Y=>Ee=>{const Ge=(0,s.useApp)(),{BootErrorPage:Ke}=Ge.getComponents();return m.createElement(Ke,{step:"load-chunk",error:Y})})},data:{"core.mountPoint":B},name:x})}function A(L){const{component:$,name:B}=L;return b({component:$,name:B})}function b(L){const{data:$={},name:B}=L;B||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let x;if("lazy"in L.component){const te=L.component.lazy;x=(0,m.lazy)(()=>te().then(Ee=>({default:Ee})))}else x=L.component.sync;const Y=B||x.displayName||x.name||"Component";return{expose(te){const Ee=Ge=>{const Ke=(0,s.useApp)(),{Progress:fe}=Ke.getComponents(),ye=$==null?void 0:$["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(fe,null)},m.createElement(y,{app:Ke,plugin:te},m.createElement(a.fC,{attributes:{pluginId:te.getId(),...B&&{extension:B},...ye&&{routeRef:ye.id}}},m.createElement(x,{...Ge}))))};h(Ee,"core.plugin",te);for(const[Ge,Ke]of Object.entries($))h(Ee,Ge,Ke);return Ee.displayName=`Extension(${Y})`,Ee}}}var S=e(27399);function D(L,$,B,x){return m.Children.toArray(L).flatMap(Y=>{if(!(0,m.isValidElement)(Y))return[];if(Y.type===m.Fragment)return D(Y.props.children,$,B,x);if(v(Y,"core.featureFlagged")){const te=Y.props;return("with"in te?$.isActive(te.with):!$.isActive(te.without))?D(Y.props.children,$,B,x):[]}if(B===void 0||B(Y))return[Y];if(x)throw new Error(x);return D(Y.props.children,$,B,x)})}class _{constructor($,B){this.node=$,this.featureFlagsApi=B}selectByComponentData($){const B=D(this.node,this.featureFlagsApi,x=>v(x,$.key)!==void 0,$.withStrictError);return new _(B,this.featureFlagsApi)}findComponentData($){return D(this.node,this.featureFlagsApi,x=>v(x,$.key)!==void 0).map(x=>v(x,$.key)).filter(x=>x!==void 0)}getElements(){return D(this.node,this.featureFlagsApi)}}function M(L,$,B=[]){const x=(0,S.useApi)(S.featureFlagsApiRef),Y=new _(L,x);return(0,m.useMemo)(()=>$(Y),[L,...B])}},80274:function(){},36964:function(q,i,e){"use strict";e.d(i,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return h.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return h.CO},createExternalRouteRef:function(){return s.x8},createPlugin:function(){return a.r},createReactExtension:function(){return h.YO},createRoutableExtension:function(){return h.P4},createRouteRef:function(){return s.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return h.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return c.useApp},useElementFilter:function(){return h.vJ},useRouteRef:function(){return s.tg},useRouteRefParams:function(){return s.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(i,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(31311);e.o(c,"attachComponentData")&&e.d(i,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"createApiFactory")&&e.d(i,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createApiRef")&&e.d(i,{createApiRef:function(){return c.createApiRef}}),e.o(c,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(i,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(i,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(i,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"getComponentData")&&e.d(i,{getComponentData:function(){return c.getComponentData}}),e.o(c,"useApi")&&e.d(i,{useApi:function(){return c.useApi}}),e.o(c,"useApiHolder")&&e.d(i,{useApiHolder:function(){return c.useApiHolder}}),e.o(c,"useElementFilter")&&e.d(i,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"useRouteRef")&&e.d(i,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return c.useRouteRefParams}});var h=e(74181),v=e(80274),m=e.n(v);e.o(v,"createApiFactory")&&e.d(i,{createApiFactory:function(){return v.createApiFactory}}),e.o(v,"createApiRef")&&e.d(i,{createApiRef:function(){return v.createApiRef}}),e.o(v,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return v.createExternalRouteRef}}),e.o(v,"createPlugin")&&e.d(i,{createPlugin:function(){return v.createPlugin}}),e.o(v,"createRouteRef")&&e.d(i,{createRouteRef:function(){return v.createRouteRef}}),e.o(v,"useApi")&&e.d(i,{useApi:function(){return v.useApi}}),e.o(v,"useApiHolder")&&e.d(i,{useApiHolder:function(){return v.useApiHolder}}),e.o(v,"useRouteRef")&&e.d(i,{useRouteRef:function(){return v.useRouteRef}}),e.o(v,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return v.useRouteRefParams}});var a=e(96896),s=e(82772)},96896:function(q,i,e){"use strict";e.d(i,{r:function(){return t}});class r{constructor(h){this.config=h}getId(){return this.config.id}getApis(){var h;return(h=this.config.apis)!=null?h:[]}getFeatureFlags(){var h,v;return(v=(h=this.config.featureFlags)==null?void 0:h.slice())!=null?v:[]}get routes(){var h;return(h=this.config.routes)!=null?h:{}}get externalRoutes(){var h;return(h=this.config.externalRoutes)!=null?h:{}}provide(h){return h.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(q,i,e){var S,D,_;"use strict";e.d(i,{x8:function(){return f},NT:function(){return h},tg:function(){return A},Oi:function(){return b}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(L,$){Q(this,S,"absolute");this.id=L,this.params=$}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}S=t;function h(M){var L;return new c(M.id,(L=M.params)!=null?L:[])}const v=/^\w+$/;class m{constructor(L,$,B,x){Q(this,D,"sub");this.id=L,this.path=$,this.parent=B,this.params=x}toString(){return`routeRef{type=sub,id=${this.id}}`}}D=t;function a(M){const{id:L,path:$,parent:B}=M,x=$.split("/").filter(Ee=>Ee.startsWith(":")).map(Ee=>Ee.substring(1)),Y=[...B.params,...x];if(B.params.some(Ee=>x.includes(Ee)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!$.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${$}'`);if($.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${$}'`);for(const Ee of x)if(!v.test(Ee))throw new Error(`SubRouteRef path has invalid param, got '${Ee}'`);return new m(L,$,B,Y)}class s{constructor(L,$,B){Q(this,_,"external");this.id=L,this.params=$,this.optional=B}toString(){return`routeRef{type=external,id=${this.id}}`}}_=t;function f(M){var L;return new s(M.id,(L=M.params)!=null?L:[],Boolean(M.optional))}var y=e(2784),u=e(10289);function A(M){const L=(0,u.TH)(),$=(0,r.Vt)("routing-context");if(!$)throw new Error("Routing context is not available");const B=$.atVersion(1),x=(0,y.useMemo)(()=>B&&B.resolve(M,L),[B,M,L]);if(!$)throw new Error("useRouteRef used outside of routing context");if(!B)throw new Error("RoutingContext v1 not available");const Y="optional"in M&&M.optional;if(!x&&!Y)throw new Error(`No path for ${M}`);return x}function b(M){return(0,u.UO)()}},10179:function(q,i,e){"use strict";e.d(i,{SP:function(){return S},dR:function(){return u},VL:function(){return _},BD:function(){return t}});function r(M){if(typeof M!="object"||M===null||Array.isArray(M))return!1;const L=M;return!(typeof L.name!="string"||L.name===""||typeof L.message!="string")}function t(M){if(typeof M!="object"||M===null||Array.isArray(M))throw new Error(`Encountered invalid error, not an object, got '${M}'`);const L=M;if(typeof L.name!="string"||L.name==="")throw new Error(`Encountered error object without a name, got '${M}'`);if(typeof L.message!="string")throw new Error(`Encountered error object without a message, got '${M}'`)}var c=e(24852);function h(M,L){const $=serializeErrorInternal(M),B={name:"Unknown",message:"<no reason given>",...$};return L!=null&&L.includeStack||delete B.stack,B}function v(M){const L=(0,c.deserializeError)(M);return M.stack||(L.stack=void 0),L}function m(M){if(r(M)){const L=String(M);return L!=="[object Object]"?L:`${M.name}: ${M.message}`}return`unknown error '${M}'`}class a extends Error{constructor($,B){var Y;let x=$;if(B!==void 0){const te=m(B);x?x+=`; caused by ${te}`:x=`caused by ${te}`}super(x);Q(this,"cause");(Y=Error.captureStackTrace)==null||Y.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(B)?B:void 0}}class s extends null{}class f extends null{}class y extends null{}class u extends a{}class A extends null{}class b extends null{}class S extends a{constructor(L,$){super(L,$),this.name=r($)?$.name:"Error"}}async function D(M){var L;try{const $=await M.text();if($){if((L=M.headers.get("content-type"))!=null&&L.startsWith("application/json"))try{const B=JSON.parse($);if(B.error&&B.response)return B}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}, ${$}`},response:{statusCode:M.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${M.status} ${M.statusText}`},response:{statusCode:M.status}}}class _ extends Error{constructor($){super($.message);Q(this,"response");Q(this,"body");Q(this,"cause");this.name="ResponseError",this.response=$.response,this.body=$.data,this.cause=$.cause}static async fromResponse($){const B=await D($),x=B.response.statusCode||$.status,Y=B.error.name||$.statusText,te=`Request failed with ${x} ${Y}`,Ee=v(B.error);return new _({message:te,response:$,data:B,cause:Ee})}}},36356:function(q,i,e){var u,A,b,S,D;"use strict";e.d(i,{nW:function(){return y},ae:function(){return m},q3:function(){return a}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class c{constructor(L){In(this,u,void 0);Un(this,u,L)}async getCredentials(L){const $=new URL(L.url),B=Je(this,u).find(x=>x.isUrlSupported($));if(!B)throw new Error(`No auth provider available for '${L.url}', see https://backstage.io/link?scm-auth`);return B.getCredentials(L)}}u=new WeakMap;const _=class{constructor(L,$,B,x){In(this,A,void 0);In(this,b,void 0);In(this,S,void 0);In(this,D,void 0);Un(this,A,$),Un(this,b,B),Un(this,S,x),Un(this,D,L)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:L,gitlab:$,azure:B,bitbucket:x})=>_.merge(_.forGithub(L),_.forGitlab($),_.forAzure(B),_.forBitbucket(x))})}static forAuthApi(L,$){return new _("generic",L,$.host,$.scopeMapping)}static forGithub(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"github.com";return new _("github",L,B,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"gitlab.com";return new _("gitlab",L,B,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"dev.azure.com";return new _("azure",L,B,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(L,$){var x;const B=(x=$==null?void 0:$.host)!=null?x:"bitbucket.org";return new _("bitbucket",L,B,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...L){return new c(L)}isUrlSupported(L){return L.host===Je(this,b)}getAdditionalScopesForProvider(L){var $,B;return!(L!=null&&L.customScopes)||Je(this,D)==="generic"?[]:(B=($=L.customScopes)==null?void 0:$[Je(this,D)])!=null?B:[]}async getCredentials(L){const{url:$,additionalScope:B,...x}=L,Y=Je(this,S).default.slice();B!=null&&B.repoWrite&&Y.push(...Je(this,S).repoWrite);const te=this.getAdditionalScopesForProvider(B);te.length&&Y.push(...te);const Ee=[...new Set(Y)],Ge=await Je(this,A).getAccessToken(Ee,x);return{token:Ge,headers:{Authorization:`Bearer ${Ge}`}}}};let h=_;A=new WeakMap,b=new WeakMap,S=new WeakMap,D=new WeakMap;var v=e(68370);class m{static fromConfig(L){return v.Lx.fromConfig(L)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var s=e(73250),f=e(2784);const y=M=>{var Y;const{type:L}=M,$=(0,r.useApp)(),B=s.Z,x=L&&(Y=$.getSystemIcon(L))!=null?Y:B;return f.createElement(x,null)}},68370:function(q,i,e){var Ht,Ut,_t,rn,en,Kt,Jt;"use strict";e.d(i,{Lx:function(){return bt},Pb:function(){return ze}});var r=e(82717),t=e.n(r),c=e(76635);function h(N){const g=new URL("http://example.com");return g.host=N,g.host===N}function v(N){try{return new URL(N),!0}catch{return!1}}function m(N,g){return{list(){return N},byUrl(C){try{const w=typeof C=="string"?new URL(C):C;return N.find(V=>g(V)===w.host)}catch{return}},byHost(C){return N.find(w=>g(w)===C)}}}function a(N){const{url:g,base:C,lineNumber:w}=N;try{return new URL(g),g}catch{}let V;if(g.startsWith("/")){const{filepath:he}=t()(C);V=new URL(C);const ie=(0,c.trimEnd)(V.pathname.substring(0,V.pathname.length-he.length),"/");V.pathname=`${ie}${g}`}else V=new URL(g,C);return V.search=new URL(C).search,w&&(V.hash=`L${w}`),V.toString()}const s="amazonaws.com";function f(N){var Nt;const g=N.getOptionalString("endpoint"),C=(Nt=N.getOptionalBoolean("s3ForcePathStyle"))!=null?Nt:!1;let w,V;if(g){try{const gn=new URL(g);w=gn.host,V=gn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${g}' is not a valid URL`)}if(V!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${g}'`)}else w=s;const he=N.getOptionalString("accessKeyId"),ie=N.getOptionalString("secretAccessKey"),De=N.getOptionalString("roleArn"),nt=N.getOptionalString("externalId");return{host:w,endpoint:g,s3ForcePathStyle:C,accessKeyId:he,secretAccessKey:ie,roleArn:De,externalId:nt}}function y(N){const g=N.map(f);return g.some(C=>C.host===s)||g.push({host:s}),g}const qt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(g){this.integrationConfig=g}resolveUrl(g){return a(g)}resolveEditUrl(g){return g}};let u=qt;Q(u,"factory",({config:g})=>{var w;const C=y((w=g.getOptionalConfigArray("integrations.awsS3"))!=null?w:[]);return m(C.map(V=>new qt(V)),V=>V.config.host)});const A="GB",cn=class{constructor(g,C,w,V,he,ie){In(this,Ht,void 0);In(this,Ut,void 0);In(this,_t,void 0);In(this,rn,void 0);In(this,en,void 0);In(this,Kt,void 0);In(this,Jt,(...g)=>{const C=new URL(Je(this,Ht));return C.pathname=g.map(w=>encodeURIComponent(w)).join("/"),C});Un(this,Ht,g),Un(this,Ut,C),Un(this,_t,w),Un(this,rn,V),Un(this,en,he),Un(this,Kt,ie)}static fromRepoUrl(g){var gn;const C=new URL(g);let w,V,he;const ie=C.pathname.split("/").map(Ln=>decodeURIComponent(Ln));if(ie[2]==="_git"?(w=ie[1],V=he=ie[3]):ie[3]==="_git"&&(w=ie[1],V=ie[2],he=ie[4]),!w||!V||!he)throw new Error("Azure URL must point to a git repository");const De=(gn=C.searchParams.get("path"))!=null?gn:void 0;let nt;const Nt=C.searchParams.get("version");if(Nt){if(Nt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");nt=Nt.slice(2)}return new cn(C.origin,w,V,he,De,nt)}toRepoUrl(){let g;return Je(this,_t)===Je(this,rn)?g=Je(this,Jt).call(this,Je(this,Ut),"_git",Je(this,rn)):g=Je(this,Jt).call(this,Je(this,Ut),Je(this,_t),"_git",Je(this,rn)),Je(this,en)&&g.searchParams.set("path",Je(this,en)),Je(this,Kt)&&g.searchParams.set("version",A+Je(this,Kt)),g.toString()}toFileUrl(){if(!Je(this,en))throw new Error("Azure URL must point to a specific path to be able to download a file");const g=Je(this,Jt).call(this,Je(this,Ut),Je(this,_t),"_apis","git","repositories",Je(this,rn),"items");return g.searchParams.set("api-version","6.0"),g.searchParams.set("path",Je(this,en)),Je(this,Kt)&&g.searchParams.set("version",Je(this,Kt)),g.toString()}toArchiveUrl(){const g=Je(this,Jt).call(this,Je(this,Ut),Je(this,_t),"_apis","git","repositories",Je(this,rn),"items");return g.searchParams.set("recursionLevel","full"),g.searchParams.set("download","true"),g.searchParams.set("api-version","6.0"),Je(this,en)&&g.searchParams.set("scopePath",Je(this,en)),Je(this,Kt)&&g.searchParams.set("version",Je(this,Kt)),g.toString()}toCommitsUrl(){const g=Je(this,Jt).call(this,Je(this,Ut),Je(this,_t),"_apis","git","repositories",Je(this,rn),"commits");return g.searchParams.set("api-version","6.0"),Je(this,Kt)&&g.searchParams.set("searchCriteria.itemVersion.version",Je(this,Kt)),g.toString()}getOwner(){return Je(this,Ut)}getProject(){return Je(this,_t)}getRepo(){return Je(this,rn)}getPath(){return Je(this,en)}getRef(){return Je(this,Kt)}};let b=cn;Ht=new WeakMap,Ut=new WeakMap,_t=new WeakMap,rn=new WeakMap,en=new WeakMap,Kt=new WeakMap,Jt=new WeakMap;const S="dev.azure.com";function D(N){var w;const g=(w=N.getOptionalString("host"))!=null?w:S,C=N.getOptionalString("token");if(!h(g))throw new Error(`Invalid Azure integration config, '${g}' is not a valid host`);return{host:g,token:C}}function _(N){const g=N.map(D);return g.some(C=>C.host===S)||g.push({host:S}),g}const Nn=class{constructor(g){this.integrationConfig=g}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){var V;const{url:C,base:w}=g;if(v(C))return C;try{const he=b.fromRepoUrl(w),ie=new URL(w),De=new URL(`https://a.com${(V=he.getPath())!=null?V:""}`),nt=new URL(C,De).pathname;return ie.searchParams.set("path",nt),g.lineNumber&&(ie.searchParams.set("line",String(g.lineNumber)),ie.searchParams.set("lineEnd",String(g.lineNumber+1)),ie.searchParams.set("lineStartColumn","1"),ie.searchParams.set("lineEndColumn","1")),ie.toString()}catch{return new URL(C,w).toString()}}resolveEditUrl(g){return g}};let M=Nn;Q(M,"factory",({config:g})=>{var w;const C=_((w=g.getOptionalConfigArray("integrations.azure"))!=null?w:[]);return m(C.map(V=>new Nn(V)),V=>V.config.host)});var L=e(48834).Buffer;function $(N){return AzureUrl.fromRepoUrl(N).toFileUrl()}function B(N){return AzureUrl.fromRepoUrl(N).toArchiveUrl()}function x(N){return AzureUrl.fromRepoUrl(N).toCommitsUrl()}function Y(N,g){const C=g?{...g}:{};if(N.token){const w=L.from(`:${N.token}`,"utf8");C.Authorization=`Basic ${w.toString("base64")}`}return{headers:C}}const te="bitbucket.org",Ee="https://api.bitbucket.org/2.0";function Ge(N){var ie;const g=(ie=N.getOptionalString("host"))!=null?ie:te;let C=N.getOptionalString("apiBaseUrl");const w=N.getOptionalString("token"),V=N.getOptionalString("username"),he=N.getOptionalString("appPassword");if(!h(g))throw new Error(`Invalid Bitbucket integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):g===te?C=Ee:C=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:C,token:w,username:V,appPassword:he}}function Ke(N){const g=N.map(Ge);return g.some(C=>C.host===te)||g.push({host:te,apiBaseUrl:Ee}),g}const Gn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=a(g);if(!g.lineNumber)return C;const w=new URL(C);return this.integrationConfig.host==="bitbucket.org"?w.hash=`lines-${g.lineNumber}`:w.hash=`${g.lineNumber}`,w.toString()}resolveEditUrl(g){const C=t()(g),w=new URL(g);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",C.ref),w.toString()}};let fe=Gn;Q(fe,"factory",({config:g})=>{var w,V,he;const C=Ke((he=g.getOptionalConfigArray("integrations.bitbucket"))!=null?he:[...(w=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[],...(V=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?V:[]]);return m(C.map(ie=>new Gn(ie)),ie=>ie.config.host)});var ye=e(96279),Ie=e(48834).Buffer;async function Ze(N,g){const{name:C,owner:w,resource:V}=parseGitUrl(N),he=V==="bitbucket.org";let ie=he?`${g.apiBaseUrl}/repositories/${w}/${C}`:`${g.apiBaseUrl}/projects/${w}/repos/${C}/default-branch`,De=await fetch(ie,st(g));if(De.status===404&&!he&&(ie=`${g.apiBaseUrl}/projects/${w}/repos/${C}/branches/default`,De=await fetch(ie,st(g))),!De.ok){const Nt=`Failed to retrieve default branch from ${ie}, ${De.status} ${De.statusText}`;throw new Error(Nt)}let nt;if(he)nt=(await De.json()).mainbranch.name;else{const{displayId:Nt}=await De.json();nt=Nt}if(!nt)throw new Error(`Failed to read default branch from ${ie}. Response ${De.status} ${De.json()}`);return nt}async function ke(N,g){const{name:C,owner:w,ref:V,protocol:he,resource:ie,filepath:De}=parseGitUrl(N),nt=ie==="bitbucket.org";let Nt=V;Nt||(Nt=await Ze(N,g));const gn=De?`&path=${encodeURIComponent(De)}`:"";return nt?`${he}://${ie}/${w}/${C}/get/${Nt}.tar.gz`:`${g.apiBaseUrl}/projects/${w}/repos/${C}/archive?format=tgz&at=${Nt}&prefix=${w}-${C}${gn}`}function ct(N,g){try{const{owner:C,name:w,ref:V,filepathtype:he,filepath:ie}=parseGitUrl(N);if(!C||!w||he!=="browse"&&he!=="raw"&&he!=="src")throw new Error("Invalid Bitbucket URL or file path");const De=ie.replace(/^\//,"");if(g.host==="bitbucket.org"){if(!V)throw new Error("Invalid Bitbucket URL or file path");return`${g.apiBaseUrl}/repositories/${C}/${w}/src/${V}/${De}`}return`${g.apiBaseUrl}/projects/${C}/repos/${w}/raw/${De}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${N}, ${C}`)}}function st(N){const g={};if(N.token)g.Authorization=`Bearer ${N.token}`;else if(N.username&&N.appPassword){const C=Ie.from(`${N.username}:${N.appPassword}`,"utf8");g.Authorization=`Basic ${C.toString("base64")}`}return{headers:g}}const Ce="bitbucket.org",Ne="https://api.bitbucket.org/2.0";function Fe(N){const g=Ce,C=Ne,w=N.getString("username"),V=N.getString("appPassword");return{host:g,apiBaseUrl:C,username:w,appPassword:V}}function lt(N){const g=N.map(Fe);return g.length===0&&g.push({host:Ce,apiBaseUrl:Ne}),g}const Jn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=a(g);if(g.lineNumber){const w=new URL(C);return w.hash=`lines-${g.lineNumber}`,w.toString()}return C}resolveEditUrl(g){const C=t()(g),w=new URL(g);return w.searchParams.set("mode","edit"),w.searchParams.set("at",C.ref),w.toString()}};let Ve=Jn;Q(Ve,"factory",({config:g})=>{var w;const C=lt((w=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?w:[]);return m(C.map(V=>new Jn(V)),V=>V.config.host)});var xt=e(48834).Buffer;async function ht(N,g){const{name:C,owner:w}=parseGitUrl(N),V=`${g.apiBaseUrl}/repositories/${w}/${C}`,he=await fetch(V,Lt(g));if(!he.ok){const nt=`Failed to retrieve default branch from ${V}, ${he.status} ${he.statusText}`;throw new Error(nt)}const De=(await he.json()).mainbranch.name;if(!De)throw new Error(`Failed to read default branch from ${V}. Response ${he.status} ${he.json()}`);return De}async function wt(N,g){const{name:C,owner:w,ref:V,protocol:he,resource:ie}=parseGitUrl(N);let De=V;return De||(De=await ht(N,g)),`${he}://${ie}/${w}/${C}/get/${De}.tar.gz`}function jt(N,g){try{const{owner:C,name:w,ref:V,filepathtype:he,filepath:ie}=parseGitUrl(N);if(!C||!w||he!=="src"&&he!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const De=ie.replace(/^\//,"");if(!V)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${g.apiBaseUrl}/repositories/${C}/${w}/src/${V}/${De}`}catch(C){throw new Error(`Incorrect URL: ${N}, ${C}`)}}function Lt(N){const g={};if(N.username&&N.appPassword){const C=xt.from(`${N.username}:${N.appPassword}`,"utf8");g.Authorization=`Basic ${C.toString("base64")}`}return{headers:g}}function Gt(N){const g=N.getString("host");let C=N.getOptionalString("apiBaseUrl");const w=N.getOptionalString("token");if(!h(g))throw new Error(`Invalid Bitbucket Server integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:C,token:w}}function zt(N){return N.map(Gt)}const Qn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const C=a(g);if(g.lineNumber){const w=new URL(C),V=w.pathname.split("/").slice(-1)[0];return w.hash=`${V}-${g.lineNumber}`,w.toString()}return C}resolveEditUrl(g){const C=t()(g),w=new URL(g);return w.searchParams.set("mode","edit"),w.searchParams.set("spa","0"),w.searchParams.set("at",C.ref),w.toString()}};let Mt=Qn;Q(Mt,"factory",({config:g})=>{var w;const C=zt((w=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?w:[]);return m(C.map(V=>new Qn(V)),V=>V.config.host)});async function An(N,g){const{name:C,owner:w}=parseGitUrl(N);let V=`${g.apiBaseUrl}/projects/${w}/repos/${C}/default-branch`,he=await fetch(V,un(g));if(he.status===404&&(V=`${g.apiBaseUrl}/projects/${w}/repos/${C}/branches/default`,he=await fetch(V,un(g))),!he.ok){const nt=`Failed to retrieve default branch from ${V}, ${he.status} ${he.statusText}`;throw new Error(nt)}const{displayId:ie}=await he.json(),De=ie;if(!De)throw new Error(`Failed to read default branch from ${V}. Response ${he.status} ${he.json()}`);return De}async function Vt(N,g){const{name:C,owner:w,ref:V,filepath:he}=parseGitUrl(N);let ie=V;ie||(ie=await An(N,g));const De=he?`&path=${encodeURIComponent(he)}`:"";return`${g.apiBaseUrl}/projects/${w}/repos/${C}/archive?format=tgz&at=${ie}&prefix=${w}-${C}${De}`}function Et(N,g){try{const{owner:C,name:w,ref:V,filepathtype:he,filepath:ie}=parseGitUrl(N);if(!C||!w||he!=="browse"&&he!=="raw"&&he!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const De=ie.replace(/^\//,"");return`${g.apiBaseUrl}/projects/${C}/repos/${w}/raw/${De}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${N}, ${C}`)}}function un(N){const g={};return N.token&&(g.Authorization=`Bearer ${N.token}`),{headers:g}}function se(N){const g=N.getString("host");let C=N.getOptionalString("baseUrl"),w=N.getOptionalString("cloneUrl"),V=N.getOptionalString("gitilesBaseUrl");const he=N.getOptionalString("username"),ie=N.getOptionalString("password");if(h(g)){if(C&&!v(C))throw new Error(`Invalid Gerrit integration config, '${C}' is not a valid baseUrl`);if(w&&!v(w))throw new Error(`Invalid Gerrit integration config, '${w}' is not a valid cloneUrl`);if(V&&!v(V))throw new Error(`Invalid Gerrit integration config, '${V}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${g}`,V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,w?w=(0,c.trimEnd)(w,"/"):w=C,{host:g,baseUrl:C,cloneUrl:w,gitilesBaseUrl:V,username:he,password:ie}}function j(N){return N.map(se)}const Xn=class{constructor(g){this.integrationConfig=g}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const{url:C,base:w,lineNumber:V}=g;let he;return C?he=new URL(C,w):he=new URL(w),V&&(he.hash=V.toString()),he.toString()}resolveEditUrl(g){return g}};let ae=Xn;Q(ae,"factory",({config:g})=>{var w;const C=j((w=g.getOptionalConfigArray("integrations.gerrit"))!=null?w:[]);return m(C.map(V=>new Xn(V)),V=>V.config.host)});var ue=e(48834).Buffer;const ve=")]}'";function Le(N,g){const w=g.replace(N.gitilesBaseUrl,"").split("/").filter(Nt=>!!Nt),V=w.indexOf("+");if(V<=0)throw new Error(`Unable to parse project from url: ${g}`);const he=trimStart(w.slice(0,V).join("/"),"/"),ie=w.indexOf("heads");if(ie<=0)throw new Error(`Unable to parse branch from url: ${g}`);const De=w[ie+1],nt=w.slice(ie+2).join("/");return{branch:De,filePath:nt===""?"/":nt,project:he}}function we(N){return N.password?"/a/":"/"}function Se(N,g){const{branch:C,project:w}=Le(N,g);return`${N.baseUrl}${we(N)}projects/${encodeURIComponent(w)}/branches/${C}`}function He(N,g){const{project:C}=Le(N,g);return`${N.cloneUrl}${we(N)}${C}`}function ft(N,g){const{branch:C,filePath:w,project:V}=Le(N,g);return`${N.baseUrl}${we(N)}projects/${encodeURIComponent(V)}/branches/${C}/files/${encodeURIComponent(w)}/content`}function Tt(N){return`${N.baseUrl}${we(N)}projects/`}function vt(N){const g={};if(!N.password)return g;const C=ue.from(`${N.username}:${N.password}`,"utf8");return g.Authorization=`Basic ${C.toString("base64")}`,{headers:g}}async function ot(N){const g=await N.text();if(g.startsWith(ve))try{return JSON.parse(g.slice(ve.length))}catch(C){throw new Error(`Invalid response from Gerrit: ${g.slice(0,10)} - ${C}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${g.slice(0,10)}`)}const Rt="github.com",mt="https://api.github.com",sn="https://raw.githubusercontent.com";function z(N){var ie,De;const g=(ie=N.getOptionalString("host"))!=null?ie:Rt;let C=N.getOptionalString("apiBaseUrl"),w=N.getOptionalString("rawBaseUrl");const V=N.getOptionalString("token"),he=(De=N.getOptionalConfigArray("apps"))==null?void 0:De.map(nt=>({appId:nt.getNumber("appId"),clientId:nt.getString("clientId"),clientSecret:nt.getString("clientSecret"),webhookSecret:nt.getString("webhookSecret"),privateKey:nt.getString("privateKey"),allowedInstallationOwners:nt.getOptionalStringArray("allowedInstallationOwners")}));if(!h(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):g===Rt&&(C=mt),w?w=(0,c.trimEnd)(w,"/"):g===Rt&&(w=sn),{host:g,apiBaseUrl:C,rawBaseUrl:w,token:V,apps:he}}function R(N){const g=N.map(z);return g.some(C=>C.host===Rt)||g.push({host:Rt,apiBaseUrl:mt,rawBaseUrl:sn}),g}function P(N,g,C){try{const{owner:w,name:V,ref:he,filepathtype:ie,filepath:De}=parseGitUrl(N);if(!w||!V||!he||ie!=="blob"&&ie!=="raw"&&ie!=="tree")throw new Error("Invalid GitHub URL or file path");const nt=De.replace(/^\//,"");return me(g,C)==="api"?`${g.apiBaseUrl}/repos/${w}/${V}/contents/${nt}?ref=${he}`:`${g.rawBaseUrl}/${w}/${V}/${he}/${nt}`}catch(w){throw new Error(`Incorrect URL: ${N}, ${w}`)}}function ce(N,g){const C={};return me(N,g)==="api"&&(C.Accept="application/vnd.github.v3.raw"),g.token&&(C.Authorization=`token ${g.token}`),{headers:C}}function me(N,g){return N.apiBaseUrl&&(g.token||!N.rawBaseUrl)?"api":"raw"}class Z{constructor(){Q(this,"tokenCache",new Map);Q(this,"isNotExpired",g=>g.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(g,C){const w=this.tokenCache.get(g);if(w&&this.isNotExpired(w.expiresAt))return{accessToken:w.token};const V=await C();return this.tokenCache.set(g,V),{accessToken:V.token}}}const F={Accept:"application/vnd.github.machine-man-preview+json"};class re{constructor(g,C){Q(this,"appClient");Q(this,"baseUrl");Q(this,"baseAuthConfig");Q(this,"cache",new Z);Q(this,"allowedInstallationOwners");this.allowedInstallationOwners=g.allowedInstallationOwners,this.baseUrl=C,this.baseAuthConfig={appId:g.appId,privateKey:g.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Octokit({baseUrl:C,headers:F,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(g,C){var ie;const{installationId:w,suspended:V}=await this.getInstallationData(g);if(this.allowedInstallationOwners&&!((ie=this.allowedInstallationOwners)!=null&&ie.includes(g)))return{accessToken:void 0};if(V)throw new Error(`The GitHub application for ${g} is suspended`);const he=C?`${g}/${C}`:g;return this.cache.getOrCreateToken(he,async()=>{const De=await this.appClient.apps.createInstallationAccessToken({installation_id:w,headers:F});if(C&&De.data.repository_selection==="selected"){const nt=new Octokit({baseUrl:this.baseUrl,auth:De.data.token});if(!(await nt.paginate(nt.apps.listReposAccessibleToInstallation)).some(Ln=>Ln.name===C))throw new Error(`The Backstage GitHub application used in the ${g} organization does not have access to a repository with the name ${C}`)}return{token:De.data.token,expiresAt:DateTime.fromISO(De.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(g){const w=(await this.getInstallations()).find(he=>{var ie,De;return((De=(ie=he.account)==null?void 0:ie.login)==null?void 0:De.toLocaleLowerCase("en-US"))===g.toLocaleLowerCase("en-US")});if(w)return{installationId:w.id,suspended:Boolean(w.suspended_by)};const V=new Error(`No app installation found for ${g} in ${this.baseAuthConfig.appId}`);throw V.name="NotFoundError",V}}class de{constructor(g){Q(this,"apps");var C,w;this.apps=(w=(C=g.apps)==null?void 0:C.map(V=>new re(V,g.apiBaseUrl)))!=null?w:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(C=>C.getInstallations()))).flat():[]}async getAppToken(g,C){if(this.apps.length===0)return;const w=await Promise.all(this.apps.map(De=>De.getInstallationCredentials(g,C).then(nt=>({credentials:nt,error:void 0}),nt=>({credentials:void 0,error:nt})))),V=w.find(De=>De.credentials);if(V)return V.credentials.accessToken;const ie=w.map(De=>De.error).find(De=>De.name!=="NotFoundError");if(ie)throw ie}}class Pe{constructor(g,C){this.githubAppCredentialsMux=g,this.token=C}async getCredentials(g){const C=parseGitUrl(g.url),w=C.owner||C.name,V=C.owner?C.name:void 0;let he="app",ie=await this.githubAppCredentialsMux.getAppToken(w,V);return ie||(he="token",ie=this.token),{headers:ie?{Authorization:`Bearer ${ie}`}:void 0,token:ie,type:he}}}Q(Pe,"create",null);class pe{static fromIntegrations(g){const C=new Map;return g.github.list().forEach(w=>{const V=SingleInstanceGithubCredentialsProvider.create(w.config);C.set(w.config.host,V)}),new pe(C)}constructor(g){this.providers=g}async getCredentials(g){const C=new URL(g.url),w=this.providers.get(C.host);if(!w)throw new Error(`There is no GitHub integration that matches ${g.url}. Please add a configuration for an integration.`);return w.getCredentials(g)}}const Qt=class{constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return ze(a(g),"tree")}resolveEditUrl(g){return ze(g,"edit")}};let Me=Qt;Q(Me,"factory",({config:g})=>{var w;const C=R((w=g.getOptionalConfigArray("integrations.github"))!=null?w:[]);return m(C.map(V=>new Qt(V)),V=>V.config.host)});function ze(N,g){return N.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,w,V,he)=>`//${w}/${V}/${he}/${g}/`)}const et="gitlab.com",St="https://gitlab.com/api/v4";function at(N){const g=N.getString("host");let C=N.getOptionalString("apiBaseUrl");const w=N.getOptionalString("token");let V=N.getOptionalString("baseUrl");if(C?C=(0,c.trimEnd)(C,"/"):g===et&&(C=St),V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,h(g)){if(!C||!v(C))throw new Error(`Invalid GitLab integration config, '${C}' is not a valid apiBaseUrl`);if(!v(V))throw new Error(`Invalid GitLab integration config, '${V}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${g}' is not a valid host`);return{host:g,token:w,apiBaseUrl:C,baseUrl:V}}function ut(N){const g=N.map(at);return g.some(C=>C.host===et)||g.push({host:et,apiBaseUrl:St,baseUrl:`https://${et}`}),g}async function Wt(N,g){if(N.includes("/-/blob/")){const C=await dt(N,g);return $t(N,C).toString()}return yt(N).toString()}function Ye(N){const{token:g=""}=N;return{headers:{"PRIVATE-TOKEN":g}}}function yt(N){try{const g=new URL(N),[C,w,V,he,...ie]=g.pathname.split("/");if(C!==""||w===""||V===""||he!=="blob"||!ie.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return g.pathname=[C,w,V,"raw",...ie].join("/"),g}catch(g){throw new Error(`Incorrect url: ${N}, ${g}`)}}function $t(N,g){try{const C=new URL(N),w=C.pathname.split("/-/blob/")[1],[V,...he]=w.split("/");return C.pathname=["/api/v4/projects",g,"repository/files",encodeURIComponent(decodeURIComponent(he.join("/"))),"raw"].join("/"),C.search=`?ref=${V}`,C}catch(C){throw new Error(`Incorrect url: ${N}, ${C}`)}}async function dt(N,g){const C=new URL(N);if(!C.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const w=C.pathname.split("/-/blob/")[0],V=new URL(`${C.origin}/api/v4/projects/${encodeURIComponent(w.replace(/^\//,""))}`),he=await fetch(V.toString(),Ye(g)),ie=await he.json();if(!he.ok)throw new Error(`GitLab Error '${ie.error}', ${ie.error_description}`);return Number(ie.id)}catch(w){throw new Error(`Could not get GitLab project ID for: ${N}, ${w}`)}}const or=class{constructor(g){this.integrationConfig=g}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return a(g)}resolveEditUrl(g){return Xe(g,"edit")}};let Qe=or;Q(Qe,"factory",({config:g})=>{var w;const C=ut((w=g.getOptionalConfigArray("integrations.gitlab"))!=null?w:[]);return m(C.map(V=>new or(V)),V=>V.config.host)});function Xe(N,g){return N.replace(/\/\-\/(blob|tree|edit)\//,`/-/${g}/`)}class bt{constructor(g){Q(this,"byType");this.byType=g}static fromConfig(g){return new bt({awsS3:u.factory({config:g}),azure:M.factory({config:g}),bitbucket:fe.factory({config:g}),bitbucketCloud:Ve.factory({config:g}),bitbucketServer:Mt.factory({config:g}),gerrit:ae.factory({config:g}),github:Me.factory({config:g}),gitlab:Qe.factory({config:g})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(g=>g.list())}byUrl(g){return Object.values(this.byType).map(C=>C.byUrl(g)).find(Boolean)}byHost(g){return Object.values(this.byType).map(C=>C.byHost(g)).find(Boolean)}resolveUrl(g){const C=this.byUrl(g.base);return C?C.resolveUrl(g):a(g)}resolveEditUrl(g){const C=this.byUrl(g);return C?C.resolveEditUrl(g):g}}},30294:function(q,i,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return v.plugin}});var t=e(2784),c=e(47093),h=e(10289),v=e(82250),m=e(47955),a=e(49208),s=e(36964),f=e(68099);const y=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:H})=>a.UrlPatternDiscovery.compile(`${H.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new a.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new a.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:H})=>{const ne=new a.ErrorAlerter(H,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(ne,{hidden:!1}),ne}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:H})=>a.WebStorage.create({errorApi:H})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:H,identityApi:ne,discoveryApi:ge})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:ge}),a.FetchMiddlewares.injectIdentityAuth({identityApi:ne,config:H})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new a.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.GoogleAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.MicrosoftAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.GithubAuth.create({discoveryApi:H,oauthRequestApi:ne,defaultScopes:["read:user"],environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.OktaAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.GitlabAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.OneLoginAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.BitbucketAuth.create({discoveryApi:H,oauthRequestApi:ne,defaultScopes:["team"],environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:H,oauthRequestApi:ne,configApi:ge})=>a.AtlassianAuth.create({discoveryApi:H,oauthRequestApi:ne,environment:ge.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:f.RV,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:H,discovery:ne,identity:ge})=>f.iM.create({config:H,discovery:ne,identity:ge})})];var u=e(77277),A=e(9118),b=e(62833);function S({children:H}){return(0,h.GV)()?t.createElement(t.Fragment,null,H):t.createElement(h.VA,null,H)}const D=()=>t.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),_=({step:H,error:ne})=>{let ge="";return H==="load-config"?ge=`The configuration failed to load, someone should have a look at this error: ${ne.message}`:H==="load-chunk"&&(ge=`Lazy loaded chunk failed to load, try to reload the page: ${ne.message}`),t.createElement(S,null,t.createElement(A.ErrorPage,{status:"501",statusMessage:ge}))},M=({error:H,resetError:ne,plugin:ge})=>t.createElement(A.ErrorPanel,{title:`Error in ${ge==null?void 0:ge.getId()}`,defaultExpanded:!0,error:H},t.createElement(u.Z,{variant:"outlined",onClick:ne},"Retry")),L={Progress:A.Progress,Router:b.VK,NotFoundErrorPage:D,BootErrorPage:_,ErrorBoundaryFallback:M};var $=e(43642),B=e(80079),x=e(90941),Y=e(32915),te=e(40562),Ee=e(21853),Ge=e(60744),Ke=e(66569),fe=e(30254),ye=e(13384),Ie=e(15933),Ze=e(58838),ke=e(86737),ct=e(4989),st=e(44407),Ce=e(18628),Ne=e(84219),Fe=e(98685),lt=e(39781);const Ve={brokenImage:B.Z,catalog:Ce.Z,scaffolder:Y.Z,techdocs:te.Z,search:Ee.Z,chat:Ge.Z,dashboard:Ke.Z,docs:fe.Z,email:ye.Z,github:Ze.Z,group:Ne.Z,help:ke.Z,"kind:api":Ie.Z,"kind:component":st.Z,"kind:domain":$.Z,"kind:group":Ne.Z,"kind:location":ct.Z,"kind:system":x.Z,"kind:user":Fe.Z,user:Fe.Z,warning:lt.Z};var xt=e(28981),ht=e(98192),wt=e(15222),jt=e(41547),Lt=e(87561);const Gt=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(wt.Z,null),Provider:({children:H})=>t.createElement(jt.Z,{theme:xt.lightTheme},t.createElement(Lt.ZP,null,H))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(ht.Z,null),Provider:({children:H})=>t.createElement(jt.Z,{theme:xt.darkTheme},t.createElement(Lt.ZP,null,H))}];function zt(H){var ne,ge,Be;return(0,a.createSpecializedApp)({...H,apis:(ne=H==null?void 0:H.apis)!=null?ne:[],bindRoutes:H==null?void 0:H.bindRoutes,components:{...L,...H==null?void 0:H.components},configLoader:H==null?void 0:H.configLoader,defaultApis:y,icons:{...Ve,...H==null?void 0:H.icons},plugins:(ge=H==null?void 0:H.plugins)!=null?ge:[],themes:(Be=H==null?void 0:H.themes)!=null?Be:Gt})}var Mt=e(82394),An=e.n(Mt),Vt=e(48023),Et=e(76635);async function un({storageApi:H}){var gt;const ne=H.forBucket("settings"),ge=H.forBucket("starredEntities"),Be=ne.snapshot("starredEntities").value;if(!(0,Et.isArray)(Be))return;const qe=new Set((gt=ge.snapshot("entityRefs").value)!=null?gt:[]);Be.filter(Et.isString).map(pt=>pt.split(":")).filter(pt=>pt.length===4&&pt[0]==="entity").map(([pt,Dt,tt,Ft])=>(0,Vt.eE)({kind:Dt,namespace:tt,name:Ft})).forEach(pt=>qe.add(pt)),await ge.set("entityRefs",Array.from(qe)),await ne.remove("starredEntities")}class se{constructor(ne){Q(this,"settingsStore");Q(this,"starredEntities");Q(this,"subscribers",new Set);Q(this,"observable",new(An())(ne=>(ne.next(new Set(this.starredEntities)),this.subscribers.add(ne),()=>{this.subscribers.delete(ne)})));var ge;un(ne).then(),this.settingsStore=ne.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((ge=this.settingsStore.snapshot("entityRefs").value)!=null?ge:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Be=>{var qe;this.starredEntities=new Set((qe=Be.value)!=null?qe:[]),this.notifyChanges()}})}async toggleStarred(ne){this.starredEntities.has(ne)?this.starredEntities.delete(ne):this.starredEntities.add(ne),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const ne of this.subscribers)ne.next(new Set(this.starredEntities))}}var j=e(39398),ae=e(49782),ue=e(79692);const ve=(0,ue.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function Le(H){const ne=H.result,ge=ve();return React.createElement(Link,{to:ne.location},React.createElement(ListItem,{alignItems:"flex-start",className:ge.flexContainer},React.createElement(ListItemText,{className:ge.itemText,primaryTypographyProps:{variant:"h6"},primary:ne.title,secondary:ne.text}),React.createElement(Box,null,ne.kind&&React.createElement(Chip,{label:`Kind: ${ne.kind}`,size:"small"}),ne.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${ne.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var we=e(30097),Se=e(53479),He=e(95544),ft=e(99688),Tt=e(12231),vt=e(86136),ot=e(49378),Rt=e(85256),mt=e(61837),sn=e(79784),z=e(50758),R=e(49166),P=e(31654),ce=e(43054),me=e(40749);const Z="catalog-entity",F=(0,me.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:Z}),re=(0,me.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),de=(0,me.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:Z}),Pe=(0,me.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:Z}),pe=(0,me.J$)({name:"catalog.location.read",attributes:{action:"read"}}),Me=(0,me.J$)({name:"catalog.location.create",attributes:{action:"create"}}),ze=(0,me.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),et=(0,ue.Z)({button:{color:"white"}});function St(H){var tr;const{UNSTABLE_extraContextMenuItems:ne,UNSTABLE_contextMenuOptions:ge,onUnregisterEntity:Be,onInspectEntity:qe}=H,[gt,pt]=(0,t.useState)(),Dt=et(),tt=(0,Se.useEntityPermission)(de),Ft=Fn=>{pt(Fn.currentTarget)},Bt=()=>{pt(void 0)},pn=ne&&[...ne.map(Fn=>t.createElement(Tt.Z,{key:Fn.title,onClick:()=>{Bt(),Fn.onClick()}},t.createElement(vt.Z,null,t.createElement(Fn.Icon,{fontSize:"small"})),t.createElement(ot.Z,{primary:Fn.title}))),t.createElement(Rt.Z,{key:"the divider is here!"})],yn=(tr=!tt.allowed||(ge==null?void 0:ge.disableUnregister))!=null?tr:!1;return t.createElement(t.Fragment,null,t.createElement(mt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Ft,"data-testid":"menu-button",className:Dt.button},t.createElement(ce.Z,null)),t.createElement(sn.ZP,{open:Boolean(gt),onClose:Bt,anchorEl:gt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(z.Z,null,pn,t.createElement(Tt.Z,{onClick:()=>{Bt(),Be()},disabled:yn},t.createElement(vt.Z,null,t.createElement(R.Z,{fontSize:"small"})),t.createElement(ot.Z,{primary:"Unregister entity"})),t.createElement(Tt.Z,{onClick:()=>{Bt(),qe()}},t.createElement(vt.Z,null,t.createElement(P.Z,{fontSize:"small"})),t.createElement(ot.Z,{primary:"Inspect entity"})))))}const at="plugin.catalog.entityLayoutRoute",ut=()=>null;(0,s.attachComponentData)(ut,at,!0),(0,s.attachComponentData)(ut,"core.gatherMountPoints",!0);function Wt(H){const{entity:ne,title:ge}=H;return t.createElement(He.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(He.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},ge),ne&&t.createElement(Se.FavoriteEntity,{entity:ne}))}function Ye(H,ne,ge,Be){var Dt,tt,Ft,Bt,pn;const qe=(Dt=H!=null?H:Be==null?void 0:Be.kind)!=null?Dt:"",gt=(tt=ne!=null?ne:Be==null?void 0:Be.metadata.namespace)!=null?tt:"";return{headerTitle:`${(pn=(Bt=(Ft=Be==null?void 0:Be.metadata.title)!=null?Ft:ge)!=null?Bt:Be==null?void 0:Be.metadata.name)!=null?pn:""}${gt&>!==Vt.zG?` in ${gt}`:""}`,headerType:(()=>{let yn=qe.toLocaleLowerCase("en-US");return Be&&Be.spec&&"type"in Be.spec&&(yn+=" \u2014 ",yn+=Be.spec.type.toLocaleLowerCase("en-US")),yn})()}}function yt(H){var Be;const{entity:ne}=H,ge=(0,Se.getEntityRelations)(ne,Vt.S4);return t.createElement(t.Fragment,null,ge.length>0&&t.createElement(A.HeaderLabel,{label:"Owner",value:t.createElement(Se.EntityRefLinks,{entityRefs:ge,defaultKind:"Group",color:"inherit"})}),((Be=ne.spec)==null?void 0:Be.lifecycle)&&t.createElement(A.HeaderLabel,{label:"Lifecycle",value:ne.spec.lifecycle}))}const $t=H=>{var W,K,X;const{UNSTABLE_extraContextMenuItems:ne,UNSTABLE_contextMenuOptions:ge,children:Be,NotFoundComponent:qe}=H,{kind:gt,namespace:pt,name:Dt}=(0,s.useRouteRefParams)(Se.entityRouteRef),{entity:tt,loading:Ft,error:Bt}=(0,Se.useAsyncEntity)(),pn=(0,h.TH)(),yn=(0,s.useElementFilter)(Be,J=>J.selectByComponentData({key:at,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:le})=>{if(tt){if(le.if&&!le.if(tt))return[]}else return[];return[{path:le.path,title:le.title,children:le.children,tabProps:le.tabProps}]}),[tt]),{headerTitle:tr,headerType:Fn}=Ye(gt,pt,Dt,tt),[Gr,fr]=(0,t.useState)(!1),[Ur,mr]=(0,t.useState)(!1),T=(0,h.s0)(),I=async()=>{fr(!1),mr(!1),T("/")};return(0,t.useEffect)(()=>{fr(!1),mr(!1)},[pn.pathname]),t.createElement(A.Page,{themeId:(X=(K=(W=tt==null?void 0:tt.spec)==null?void 0:W.type)==null?void 0:K.toString())!=null?X:"home"},t.createElement(A.Header,{title:t.createElement(Wt,{title:tr,entity:tt}),pageTitleOverride:tr,type:Fn},tt&&t.createElement(t.Fragment,null,t.createElement(yt,{entity:tt}),t.createElement(St,{UNSTABLE_extraContextMenuItems:ne,UNSTABLE_contextMenuOptions:ge,onUnregisterEntity:()=>fr(!0),onInspectEntity:()=>mr(!0)}))),Ft&&t.createElement(A.Progress,null),tt&&t.createElement(A.RoutedTabs,{routes:yn}),Bt&&t.createElement(A.Content,null,t.createElement(ft.Z,{severity:"error"},Bt.toString())),!Ft&&!Bt&&!tt&&t.createElement(A.Content,null,qe||t.createElement(A.WarningPanel,{title:"Entity not found"},"There is no ",gt," with the requested"," ",t.createElement(A.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Se.UnregisterEntityDialog,{open:Gr,entity:tt,onConfirm:I,onClose:()=>fr(!1)}),t.createElement(Se.InspectEntityDialog,{open:Ur,entity:tt,onClose:()=>mr(!1)}))};$t.Route=ut;var dt=e(10179);function Qe(H){const{open:ne,onClose:ge,onConfirm:Be,entity:qe}=H,[gt,pt]=useState(!1),Dt=useApi(catalogApiRef),tt=useApi(alertApiRef),Ft=async()=>{pt(!0);try{const Bt=qe.metadata.uid;await Dt.removeEntityByUid(Bt),Be()}catch(Bt){assertError(Bt),tt.post({message:Bt.message})}finally{pt(!1)}};return React.createElement(Dialog,{open:ne,onClose:ge},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:gt,onClick:Ft},"Delete"),React.createElement(Button,{onClick:ge,color:"primary"},"Cancel")))}var Xe=e(47851);function bt(H){var ne,ge;return((ge=(ne=H==null?void 0:H.metadata)==null?void 0:ne.annotations)==null?void 0:ge["backstage.io/orphan"])==="true"}function qt(){const H=useNavigate(),ne=useRouteRef(rootRouteRef),[ge,Be]=useState(!1),{entity:qe}=useEntity(),gt=async()=>{Be(!1),H(ne())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Be(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:ge,entity:qe,onConfirm:gt,onClose:()=>Be(!1)}))}var Ht=e(30001);const Ut=H=>H.error&&H.level==="error"&&H.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function _t(H,ne){return{items:(await ne.getEntityAncestors({entityRef:H})).items.map(qe=>{var Dt,tt;return{errors:((tt=(Dt=qe.entity.status)==null?void 0:Dt.items)!=null?tt:[]).filter(Ut).map(Ft=>Ft.error).filter(Ft=>Boolean(Ft)),entity:qe.entity}}).filter(qe=>qe.errors.length>0)}}async function rn(H,ne){const ge=ne.apis.get(catalogApiRef);if(!ge)throw new Error(`No implementation available for ${catalogApiRef}`);return(await _t(stringifyEntityRef(H),ge)).items.length>0}function en(){const{entity:H}=useEntity(),ne=stringifyEntityRef(H),ge=useApi(catalogApiRef),{loading:Be,error:qe,value:gt}=useAsync(async()=>_t(ne,ge),[ne,ge]);return qe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:qe})):Be||!gt?null:React.createElement(React.Fragment,null,gt.items.map((pt,Dt)=>React.createElement(Box,{key:Dt,mb:1},stringifyEntityRef(H)!==stringifyEntityRef(pt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:pt.entity})),pt.errors.map((tt,Ft)=>React.createElement(ResponseErrorPanel,{key:Ft,error:tt})))))}var Kt=e(64279);const Jt="core.backstage.entitySwitch",cn=H=>null;(0,s.attachComponentData)(cn,Jt,!0);const Nn=H=>{var pt,Dt;const{entity:ne,loading:ge}=(0,Se.useAsyncEntity)(),Be=(0,s.useApiHolder)(),qe=(0,s.useElementFilter)(H.children,tt=>tt.selectByComponentData({key:Jt,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Ft=>{var yn;if(ge)return[];const{if:Bt,children:pn}=Ft.props;return ne?[{if:(yn=Bt==null?void 0:Bt(ne,{apis:Be}))!=null?yn:!0,children:pn}]:[{if:Bt===void 0,children:pn}]}),[Be,ne,ge]);return qe.some(tt=>typeof tt.if=="object"&&"then"in tt.if)?t.createElement(Gn,{results:qe}):(Dt=(pt=qe.find(tt=>tt.if))==null?void 0:pt.children)!=null?Dt:null};function Gn({results:H}){const{loading:ne,value:ge}=(0,Kt.default)(async()=>{var qe;const Be=H.map(async({if:gt,children:pt})=>{try{if(await gt)return pt}catch{}return null});return(qe=(await Promise.all(Be)).find(Boolean))!=null?qe:null},[H]);return ne||!ge?null:ge}Nn.Case=cn;const Jn=null,Qn=Se.CatalogFilterLayout.Filters,Xn=Se.CatalogFilterLayout.Content,Qt=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:Se.catalogApiRef,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:H,fetchApi:ne})=>new Ht.MS({discoveryApi:H,fetchApi:ne})}),(0,s.createApiFactory)({api:Se.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:H})=>new se({storageApi:H})})],routes:{catalogIndex:Xe._Z,catalogEntity:Se.entityRouteRef},externalRoutes:{createComponent:Xe.yw,viewTechDoc:Xe.jU}}),or=Qt.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(H=>H.CatalogPage),mountPoint:Xe._Z})),N=Qt.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(H=>H.CatalogEntityPage),mountPoint:Se.entityRouteRef})),g=Qt.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(H=>H.AboutCard)}})),C=Qt.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(H=>H.EntityLinksCard)}})),w=Qt.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(H=>H.HasSystemsCard)}})),V=Qt.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(H=>H.HasComponentsCard)}})),he=Qt.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(H=>H.HasSubcomponentsCard)}})),ie=Qt.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(H=>H.HasResourcesCard)}})),De=Qt.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(H=>H.DependsOnComponentsCard)}})),nt=Qt.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(H=>H.DependencyOfComponentsCard)}})),Nt=Qt.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(H=>H.DependsOnResourcesCard)}})),gn=Qt.provide((0,s.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(H=>H.RelatedEntitiesCard)}}));var Ln=e(36356);class yr{constructor({configApi:ne,discoveryApi:ge,identityApi:Be}){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");this.configApi=ne,this.discoveryApi=ge,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(ne,ge){const qe=`${await this.getApiOrigin()}/${ge}`,gt=await fetch(`${qe.endsWith("/")?qe:`${qe}/`}index.html`);if(gt.status===404)throw new Error("Page not found");return gt.text()}async syncEntityDocs(ne){return"cached"}async getBaseUrl(ne,ge,Be){const qe=await this.getApiOrigin();return new URL(ne,`${qe}/${Be}`).toString()}}class ar{constructor({configApi:ne,discoveryApi:ge,identityApi:Be}){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");this.configApi=ne,this.discoveryApi=ge,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(ne){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(ne){return{site_name:"Live preview environment",site_description:""}}}const ir=[(0,s.createApiFactory)({api:v.techdocsStorageApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:H,discoveryApi:ne,identityApi:ge})=>new yr({configApi:H,discoveryApi:ne,identityApi:ge})}),(0,s.createApiFactory)({api:v.techdocsApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:H,discoveryApi:ne,identityApi:ge})=>new ar({configApi:H,discoveryApi:ne,identityApi:ge})}),(0,s.createApiFactory)({api:Ln.q3,deps:{configApi:s.configApiRef},factory:({configApi:H})=>Ln.ae.fromConfig(H)})],Pr={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ir={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Lr(){const H=await fetch("/.detect");return H.ok?(await H.text()).trim()==="techdocs-cli-server":!1}async function Hn(){const H=await(0,a.defaultConfigLoader)(),ne=await Lr();return[...H,{context:"detected",data:ne?Pr:Ir}]}var Rn=e(86689),qn=e(58845);const _n=(0,ue.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var xr=()=>{const H=_n();return t.createElement("svg",{className:H.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:H.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 sr=(0,ue.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Dr=()=>{const H=sr();return t.createElement("svg",{className:H.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:H.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 cr=(0,ue.Z)({root:{width:A.sidebarConfig.drawerWidthClosed,height:3*A.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:A.sidebarConfig.drawerWidthClosed,marginLeft:24}}),On=()=>{const H=cr(),{isOpen:ne}=(0,t.useContext)(A.SidebarContext);return t.createElement("div",{className:H.root},t.createElement(Rn.Z,{component:b.OL,to:"/docs/default/component/local/",underline:"none",className:H.link},ne?t.createElement(xr,null):t.createElement(Dr,null)))},lr=({children:H})=>t.createElement(A.SidebarPage,null,t.createElement(A.Sidebar,null,t.createElement(On,null),t.createElement(A.SidebarDivider,null),t.createElement(A.SidebarItem,{icon:qn.Z,to:"/docs/default/component/local",text:"Docs Preview"})),H);var er=e(80030),Er=e(32388),vr=e(4142);const Fr=(0,ue.Z)(H=>({headerIcon:{color:H.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:H.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var xn;(function(H){const ne="light";H.LIGHT=ne;const ge="dark";H.DARK=ge})(xn||(xn={}));const ur=()=>{const H=(0,s.useApi)(s.appThemeApiRef),ne=Fr(),[ge,Be]=(0,t.useState)(H.getActiveThemeId()||xn.LIGHT),qe={[xn.LIGHT]:{icon:vr.Z,title:"Dark theme"},[xn.DARK]:{icon:Er.Z,title:"Light theme"}},{title:gt,icon:pt}=qe[ge],Dt=()=>{Be(tt=>{const Ft=tt===xn.LIGHT?xn.DARK:xn.LIGHT;return H.setActiveThemeId(Ft),Ft})};return t.createElement(He.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(er.ZP,{title:gt,arrow:!0},t.createElement(mt.Z,{size:"small",onClick:Dt},t.createElement(pt,{className:ne.headerIcon}))))},Br=()=>t.createElement(v.TechDocsReaderPage,null,t.createElement(v.TechDocsReaderPageHeader,null),t.createElement(v.TechDocsReaderPageContent,{withSearch:!1})),wr=t.createElement(Br,null),dr=zt({apis:ir,configLoader:Hn,plugins:Object.values(r)}),Mr=dr.getProvider(),Ar=dr.getRouter(),$r=v.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:ur,location:m.oZ.Header})),Rr=t.createElement(a.FlatRoutes,null,t.createElement(h.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(h.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(N,null)}),t.createElement(h.AW,{path:"/docs",element:t.createElement(v.TechDocsIndexPage,null)},t.createElement(v.DefaultTechDocsHome,null)),t.createElement(h.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(v.TechDocsReaderPage,null)},wr,t.createElement(m.DR,null,t.createElement($r,null))));var Dn=()=>t.createElement(Mr,null,t.createElement(Ar,null,t.createElement(lr,null,Rr)));c.render(t.createElement(Dn,null),document.getElementById("root"))},28981:function(q,i,e){"use strict";e.d(i,{darkTheme:function(){return b},lightTheme:function(){return A}});var r=e(73689),t=e(48032);const c={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")`},h={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 v(S,D){const M=`linear-gradient(90deg, ${(S.length===1?[S[0],S[0]]:S).join(", ")})`,L=`${D}, ${M}`;return{colors:S,shape:D,backgroundImage:L}}const m={home:v(h.teal,c.wave),documentation:v(h.pinkSea,c.wave2),tool:v(h.purpleSky,c.round),service:v(h.marineBlue,c.wave),website:v(h.veryBlue,c.wave),library:v(h.rubyRed,c.wave),other:v(h.darkGrey,c.wave),app:v(h.toastyOrange,c.wave),apis:v(h.teal,c.wave2)},a='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function s(S){const{palette:D,fontFamily:_=a,defaultPageTheme:M,pageTheme:L=m}=S;if(!L[M])throw new Error(`${M} is not defined in pageTheme.`);return{palette:D,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:_,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:L[M],getPageTheme:({themeId:$})=>{var B;return(B=L[$])!=null?B:L[M]}}}function f(S){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:S.typography.fontFamily},body:{height:"100%",fontFamily:S.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:S.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:S.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:S.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:S.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:S.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,t.darken)(S.palette.link,.3),background:(0,t.lighten)(S.palette.link,.95)},[S.breakpoints.up("md")]:{minWidth:120,fontSize:S.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:S.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:S.spacing(1),marginBottom:S.spacing(1),color:S.palette.grey[900]},outlined:{color:S.palette.text.primary},label:{lineHeight:`${S.spacing(2.5)}px`,fontWeight:S.typography.fontWeightMedium,fontSize:`${S.spacing(1.75)}px`},labelSmall:{fontSize:`${S.spacing(1.5)}px`},deleteIcon:{color:S.palette.grey[500],width:`${S.spacing(3)}px`,height:`${S.spacing(3)}px`,margin:`0 ${S.spacing(.75)}px 0 -${S.spacing(.75)}px`},deleteIconSmall:{width:`${S.spacing(2)}px`,height:`${S.spacing(2)}px`,margin:`0 ${S.spacing(.5)}px 0 -${S.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 y(S){const D=s(S),_=(0,r.Z)(D),M=f(_);return{..._,overrides:M}}var u=e(34505);const A=y({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:u.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:m}),b=y({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:u.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:m})},76241:function(q,i,e){"use strict";e.d(i,{CT:function(){return m},EI:function(){return f},uW:function(){return h},Vt:function(){return a}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),c=y=>`__@backstage/${y}__`;function h(y,u){const A=c(y);let b=t[A];return b||(b=u(),t[A]=b,b)}var v=e(2784);function m(y){return h(y,()=>(0,v.createContext)(void 0))}function a(y){return(0,v.useContext)(m(y))}function s(y){return{set(u){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function f(y){return Object.freeze(y),{atVersion(u){return y[u]}}}},53479:function(q,i,e){"use strict";e.d(i,{AsyncEntityProvider:function(){return x},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return L},EntityKindFilter:function(){return ae},EntityLifecyclePicker:function(){return ut},EntityListProvider:function(){return xt},EntityOwnerPicker:function(){return $t},EntityRefLink:function(){return se},EntityRefLinks:function(){return j},EntityTable:function(){return Ut},EntityTagPicker:function(){return Kt},EntityTypePicker:function(){return Nn},FavoriteEntity:function(){return or},InspectEntityDialog:function(){return gt},UnregisterEntityDialog:function(){return pn},UserListPicker:function(){return Ur},catalogApiRef:function(){return c},entityRouteRef:function(){return Mt},getEntityRelations:function(){return Ne},getEntitySourceLocation:function(){return Fe},humanizeEntityRef:function(){return Vt},starredEntitiesApiRef:function(){return h},useAsyncEntity:function(){return Ee},useEntity:function(){return te},useEntityList:function(){return ht},useEntityOwnership:function(){return R},useEntityPermission:function(){return ce},useRelatedEntities:function(){return vt},useStarredEntities:function(){return mt}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),h=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var v=e(82394);class m{constructor(){Q(this,"starredEntities",new Set);Q(this,"subscribers",new Set);Q(this,"observable",new ObservableImpl(I=>(I.next(new Set(this.starredEntities)),this.subscribers.add(I),()=>{this.subscribers.delete(I)})))}async toggleStarred(I){this.starredEntities.delete(I)||this.starredEntities.add(I);for(const W of this.subscribers)W.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),s=e(41156),f=e(60364),y=e(77277),u=e(4190),A=e(95544),b=e(90436),S=e(60905),D=e(36444);const _=T=>{const I=(0,s.Z)(J=>J.breakpoints.down("md")),W=(0,f.Z)(),[K,X]=(0,a.useState)(!1);return I?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:W.spacing(1),marginLeft:W.spacing(1)},onClick:()=>X(!0),startIcon:a.createElement(D.Z,null)},"Filters"),a.createElement(u.ZP,{open:K,onClose:()=>X(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},a.createElement(A.Z,{m:2},a.createElement(b.Z,{variant:"h6",component:"h2",style:{marginBottom:W.spacing(1)}},"Filters"),T.children))):a.createElement(S.Z,{item:!0,lg:2},T.children)},M=T=>a.createElement(S.Z,{item:!0,xs:12,lg:10},T.children),L=T=>a.createElement(S.Z,{container:!0,style:{position:"relative"}},T.children);L.Filters=_,L.Content=M;var $=e(76241);const B=(0,$.CT)("entity-context"),x=({children:T,entity:I,loading:W,error:K,refresh:X})=>{const J={entity:I,loading:W,error:K,refresh:X};return a.createElement(B.Provider,{value:(0,$.EI)({1:J})},T)},Y=T=>React.createElement(x,{entity:T.entity,loading:!Boolean(T.entity),error:void 0,refresh:void 0,children:T.children});function te(){const T=(0,$.Vt)("entity-context");if(!T)throw new Error("Entity context is not available");const I=T.atVersion(1);if(!I)throw new Error("EntityContext v1 not available");if(!I.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:I.entity}}function Ee(){const T=(0,$.Vt)("entity-context");if(!T)throw new Error("Entity context is not available");const I=T.atVersion(1);if(!I)throw new Error("EntityContext v1 not available");const{entity:W,loading:K,error:X,refresh:J}=I;return{entity:W,loading:K,error:X,refresh:J}}var Ge=e(76635),Ke=e(19126),fe=e.n(Ke),ye=e(10289),Ie=e(69294),Ze=e(48760),ke=e(90736);function ct(T){return T.reduce((I,W)=>({...I,...W.getCatalogFilters?W.getCatalogFilters():{}}),{})}function st(T){return I=>T.every(W=>!W.filterEntity||W.filterEntity(I))}var Ce=e(48023);function Ne(T,I,W){var X;let K=((X=T==null?void 0:T.relations)==null?void 0:X.filter(J=>J.type===I).map(J=>(0,Ce.of)(J.targetRef)))||[];return W!=null&&W.kind&&(K=K.filter(J=>J.kind.toLocaleLowerCase("en-US")===W.kind.toLocaleLowerCase("en-US"))),K}function Fe(T,I){var K;const W=(K=T.metadata.annotations)==null?void 0:K[Ce.M6];if(!!W)try{const X=(0,Ce.Ou)(W),J=I.byUrl(X.target);return{locationTargetUrl:X.target,integrationType:J==null?void 0:J.type}}catch{return}}function lt(T,I){const W=new Set([...getEntityRelations(T,RELATION_MEMBER_OF,{kind:"group"}),...T?[getCompoundEntityRef(T)]:[]].map(stringifyEntityRef)),K=getEntityRelations(I,RELATION_OWNED_BY).map(stringifyEntityRef);for(const X of K)if(W.has(X))return!0;return!1}const Ve=(0,a.createContext)(void 0),xt=({children:T})=>{const I=(0,ke.default)(),W=(0,t.useApi)(c),[K,X]=(0,a.useState)({}),J=(0,ye.TH)(),le=(0,a.useMemo)(()=>{var _e;return(_e=fe().parse(J.search,{ignoreQueryPrefix:!0}).filters)!=null?_e:{}},[J]),[be,Ue]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Oe,error:xe},$e]=(0,Ie.default)(async()=>{var Sn;const _e=(0,Ge.compact)(Object.values(K)),We=st(_e),Zt=ct(_e),tn=ct((0,Ge.compact)(Object.values(be.appliedFilters))),Vn=Object.keys(K).reduce((fn,En)=>{const Bn=K[En];return Bn!=null&&Bn.toQueryValue&&(fn[En]=Bn.toQueryValue()),fn},{});if((0,Ge.isEqual)(tn,Zt))Ue({appliedFilters:K,backendEntities:be.backendEntities,entities:be.backendEntities.filter(We)});else{const fn=await W.getEntities({filter:Zt});Ue({appliedFilters:K,backendEntities:fn.items,entities:fn.items.filter(We)})}if(I()){const fn=fe().parse(J.search,{ignoreQueryPrefix:!0}),En=fe().stringify({...fn,filters:Vn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Bn=`${window.location.pathname}${En}`;(Sn=window.history)==null||Sn.replaceState(null,document.title,Bn)}},[W,le,K,be],{loading:!0});(0,Ze.Z)($e,10,[K]);const je=(0,a.useCallback)(_e=>{X(We=>{const Zt=typeof _e=="function"?_e(We):_e;return{...We,...Zt}})},[]),At=(0,a.useMemo)(()=>({filters:be.appliedFilters,entities:be.entities,backendEntities:be.backendEntities,updateFilters:je,queryParameters:le,loading:Oe,error:xe}),[be,je,le,Oe,xe]);return a.createElement(Ve.Provider,{value:At},T)};function ht(){const T=(0,a.useContext)(Ve);if(!T)throw new Error("useEntityList must be used within EntityListProvider");return T}var wt=e(64279),jt=e(18149),Lt=e.n(jt),Gt=e(829),zt=e.n(Gt);const Mt=(0,$.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function An(T){var I,W;return{kind:T.kind.toLocaleLowerCase("en-US"),namespace:(W=(I=T.metadata.namespace)==null?void 0:I.toLocaleLowerCase("en-US"))!=null?W:DEFAULT_NAMESPACE,name:T.metadata.name}}function Vt(T,I){const W=I==null?void 0:I.defaultKind;let K,X,J;return"metadata"in T?(K=T.kind,X=T.metadata.namespace,J=T.metadata.name):(K=T.kind,X=T.namespace,J=T.name),X===Ce.zG&&(X=void 0),K=K.toLocaleLowerCase("en-US"),K=W&&W.toLocaleLowerCase("en-US")===K?void 0:K,`${K?`${K}:`:""}${X?`${X}/`:""}${J}`}var Et=e(9118),un=e(80030);const se=(0,a.forwardRef)((T,I)=>{var _e;const{entityRef:W,defaultKind:K,title:X,children:J,...le}=T,be=(0,t.useRouteRef)(Mt);let Ue,Oe,xe;if(typeof W=="string"){const We=(0,Ce.of)(W);Ue=We.kind,Oe=We.namespace,xe=We.name}else"metadata"in W?(Ue=W.kind,Oe=W.metadata.namespace,xe=W.metadata.name):(Ue=W.kind,Oe=W.namespace,xe=W.name);Ue=Ue.toLocaleLowerCase("en-US"),Oe=(_e=Oe==null?void 0:Oe.toLocaleLowerCase("en-US"))!=null?_e:Ce.zG;const $e={kind:Ue,namespace:Oe,name:xe},je=Vt({kind:Ue,namespace:Oe,name:xe},{defaultKind:K}),At=a.createElement(Et.Link,{...le,ref:I,to:be($e)},J,!J&&(X!=null?X:je));return X?a.createElement(un.ZP,{title:je},At):At});function j(T){const{entityRefs:I,defaultKind:W,...K}=T;return a.createElement(a.Fragment,null,I.map((X,J)=>a.createElement(a.Fragment,{key:J},J>0&&", ",a.createElement(se,{...K,entityRef:X,defaultKind:W}))))}class ae{constructor(I){this.value=I}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ue{constructor(I){this.value=I}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class ve{constructor(I){this.values=I}filterEntity(I){return this.values.every(W=>{var K;return((K=I.metadata.tags)!=null?K:[]).includes(W)})}toQueryValue(){return this.values}}class Le{constructor(I){this.value=I}filterEntity(I){var K;const W=this.value.toLocaleUpperCase("en-US");return I.metadata.name.toLocaleUpperCase("en-US").includes(W)||`${I.metadata.title}`.toLocaleUpperCase("en-US").includes(W)||((K=I.metadata.tags)==null?void 0:K.join("").toLocaleUpperCase("en-US").indexOf(W))!==-1}}class we{constructor(I){this.values=I}filterEntity(I){return this.values.some(W=>Ne(I,Ce.S4).some(K=>Vt(K,{defaultKind:"group"})===W))}toQueryValue(){return this.values}}class Se{constructor(I){this.values=I}filterEntity(I){return this.values.some(W=>{var K;return((K=I.spec)==null?void 0:K.lifecycle)===W})}toQueryValue(){return this.values}}class He{constructor(I,W,K){this.value=I,this.isOwnedEntity=W,this.isStarredEntity=K}filterEntity(I){switch(this.value){case"owned":return this.isOwnedEntity(I);case"starred":return this.isStarredEntity(I);default:return!0}}toQueryValue(){return this.value}}function ft(){var We;const T=(0,t.useApi)(c),{filters:{kind:I,type:W},queryParameters:{type:K},updateFilters:X}=ht(),J=(0,a.useMemo)(()=>[K].flat().filter(Boolean),[K]),[le,be]=(0,a.useState)(J.length?J:(We=W==null?void 0:W.getTypes())!=null?We:[]);(0,a.useEffect)(()=>{J.length&&be(J)},[J]);const[Ue,Oe]=(0,a.useState)([]),xe=(0,a.useMemo)(()=>I==null?void 0:I.value,[I]),{error:$e,loading:je,value:At}=(0,wt.default)(async()=>xe?await T.getEntityFacets({filter:{kind:xe},facets:["spec.type"]}).then(tn=>tn.facets["spec.type"]||[]):[],[xe,T]),_e=(0,a.useRef)(At);return(0,a.useEffect)(()=>{const Zt=_e.current;if(_e.current=At,je||!xe||Zt===At||!At)return;const tn=zt()(At,Sn=>-Sn.count).map(Sn=>Sn.value);Oe(tn);const Vn=le.filter(Sn=>tn.includes(Sn));Lt()(le,Vn)||be(Vn)},[je,xe,le,be,At]),(0,a.useEffect)(()=>{X({type:le.length?new ue(le):void 0})},[le,X]),{loading:je,error:$e,availableTypes:Ue,selectedTypes:le,setSelectedTypes:be}}const Tt=20;function vt(T,I){var Ue,Oe;const W=(Ue=I==null?void 0:I.type)==null?void 0:Ue.toLocaleLowerCase("en-US"),K=(Oe=I==null?void 0:I.kind)==null?void 0:Oe.toLocaleLowerCase("en-US"),X=(0,t.useApi)(c),{loading:J,value:le,error:be}=(0,wt.default)(async()=>{var _e;const xe=(_e=T.relations)==null?void 0:_e.map(We=>({type:We.type,target:(0,Ce.of)(We.targetRef)})).filter(We=>(!W||We.type.toLocaleLowerCase("en-US")===W)&&(!K||We.target.kind===K));if(!xe)return[];const $e=Object.values((0,Ge.groupBy)(xe,({target:We})=>`${We.kind}:${We.namespace}`.toLocaleLowerCase("en-US"))),je=[];for(const We of $e)je.push({kind:We[0].target.kind,namespace:We[0].target.namespace,nameBatches:(0,Ge.chunk)(We.map(Zt=>Zt.target.name),Tt)});return(await Promise.all(je.flatMap(We=>We.nameBatches.map(Zt=>X.getEntities({filter:{kind:We.kind,"metadata.namespace":We.namespace,"metadata.name":Zt}}))))).flatMap(We=>We.items)},[T,W,K]);return{entities:le,loading:J,error:be}}var ot=e(72164);function Rt(T){return typeof T=="string"?T:(0,Ce.eE)(T)}function mt(){const T=(0,t.useApi)(h),I=(0,ot.Z)(T.starredEntitie$(),new Set),W=(0,a.useCallback)(X=>I.has(Rt(X)),[I]),K=(0,a.useCallback)(X=>T.toggleStarred(Rt(X)).then(),[T]);return{starredEntities:I,toggleStarredEntity:K,isStarredEntity:W}}function sn(T){return typeof T=="string"?T:(0,Ce.eE)(T)}function z(T){const I=(0,t.useApi)(h),[W,K]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const J=I.starredEntitie$().subscribe({next(le){K(le.has(sn(T)))}});return()=>{J.unsubscribe()}},[T,I]),{toggleStarredEntity:(0,a.useCallback)(()=>I.toggleStarred(sn(T)).then(),[T,I]),isStarredEntity:W}}function R(){const T=(0,t.useApi)(t.identityApiRef),{loading:I,value:W}=(0,wt.default)(async()=>{const{ownershipEntityRefs:X}=await T.getBackstageIdentity();return X},[]),K=(0,a.useMemo)(()=>{const X=new Set(W!=null?W:[]);return J=>{const le=Ne(J,Ce.S4).map(Ce.eE);for(const be of le)if(X.has(be))return!0;return!1}},[W]);return(0,a.useMemo)(()=>({loading:I,isOwnedEntity:K}),[I,K])}var P=e(68099);function ce(T){const{entity:I,loading:W,error:K}=Ee(),{allowed:X,loading:J,error:le}=(0,P.gI)({permission:T,resourceRef:I?(0,Ce.eE)(I):void 0});return W||J?{loading:!0,allowed:!1}:K?{loading:!1,allowed:!1,error:K}:{loading:!1,allowed:X,error:le}}const me=T=>{var le;const{initialFilter:I,hidden:W}=T,{updateFilters:K,queryParameters:{kind:X}}=useEntityList(),[J]=useState((le=[X].flat()[0])!=null?le:I);return useEffect(()=>{K({kind:J?new EntityKindFilter(J):void 0})},[J,K]),W?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var Z=e(79692),F=e(5806),re=e(21324),de=e(86619),Pe=e(19996),pe=e(25505),Me=e(38016),ze=e(88013);const et=(0,Z.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),St=a.createElement(pe.Z,{fontSize:"small"}),at=a.createElement(Pe.Z,{fontSize:"small"}),ut=()=>{var Oe,xe;const T=et(),{updateFilters:I,backendEntities:W,filters:K,queryParameters:{lifecycles:X}}=ht(),J=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[le,be]=(0,a.useState)(J.length?J:(xe=(Oe=K.lifecycles)==null?void 0:Oe.values)!=null?xe:[]);(0,a.useEffect)(()=>{J.length&&be(J)},[J]),(0,a.useEffect)(()=>{I({lifecycles:le.length?new Se(le):void 0})},[le,I]);const Ue=(0,a.useMemo)(()=>[...new Set(W.map($e=>{var je;return(je=$e.spec)==null?void 0:je.lifecycle}).filter(Boolean))].sort(),[W]);return Ue.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Lifecycle"),a.createElement(ze.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Ue,value:le,onChange:($e,je)=>be(je),renderOption:($e,{selected:je})=>a.createElement(F.Z,{control:a.createElement(re.Z,{icon:St,checkedIcon:at,checked:je}),label:$e}),size:"small",popupIcon:a.createElement(Me.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:$e=>a.createElement(de.Z,{...$e,className:T.input,variant:"outlined"})})):null},Wt=(0,Z.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Ye=a.createElement(pe.Z,{fontSize:"small"}),yt=a.createElement(Pe.Z,{fontSize:"small"}),$t=()=>{var Oe,xe;const T=Wt(),{updateFilters:I,backendEntities:W,filters:K,queryParameters:{owners:X}}=ht(),J=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[le,be]=(0,a.useState)(J.length?J:(xe=(Oe=K.owners)==null?void 0:Oe.values)!=null?xe:[]);(0,a.useEffect)(()=>{J.length&&be(J)},[J]),(0,a.useEffect)(()=>{I({owners:le.length?new we(le):void 0})},[le,I]);const Ue=(0,a.useMemo)(()=>[...new Set(W.flatMap($e=>Ne($e,Ce.S4).map(je=>Vt(je,{defaultKind:"group"}))).filter(Boolean))].sort(),[W]);return Ue.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Owner"),a.createElement(ze.ZP,{multiple:!0,"aria-label":"Owner",options:Ue,value:le,onChange:($e,je)=>be(je),renderOption:($e,{selected:je})=>a.createElement(F.Z,{control:a.createElement(re.Z,{icon:Ye,checkedIcon:yt,checked:je}),label:$e}),size:"small",popupIcon:a.createElement(Me.Z,{"data-testid":"owner-picker-expand"}),renderInput:$e=>a.createElement(de.Z,{...$e,className:T.input,variant:"outlined"})})):null},dt=(0,Z.Z)(T=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),Qe=()=>{var J,le;const T=dt(),{filters:I,updateFilters:W}=useEntityList(),[K,X]=useState((le=(J=I.text)==null?void 0:J.value)!=null?le:"");return useDebounce(()=>{W({text:K.length?new EntityTextFilter(K):void 0})},250,[K,W]),React.createElement(Toolbar,{className:T.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:T.input,placeholder:"Search",autoComplete:"off",onChange:be=>X(be.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:()=>X(""),edge:"end",disabled:K.length===0},React.createElement(Clear,null)))})))},Xe=Object.freeze({createEntityRefColumn(T){const{defaultKind:I}=T;function W(K){var X;return((X=K.metadata)==null?void 0:X.title)||Vt(K,{defaultKind:I})}return{title:"Name",highlight:!0,customFilterAndSearch(K,X){return W(X).includes(K)},customSort(K,X){return W(K).localeCompare(W(X))},render:K=>{var X;return a.createElement(se,{entityRef:K,defaultKind:I,title:(X=K.metadata)==null?void 0:X.title})}}},createEntityRelationColumn({title:T,relation:I,defaultKind:W,filter:K}){function X(le){return Ne(le,I,K)}function J(le){return X(le).map(be=>Vt(be,{defaultKind:W})).join(", ")}return{title:T,customFilterAndSearch(le,be){return J(be).includes(le)},customSort(le,be){return J(le).localeCompare(J(be))},render:le=>a.createElement(j,{entityRefs:X(le),defaultKind:W})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Ce.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Ce.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Ce.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:T=>a.createElement(Et.OverflowTooltip,{text:T.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),bt=[Xe.createEntityRefColumn({defaultKind:"system"}),Xe.createDomainColumn(),Xe.createOwnerColumn(),Xe.createMetadataDescriptionColumn()],qt=[Xe.createEntityRefColumn({defaultKind:"component"}),Xe.createSystemColumn(),Xe.createOwnerColumn(),Xe.createSpecTypeColumn(),Xe.createSpecLifecycleColumn(),Xe.createMetadataDescriptionColumn()],Ht=(0,Z.Z)(T=>({empty:{padding:T.spacing(2),display:"flex",justifyContent:"center"}})),Ut=T=>{const{entities:I,title:W,emptyContent:K,variant:X="gridItem",columns:J}=T,le=Ht(),be={minWidth:"0",width:"100%"};return X==="gridItem"&&(be.height="calc(100% - 10px)"),a.createElement(Et.Table,{columns:J,title:W,style:be,emptyContent:K&&a.createElement("div",{className:le.empty},K),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:I})};Ut.columns=Xe,Ut.systemEntityColumns=bt,Ut.componentEntityColumns=qt;const _t=(0,Z.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),rn=a.createElement(pe.Z,{fontSize:"small"}),en=a.createElement(Pe.Z,{fontSize:"small"}),Kt=()=>{var Oe,xe;const T=_t(),{updateFilters:I,filters:W,queryParameters:{tags:K}}=ht(),X=(0,t.useApi)(c),{value:J}=(0,wt.default)(async()=>{var At;const $e="metadata.tags",{facets:je}=await X.getEntityFacets({facets:[$e],filter:(At=W.kind)==null?void 0:At.getCatalogFilters()});return je[$e].map(({value:_e})=>_e)},[W.kind]),le=(0,a.useMemo)(()=>[K].flat().filter(Boolean),[K]),[be,Ue]=(0,a.useState)(le.length?le:(xe=(Oe=W.tags)==null?void 0:Oe.values)!=null?xe:[]);return(0,a.useEffect)(()=>{le.length&&Ue(le)},[le]),(0,a.useEffect)(()=>{I({tags:be.length?new ve(be):void 0})},[be,I]),J!=null&&J.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Tags"),a.createElement(ze.ZP,{multiple:!0,"aria-label":"Tags",options:J,value:be,onChange:($e,je)=>Ue(je),renderOption:($e,{selected:je})=>a.createElement(F.Z,{control:a.createElement(re.Z,{icon:rn,checkedIcon:en,checked:je}),label:$e}),size:"small",popupIcon:a.createElement(Me.Z,{"data-testid":"tag-picker-expand"}),renderInput:$e=>a.createElement(de.Z,{...$e,className:T.input,variant:"outlined"})})):null};var Jt=e(82108),cn=e.n(Jt);const Nn=T=>{var Oe;const{hidden:I,initialFilter:W}=T,K=(0,t.useApi)(t.alertApiRef),{error:X,availableTypes:J,selectedTypes:le,setSelectedTypes:be}=ft();if((0,a.useEffect)(()=>{X&&K.post({message:"Failed to load entity types",severity:"error"}),W&&be([W])},[X,K,W,be]),J.length===0||X)return null;const Ue=[{value:"all",label:"All"},...J.map(xe=>({value:xe,label:cn()(xe)}))];return I?null:a.createElement(A.Z,{pb:1,pt:1},a.createElement(Et.Select,{label:"Type",items:Ue,selected:(Oe=Ue.length>1?le[0]:void 0)!=null?Oe:"all",onChange:xe=>be(xe==="all"?[]:[String(xe)])}))};var Gn=e(15459),Jn=e(61837),Qn=e(11640),Xn=e(28347);const Qt=(0,Gn.Z)({root:{color:"#f3ba37"}})(Qn.Z),or=T=>{const{toggleStarredEntity:I,isStarredEntity:W}=z(T.entity);return a.createElement(Jn.Z,{"aria-label":"favorite",color:"inherit",...T,onClick:()=>I()},a.createElement(un.ZP,{title:W?"Remove from favorites":"Add to favorites"},W?a.createElement(Qt,null):a.createElement(Xn.Z,null)))};var N=e(8629),g=e(79249),C=e(38724),w=e(99152),V=e(6487),he=e(49429),ie=e(55999),De=e(72779),nt=e.n(De),Nt=e(39412);const gn=Nt.Z;function Ln(T,I){if(T)return T.toLocaleLowerCase("en-US");if(I)try{return(0,Ce.of)(I).kind.toLocaleLowerCase("en-US")}catch{return}}function yr(T,I){const W=(0,t.useApp)(),K=Ln(T,I);return K&&W.getSystemIcon(`kind:${K}`)||gn}function ar(T){const{kind:I,entityRef:W,...K}=T,X=yr(I,W);return a.createElement(X,{...K})}const ir=(0,Z.Z)(T=>({node:{fill:T.palette.grey[300],stroke:T.palette.grey[300],"&.primary":{fill:T.palette.primary.light,stroke:T.palette.primary.light},"&.secondary":{fill:T.palette.secondary.light,stroke:T.palette.secondary.light}},text:{fill:T.palette.getContrastText(T.palette.grey[300]),"&.primary":{fill:T.palette.primary.contrastText},"&.secondary":{fill:T.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Pr(T){const I=(0,t.useApi)(c),W=(0,Ce.eE)(T),{loading:K,error:X,value:J}=(0,wt.default)(async()=>{const le=await I.getEntityAncestors({entityRef:W}),be=new Array,Ue=new Array;for(const Oe of le.items){const xe=(0,Ce.eE)(Oe.entity),$e=xe===le.rootEntityRef;be.push({id:xe,root:$e,...Oe.entity});for(const je of Oe.parentEntityRefs)Ue.push({from:xe,to:je})}return{nodes:be,edges:Ue}},[W]);return{loading:K,error:X,nodes:(J==null?void 0:J.nodes)||[],edges:(J==null?void 0:J.edges)||[]}}function Ir({node:T}){const I=ir(),W=(0,ye.s0)(),K=(0,t.useRouteRef)(Mt),[X,J]=(0,a.useState)(0),[le,be]=(0,a.useState)(0),Ue=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(Ue.current){let{height:Zt,width:tn}=Ue.current.getBBox();Zt=Math.round(Zt),tn=Math.round(tn),(Zt!==le||tn!==X)&&(J(tn),be(Zt))}},[X,le]);const Oe=10,xe=le,$e=xe+Oe,je=$e+X+Oe*2,At=le+Oe*2,_e=T.metadata.title||(T.kind&&T.metadata.name&&T.metadata.namespace?Vt({kind:T.kind,name:T.metadata.name,namespace:T.metadata.namespace||""}):T.id),We=()=>{W(K({kind:T.kind,namespace:T.metadata.namespace||Ce.zG,name:T.metadata.name}))};return a.createElement("g",{onClick:We,className:I.clickable},a.createElement("rect",{className:nt()(I.node,T.root?"secondary":"primary"),width:je,height:At,rx:10}),a.createElement(ar,{kind:T.kind,y:Oe,x:Oe,width:xe,height:xe,className:nt()(I.text,T.root?"secondary":"primary")}),a.createElement("text",{ref:Ue,className:nt()(I.text,T.root?"secondary":"primary"),y:At/2,x:$e+(X+Oe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},_e))}function Lr(T){const{loading:I,error:W,nodes:K,edges:X}=Pr(T.entity);return I?a.createElement(Et.Progress,null):W?a.createElement(Et.ResponseErrorPanel,{error:W}):a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Ancestry"),a.createElement(ie.Z,{gutterBottom:!0},"This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where"," ",a.createElement(Et.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),a.createElement(A.Z,{mt:4},a.createElement(Et.DependencyGraph,{nodes:K,edges:X,renderNode:Ir,direction:Et.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Hn=e(11776),Rn=e(38402),qn=e(86136),_n=e(99688),Or=e(49378),xr=e(54506),sr=e(94339),to=e(24579),Dr=e(27685);const cr=(0,Z.Z)(T=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:T.spacing(2)},helpIcon:{marginLeft:T.spacing(1),color:T.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function On(T){const I=cr();return a.createElement(Or.Z,{...T,primaryTypographyProps:{className:I.monospace},secondaryTypographyProps:{className:I.monospace}})}function lr(T){const I=cr();return a.createElement(xr.Z,{className:I.monospace},T.children)}function er(T){return a.createElement(A.Z,{mt:2},a.createElement(sr.Z,{variant:"outlined"},a.createElement(to.Z,null,a.createElement(b.Z,{variant:"h6",gutterBottom:!0},T.title,T.helpLink&&a.createElement(vr,{to:T.helpLink})),T.children)))}function Er(T){const[I,W]=T.entry;return a.createElement(Rn.Z,null,T.indent&&a.createElement(qn.Z,null),a.createElement(On,{primary:I,secondary:W.match(/^url:https?:\/\//)?a.createElement(a.Fragment,null,W.substring(0,4),a.createElement(Et.Link,{to:W.substring(4)},W.substring(4))):W}))}function vr(T){const I=cr();return a.createElement(Et.Link,{to:T.to,className:I.helpIcon},a.createElement(Dr.Z,{fontSize:"inherit"}))}const Fr=(0,Z.Z)({root:{display:"flex",flexDirection:"column"}});function xn(T){var Ue,Oe;const I=(0,t.useApi)(c),W=(0,Ce.eE)(T),K=(Ue=T.metadata.annotations)==null?void 0:Ue[Ce.P1],X=(Oe=T.metadata.annotations)==null?void 0:Oe[Ce.q1],{loading:J,error:le,value:be}=(0,wt.default)(async()=>!K&&!X?[]:(await I.getEntities({filter:[...K?[{[`metadata.annotations.${Ce.P1}`]:K}]:[],...X?[{[`metadata.annotations.${Ce.q1}`]:X}]:[]]})).items,[K,X]);return{loading:J,error:le,location:K,originLocation:X,colocatedEntities:be==null?void 0:be.filter(xe=>(0,Ce.eE)(xe)!==W)}}function ur(T){return a.createElement(Hn.Z,{dense:!0},T.header&&a.createElement(Er,{key:"header",entry:T.header}),T.entities.map(I=>a.createElement(Rn.Z,{key:(0,Ce.eE)(I)},a.createElement(qn.Z,null,a.createElement(ar,{kind:I.kind})),a.createElement(On,{primary:a.createElement(se,{entityRef:I})}))))}function Br(T){const{entity:I}=T,{loading:W,error:K,location:X,originLocation:J,colocatedEntities:le}=xn(I);if(W)return a.createElement(Et.Progress,null);if(K)return a.createElement(Et.ResponseErrorPanel,{error:K});if(!X&&!J)return a.createElement(_n.Z,{severity:"warning"},"Entity had no location information.");if(!(le!=null&&le.length))return a.createElement(_n.Z,{severity:"info"},"There were no other entities on this location.");if(X===J)return a.createElement(ur,{entities:le});const be=le.filter(Oe=>{var xe;return((xe=Oe.metadata.annotations)==null?void 0:xe[Ce.P1])===X}),Ue=le.filter(Oe=>{var xe;return((xe=Oe.metadata.annotations)==null?void 0:xe[Ce.q1])===J});return a.createElement(a.Fragment,null,be.length>0&&a.createElement(ur,{entities:be,header:["At the same location",X]}),Ue.length>0&&a.createElement(ur,{entities:Ue,header:["At the same origin",J]}))}function wr(T){const I=Fr();return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Colocated"),a.createElement(ie.Z,null,"These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL)."),a.createElement("div",{className:I.root},a.createElement(Br,{entity:T.entity})))}function dr(T){return Object.fromEntries([...Object.entries(T)].sort((I,W)=>I[0]<W[0]?-1:1))}function Mr(T){return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Entity as JSON"),a.createElement(ie.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(ie.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Et.CodeSnippet,{text:JSON.stringify(dr(T.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Ar=e(3440),$r=e.n(Ar);const Rr=(0,Z.Z)({root:{display:"flex",flexDirection:"column"}});function dn(T){var Oe,xe;const I=Rr(),{apiVersion:W,kind:K,metadata:X,spec:J,relations:le=[],status:be={}}=T.entity,Ue=$r()(zt()(le,$e=>$e.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:I.root},a.createElement(er,{title:"Identity"},a.createElement(Hn.Z,{dense:!0},a.createElement(Rn.Z,null,a.createElement(On,{primary:"apiVersion",secondary:W})),a.createElement(Rn.Z,null,a.createElement(On,{primary:"kind",secondary:K})),(J==null?void 0:J.type)&&a.createElement(Rn.Z,null,a.createElement(On,{primary:"spec.type",secondary:J.type})),X.uid&&a.createElement(Rn.Z,null,a.createElement(On,{primary:"uid",secondary:X.uid})),X.etag&&a.createElement(Rn.Z,null,a.createElement(On,{primary:"etag",secondary:X.etag})))),a.createElement(er,{title:"Metadata"},!!Object.keys(X.annotations||{}).length&&a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,"Annotations",a.createElement(vr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(X.annotations).map($e=>a.createElement(Er,{key:$e[0],indent:!0,entry:$e}))),!!Object.keys(X.labels||{}).length&&a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,"Labels")},Object.entries(X.labels).map($e=>a.createElement(Er,{key:$e[0],indent:!0,entry:$e}))),!!((Oe=X.tags)!=null&&Oe.length)&&a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,"Tags")},X.tags.map(($e,je)=>a.createElement(Rn.Z,{key:`${$e}-${je}`},a.createElement(qn.Z,null),a.createElement(On,{primary:$e}))))),!!le.length&&a.createElement(er,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ue).map(([$e,je],At)=>a.createElement("div",{key:At},a.createElement(Hn.Z,{dense:!0,subheader:a.createElement(lr,null,$e)},je.map(_e=>a.createElement(Rn.Z,{key:_e.targetRef},a.createElement(qn.Z,null,a.createElement(ar,{entityRef:_e.targetRef})),a.createElement(On,{primary:a.createElement(se,{entityRef:_e.targetRef})}))))))),!!((xe=be.items)!=null&&xe.length)&&a.createElement(er,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},be.items.map(($e,je)=>a.createElement("div",{key:je},a.createElement(b.Z,null,$e.level,": ",$e.type),a.createElement(A.Z,{ml:2},$e.message))))))}var Dn=e(60155),H=e.n(Dn);function ne(T){return a.createElement(a.Fragment,null,a.createElement(ie.Z,{variant:"h2"},"Entity as YAML"),a.createElement(ie.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(ie.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Et.CodeSnippet,{text:H().stringify(dr(T.entity)),language:"yaml",showCopyCodeButton:!0}))))}const ge=(0,Z.Z)(T=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:T.palette.background.paper},tabs:{borderRight:`1px solid ${T.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Be(T){const{children:I,value:W,index:K,...X}=T,J=ge();return a.createElement("div",{role:"tabpanel",hidden:W!==K,id:`vertical-tabpanel-${K}`,"aria-labelledby":`vertical-tab-${K}`,className:J.tabContents,...X},W===K&&a.createElement(A.Z,{pl:3,pr:3},I))}function qe(T){return{id:`vertical-tab-${T}`,"aria-controls":`vertical-tabpanel-${T}`}}function gt(T){const I=ge(),[W,K]=a.useState(0);return(0,a.useEffect)(()=>{K(0)},[T.open]),T.entity?a.createElement(N.Z,{fullWidth:!0,maxWidth:"xl",open:T.open,onClose:T.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:I.fullHeightDialog}},a.createElement(g.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(C.Z,{dividers:!0},a.createElement("div",{className:I.root},a.createElement(w.Z,{orientation:"vertical",variant:"scrollable",value:W,onChange:(X,J)=>K(J),"aria-label":"Inspector options",className:I.tabs},a.createElement(V.Z,{label:"Overview",...qe(0)}),a.createElement(V.Z,{label:"Ancestry",...qe(1)}),a.createElement(V.Z,{label:"Colocated",...qe(2)}),a.createElement(V.Z,{label:"Raw JSON",...qe(3)}),a.createElement(V.Z,{label:"Raw YAML",...qe(4)})),a.createElement(Be,{value:W,index:0},a.createElement(dn,{entity:T.entity})),a.createElement(Be,{value:W,index:1},a.createElement(Lr,{entity:T.entity})),a.createElement(Be,{value:W,index:2},a.createElement(wr,{entity:T.entity})),a.createElement(Be,{value:W,index:3},a.createElement(Mr,{entity:T.entity})),a.createElement(Be,{value:W,index:4},a.createElement(ne,{entity:T.entity})))),a.createElement(he.Z,null,a.createElement(y.Z,{onClick:T.onClose,color:"primary"},"Close"))):null}var pt=e(85256);function Dt(T){var At;const I=(0,t.useApi)(c),W=(At=T.metadata.annotations)==null?void 0:At[Ce.q1],K=T.metadata.uid,X=W==="bootstrap:bootstrap",J=(0,wt.default)(async()=>{const _e=I.getLocationByRef(W);let We;if(!W)We=Promise.resolve([]);else{const Zt=`metadata.annotations.${Ce.q1}`;We=I.getEntities({filter:{[Zt]:W},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(tn=>tn.items)}return Promise.all([_e,We]).then(([Zt,tn])=>({location:Zt,colocatedEntities:tn}))},[I,T]),le=(0,a.useCallback)(async function(){const{location:We}=J.value;await I.removeLocationById(We.id)},[I,J]),be=(0,a.useCallback)(async function(){await I.removeEntityByUid(K)},[I,K]);if(X)return{type:"bootstrap",location:W,deleteEntity:be};const{loading:Ue,error:Oe,value:xe}=J;if(Ue)return{type:"loading"};if(Oe)return{type:"error",error:Oe};const{location:$e,colocatedEntities:je}=xe;return $e?{type:"unregister",location:W,colocatedEntities:je.map(Ce.iB),unregisterLocation:le,deleteEntity:be}:{type:"only-delete",deleteEntity:be}}var tt=e(10179);const Ft=(0,Z.Z)({advancedButton:{fontSize:"0.7em"}}),Bt=({entity:T,onConfirm:I})=>{var At;const W=(0,t.useApi)(t.alertApiRef),K=(0,t.useApi)(t.configApiRef),X=Ft(),J=Dt(T),[le,be]=(0,a.useState)(!1),[Ue,Oe]=(0,a.useState)(!1),xe=(At=K.getOptionalString("app.title"))!=null?At:"Backstage",$e=(0,a.useCallback)(async function(){if("unregisterLocation"in J){Oe(!0);try{await J.unregisterLocation(),I()}catch(We){(0,tt.BD)(We),W.post({message:We.message})}finally{Oe(!1)}}},[W,I,J]),je=(0,a.useCallback)(async function(){if("deleteEntity"in J){Oe(!0);try{await J.deleteEntity(),I()}catch(We){(0,tt.BD)(We),W.post({message:We.message})}finally{Oe(!1)}}},[W,I,J]);return J.type==="loading"?a.createElement(Et.Progress,null):J.type==="error"?a.createElement(Et.ResponseErrorPanel,{error:J.error}):J.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement(_n.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',J.location,'"). If you believe this is in error, please contact the ',xe," ","integrator."),a.createElement(A.Z,{marginTop:2},!le&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>be(!0)},"Advanced Options"),le&&a.createElement(a.Fragment,null,a.createElement(ie.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."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:je},"Delete Entity")))):J.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(ie.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."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:je},"Delete Entity")):J.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(ie.Z,null,"This action will unregister the following entities:"),a.createElement(ie.Z,{component:"ul"},J.colocatedEntities.map(_e=>a.createElement("li",{key:`${_e.kind}:${_e.namespace}/${_e.name}`},a.createElement(se,{entityRef:_e})))),a.createElement(ie.Z,null,"Located at the following location:"),a.createElement(ie.Z,{component:"ul"},a.createElement("li",null,J.location)),a.createElement(ie.Z,null,"To undo, just re-register the entity in ",xe,"."),a.createElement(A.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:$e},"Unregister Location"),!le&&a.createElement(A.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>be(!0)},"Advanced Options"))),le&&a.createElement(a.Fragment,null,a.createElement(A.Z,{paddingTop:4,paddingBottom:4},a.createElement(pt.Z,null)),a.createElement(ie.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."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:je},"Delete Entity"))):a.createElement(_n.Z,{severity:"error"},"Internal error: Unknown state")},pn=T=>{const{open:I,onConfirm:W,onClose:K,entity:X}=T;return a.createElement(N.Z,{open:I,onClose:K},a.createElement(g.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(C.Z,null,a.createElement(Bt,{entity:X,onConfirm:W})),a.createElement(he.Z,null,a.createElement(y.Z,{onClick:K,color:"primary"},"Cancel")))};var yn=e(12231),tr=e(9520),Fn=e(47603);const Gr=(0,Z.Z)(T=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:T.spacing(1,0,1,0)},title:{margin:T.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:T.palette.text.primary},menuItem:{minHeight:T.spacing(6)},groupWrapper:{margin:T.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function fr(T){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:Fn.Z},{id:"starred",label:"Starred",icon:Qn.Z}]},{name:T!=null?T:"Company",items:[{id:"all",label:"All"}]}]}const Ur=T=>{var Kn;const{initialFilter:I,availableFilters:W}=T,K=Gr(),J=(Kn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Kn:"Company",{filters:le,updateFilters:be,backendEntities:Ue,queryParameters:{kind:Oe,user:xe},loading:$e}=ht(),je=["starred","all"],At=fr(J).map(Cn=>({...Cn,items:Cn.items.filter(({id:Tn})=>["group","user"].some(Zr=>Zr===Oe)?je.includes(Tn):!W||W.includes(Tn))})).filter(({items:Cn})=>!!Cn.length),{isStarredEntity:_e}=mt(),{isOwnedEntity:We,loading:Zt}=R(),tn=$e||Zt,Vn=(0,a.useMemo)(()=>new He("owned",We,_e),[We,_e]),Sn=(0,a.useMemo)(()=>new He("starred",We,_e),[We,_e]),fn=(0,a.useMemo)(()=>[xe].flat()[0],[xe]),[En,Bn]=(0,a.useState)(fn!=null?fn:I),Sr=(0,a.useMemo)(()=>Ue.filter(st((0,Ge.compact)(Object.values({...le,user:void 0})))),[le,Ue]),Nr=(0,a.useMemo)(()=>({all:Sr.length,starred:Sr.filter(Cn=>Sn.filterEntity(Cn)).length,owned:Sr.filter(Cn=>Vn.filterEntity(Cn)).length}),[Sr,Sn,Vn]);return(0,a.useEffect)(()=>{fn&&Bn(fn)},[fn]),(0,a.useEffect)(()=>{!tn&&!!En&&En!=="all"&&Nr[En]===0&&Bn("all")},[tn,Nr,En,Bn]),(0,a.useEffect)(()=>{be({user:En?new He(En,We,_e):void 0})},[En,We,_e,be]),a.createElement(sr.Z,{className:K.root},At.map(Cn=>a.createElement(a.Fragment,{key:Cn.name},a.createElement(b.Z,{variant:"subtitle2",className:K.title},Cn.name),a.createElement(sr.Z,{className:K.groupWrapper},a.createElement(Hn.Z,{disablePadding:!0,dense:!0},Cn.items.map(Tn=>{var Zr,no;return a.createElement(yn.Z,{key:Tn.id,button:!0,divider:!0,onClick:()=>Bn(Tn.id),selected:Tn.id===((Zr=le.user)==null?void 0:Zr.value),className:K.menuItem,disabled:Nr[Tn.id]===0,"data-testid":`user-picker-${Tn.id}`},Tn.icon&&a.createElement(qn.Z,{className:K.listIcon},a.createElement(Tn.icon,{fontSize:"small"})),a.createElement(Or.Z,null,a.createElement(b.Z,{variant:"body1"},Tn.label)),a.createElement(tr.Z,null,(no=Nr[Tn.id])!=null?no:"-"))}))))))},mr=({children:T,value:I})=>{var be;const[W,K]=useState((be=I==null?void 0:I.filters)!=null?be:{}),X=useCallback(Ue=>{K(Oe=>{const xe=typeof Ue=="function"?Ue(Oe):Ue;return{...Oe,...xe}})},[]),J=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),le=useMemo(()=>{var Ue,Oe,xe,$e,je;return{entities:(Ue=I==null?void 0:I.entities)!=null?Ue:J.entities,backendEntities:(Oe=I==null?void 0:I.backendEntities)!=null?Oe:J.backendEntities,updateFilters:(xe=I==null?void 0:I.updateFilters)!=null?xe:X,filters:W,loading:($e=I==null?void 0:I.loading)!=null?$e:!1,queryParameters:(je=I==null?void 0:I.queryParameters)!=null?je:J.queryParameters,error:I==null?void 0:I.error}},[I,J,W,X]);return React.createElement(EntityListContext.Provider,{value:le},T)}},39398:function(q,i,e){"use strict";e.r(i),e.d(i,{AboutCard:function(){return Ge},AboutContent:function(){return te},AboutField:function(){return x}});var r=e(48023),t=e(9118),c=e(36964),h=e(36356),v=e(53479),m=e(79692),a=e(94339),s=e(32552),f=e(61837),y=e(85256),u=e(24579),A=e(52866),b=e(30254),S=e(27604),D=e(2784),_=e(47851),M=e(60905),L=e(90436),$=e(7089);const B=(0,m.Z)(Ke=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:Ke.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function x(Ke){const{label:fe,value:ye,gridSizes:Ie,children:Ze}=Ke,ke=B(),ct=(0,c.useElementFilter)(Ze,Ce=>Ce.getElements()),st=ct.length>0?ct:D.createElement(L.Z,{variant:"body2",className:ke.value},ye||"unknown");return D.createElement(M.Z,{item:!0,...Ie},D.createElement(L.Z,{variant:"subtitle2",className:ke.label},fe),st)}const Y=(0,m.Z)({description:{wordBreak:"break-word"}});function te(Ke){var ht,wt,jt,Lt,Gt,zt;const{entity:fe}=Ke,ye=Y(),Ie=fe.kind.toLocaleLowerCase("en-US")==="system",Ze=fe.kind.toLocaleLowerCase("en-US")==="resource",ke=fe.kind.toLocaleLowerCase("en-US")==="component",ct=fe.kind.toLocaleLowerCase("en-US")==="api",st=fe.kind.toLocaleLowerCase("en-US")==="template",Ce=fe.kind.toLocaleLowerCase("en-US")==="location",Ne=fe.kind.toLocaleLowerCase("en-US")==="group",Fe=(0,v.getEntityRelations)(fe,r.cz,{kind:"system"}),lt=(0,v.getEntityRelations)(fe,r.cz,{kind:"component"}),Ve=(0,v.getEntityRelations)(fe,r.cz,{kind:"domain"}),xt=(0,v.getEntityRelations)(fe,r.S4);return D.createElement(M.Z,{container:!0},D.createElement(x,{label:"Description",gridSizes:{xs:12}},D.createElement(L.Z,{variant:"body2",paragraph:!0,className:ye.description},((ht=fe==null?void 0:fe.metadata)==null?void 0:ht.description)||"No description")),D.createElement(x,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},xt.length>0&&D.createElement(v.EntityRefLinks,{entityRefs:xt,defaultKind:"group"})),(Ie||Ve.length>0)&&D.createElement(x,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},Ve.length>0&&D.createElement(v.EntityRefLinks,{entityRefs:Ve,defaultKind:"domain"})),(ct||ke||Ze||Fe.length>0)&&D.createElement(x,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Fe.length>0&&D.createElement(v.EntityRefLinks,{entityRefs:Fe,defaultKind:"system"})),ke&<.length>0&&D.createElement(x,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},D.createElement(v.EntityRefLinks,{entityRefs:lt,defaultKind:"component"})),(ct||ke||Ze||st||Ne||Ce||typeof((wt=fe==null?void 0:fe.spec)==null?void 0:wt.type)=="string")&&D.createElement(x,{label:"Type",value:(jt=fe==null?void 0:fe.spec)==null?void 0:jt.type,gridSizes:{xs:12,sm:6,lg:4}}),(ct||ke||typeof((Lt=fe==null?void 0:fe.spec)==null?void 0:Lt.lifecycle)=="string")&&D.createElement(x,{label:"Lifecycle",value:(Gt=fe==null?void 0:fe.spec)==null?void 0:Gt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),D.createElement(x,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((zt=fe==null?void 0:fe.metadata)==null?void 0:zt.tags)||[]).map(Mt=>D.createElement($.Z,{key:Mt,size:"small",label:Mt}))))}const Ee=(0,m.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 Ge(Ke){var Lt,Gt,zt;const{variant:fe}=Ke,ye=Ee(),{entity:Ie}=(0,v.useEntity)(),Ze=(0,c.useApi)(h.q3),ke=(0,c.useApi)(v.catalogApiRef),ct=(0,c.useApi)(c.alertApiRef),st=(0,c.useRouteRef)(_.jU),Ce=(0,v.getEntitySourceLocation)(Ie,Ze),Ne=(Lt=Ie.metadata.annotations)==null?void 0:Lt[r.Tf],Fe={label:"View Source",disabled:!Ce,icon:D.createElement(h.nW,{type:Ce==null?void 0:Ce.integrationType}),href:Ce==null?void 0:Ce.locationTargetUrl},lt={label:"View TechDocs",disabled:!((Gt=Ie.metadata.annotations)!=null&&Gt["backstage.io/techdocs-ref"])||!st,icon:D.createElement(b.Z,null),href:st&&st({namespace:Ie.metadata.namespace||r.zG,kind:Ie.kind,name:Ie.metadata.name})};let Ve="";fe==="gridItem"?Ve=ye.gridItemCard:fe==="fullHeight"&&(Ve=ye.fullHeightCard);let xt="";fe==="gridItem"?xt=ye.gridItemCardContent:fe==="fullHeight"&&(xt=ye.fullHeightCardContent);const ht=(zt=Ie.metadata.annotations)==null?void 0:zt[r.P1],wt=(ht==null?void 0:ht.startsWith("url:"))||(ht==null?void 0:ht.startsWith("file:")),jt=(0,D.useCallback)(async()=>{await ke.refreshEntity((0,r.eE)(Ie)),ct.post({message:"Refresh scheduled",severity:"info"})},[ke,ct,Ie]);return D.createElement(a.Z,{className:Ve},D.createElement(s.Z,{title:"About",action:D.createElement(D.Fragment,null,wt&&D.createElement(f.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:jt},D.createElement(A.Z,null)),D.createElement(f.Z,{component:t.Link,"aria-label":"Edit",disabled:!Ne,title:"Edit Metadata",to:Ne!=null?Ne:"#"},D.createElement(S.Z,null))),subheader:D.createElement(t.HeaderIconLinkRow,{links:[Fe,lt]})}),D.createElement(y.Z,null),D.createElement(u.Z,{className:xt},D.createElement(te,{entity:Ie})))}},49782:function(q,i,e){"use strict";e.d(i,{K:function(){return A}});var r=e(2784),t=e(79692),c=e(12420),h=e(97580),v=e(73698),m=e(74603),a=e(12231),s=e(53479),f=e(64279),y=e(36964);const u=(0,t.Z)(b=>(0,c.Z)({root:{...b.typography.h4}}));function A(b){var Ke;const{initialFilter:S="component",allowedKinds:D}=b,_=u(),M=(0,y.useApi)(s.catalogApiRef),{value:L}=(0,f.default)(async()=>await M.getEntityFacets({facets:["kind"]}).then(fe=>{var ye;return((ye=fe.facets.kind)==null?void 0:ye.map(Ie=>Ie.value).sort())||[]})),{updateFilters:$,queryParameters:{kind:B}}=(0,s.useEntityList)(),x=(0,r.useMemo)(()=>{var fe;return(fe=[B].flat()[0])==null?void 0:fe.toLocaleLowerCase("en-US")},[B]),[Y,te]=(0,r.useState)(x!=null?x:S);(0,r.useEffect)(()=>{$({kind:Y?new s.EntityKindFilter(Y):void 0})},[Y,$]),(0,r.useEffect)(()=>{x&&te(x)},[x]);const Ge=[(0,h.Z)(Y)].concat((Ke=L==null?void 0:L.filter(fe=>D?D.some(ye=>ye.toLocaleLowerCase("en-US")===fe.toLocaleLowerCase("en-US")):!0))!=null?Ke:[]).sort().reduce((fe,ye)=>(fe[ye.toLocaleLowerCase("en-US")]=ye,fe),{});return r.createElement(v.Z,{input:r.createElement(m.Z,{value:Y}),value:Y,onChange:fe=>te(fe.target.value),classes:_},Object.keys(Ge).map(fe=>r.createElement(a.Z,{value:fe,key:fe},`${Ge[fe]}s`)))}},30097:function(q,i,e){"use strict";e.d(i,{E:function(){return S}});var r=e(48023),t=e(53479),c=e(27604),h=e(2997),v=e(76635),m=e(2784),a=e(7089),s=e(9118);const f=Object.freeze({createNameColumn(D){function _(M){var L;return((L=M.metadata)==null?void 0:L.title)||(0,t.humanizeEntityRef)(M,{defaultKind:D==null?void 0:D.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:M},{entity:L}){return _(M).localeCompare(_(L))},render:({entity:M})=>{var L;return m.createElement(t.EntityRefLink,{entityRef:M,defaultKind:(D==null?void 0:D.defaultKind)||"Component",title:(L=M.metadata)==null?void 0:L.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:D})=>m.createElement(t.EntityRefLinks,{entityRefs:D.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:D})=>m.createElement(t.EntityRefLinks,{entityRefs:D.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:D})=>m.createElement(s.OverflowTooltip,{text:D.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:D})=>m.createElement(m.Fragment,null,D.metadata.tags&&D.metadata.tags.map(_=>m.createElement(a.Z,{key:_,label:_,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),u=e(15459),A=e(11640);const b=(0,u.Z)({root:{color:"#f3ba37"}})(A.Z),S=D=>{var ct,st,Ce;const{columns:_,actions:M,tableOptions:L}=D,{isStarredEntity:$,toggleStarredEntity:B}=(0,t.useStarredEntities)(),{loading:x,error:Y,entities:te,filters:Ee}=(0,t.useEntityList)(),Ge=(0,m.useMemo)(()=>{var Fe;return[f.createNameColumn({defaultKind:(Fe=Ee.kind)==null?void 0:Fe.value}),...Ne(),f.createMetadataDescriptionColumn(),f.createTagsColumn()];function Ne(){var lt;switch((lt=Ee.kind)==null?void 0:lt.value){case"user":return[];case"domain":case"system":return[f.createOwnerColumn()];case"group":case"location":case"template":return[f.createSpecTypeColumn()];default:return[f.createSystemColumn(),f.createOwnerColumn(),f.createSpecTypeColumn(),f.createSpecLifecycleColumn()]}}},[(ct=Ee.kind)==null?void 0:ct.value]),Ke=Ee.type===void 0,fe=(0,v.capitalize)((Ce=(st=Ee.user)==null?void 0:st.value)!=null?Ce:"all");if(Y)return m.createElement("div",null,m.createElement(s.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(s.CodeSnippet,{language:"text",text:Y.toString()})));const ye=[({entity:Ne})=>{var lt;const Fe=(lt=Ne.metadata.annotations)==null?void 0:lt[r.l2];return{icon:()=>m.createElement(h.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Fe,onClick:()=>{!Fe||window.open(Fe,"_blank")}}},({entity:Ne})=>{var lt;const Fe=(lt=Ne.metadata.annotations)==null?void 0:lt[r.Tf];return{icon:()=>m.createElement(c.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Fe,onClick:()=>{!Fe||window.open(Fe,"_blank")}}},({entity:Ne})=>{const Fe=$(Ne);return{cellStyle:{paddingLeft:"1em"},icon:()=>Fe?m.createElement(b,null):m.createElement(y.Z,null),tooltip:Fe?"Remove from favorites":"Add to favorites",onClick:()=>B(Ne)}}],Ie=te.map(Ne=>{const Fe=(0,t.getEntityRelations)(Ne,r.cz,{kind:"system"}),lt=(0,t.getEntityRelations)(Ne,r.S4);return{entity:Ne,resolved:{name:(0,t.humanizeEntityRef)(Ne,{defaultKind:"Component"}),ownedByRelationsTitle:lt.map(Ve=>(0,t.humanizeEntityRef)(Ve,{defaultKind:"group"})).join(", "),ownedByRelations:lt,partOfSystemRelationTitle:Fe.map(Ve=>(0,t.humanizeEntityRef)(Ve,{defaultKind:"system"})).join(", "),partOfSystemRelations:Fe}}}),Ze=(_||Ge).find(Ne=>Ne.title==="Type");Ze&&(Ze.hidden=!Ke);const ke=Ie.length>20;return m.createElement(s.Table,{isLoading:x,columns:_||Ge,options:{paging:ke,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!x,padding:"dense",pageSizeOptions:[20,50,100],...L},title:`${fe} (${te.length})`,data:Ie,actions:M||ye})};S.columns=f},47851:function(q,i,e){"use strict";e.d(i,{_Z:function(){return h},jU:function(){return c},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"catalog"})},40749:function(q,i,e){"use strict";e.d(i,{rG:function(){return r},Y2:function(){return $},J$:function(){return f},g2:function(){return c}});var r;(function(B){const x="DENY";B.DENY=x;const Y="ALLOW";B.ALLOW=Y;const te="CONDITIONAL";B.CONDITIONAL=te})(r||(r={}));function t(B,x){return B.name===x.name}function c(B,x){return"resourceType"in B?!x||B.resourceType===x:!1}function h(B){return B.attributes.action==="create"}function v(B){return B.attributes.action==="read"}function m(B){return B.attributes.action==="update"}function a(B){return B.attributes.action==="delete"}function s(B){return{authorize:async(x,Y)=>await B.authorize(x,Y),authorizeConditional(x,Y){const te=x;return B.authorize(te,Y)}}}function f({name:B,attributes:x,resourceType:Y}){return Y?{type:"resource",name:B,attributes:x,resourceType:Y}:{type:"basic",name:B,attributes:x}}var y=e(10179),u=e(96279),A=e.n(u),b=e(9571),S=e(30195);const D=S.z.lazy(()=>S.z.object({rule:S.z.string(),resourceType:S.z.string(),params:S.z.array(S.z.unknown())}).or(S.z.object({anyOf:S.z.array(D).nonempty()})).or(S.z.object({allOf:S.z.array(D).nonempty()})).or(S.z.object({not:D}))),_=S.z.object({result:S.z.literal(r.ALLOW).or(S.z.literal(r.DENY))}),M=S.z.union([S.z.object({result:S.z.literal(r.ALLOW).or(S.z.literal(r.DENY))}),S.z.object({result:S.z.literal(r.CONDITIONAL),pluginId:S.z.string(),resourceType:S.z.string(),conditions:D})]),L=(B,x)=>S.z.object({items:S.z.array(S.z.intersection(S.z.object({id:S.z.string()}),B)).refine(Y=>Y.length===x.size&&Y.every(({id:te})=>x.has(te)),{message:"Items in response do not match request"})});class ${constructor(x){Q(this,"enabled");Q(this,"discovery");var Y;this.discovery=x.discovery,this.enabled=(Y=x.config.getOptionalBoolean("permission.enabled"))!=null?Y:!1}async authorize(x,Y){return this.makeRequest(x,_,Y)}async authorizeConditional(x,Y){return this.makeRequest(x,M,Y)}async makeRequest(x,Y,te){if(!this.enabled)return x.map(Ze=>({result:r.ALLOW}));const Ee={items:x.map(Ze=>({id:b.Z(),...Ze}))},Ge=await this.discovery.getBaseUrl("permission"),Ke=await A()(`${Ge}/authorize`,{method:"POST",body:JSON.stringify(Ee),headers:{...this.getAuthorizationHeader(te==null?void 0:te.token),"content-type":"application/json"}});if(!Ke.ok)throw await y.VL.fromResponse(Ke);const fe=await Ke.json(),Ie=L(Y,new Set(Ee.items.map(({id:Ze})=>Ze))).parse(fe).items.reduce((Ze,ke)=>(Ze[ke.id]=ke,Ze),{});return Ee.items.map(Ze=>Ie[Ze.id])}getAuthorizationHeader(x){return x?{Authorization:`Bearer ${x}`}:{}}}},68099:function(q,i,e){"use strict";e.d(i,{iM:function(){return v},RV:function(){return c},gI:function(){return a}});var r=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var h=e(40749);class v{constructor(y,u){this.permissionClient=y,this.identityApi=u}static create(y){const{config:u,discovery:A,identity:b}=y,S=new h.Y2({discovery:A,config:u});return new v(S,b)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function a(f){const y=(0,t.useApi)(c),{data:u,error:A}=(0,m.ZP)(f,async b=>{if((0,h.g2)(b.permission)&&!b.resourceRef)return h.rG.DENY;const{result:S}=await y.authorize(b);return S});return A?{error:A,loading:!1,allowed:!1}:u===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:u===h.rG.ALLOW}}const s=f=>{const{permission:y,resourceRef:u,errorComponent:A,...b}=f,S=usePermission(isResourcePermission(y)?{permission:y,resourceRef:u}:{permission:y}),D=useApp(),{NotFoundErrorPage:_}=D.getComponents();let M=A===void 0?React.createElement(_,null):A;return S.loading?M=null:S.allowed&&(M=f.element),React.createElement(Route,{...b,element:M})}},47955:function(q,i,e){"use strict";e.d(i,{Zz:function(){return v},oZ:function(){return fe},DR:function(){return m},ZS:function(){return B},KY:function(){return s},$L:function(){return A},x1:function(){return x}});var r=e(2784),t=e(10289),c=e(36964);const h="techdocs.addons.addon.v1",v="techdocs.addons.wrapper.v1",m=()=>null;(0,c.attachComponentData)(m,v,!0);const a=ye=>`${h}.${ye.toLocaleLowerCase("en-US")}`;function s(ye){const{name:Ie,component:Ze}=ye;return(0,c.createReactExtension)({name:Ie,component:{sync:ke=>r.createElement(Ze,{...ke})},data:{[h]:ye,[a(Ie)]:!0}})}const f=(ye,Ie)=>ye.selectByComponentData({key:Ie}).getElements()[0],y=ye=>ye.selectByComponentData({key:v}).selectByComponentData({key:h}),u=ye=>ye.selectByComponentData({key:v}).findComponentData({key:h}),A=()=>{const ye=(0,t.pC)(),Ie=(0,c.useElementFilter)(ye,y),Ze=(0,c.useElementFilter)(ye,u),ke=(0,r.useCallback)(Ce=>{var Fe;if(!Ie||!Ce)return null;const Ne=a(Ce.name);return(Fe=f(Ie,Ne))!=null?Fe:null},[Ie]),ct=(0,r.useCallback)(Ce=>{const Ne=Ze.find(Fe=>Fe.name===Ce);return Ne?ke(Ne):null},[Ze,ke]),st=(0,r.useCallback)(Ce=>{const Ne=Ze.filter(Fe=>Fe.location===Ce);return Ne.length?Ne.map(ke):null},[Ze,ke]);return{renderComponentByName:ct,renderComponentsByLocation:st}},b=(0,c.createApiRef)({id:"plugin.techdocs.service"});var S=e(64279),D=e(48023),_=e(76241);const M=(ye,Ie)=>(0,D.eE)(ye)===(0,D.eE)(Ie),L={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},$=(0,_.CT)("techdocs-reader-page-context"),B=(0,r.memo)(({entityRef:ye,children:Ie})=>{const Ze=(0,c.useApi)(b),ke=(0,S.default)(async()=>Ze.getTechDocsMetadata(ye),[ye]),ct=(0,S.default)(async()=>Ze.getEntityMetadata(ye),[ye]),[st,Ce]=(0,r.useState)(L.title),[Ne,Fe]=(0,r.useState)(L.subtitle),[lt,Ve]=(0,r.useState)(L.shadowRoot),xt={metadata:ke,entityRef:ye,entityMetadata:ct,shadowRoot:lt,setShadowRoot:Ve,title:st,setTitle:Ce,subtitle:Ne,setSubtitle:Fe},ht=(0,_.EI)({1:xt});return r.createElement($.Provider,{value:ht},Ie instanceof Function?Ie(xt):Ie)},(ye,Ie)=>M(ye.entityRef,Ie.entityRef)),x=()=>{const ye=(0,r.useContext)($);if(ye===void 0)return L;const Ie=ye.atVersion(1);if(Ie===void 0)throw new Error("No context found for version 1.");return Ie};var Y=e(54073);const te=()=>{const{shadowRoot:ye}=useTechDocsReaderPage();return ye},Ee=ye=>{const Ie=te();return Ie?ye.map(Ze=>Ie==null?void 0:Ie.querySelectorAll(Ze)).filter(Ze=>Ze.length).map(Ze=>Array.from(Ze)).flat():[]},Ge=ye=>ye.toString()&&ye.rangeCount&&ye.getRangeAt(0).getBoundingClientRect().top,Ke=(ye=0)=>{const Ie=te(),[Ze,ke]=useState(null),ct=useMemo(()=>debounce(()=>{const st=Ie,Ce=st.getSelection?st.getSelection():document.getSelection();Ce&&Ge(Ce)?ke(Ce):ke(null)},ye),[Ie,ke,ye]);return useEffect(()=>(window.document.addEventListener("selectionchange",ct),()=>window.document.removeEventListener("selectionchange",ct)),[ct]),Ze},fe=Object.freeze({Header:"Header",Subheader:"Subheader",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},94067:function(q,i,e){"use strict";e.r(i),e.d(i,{EmbeddedDocsRouter:function(){return D},Router:function(){return S},isTechDocsAvailable:function(){return b}});var r=e(2784),t=e(10289),c=e(53479),h=e(9118),v=e(48023),m=e(20961),a=e(16172),s=e(28626);const f=({entity:_})=>{const M=(0,v.iB)(_);return r.createElement(m.I6,{entityRef:M},r.createElement(a.b,null),r.createElement(s.Fq,{withSearch:!1}))};var y=e(50021),u=e(26220);const A="backstage.io/techdocs-ref",b=_=>{var M,L;return Boolean((L=(M=_==null?void 0:_.metadata)==null?void 0:M.annotations)==null?void 0:L[A])},S=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(y.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(u.TechDocsReaderPage,null)})),D=_=>{var B;const{children:M}=_,{entity:L}=(0,c.useEntity)();return((B=L.metadata.annotations)==null?void 0:B[A])?r.createElement(t.Z5,null,r.createElement(t.AW,{element:r.createElement(f,{entity:L})},M)):r.createElement(h.MissingAnnotationEmptyState,{annotation:A})}},3337:function(q,i,e){"use strict";e.d(i,{D:function(){return t},g:function(){return c}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(q,i,e){"use strict";e.d(i,{k:function(){return v},p:function(){return h}});var r=e(10179),t=e(76372),c=e.n(t);class h{constructor(a){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(a){const{kind:s,namespace:f,name:y}=a,A=`${await this.getApiOrigin()}/metadata/techdocs/${f}/${s}/${y}`,b=await this.fetchApi.fetch(`${A}`);if(!b.ok)throw await r.VL.fromResponse(b);return await b.json()}async getEntityMetadata(a){const{kind:s,namespace:f,name:y}=a,A=`${await this.getApiOrigin()}/metadata/entity/${f}/${s}/${y}`,b=await this.fetchApi.fetch(`${A}`);if(!b.ok)throw await r.VL.fromResponse(b);return await b.json()}}class v{constructor(a){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");Q(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.identityApi=a.identityApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var a;return(a=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?a:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(a,s){const{kind:f,namespace:y,name:u}=a,b=`${await this.getStorageUrl()}/${y}/${f}/${u}/${s}`,S=await this.fetchApi.fetch(`${b.endsWith("/")?b:`${b}/`}index.html`);let D="";switch(S.status){case 404:throw D="Page not found. ",s||(D+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(D);case 500:throw D="Could not generate documentation or an error in the TechDocs backend. ",new Error(D);default:break}return S.text()}async syncEntityDocs(a,s=()=>{}){const{kind:f,namespace:y,name:u}=a,b=`${await this.getApiOrigin()}/sync/${y}/${f}/${u}`,{token:S}=await this.identityApi.getCredentials();return new Promise((D,_)=>{const M=new t.EventSourcePolyfill(b,{withCredentials:!0,headers:S?{Authorization:`Bearer ${S}`}:{}});M.addEventListener("log",L=>{L.data&&s(JSON.parse(L.data))}),M.addEventListener("finish",L=>{let $=!1;L.data&&({updated:$}=JSON.parse(L.data)),D($?"updated":"cached")}),M.onerror=L=>{switch(M.close(),L.status){case 404:_(new r.dR(L.message));return;default:_(new Error(L.data));return}}})}async getBaseUrl(a,s,f){const{kind:y,namespace:u,name:A}=s,S=`${await this.getApiOrigin()}/static/docs/${u}/${y}/${A}/${f}`;return new URL(a,S.endsWith("/")?S:`${S}/`).toString()}}},97589:function(q,i,e){"use strict";e.d(i,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(q,i,e){"use strict";e.d(i,{u:function(){return a}});var r=e(2784),t=e(9118),c=e(53479),h=e(1114),v=e(70335),m=e(21956);const a=s=>{const{initialFilter:f="all",columns:y,actions:u}=s;return r.createElement(h.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(c.EntityListProvider,null,r.createElement(c.CatalogFilterLayout,null,r.createElement(c.CatalogFilterLayout.Filters,null,r.createElement(v.f,null),r.createElement(c.UserListPicker,{initialFilter:f}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.CatalogFilterLayout.Content,null,r.createElement(m.EntityListDocsTable,{actions:u,columns:y}))))))}},51016:function(q,i,e){"use strict";e.d(i,{f:function(){return y}});var r=e(68725),t=e(97589),c=e(36964),h=e(9118),v=e(94339),m=e(16111),a=e(24579),s=e(14503),f=e(2784);const y=b=>{const{entities:S}=b,D=(0,c.useRouteRef)(r.Fw),_=(0,c.useApi)(c.configApiRef);return S?f.createElement(h.ItemCardGrid,{"data-testid":"docs-explore"},S!=null&&S.length?S.map((M,L)=>{var $,B;return f.createElement(v.Z,{key:L},f.createElement(m.Z,null,f.createElement(h.ItemCardHeader,{title:($=M.metadata.title)!=null?$:M.metadata.name})),f.createElement(a.Z,null,M.metadata.description),f.createElement(s.Z,null,f.createElement(h.Button,{to:D({namespace:(0,t.D)((B=M.metadata.namespace)!=null?B:"default",_),kind:(0,t.D)(M.kind,_),name:(0,t.D)(M.metadata.name,_)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var u=e(53479);const A=()=>{const{loading:b,error:S,entities:D}=useEntityList();return S?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:S.toString()})):b||!D?React.createElement(Progress,null):(D.sort((_,M)=>{var L,$;return((L=_.metadata.title)!=null?L:_.metadata.name).localeCompare(($=M.metadata.title)!=null?$:M.metadata.name)}),React.createElement(DocsCardGrid,{entities:D}))}},38634:function(q,i,e){"use strict";e.d(i,{H:function(){return u}});var r=e(2784),t=e(95074),c=e(36964),h=e(48023),v=e(53479),m=e(68725),a=e(9118),s=e(98095),f=e(3792),y=e(97589);const u=A=>{const{entities:b,title:S,loading:D,columns:_,actions:M}=A,[,L]=(0,t.Z)(),$=(0,c.useRouteRef)(m.Fw),B=(0,c.useApi)(c.configApiRef);if(!b)return null;const x=b.map(Ee=>{var Ke;const Ge=(0,v.getEntityRelations)(Ee,h.S4);return{entity:Ee,resolved:{docsUrl:$({namespace:(0,y.D)((Ke=Ee.metadata.namespace)!=null?Ke:"default",B),kind:(0,y.D)(Ee.kind,B),name:(0,y.D)(Ee.metadata.name,B)}),ownedByRelations:Ge,ownedByRelationsTitle:Ge.map(fe=>(0,v.humanizeEntityRef)(fe,{defaultKind:"group"})).join(", ")}}}),Y=[f.N.createNameColumn(),f.N.createOwnerColumn(),f.N.createTypeColumn()],te=[s.n.createCopyDocsUrlAction(L)];return r.createElement(r.Fragment,null,D||x&&x.length>0?r.createElement(a.Table,{isLoading:D,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:x,columns:_||Y,actions:M||te,title:S?`${S} (${x.length})`:`All (${x.length})`}):r.createElement(a.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(a.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};u.columns=f.N,u.actions=s.n},12481:function(q,i,e){"use strict";e.d(i,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),h=e.n(c),v=e(9118),m=e(53479),a=e(38634),s=e(98095),f=e(3792);const y=u=>{var te,Ee;const{columns:A,actions:b}=u,{loading:S,error:D,entities:_,filters:M}=(0,m.useEntityList)(),{isStarredEntity:L,toggleStarredEntity:$}=(0,m.useStarredEntities)(),[,B]=(0,t.Z)(),x=(0,c.capitalize)((Ee=(te=M.user)==null?void 0:te.value)!=null?Ee:"all"),Y=[s.n.createCopyDocsUrlAction(B),s.n.createStarEntityAction(L,$)];return D?r.createElement(v.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(v.CodeSnippet,{language:"text",text:D.toString()})):r.createElement(a.H,{title:x,entities:_,loading:S,actions:b||Y,columns:A})};y.columns=f.N,y.actions=s.n},98095:function(q,i,e){"use strict";e.d(i,{n:function(){return a}});var r=e(2784),t=e(39981),c=e(2337),h=e(11640),v=e(28347);const m=(0,c.Z)({root:{color:"#f3ba37"}})(h.Z),a={createCopyDocsUrlAction(s){return f=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${f.resolved.docsUrl}`)})},createStarEntityAction(s,f){return({entity:y})=>{const u=s(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>u?r.createElement(m,null):r.createElement(v.Z,null),tooltip:u?"Remove from favorites":"Add to favorites",onClick:()=>f(y)}}}}},3792:function(q,i,e){"use strict";e.d(i,{N:function(){return v}});var r=e(2784),t=e(9118),c=e(53479);function h(m){return m.metadata.title||m.metadata.name}const v={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:m=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:m.resolved.docsUrl},h(m.entity)),subvalue:m.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(c.EntityRefLinks,{entityRefs:m.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(q,i,e){"use strict";e.d(i,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),c=e(72580),h=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(q,i,e){"use strict";e.r(i),e.d(i,{TechDocsIndexPage:function(){return h}});var r=e(2784),t=e(10289),c=e(2546);const h=()=>(0,t.pC)()||r.createElement(c.u,null)},1114:function(q,i,e){"use strict";e.d(i,{j:function(){return h}});var r=e(2784),t=e(9118),c=e(36964);const h=v=>{var f;const{children:m}=v,s=`Documentation available in ${(f=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?f:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:s,themeId:"documentation"},m)}},70335:function(q,i,e){"use strict";e.d(i,{f:function(){return h}});var r=e(2784),t=e(53479);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const h=()=>{const{updateFilters:v}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{v({techdocs:new c})},[v]),null}},19192:function(q,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956),c=e(2546),h=e(1114),v=e(70335)},82250:function(q,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return a.DefaultTechDocsHome},TechDocsIndexPage:function(){return s.Jl},TechDocsReaderPage:function(){return s.I6},TechDocsReaderPageContent:function(){return v.Fq},TechDocsReaderPageHeader:function(){return v.SE},plugin:function(){return s.s4},techdocsApiRef:function(){return c.g},techdocsPlugin:function(){return s.s4},techdocsStorageApiRef:function(){return c.D}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(i,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(i,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}}),e.o(r,"techdocsApiRef")&&e.d(i,{techdocsApiRef:function(){return r.techdocsApiRef}}),e.o(r,"techdocsStorageApiRef")&&e.d(i,{techdocsStorageApiRef:function(){return r.techdocsStorageApiRef}});var c=e(3337),h=e(42723),v=e(96393),m=e(10459),a=e(19192),s=e(20961),f=e(94067)},20961:function(q,i,e){"use strict";e.d(i,{I6:function(){return y},Jl:function(){return f},s4:function(){return v}});var r=e(3337),t=e(42723),c=e(68725),h=e(36964);const v=(0,h.createPlugin)({id:"techdocs",apis:[(0,h.createApiFactory)({api:r.D,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,identityApi:h.identityApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,identityApi:b,fetchApi:S})=>new t.k({configApi:u,discoveryApi:A,identityApi:b,fetchApi:S})}),(0,h.createApiFactory)({api:r.g,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,fetchApi:b})=>new t.p({configApi:u,discoveryApi:A,fetchApi:b})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),m=v.provide((0,h.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.Router),mountPoint:c._Z})),a=v.provide((0,h.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.EmbeddedDocsRouter),mountPoint:c.pd})),s=v.provide((0,h.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(u=>u.TechDocsCustomHome),mountPoint:c._Z})),f=v.provide((0,h.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(u=>u.TechDocsIndexPage),mountPoint:c._Z})),y=v.provide((0,h.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(u=>u.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(q,i,e){"use strict";e.r(i),e.d(i,{TechDocsReaderLayout:function(){return s},TechDocsReaderPage:function(){return f}});var r=e(2784),t=e(10289),c=e(9118),h=e(47955),v=e(28626),m=e(99954),a=e(16172);const s=({withSearch:y,withHeader:u=!0})=>r.createElement(c.Page,{themeId:"documentation"},u&&r.createElement(m.S,null),r.createElement(a.b,null),r.createElement(v.Fq,{withSearch:y})),f=y=>{const{kind:u,name:A,namespace:b}=(0,t.UO)(),{children:S,entityRef:D={kind:u,name:A,namespace:b}}=y,_=(0,t.pC)();if(!S){const L=(_?r.Children.toArray(_.props.children):[]).find($=>{var x,Y;const{type:B}=$;return!((Y=(x=B==null?void 0:B.__backstage_data)==null?void 0:x.map)!=null&&Y.get(h.Zz))});return r.createElement(h.ZS,{entityRef:D},L||r.createElement(s,null))}return r.createElement(h.ZS,{entityRef:D},({metadata:M,entityMetadata:L,onReady:$})=>r.createElement(c.Page,{themeId:"documentation"},S instanceof Function?S({entityRef:D,techdocsMetadataValue:M.value,entityMetadataValue:L.value,onReady:$}):S))}},28626:function(q,i,e){"use strict";e.d(i,{Fq:function(){return mt},DK:function(){return Ee}});var r=e(2784),t=e(36617),c=e(79692),h=e(60905),v=e(8560),m=e(50236),a=e(19219),s=e(47955),f=e(9118),y=e(10459),u=e(23738),A=e(10289),b=e(60364),S=e(41128),D=e(36964),_=e(36356),M=e(3337),L=e(64279),$=e(77446);function B({contentLoading:z,content:R,activeSyncState:P}){return z||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 x(z,R){const P={...z};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 Y(z,R,P,ce){var pe,Me;const[me,Z]=(0,r.useReducer)(x,{activeSyncState:"CHECKING",path:ce,contentLoading:!0,buildLog:[]}),F=(0,D.useApi)(M.D),{retry:re}=(0,$.Z)(async()=>{Z({type:"contentLoading"});try{const ze=await F.getEntityDocs({kind:z,namespace:R,name:P},ce);return Z({type:"content",content:ze,path:ce}),ze}catch(ze){Z({type:"content",contentError:ze,path:ce})}},[F,z,R,P,ce]),de=(0,r.useRef)({content:void 0,reload:()=>{}});return de.current={content:me.content,reload:re},(0,L.default)(async()=>{Z({type:"sync",state:"CHECKING"});const ze=setTimeout(()=>{Z({type:"sync",state:"BUILDING"})},1e3);try{switch(await F.syncEntityDocs({kind:z,namespace:R,name:P},St=>{Z({type:"buildLog",log:St})})){case"updated":de.current.content?Z({type:"sync",state:"BUILD_READY"}):(de.current.reload(),Z({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":Z({type:"sync",state:"UP_TO_DATE"});break;default:Z({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(et){Z({type:"sync",state:"ERROR",syncError:et})}finally{clearTimeout(ze)}},[z,P,R,F,Z,de]),{state:(0,r.useMemo)(()=>B({activeSyncState:me.activeSyncState,contentLoading:me.contentLoading,content:me.content}),[me.activeSyncState,me.content,me.contentLoading]),contentReload:re,path:me.path,content:me.content,contentErrorMessage:(pe=me.contentError)==null?void 0:pe.toString(),syncErrorMessage:(Me=me.syncError)==null?void 0:Me.toString(),buildLog:me.buildLog}}const te=(0,r.createContext)({}),Ee=()=>(0,r.useContext)(te),Ge=({children:z})=>{const{"*":R=""}=(0,A.UO)(),{entityRef:P}=(0,s.x1)(),{kind:ce,namespace:me,name:Z}=P,F=Y(ce,me,Z,R);return r.createElement(te.Provider,{value:F},z instanceof Function?z(F):z)},Ke=z=>R=>r.createElement(Ge,null,r.createElement(z,{...R})),fe=(z,R,P)=>{const ce=z==="src"&&R.endsWith(".svg"),me=!R.match(/^([a-z]*:)?\/\//i),Z=R.startsWith(P);return ce&&(me||Z)},ye=({techdocsStorageApi:z,entityId:R,path:P})=>async ce=>{const me=await z.getApiOrigin(),Z=async(F,re)=>{for(const de of F)if(de.hasAttribute(re)){const Pe=de.getAttribute(re);if(!Pe)return;const pe=await z.getBaseUrl(Pe,R,P);if(fe(re,Pe,me))try{const ze=await(await fetch(pe,{credentials:"include"})).text();de.setAttribute(re,`data:image/svg+xml;base64,${btoa(ze)}`)}catch{de.setAttribute("alt",`Error: ${Pe}`)}else de.setAttribute(re,pe)}};return await Promise.all([Z(ce.querySelectorAll("img"),"src"),Z(ce.querySelectorAll("script"),"src"),Z(ce.querySelectorAll("source"),"src"),Z(ce.querySelectorAll("link"),"href"),Z(ce.querySelectorAll("a[download]"),"href")]),ce};var Ie=e(68370),Ze=e(67097),ke=e(47093),ct=e(82717),st=e.n(ct);const Ce=z=>R=>{const P=R.querySelector('[title="Edit this page"]');if(!P||!P.href)return R;const ce=new URL(P.href),me=z.byUrl(ce);if((me==null?void 0:me.type)!=="github"&&(me==null?void 0:me.type)!=="gitlab")return R;const Z=R.querySelector("article>h1").childNodes[0].textContent,F=encodeURIComponent(`Documentation Feedback: ${Z}`),re=encodeURIComponent(`Page source:
|
|
32
|
-
${P.href}
|
|
33
|
-
|
|
34
|
-
Feedback:`),de=(me==null?void 0:me.type)==="github"?(0,Ie.Pb)(ce.href,"blob"):ce.href,Pe=st()(de),pe=`/${Pe.organization}/${Pe.name}`,Me=P.cloneNode();switch(me==null?void 0:me.type){case"gitlab":Me.href=`${ce.origin}${pe}/issues/new?issue[title]=${F}&issue[description]=${re}`;break;case"github":Me.href=`${ce.origin}${pe}/issues/new?title=${F}&body=${re}`;break;default:return R}return ke.render(r.createElement(Ze.Z),Me),Me.style.paddingLeft="5px",Me.title="Leave feedback for this page",Me.id="git-feedback-link",P==null||P.insertAdjacentElement("beforebegin",Me),R};var Ne=e(44882);const Fe=()=>z=>{const R=z.querySelector('.md-header label[for="__drawer"]'),P=z.querySelector("article");if(!R||!P)return z;const ce=R.cloneNode();return ke.render(r.createElement(Ne.Z),ce),ce.id="toggle-sidebar",ce.title="Toggle Sidebar",ce.classList.add("md-content__button"),ce.style.setProperty("padding","0 0 0 5px"),ce.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),P==null||P.prepend(ce),z},lt=()=>z=>(((P,ce)=>{Array.from(P).filter(me=>me.hasAttribute(ce)).forEach(me=>{const Z=me.getAttribute(ce);if(Z){Z.match(/^https?:\/\//i)&&me.setAttribute("target","_blank");try{const F=Ve(window.location.href);me.setAttribute(ce,new URL(Z,F).toString())}catch{me.replaceWith(me.textContent||Z)}}})})(Array.from(z.getElementsByTagName("a")),"href"),z);function Ve(z){const R=new URL(z);return!R.pathname.endsWith("/")&&!R.pathname.endsWith(".html")&&(R.pathname+="/"),R.toString()}const xt=({baseUrl:z,onClick:R})=>P=>(Array.from(P.getElementsByTagName("a")).forEach(ce=>{ce.addEventListener("click",me=>{const F=ce.getAttribute("href");!F||F.startsWith(z)&&!ce.hasAttribute("download")&&(me.preventDefault(),R(me,F))})}),P);var ht=e(15459),wt=e(80030),jt=e(72379),Lt=e(41547);const Gt=(0,ht.Z)(z=>({tooltip:{fontSize:"inherit",color:z.palette.text.primary,margin:0,padding:z.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(wt.ZP),zt=()=>r.createElement(jt.Z,null,r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})),Mt=({text:z})=>{const[R,P]=(0,r.useState)(!1),ce=(0,r.useCallback)(()=>{navigator.clipboard.writeText(z),P(!0)},[z]),me=(0,r.useCallback)(()=>{P(!1)},[P]);return r.createElement(Gt,{title:"Copied to clipboard",placement:"left",open:R,onClose:me,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:ce},r.createElement(zt,null)))},An=z=>R=>{var ce;const P=R.querySelectorAll("pre > code");for(const me of P){const Z=me.textContent||"",F=document.createElement("div");(ce=me==null?void 0:me.parentElement)==null||ce.prepend(F),ke.render(r.createElement(Lt.Z,{theme:z},r.createElement(Mt,{text:Z})),F)}return R},Vt=()=>z=>{var R;return(R=z.querySelector(".md-header"))==null||R.remove(),z},Et=()=>z=>{var R,P;return(R=z.querySelector(".md-footer .md-copyright"))==null||R.remove(),(P=z.querySelector(".md-footer-copyright"))==null||P.remove(),z},un=({docStorageUrl:z,onLoading:R,onLoaded:P})=>ce=>{const me=Array.from(ce.querySelectorAll('head > link[rel="stylesheet"]')).filter(F=>{var re;return(re=F.getAttribute("href"))==null?void 0:re.startsWith(z)});let Z=me.length;return Z>0&&R(ce),me.forEach(F=>F.addEventListener("load",()=>{Z-=1,Z===0&&P(ce)})),ce};var se=e(35368),j=e.n(se);const ae=/main\.[A-Fa-f0-9]{8}\.min\.css$/,ue=/^https:\/\/fonts\.googleapis\.com/,ve=/^https:\/\/fonts\.gstatic\.com/,Le=z=>{if(z.nodeName&&z.nodeName==="LINK"){const R=z.getAttribute("href")||"";R.match(ae)&&z.setAttribute("rel","stylesheet"),R.match(ue)&&z.setAttribute("rel","stylesheet"),R.match(ve)&&z.setAttribute("rel","preconnect")}return z},we=z=>R=>{if(R.nodeName==="IFRAME"){const P=R.getAttribute("src");if(!P)return R.remove(),R;try{const ce=new URL(P);z.some(Z=>ce.host===Z)||R.remove()}catch(ce){console.warn(`Invalid iframe src, ${ce}`),R.remove()}}return R},Se=z=>{const R=(z==null?void 0:z.getOptionalStringArray("allowedIframeHosts"))||[];return P=>{j().addHook("afterSanitizeAttributes",Le);const ce=["link"];return R.length>0&&(j().addHook("beforeSanitizeElements",we(R)),ce.push("iframe")),j().sanitize(P.innerHTML,{ADD_TAGS:ce,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},He=({css:z})=>R=>(R.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${z}</style>`),R),ft=()=>z=>(setTimeout(()=>{var R;if(window.location.hash){const P=window.location.hash.slice(1);(R=z==null?void 0:z.querySelector(`[id="${P}"]`))==null||R.scrollIntoView()}},200),z),Tt=async(z,R)=>{let P;if(typeof z=="string")P=new DOMParser().parseFromString(z,"text/html").documentElement;else if(z instanceof Element)P=z;else throw new Error("dom is not a recognized type");for(const ce of R)P=await ce(P);return P},vt=["h1","h2","h3","h4","h5","h6"],ot=z=>{const R=(0,A.s0)(),P=(0,b.Z)(),ce=(0,D.useApi)(M.D),me=(0,D.useApi)(_.q3),Z=(0,D.useApi)(D.configApiRef),{namespace:F,kind:re,name:de}=z,{state:Pe,path:pe,content:Me}=Ee(),ze=P.palette.type==="dark",[et,St]=(0,r.useState)(),[at,ut]=(0,r.useState)(null),{isPinned:Wt}=(0,r.useContext)(f.SidebarPinStateContext),Ye=(0,r.useCallback)(()=>{if(!at||!et)return;const Qe=at.querySelector(".md-container > .md-tabs"),Xe=window.matchMedia("screen and (max-width: 76.1875em)").matches,bt=Math.max(at.getBoundingClientRect().top,0);et.forEach(qt=>{Xe?qt.style.top="0px":Qe?qt.style.top=`${bt+Qe.getBoundingClientRect().height}px`:qt.style.top=`${bt}px`})},[at,et]);(0,r.useEffect)(()=>(Ye(),window.addEventListener("scroll",Ye,!0),window.addEventListener("resize",Ye),()=>{window.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",Ye)}),[Ye,Pe]);const yt=(0,r.useCallback)(()=>{if(!at)return;const Qe=at.querySelector(".md-footer");Qe&&(Qe.style.width=`${at.getBoundingClientRect().width}px`)},[at]);(0,r.useEffect)(()=>(yt(),window.addEventListener("resize",yt),()=>{window.removeEventListener("resize",yt)}));const $t=(0,r.useCallback)((Qe,Xe)=>Tt(Qe,[Se(Z.getOptionalConfig("techdocs.sanitizer")),ye({techdocsStorageApi:ce,entityId:{kind:re,name:de,namespace:F},path:Xe}),lt(),Fe(),Vt(),Et(),Ce(me),He({css:`
|
|
35
|
-
/*
|
|
36
|
-
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
37
|
-
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
38
|
-
*/
|
|
39
|
-
:host {
|
|
40
|
-
/* FONT */
|
|
41
|
-
--md-default-fg-color: ${P.palette.text.primary};
|
|
42
|
-
--md-default-fg-color--light: ${P.palette.text.secondary};
|
|
43
|
-
--md-default-fg-color--lighter: ${(0,S.$n)(P.palette.text.secondary,.7)};
|
|
44
|
-
--md-default-fg-color--lightest: ${(0,S.$n)(P.palette.text.secondary,.3)};
|
|
45
|
-
|
|
46
|
-
/* BACKGROUND */
|
|
47
|
-
--md-default-bg-color:${P.palette.background.default};
|
|
48
|
-
--md-default-bg-color--light: ${P.palette.background.paper};
|
|
49
|
-
--md-default-bg-color--lighter: ${(0,S.$n)(P.palette.background.paper,.7)};
|
|
50
|
-
--md-default-bg-color--lightest: ${(0,S.$n)(P.palette.background.paper,.3)};
|
|
51
|
-
|
|
52
|
-
/* PRIMARY */
|
|
53
|
-
--md-primary-fg-color: ${P.palette.primary.main};
|
|
54
|
-
--md-primary-fg-color--light: ${P.palette.primary.light};
|
|
55
|
-
--md-primary-fg-color--dark: ${P.palette.primary.dark};
|
|
56
|
-
--md-primary-bg-color: ${P.palette.primary.contrastText};
|
|
57
|
-
--md-primary-bg-color--light: ${(0,S.$n)(P.palette.primary.contrastText,.7)};
|
|
58
|
-
|
|
59
|
-
/* ACCENT */
|
|
60
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
-
|
|
62
|
-
/* SHADOW */
|
|
63
|
-
--md-shadow-z1: ${P.shadows[1]};
|
|
64
|
-
--md-shadow-z2: ${P.shadows[2]};
|
|
65
|
-
--md-shadow-z3: ${P.shadows[3]};
|
|
66
|
-
|
|
67
|
-
/* EXTENSIONS */
|
|
68
|
-
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
69
|
-
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
70
|
-
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
71
|
-
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
72
|
-
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
73
|
-
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
74
|
-
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
75
|
-
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
76
|
-
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
77
|
-
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
78
|
-
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
79
|
-
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
80
|
-
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
81
|
-
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
82
|
-
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
83
|
-
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
84
|
-
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
85
|
-
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
86
|
-
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
87
|
-
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
88
|
-
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
89
|
-
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
90
|
-
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
91
|
-
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
92
|
-
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
93
|
-
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
94
|
-
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
95
|
-
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
96
|
-
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host > * {
|
|
100
|
-
/* CODE */
|
|
101
|
-
--md-code-fg-color: ${P.palette.text.primary};
|
|
102
|
-
--md-code-bg-color: ${P.palette.background.paper};
|
|
103
|
-
--md-code-hl-color: ${(0,S.Fq)(P.palette.warning.main,.5)};
|
|
104
|
-
--md-code-hl-keyword-color: ${ze?P.palette.primary.light:P.palette.primary.dark};
|
|
105
|
-
--md-code-hl-function-color: ${ze?P.palette.secondary.light:P.palette.secondary.dark};
|
|
106
|
-
--md-code-hl-string-color: ${ze?P.palette.success.light:P.palette.success.dark};
|
|
107
|
-
--md-code-hl-number-color: ${ze?P.palette.error.light:P.palette.error.dark};
|
|
108
|
-
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
109
|
-
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
110
|
-
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
111
|
-
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
112
|
-
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
113
|
-
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
114
|
-
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
115
|
-
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
116
|
-
|
|
117
|
-
/* TYPESET */
|
|
118
|
-
--md-typeset-font-size: 1rem;
|
|
119
|
-
--md-typeset-color: var(--md-default-fg-color);
|
|
120
|
-
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
121
|
-
--md-typeset-table-color: ${P.palette.text.primary};
|
|
122
|
-
--md-typeset-del-color: ${ze?(0,S.Fq)(P.palette.error.dark,.5):(0,S.Fq)(P.palette.error.light,.5)};
|
|
123
|
-
--md-typeset-ins-color: ${ze?(0,S.Fq)(P.palette.success.dark,.5):(0,S.Fq)(P.palette.success.light,.5)};
|
|
124
|
-
--md-typeset-mark-color: ${ze?(0,S.Fq)(P.palette.warning.dark,.5):(0,S.Fq)(P.palette.warning.light,.5)};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@media screen and (max-width: 76.1875em) {
|
|
128
|
-
:host > * {
|
|
129
|
-
/* TYPESET */
|
|
130
|
-
--md-typeset-font-size: .9rem;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@media screen and (max-width: 600px) {
|
|
135
|
-
:host > * {
|
|
136
|
-
/* TYPESET */
|
|
137
|
-
--md-typeset-font-size: .7rem;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`}),He({css:`
|
|
141
|
-
body {
|
|
142
|
-
--md-text-color: var(--md-default-fg-color);
|
|
143
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
144
|
-
--md-text-font-family: ${P.typography.fontFamily};
|
|
145
|
-
font-family: var(--md-text-font-family);
|
|
146
|
-
background-color: unset;
|
|
147
|
-
}
|
|
148
|
-
`}),He({css:`
|
|
149
|
-
.md-grid {
|
|
150
|
-
max-width: 100%;
|
|
151
|
-
margin: 0;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.md-nav {
|
|
155
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
156
|
-
}
|
|
157
|
-
.md-nav__link {
|
|
158
|
-
display: flex;
|
|
159
|
-
align-items: center;
|
|
160
|
-
justify-content: space-between;
|
|
161
|
-
}
|
|
162
|
-
.md-nav__icon {
|
|
163
|
-
height: 20px !important;
|
|
164
|
-
width: 20px !important;
|
|
165
|
-
margin-left:${P.spacing(1)}px;
|
|
166
|
-
}
|
|
167
|
-
.md-nav__icon svg {
|
|
168
|
-
margin: 0;
|
|
169
|
-
width: 20px !important;
|
|
170
|
-
height: 20px !important;
|
|
171
|
-
}
|
|
172
|
-
.md-nav__icon:after {
|
|
173
|
-
width: 20px !important;
|
|
174
|
-
height: 20px !important;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.md-main__inner {
|
|
178
|
-
margin-top: 0;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.md-sidebar {
|
|
182
|
-
bottom: 75px;
|
|
183
|
-
position: fixed;
|
|
184
|
-
width: 16rem;
|
|
185
|
-
overflow-y: auto;
|
|
186
|
-
overflow-x: hidden;
|
|
187
|
-
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
188
|
-
scrollbar-width: thin;
|
|
189
|
-
}
|
|
190
|
-
.md-sidebar .md-sidebar__scrollwrap {
|
|
191
|
-
width: calc(16rem - 10px);
|
|
192
|
-
}
|
|
193
|
-
.md-sidebar--secondary {
|
|
194
|
-
right: ${P.spacing(3)}px;
|
|
195
|
-
}
|
|
196
|
-
.md-sidebar::-webkit-scrollbar {
|
|
197
|
-
width: 5px;
|
|
198
|
-
}
|
|
199
|
-
.md-sidebar::-webkit-scrollbar-button {
|
|
200
|
-
width: 5px;
|
|
201
|
-
height: 5px;
|
|
202
|
-
}
|
|
203
|
-
.md-sidebar::-webkit-scrollbar-track {
|
|
204
|
-
background: #eee;
|
|
205
|
-
border: 1 px solid rgb(250, 250, 250);
|
|
206
|
-
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
207
|
-
border-radius: 3px;
|
|
208
|
-
}
|
|
209
|
-
.md-sidebar::-webkit-scrollbar-thumb {
|
|
210
|
-
width: 5px;
|
|
211
|
-
background: rgb(193, 193, 193);
|
|
212
|
-
border: transparent;
|
|
213
|
-
border-radius: 3px;
|
|
214
|
-
}
|
|
215
|
-
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
216
|
-
background: rgb(125, 125, 125);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.md-content {
|
|
220
|
-
max-width: calc(100% - 16rem * 2);
|
|
221
|
-
margin-left: 16rem;
|
|
222
|
-
margin-bottom: 50px;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.md-footer {
|
|
226
|
-
position: fixed;
|
|
227
|
-
bottom: 0px;
|
|
228
|
-
}
|
|
229
|
-
.md-footer__title {
|
|
230
|
-
background-color: unset;
|
|
231
|
-
}
|
|
232
|
-
.md-footer-nav__link {
|
|
233
|
-
width: 16rem;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.md-dialog {
|
|
237
|
-
background-color: unset;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
@media screen and (min-width: 76.25em) {
|
|
241
|
-
.md-sidebar {
|
|
242
|
-
height: auto;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
@media screen and (max-width: 76.1875em) {
|
|
247
|
-
.md-nav {
|
|
248
|
-
transition: none !important;
|
|
249
|
-
background-color: var(--md-default-bg-color)
|
|
250
|
-
}
|
|
251
|
-
.md-nav--primary .md-nav__title {
|
|
252
|
-
cursor: auto;
|
|
253
|
-
color: var(--md-default-fg-color);
|
|
254
|
-
font-weight: 700;
|
|
255
|
-
white-space: normal;
|
|
256
|
-
line-height: 1rem;
|
|
257
|
-
height: auto;
|
|
258
|
-
display: flex;
|
|
259
|
-
flex-flow: column;
|
|
260
|
-
row-gap: 1.6rem;
|
|
261
|
-
padding: 1.2rem .8rem .8rem;
|
|
262
|
-
background-color: var(--md-default-bg-color);
|
|
263
|
-
}
|
|
264
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
265
|
-
box-shadow: none;
|
|
266
|
-
}
|
|
267
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
268
|
-
border-top: none;
|
|
269
|
-
}
|
|
270
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
271
|
-
display: none;
|
|
272
|
-
}
|
|
273
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
274
|
-
color: var(--md-default-fg-color);
|
|
275
|
-
position: static;
|
|
276
|
-
height: auto;
|
|
277
|
-
margin: 0 0 0 -0.2rem;
|
|
278
|
-
}
|
|
279
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
280
|
-
padding-top: 0;
|
|
281
|
-
}
|
|
282
|
-
.md-nav--primary .md-nav__item {
|
|
283
|
-
border-top: none;
|
|
284
|
-
}
|
|
285
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
286
|
-
font-size : var(--md-typeset-font-size);
|
|
287
|
-
}
|
|
288
|
-
.md-nav .md-source {
|
|
289
|
-
display: none;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.md-sidebar {
|
|
293
|
-
height: 100%;
|
|
294
|
-
}
|
|
295
|
-
.md-sidebar--primary {
|
|
296
|
-
width: 12.1rem !important;
|
|
297
|
-
z-index: 200;
|
|
298
|
-
left: ${Wt?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
|
|
299
|
-
}
|
|
300
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
301
|
-
display: none;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.md-content {
|
|
305
|
-
max-width: 100%;
|
|
306
|
-
margin-left: 0;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.md-header__button {
|
|
310
|
-
margin: 0.4rem 0;
|
|
311
|
-
margin-left: 0.4rem;
|
|
312
|
-
padding: 0;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.md-overlay {
|
|
316
|
-
left: 0;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.md-footer {
|
|
320
|
-
position: static;
|
|
321
|
-
padding-left: 0;
|
|
322
|
-
}
|
|
323
|
-
.md-footer-nav__link {
|
|
324
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
325
|
-
width: 50%;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
@media screen and (max-width: 600px) {
|
|
330
|
-
.md-sidebar--primary {
|
|
331
|
-
left: -12.1rem !important;
|
|
332
|
-
width: 12.1rem;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
`}),He({css:`
|
|
336
|
-
.md-typeset {
|
|
337
|
-
font-size: var(--md-typeset-font-size);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
${vt.reduce((bt,qt)=>{const Ht=P.typography[qt],{lineHeight:Ut,fontFamily:_t,fontWeight:rn,fontSize:en}=Ht,Kt=Jt=>{let cn=1;return typeof Jt=="number"&&(cn=Jt/16*.6),typeof Jt=="string"&&(cn=Jt.replace("rem","")),`calc(${cn} * var(--md-typeset-font-size))`};return bt.concat(`
|
|
341
|
-
.md-typeset ${qt} {
|
|
342
|
-
color: var(--md-default-fg-color);
|
|
343
|
-
line-height: ${Ut};
|
|
344
|
-
font-family: ${_t};
|
|
345
|
-
font-weight: ${rn};
|
|
346
|
-
font-size: ${Kt(en)};
|
|
347
|
-
}
|
|
348
|
-
`)},"")}
|
|
349
|
-
|
|
350
|
-
.md-typeset .md-content__button {
|
|
351
|
-
color: var(--md-default-fg-color);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.md-typeset hr {
|
|
355
|
-
border-bottom: 0.05rem dotted ${P.palette.divider};
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.md-typeset details {
|
|
359
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
360
|
-
}
|
|
361
|
-
.md-typeset details summary {
|
|
362
|
-
padding-left: 2.5rem !important;
|
|
363
|
-
}
|
|
364
|
-
.md-typeset details summary:before,
|
|
365
|
-
.md-typeset details summary:after {
|
|
366
|
-
top: 50% !important;
|
|
367
|
-
width: 20px !important;
|
|
368
|
-
height: 20px !important;
|
|
369
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
370
|
-
}
|
|
371
|
-
.md-typeset details[open] > summary:after {
|
|
372
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.md-typeset blockquote {
|
|
376
|
-
color: var(--md-default-fg-color--light);
|
|
377
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.md-typeset table:not([class]) {
|
|
381
|
-
font-size: var(--md-typeset-font-size);
|
|
382
|
-
border: 1px solid var(--md-default-fg-color);
|
|
383
|
-
border-bottom: none;
|
|
384
|
-
border-collapse: collapse;
|
|
385
|
-
}
|
|
386
|
-
.md-typeset table:not([class]) th {
|
|
387
|
-
font-weight: bold;
|
|
388
|
-
}
|
|
389
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
390
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
394
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
395
|
-
}
|
|
396
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
397
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
398
|
-
}
|
|
399
|
-
`}),He({css:`
|
|
400
|
-
/*
|
|
401
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
402
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
403
|
-
*/
|
|
404
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
405
|
-
transition: none;
|
|
406
|
-
}
|
|
407
|
-
`}),He({css:`
|
|
408
|
-
/* HIGHLIGHT */
|
|
409
|
-
.highlight .md-clipboard:after {
|
|
410
|
-
content: unset;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.highlight .nx {
|
|
414
|
-
color: ${ze?"#ff53a3":"#ec407a"};
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/* CODE HILITE */
|
|
418
|
-
.codehilite .gd {
|
|
419
|
-
background-color: ${ze?"rgba(248,81,73,0.65)":"#fdd"};
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.codehilite .gi {
|
|
423
|
-
background-color: ${ze?"rgba(46,160,67,0.65)":"#dfd"};
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
/* TABBED */
|
|
427
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
428
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
429
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
430
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
431
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
432
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
433
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
434
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
435
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
436
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
437
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
438
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
439
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
440
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
441
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
442
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
443
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
444
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
445
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
446
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
447
|
-
color: var(--md-accent-fg-color);
|
|
448
|
-
border-color: var(--md-accent-fg-color);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/* TASK-LIST */
|
|
452
|
-
.task-list-control .task-list-indicator::before {
|
|
453
|
-
background-color: ${P.palette.action.disabledBackground};
|
|
454
|
-
}
|
|
455
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
456
|
-
background-color: ${P.palette.success.main};
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
/* ADMONITION */
|
|
460
|
-
.admonition {
|
|
461
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
462
|
-
}
|
|
463
|
-
.admonition .admonition-title {
|
|
464
|
-
padding-left: 2.5rem !important;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.admonition .admonition-title:before {
|
|
468
|
-
top: 50% !important;
|
|
469
|
-
width: 20px !important;
|
|
470
|
-
height: 20px !important;
|
|
471
|
-
transform: translateY(-50%) !important;
|
|
472
|
-
}
|
|
473
|
-
`})]),[re,de,F,me,Z,ce,P,ze,Wt]),dt=(0,r.useCallback)(async Qe=>Tt(Qe,[ft(),An(P),xt({baseUrl:window.location.origin,onClick:(Xe,bt)=>{var Ut;const qt=Xe.ctrlKey||Xe.metaKey,Ht=new URL(bt);Ht.hash?qt?window.open(`${Ht.pathname}${Ht.hash}`,"_blank"):(R(`${Ht.pathname}${Ht.hash}`),(Ut=Qe==null?void 0:Qe.querySelector(`#${Ht.hash.slice(1)}`))==null||Ut.scrollIntoView()):qt?window.open(Ht.pathname,"_blank"):R(Ht.pathname)}}),un({docStorageUrl:await ce.getApiOrigin(),onLoading:Xe=>{Xe.style.setProperty("opacity","0")},onLoaded:Xe=>{var bt;Xe.style.removeProperty("opacity"),(bt=Xe.querySelector(".md-nav__title"))==null||bt.removeAttribute("for"),St(Array.from(Xe.querySelectorAll(".md-sidebar")))}})]),[P,R,ce]);return(0,r.useEffect)(()=>{if(!Me)return()=>{};let Qe=!0;return $t(Me,pe).then(async Xe=>{if(!(Xe!=null&&Xe.innerHTML)||!Qe)return;window.scroll({top:0});const bt=await dt(Xe);ut(bt)}),()=>{Qe=!1}},[Me,pe,$t,dt]),at},Rt=(0,c.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),mt=Ke(z=>{const{withSearch:R=!0,onReady:P}=z,ce=Rt(),me=(0,s.$L)(),{entityMetadata:{value:Z,loading:F},entityRef:re,shadowRoot:de,setShadowRoot:Pe}=(0,s.x1)(),pe=ot(re),[Me,ze]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),et=(0,r.useCallback)(yt=>{var dt;if(!pe||!yt)return;ze((0,t.Ue)({...(0,m.Z)(),insertionPoint:pe.querySelector("head")||void 0}));const $t=(dt=yt.shadowRoot)!=null?dt:yt.attachShadow({mode:"open"});$t.innerHTML="",$t.appendChild(pe),Pe($t),P instanceof Function&&P()},[pe,Pe,P]),St=de==null?void 0:de.querySelector('[data-md-component="content"]'),at=de==null?void 0:de.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),ut=de==null?void 0:de.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),Wt=document.createElement("div");at==null||at.prepend(Wt);const Ye=document.createElement("div");return ut==null||ut.prepend(Ye),F===!1&&!Z?r.createElement(f.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):pe?r.createElement(f.Content,null,r.createElement(h.Z,{container:!0},r.createElement(h.Z,{xs:12,item:!0},r.createElement(u.N,null)),R&&r.createElement(h.Z,{className:ce.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:re})),r.createElement(h.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:Me,sheetsManager:new Map},r.createElement("div",{ref:et,"data-testid":"techdocs-native-shadowroot"}),r.createElement(v.Z,{container:Wt},me.renderComponentsByLocation(s.oZ.PrimarySidebar)),r.createElement(v.Z,{container:St},me.renderComponentsByLocation(s.oZ.Content)),r.createElement(v.Z,{container:Ye},me.renderComponentsByLocation(s.oZ.SecondarySidebar)))))):r.createElement(f.Content,null,r.createElement(h.Z,{container:!0},r.createElement(h.Z,{xs:12,item:!0},r.createElement(u.N,null))))}),sn=null},99954:function(q,i,e){"use strict";e.d(i,{S:function(){return A}});var r=e(2784),t=e(18671),c=e(98069),h=e(73250),v=e(47955),m=e(53479),a=e(48023),s=e(9118),f=e(36964),y=e(68725);const u=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),A=b=>{const{children:S}=b,D=(0,v.$L)(),_=(0,f.useApi)(f.configApiRef),{title:M,setTitle:L,subtitle:$,setSubtitle:B,entityRef:x,metadata:{value:Y,loading:te},entityMetadata:{value:Ee,loading:Ge}}=(0,v.x1)();(0,r.useEffect)(()=>{!Y||(L(Fe=>{const{site_name:lt}=Y;return Fe||lt}),B(Fe=>{let{site_description:lt}=Y;return(!lt||lt==="None")&&(lt="Home"),Fe||lt}))},[Y,L,B]);const Ke=_.getOptional("app.title")||"Backstage",fe=[$,M,Ke].filter(Boolean).join(" | "),{locationMetadata:ye,spec:Ie}=Ee||{},Ze=Ie==null?void 0:Ie.lifecycle,ke=Ee?(0,m.getEntityRelations)(Ee,a.S4):[],ct=(0,f.useRouteRef)(y._Z)(),st=r.createElement(r.Fragment,null,r.createElement(s.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:x,defaultKind:"Component"})}),ke.length>0&&r.createElement(s.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:ke,defaultKind:"group"})}),Ze?r.createElement(s.HeaderLabel,{label:"Lifecycle",value:Ze}):null,ye&&ye.type!=="dir"&&ye.type!=="file"?r.createElement(s.HeaderLabel,{label:"",value:r.createElement("a",{href:ye.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(h.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Ge&&Ee===void 0||!te&&Y===void 0?null:r.createElement(s.Header,{type:"Documentation",typeLink:ct,title:M||u,subtitle:$||u},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,fe)),st,S,D.renderComponentsByLocation(v.oZ.Header))}},16172:function(q,i,e){"use strict";e.d(i,{b:function(){return a}});var r=e(2784),t=e(79692),c=e(15223),h=e(95544),v=e(47955);const m=(0,t.Z)(s=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:s.spacing(3,3,0)}})),a=({toolbarProps:s})=>{const f=m(),{entityMetadata:{value:y,loading:u}}=(0,v.x1)(),b=(0,v.$L)().renderComponentsByLocation(v.oZ.Subheader);return!b||u===!1&&!y?null:r.createElement(c.Z,{classes:f,...s},b&&r.createElement(h.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},b))}},23738:function(q,i,e){"use strict";e.d(i,{N:function(){return B}});var r=e(2784),t=e(9118),c=e(79692),h=e(4614),v=e(77277),m=e(99688),a=e(12420),s=e(60905),f=e(90436),y=e(61837),u=e(4190),A=e(87685);const b=(0,c.Z)(x=>(0,a.Z)({paper:{width:"100%",[x.breakpoints.up("sm")]:{width:"75%"},[x.breakpoints.up("md")]:{width:"50%"},padding:x.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:x.palette.background.default}})),S=({buildLog:x,onClose:Y})=>{const te=b(),Ee=x.length===0?"Waiting for logs...":x.join(`
|
|
474
|
-
`);return r.createElement(s.Z,{container:!0,direction:"column",className:te.root,spacing:0,wrap:"nowrap"},r.createElement(s.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(f.Z,{variant:"h5"},"Build Details"),r.createElement(y.Z,{key:"dismiss",title:"Close the drawer",onClick:Y,color:"inherit"},r.createElement(A.Z,null))),r.createElement(t.LogViewer,{text:Ee,classes:{root:te.logs}}))},D=({buildLog:x})=>{const Y=b(),[te,Ee]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(v.Z,{color:"inherit",onClick:()=>Ee(!0)},"Show Build Logs"),r.createElement(u.ZP,{classes:{paper:Y.paper},anchor:"right",open:te,onClose:()=>Ee(!1)},r.createElement(S,{buildLog:x,onClose:()=>Ee(!1)})))};var _=e(36964);const M=({errorMessage:x})=>{const Y=(0,_.useApi)(_.configApiRef).getOptionalString("techdocs.builder");let te="";return Y!=="local"&&(te="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(t.ErrorPage,{status:"404",statusMessage:x||"Documentation not found",additionalInfo:te})};var L=e(28626);const $=(0,c.Z)(x=>({root:{marginBottom:x.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),B=()=>{let x=null;const Y=$(),{state:te,contentReload:Ee,contentErrorMessage:Ge,syncErrorMessage:Ke,buildLog:fe}=(0,L.DK)(),ye=te==="CHECKING"?r.createElement(t.Progress,null):null;return te==="INITIAL_BUILD"&&(x=r.createElement(m.Z,{classes:{root:Y.root},variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(D,{buildLog:fe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),te==="CONTENT_STALE_REFRESHING"&&(x=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(D,{buildLog:fe}),classes:{root:Y.root}},"A newer version of this documentation is being prepared and will be available shortly.")),te==="CONTENT_STALE_READY"&&(x=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(v.Z,{color:"inherit",onClick:()=>Ee()},"Refresh"),classes:{root:Y.root}},"A newer version of this documentation is now available, please refresh to view.")),te==="CONTENT_STALE_ERROR"&&(x=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(D,{buildLog:fe}),classes:{root:Y.root,message:Y.message}},"Building a newer version of this documentation failed."," ",Ke)),te==="CONTENT_NOT_FOUND"&&(x=r.createElement(r.Fragment,null,Ke&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(D,{buildLog:fe}),classes:{root:Y.root,message:Y.message}},"Building a newer version of this documentation failed."," ",Ke),r.createElement(M,{errorMessage:Ge}))),r.createElement(r.Fragment,null,ye,x)}},96393:function(q,i,e){"use strict";e.d(i,{Fq:function(){return c.Fq},SE:function(){return t.S}});var r=e(26220),t=e(99954),c=e(28626),h=e(16172),v=e(23738)},68725:function(q,i,e){"use strict";e.d(i,{Fw:function(){return c},_Z:function(){return t},pd:function(){return h}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),c=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},10459:function(q,i,e){"use strict";e.d(i,{S:function(){return sn}});var r=e(2784),t=e(79692),c=e(49378),h=e(38402),v=e(85256),m=e(9118),a=e(15277),s=e.n(a);const f=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=z=>{const{result:R,lineClamp:P=5,asListItem:ce=!0,asLink:me=!0,title:Z}=z,F=f(),re=()=>{var pe;return r.createElement(c.Z,{className:F.itemText,primaryTypographyProps:{variant:"h6"},primary:Z||`${R.title} | ${(pe=R.entityTitle)!=null?pe:R.name} docs`,secondary:r.createElement(s(),{line:P,truncateText:"\u2026",text:R.text,element:"span"})})},de=({children:pe})=>me?r.createElement(m.Link,{to:R.location},pe):r.createElement(r.Fragment,null,pe),Pe=({children:pe})=>ce?r.createElement(r.Fragment,null,r.createElement(h.Z,{alignItems:"flex-start",className:F.flexContainer},pe),r.createElement(v.Z,{component:"li"})):r.createElement(r.Fragment,null,pe);return r.createElement(de,null,r.createElement(Pe,null,r.createElement(re,null)))};var u=e(36964);const A=(0,u.createApiRef)({id:"plugin.search.queryservice"});var b=e(76241),S=e(64279),D=e(1849);const _=(0,b.CT)("search-context"),M=()=>{const z=(0,r.useContext)(_);if(!z)throw new Error("useSearch must be used within a SearchContextProvider");const R=z.atVersion(1);if(!R)throw new Error("No SearchContext v1 found");return R},L=()=>useContext(_)!==void 0,$={term:"",pageCursor:void 0,filters:{},types:[]},B=z=>{var $t,dt,Qe,Xe;const{initialState:R=$,children:P}=z,ce=(0,u.useApi)(A),[me,Z]=(0,r.useState)(R.pageCursor),[F,re]=(0,r.useState)(R.filters),[de,Pe]=(0,r.useState)(R.term),[pe,Me]=(0,r.useState)(R.types),ze=(0,D.Z)(de),et=(0,S.default)(()=>ce.query({term:de,filters:F,pageCursor:me,types:pe}),[de,F,pe,me]),St=!et.loading&&!et.error&&(($t=et.value)==null?void 0:$t.nextPageCursor),at=!et.loading&&!et.error&&((dt=et.value)==null?void 0:dt.previousPageCursor),ut=(0,r.useCallback)(()=>{var bt;Z((bt=et.value)==null?void 0:bt.nextPageCursor)},[(Qe=et.value)==null?void 0:Qe.nextPageCursor]),Wt=(0,r.useCallback)(()=>{var bt;Z((bt=et.value)==null?void 0:bt.previousPageCursor)},[(Xe=et.value)==null?void 0:Xe.previousPageCursor]);(0,r.useEffect)(()=>{de&&ze&&de!==ze&&Z(void 0)},[de,ze,R.pageCursor]);const Ye={result:et,filters:F,setFilters:re,term:de,setTerm:Pe,types:pe,setTypes:Me,pageCursor:me,setPageCursor:Z,fetchNextPage:St?ut:void 0,fetchPreviousPage:at?Wt:void 0},yt=(0,b.EI)({1:Ye});return r.createElement(u.AnalyticsContext,{attributes:{searchTypes:pe.sort().join(",")}},r.createElement(_.Provider,{value:yt,children:P}))};var x=e(49208),Y=e(62159);class te{constructor(R){Q(this,"config");this.config=new ConfigReader(R)}has(R){return this.config.has(R)}keys(){return this.config.keys()}get(R){return this.config.get(R)}getOptional(R){return this.config.getOptional(R)}getConfig(R){return this.config.getConfig(R)}getOptionalConfig(R){return this.config.getOptionalConfig(R)}getConfigArray(R){return this.config.getConfigArray(R)}getOptionalConfigArray(R){return this.config.getOptionalConfigArray(R)}getNumber(R){return this.config.getNumber(R)}getOptionalNumber(R){return this.config.getOptionalNumber(R)}getBoolean(R){return this.config.getBoolean(R)}getOptionalBoolean(R){return this.config.getOptionalBoolean(R)}getString(R){return this.config.getString(R)}getOptionalString(R){return this.config.getOptionalString(R)}getStringArray(R){return this.config.getStringArray(R)}getOptionalStringArray(R){return this.config.getOptionalStringArray(R)}}const Ee={subscribe:()=>({unsubscribe:()=>{},closed:!0}),[Symbol.observable](){return this}};class Ge{constructor(R={}){Q(this,"errors",new Array);Q(this,"waiters",new Set);this.options=R}post(R,P){if(this.options.collect){this.errors.push({error:R,context:P});for(const ce of this.waiters)ce.pattern.test(R.message)&&(this.waiters.delete(ce),ce.resolve({error:R,context:P}));return}throw new Error(`MockErrorApi received unexpected error, ${R}`)}error$(){return Ee}getErrors(){return this.errors}waitForError(R,P=2e3){return new Promise((ce,me)=>{setTimeout(()=>{me(new Error("Timed out waiting for error"))},P),this.waiters.add({resolve:ce,pattern:R})})}}var Ke=e(96279);class fe{constructor(R){Q(this,"implementation");this.implementation=ye(R)}get fetch(){return this.implementation.fetch}}function ye(z){return createFetchApi({baseImplementation:Ie(z),middleware:[Ze(z),ke(z)].filter(R=>Boolean(R))})}function Ie(z){const R=z==null?void 0:z.baseImplementation;if(R){if(R==="none")return()=>Promise.resolve(new Response)}else return crossFetch;return R}function Ze(z){const R=z==null?void 0:z.resolvePluginProtocol;if(!!R)return FetchMiddlewares.resolvePluginProtocol({discoveryApi:R.discoveryApi})}function ke(z){const R=z==null?void 0:z.injectIdentityAuth;if(!R)return;const P="token"in R?{getCredentials:async()=>({token:R.token})}:R.identityApi;return FetchMiddlewares.injectIdentityAuth({identityApi:P,allowUrl:()=>!0})}var ct=e(40749);class st{constructor(R=()=>AuthorizeResult.ALLOW){this.requestHandler=R}async authorize(R){return{result:this.requestHandler(R)}}}var Ce=e(82394),Ne=e.n(Ce);class Fe{constructor(R,P,ce){Q(this,"namespace");Q(this,"data");Q(this,"bucketStorageApis");Q(this,"subscribers",new Set);Q(this,"observable",new(Ne())(R=>(this.subscribers.add(R),()=>{this.subscribers.delete(R)})));this.namespace=R,this.bucketStorageApis=P,this.data={...ce}}static create(R){return new Fe("",new Map,R)}forBucket(R){return this.bucketStorageApis.has(R)||this.bucketStorageApis.set(R,new Fe(`${this.namespace}/${R}`,this.bucketStorageApis,this.data)),this.bucketStorageApis.get(R)}snapshot(R){if(this.data.hasOwnProperty(this.getKeyName(R))){const P=this.data[this.getKeyName(R)];return{key:R,presence:"present",value:P}}return{key:R,presence:"absent",value:void 0}}async set(R,P){const ce=JSON.parse(JSON.stringify(P),(me,Z)=>(typeof Z=="object"&&Z!==null&&Object.freeze(Z),Z));this.data[this.getKeyName(R)]=ce,this.notifyChanges({key:R,presence:"present",value:ce})}async remove(R){delete this.data[this.getKeyName(R)],this.notifyChanges({key:R,presence:"absent",value:void 0})}observe$(R){return this.observable.filter(({key:P})=>P===R)}getKeyName(R){return`${this.namespace}/${encodeURIComponent(R)}`}notifyChanges(R){for(const P of this.subscribers)P.next(R)}}var lt=e(28981),Ve=e(83677),xt=e(63751);async function ht(z){let R;return await act(async()=>{R=render(z)}),R}const wt=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:z})=>x.UrlPatternDiscovery.compile(`${z.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)(u.alertApiRef,new x.AlertApiForwarder),(0,u.createApiFactory)(u.analyticsApiRef,new x.NoOpAnalyticsApi),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:z})=>{const R=new x.ErrorAlerter(z,new x.ErrorApiForwarder);return x.UnhandledErrorForwarder.forward(R,{hidden:!1}),R}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:z})=>x.WebStorage.create({errorApi:z})}),(0,u.createApiFactory)(u.oauthRequestApiRef,new x.OAuthRequestManager),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.GoogleAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.MicrosoftAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.GithubAuth.create({discoveryApi:z,oauthRequestApi:R,defaultScopes:["read:user"],environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.OktaAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.GitlabAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.OneLoginAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.BitbucketAuth.create({discoveryApi:z,oauthRequestApi:R,defaultScopes:["team"],environment:P.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:z,oauthRequestApi:R,configApi:P})=>x.AtlassianAuth.create({discoveryApi:z,oauthRequestApi:R,environment:P.getOptionalString("auth.environment")})})],jt=[(0,u.createApiFactory)(u.errorApiRef,new Ge),(0,u.createApiFactory)(u.storageApiRef,Fe.create())],Lt={"kind:api":Ve.Z,"kind:component":Ve.Z,"kind:domain":Ve.Z,"kind:group":Ve.Z,"kind:location":Ve.Z,"kind:system":Ve.Z,"kind:user":Ve.Z,brokenImage:Ve.Z,catalog:Ve.Z,scaffolder:Ve.Z,techdocs:Ve.Z,search:Ve.Z,chat:Ve.Z,dashboard:Ve.Z,docs:Ve.Z,email:Ve.Z,github:Ve.Z,group:Ve.Z,help:Ve.Z,user:Ve.Z,warning:Ve.Z},Gt=({error:z})=>{throw new Error(`Reached ErrorBoundaryFallback Page with error, ${z}`)},zt=()=>{throw new Error("Reached NotFound Page")},Mt=({step:z,error:R})=>{throw new Error(`Reached BootError Page at step ${z} with error ${R}`)},An=()=>React.createElement("div",{"data-testid":"progress"}),Vt=z=>null;function Et(z){return String(z).includes("{type=external,")}function un(z,R={}){var Pe;const{routeEntries:P=["/"]}=R,ce=new Map,me=createSpecializedApp({apis:mockApis,defaultApis,configLoader:!1,components:{Progress:An,BootErrorPage:Mt,NotFoundErrorPage:zt,ErrorBoundaryFallback:Gt,Router:({children:pe})=>React.createElement(MemoryRouter,{initialEntries:P,children:pe})},icons:Lt,plugins:[],themes:[{id:"light",title:"Test App Theme",variant:"light",Provider:({children:pe})=>React.createElement(ThemeProvider,{theme:lightTheme},React.createElement(CssBaseline,null,pe))}],bindRoutes:({bind:pe})=>{for(const[Me,ze]of ce)pe({ref:Me},{ref:ze})}});let Z;z instanceof Function?Z=React.createElement(z,null):Z=z;const F=Object.entries((Pe=R.mountedRoutes)!=null?Pe:{}).map(([pe,Me])=>{const ze=()=>React.createElement("div",null,"Mounted at ",pe);if(Et(Me)){const et=createRouteRef({id:"id"});ce.set(Me,et),attachComponentData(ze,"core.mountPoint",et)}else attachComponentData(ze,"core.mountPoint",Me);return React.createElement(Route,{key:pe,path:pe,element:React.createElement(ze,null)})}),re=me.getProvider(),de=me.getRouter();return React.createElement(re,null,React.createElement(de,null,React.createElement(Vt,null,F),React.createElement(Routes,null,React.createElement(Route,{path:"/*",element:Z}))))}async function se(z,R={}){return renderWithEffects(un(z,R))}class j{static from(...R){return new j(new Map(R.map(([P,ce])=>[P.id,ce])))}constructor(R){this.apis=R}get(R){return this.apis.get(R.id)}}const ae=z=>React.createElement(ApiProvider,{apis:j.from(...z.apis),children:z.children});function ue(z){const{mockedResults:R,children:P}=z,ce=()=>Promise.resolve(R||{}),me=TestApiRegistry.from([searchApiRef,{query:ce}]);return React.createElement(ApiProvider,{apis:me,children:P})}const ve=z=>React.createElement(ue,{...z},React.createElement(SearchContextProvider,{children:z.children}));var Le=e(86619),we=e(50581),Se=e(61837),He=e(4614),ft=e(21853),Tt=e(88013),vt=e(10289),ot=e(48760);const Rt=(0,t.Z)({root:{width:"100%"}}),mt=z=>{const{entityId:R,debounceTime:P=150}=z,[ce,me]=(0,r.useState)(!1),Z=(0,vt.s0)(),{term:F,setTerm:re,setFilters:de,result:{loading:Pe,value:pe}}=M(),Me=Rt(),[ze,et]=(0,r.useState)([]);(0,r.useEffect)(()=>{let dt=!0;if(dt&&pe){const Qe=pe.results.slice(0,10);et(Qe)}return()=>{dt=!1}},[Pe,pe]);const[St,at]=(0,r.useState)(F);(0,ot.Z)(()=>re(St),P,[St]);const{kind:ut,name:Wt,namespace:Ye}=R;(0,r.useEffect)(()=>{de(dt=>({...dt,kind:ut,namespace:Ye,name:Wt}))},[ut,Ye,Wt,de]);const yt=dt=>{ce||me(!0),at(dt.target.value)},$t=(dt,Qe)=>{if(Qe!=null&&Qe.document){const{location:Xe}=Qe.document;Z(Xe)}};return r.createElement(Tt.ZP,{classes:{root:Me.root},"data-testid":"techdocs-search-bar",size:"small",open:ce,getOptionLabel:()=>"",filterOptions:dt=>dt,onClose:()=>{me(!1)},onFocus:()=>{me(!0)},onChange:$t,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:ze,renderOption:({document:dt})=>r.createElement(y,{result:dt,lineClamp:3,asListItem:!1,asLink:!1,title:dt.title}),loading:Pe,renderInput:dt=>r.createElement(Le.Z,{...dt,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${R.name} docs`,value:St,onChange:yt,InputProps:{...dt.InputProps,startAdornment:r.createElement(we.Z,{position:"start"},r.createElement(Se.Z,{"aria-label":"Query",disabled:!0},r.createElement(ft.Z,null))),endAdornment:r.createElement(r.Fragment,null,Pe?r.createElement(He.Z,{color:"inherit",size:20}):null,dt.InputProps.endAdornment)}})})},sn=z=>{const R={term:"",types:["techdocs"],pageCursor:"",filters:z.entityId};return r.createElement(B,{initialState:R},r.createElement(mt,{...z}))}},98157:function(){},19133:function(q,i,e){"use strict";q.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(q,i,e){"use strict";q.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(q,i,e){"use strict";q.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(q,i,e){"use strict";q.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(q,i,e){"use strict";q.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(q){var i=function(r){return q(q.s=r)};q.O(0,[2370,6202,2158,9284,2126,7012,4361,9035,4983,3222,5218,4736],function(){return i(88649),i(30294)});var e=q.O()}]);})();
|
|
475
|
-
|
|
476
|
-
//# sourceMappingURL=main.42d41e6f.js.map
|