@techdocs/cli 0.0.0-nightly-20220418024512 → 0.0.0-nightly-20220422024928
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 +12 -4
- package/dist/cjs/{PublisherConfig-162efac5.cjs.js → PublisherConfig-7a0dc71c.cjs.js} +32 -28
- package/dist/cjs/PublisherConfig-7a0dc71c.cjs.js.map +1 -0
- package/dist/cjs/{generate-67f1ab98.cjs.js → generate-b637bb78.cjs.js} +14 -14
- package/dist/cjs/generate-b637bb78.cjs.js.map +1 -0
- package/dist/cjs/{migrate-181e95f5.cjs.js → migrate-122ec4bf.cjs.js} +9 -9
- package/dist/cjs/migrate-122ec4bf.cjs.js.map +1 -0
- package/dist/cjs/{mkdocs-7c045a2a.cjs.js → mkdocs-3c3898e8.cjs.js} +11 -11
- package/dist/cjs/mkdocs-3c3898e8.cjs.js.map +1 -0
- package/dist/cjs/{publish-7bf1e5f7.cjs.js → publish-efa348a5.cjs.js} +7 -7
- package/dist/cjs/publish-efa348a5.cjs.js.map +1 -0
- package/dist/cjs/{serve-66a37894.cjs.js → serve-aa1ff626.cjs.js} +12 -12
- package/dist/cjs/serve-aa1ff626.cjs.js.map +1 -0
- package/dist/embedded-app/.config-schema.json +51 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/main.698e0a31.js +476 -0
- package/dist/embedded-app/static/main.698e0a31.js.map +1 -0
- package/dist/embedded-app/static/module-ajv.d6f6d109.js +3 -3
- package/dist/embedded-app/static/module-ajv.d6f6d109.js.map +1 -1
- package/dist/embedded-app/static/module-date-fns.5015b34b.js +3 -0
- package/dist/embedded-app/static/module-date-fns.5015b34b.js.map +1 -0
- package/dist/embedded-app/static/{module-material-table.cbad0c40.js → module-material-table.fcca9670.js} +2 -2
- package/dist/embedded-app/static/{module-material-table.cbad0c40.js.map → module-material-table.fcca9670.js.map} +1 -1
- package/dist/embedded-app/static/module-testing-library.633b23c6.js +1 -1
- package/dist/embedded-app/static/react-syntax-highlighter/lowlight-import.c14d776e.chunk.js +1 -1
- package/dist/embedded-app/static/{runtime.b14e613b.js → runtime.698e0a31.js} +1 -1
- package/dist/embedded-app/static/{runtime.b14e613b.js.map → runtime.698e0a31.js.map} +1 -1
- package/dist/embedded-app/static/vendor.698e0a31.js +117 -0
- package/dist/embedded-app/static/vendor.698e0a31.js.map +1 -0
- package/dist/index.cjs.js +10 -14
- package/dist/index.cjs.js.map +1 -1
- package/package.json +6 -6
- package/dist/cjs/PublisherConfig-162efac5.cjs.js.map +0 -1
- package/dist/cjs/generate-67f1ab98.cjs.js.map +0 -1
- package/dist/cjs/migrate-181e95f5.cjs.js.map +0 -1
- package/dist/cjs/mkdocs-7c045a2a.cjs.js.map +0 -1
- package/dist/cjs/publish-7bf1e5f7.cjs.js.map +0 -1
- package/dist/cjs/serve-66a37894.cjs.js.map +0 -1
- package/dist/embedded-app/static/main.b14e613b.js +0 -476
- package/dist/embedded-app/static/main.b14e613b.js.map +0 -1
- package/dist/embedded-app/static/module-date-fns.a08d117e.js +0 -3
- package/dist/embedded-app/static/module-date-fns.a08d117e.js.map +0 -1
- package/dist/embedded-app/static/vendor.b14e613b.js +0 -117
- package/dist/embedded-app/static/vendor.b14e613b.js.map +0 -1
|
@@ -0,0 +1,476 @@
|
|
|
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 qe=(q,i,e)=>(ia(q,i,"read from private field"),e?e.call(q):i.get(q)),bn=(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)},wn=(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),l=e(96279),h=e.n(l);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:R}=s!=null?s:{},x=[];for(const $ of[y].flat()){const O=[];for(const[w,J]of Object.entries($))for(const ee of[J].flat())ee===v?O.push(encodeURIComponent(w)):typeof ee=="string"&&O.push(`${encodeURIComponent(w)}=${encodeURIComponent(ee)}`);O.length&&x.push(`filter=${O.join(",")}`)}u.length&&x.push(`fields=${u.map(encodeURIComponent).join(",")}`),A!==void 0&&x.push(`offset=${A}`),b!==void 0&&x.push(`limit=${b}`),R!==void 0&&x.push(`after=${encodeURIComponent(R)}`);const _=x.length?`?${x.join("&")}`:"",M=await this.requestRequired("GET",`/entities${_}`,f),I=($,O)=>{var ee,Ae;if(((ee=$.metadata)==null?void 0:ee.name)===void 0||$.kind===void 0||((Ae=O.metadata)==null?void 0:Ae.name)===void 0||O.kind===void 0)return 0;const w=(0,r.eE)($),J=(0,r.eE)(O);return w<J?-1:w>J?1:0};return{items:M.sort(I)}}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 R of[y].flat()){const x=[];for(const[_,M]of Object.entries(R))for(const I of[M].flat())I===v?x.push(encodeURIComponent(_)):typeof I=="string"&&x.push(`${encodeURIComponent(_)}=${encodeURIComponent(I)}`);x.length&&A.push(`filter=${x.join(",")}`)}for(const R of u)A.push(`facet=${encodeURIComponent(R)}`);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:R,exists:x}=await A.json();if(!b)throw new Error(`Location wasn't added: ${f}`);return{location:b,entities:R,exists:x}}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 l},P1:function(){return ge},q1:function(){return S},M6:function(){return V},l2:function(){return t},zG:function(){return r},w$:function(){return ae},nP:function(){return j},aS:function(){return Ge},S4:function(){return Nt},cz:function(){return Ce},iB:function(){return Le},of:function(){return je},Ou:function(){return D},eE:function(){return Xe},NZ:function(){return ce}});const r="default",t="backstage.io/view-url",l="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,ne,ye,pe){if(typeof F!="string")return!1;const Ie=F.split(ne);return Ie.length===1?pe(Ie[0]):Ie.length===2?ye(Ie[0])&&pe(Ie[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 ne;return typeof F=="string"&&((ne=F==null?void 0:F.trim())==null?void 0:ne.length)>=1}static isNonEmptyString(F){var ne;return typeof F=="string"&&((ne=F==null?void 0:F.trim())==null?void 0:ne.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 R=new Map,x=[s,u,A,b];function _(W){if(!(W!=null&&W.length))throw new TypeError("Unknown error");const F=W[0];throw new TypeError(`${F.instancePath||"<root>"} ${F.message}${F.params?` - ${Object.entries(F.params).map(([ne,ye])=>`${ne}: ${ye}`).join(", ")}`:""}`)}function M(W,F={}){var Ne;const ne=(Ne=F==null?void 0:F.disableCache)!=null?Ne:!1,ye=ne?"":JSON.stringify(W);if(!ne){const mt=R.get(ye);if(mt)return mt}const pe=I(W),Ie=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});pe.length&&Ie.addSchema(pe,void 0,void 0,!0);const Be=Ie.compile(W);return ne||R.set(ye,Be),Be}function I(W){if(typeof W!="object")return[];const F=new Set;W.$id&&F.add(W.$id);const ne=new Array,ye=[W];for(;ye.length;){const pe=ye.pop();for(const Ie of $(pe))if(!F.has(Ie)){F.add(Ie);const Be=x.find(Ne=>Ne.$id===Ie);Be&&(ne.push(Be),ye.push(Be))}}return ne}function*$(W){const F=[W];for(;F.length;){const ne=F.pop();if(typeof ne=="object"&&ne)for(const[ye,pe]of Object.entries(ne))ye==="$ref"&&typeof pe=="string"?yield pe.split("#")[0]:F.push(pe)}}function O(W){const F=compileAjvSchema(W||entityEnvelopeSchema);return ne=>{if(F(ne)===!0)return ne;throw throwAjvError(F.errors)}}function w(W){const F=M(W);return ne=>{var Ie;if(F(ne)===!0)return ne;const pe=(Ie=F.errors)==null?void 0:Ie.filter(Be=>["/kind","/apiVersion"].includes(Be.instancePath));if((pe==null?void 0:pe.length)&&pe.every(Be=>Be.keyword==="enum"))return!1;throw _(F.errors)}}function J(W){const F=compileAjvSchema(W||entitySchema);return ne=>{if(F(ne)===!0)return ne;throw throwAjvError(F.errors)}}class ee{static isValidApiVersion(F){return a.isValidPrefixAndOrSuffix(F,"/",a.isValidDnsSubdomain,ne=>ne.length>=1&&ne.length<=63&&/^[a-z0-9A-Z]+$/.test(ne))}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,ee.isValidObjectName)}static isValidLabelValue(F){return F===""||ee.isValidObjectName(F)}static isValidAnnotationKey(F){return a.isValidPrefixAndOrSuffix(F,"/",a.isValidDnsSubdomain,ee.isValidObjectName)}static isValidAnnotationValue(F){return typeof F=="string"}}const Ae={isValidApiVersion:ee.isValidApiVersion,isValidKind:ee.isValidKind,isValidEntityName:ee.isValidObjectName,isValidNamespace:ee.isValidNamespace,isValidLabelKey:ee.isValidLabelKey,isValidLabelValue:ee.isValidLabelValue,isValidAnnotationKey:ee.isValidAnnotationKey,isValidAnnotationValue:ee.isValidAnnotationValue,isValidTag:W=>typeof W=="string"&&W.length>=1&&W.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(W)};function ke(W={}){return{...Ae,...W}}class He{constructor(F=makeValidator()){Q(this,"validators");this.validators=F}async enforce(F){var Be,Ne,mt,bt,st,ut,Mt;function ne(Qe,vt,ct){if(vt==null)throw new Error(`${Qe} must have a value`);let Gt;try{Gt=ct(vt)}catch(rt){throw new Error(`${Qe} could not be validated, ${rt}`)}if(!Gt){let rt;switch(ct.name){case"isValidLabelValue":case"isValidObjectName":rt="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":rt="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":rt="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":rt="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":rt="a string";break;case"isValidKind":rt="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":rt="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":rt="a non empty string";break;default:rt=void 0;break}const Je=rt?` expected ${rt} but found "${vt}".`:"";throw new Error(`"${Qe}" is not valid;${Je} 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 ye(Qe,vt,ct){return vt===void 0||ne(Qe,vt,ct)}ne("apiVersion",F.apiVersion,this.validators.isValidApiVersion),ne("kind",F.kind,this.validators.isValidKind),ne("metadata.name",F.metadata.name,this.validators.isValidEntityName),ye("metadata.namespace",F.metadata.namespace,this.validators.isValidNamespace);for(const[Qe,vt]of Object.entries((Be=F.metadata.labels)!=null?Be:[]))ne(`labels.${Qe}`,Qe,this.validators.isValidLabelKey),ne(`labels.${Qe}`,vt,this.validators.isValidLabelValue);for(const[Qe,vt]of Object.entries((Ne=F.metadata.annotations)!=null?Ne:[]))ne(`annotations.${Qe}`,Qe,this.validators.isValidAnnotationKey),ne(`annotations.${Qe}`,vt,this.validators.isValidAnnotationValue);const pe=(mt=F.metadata.tags)!=null?mt:[];for(let Qe=0;Qe<pe.length;++Qe)ne(`tags.${Qe}`,pe[Qe],this.validators.isValidTag);const Ie=(bt=F.metadata.links)!=null?bt:[];for(let Qe=0;Qe<Ie.length;++Qe)ne(`links.${Qe}.url`,(st=Ie[Qe])==null?void 0:st.url,CommonValidatorFunctions.isValidUrl),ye(`links.${Qe}.title`,(ut=Ie[Qe])==null?void 0:ut.title,CommonValidatorFunctions.isNonEmptyString),ye(`links.${Qe}.icon`,(Mt=Ie[Qe])==null?void 0:Mt.icon,KubernetesValidatorFunctions.isValidObjectName);return F}}class se{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[ye]=this.validate.errors||[];throw ye?new Error(`Malformed envelope, ${ye.instancePath||"<root>"} ${ye.message}`):new Error("Malformed envelope, Unknown error")}}function ve(W){let F=W.indexOf(":");const ne=W.indexOf("/");ne!==-1&&ne<F&&(F=-1);const ye=F===-1?void 0:W.slice(0,F),pe=ne===-1?void 0:W.slice(F+1,ne),Ie=W.slice(Math.max(F+1,ne+1));if(ye===""||pe===""||Ie==="")throw new TypeError(`Entity reference "${W}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:ye,namespace:pe,name:Ie}}function Le(W){return{kind:W.kind,namespace:W.metadata.namespace||r,name:W.metadata.name}}function je(W,F){var Ne,mt,bt,st;if(!W)throw new Error("Entity reference must not be empty");const ne=F==null?void 0:F.defaultKind,ye=(F==null?void 0:F.defaultNamespace)||r;let pe,Ie,Be;if(typeof W=="string"){const ut=ve(W);pe=(Ne=ut.kind)!=null?Ne:ne,Ie=(mt=ut.namespace)!=null?mt:ye,Be=ut.name}else pe=(bt=W.kind)!=null?bt:ne,Ie=(st=W.namespace)!=null?st:ye,Be=W.name;if(pe)if(Ie){if(!Be){const ut=JSON.stringify(W);throw new Error(`Entity reference ${ut} had missing or empty name`)}}else{const ut=JSON.stringify(W);throw new Error(`Entity reference ${ut} had missing or empty namespace`)}else{const ut=JSON.stringify(W);throw new Error(`Entity reference ${ut} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:pe,namespace:Ie,name:Be}}function Xe(W){var pe,Ie;let F,ne,ye;return"metadata"in W?(F=W.kind,ne=(pe=W.metadata.namespace)!=null?pe:r,ye=W.metadata.name):(F=W.kind,ne=(Ie=W.namespace)!=null?Ie:r,ye=W.name),`${F.toLocaleLowerCase("en-US")}:${ne.toLocaleLowerCase("en-US")}/${ye.toLocaleLowerCase("en-US")}`}class at{constructor(F){this.policies=F}async enforce(F){let ne=F;for(const ye of this.policies){const pe=await ye.enforce(ne);if(!pe)throw new Error(`Policy ${ye.constructor.name} did not return a result`);ne=pe}return ne}}class tt{constructor(F){this.policies=F}async enforce(F){for(const ne of this.policies){const ye=await ne.enforce(F);if(ye)return ye}throw new Error("The entity did not match any known policy")}}const Te={allOf(W){return new at(W)},oneOf(W){return new tt(W)}};var Ze=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 Ve(W){const F=w(W);return{async check(ne){return F(ne)===ne}}}const Ye=Ve(Ze);var gt=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 wt=Ve(gt);var pt=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 Ut=Ve(pt);var Vt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"GroupV1alpha1","description":"A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Group","metadata":{"name":"infrastructure","description":"The infra business unit"},"spec":{"type":"business-unit","profile":{"displayName":"Infrastructure","email":"infrastructure@example.com","picture":"https://example.com/groups/bu-infrastructure.jpeg"},"parent":"ops","children":["backstage","other"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Group"]},"spec":{"type":"object","required":["type","children"],"properties":{"type":{"type":"string","description":"The type of group. There is currently no enforced set of values for this field, so it is left up to the adopting organization to choose a nomenclature that matches their org hierarchy.","examples":["team","business-unit","product-area","root"],"minLength":1},"profile":{"type":"object","description":"Optional profile information about the group, mainly for display purposes. All fields of this structure are also optional. The email would be a group email of some form, that the group may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the group, and that a browser could fetch and render on a group page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Infrastructure"],"minLength":1},"email":{"type":"string","description":"An email where this entity can be reached.","examples":["infrastructure@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this entity.","examples":["https://example.com/groups/bu-infrastructure.jpeg"],"minLength":1}}},"parent":{"type":"string","description":"The immediate parent group in the hierarchy, if any. Not all groups must have a parent; the catalog supports multi-root hierarchies. Groups may however not have more than one parent. This field is an entity reference.","examples":["ops"],"minLength":1},"children":{"type":"array","description":"The immediate child groups of this group in the hierarchy (whose parent field points to this group). The list must be present, but may be empty if there are no child groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["backstage","other"],"minLength":1}},"members":{"type":"array","description":"The users that are members of this group. The entries of this array are entity references.","items":{"type":"string","examples":["jdoe"],"minLength":1}}}}}}]}`);const Ot=Ve(Vt);var Kt=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 Wt=Ve(Kt),Nt="ownedBy",En="ownerOf",kt="consumesApi",Rt="apiConsumedBy",dn="providesApi",ie="apiProvidedBy",j="dependsOn",ae="dependencyOf",le="parentOf",Ee="childOf",xe="memberOf",Ue="hasMember",Ce="partOf",Ge="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=Ve(ft);var dt=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 nt=Ve(dt);var xt=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 yt=Ve(xt),ge="backstage.io/managed-by-location",S="backstage.io/managed-by-origin-location",V="backstage.io/source-location";function D(W){if(typeof W!="string")throw new TypeError(`Unable to parse location ref '${W}', unexpected argument ${typeof W}`);const F=W.indexOf(":");if(F<0)throw new TypeError(`Unable to parse location ref '${W}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ne=W.substring(0,F).trim(),ye=W.substring(F+1).trim();if(!ne||!ye)throw new TypeError(`Unable to parse location ref '${W}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ne==="http"||ne==="https")throw new TypeError(`Invalid location ref '${W}', please prefix it with 'url:', e.g. 'url:${W}'`);return{type:ne,target:ye}}function ce(W){const{type:F,target:ne}=W;if(F){if(!ne)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${F}:${ne}`}function ue(W){var ne,ye,pe,Ie,Be;const F=(Be=(ye=(ne=W.metadata)==null?void 0:ne.annotations)==null?void 0:ye[ANNOTATION_SOURCE_LOCATION])!=null?Be:(Ie=(pe=W.metadata)==null?void 0:pe.annotations)==null?void 0:Ie[ANNOTATION_LOCATION];if(!F)throw new Error(`Entity '${stringifyEntityRef(W)}' is missing location`);return D(F)}},62159:function(q,i,e){"use strict";e.d(i,{m:function(){return f}});var r=e(9850),t=e.n(r),l=e(12782),h=e.n(l);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,R=""){Q(this,"filteredKeys");Q(this,"notifiedFilteredKeys",new Set);this.data=u,this.context=A,this.fallback=b,this.prefix=R}static fromConfigs(u){return u.length===0?new f(void 0):u.reduce((A,{data:b,context:R,filteredKeys:x,deprecatedKeys:_})=>{const M=new f(b,R,A);if(M.filteredKeys=x,_)for(const{key:I,description:$}of _)console.warn(`The configuration key '${I}' of ${R} is deprecated and may be removed soon. ${$||""}`);return M},void 0)}has(u){var b,R;return this.readValue(u)!==void 0?!0:(R=(b=this.fallback)==null?void 0:b.has(u))!=null?R:!1}keys(){var b,R;const u=this.data?Object.keys(this.data):[],A=(R=(b=this.fallback)==null?void 0:b.keys())!=null?R:[];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 R;const A=t()(this.readValue(u)),b=(R=this.fallback)==null?void 0:R.getOptional(u);return A===void 0?b:b===void 0?A:h()({},{value:b},{value:A},(x,_)=>!m(_)||!m(x)?_: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 R;const A=this.readValue(u),b=(R=this.fallback)==null?void 0:R.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[R,x]of b.entries())if(!m(x))return{expected:"object-array",value:x,key:`${u}[${R}]`};return!0});if(!!A)return A.map((b,R)=>this.copy(b,`${u}[${R}]`))}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,R=>typeof R=="number"||typeof R=="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,R]of A.entries())if(typeof R!="string"||R==="")return{expected:"string-array",value:R,key:`${u}[${b}]`};return!0})}fullKey(u){return`${this.prefix}${this.prefix?".":""}${u}`}copy(u,A,b){const R=new f(u,this.context,b,this.fullKey(A));return R.filteredKeys=this.filteredKeys,R}readConfigValue(u,A){var x;const b=this.readValue(u);if(b===void 0)return(x=this.fallback)==null?void 0:x.readConfigValue(u,A);const R=A(b);if(R!==!0){const{key:_=u,value:M=b,expected:I}=R;throw new TypeError(s.type(this.fullKey(_),this.context,a(M),I))}return b}readValue(u){const A=u?u.split("."):[];for(const R of A)if(!v.test(R))throw new TypeError(`Invalid config key '${u}'`);if(this.data===void 0)return;let b=this.data;for(const[R,x]of A.entries())if(m(b))b=b[x];else if(b!==void 0){const _=this.fullKey(A.slice(0,R).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(l){}}},58652:function(q,i,e){"use strict";e.d(i,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(v){Q(this,"activeThemeId");Q(this,"subject",new r.X(void 0));this.themes=v}static createWithStorage(v){var s;const m=new l(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 l},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 l{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 l}});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 l{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,R;const y=l(f),u=((b=f.header)==null?void 0:b.name)||"authorization",A=((R=f.header)==null?void 0:R.value)||(x=>`Bearer ${x}`);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 l(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:R,pathname:x,search:_,hash:M,username:I,password:$}=new URL(`http://${A.url.substring(b.length)}`);let O=await this.discoveryApi.getBaseUrl(R);if(I||$){const J=new URL(O),ee=`${I}${$?`:${$}`:""}@`;O=`${J.protocol}//${ee}${J.host}${J.pathname}`}const w=`${v(O,x)}${_}${M}`;return f(w,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 l(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)=>l(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 l=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 l.has(a)||l.set(a,new h(a,this.errorApi)),l.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 l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{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 l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{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 l.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 l=e(6098)},19347:function(){},44474:function(q,i,e){"use strict";e.d(i,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{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 l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{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},l="https://www.googleapis.com/auth/";class h{static create(m){const{discoveryApi:a,oauthRequestApi:s,environment:f="development",provider:y=t,defaultScopes:u=["openid",`${l}userinfo.email`,`${l}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"?`${l}userinfo.${b}`:b.startsWith(l)?b:`${l}${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 l.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return v.s},OneLoginAuth:function(){return s.$}});var r=e(44474),t=e(2922),l=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 l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{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,R=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 x="";if(!R||typeof R.closed=="undefined"||R.closed){const $=new Error("Failed to open auth popup.");$.name="PopupRejectedError",f($);return}const _=$=>{if($.source!==R||$.origin!==a.origin)return;const{data:O}=$;if(O.type==="config_info"){x=O.targetOrigin;return}if(O.type!=="authorization_response")return;const w=O;if("error"in w){const J=new Error(w.error.message);J.name=w.error.name,f(J)}else s(w.response);I()},M=setInterval(()=>{if(R.closed){const $=`Login failed, ${x&&x!==window.location.origin?`Incorrect app origin, expected ${x}`:"popup was closed"}`,O=new Error($);O.name="PopupClosedError",f(O),I()}},100);function I(){window.removeEventListener("message",_),clearInterval(M)}window.addEventListener("message",_)})}function t(a){return[...a].join(" ")}class l{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:R=x=>x}=s;this.authRequester=b.createAuthRequester({provider:u,onAuthRequest:x=>this.showPopup(x)}),this.discoveryApi=f,this.environment=y,this.provider=u,this.joinScopesFunc=A,this.sessionTransform=R}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:R=M=>M}=s,x=new l({discoveryApi:f,environment:y,provider:u,oauthRequestApi:A,sessionTransform(M){return{...M,providerInfo:{idToken:M.providerInfo.idToken,accessToken:M.providerInfo.accessToken,scopes:m.normalizeScopes(R,M.providerInfo.scope),expiresAt:new Date(Date.now()+M.providerInfo.expiresInSeconds*1e3)}}}}),_=new h.RefreshingAuthSessionManager({connector:x,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:R})}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),l=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},l=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(R=>l.has(R)||R.startsWith(h)?R:`${h}${R}`)}})}}},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},l=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=>l.has(b)||b.startsWith(h)?b:`${h}${b}`)}})}}},67604:function(q,i,e){"use strict";var r=e(57018),t=e(30195);const l=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 l.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),l=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(l){l[l.default=10]="default";const h=50;l[l.app=h]="app",l[l.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),l=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:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(q,i,e){"use strict";e.d(i,{M:function(){return r}});class r{constructor(l){Q(this,"apis",new Map);this.factories=l}static validateFactories(l,h){for(const v of h){const m=[v],a=new Set;for(;m.length;){const s=m.shift(),f=l.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(l){return this.load(l)}load(l,h=[]){const v=this.apis.get(l.id);if(v)return v;const m=this.factories.get(l);if(!m)return;if(h.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const a=this.loadDeps(l,m.deps,[...h,m.api]),s=m.factory(a);return this.apis.set(l.id,s),s}loadDeps(l,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 ${l}`);m[a]=f}return m}}},76105:function(q,i,e){"use strict";e.d(i,{ApiFactoryRegistry:function(){return l.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),l=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 dn}});var r=e(2784),t=e(10289),l=e(64279),h=e(56494),v=e(36964),m=e(76105);function a(ie){const j={};for(const le in ie.collectors)ie.collectors.hasOwnProperty(le)&&(j[le]=ie.collectors[le]());const ae=[{node:r.Children.toArray(ie.root),parent:void 0,contexts:{}}];for(;ae.length!==0;){const{node:le,parent:Ee,contexts:xe}=ae.shift();r.Children.forEach(le,Ue=>{if(!(0,r.isValidElement)(Ue))return;const Ce={};for(const Ge in j)if(j.hasOwnProperty(Ge)){const ft=j[Ge];Ce[Ge]=ft.visit(ft.accumulator,Ue,Ee,xe[Ge])}for(const Ge of ie.discoverers){const ft=Ge(Ue);ft&&ae.push({node:ft,parent:Ue,contexts:Ce})}})}return Object.fromEntries(Object.entries(j).map(([le,Ee])=>[le,Ee.accumulator]))}function s(ie,j){return()=>({accumulator:ie(),visit:j})}function f(ie){var j;return(j=ie.props)==null?void 0:j.children}function y(ie){var j,ae,le;if(((j=ie.props)==null?void 0:j.path)&&((ae=ie.props)==null?void 0:ae.element))return(le=ie.props)==null?void 0:le.element}const u=s(()=>new Set,(ie,j)=>{const ae=(0,v.getComponentData)(j,"core.plugin");ae&&ie.add(ae)});var A=e(88934);const b={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},R=s(()=>({paths:new Map,parents:new Map,objects:new Array}),(ie,j,ae,le)=>{var yt,ge,S,V,D;if((ae==null?void 0:ae.props.element)===j)return le;let Ee=le==null?void 0:le.obj,xe=le==null?void 0:le.routeRef,Ue=le==null?void 0:le.sticky;const Ce=(yt=j.props)==null?void 0:yt.path,Ge=(ge=Ee==null?void 0:Ee.children)!=null?ge:ie.objects,ft=Boolean((S=j.props)==null?void 0:S.caseSensitive);let Tt=le==null?void 0:le.path;if((0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");Tt=Ce}const dt=(V=j.props)==null?void 0:V.element;let nt=(0,v.getComponentData)(j,"core.mountPoint");if(!nt&&(0,r.isValidElement)(dt)&&(nt=(0,v.getComponentData)(dt,"core.mountPoint")),nt){let ce=Ce;if(Tt&&(ce?Tt=void 0:ce=Tt),!ce)throw new Error("Mounted routable extension must have a path");ie.paths.set(nt,ce),xe&&Ue?(ie.parents.set(nt,xe),Ce&&(xe=nt,Ue=!1)):(ie.parents.set(nt,xe),xe=nt),Ce?(Ee={caseSensitive:ft,path:Ce,element:"mounted",routeRefs:new Set([nt]),children:[b],plugin:(0,v.getComponentData)(j.props.element,"core.plugin")},Ge.push(Ee)):Ee==null||Ee.routeRefs.add(nt)}if((0,v.getComponentData)(j,"core.gatherMountPoints")&&(Ue=!0),(0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");nt||(Ee={caseSensitive:ft,path:Ce,element:"gathered",routeRefs:new Set,children:[b],plugin:(D=le==null?void 0:le.obj)==null?void 0:D.plugin},Ge.push(Ee))}return{obj:Ee,path:Tt,routeRef:xe,sticky:Ue}}),x=s(()=>new Set,(ie,j)=>{if(j.type===A.L){const ae=j.props;ie.add("with"in ae?ae.with:ae.without)}});var _=e(76241);const M=(0,_.uW)("route-ref-type",()=>Symbol("route-ref-type"));function I(ie){return ie[M]==="absolute"}function $(ie){return ie[M]==="sub"}function O(ie){return ie[M]==="external"}function w(...ie){const j=ie.join("/").replace(/\/\/+/g,"/");return j!=="/"&&j.endsWith("/")?j.slice(0,-1):j}function J(ie,j,ae){let le,Ee="";if(I(ie))le=ie;else if($(ie))le=ie.parent,Ee=ie.path;else if(O(ie)){const Ce=ae.get(ie);if(!Ce)return[void 0,""];if(I(Ce))le=Ce;else if($(Ce))le=Ce.parent,Ee=Ce.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ce}`)}else throw ie[M]?new Error(`Unknown or invalid route ref type, ${ie[M]}`):new Error(`Unknown object passed to useRouteRef, got ${ie}`);if(!le)return[void 0,""];const xe=j.get(le);if(!xe)return[void 0,""];const Ue=w(xe,Ee);return[le,Ue]}function ee(ie,j,ae,le,Ee){var Tt;const xe=(Tt=(0,t.fp)(Ee,j))!=null?Tt:[],Ue=Array();let Ce=-1;for(let dt=ie;dt&&(Ce=xe.findIndex(nt=>nt.route.routeRefs.has(dt)),Ce===-1);dt=le.get(dt))Ue.unshift(dt);Ue.length===0&&(Ce-=1);const Ge=Ce===-1?"":xe[Ce].pathname,ft=w(...Ue.slice(0,-1).map(dt=>{const nt=ae.get(dt);if(!nt)throw new Error(`No path for ${dt}`);if(nt.includes(":"))throw new Error(`Cannot route to ${ie} with parent ${dt} as it has parameters`);return nt}));return Ge+ft}class Ae{constructor(j,ae,le,Ee,xe){this.routePaths=j,this.routeParents=ae,this.routeObjects=le,this.routeBindings=Ee,this.appBasePath=xe}resolve(j,ae){const[le,Ee]=J(j,this.routePaths,this.routeBindings);if(!le)return;let xe;typeof ae=="string"?xe=this.trimPath(ae):ae.pathname?xe={...ae,pathname:this.trimPath(ae.pathname)}:xe=ae;const Ue=this.appBasePath+ee(le,xe,this.routePaths,this.routeParents,this.routeObjects);return(...[Ge])=>Ue+(0,t.Gn)(Ee,Ge)}trimPath(j){return j&&(j.startsWith(this.appBasePath)?j.slice(this.appBasePath.length):j)}}const ke=(0,_.CT)("routing-context"),He=({routePaths:ie,routeParents:j,routeObjects:ae,routeBindings:le,basePath:Ee="",children:xe})=>{const Ue=new Ae(ie,j,ae,le,Ee),Ce=(0,_.EI)({1:Ue});return r.createElement(ke.Provider,{value:Ce},xe)},se=(ie,j)=>{var ae,le;try{const Ee=(0,t.fp)(j,{pathname:ie}),xe=(ae=Ee==null?void 0:Ee.filter(Ce=>{var Ge;return((Ge=Ce==null?void 0:Ce.route.routeRefs)==null?void 0:Ge.size)>0}).pop())==null?void 0:ae.route;if(!xe)return{};let Ue;return xe.routeRefs.size===1&&(Ue=xe.routeRefs.values().next().value),{extension:"App",pluginId:((le=xe.plugin)==null?void 0:le.getId())||"root",...Ue?{routeRef:Ue.id}:{}}}catch{return{}}},ve=({pathname:ie,search:j,hash:ae})=>{const le=(0,v.useAnalytics)();return(0,r.useEffect)(()=>{le.captureEvent("navigate",`${ie}${j}${ae}`)},[le,ie,j,ae]),null},Le=({routeObjects:ie})=>{const{pathname:j,search:ae,hash:le}=(0,t.TH)();return r.createElement(v.AnalyticsContext,{attributes:se(j,ie)},r.createElement(ve,{pathname:j,search:ae,hash:le}))};function je(ie,j){const ae=new Set(j.values());ae.delete(void 0);for(const le of j.keys()){if(ae.has(le))continue;let Ee=le,xe="";for(;Ee;){const Ce=ie.get(Ee);if(!Ce)throw new Error(`No path for ${Ee}`);xe=`${Ce}${xe}`,Ee=j.get(Ee)}const Ue=xe.match(/:(\w+)/g);if(Ue){for(let Ce=0;Ce<Ue.length;Ce++)for(let Ge=Ce+1;Ge<Ue.length;Ge++)if(Ue[Ge]===Ue[Ce])throw new Error(`Parameter ${Ue[Ge]} is duplicated in path ${xe}`)}}}function Xe(ie,j){for(const ae of j)if(!!ae.externalRoutes){for(const[le,Ee]of Object.entries(ae.externalRoutes))if(!Ee.optional&&!ie.has(Ee))throw new Error(`External route '${le}' of the '${ae.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const at=(0,_.CT)("app-context"),tt=({appContext:ie,children:j})=>{const ae=(0,_.EI)({1:ie});return r.createElement(at.Provider,{value:ae,children:j})};function Te(ie){return new Error(`Tried to access IdentityApi ${ie} before app was loaded`)}function Ze(ie){console.warn(`WARNING: Call to ${ie} is deprecated and will break in the future`)}class Ve{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 Te("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ze("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Te("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ze("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 Ze("getIdToken"),j.getIdToken()})}async signOut(){await this.waitForTarget.then(j=>j.signOut()),location.reload()}}var Ye=e(72164);function gt(ie,j,ae){if(ie!==void 0){const Ee=ae.find(xe=>xe.id===ie);if(Ee)return Ee}if(j){const Ee=ae.find(xe=>xe.variant==="dark");if(Ee)return Ee}const le=ae.find(Ee=>Ee.variant==="light");return le||ae[0]}const wt=()=>{const ie=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[j,ae]=(0,r.useState)(ie.matches);return(0,r.useEffect)(()=>{const le=Ee=>{ae(Ee.matches)};return ie.addListener(le),()=>{ie.removeListener(le)}},[ie]),j};function pt({children:ie}){const j=(0,v.useApi)(v.appThemeApiRef),ae=(0,Ye.Z)(j.activeThemeId$(),j.getActiveThemeId()),le=Boolean(window.matchMedia)?wt():!1,Ee=gt(ae,le,j.getInstalledThemes());if(!Ee)throw new Error("App has no themes");return r.createElement(Ee.Provider,{children:ie})}var Ut=e(46611);class Vt{constructor(){Q(this,"apis",[])}add(j,ae){return this.apis.push([j.id,ae]),ae}build(){return new Ot(new Map(this.apis))}}class Ot{static builder(){return new Vt}static from(j){return new Ot(new Map(j.map(([ae,le])=>[ae.id,le])))}static with(j,ae){return new Ot(new Map([[j.id,ae]]))}constructor(j){this.apis=j}with(j,ae){return new Ot(new Map([...this.apis,[j.id,ae]]))}get(j){return this.apis.get(j.id)}}function Kt(ie){const j=new Map;return ie&&ie({bind:(le,Ee)=>{for(const[xe,Ue]of Object.entries(Ee)){const Ce=le[xe];if(!Ce)throw new Error(`Key ${xe} is not an existing external route`);if(!Ue&&!Ce.optional)throw new Error(`External route ${xe} is required but was undefined`);Ue&&j.set(Ce,Ue)}}}),j}const Wt=(0,r.createContext)({routeObjects:[]});function Nt(ie){var ae;let{pathname:j}=new URL((ae=ie.getOptionalString("app.baseUrl"))!=null?ae:"/","http://dummy.dev");return j=j.replace(/\/*$/,""),j}function En(ie,j,ae){var Ge;const le=Boolean(ie),Ee=(0,l.default)(ie||(()=>Promise.resolve([])));let xe;if(le&&Ee.loading){const{Progress:ft}=j;xe=r.createElement(ft,null)}else if(Ee.error){const{BootErrorPage:ft}=j;xe=r.createElement(ft,{step:"load-config",error:Ee.error})}const{ThemeProvider:Ue=pt}=j;return xe?{node:r.createElement(h.ApiProvider,{apis:Ot.with(v.appThemeApiRef,ae)},r.createElement(Ue,null,xe))}:{api:h.ConfigReader.fromConfigs((Ge=Ee.value)!=null?Ge:[])}}class kt{constructor(j){this.app=j}getPlugins(){return this.app.getPlugins()}getSystemIcon(j){return this.app.getSystemIcon(j)}getComponents(){return this.app.getComponents()}}class Rt{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 Ve);Q(this,"apiFactoryRegistry");var ae,le,Ee,xe;this.apis=(ae=j.apis)!=null?ae:[],this.icons=j.icons,this.plugins=new Set((le=j.plugins)!=null?le:[]),this.components=j.components,this.themes=j.themes,this.configLoader=(Ee=j.configLoader)!=null?Ee:Ut.t,this.defaultApis=(xe=j.defaultApis)!=null?xe:[],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 kt(this);let ae=!1;return({children:Ee})=>{const xe=(0,r.useMemo)(()=>h.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Ue,featureFlags:Ce,routeBindings:Ge}=(0,r.useMemo)(()=>{const nt=a({root:Ee,discoverers:[f,y],collectors:{routing:R,collectedPlugins:u,featureFlags:x}});return nt.collectedPlugins.forEach(xt=>this.plugins.add(xt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...nt,routeBindings:Kt(this.bindRoutes)}},[Ee]);ae||(ae=!0,je(Ue.paths,Ue.parents),Xe(Ge,this.plugins));const ft=En(this.configLoader,this.components,xe),Tt="api"in ft;if(Tt){const{api:nt}=ft;this.configApi=nt}if((0,r.useEffect)(()=>{if(Tt){const nt=this.getApiHolder().get(v.featureFlagsApiRef);for(const xt of this.plugins.values())if("getFeatureFlags"in xt)for(const yt of xt.getFeatureFlags())nt.registerFlag({name:yt.name,pluginId:xt.getId()});else for(const yt of xt.output())yt.type==="feature-flag"&&nt.registerFlag({name:yt.name,pluginId:xt.getId()});for(const xt of Ce)nt.registerFlag({name:xt,pluginId:""})}},[Tt,ft,Ce]),"node"in ft)return ft.node;const{ThemeProvider:dt=pt}=this.components;return r.createElement(h.ApiProvider,{apis:this.getApiHolder()},r.createElement(tt,{appContext:j},r.createElement(dt,null,r.createElement(He,{routePaths:Ue.paths,routeParents:Ue.parents,routeObjects:Ue.objects,routeBindings:Ge,basePath:Nt(ft.api)},r.createElement(Wt.Provider,{value:{routeObjects:Ue.objects}},Ee)))))}}getRouter(){const{Router:j,SignInPage:ae}=this.components,le=({component:xe,children:Ue})=>{const[Ce,Ge]=(0,r.useState)();return Ce?(this.appIdentityProxy.setTarget(Ce),Ue):r.createElement(xe,{onSignInSuccess:Ge})};return({children:xe})=>{const Ue=(0,v.useApi)(v.configApiRef),Ce=`${Nt(Ue)}/*`,{routeObjects:Ge}=(0,r.useContext)(Wt);return ae?r.createElement(j,null,r.createElement(Le,{routeObjects:Ge}),r.createElement(le,{component:ae},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ce,element:r.createElement(r.Fragment,null,xe)})))):(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(Le,{routeObjects:Ge}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ce,element:r.createElement(r.Fragment,null,xe)}))))}}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 le of j){const Ee=le.getId();if(ae.has(Ee))throw new Error(`Duplicate plugin found '${Ee}'`);ae.add(Ee)}}}function dn(ie){return new Rt(ie)}},46611:function(q,i,e){"use strict";e.d(i,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const h=l.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),l=e(73495),h=e.n(l);e.o(l,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(i,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(i,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return l.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 l.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 l=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 l=e(98005),h=e(36964);class v{constructor(){Q(this,"subject",new l.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 l},X:function(){return h}});var r=e(82394),t=e.n(r);class l{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 l}});var r=e(36964),t=e(2784);const l=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)(l,"core.featureFlagged",!0)},63938:function(q,i,e){"use strict";e.d(i,{w:function(){return h}});var r=e(2784),t=e(10289),l=e(36964);const h=m=>{const a=(0,l.useApp)(),{NotFoundErrorPage:s}=a.getComponents(),f=(0,l.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 se},Content:function(){return Wo},ContentHeader:function(){return qi},CreateButton:function(){return je},DependencyGraph:function(){return nt},DependencyGraphTypes:function(){return r},EmptyState:function(){return Ie},ErrorPage:function(){return rs},ErrorPanel:function(){return rn},Header:function(){return Qo},HeaderIconLinkRow:function(){return gr},HeaderLabel:function(){return ms},HeaderTabs:function(){return Ho},InfoCard:function(){return ht},ItemCardGrid:function(){return As},ItemCardHeader:function(){return ys},Link:function(){return x},LogViewer:function(){return Or},MissingAnnotationEmptyState:function(){return mt},OverflowTooltip:function(){return Br},Page:function(){return qo},PageWithHeader:function(){return Cs},Progress:function(){return lr},ResponseErrorPanel:function(){return Yn},RoutedTabs:function(){return jo},Select:function(){return et},Sidebar:function(){return ka},SidebarContext:function(){return zr},SidebarDivider:function(){return li},SidebarItem:function(){return Zo},SidebarPage:function(){return wa},SidebarPinStateContext:function(){return Sr},SubvalueCell:function(){return Si},SupportButton:function(){return xa},Table:function(){return ji},WarningPanel:function(){return an},sidebarConfig:function(){return Kn}});var r={};e.r(r),e.d(r,{Nm:function(){return Xe},ht:function(){return Te},LJ:function(){return tt}});var t=e(2784),l=e(36964),h=e(19928);function v(n){const[o,c]=useState([]),d=useApi(alertApiRef);if(useEffect(()=>{const L=d.alert$().subscribe(N=>c(K=>K.concat(N)));return()=>{L.unsubscribe()}},[d]),o.length===0)return null;const[p]=o,E=()=>{c(L=>L.filter(N=>N!==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:c,customStyles:d}=n,p=s();return React.createElement(MaterialAvatar,{alt:o,src:c,className:p.avatar,style:{backgroundColor:stringToColor(o||c||""),...d}},o&&extractInitials(o))}var y=e(77277),u=e(86689),A=e(62833);const b=n=>/^([a-z+.-]+):/.test(n),R=n=>{var o;return n instanceof Array?n.map(R).join(" ").trim():typeof n=="object"&&n?R((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},x=t.forwardRef(({onClick:n,noTrack:o,...c},d)=>{const p=(0,l.useAnalytics)(),E=String(c.to),L=R(c.children)||E,N=b(E),K=N&&!!/^https?:/.exec(E),H=oe=>{n==null||n(oe),o||p.captureEvent("click",L,{attributes:{to:E}})};return N?t.createElement(u.Z,{ref:d,href:E,onClick:H,...K?{target:"_blank",rel:"noopener"}:{},...c}):t.createElement(u.Z,{ref:d,component:A.rU,onClick:H,...c})}),_=t.forwardRef((n,o)=>t.createElement(x,{ref:o,...n,color:"initial"})),M=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:_,...n}));var I=e(60364),$=e(61837),O=e(80030),w=e(19353),J=e(95074);function ee(n){const{text:o,tooltipDelay:c=1e3,tooltipText:d="Text copied to clipboard"}=n,p=(0,l.useApi)(l.errorApiRef),[E,L]=(0,t.useState)(!1),[{error:N},K]=(0,J.Z)();(0,t.useEffect)(()=>{N&&p.post(N)},[N,p]);const H=oe=>{oe.stopPropagation(),L(!0),K(o)};return t.createElement(t.Fragment,null,t.createElement(O.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:c,onClose:()=>L(!1),open:E},t.createElement($.Z,{onClick:H},t.createElement(w.Z,null))))}var Ae=e(55768),ke=e(26639),He=e(39595);function se(n){const{text:o,language:c,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:E,showCopyCodeButton:L=!1}=n,N=(0,I.Z)(),K=N.palette.type==="dark"?ke.Z:He.Z,H=N.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Ae.Z,{customStyle:E,language:c,style:K,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:N.palette.textVerySubtle},lineProps:oe=>p!=null&&p.includes(oe)?{style:{backgroundColor:H}}:{}},o),L&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ee,{text:o})))}var ve=e(41156),Le=e(88188);function je(n){const{title:o,to:c}=n,d=(0,ve.Z)(p=>p.breakpoints.down("xs"));return c?d?t.createElement($.Z,{component:A.rU,color:"primary",title:o,size:"small",to:c},t.createElement(Le.Z,null)):t.createElement(y.Z,{component:A.rU,variant:"contained",color:"primary",to:c},o):null}var Xe;(function(n){const o="TB";n.TOP_BOTTOM=o;const c="BT";n.BOTTOM_TOP=c;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(Xe||(Xe={}));var at;(function(n){const o="UL";n.UP_LEFT=o;const c="UR";n.UP_RIGHT=c;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(at||(at={}));var tt;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const c="tight-tree";n.TIGHT_TREE=c;const d="longest-path";n.LONGEST_PATH=d})(tt||(tt={}));var Te;(function(n){const o="l";n.LEFT=o;const c="r";n.RIGHT=c;const d="c";n.CENTER=d})(Te||(Te={}));var Ze=e(13387),Ve=e(11105),Ye=e(97963),gt=e(46506),wt=e.n(gt),pt=e(54073),Ut=e.n(pt),Vt=e(10368);const Ot=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Kt({node:{id:n}}){const o=Ot(),[c,d]=t.useState(0),[p,E]=t.useState(0),L=t.useRef(null);t.useLayoutEffect(()=>{if(L.current){let{height:oe,width:te}=L.current.getBBox();oe=Math.round(oe),te=Math.round(te),(oe!==p||te!==c)&&(d(te),E(oe))}},[c,p]);const N=10,K=c+N*2,H=p+N*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:K,height:H,rx:10}),t.createElement("text",{ref:L,className:o.text,y:H/2,x:K/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const Wt="arrow-marker",Nt="node",En="edge",kt="label",Rt=(0,Vt.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),dn=n=>t.createElement(Kt,{...n});function ie({render:n=dn,setNode:o,node:c}){const{width:d,height:p,x:E=0,y:L=0}=c,N=c,K=Rt(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:oe,width:te}=H.current.getBBox();oe=Math.round(oe),te=Math.round(te),(oe!==p||te!==d)&&o(c.id,{...c,height:oe,width:te})}},[c,d,p,o]),t.createElement("g",{ref:H,"data-testid":Nt,className:K.node,transform:`translate(${E-d/2},${L-p/2})`},n({node:N}))}var j=e(40408),ae=e(49810),le=e(19574),Ee=e.n(le);const xe=(0,Vt.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Ue({edge:{label:n}}){const o=xe();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Ce=(0,Vt.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"}),Ge=n=>t.createElement(Ue,{...n}),ft=j.Z().x(n=>n.x).y(n=>n.y).curve(ae.Z);function Tt({render:n=Ge,setEdge:o,id:c,edge:d}){const{x:p=0,y:E=0,width:L,height:N,points:K}=d,H=d,oe=Ce(),te=t.useRef(null);t.useLayoutEffect(()=>{if(te.current){let{height:Re,width:be}=te.current.getBBox();Re=Math.round(Re),be=Math.round(be),(Re!==N||be!==L)&&o(c,{...d,height:Re,width:be})}},[d,N,L,o,c]);let Se="";if(K){const Re=K.filter(be=>Ee()(be.x)&&Ee()(be.y));Se=ft(Re)||""}return t.createElement(t.Fragment,null,Se&&t.createElement("path",{"data-testid":En,className:oe.path,markerEnd:`url(#${Wt})`,d:Se}),H.label?t.createElement("g",{ref:te,"data-testid":kt,className:oe.label,transform:`translate(${p},${E})`},n({edge:H})):null)}const dt="workspace";function nt(n){var Tr,aa;const{edges:o,nodes:c,renderNode:d,direction:p=Xe.TOP_BOTTOM,align:E,nodeMargin:L=50,edgeMargin:N=10,rankMargin:K=50,paddingX:H=0,paddingY:oe=0,acyclicer:te,ranker:Se=tt.NETWORK_SIMPLEX,labelPosition:Re=Te.RIGHT,labelOffset:be=10,edgeRanks:it=1,edgeWeight:It=1,renderLabel:Yt,defs:en,zoom:ot="enabled",...Lt}=n,Bt=(0,Ye.Z)(),[on,tr]=t.useState(100),[Fn,Hr]=t.useState(100),Ct=t.useRef(new(wt()).graphlib.Graph),[nr,fo]=t.useState(((Tr=Ct.current.graph())==null?void 0:Tr.width)||0),[fr,mo]=t.useState(((aa=Ct.current.graph())==null?void 0:aa.height)||0),[qr,_r]=t.useState([]),[ho,ln]=t.useState([]),Tn=Math.max(nr,on),Bn=Math.max(fr,Fn),mr=t.useMemo(()=>Ut()(qt=>{if(!qt)return;const un=Ve.Z(qt),Jt=Ve.Z(qt.getElementById(dt));function Nn(){un.call(Ze.sP().scaleExtent([1,10]).on("zoom",kn=>{kn.transform.x=Math.min(0,Math.max(kn.transform.x,Tn-Tn*kn.transform.k)),kn.transform.y=Math.min(0,Math.max(kn.transform.y,Bn-Bn*kn.transform.k)),Jt.attr("transform",kn.transform)}))}ot==="enabled"?Nn():ot==="enable-on-click"&&un.on("click",()=>Nn());const{width:Zn,height:eo}=qt.getBoundingClientRect();on!==Zn&&tr(Zn),Fn!==eo&&Hr(eo)},100),[Fn,on,Tn,Bn,ot]),tn=t.useCallback(()=>{const qt=Ct.current.nodes(),un=Ct.current.edges();qt.forEach(Jt=>{c.some(Zn=>Zn.id===Jt)||Ct.current.removeNode(Jt)}),un.forEach(Jt=>{o.some(Zn=>Zn.from===Jt.v&&Zn.to===Jt.w)||Ct.current.removeEdge(Jt.v,Jt.w)}),c.forEach(Jt=>{const Nn=Ct.current.nodes().find(Zn=>Jt.id===Zn);if(Nn&&Ct.current.node(Nn)){const{width:Zn,height:eo,x:kn,y:zs}=Ct.current.node(Nn);Ct.current.setNode(Nn,{...Jt,width:Zn,height:eo,x:kn,y:zs})}else Ct.current.setNode(Jt.id,{...Jt,width:0,height:0})}),o.forEach(Jt=>{Ct.current.setEdge(Jt.from,Jt.to,{...Jt,label:Jt.label,width:0,height:0,labelpos:Re,labeloffset:be,weight:It,minlen:it})})},[o,c,Re,be,It,it]),nn=t.useMemo(()=>Ut()(()=>{wt().layout(Ct.current);const{height:qt,width:un}=Ct.current.graph(),Jt=Math.max(0,qt||0),Nn=Math.max(0,un||0);fo(Nn),mo(Jt),_r(Ct.current.nodes()),ln(Ct.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Ct.current.setGraph({rankdir:p,align:E,nodesep:L,edgesep:N,ranksep:K,marginx:H,marginy:oe,acyclicer:te,ranker:Se}),tn(),nn(),nn.cancel),[te,E,p,N,H,oe,L,K,Se,tn,nn]);function Cr(qt,un){return Ct.current.setNode(qt,un),nn(),Ct.current}function hr(qt,un){return Ct.current.setEdge(qt,un),nn(),Ct.current}return t.createElement("svg",{ref:mr,...Lt,width:"100%",height:Bn,viewBox:`0 0 ${Tn} ${Bn}`},t.createElement("defs",null,t.createElement("marker",{id:Wt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Bt.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),en),t.createElement("g",{id:dt},t.createElement("svg",{width:nr,height:fr,y:Bn/2-fr/2,x:Tn/2-nr/2,viewBox:`0 0 ${nr} ${fr}`},ho.map(qt=>{const un=Ct.current.edge(qt);return un?t.createElement(Tt,{key:`${qt.v}-${qt.w}`,id:qt,setEdge:hr,render:Yt,edge:un}):null}),qr.map(qt=>{const un=Ct.current.node(qt);return un?t.createElement(ie,{key:qt,setNode:Cr,render:d,node:un}):null}))))}var xt=e(72779),yt=e.n(xt);const ge=(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"}),S=n=>{var Re;const{variant:o,message:c,id:d,fixed:p=!1}=n,E=ge(),N=useApi(storageApiRef).forBucket("notifications"),K=(Re=N.snapshot("dismissedBanners").value)!=null?Re:[],[H,oe]=useState(new Set(K)),te=useObservable(N.observe$("dismissedBanners"));useEffect(()=>{var be;if(te!=null&&te.value){const it=(be=te==null?void 0:te.value)!=null?be:[];oe(new Set(it))}},[te==null?void 0:te.value]);const Se=()=>{N.set("dismissedBanners",[...H,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(d),classes:{root:classNames(E.root,!p&&E.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(E.content,E[o]),message:E.message},message:c,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Se},React.createElement(Close,{className:E.icon}))]}))};var V=e(60905),D=e(90436),ce=e(86284),ue=e(96465),W=e(19133),F=e(3871);const ne=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),ye=({missing:n})=>{const o=ne();switch(n){case"field":return t.createElement("img",{src:ce,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:ue,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:W,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 Ie(n){const{title:o,description:c,missing:d,action:p}=n,E=pe();return t.createElement(V.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:E.root,spacing:2},t.createElement(V.Z,{item:!0,xs:12,md:6},t.createElement(V.Z,{container:!0,direction:"column"},t.createElement(V.Z,{item:!0,xs:!0},t.createElement(D.Z,{variant:"h5"},o)),t.createElement(V.Z,{item:!0,xs:!0},t.createElement(D.Z,{variant:"body1"},c)),t.createElement(V.Z,{item:!0,xs:!0,className:E.action},p))),t.createElement(V.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(ye,{missing:d})))}const Be=`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`,Ne=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function mt(n){const{annotation:o}=n,c=Ne(),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(Ie,{missing:"field",title:"Missing Annotation",description:d,action:t.createElement(t.Fragment,null,t.createElement(D.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:c.code},t.createElement(se,{text:Be.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:x,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var bt=e(11776),st=e(38402),ut=e(49378),Mt=e(41128),Qe=e(27616),vt=e(8284),ct=e(70660),Gt=e(91750),rt=e(38016);const Je=(n,o)=>(o.palette.type==="light"?Mt._j:Mt.$n)(o.palette[n].light,.6),Ht=(n,o)=>(o.palette.type==="light"?Mt.$n:Mt._j)(o.palette[n].light,.9),Dt=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>Je(o,n)}})),Pt=({severity:n})=>{const o=Dt({severity:n});return t.createElement(Gt.Z,{classes:o})},$t=({severity:n})=>{const o=Dt({severity:n});return t.createElement(rt.Z,{classes:o})},Qt=(0,m.Z)(n=>({panel:{backgroundColor:({severity:o})=>Ht(o,n),color:({severity:o})=>Je(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>Je(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>Je(o,n),backgroundColor:({severity:o})=>Ht(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"}),Xt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function an(n){const{severity:o="warning",title:c,message:d,children:p,defaultExpanded:E}=n,L=Qt({severity:o}),N=Xt(o)+(c?`: ${c}`:"");return t.createElement(Qe.Z,{defaultExpanded:E!=null?E:!1,className:L.panel,role:"alert"},t.createElement(vt.Z,{expandIcon:t.createElement($t,{severity:o}),className:L.summary},t.createElement(Pt,{severity:o}),t.createElement(D.Z,{className:L.summaryText,variant:"subtitle1"},N)),(d||p)&&t.createElement(ct.Z,null,t.createElement(V.Z,{container:!0},d&&t.createElement(V.Z,{item:!0,xs:12},t.createElement(D.Z,{className:L.message,variant:"body1"},d)),p&&t.createElement(V.Z,{item:!0,xs:12,className:L.details},p))))}const Mn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),fn=({error:n,message:o,stack:c,children:d})=>{const p=Mn();return t.createElement(bt.Z,{dense:!0},t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(ee,{text:n})),t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Message",secondary:o}),t.createElement(ee,{text:o})),c&&t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:c}),t.createElement(ee,{text:c})),d)};function rn(n){const{title:o,error:c,defaultExpanded:d,children:p}=n;return t.createElement(an,{severity:"error",title:o!=null?o:c.message,defaultExpanded:d},t.createElement(fn,{error:c.name,message:c.message,stack:c.stack,children:p}))}var $n=e(85256);const jn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function Yn(n){var be;const{title:o,error:c,defaultExpanded:d}=n,p=jn();if(c.name!=="ResponseError")return t.createElement(rn,{title:o!=null?o:c.message,defaultExpanded:d,error:c});const{body:E,cause:L}=c,{request:N,response:K}=E,H=`${K.statusCode}: ${L.name}`,oe=N&&`${N.method} ${N.url}`,te=L.message.replace(/\\n/g,`
|
|
12
|
+
`),Se=(be=L.stack)==null?void 0:be.replace(/\\n/g,`
|
|
13
|
+
`),Re=JSON.stringify(E,void 0,2);return t.createElement(rn,{title:o!=null?o:c.message,defaultExpanded:d,error:{name:H,message:te,stack:Se}},oe&&t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Request",secondary:N?`${oe}`:void 0}),t.createElement(ee,{text:oe})),t.createElement(t.Fragment,null,t.createElement($n.Z,{component:"li",className:p.divider}),t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(ut.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(se,{language:"json",text:Re,showCopyCodeButton:!0})))}var Jn=e(47093);function Qn(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function U(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function g(n){const o=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),E=p||Qn(n);return p||U(E),E.appendChild(o.current),function(){o.current.remove(),E.childNodes.length===-1&&E.remove()}},[n]);function c(){return o.current||(o.current=document.createElement("div")),o.current}return c()}var T=null;const B="core.calloutSeen";function k(){const[n,o]=useState(()=>{const d=localStorage.getItem(B);return d?JSON.parse(d):{}}),c=useCallback((d,p)=>{const E=localStorage.getItem(B),N={...E?JSON.parse(E):{},[d]:p};o(N),localStorage.setItem(B,JSON.stringify(N))},[]);return{states:n,setState:c}}function fe(n){const{states:o,setState:c}=k(),d=useCallback(()=>{c(n,!0)},[c,n]);return{seen:o[n]===!0,markSeen:d}}function me(n){const{seen:o,markSeen:c}=fe(n);return{show:o===!1,hide:c}}const De=(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 ze(n){const{featureId:o,title:c,description:d,children:p}=n,{show:E,hide:L}=useShowCallout(o),N=usePortal("core.callout"),K=useRef(null),[H,oe]=useState(),te=De(),Se=useCallback(()=>{if(K.current){const Re=K.current.getBoundingClientRect(),be=Math.max(Re.width,Re.height),it=800,It=Re.x-(be-Re.width)/2-it,Yt=Re.y-(be-Re.height)/2-it,en=be+2*it,ot=450,Lt=Re.x+Re.width/2-ot,Bt=Re.y-(be-Re.height)/2+be+20;oe({dotLeft:It,dotTop:Yt,dotSize:en,borderWidth:it,textTop:Bt,textLeft:Lt,textWidth:ot})}},[]);return useEffect(()=>(window.addEventListener("resize",Se),window.addEventListener("scroll",Se),()=>{window.removeEventListener("resize",Se),window.removeEventListener("scroll",Se)}),[Se]),useLayoutEffect(Se,[K.current,Se]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:te.featureWrapper,ref:K},p),createPortal(React.createElement("div",{className:te.backdrop},React.createElement(ClickAwayListener,{onClickAway:L},React.createElement(React.Fragment,null,React.createElement("div",{className:te.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:L,onKeyDown:L,role:"button",tabIndex:0},React.createElement("div",{className:te.pulseCircle})),React.createElement("div",{className:te.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},c),React.createElement(Typography,null,d))))),N)):React.createElement(React.Fragment,null,p)}var Zt=e(35292);const mn=(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 zn({color:n="primary",disabled:o=!1,href:c="#",icon:d=t.createElement(Zt.Z,null),label:p,onClick:E,title:L}){const N=mn();return o?t.createElement(u.Z,{title:L,className:yt()(N.link,N.disabled),underline:"none"},d,t.createElement("span",{className:N.label},p)):t.createElement(u.Z,{title:L,className:yt()(N.link,N[n]),to:c,component:x,onClick:E},d,t.createElement("span",{className:N.label},p))}const br=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function gr(n){const{links:o}=n,c=br();return t.createElement("nav",{className:c.links},o.map((d,p)=>t.createElement(zn,{key:p+1,...d})))}const pr=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
|
+
`},rr=100,or=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:rr,height:`calc(100% + ${or}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-or,background:`linear-gradient(90deg, ${pr(n.palette.type)})`},fadeRight:{right:-or,background:`linear-gradient(270deg, ${pr(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,c],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const E=()=>{const L=p.scrollLeft,N=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([L,N])};return E(),p.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{p.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,c]}function Lr(n,o,c){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const E=performance.now(),L=requestAnimationFrame(N=>{if(!n.current)return;const K=N-E,H=Math.abs(d)*K/o,te=Math.max(c,H)*Math.sign(d);n.current.scrollBy({left:te});const Se=d-te;Math.sign(d)!==Math.sign(Se)?p(0):p(Se)});return()=>cancelAnimationFrame(L)},[n,d,o,c]),p}function Wn(n){const{scrollStep:o=100,scrollSpeed:c=50,minScrollDistance:d=5,children:p,...E}=n,L=Pr(n),N=React.useRef(),[K,H]=Ir(N),oe=Lr(N,c,d),te=Se=>{!N.current||oe(Se?o:-o)};return React.createElement("div",{...E,className:L.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:L.container,ref:N},p),React.createElement("div",{className:classNames(L.fade,L.fadeLeft,{[L.fadeHidden]:K===0})}),React.createElement("div",{className:classNames(L.fade,L.fadeRight,{[L.fadeHidden]:H===0})}),K>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>te(!1),className:classNames(L.button,L.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>te(!0),className:classNames(L.button,L.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const vn=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function Xn(n){const o=vn(n),{shorthand:c,alpha:d}=n;return c?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 qn=(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,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(qn,{...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"}),ar={code:({inline:n,className:o,children:c,...d})=>{const p=String(c).replace(/\n+$/,""),E=/language-(\w+)/.exec(o||"");return!n&&E?t.createElement(se,{language:E[1],text:p}):t.createElement("code",{className:o,...d},c)}};function to(n){const{content:o,dialect:c="gfm",linkTarget:d}=n,p=xr();return React.createElement(ReactMarkdown,{remarkPlugins:c==="gfm"?[gfm]:[],className:p.markdown,children:o,components:ar,linkTarget:d})}var Dr=e(10179);const ir=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),Pn=({request:n,busy:o,setBusy:c})=>{const d=ir(),[p,E]=useState(),L=async()=>{c(!0);try{await n.trigger()}catch(K){E(isError(K)?K.message:"An unspecified error occurred")}finally{c(!1)}},N=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:o,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(N,{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:L},"Log in"))};var sr=null;const _n=(0,m.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function yr(n){const o=_n(),[c,d]=useState(!1),p=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),L=()=>{E.forEach(N=>N.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(N=>React.createElement(LoginRequestListItem,{key:N.provider.title,request:N,busy:c,setBusy:d})))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:L},"Reject All")))}var Er=e(15277),Fr=e.n(Er),In=e(29862);const cr=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Br(n){var L;const[o,c]=(0,t.useState)(!1),d=(0,In.t)(),p=cr(),E=N=>{d()&&c(N)};return t.createElement(O.ZP,{title:(L=n.title)!=null?L: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 lr(n){const[o,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>c(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(wr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Mr=e(94339),vr=e(14503),$r=e(24579),Ar=e(32552),sn=e(15459),Ln=e(95544),z=e(27597);const re=(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 de(n){const{link:o,title:c,onClick:d}=n,p=re();return t.createElement("div",null,t.createElement($n.Z,null),t.createElement(x,{to:o,onClick:d,underline:"none"},t.createElement(Ln.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(Ln.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(D.Z,null,t.createElement("strong",null,c))),t.createElement(z.Z,{className:p.arrow}))))}const we=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)},_e=class extends t.Component{constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,c){console.error(`ErrorBoundary, error: ${o}, info: ${c}`),this.setState({error:o,errorInfo:c})}render(){const{slackChannel:o,children:c}=this.props,{error:d}=this.state;return d?t.createElement(rn,{title:"Something Went Wrong",error:d},t.createElement(we,{slackChannel:o})):c}},At=(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"}),Et=(0,sn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(vr.Z),lt={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 ht(n){const{title:o,subheader:c,divider:d=!0,deepLink:p,slackChannel:E,errorBoundaryProps:L,variant:N,children:K,headerStyle:H,headerProps:oe,icon:te,action:Se,actionsClassName:Re,actions:be,cardClassName:it,actionsTopRight:It,className:Yt,noPadding:en,titleTypographyProps:ot}=n,Lt=At();let Bt={},on={};N&&N.split(/[\s]+/g).forEach(Ct=>{Bt={...Bt,...lt.card[Ct]},on={...on,...lt.cardContent[Ct]}});const tr=()=>t.createElement("div",{className:Lt.headerSubheader},c&&t.createElement("div",{className:Lt.subheader},c),te),Fn=L||(E?{slackChannel:E}:{});return t.createElement(Mr.Z,{style:Bt,className:Yt},t.createElement(_e,{...Fn},o&&t.createElement(Ar.Z,{classes:{root:Lt.header,title:Lt.headerTitle,subheader:Lt.headerSubheader,avatar:Lt.headerAvatar,action:Lt.headerAction,content:Lt.headerContent},title:o,subheader:tr(),action:Se,style:{...H},titleTypographyProps:ot,...oe}),It&&t.createElement(Et,null,It),d&&t.createElement($n.Z,null),t.createElement($r.Z,{className:yt()(it,{[Lt.noPadding]:en}),style:on},K),be&&t.createElement(vr.Z,{className:Re},be),p&&t.createElement(de,{...p})))}var Ft=e(39307);const jt=(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"}),gn={fractional:!0,inverse:!1,unit:"%",max:100},hn=({palette:n,value:o,inverse:c,max:d})=>{if(isNaN(o))return"#ddd";const p=d||gn.max,E=c?p-o:o;return E<p/3?n.status.error:E<p*(2/3)?n.status.warning:n.status.ok};function ur(n){const[o,c]=useState(null),{getColor:d=hn}=n,p=jt(n),{palette:E}=useTheme(),{value:L,fractional:N,inverse:K,unit:H,max:oe,description:te}={...gn,...n},Se=N?Math.round(L*oe):L,Re=oe!==100?Math.round(L):Se,[be,it]=useState(!1);return useEffect(()=>{const It=o,Yt=()=>it(!0),en=()=>it(!1);return It&&te?(It.addEventListener("mouseenter",Yt),It.addEventListener("mouseleave",en),()=>{It.removeEventListener("mouseenter",Yt),It.removeEventListener("mouseleave",en)}):()=>{it(!1)}},[te,o]),React.createElement("div",{ref:c,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Se,strokeWidth:12,trailWidth:12,strokeColor:d({palette:E,value:Re,inverse:K,max:oe}),className:p.circle}),te&&be?React.createElement("div",{className:p.description},te):React.createElement("div",{className:p.overlay},isNaN(L)?"N/A":`${Re}${H}`))}const On=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function dr(n){const o=On(n),{title:c,subheader:d,progress:p,inverse:E,deepLink:L,description:N,icon:K,variant:H,getColor:oe}=n,te={inverse:E,description:N,getColor:oe,value:p};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:c,subheader:d,deepLink:L,variant:H,icon:K},React.createElement(Gauge,{...te})))}function jr(n){const{value:o,getColor:c=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let p=Math.round(o*100*100)/100;p>100&&(p=100);const E=c({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 er=e(21324),Vr=e(7089),C=e(1292),P=e(42494),Z=e(74603),G=e(12231),X=e(73698),Y=e(72379);const he=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var $e=()=>{const n=he();return t.createElement(Y.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 Me=()=>{const n=Oe();return t.createElement(Y.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 Ke=(0,sn.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"})(Z.Z),St=(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 et(n){const{multiple:o,items:c,label:d,placeholder:p,selected:E,onChange:L,triggerReset:N,native:K=!1,disabled:H=!1}=n,oe=St(),[te,Se]=(0,t.useState)(E||(o?[]:"")),[Re,be]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Se(o?[]:"")},[N,o]),(0,t.useEffect)(()=>{E!==void 0&&Se(E)},[E]);const it=ot=>{Se(ot.target.value),L(ot.target.value)},It=ot=>{if(H){ot.preventDefault();return}be(Lt=>o&&!(ot.target instanceof HTMLElement)?!0:!Lt)},Yt=()=>{be(!1)},en=ot=>()=>{const Lt=te.filter(Bt=>Bt!==ot);Se(Lt),L(Lt)};return t.createElement("div",{className:oe.root},t.createElement(D.Z,{variant:"button"},d),t.createElement(C.Z,{onClickAway:Yt},t.createElement(P.Z,{className:oe.formControl},t.createElement(X.Z,{value:te,native:K,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:it,onClick:It,open:Re,input:t.createElement(Ke,null),renderValue:ot=>{var Lt;return o&&te.length!==0?t.createElement("div",{className:oe.chips},ot.map(Bt=>{var on,tr;return t.createElement(Vr.Z,{key:(on=c.find(Fn=>Fn.value===Bt))==null?void 0:on.value,label:(tr=c.find(Fn=>Fn.value===Bt))==null?void 0:tr.label,clickable:!0,onDelete:en(Bt),className:oe.chip})})):t.createElement(D.Z,null,te.length===0?p||"":(Lt=c.find(Bt=>Bt.value===ot))==null?void 0:Lt.label)},IconComponent:()=>Re?t.createElement(Me,null):t.createElement($e,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!o&&t.createElement(G.Z,{value:[]},p),K?c&&c.map(ot=>t.createElement("option",{value:ot.value,key:ot.value},ot.label)):c&&c.map(ot=>t.createElement(G.Z,{key:ot.value,value:ot.value},o&&t.createElement(er.Z,{color:"primary",checked:te.includes(ot.value)||!1,className:oe.checkbox}),ot.label))))))}const We=()=>{},zt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:We,stepHistory:[],setStepHistory:We,onStepChange:We});function _t(n){const{children:o,elevated:c,onStepChange:d,activeStep:p=0}=n,[E,L]=useState(p),[N,K]=useState([0]);useEffect(()=>{L(p)},[p]);const H=[];let oe;return Children.forEach(o,te=>{isValidElement(te)&&(te.props.end?oe=te:H.push(te))}),React.createElement(React.Fragment,null,React.createElement(zt.Provider,{value:{stepIndex:E,setStepIndex:L,stepHistory:N,setStepHistory:K,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:c?2:0},H)),E>=Children.count(o)-1&&oe)}const Vn=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),An=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),cn=({text:n,handleClick:o,disabled:c,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:c,"data-testid":`nextButton-${p}`,onClick:o},n||(d?"Finish":"Next")),pn=({text:n,handleClick:o,disabled:c,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:c},n||"Back"),xn=({actions:n={},children:o})=>{const c=Vn(),{stepperLength:d,stepIndex:p,setStepIndex:E,stepHistory:L,setStepHistory:N,onStepChange:K}=useContext(VerticalStepperContext),H=(Re,be)=>{be&&be(),K&&K(p,Re),E(Re)},oe=()=>{const Re=n.nextStep?n.nextStep(p,d-1):p+1;H(Re,n.onNext),N([...L,Re])},te=()=>{L.pop(),H(L[L.length-1],n.onBack),N([...L])},Se=()=>{H(0,n.onRestart),N([0])};return React.createElement("div",{className:c.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(pn,{text:n.backText,handleClick:te,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(cn,{text:n.nextText,handleClick:oe,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(An,{text:n.restartText,handleClick:Se,stepIndex:p}),o)},Rr=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Ur(n){const{title:o,children:c,end:d,actions:p,...E}=n,L=Rr();return d?React.createElement("div",{className:L.end},React.createElement(Typography,{variant:"h6"},o),c,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,c,React.createElement(SimpleStepperFooter,{actions:p})))}const Gn=(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 Rn(n){const o=Gn(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Sn(n){const o=Gn(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Nr(n){const o=Gn(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function no(n){const o=Gn(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function js(n){const o=Gn(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Vs(n){const o=Gn(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Gs=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,sn.Z)(sa,{name:"BackstageMetadataTableTitleCell"})(go.Z),fa=(0,sn.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,...c})=>React.createElement(TableRow,null,n&&React.createElement(da,null,n),React.createElement(fa,{colSpan:n?1:2,...c},o)),po=(0,sn.Z)(la,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Ys=(0,sn.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,sn.Z)(yo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o)),vo=(0,sn.Z)(ma,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o));function ha(n,o){const c=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ro(d)));return o?React.createElement(vo,null,c):React.createElement(Eo,null,c)}function ga(n,o,c){const d=Object.keys(n).map(p=>{const E=ro(n[p],!0),L=c&&c.titleFormat?c.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${L}: `,E)});return o?React.createElement(vo,null,d):React.createElement(Eo,null,d)}function ro(n,o,c){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?ga(n,o,c):Array.isArray(n)?ha(n,c):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:c})=>React.createElement(MetadataTableItem,{title:c&&c.titleFormat?c.titleFormat(n):startCase(n)},React.createElement(pa,{value:o,options:c}));function Ea(n,o){return Object.keys(n).map(c=>React.createElement(ya,{key:c,title:c,value:n[c],options:o}))}function Js(n){const{metadata:o,dense:c=!0,options:d}=n,p=Ea(o,d||{});return React.createElement(MetadataTable,{dense:c},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,c){const d={...So(n),[o]:c};return Sa(d)}function Qs(n,o=250){const[c,d]=useSearchParams(),p=c.toString(),[E,L]=useState(Co(p,n));return useEffect(()=>{const N=Co(p,n);L(K=>isEqual(N,K)?K:N)},[p,L,n]),useDebouncedEffect(()=>{const N=Ca(p,n,E);p!==N&&d(N,{replace:!0})},[d,E,p,n],o),[E,L]}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,l.useApiHolder)().get(l.configApiRef),c=o==null?void 0:o.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.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 Un(n,o){const d=(0,l.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(ba.Z,{...o})}function Xs(n){return Un("brokenImage",n)}function _s(n){return Un("catalog",n)}function ec(n){return Un("chat",n)}function tc(n){return Un("dashboard",n)}function nc(n){return Un("docs",n)}function rc(n){return Un("email",n)}function oc(n){return Un("github",n)}function ac(n){return Un("group",n)}function Gr(n){return Un("help",n)}function ic(n){return Un("user",n)}function sc(n){return Un("warning",n)}const Pa=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Ia=({icon:n})=>{var d;const o=(0,l.useApp)(),c=n&&(d=o.getSystemIcon(n))!=null?d:Gr;return t.createElement(c,null)},La=({link:n})=>{var o;return t.createElement(x,{to:n.url},(o=n.title)!=null?o:n.url)},Oa=({item:n})=>{var o;return t.createElement(st.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((c,d,p)=>[...c,p>0&&t.createElement("br",{key:p}),t.createElement(La,{link:d,key:d.url})],[])}))};function xa(n){const{title:o,children:c}=n,{items:d}=To(),[p,E]=(0,t.useState)(!1),[L,N]=(0,t.useState)(null),K=Pa(),H=(0,ve.Z)(Se=>Se.breakpoints.down("sm")),oe=Se=>{N(Se.currentTarget),E(!0)},te=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(Ln.Z,{display:"flex",ml:1},H?t.createElement($.Z,{color:"primary",size:"small",onClick:oe,"data-testid":"support-button"},t.createElement(Gr,null)):t.createElement(y.Z,{"data-testid":"support-button",color:"primary",onClick:oe,startIcon:t.createElement(Gr,null)},"Support")),t.createElement(Ao.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:te},t.createElement(bt.Z,{className:K.popoverList},o&&t.createElement(st.Z,{alignItems:"flex-start"},t.createElement(D.Z,{variant:"subtitle1"},o)),t.Children.map(c,(Se,Re)=>t.createElement(st.Z,{alignItems:"flex-start",key:`child-${Re}`},Se)),d&&d.map((Se,Re)=>t.createElement(Oa,{item:Se,key:`item-${Re}`}))),t.createElement(va.Z,null,t.createElement(y.Z,{color:"primary",onClick:te},"Close"))))}var oo=e(18671),Dn=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",zr=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),Hn=(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"}),Sr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),xo=(0,t.createContext)({content:{contentRef:void 0}});function wa(n){const[o,c]=(0,t.useState)(()=>Oo.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Hn),p=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{Oo.setSidebarPinState(o)},[o]);const L=(0,ve.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),N=()=>c(!o),K=Ba({isPinned:o,sidebarConfig:d});return t.createElement(Sr.Provider,{value:{isPinned:o,toggleSidebarPinState:N,isMobile:L}},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 c,d;(d=(c=n==null?void 0:n.contentRef)==null?void 0:c.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:c,icon:d,value:p}=n,{sidebarConfig:E}=(0,t.useContext)(Hn),L=za({sidebarConfig:E}),N=(0,Dn.TH)(),{selectedMenuItemIndex:K,setSelectedMenuItemIndex:H}=(0,t.useContext)(wo),oe=(Se,Re)=>{H(Re===K?-1:Re)},te=p===K&&K>=0||p!==K&&!(K>=0)&&o===N.pathname;return t.createElement(Za.Z,{label:c,icon:d,component:x,to:o||N.pathname,onChange:oe,value:p,selected:te,classes:L})},Fo=n=>{const{children:o,to:c,label:d,icon:p,value:E}=n,{isMobile:L}=(0,t.useContext)(Sr);return L?t.createElement(Wa,{to:c,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,Va=({children:n,label:o="Menu",open:c,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Hn),E=Bo({sidebarConfig:p});return t.createElement($a.ZP,{anchor:"bottom",open:c,onClose:d,ModalProps:{BackdropProps:{classes:{root:E.marginMobileSidebar}}},classes:{root:E.marginMobileSidebar,paperAnchorBottom:E.overlay}},t.createElement(Ln.Z,{className:E.overlayHeader},t.createElement(D.Z,{variant:"h3"},o),t.createElement($.Z,{onClick:d,classes:{root:E.overlayHeaderClose}},t.createElement(Ua.Z,null))),t.createElement(Ln.Z,null,n))},wo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Ga=n=>{const{sidebarConfig:o}=(0,t.useContext)(Hn),{children:c}=n,d=Bo({sidebarConfig:o}),p=(0,Dn.TH)(),[E,L]=(0,t.useState)(-1);(0,t.useEffect)(()=>{L(-1)},[p.pathname]);let N=(0,l.useElementFilter)(c,H=>H.getElements().filter(oe=>oe.type===ja));if(c)N.length?N=Ha(N):N.push(t.createElement(Fo,{key:"default_menu",icon:t.createElement(Na.Z,null)},c));else return null;const K=E>=0&&!N[E].props.to;return t.createElement(zr.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(wo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:L}},t.createElement(Va,{label:N[E]&&N[E].props.label,open:K,onClose:()=>L(-1)},N[E]&&N[E].props.children),t.createElement(Ma.Z,{className:d.root,"data-testid":"mobile-sidebar-root"},N)))},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 Cn;(function(n){n[n.Closed=0]="Closed";const c=0+1;n[n.Idle=c]="Idle";const d=c+1;n[n.Open=d]="Open"})(Cn||(Cn={}));const Ka=n=>{const{sidebarConfig:o}=(0,t.useContext)(Hn),{openDelayMs:c=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:p,children:E}=n,L=Mo({sidebarConfig:o}),N=(0,ve.Z)(Yt=>Yt.breakpoints.down("md"),{noSsr:!0}),[K,H]=(0,t.useState)(Cn.Closed),oe=(0,t.useRef)(),{isPinned:te,toggleSidebarPinState:Se}=(0,t.useContext)(Sr),Re=()=>{te||p||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),K!==Cn.Open&&!N&&(oe.current=window.setTimeout(()=>{oe.current=void 0,H(Cn.Open)},c),H(Cn.Idle)))},be=()=>{te||p||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),K===Cn.Idle?H(Cn.Closed):K===Cn.Open&&(oe.current=window.setTimeout(()=>{oe.current=void 0,H(Cn.Closed)},d)))},it=K===Cn.Open&&!N||te,It=Yt=>{Yt?(H(Cn.Open),Se()):(H(Cn.Closed),Se())};return t.createElement("div",{style:{}},t.createElement(Ya,null),t.createElement(zr.Provider,{value:{isOpen:it,setOpen:It}},t.createElement("div",{className:L.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Re,onFocus:p?()=>{}:Re,onMouseLeave:p?()=>{}:be,onBlur:p?()=>{}:be},t.createElement("div",{className:yt()(L.drawer,{[L.drawerOpen]:it})},E))))},ka=n=>{var K,H;const o=Da((K=n.sidebarOptions)!=null?K:{}),c=Fa((H=n.submenuOptions)!=null?H:{}),{children:d,disableExpandOnHover:p,openDelayMs:E,closeDelayMs:L}=n,{isMobile:N}=(0,t.useContext)(Sr);return N?t.createElement(Ga,null,d):t.createElement(Hn.Provider,{value:{sidebarConfig:o,submenuConfig:c}},t.createElement(Ka,{openDelayMs:E,closeDelayMs:L,disableExpandOnHover:p},d))};function Ya(){const{sidebarConfig:n}=(0,t.useContext)(Hn),{focusContent:o,contentRef:c}=Do(),d=Mo({sidebarConfig:n});return c!=null&&c.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:yt()(d.visuallyHidden)},"Skip to content"):null}function $o(n,o){const c=new URLSearchParams(o.search).toString(),d=Ro().parse(c),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:c,icon:d,dropdownItems:p}=n,E=Ja(),{setIsHoveredOn:L}=useContext(SidebarItemWithSubmenuContext),N=()=>{L(!1)},K=useResolvedPath(c),H=useLocation();let oe=isLocationMatch(H,K);const[te,Se]=useState(!1),Re=()=>{Se(!te)};return p!==void 0?(p.some(be=>{const it=resolvePath(be.to);return oe=isLocationMatch(H,it),oe}),React.createElement("div",{className:E.itemContainer},React.createElement("button",{onClick:Re,onTouchStart:be=>be.stopPropagation(),className:classnames(E.item,oe?E.selected:void 0)},React.createElement(d,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o),te?React.createElement(ArrowDropUpIcon,{className:E.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:E.dropdownArrow})),p&&te&&React.createElement("div",{className:E.dropdown},p.map((be,it)=>React.createElement(Link,{to:be.to,underline:"none",className:E.dropdownItem,onClick:N,onTouchStart:It=>It.stopPropagation(),key:it},React.createElement(Typography,{className:E.textContent},be.title)))))):React.createElement("div",{className:E.itemContainer},React.createElement(Link,{to:c,underline:"none",className:classnames(E.item,oe?E.selected:void 0),onClick:N,onTouchStart:be=>be.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 c,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=(c=n.palette.navigation.submenu)==null?void 0:c.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)(zr),{sidebarConfig:c,submenuConfig:d}=(0,t.useContext)(Hn),p=o?c.drawerWidthOpen:c.drawerWidthClosed,E=Qa({left:p,submenuConfig:d}),{isHoveredOn:L}=(0,t.useContext)(Lo),[N,K]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{K(L)},[L]),t.createElement("div",{className:yt()(E.drawer,{[E.drawerOpen]:N})},t.createElement(D.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 c,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=(c=o.palette.navigation.navItem)==null?void 0:c.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,l.useElementFilter)(n.props.children,c=>{let d=!1;return c.getElements().forEach(({props:{to:p,dropdownItems:E}})=>{if(!d){if(E!=null&&E.length){E.forEach(({to:L})=>d=d||$o(o,(0,Dn.i3)(L)));return}p&&(d=$o(o,(0,Dn.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:c,style:d,className:p,activeStyle:E,caseSensitive:L,activeClassName:N="active","aria-current":K="page",...H},oe){let{pathname:te}=(0,Dn.TH)(),{pathname:Se}=(0,Dn.WU)(o);L||(te=te.toLocaleLowerCase("en-US"),Se=Se.toLocaleLowerCase("en-US"));let Re=te===Se;!Re&&!c&&(Re=te.startsWith(`${Se}/`));const be=Re?K:void 0;return t.createElement(A.rU,{...H,to:o,ref:oe,"aria-current":be,style:{...d,...Re?E:void 0},className:yt()([p,Re?N:void 0])})}),No=(0,t.forwardRef)((n,o)=>{const{icon:c,text:d,hasNotifications:p=!1,disableHighlight:E=!1,onClick:L,children:N,className:K,...H}=n,{sidebarConfig:oe}=(0,t.useContext)(Hn),te=Jr(oe),{isOpen:Se}=(0,t.useContext)(zr),Re=t.createElement(qa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:yt()({[te.closedItemIcon]:!Se})},t.createElement(c,{fontSize:"small"})),be=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:te.iconContainer},Re),d&&t.createElement(D.Z,{variant:"subtitle2",className:te.label},d),t.createElement("div",{className:te.secondaryAction},N)),it=Se?be:Re,It={onClick:L,className:yt()(K,te.root,Se?te.open:te.closed,Uo(n)&&te.buttonItem,{[te.highlightable]:!E})};return Uo(n)?t.createElement("button",{"aria-label":d,...It,ref:o},it):t.createElement(si,{...It,activeClassName:te.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...H},it)}),ci=({children:n,...o})=>{const{sidebarConfig:c}=(0,t.useContext)(Hn),d=Jr(c),[p,E]=(0,t.useState)(!1),L=(0,Dn.TH)(),N=ai(n,L),K=(0,ve.Z)(Se=>Se.breakpoints.down("sm")),H=()=>{E(!0)},oe=()=>{E(!1)},te=()=>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:H,onMouseEnter:H,className:yt()(p&&d.highlighted)},t.createElement(No,{className:N?d.selected:"",...o},te()),p&&n))},Zo=(0,t.forwardRef)((n,o)=>{const[c]=(0,l.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===ii));return c?t.createElement(ci,{...n},c):t.createElement(No,{...n,ref:o})});function hc(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[c,d]=useState(""),p=Jr(o),E=n.icon?n.icon:SearchIcon,L=()=>{n.onSearch(c),d("")},N=te=>{te.key==="Enter"&&(te.preventDefault(),L())},K=te=>{d(te.target.value)},H=te=>{te.preventDefault(),te.stopPropagation()},oe=te=>{L(),te.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:c,onClick:H,onChange:K,onKeyDown:N,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:c,setOpen:d}=useContext(SidebarContext);if(useMediaQuery(L=>L.breakpoints.down("md"),{noSsr:!0}))return null;const E=()=>{d(!c)};return React.createElement("button",{onClick:E,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:o.arrows},c?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),c=di({sidebarConfig:o}),{text:d,onClose:p}=n,E=()=>p();return React.createElement("div",{className:c.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:c.introDismiss},React.createElement(Link,{component:"button",onClick:E,underline:"none",className:c.introDismissLink},React.createElement(CloseIcon,{className:c.introDismissIcon}),React.createElement(Typography,{component:"span",className:c.introDismissText},"Dismiss"))))}const zo=n=>{const{text:o,onDismiss:c}=n,[d,p]=useState(!1),E=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:c},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),c={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:E,recentlyViewedItemsDismissed:L}=d!=null?d:{},N=()=>{p(H=>({...c,...H,starredItemsDismissed:!0}))},K=()=>{p(H=>({...c,...H,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(zo,{text:mi,onDismiss:N}),React.createElement(SidebarDivider,null)),!L&&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:c,noPadding:d,children:p,...E}=n,{contentRef:L}=Do(),N=gi();return t.createElement("article",{ref:L,tabIndex:-1,...E,className:yt()(N.root,o,{[N.stretch]:c,[N.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:c,selectedIndex:d}=n,[p,E]=(0,t.useState)(d!=null?d:0),L=Ei(),N=(K,H)=>{d===void 0&&E(H),c&&c(H)};return(0,t.useEffect)(()=>{d!==void 0&&E(d)},[d]),t.createElement("div",{className:L.tabsWrapper},t.createElement(yi.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:N,value:p},o.map((K,H)=>t.createElement(pi.Z,{...K.tabProps,"data-testid":`header-tab-${H}`,label:K.label,key:K.id,value:H,className:L.defaultTab,classes:{selected:L.selected,root:L.tabRoot}}))))}function vi(n){var N,K,H;const o=(0,Dn.UO)(),d=n.map(({path:oe,children:te})=>({caseSensitive:!1,path:`${oe}/*`,element:te})).sort((oe,te)=>te.path.replace(/\/\*$/,"").localeCompare(oe.path.replace(/\/\*$/,""))),p=(N=(0,Dn.V$)(d))!=null?N:n[0].children,[E]=(K=(0,Dn.fp)(d,`/${o["*"]}`))!=null?K:[],L=E?n.findIndex(oe=>`${oe.path}/*`===E.route.path):0;return{index:L===-1?0:L,element:p,route:(H=n[L])!=null?H:n[0]}}function jo(n){const{routes:o}=n,c=(0,Dn.s0)(),{index:d,route:p,element:E}=vi(o),L=(0,t.useMemo)(()=>o.map(K=>({id:K.path,label:K.title,tabProps:K.tabProps})),[o]),N=K=>c(o[K].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ho,{tabs:L,selectedIndex:d,onChange:N}),t.createElement(Wo,null,t.createElement(oo.q,{title:p.title}),E))}const ao=()=>null;(0,l.attachComponentData)(ao,"core.gatherMountPoints",!0);function Vo(n){const o=t.createElement(ao,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(c=>{if(!(0,t.isValidElement)(c))return[];if(c.type===t.Fragment)return Vo(c.props.children);if(c.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:E,tabProps:L}=c.props;return[{path:d,title:p,children:E,tabProps:L}]})}function Ai(n){const o=Vo(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:c}=n,d=Ri();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},c))}var Ci=e(21070),Ti=e(90324),bi=e(98281),Pi=e(48049),Go=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:c}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[E,L]=(0,t.useState)(!1),N=()=>{p({}),L(H=>!H)};return(0,t.useEffect)(()=>{c(d)},[d,c]),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:N},"Clear all")),t.createElement("div",{className:o.filters},((K=n.filters)==null?void 0:K.length)&&n.filters.map(H=>t.createElement(et,{triggerReset:E,key:H.element.label,...H.element,selected:d[H.element.label],onChange:oe=>p({...d,[H.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(Go.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(Go.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 c=o.split(".");let d=n[c[0]];for(let p=1;p<c.length;++p){if(d===void 0)return d;const E=c[p];d=d[E]}return d}const Ui=(0,sn.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,sn.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(c=>{const d={};let p=c.cellStyle||{};if(c.highlight)if(d.color=o.palette.textContrast,typeof p=="object")p.fontWeight=o.typography.fontWeightBold;else{const E=p;p=(L,N,K)=>({...E(L,N,K),fontWeight:o.typography.fontWeightBold})}return{...c,headerStyle:d,cellStyle:p}})}function Wi(n,o){return(0,Zr.transform)(n,(c,d,p)=>{(0,Zr.isEqual)(d,o[p])||(c[p]=d)})}const Jo={search:"",filtersOpen:!1,filters:{}};function Hi(n){const{toolbarRef:o,setSearch:c,hasFilters:d,selectedFiltersLength:p,toggleFilters:E}=n,L=Ni(),N=(0,t.useCallback)(K=>{n.onSearchChanged(K),c(K)},[n,c]);return d?t.createElement("div",{className:L.root},t.createElement("div",{className:L.root},t.createElement($.Z,{onClick:E,"aria-label":"filter list"},t.createElement(io.Z,null)),t.createElement(D.Z,{className:L.title},"Filters (",p,")")),t.createElement(Yo,{...n,ref:o,onSearchChanged:N})):t.createElement(Yo,{...n,ref:o,onSearchChanged:N})}function ji(n){const{data:o,columns:c,options:d,title:p,subtitle:E,filters:L,initialState:N,emptyContent:K,onStateChange:H,...oe}=n,te=Zi(),Se=(0,I.Z)(),Re={...Jo,...N},[be,it]=(0,t.useState)(Re.filtersOpen),It=(0,t.useCallback)(()=>it(ln=>!ln),[it]),[Yt,en]=(0,t.useState)(0),[ot,Lt]=(0,t.useState)(o),[Bt,on]=(0,t.useState)(Re.filters),tr=zi(c,Se),[Fn,Hr]=(0,t.useState)(Re.search);(0,t.useEffect)(()=>{if(H){const ln=Wi({search:Fn,filtersOpen:be,filters:Bt},Jo);H(ln)}},[Fn,be,Bt,H]);const Ct={headerStyle:{textTransform:"uppercase"}},nr=(0,t.useCallback)(ln=>{var Tn;return(Tn=c.find(Bn=>Bn.title===ln))==null?void 0:Tn.field},[c]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Bt){Lt(o);return}const ln=Object.values(Bt);if(o&&ln.flat().length){const Tn=o.filter(Bn=>!!Object.entries(Bt).filter(([,mr])=>!!mr.length).every(([mr,tn])=>{const nn=ko(Bn,nr(mr));return Array.isArray(nn)&&Array.isArray(tn)?nn.some(Cr=>tn.includes(Cr)):Array.isArray(nn)?nn.includes(tn):Array.isArray(tn)?tn.includes(nn):nn===tn}));Lt(Tn)}else Lt(o);en(ln.flat().length)},[o,Bt,nr]);const fo=(ln,Tn)=>{const Bn=tn=>{const nn=new Set,Cr=hr=>{hr!=null&&nn.add(hr)};return Tn&&Tn.forEach(hr=>{const Tr=ko(hr,nr(tn));Array.isArray(Tr)?Tr.forEach(Cr):Cr(Tr)}),nn},mr=tn=>({placeholder:"All results",label:tn.column,multiple:tn.type==="multiple-select",items:[...Bn(tn.column)].sort().map(nn=>({label:nn,value:nn}))});return ln.map(tn=>({type:tn.type,element:mr(tn)}))},fr=!!(L!=null&&L.length),mo=(0,t.useCallback)(ln=>t.createElement(Hi,{setSearch:Hr,hasFilters:fr,selectedFiltersLength:Yt,toggleFilters:It,...ln}),[It,fr,Yt,Hr]),qr=typeof o!="function"&&o.length===0,_r=c.length,ho=(0,t.useCallback)(ln=>K&&qr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:_r},K))):t.createElement(Qr.os,{...ln}),[qr,K,_r]);return t.createElement("div",{className:te.root},be&&o&&typeof o!="function"&&(L==null?void 0:L.length)&&t.createElement(Mi,{filters:fo(L,o),selectedFilters:Bt,onChangeFilters:on}),t.createElement(Qr.ZP,{components:{Header:Ui,Toolbar:mo,Body:ho},options:{...Ct,...d},columns:tr,icons:$i,title:t.createElement(t.Fragment,null,t.createElement(D.Z,{variant:"h5",component:"h3"},p),E&&t.createElement(D.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:ot,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...oe}))}const Ac=n=>{const{children:o,value:c,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:c!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},c===d&&React.createElement(Box,{p:3},o))},Vi=(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=Vi(n),{ariaLabel:c,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":c},n.children)},Gi=(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=>Gi(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:c,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,c=Yi(),[d,p]=useState([0,0]),[E,L]=useState(0),[N,K]=useState(0),[H,oe]=useState([[]]),te=useRef(),{width:Se}=useWindowSize(),Re=(en,ot)=>{p([E,ot])},be=()=>{L(E-1)},it=()=>{L(E+1)},It=()=>E+1<H.length;useEffect(()=>{const ot=E===0?1:2,Lt=te.current.offsetWidth-20-ot*30,Bt=d[0]*N+d[1],on=Math.floor(Lt/170);K(on),oe(chunkArray(o,on)),p([Math.floor(Bt/on),Bt%on])},[Se,o]);const Yt=E===d[0]?d[1]:!1;return React.createElement("div",{className:c.root},React.createElement(AppBar,{ref:te,className:c.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Yt,onChange:Re,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:be,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[E].map((en,ot)=>React.createElement(StyledTab,{value:ot,isFirstIndex:ot===0,isFirstNav:E===0,key:ot,icon:en.icon||void 0,label:en.label||void 0})),It()&&React.createElement(StyledIcon,{isNext:!0,onClick:it,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Yt!==!1?H[E].map((en,ot)=>React.createElement(TabPanel,{key:ot,value:ot,index:Yt},en.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var bc=e(44311);function Ji(n,o){const c=n[n.length-1];if(!!c)return c>=.9?o.palette.status.ok:c>=.5?o.palette.status.warning:o.palette.status.error}function Pc(n){var c;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:(c=n.color)!=null?c: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(D.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function qi(n){const{description:o,title:c,titleComponent:d=void 0,children:p,textAlign:E="left"}=n,L=Qi({textAlign:E})(),N=d||t.createElement(Xi,{title:c,className:L.title});return t.createElement(t.Fragment,null,t.createElement(oo.q,{title:c}),t.createElement("div",{className:L.container},t.createElement("div",{className:L.leftItemsBox},N,o&&t.createElement(D.Z,{className:L.description,variant:"body2"},o)),t.createElement("div",{className:L.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:c,additionalInfo:d,supportUrl:p}=n,E=ns(),L=(0,Dn.s0)(),N=To();return t.createElement(V.Z,{container:!0,spacing:0,className:E.container},t.createElement(ts,null),t.createElement(V.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(D.Z,{"data-testid":"error",variant:"body1",className:E.subtitle},"ERROR ",o,": ",c),t.createElement(D.Z,{variant:"body1",className:E.subtitle},d),t.createElement(D.Z,{variant:"h2",className:E.title},"Looks like someone dropped the mic!"),t.createElement(D.Z,{variant:"h6"},t.createElement(x,{to:"#","data-testid":"go-back-link",onClick:()=>L(-1)},"Go back"),"... or please"," ",t.createElement(x,{to:p||N.url},"contact support")," if you think this is a bug.")))}var os=e(16173);const as=(0,sn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(D.Z),so=(0,sn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(Ln.Z);function is(n){const{children:o,...c}=n,[d,p]=t.useState(null),E=t.Children.toArray(o),[L,N,...K]=E,H=K.length?K.pop():E[E.length-1],oe=E.length>3,te=be=>{p(be.currentTarget)},Se=()=>{p(null)},Re=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(os.Z,{"aria-label":"breadcrumb",...c},E.length>1&&t.createElement(so,{clone:!0},L),E.length>2&&t.createElement(so,{clone:!0},N),oe&&t.createElement(as,{onClick:te},"..."),t.createElement(Ln.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Ao.ZP,{open:Re,anchorEl:d,onClose:Se,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(bt.Z,null,K.map((be,it)=>t.createElement(st.Z,{key:it,button:!0},t.createElement(so,{clone:!0},be))))))}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:c,pageTitle:d})=>n?o?t.createElement(is,{className:c.breadcrumb},t.createElement(x,{to:o},n),t.createElement(D.Z,null,d)):t.createElement(D.Z,{className:c.type},n):null,ls=({pageTitle:n,classes:o,tooltip:c})=>{const d=t.createElement(D.Z,{className:o.title,variant:"h1"},n);return c?t.createElement(O.ZP,{title:c,placement:"top-start"},d):d},us=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(D.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function Qo(n){const{children:o,pageTitleOverride:c,style:d,subtitle:p,title:E,tooltip:L,type:N,typeLink:K}=n,H=ss(),te=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Se=c||E,Re=E||c,be=`${Se} | %s | ${te}`,it=`${Se} | ${te}`;return t.createElement(t.Fragment,null,t.createElement(oo.q,{titleTemplate:be,defaultTitle:it}),t.createElement("header",{style:d,className:H.header},t.createElement(Ln.Z,{className:H.leftItemsBox},t.createElement(cs,{classes:H,type:N,typeLink:K,pageTitle:Re}),t.createElement(ls,{classes:H,pageTitle:Re,tooltip:L}),t.createElement(us,{classes:H,subtitle:p})),t.createElement(V.Z,{container:!0,className:H.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(D.Z,{className:o},n);function ms(n){const{label:o,value:c,url:d}=n,p=ds(),E=t.createElement(fs,{className:p.value,value:c||"<Unknown>"});return t.createElement(V.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(D.Z,{className:p.label},o),d?t.createElement(x,{to:d},E):E))}const hs={hour:"2-digit",minute:"2-digit"};function Xo(n){const o=new Date,c=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 L=E.getString("label");const N={timeZone:E.getString("timezone"),...hs};try{new Date().toLocaleString(c,N)}catch{console.warn(`The timezone ${N.timeZone} is invalid. Defaulting to GMT`),N.timeZone="GMT",L="GMT"}const K=o.toLocaleTimeString(c,N);d.push({time:K,label:L})}return d}function Ic(n){const o=useApi(configApiRef),c=[],[d,p]=React.useState(c);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:c,children:d}=n,p=ps(n);return t.createElement("div",{className:p.root},c&&t.createElement(D.Z,{variant:"subtitle2",component:"h3"},c),o&&t.createElement(D.Z,{variant:"h6",component:"h4"},o),d)}function Lc(n){const{description:o,tags:c,title:d,type:p,subtitle:E,label:L,onClick:N,href:K}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:E||p})),React.createElement(CardContent,null,c!=null&&c.length?React.createElement(Box,null,c.map((H,oe)=>React.createElement(Chip,{size:"small",label:H,key:oe}))):null,o),React.createElement(CardActions,null,!K&&React.createElement(Button,{to:"#",onClick:N,color:"primary"},L),K&&React.createElement(Button,{to:K,color:"primary"},L)))}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,...c}=n,d=vs(c);return t.createElement("div",{className:d.root,...c},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:c}=n,{isMobile:d}=(0,t.useContext)(Sr),p=Ss({isMobile:d});return t.createElement(Rs.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("div",{className:p.root},c))}function Cs(n){const{themeId:o,children:c,...d}=n;return t.createElement(qo,{themeId:o},t.createElement(Qo,{...d}),c)}var yn=e(30195);const Oc=yn.z.object({providerInfo:yn.z.object({}).catchall(yn.z.unknown()).optional(),profile:yn.z.object({email:yn.z.string().optional(),displayName:yn.z.string().optional(),picture:yn.z.string().optional()}),backstageIdentity:yn.z.object({token:yn.z.string(),identity:yn.z.object({type:yn.z.literal("user"),userEntityRef:yn.z.string(),ownershipEntityRefs:yn.z.array(yn.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[c,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(),c=o.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(c);if(!d)throw new TypeError(`Invalid user entity reference "${c}"`);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,c=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:c,previous:o},c}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),c=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!c.ok)throw await ResponseError.fromResponse(c);return proxiedSessionSchema.parse(await c.json())}}const Dc=n=>{const o=useApi(discoveryApiRef),[{status:c,error:d},{execute:p}]=useAsync(async()=>{const E=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await E.start(),n.onSignInSuccess(E)});return useMountEffect(p),c==="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(V.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,c,d]=n.split(".");return JSON.parse(atob(c))}class uo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new uo(o)}async getIdToken(){var o,c;return(c=(o=this.result).getIdToken)==null?void 0:c.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:c,ent:d}=Ps(o);return{type:"user",userEntityRef:c,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var c,d;return{token:await((d=(c=this.result).getIdToken)==null?void 0:d.call(c))}}async signOut(){var o,c;return(c=(o=this.result).signOut)==null?void 0:c.call(o)}}class Wr{constructor(o,c,d){Q(this,"profilePromise");this.identity=o,this.authApi=c,this.profile=d}static createGuest(){return new lo}static fromLegacy(o){return uo.fromResult(o)}static create(o){return new Wr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,c=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!c)throw new TypeError(`Invalid user entity reference "${o}"`);return c[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:c,title:d,message:p}=n,E=(0,l.useApi)(c),L=(0,l.useApi)(l.errorApiRef),N=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 H=await E.getProfile();o(Wr.create({identity:K.identity,profile:H,authApi:E}))}catch(K){L.post(new Dr.SP("Login failed",K))}};return t.createElement(co,null,t.createElement(ht,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:N},"Sign In")},t.createElement(D.Z,{variant:"body1"},p)))},loader:async(n,o)=>{const c=n.get(o),d=await c.getBackstageIdentity({optional:!0});if(!d)return;const p=await c.getProfile();return Wr.create({identity:d.identity,profile:p,authApi:c})}},Ls={Component:({onSignInSuccess:n})=>t.createElement(co,null,t.createElement(ht,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new lo)},"Enter")},t.createElement(D.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,...c}=n;return{inputRef:o,...c}},ws={Component:({onSignInSuccess:n})=>{const o=Bs(),{register:c,handleSubmit:d,formState:p}=(0,Os.cI)({mode:"onChange"}),{errors:E}=p,L=({userId:N})=>{n(Wr.fromLegacy({userId:N,profile:{email:`${N}@example.com`}}))};return t.createElement(co,null,t.createElement(ht,{title:"Custom User",variant:"fullHeight"},t.createElement(D.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(L)},t.createElement(P.Z,null,t.createElement(ea.Z,{...na(c("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(P.Z,null,t.createElement(ea.Z,{...na(c("idToken",{required:!1,validate:N=>!N||Fs.test(N)||"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((c,d)=>{if(typeof d=="string")return oa(d,c),c[d]={components:ra[d],id:d},c;const{id:p}=d;return oa(p,c),c[p]={components:ra.common,id:p,config:d},c},{})}const Zc=(n,o)=>{const c=useApi(errorApiRef),d=useApiHolder(),[p,E]=useState(!0),L=useCallback(K=>{o(IdentityApiSignOutProxy.from({identityApi:K,signOut:async()=>{var H;localStorage.removeItem(Xr),await((H=K.signOut)==null?void 0:H.call(K))}}))},[o]);useLayoutEffect(()=>{var te;if(!p)return;const K=localStorage.getItem(Xr);if(K===null){E(!1);return}const H=n[K];if(!H){E(!1);return}let oe=!1;return H.components.loader(d,(te=H.config)==null?void 0:te.apiRef).then(Se=>{oe||(Se?L(Se):E(!1))}).catch(Se=>{oe||(localStorage.removeItem(Xr),c.post(Se),E(!1))}),()=>{oe=!0}},[p,c,o,d,n,L]);const N=useMemo(()=>Object.keys(n).map(K=>{const H=n[K],{Component:oe}=H.components,te=Se=>{localStorage.setItem(Xr,H.id),L(Se)};return React.createElement(oe,{key:H.id,config:H.config,onSignInSuccess:te})}),[n,L]);return[p,N]},Ms=({onSignInSuccess:n,providers:o=[],title:c,align:d="left"})=>{const p=useApi(configApiRef),E=useStyles(),L=getSignInProviders(o),[N,K]=useSignInProviders(L,n);return N?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,c&&React.createElement(ContentHeader,{title:c,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:c})=>{const d=useStyles(),p=useApi(n.apiRef),E=useApi(configApiRef),[L,N]=useState(),[K,H]=useState(!1),oe=async({checkExisting:te,showPopup:Se})=>{try{let Re;if(te&&(Re=await p.getBackstageIdentity({optional:!0})),!Re&&(Se||o)&&(H(!0),Re=await p.getBackstageIdentity({instantPopup:!0}),!Re))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Re){H(!0);return}const be=await p.getProfile();c(UserIdentity.create({identity:Re.identity,authApi:p,profile:be}))}catch(Re){N(Re),H(!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),L&&L.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},L.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,sn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(Ar.Z);function Wc(n){const{slackChannel:o,errorBoundaryProps:c,children:d,title:p,deepLink:E,value:L,onChange:N}=n,K=Us(),[H,oe]=useState(0),te=N||((be,it)=>oe(it));let Se;L?React.Children.map(d,be=>{React.isValidElement(be)&&(be==null?void 0:be.props.value)===L&&(Se=be==null?void 0:be.props.children)}):React.Children.map(d,(be,it)=>{React.isValidElement(be)&&it===H&&(Se=be==null?void 0:be.props.children)});const Re=c||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Re},p&&React.createElement(Ns,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:K,value:L||H,onChange:te},d),React.createElement(Divider,null),React.createElement(CardContent,null,Se),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,...c}=n,d=Zs();return React.createElement(Tab,{disableRipple:!0,classes:d,...c})}},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 l=(0,r.CT)("analytics-context"),h=()=>{const a=(0,t.useContext)(l);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(l.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),l=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,l.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 R},NW:function(){return x},VE:function(){return _},W0:function(){return I},gP:function(){return $},F4:function(){return h},ux:function(){return m},Kp:function(){return l},$4:function(){return O},p_:function(){return a},ZM:function(){return w},D:function(){return v},gW:function(){return s},E6:function(){return J}});var r=e(86833),t;(function(ee){const Ae="SignedIn";ee.SignedIn=Ae;const ke="SignedOut";ee.SignedOut=ke})(t||(t={}));const l=(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"}),R=(0,r.createApiRef)({id:"core.config"}),x=(0,r.createApiRef)({id:"core.discovery"}),_=(0,r.createApiRef)({id:"core.error"});var M;(function(ee){ee[ee.None=0]="None";const ke=1;ee[ee.Active=ke]="Active"})(M||(M={}));const I=(0,r.createApiRef)({id:"core.featureflags"}),$=(0,r.createApiRef)({id:"core.fetch"}),O=(0,r.createApiRef)({id:"core.identity"}),w=(0,r.createApiRef)({id:"core.oauthrequest"}),J=(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(l){return new r(l)}},25182:function(q,i,e){"use strict";e.d(i,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}: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),l=e(16362),h=e.n(l);e.o(l,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(i,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(i,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(i,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(i,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(i,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(i,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(i,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(i,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(i,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(i,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(i,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(i,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(i,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(i,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(i,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return l.useRouteRefParams}});var v=e(25182)},16362:function(){},5761:function(q,i,e){"use strict";e.d(i,{I_:function(){return l},h_:function(){return h}});var r=e(2784),t=e(76241);function l(){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=l().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=l(),b={};for(const R in m)if(m.hasOwnProperty(R)){const x=m[R],_=A.get(x);if(!_)throw new Error(`No implementation available for ${x}`);b[R]=_}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),l=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 l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const h=l.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},74181:function(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),l="__backstage_data";function h(I,$,O){var ee;const w=I;let J=(ee=w[l])!=null?ee:t.get(I);if(J||(J={map:new Map},Object.defineProperty(w,l,{enumerable:!1,configurable:!0,writable:!1,value:J}),t.set(I,J)),J.map.has($)){const Ae=I.displayName||I.name;throw new Error(`Attempted to attach duplicate data "${$}" to component "${Ae}"`)}J.map.set($,O)}function v(I,$){var J;if(!I)return;const O=I.type;if(!O)return;const w=(J=O[l])!=null?J:t.get(O);if(!!w)return w.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(O){return{error:O}}render(){const{error:O}=this.state,{app:w,plugin:J}=this.props,{ErrorBoundaryFallback:ee}=w.getComponents();return O?m.createElement(ee,{error:O,resetError:this.handleErrorReset,plugin:J}):this.props.children}}function u(I){const{component:$,mountPoint:O,name:w}=I;return b({component:{lazy:()=>$().then(J=>{const ee=ke=>{try{(0,f.tg)(O)}catch(He){if(typeof He=="object"&&He!==null){const{message:se}=He;if(typeof se=="string"&&se.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${O} 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 He}return m.createElement(J,{...ke})},Ae=w||J.displayName||J.name||"LazyComponent";return ee.displayName=`RoutableExtension(${Ae})`,ee},J=>Ae=>{const ke=(0,s.useApp)(),{BootErrorPage:He}=ke.getComponents();return m.createElement(He,{step:"load-chunk",error:J})})},data:{"core.mountPoint":O},name:w})}function A(I){const{component:$,name:O}=I;return b({component:$,name:O})}function b(I){const{data:$={},name:O}=I;O||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let w;if("lazy"in I.component){const ee=I.component.lazy;w=(0,m.lazy)(()=>ee().then(Ae=>({default:Ae})))}else w=I.component.sync;const J=O||w.displayName||w.name||"Component";return{expose(ee){const Ae=ke=>{const He=(0,s.useApp)(),{Progress:se}=He.getComponents(),ve=$==null?void 0:$["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(se,null)},m.createElement(y,{app:He,plugin:ee},m.createElement(a.fC,{attributes:{pluginId:ee.getId(),...O&&{extension:O},...ve&&{routeRef:ve.id}}},m.createElement(w,{...ke}))))};h(Ae,"core.plugin",ee);for(const[ke,He]of Object.entries($))h(Ae,ke,He);return Ae.displayName=`Extension(${J})`,Ae}}}var R=e(27399);function x(I,$,O,w){return m.Children.toArray(I).flatMap(J=>{if(!(0,m.isValidElement)(J))return[];if(J.type===m.Fragment)return x(J.props.children,$,O,w);if(v(J,"core.featureFlagged")){const ee=J.props;return("with"in ee?$.isActive(ee.with):!$.isActive(ee.without))?x(J.props.children,$,O,w):[]}if(O===void 0||O(J))return[J];if(w)throw new Error(w);return x(J.props.children,$,O,w)})}class _{constructor($,O){this.node=$,this.featureFlagsApi=O}selectByComponentData($){const O=x(this.node,this.featureFlagsApi,w=>v(w,$.key)!==void 0,$.withStrictError);return new _(O,this.featureFlagsApi)}findComponentData($){return x(this.node,this.featureFlagsApi,w=>v(w,$.key)!==void 0).map(w=>v(w,$.key)).filter(w=>w!==void 0)}getElements(){return x(this.node,this.featureFlagsApi)}}function M(I,$,O=[]){const w=(0,R.useApi)(R.featureFlagsApiRef),J=new _(I,w);return(0,m.useMemo)(()=>$(J),[I,...O])}},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 l.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 l=e(31311);e.o(l,"attachComponentData")&&e.d(i,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(i,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(i,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(i,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(i,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(i,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(i,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(i,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(i,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(i,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(i,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return l.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(l){return new r(l)}},82772:function(q,i,e){var R,x,_;"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 l{constructor(I,$){Q(this,R,"absolute");this.id=I,this.params=$}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}R=t;function h(M){var I;return new l(M.id,(I=M.params)!=null?I:[])}const v=/^\w+$/;class m{constructor(I,$,O,w){Q(this,x,"sub");this.id=I,this.path=$,this.parent=O,this.params=w}toString(){return`routeRef{type=sub,id=${this.id}}`}}x=t;function a(M){const{id:I,path:$,parent:O}=M,w=$.split("/").filter(Ae=>Ae.startsWith(":")).map(Ae=>Ae.substring(1)),J=[...O.params,...w];if(O.params.some(Ae=>w.includes(Ae)))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 Ae of w)if(!v.test(Ae))throw new Error(`SubRouteRef path has invalid param, got '${Ae}'`);return new m(I,$,O,J)}class s{constructor(I,$,O){Q(this,_,"external");this.id=I,this.params=$,this.optional=O}toString(){return`routeRef{type=external,id=${this.id}}`}}_=t;function f(M){var I;return new s(M.id,(I=M.params)!=null?I:[],Boolean(M.optional))}var y=e(2784),u=e(10289);function A(M){const I=(0,u.TH)(),$=(0,r.Vt)("routing-context");if(!$)throw new Error("Routing context is not available");const O=$.atVersion(1),w=(0,y.useMemo)(()=>O&&O.resolve(M,I),[O,M,I]);if(!$)throw new Error("useRouteRef used outside of routing context");if(!O)throw new Error("RoutingContext v1 not available");const J="optional"in M&&M.optional;if(!w&&!J)throw new Error(`No path for ${M}`);return w}function b(M){return(0,u.UO)()}},10179:function(q,i,e){"use strict";e.d(i,{SP:function(){return R},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 I=M;return!(typeof I.name!="string"||I.name===""||typeof I.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 I=M;if(typeof I.name!="string"||I.name==="")throw new Error(`Encountered error object without a name, got '${M}'`);if(typeof I.message!="string")throw new Error(`Encountered error object without a message, got '${M}'`)}var l=e(24852);function h(M,I){const $=serializeErrorInternal(M),O={name:"Unknown",message:"<no reason given>",...$};return I!=null&&I.includeStack||delete O.stack,O}function v(M){const I=(0,l.deserializeError)(M);return M.stack||(I.stack=void 0),I}function m(M){if(r(M)){const I=String(M);return I!=="[object Object]"?I:`${M.name}: ${M.message}`}return`unknown error '${M}'`}class a extends Error{constructor($,O){var J;let w=$;if(O!==void 0){const ee=m(O);w?w+=`; caused by ${ee}`:w=`caused by ${ee}`}super(w);Q(this,"cause");(J=Error.captureStackTrace)==null||J.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(O)?O: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 R extends a{constructor(I,$){super(I,$),this.name=r($)?$.name:"Error"}}async function x(M){var I;try{const $=await M.text();if($){if((I=M.headers.get("content-type"))!=null&&I.startsWith("application/json"))try{const O=JSON.parse($);if(O.error&&O.response)return O}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 O=await x($),w=O.response.statusCode||$.status,J=O.error.name||$.statusText,ee=`Request failed with ${w} ${J}`,Ae=v(O.error);return new _({message:ee,response:$,data:O,cause:Ae})}}},36356:function(q,i,e){var u,A,b,R,x;"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 l{constructor(I){bn(this,u,void 0);wn(this,u,I)}async getCredentials(I){const $=new URL(I.url),O=qe(this,u).find(w=>w.isUrlSupported($));if(!O)throw new Error(`No auth provider available for '${I.url}', see https://backstage.io/link?scm-auth`);return O.getCredentials(I)}}u=new WeakMap;const _=class{constructor(I,$,O,w){bn(this,A,void 0);bn(this,b,void 0);bn(this,R,void 0);bn(this,x,void 0);wn(this,A,$),wn(this,b,O),wn(this,R,w),wn(this,x,I)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:I,gitlab:$,azure:O,bitbucket:w})=>_.merge(_.forGithub(I),_.forGitlab($),_.forAzure(O),_.forBitbucket(w))})}static forAuthApi(I,$){return new _("generic",I,$.host,$.scopeMapping)}static forGithub(I,$){var w;const O=(w=$==null?void 0:$.host)!=null?w:"github.com";return new _("github",I,O,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(I,$){var w;const O=(w=$==null?void 0:$.host)!=null?w:"gitlab.com";return new _("gitlab",I,O,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(I,$){var w;const O=(w=$==null?void 0:$.host)!=null?w:"dev.azure.com";return new _("azure",I,O,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(I,$){var w;const O=(w=$==null?void 0:$.host)!=null?w:"bitbucket.org";return new _("bitbucket",I,O,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...I){return new l(I)}isUrlSupported(I){return I.host===qe(this,b)}getAdditionalScopesForProvider(I){var $,O;return!(I!=null&&I.customScopes)||qe(this,x)==="generic"?[]:(O=($=I.customScopes)==null?void 0:$[qe(this,x)])!=null?O:[]}async getCredentials(I){const{url:$,additionalScope:O,...w}=I,J=qe(this,R).default.slice();O!=null&&O.repoWrite&&J.push(...qe(this,R).repoWrite);const ee=this.getAdditionalScopesForProvider(O);ee.length&&J.push(...ee);const Ae=[...new Set(J)],ke=await qe(this,A).getAccessToken(Ae,w);return{token:ke,headers:{Authorization:`Bearer ${ke}`}}}};let h=_;A=new WeakMap,b=new WeakMap,R=new WeakMap,x=new WeakMap;var v=e(68370);class m{static fromConfig(I){return v.Lx.fromConfig(I)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var s=e(73250),f=e(2784);const y=M=>{var J;const{type:I}=M,$=(0,r.useApp)(),O=s.Z,w=I&&(J=$.getSystemIcon(I))!=null?J:O;return f.createElement(w,null)}},68370:function(q,i,e){var Ht,Dt,Pt,$t,Qt,Xt,an;"use strict";e.d(i,{Lx:function(){return rt},Pb:function(){return Ie}});var r=e(82717),t=e.n(r),l=e(76635);function h(U){const g=new URL("http://example.com");return g.host=U,g.host===U}function v(U){try{return new URL(U),!0}catch{return!1}}function m(U,g){return{list(){return U},byUrl(T){try{const B=typeof T=="string"?new URL(T):T;return U.find(k=>g(k)===B.host)}catch{return}},byHost(T){return U.find(B=>g(B)===T)}}}function a(U){const{url:g,base:T,lineNumber:B}=U;try{return new URL(g),g}catch{}let k;if(g.startsWith("/")){const{filepath:fe}=t()(T);k=new URL(T);const me=(0,l.trimEnd)(k.pathname.substring(0,k.pathname.length-fe.length),"/");k.pathname=`${me}${g}`}else k=new URL(g,T);return k.search=new URL(T).search,B&&(k.hash=`L${B}`),k.toString()}const s="amazonaws.com";function f(U){var Zt;const g=U.getOptionalString("endpoint"),T=(Zt=U.getOptionalBoolean("s3ForcePathStyle"))!=null?Zt:!1;let B,k;if(g){try{const mn=new URL(g);B=mn.host,k=mn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${g}' is not a valid URL`)}if(k!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${g}'`)}else B=s;const fe=U.getOptionalString("accessKeyId"),me=U.getOptionalString("secretAccessKey"),De=U.getOptionalString("roleArn"),ze=U.getOptionalString("externalId");return{host:B,endpoint:g,s3ForcePathStyle:T,accessKeyId:fe,secretAccessKey:me,roleArn:De,externalId:ze}}function y(U){const g=U.map(f);return g.some(T=>T.host===s)||g.push({host:s}),g}const Je=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=Je;Q(u,"factory",({config:g})=>{var B;const T=y((B=g.getOptionalConfigArray("integrations.awsS3"))!=null?B:[]);return m(T.map(k=>new Je(k)),k=>k.config.host)});const A="GB",Mn=class{constructor(g,T,B,k,fe,me){bn(this,Ht,void 0);bn(this,Dt,void 0);bn(this,Pt,void 0);bn(this,$t,void 0);bn(this,Qt,void 0);bn(this,Xt,void 0);bn(this,an,(...g)=>{const T=new URL(qe(this,Ht));return T.pathname=g.map(B=>encodeURIComponent(B)).join("/"),T});wn(this,Ht,g),wn(this,Dt,T),wn(this,Pt,B),wn(this,$t,k),wn(this,Qt,fe),wn(this,Xt,me)}static fromRepoUrl(g){var mn;const T=new URL(g);let B,k,fe;const me=T.pathname.split("/").map(zn=>decodeURIComponent(zn));if(me[2]==="_git"?(B=me[1],k=fe=me[3]):me[3]==="_git"&&(B=me[1],k=me[2],fe=me[4]),!B||!k||!fe)throw new Error("Azure URL must point to a git repository");const De=(mn=T.searchParams.get("path"))!=null?mn:void 0;let ze;const Zt=T.searchParams.get("version");if(Zt){if(Zt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");ze=Zt.slice(2)}return new Mn(T.origin,B,k,fe,De,ze)}toRepoUrl(){let g;return qe(this,Pt)===qe(this,$t)?g=qe(this,an).call(this,qe(this,Dt),"_git",qe(this,$t)):g=qe(this,an).call(this,qe(this,Dt),qe(this,Pt),"_git",qe(this,$t)),qe(this,Qt)&&g.searchParams.set("path",qe(this,Qt)),qe(this,Xt)&&g.searchParams.set("version",A+qe(this,Xt)),g.toString()}toFileUrl(){if(!qe(this,Qt))throw new Error("Azure URL must point to a specific path to be able to download a file");const g=qe(this,an).call(this,qe(this,Dt),qe(this,Pt),"_apis","git","repositories",qe(this,$t),"items");return g.searchParams.set("api-version","6.0"),g.searchParams.set("path",qe(this,Qt)),qe(this,Xt)&&g.searchParams.set("version",qe(this,Xt)),g.toString()}toArchiveUrl(){const g=qe(this,an).call(this,qe(this,Dt),qe(this,Pt),"_apis","git","repositories",qe(this,$t),"items");return g.searchParams.set("recursionLevel","full"),g.searchParams.set("download","true"),g.searchParams.set("api-version","6.0"),qe(this,Qt)&&g.searchParams.set("scopePath",qe(this,Qt)),qe(this,Xt)&&g.searchParams.set("version",qe(this,Xt)),g.toString()}toCommitsUrl(){const g=qe(this,an).call(this,qe(this,Dt),qe(this,Pt),"_apis","git","repositories",qe(this,$t),"commits");return g.searchParams.set("api-version","6.0"),qe(this,Xt)&&g.searchParams.set("searchCriteria.itemVersion.version",qe(this,Xt)),g.toString()}getOwner(){return qe(this,Dt)}getProject(){return qe(this,Pt)}getRepo(){return qe(this,$t)}getPath(){return qe(this,Qt)}getRef(){return qe(this,Xt)}};let b=Mn;Ht=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,$t=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,an=new WeakMap;const R="dev.azure.com";function x(U){var B;const g=(B=U.getOptionalString("host"))!=null?B:R,T=U.getOptionalString("token");if(!h(g))throw new Error(`Invalid Azure integration config, '${g}' is not a valid host`);return{host:g,token:T}}function _(U){const g=U.map(x);return g.some(T=>T.host===R)||g.push({host:R}),g}const fn=class{constructor(g){this.integrationConfig=g}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){var k;const{url:T,base:B}=g;if(v(T))return T;try{const fe=b.fromRepoUrl(B),me=new URL(B),De=new URL(`https://a.com${(k=fe.getPath())!=null?k:""}`),ze=new URL(T,De).pathname;return me.searchParams.set("path",ze),g.lineNumber&&(me.searchParams.set("line",String(g.lineNumber)),me.searchParams.set("lineEnd",String(g.lineNumber+1)),me.searchParams.set("lineStartColumn","1"),me.searchParams.set("lineEndColumn","1")),me.toString()}catch{return new URL(T,B).toString()}}resolveEditUrl(g){return g}};let M=fn;Q(M,"factory",({config:g})=>{var B;const T=_((B=g.getOptionalConfigArray("integrations.azure"))!=null?B:[]);return m(T.map(k=>new fn(k)),k=>k.config.host)});var I=e(48834).Buffer;function $(U){return AzureUrl.fromRepoUrl(U).toFileUrl()}function O(U){return AzureUrl.fromRepoUrl(U).toArchiveUrl()}function w(U){return AzureUrl.fromRepoUrl(U).toCommitsUrl()}function J(U,g){const T=g?{...g}:{};if(U.token){const B=I.from(`:${U.token}`,"utf8");T.Authorization=`Basic ${B.toString("base64")}`}return{headers:T}}const ee="bitbucket.org",Ae="https://api.bitbucket.org/2.0";function ke(U){var me;const g=(me=U.getOptionalString("host"))!=null?me:ee;let T=U.getOptionalString("apiBaseUrl");const B=U.getOptionalString("token"),k=U.getOptionalString("username"),fe=U.getOptionalString("appPassword");if(!h(g))throw new Error(`Invalid Bitbucket integration config, '${g}' is not a valid host`);return T?T=(0,l.trimEnd)(T,"/"):g===ee?T=Ae:T=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:T,token:B,username:k,appPassword:fe}}function He(U){const g=U.map(ke);return g.some(T=>T.host===ee)||g.push({host:ee,apiBaseUrl:Ae}),g}const rn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const T=a(g);if(!g.lineNumber)return T;const B=new URL(T);return this.integrationConfig.host==="bitbucket.org"?B.hash=`lines-${g.lineNumber}`:B.hash=`${g.lineNumber}`,B.toString()}resolveEditUrl(g){const T=t()(g),B=new URL(g);return B.searchParams.set("mode","edit"),B.searchParams.set("spa","0"),B.searchParams.set("at",T.ref),B.toString()}};let se=rn;Q(se,"factory",({config:g})=>{var B,k,fe;const T=He((fe=g.getOptionalConfigArray("integrations.bitbucket"))!=null?fe:[...(B=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?B:[],...(k=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?k:[]]);return m(T.map(me=>new rn(me)),me=>me.config.host)});var ve=e(96279),Le=e(48834).Buffer;async function je(U,g){const{name:T,owner:B,resource:k}=parseGitUrl(U),fe=k==="bitbucket.org";let me=fe?`${g.apiBaseUrl}/repositories/${B}/${T}`:`${g.apiBaseUrl}/projects/${B}/repos/${T}/default-branch`,De=await fetch(me,tt(g));if(De.status===404&&!fe&&(me=`${g.apiBaseUrl}/projects/${B}/repos/${T}/branches/default`,De=await fetch(me,tt(g))),!De.ok){const Zt=`Failed to retrieve default branch from ${me}, ${De.status} ${De.statusText}`;throw new Error(Zt)}let ze;if(fe)ze=(await De.json()).mainbranch.name;else{const{displayId:Zt}=await De.json();ze=Zt}if(!ze)throw new Error(`Failed to read default branch from ${me}. Response ${De.status} ${De.json()}`);return ze}async function Xe(U,g){const{name:T,owner:B,ref:k,protocol:fe,resource:me,filepath:De}=parseGitUrl(U),ze=me==="bitbucket.org";let Zt=k;Zt||(Zt=await je(U,g));const mn=De?`&path=${encodeURIComponent(De)}`:"";return ze?`${fe}://${me}/${B}/${T}/get/${Zt}.tar.gz`:`${g.apiBaseUrl}/projects/${B}/repos/${T}/archive?format=tgz&at=${Zt}&prefix=${B}-${T}${mn}`}function at(U,g){try{const{owner:T,name:B,ref:k,filepathtype:fe,filepath:me}=parseGitUrl(U);if(!T||!B||fe!=="browse"&&fe!=="raw"&&fe!=="src")throw new Error("Invalid Bitbucket URL or file path");const De=me.replace(/^\//,"");if(g.host==="bitbucket.org"){if(!k)throw new Error("Invalid Bitbucket URL or file path");return`${g.apiBaseUrl}/repositories/${T}/${B}/src/${k}/${De}`}return`${g.apiBaseUrl}/projects/${T}/repos/${B}/raw/${De}?at=${k}`}catch(T){throw new Error(`Incorrect URL: ${U}, ${T}`)}}function tt(U){const g={};if(U.token)g.Authorization=`Bearer ${U.token}`;else if(U.username&&U.appPassword){const T=Le.from(`${U.username}:${U.appPassword}`,"utf8");g.Authorization=`Basic ${T.toString("base64")}`}return{headers:g}}const Te="bitbucket.org",Ze="https://api.bitbucket.org/2.0";function Ve(U){const g=Te,T=Ze,B=U.getString("username"),k=U.getString("appPassword");return{host:g,apiBaseUrl:T,username:B,appPassword:k}}function Ye(U){const g=U.map(Ve);return g.length===0&&g.push({host:Te,apiBaseUrl:Ze}),g}const $n=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const T=a(g);if(g.lineNumber){const B=new URL(T);return B.hash=`lines-${g.lineNumber}`,B.toString()}return T}resolveEditUrl(g){const T=t()(g),B=new URL(g);return B.searchParams.set("mode","edit"),B.searchParams.set("at",T.ref),B.toString()}};let gt=$n;Q(gt,"factory",({config:g})=>{var B;const T=Ye((B=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?B:[]);return m(T.map(k=>new $n(k)),k=>k.config.host)});var wt=e(48834).Buffer;async function pt(U,g){const{name:T,owner:B}=parseGitUrl(U),k=`${g.apiBaseUrl}/repositories/${B}/${T}`,fe=await fetch(k,Ot(g));if(!fe.ok){const ze=`Failed to retrieve default branch from ${k}, ${fe.status} ${fe.statusText}`;throw new Error(ze)}const De=(await fe.json()).mainbranch.name;if(!De)throw new Error(`Failed to read default branch from ${k}. Response ${fe.status} ${fe.json()}`);return De}async function Ut(U,g){const{name:T,owner:B,ref:k,protocol:fe,resource:me}=parseGitUrl(U);let De=k;return De||(De=await pt(U,g)),`${fe}://${me}/${B}/${T}/get/${De}.tar.gz`}function Vt(U,g){try{const{owner:T,name:B,ref:k,filepathtype:fe,filepath:me}=parseGitUrl(U);if(!T||!B||fe!=="src"&&fe!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const De=me.replace(/^\//,"");if(!k)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${g.apiBaseUrl}/repositories/${T}/${B}/src/${k}/${De}`}catch(T){throw new Error(`Incorrect URL: ${U}, ${T}`)}}function Ot(U){const g={};if(U.username&&U.appPassword){const T=wt.from(`${U.username}:${U.appPassword}`,"utf8");g.Authorization=`Basic ${T.toString("base64")}`}return{headers:g}}function Kt(U){const g=U.getString("host");let T=U.getOptionalString("apiBaseUrl");const B=U.getOptionalString("token");if(!h(g))throw new Error(`Invalid Bitbucket Server integration config, '${g}' is not a valid host`);return T?T=(0,l.trimEnd)(T,"/"):T=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:T,token:B}}function Wt(U){return U.map(Kt)}const jn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const T=a(g);if(g.lineNumber){const B=new URL(T),k=B.pathname.split("/").slice(-1)[0];return B.hash=`${k}-${g.lineNumber}`,B.toString()}return T}resolveEditUrl(g){const T=t()(g),B=new URL(g);return B.searchParams.set("mode","edit"),B.searchParams.set("spa","0"),B.searchParams.set("at",T.ref),B.toString()}};let Nt=jn;Q(Nt,"factory",({config:g})=>{var B;const T=Wt((B=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?B:[]);return m(T.map(k=>new jn(k)),k=>k.config.host)});async function En(U,g){const{name:T,owner:B}=parseGitUrl(U);let k=`${g.apiBaseUrl}/projects/${B}/repos/${T}/default-branch`,fe=await fetch(k,dn(g));if(fe.status===404&&(k=`${g.apiBaseUrl}/projects/${B}/repos/${T}/branches/default`,fe=await fetch(k,dn(g))),!fe.ok){const ze=`Failed to retrieve default branch from ${k}, ${fe.status} ${fe.statusText}`;throw new Error(ze)}const{displayId:me}=await fe.json(),De=me;if(!De)throw new Error(`Failed to read default branch from ${k}. Response ${fe.status} ${fe.json()}`);return De}async function kt(U,g){const{name:T,owner:B,ref:k,filepath:fe}=parseGitUrl(U);let me=k;me||(me=await En(U,g));const De=fe?`&path=${encodeURIComponent(fe)}`:"";return`${g.apiBaseUrl}/projects/${B}/repos/${T}/archive?format=tgz&at=${me}&prefix=${B}-${T}${De}`}function Rt(U,g){try{const{owner:T,name:B,ref:k,filepathtype:fe,filepath:me}=parseGitUrl(U);if(!T||!B||fe!=="browse"&&fe!=="raw"&&fe!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const De=me.replace(/^\//,"");return`${g.apiBaseUrl}/projects/${T}/repos/${B}/raw/${De}?at=${k}`}catch(T){throw new Error(`Incorrect URL: ${U}, ${T}`)}}function dn(U){const g={};return U.token&&(g.Authorization=`Bearer ${U.token}`),{headers:g}}function ie(U){const g=U.getString("host");let T=U.getOptionalString("baseUrl"),B=U.getOptionalString("gitilesBaseUrl");const k=U.getOptionalString("username"),fe=U.getOptionalString("password");if(h(g)){if(T&&!v(T))throw new Error(`Invalid Gerrit integration config, '${T}' is not a valid baseUrl`);if(B&&!v(B))throw new Error(`Invalid Gerrit integration config, '${B}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${g}' is not a valid host`);return T?T=(0,l.trimEnd)(T,"/"):T=`https://${g}`,B?B=(0,l.trimEnd)(B,"/"):B=`https://${g}`,{host:g,baseUrl:T,gitilesBaseUrl:B,username:k,password:fe}}function j(U){return U.map(ie)}const Yn=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:T,base:B,lineNumber:k}=g;let fe;return T?fe=new URL(T,B):fe=new URL(B),k&&(fe.hash=k.toString()),fe.toString()}resolveEditUrl(g){return g}};let ae=Yn;Q(ae,"factory",({config:g})=>{var B;const T=j((B=g.getOptionalConfigArray("integrations.gerrit"))!=null?B:[]);return m(T.map(k=>new Yn(k)),k=>k.config.host)});var le=e(48834).Buffer;const Ee=")]}'";function xe(U,g){const B=g.replace(U.gitilesBaseUrl,"").split("/").filter(Zt=>!!Zt),k=B.indexOf("+");if(k<=0)throw new Error(`Unable to parse project from url: ${g}`);const fe=trimStart(B.slice(0,k).join("/"),"/"),me=B.indexOf("heads");if(me<=0)throw new Error(`Unable to parse branch from url: ${g}`);const De=B[me+1],ze=B.slice(me+2).join("/");return{branch:De,filePath:ze===""?"/":ze,project:fe}}function Ue(U){return U.password?"/a/":"/"}function Ce(U,g){const{branch:T,filePath:B,project:k}=xe(U,g);return`${U.baseUrl}${Ue(U)}projects/${encodeURIComponent(k)}/branches/${T}/files/${encodeURIComponent(B)}/content`}function Ge(U){return`${U.baseUrl}${Ue(U)}projects/`}function ft(U){const g={};if(!U.password)return g;const T=le.from(`${U.username}:${U.password}`,"utf8");return g.Authorization=`Basic ${T.toString("base64")}`,{headers:g}}async function Tt(U){const g=await U.text();if(g.startsWith(Ee))try{return JSON.parse(g.slice(Ee.length))}catch(T){throw new Error(`Invalid response from Gerrit: ${g.slice(0,10)} - ${T}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${g.slice(0,10)}`)}const dt="github.com",nt="https://api.github.com",xt="https://raw.githubusercontent.com";function yt(U){var me,De;const g=(me=U.getOptionalString("host"))!=null?me:dt;let T=U.getOptionalString("apiBaseUrl"),B=U.getOptionalString("rawBaseUrl");const k=U.getOptionalString("token"),fe=(De=U.getOptionalConfigArray("apps"))==null?void 0:De.map(ze=>({appId:ze.getNumber("appId"),clientId:ze.getString("clientId"),clientSecret:ze.getString("clientSecret"),webhookSecret:ze.getString("webhookSecret"),privateKey:ze.getString("privateKey"),allowedInstallationOwners:ze.getOptionalStringArray("allowedInstallationOwners")}));if(!h(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return T?T=(0,l.trimEnd)(T,"/"):g===dt&&(T=nt),B?B=(0,l.trimEnd)(B,"/"):g===dt&&(B=xt),{host:g,apiBaseUrl:T,rawBaseUrl:B,token:k,apps:fe}}function ge(U){const g=U.map(yt);return g.some(T=>T.host===dt)||g.push({host:dt,apiBaseUrl:nt,rawBaseUrl:xt}),g}function S(U,g,T){try{const{owner:B,name:k,ref:fe,filepathtype:me,filepath:De}=parseGitUrl(U);if(!B||!k||!fe||me!=="blob"&&me!=="raw"&&me!=="tree")throw new Error("Invalid GitHub URL or file path");const ze=De.replace(/^\//,"");return D(g,T)==="api"?`${g.apiBaseUrl}/repos/${B}/${k}/contents/${ze}?ref=${fe}`:`${g.rawBaseUrl}/${B}/${k}/${fe}/${ze}`}catch(B){throw new Error(`Incorrect URL: ${U}, ${B}`)}}function V(U,g){const T={};return D(U,g)==="api"&&(T.Accept="application/vnd.github.v3.raw"),g.token&&(T.Authorization=`token ${g.token}`),{headers:T}}function D(U,g){return U.apiBaseUrl&&(g.token||!U.rawBaseUrl)?"api":"raw"}class ce{constructor(){Q(this,"tokenCache",new Map);Q(this,"isNotExpired",g=>g.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(g,T){const B=this.tokenCache.get(g);if(B&&this.isNotExpired(B.expiresAt))return{accessToken:B.token};const k=await T();return this.tokenCache.set(g,k),{accessToken:k.token}}}const ue={Accept:"application/vnd.github.machine-man-preview+json"};class W{constructor(g,T){Q(this,"appClient");Q(this,"baseUrl");Q(this,"baseAuthConfig");Q(this,"cache",new ce);Q(this,"allowedInstallationOwners");this.allowedInstallationOwners=g.allowedInstallationOwners,this.baseUrl=T,this.baseAuthConfig={appId:g.appId,privateKey:g.privateKey.replace(/\\n/gm,`
|
|
31
|
+
`)},this.appClient=new Octokit({baseUrl:T,headers:ue,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(g,T){var me;const{installationId:B,suspended:k}=await this.getInstallationData(g);if(this.allowedInstallationOwners&&!((me=this.allowedInstallationOwners)!=null&&me.includes(g)))return{accessToken:void 0};if(k)throw new Error(`The GitHub application for ${g} is suspended`);const fe=T?`${g}/${T}`:g;return this.cache.getOrCreateToken(fe,async()=>{const De=await this.appClient.apps.createInstallationAccessToken({installation_id:B,headers:ue});if(T&&De.data.repository_selection==="selected"){const ze=new Octokit({baseUrl:this.baseUrl,auth:De.data.token});if(!(await ze.paginate(ze.apps.listReposAccessibleToInstallation)).some(zn=>zn.name===T))throw new Error(`The Backstage GitHub application used in the ${g} organization does not have access to a repository with the name ${T}`)}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 B=(await this.getInstallations()).find(fe=>{var me,De;return((De=(me=fe.account)==null?void 0:me.login)==null?void 0:De.toLocaleLowerCase("en-US"))===g.toLocaleLowerCase("en-US")});if(B)return{installationId:B.id,suspended:Boolean(B.suspended_by)};const k=new Error(`No app installation found for ${g} in ${this.baseAuthConfig.appId}`);throw k.name="NotFoundError",k}}class F{constructor(g){Q(this,"apps");var T,B;this.apps=(B=(T=g.apps)==null?void 0:T.map(k=>new W(k,g.apiBaseUrl)))!=null?B:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(T=>T.getInstallations()))).flat():[]}async getAppToken(g,T){if(this.apps.length===0)return;const B=await Promise.all(this.apps.map(De=>De.getInstallationCredentials(g,T).then(ze=>({credentials:ze,error:void 0}),ze=>({credentials:void 0,error:ze})))),k=B.find(De=>De.credentials);if(k)return k.credentials.accessToken;const me=B.map(De=>De.error).find(De=>De.name!=="NotFoundError");if(me)throw me}}class ne{constructor(g,T){this.githubAppCredentialsMux=g,this.token=T}async getCredentials(g){const T=parseGitUrl(g.url),B=T.owner||T.name,k=T.owner?T.name:void 0;let fe="app",me=await this.githubAppCredentialsMux.getAppToken(B,k);return me||(fe="token",me=this.token),{headers:me?{Authorization:`Bearer ${me}`}:void 0,token:me,type:fe}}}Q(ne,"create",null);class ye{static fromIntegrations(g){const T=new Map;return g.github.list().forEach(B=>{const k=SingleInstanceGithubCredentialsProvider.create(B.config);T.set(B.config.host,k)}),new ye(T)}constructor(g){this.providers=g}async getCredentials(g){const T=new URL(g.url),B=this.providers.get(T.host);if(!B)throw new Error(`There is no GitHub integration that matches ${g.url}. Please add a configuration for an integration.`);return B.getCredentials(g)}}const Jn=class{constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return Ie(a(g),"tree")}resolveEditUrl(g){return Ie(g,"edit")}};let pe=Jn;Q(pe,"factory",({config:g})=>{var B;const T=ge((B=g.getOptionalConfigArray("integrations.github"))!=null?B:[]);return m(T.map(k=>new Jn(k)),k=>k.config.host)});function Ie(U,g){return U.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(T,B,k,fe)=>`//${B}/${k}/${fe}/${g}/`)}const Be="gitlab.com",Ne="https://gitlab.com/api/v4";function mt(U){const g=U.getString("host");let T=U.getOptionalString("apiBaseUrl");const B=U.getOptionalString("token");let k=U.getOptionalString("baseUrl");if(T?T=(0,l.trimEnd)(T,"/"):g===Be&&(T=Ne),k?k=(0,l.trimEnd)(k,"/"):k=`https://${g}`,h(g)){if(!T||!v(T))throw new Error(`Invalid GitLab integration config, '${T}' is not a valid apiBaseUrl`);if(!v(k))throw new Error(`Invalid GitLab integration config, '${k}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${g}' is not a valid host`);return{host:g,token:B,apiBaseUrl:T,baseUrl:k}}function bt(U){const g=U.map(mt);return g.some(T=>T.host===Be)||g.push({host:Be,apiBaseUrl:Ne,baseUrl:`https://${Be}`}),g}async function st(U,g){if(U.includes("/-/blob/")){const T=await vt(U,g);return Qe(U,T).toString()}return Mt(U).toString()}function ut(U){const{token:g=""}=U;return{headers:{"PRIVATE-TOKEN":g}}}function Mt(U){try{const g=new URL(U),[T,B,k,fe,...me]=g.pathname.split("/");if(T!==""||B===""||k===""||fe!=="blob"||!me.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return g.pathname=[T,B,k,"raw",...me].join("/"),g}catch(g){throw new Error(`Incorrect url: ${U}, ${g}`)}}function Qe(U,g){try{const T=new URL(U),B=T.pathname.split("/-/blob/")[1],[k,...fe]=B.split("/");return T.pathname=["/api/v4/projects",g,"repository/files",encodeURIComponent(decodeURIComponent(fe.join("/"))),"raw"].join("/"),T.search=`?ref=${k}`,T}catch(T){throw new Error(`Incorrect url: ${U}, ${T}`)}}async function vt(U,g){const T=new URL(U);if(!T.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const B=T.pathname.split("/-/blob/")[0],k=new URL(`${T.origin}/api/v4/projects/${encodeURIComponent(B.replace(/^\//,""))}`),fe=await fetch(k.toString(),ut(g)),me=await fe.json();if(!fe.ok)throw new Error(`GitLab Error '${me.error}', ${me.error_description}`);return Number(me.id)}catch(B){throw new Error(`Could not get GitLab project ID for: ${U}, ${B}`)}}const Qn=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 Gt(g,"edit")}};let ct=Qn;Q(ct,"factory",({config:g})=>{var B;const T=bt((B=g.getOptionalConfigArray("integrations.gitlab"))!=null?B:[]);return m(T.map(k=>new Qn(k)),k=>k.config.host)});function Gt(U,g){return U.replace(/\/\-\/(blob|tree|edit)\//,`/-/${g}/`)}class rt{constructor(g){Q(this,"byType");this.byType=g}static fromConfig(g){return new rt({awsS3:u.factory({config:g}),azure:M.factory({config:g}),bitbucket:se.factory({config:g}),bitbucketCloud:gt.factory({config:g}),bitbucketServer:Nt.factory({config:g}),gerrit:ae.factory({config:g}),github:pe.factory({config:g}),gitlab:ct.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(T=>T.byUrl(g)).find(Boolean)}byHost(g){return Object.values(this.byType).map(T=>T.byHost(g)).find(Boolean)}resolveUrl(g){const T=this.byUrl(g.base);return T?T.resolveUrl(g):a(g)}resolveEditUrl(g){const T=this.byUrl(g);return T?T.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),l=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:z})=>a.UrlPatternDiscovery.compile(`${z.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:z})=>{const re=new a.ErrorAlerter(z,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(re,{hidden:!1}),re}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:z})=>a.WebStorage.create({errorApi:z})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:z,identityApi:re,discoveryApi:de})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:de}),a.FetchMiddlewares.injectIdentityAuth({identityApi:re,config:z})]})}),(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:z,oauthRequestApi:re,configApi:de})=>a.GoogleAuth.create({discoveryApi:z,oauthRequestApi:re,environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:de})=>a.MicrosoftAuth.create({discoveryApi:z,oauthRequestApi:re,environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:de})=>a.GithubAuth.create({discoveryApi:z,oauthRequestApi:re,defaultScopes:["read:user"],environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:de})=>a.OktaAuth.create({discoveryApi:z,oauthRequestApi:re,environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:de})=>a.GitlabAuth.create({discoveryApi:z,oauthRequestApi:re,environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:de})=>a.OneLoginAuth.create({discoveryApi:z,oauthRequestApi:re,environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:de})=>a.BitbucketAuth.create({discoveryApi:z,oauthRequestApi:re,defaultScopes:["team"],environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:de})=>a.AtlassianAuth.create({discoveryApi:z,oauthRequestApi:re,environment:de.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:f.RV,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:z,discovery:re,identity:de})=>f.iM.create({config:z,discovery:re,identity:de})})];var u=e(77277),A=e(9118),b=e(62833);function R({children:z}){return(0,h.GV)()?t.createElement(t.Fragment,null,z):t.createElement(h.VA,null,z)}const x=()=>t.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),_=({step:z,error:re})=>{let de="";return z==="load-config"?de=`The configuration failed to load, someone should have a look at this error: ${re.message}`:z==="load-chunk"&&(de=`Lazy loaded chunk failed to load, try to reload the page: ${re.message}`),t.createElement(R,null,t.createElement(A.ErrorPage,{status:"501",statusMessage:de}))},M=({error:z,resetError:re,plugin:de})=>t.createElement(A.ErrorPanel,{title:`Error in ${de==null?void 0:de.getId()}`,defaultExpanded:!0,error:z},t.createElement(u.Z,{variant:"outlined",onClick:re},"Retry")),I={Progress:A.Progress,Router:b.VK,NotFoundErrorPage:x,BootErrorPage:_,ErrorBoundaryFallback:M};var $=e(43642),O=e(80079),w=e(90941),J=e(32915),ee=e(40562),Ae=e(21853),ke=e(60744),He=e(66569),se=e(30254),ve=e(13384),Le=e(15933),je=e(58838),Xe=e(86737),at=e(4989),tt=e(44407),Te=e(18628),Ze=e(84219),Ve=e(98685),Ye=e(39781);const gt={brokenImage:O.Z,catalog:Te.Z,scaffolder:J.Z,techdocs:ee.Z,search:Ae.Z,chat:ke.Z,dashboard:He.Z,docs:se.Z,email:ve.Z,github:je.Z,group:Ze.Z,help:Xe.Z,"kind:api":Le.Z,"kind:component":tt.Z,"kind:domain":$.Z,"kind:group":Ze.Z,"kind:location":at.Z,"kind:system":w.Z,"kind:user":Ve.Z,user:Ve.Z,warning:Ye.Z};var wt=e(28981),pt=e(98192),Ut=e(15222),Vt=e(41547),Ot=e(87561);const Kt=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(Ut.Z,null),Provider:({children:z})=>t.createElement(Vt.Z,{theme:wt.lightTheme},t.createElement(Ot.ZP,null,z))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(pt.Z,null),Provider:({children:z})=>t.createElement(Vt.Z,{theme:wt.darkTheme},t.createElement(Ot.ZP,null,z))}];function Wt(z){var re,de,we;return(0,a.createSpecializedApp)({...z,apis:(re=z==null?void 0:z.apis)!=null?re:[],bindRoutes:z==null?void 0:z.bindRoutes,components:{...I,...z==null?void 0:z.components},configLoader:z==null?void 0:z.configLoader,defaultApis:y,icons:{...gt,...z==null?void 0:z.icons},plugins:(de=z==null?void 0:z.plugins)!=null?de:[],themes:(we=z==null?void 0:z.themes)!=null?we:Kt})}var Nt=e(82394),En=e.n(Nt),kt=e(48023),Rt=e(76635);async function dn({storageApi:z}){var At;const re=z.forBucket("settings"),de=z.forBucket("starredEntities"),we=re.snapshot("starredEntities").value;if(!(0,Rt.isArray)(we))return;const _e=new Set((At=de.snapshot("entityRefs").value)!=null?At:[]);we.filter(Rt.isString).map(Et=>Et.split(":")).filter(Et=>Et.length===4&&Et[0]==="entity").map(([Et,lt,ht,Ft])=>(0,kt.eE)({kind:lt,namespace:ht,name:Ft})).forEach(Et=>_e.add(Et)),await de.set("entityRefs",Array.from(_e)),await re.remove("starredEntities")}class ie{constructor(re){Q(this,"settingsStore");Q(this,"starredEntities");Q(this,"subscribers",new Set);Q(this,"observable",new(En())(re=>(re.next(new Set(this.starredEntities)),this.subscribers.add(re),()=>{this.subscribers.delete(re)})));var de;dn(re).then(),this.settingsStore=re.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((de=this.settingsStore.snapshot("entityRefs").value)!=null?de:[]),this.settingsStore.observe$("entityRefs").subscribe({next:we=>{var _e;this.starredEntities=new Set((_e=we.value)!=null?_e:[]),this.notifyChanges()}})}async toggleStarred(re){this.starredEntities.has(re)?this.starredEntities.delete(re):this.starredEntities.add(re),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const re of this.subscribers)re.next(new Set(this.starredEntities))}}var j=e(39398),ae=e(49782),le=e(79692);const Ee=(0,le.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function xe(z){const re=z.result,de=Ee();return React.createElement(Link,{to:re.location},React.createElement(ListItem,{alignItems:"flex-start",className:de.flexContainer},React.createElement(ListItemText,{className:de.itemText,primaryTypographyProps:{variant:"h6"},primary:re.title,secondary:re.text}),React.createElement(Box,null,re.kind&&React.createElement(Chip,{label:`Kind: ${re.kind}`,size:"small"}),re.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${re.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Ue=e(30097),Ce=e(53479),Ge=e(95544),ft=e(99688),Tt=e(12231),dt=e(86136),nt=e(49378),xt=e(85256),yt=e(61837),ge=e(79784),S=e(50758),V=e(49166),D=e(31654),ce=e(43054),ue=e(40749);const W="catalog-entity",F=(0,ue.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:W}),ne=(0,ue.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),ye=(0,ue.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:W}),pe=(0,ue.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:W}),Ie=(0,ue.J$)({name:"catalog.location.read",attributes:{action:"read"}}),Be=(0,ue.J$)({name:"catalog.location.create",attributes:{action:"create"}}),Ne=(0,ue.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),mt=(0,le.Z)({button:{color:"white"}});function bt(z){var ur;const{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:we,onInspectEntity:_e}=z,[At,Et]=(0,t.useState)(),lt=mt(),ht=(0,Ce.useEntityPermission)(ye),Ft=On=>{Et(On.currentTarget)},jt=()=>{Et(void 0)},gn=re&&[...re.map(On=>t.createElement(Tt.Z,{key:On.title,onClick:()=>{jt(),On.onClick()}},t.createElement(dt.Z,null,t.createElement(On.Icon,{fontSize:"small"})),t.createElement(nt.Z,{primary:On.title}))),t.createElement(xt.Z,{key:"the divider is here!"})],hn=(ur=!ht.allowed||(de==null?void 0:de.disableUnregister))!=null?ur:!1;return t.createElement(t.Fragment,null,t.createElement(yt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Ft,"data-testid":"menu-button",className:lt.button},t.createElement(ce.Z,null)),t.createElement(ge.ZP,{open:Boolean(At),onClose:jt,anchorEl:At,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(S.Z,null,gn,t.createElement(Tt.Z,{onClick:()=>{jt(),we()},disabled:hn},t.createElement(dt.Z,null,t.createElement(V.Z,{fontSize:"small"})),t.createElement(nt.Z,{primary:"Unregister entity"})),t.createElement(Tt.Z,{onClick:()=>{jt(),_e()}},t.createElement(dt.Z,null,t.createElement(D.Z,{fontSize:"small"})),t.createElement(nt.Z,{primary:"Inspect entity"})))))}const st="plugin.catalog.entityLayoutRoute",ut=()=>null;(0,s.attachComponentData)(ut,st,!0),(0,s.attachComponentData)(ut,"core.gatherMountPoints",!0);function Mt(z){const{entity:re,title:de}=z;return t.createElement(Ge.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Ge.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},de),re&&t.createElement(Ce.FavoriteEntity,{entity:re}))}function Qe(z,re,de,we){var lt,ht,Ft,jt,gn;const _e=(lt=z!=null?z:we==null?void 0:we.kind)!=null?lt:"",At=(ht=re!=null?re:we==null?void 0:we.metadata.namespace)!=null?ht:"";return{headerTitle:`${(gn=(jt=(Ft=we==null?void 0:we.metadata.title)!=null?Ft:de)!=null?jt:we==null?void 0:we.metadata.name)!=null?gn:""}${At&&At!==kt.zG?` in ${At}`:""}`,headerType:(()=>{let hn=_e.toLocaleLowerCase("en-US");return we&&we.spec&&"type"in we.spec&&(hn+=" \u2014 ",hn+=we.spec.type.toLocaleLowerCase("en-US")),hn})()}}function vt(z){var we;const{entity:re}=z,de=(0,Ce.getEntityRelations)(re,kt.S4);return t.createElement(t.Fragment,null,de.length>0&&t.createElement(A.HeaderLabel,{label:"Owner",value:t.createElement(Ce.EntityRefLinks,{entityRefs:de,defaultKind:"Group",color:"inherit"})}),((we=re.spec)==null?void 0:we.lifecycle)&&t.createElement(A.HeaderLabel,{label:"Lifecycle",value:re.spec.lifecycle}))}const ct=z=>{var P,Z,G;const{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:de,children:we}=z,{kind:_e,namespace:At,name:Et}=(0,s.useRouteRefParams)(Ce.entityRouteRef),{entity:lt,loading:ht,error:Ft}=(0,Ce.useAsyncEntity)(),jt=(0,h.TH)(),gn=(0,s.useElementFilter)(we,X=>X.selectByComponentData({key:st,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Y})=>{if(lt){if(Y.if&&!Y.if(lt))return[]}else return[];return[{path:Y.path,title:Y.title,children:Y.children,tabProps:Y.tabProps}]}),[lt]),{headerTitle:hn,headerType:ur}=Qe(_e,At,Et,lt),[On,dr]=(0,t.useState)(!1),[jr,er]=(0,t.useState)(!1),Vr=(0,h.s0)(),C=async()=>{dr(!1),er(!1),Vr("/")};return(0,t.useEffect)(()=>{dr(!1),er(!1)},[jt.pathname]),t.createElement(A.Page,{themeId:(G=(Z=(P=lt==null?void 0:lt.spec)==null?void 0:P.type)==null?void 0:Z.toString())!=null?G:"home"},t.createElement(A.Header,{title:t.createElement(Mt,{title:hn,entity:lt}),pageTitleOverride:hn,type:ur},lt&&t.createElement(t.Fragment,null,t.createElement(vt,{entity:lt}),t.createElement(bt,{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:de,onUnregisterEntity:()=>dr(!0),onInspectEntity:()=>er(!0)}))),ht&&t.createElement(A.Progress,null),lt&&t.createElement(A.RoutedTabs,{routes:gn}),Ft&&t.createElement(A.Content,null,t.createElement(ft.Z,{severity:"error"},Ft.toString())),!ht&&!Ft&&!lt&&t.createElement(A.Content,null,t.createElement(A.WarningPanel,{title:"Entity not found"},"There is no ",_e," with the requested"," ",t.createElement(A.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Ce.UnregisterEntityDialog,{open:On,entity:lt,onConfirm:C,onClose:()=>dr(!1)}),t.createElement(Ce.InspectEntityDialog,{open:jr,entity:lt,onClose:()=>er(!1)}))};ct.Route=ut;var Gt=e(10179);function rt(z){const{open:re,onClose:de,onConfirm:we,entity:_e}=z,[At,Et]=useState(!1),lt=useApi(catalogApiRef),ht=useApi(alertApiRef),Ft=async()=>{Et(!0);try{const jt=_e.metadata.uid;await lt.removeEntityByUid(jt),we()}catch(jt){assertError(jt),ht.post({message:jt.message})}finally{Et(!1)}};return React.createElement(Dialog,{open:re,onClose:de},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:At,onClick:Ft},"Delete"),React.createElement(Button,{onClick:de,color:"primary"},"Cancel")))}var Je=e(47851);function Ht(z){var re,de;return((de=(re=z==null?void 0:z.metadata)==null?void 0:re.annotations)==null?void 0:de["backstage.io/orphan"])==="true"}function Dt(){const z=useNavigate(),re=useRouteRef(rootRouteRef),[de,we]=useState(!1),{entity:_e}=useEntity(),At=async()=>{we(!1),z(re())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>we(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:de,entity:_e,onConfirm:At,onClose:()=>we(!1)}))}var Pt=e(30001);const $t=z=>z.error&&z.level==="error"&&z.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Qt(z,re){return{items:(await re.getEntityAncestors({entityRef:z})).items.map(_e=>{var lt,ht;return{errors:((ht=(lt=_e.entity.status)==null?void 0:lt.items)!=null?ht:[]).filter($t).map(Ft=>Ft.error).filter(Ft=>Boolean(Ft)),entity:_e.entity}}).filter(_e=>_e.errors.length>0)}}async function Xt(z,re){const de=re.apis.get(catalogApiRef);if(!de)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Qt(stringifyEntityRef(z),de)).items.length>0}function an(){const{entity:z}=useEntity(),re=stringifyEntityRef(z),de=useApi(catalogApiRef),{loading:we,error:_e,value:At}=useAsync(async()=>Qt(re,de),[re,de]);return _e?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:_e})):we||!At?null:React.createElement(React.Fragment,null,At.items.map((Et,lt)=>React.createElement(Box,{key:lt,mb:1},stringifyEntityRef(z)!==stringifyEntityRef(Et.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:Et.entity})),Et.errors.map((ht,Ft)=>React.createElement(ResponseErrorPanel,{key:Ft,error:ht})))))}var Mn=e(64279);const fn="core.backstage.entitySwitch",rn=z=>null;(0,s.attachComponentData)(rn,fn,!0);const $n=z=>{var Et,lt;const{entity:re,loading:de}=(0,Ce.useAsyncEntity)(),we=(0,s.useApiHolder)(),_e=(0,s.useElementFilter)(z.children,ht=>ht.selectByComponentData({key:fn,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Ft=>{var hn;if(de)return[];const{if:jt,children:gn}=Ft.props;return re?[{if:(hn=jt==null?void 0:jt(re,{apis:we}))!=null?hn:!0,children:gn}]:[{if:jt===void 0,children:gn}]}),[we,re,de]);return _e.some(ht=>typeof ht.if=="object"&&"then"in ht.if)?t.createElement(jn,{results:_e}):(lt=(Et=_e.find(ht=>ht.if))==null?void 0:Et.children)!=null?lt:null};function jn({results:z}){const{loading:re,value:de}=(0,Mn.default)(async()=>{var _e;const we=z.map(async({if:At,children:Et})=>{try{if(await At)return Et}catch{}return null});return(_e=(await Promise.all(we)).find(Boolean))!=null?_e:null},[z]);return re||!de?null:de}$n.Case=rn;const Yn=null,Jn=Ce.CatalogFilterLayout.Filters,Qn=Ce.CatalogFilterLayout.Content,U=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:Ce.catalogApiRef,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:z,fetchApi:re})=>new Pt.MS({discoveryApi:z,fetchApi:re})}),(0,s.createApiFactory)({api:Ce.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:z})=>new ie({storageApi:z})})],routes:{catalogIndex:Je._Z,catalogEntity:Ce.entityRouteRef},externalRoutes:{createComponent:Je.yw,viewTechDoc:Je.jU}}),g=U.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(z=>z.CatalogPage),mountPoint:Je._Z})),T=U.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(z=>z.CatalogEntityPage),mountPoint:Ce.entityRouteRef})),B=U.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(z=>z.AboutCard)}})),k=U.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(z=>z.EntityLinksCard)}})),fe=U.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(z=>z.HasSystemsCard)}})),me=U.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(z=>z.HasComponentsCard)}})),De=U.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(z=>z.HasSubcomponentsCard)}})),ze=U.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(z=>z.HasResourcesCard)}})),Zt=U.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(z=>z.DependsOnComponentsCard)}})),mn=U.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(z=>z.DependencyOfComponentsCard)}})),zn=U.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(z=>z.DependsOnResourcesCard)}})),br=U.provide((0,s.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(z=>z.RelatedEntitiesCard)}}));var gr=e(36356);class pr{constructor({configApi:re,discoveryApi:de,identityApi:we}){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");this.configApi=re,this.discoveryApi=de,this.identityApi=we}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(re,de){const _e=`${await this.getApiOrigin()}/${de}`,At=await fetch(`${_e.endsWith("/")?_e:`${_e}/`}index.html`);if(At.status===404)throw new Error("Page not found");return At.text()}async syncEntityDocs(re){return"cached"}async getBaseUrl(re,de,we){const _e=await this.getApiOrigin();return new URL(re,`${_e}/${we}`).toString()}}class rr{constructor({configApi:re,discoveryApi:de,identityApi:we}){Q(this,"configApi");Q(this,"discoveryApi");Q(this,"identityApi");this.configApi=re,this.discoveryApi=de,this.identityApi=we}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(re){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(re){return{site_name:"Live preview environment",site_description:""}}}const or=[(0,s.createApiFactory)({api:v.techdocsStorageApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:z,discoveryApi:re,identityApi:de})=>new pr({configApi:z,discoveryApi:re,identityApi:de})}),(0,s.createApiFactory)({api:v.techdocsApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:z,discoveryApi:re,identityApi:de})=>new rr({configApi:z,discoveryApi:re,identityApi:de})}),(0,s.createApiFactory)({api:gr.q3,deps:{configApi:s.configApiRef},factory:({configApi:z})=>gr.ae.fromConfig(z)})],Pr={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ir={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Lr(){const z=await fetch("/.detect");return z.ok?(await z.text()).trim()==="techdocs-cli-server":!1}async function Wn(){const z=await(0,a.defaultConfigLoader)(),re=await Lr();return[...z,{context:"detected",data:re?Pr:Ir}]}var vn=e(86689),Xn=e(58845);const qn=(0,le.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var xr=()=>{const z=qn();return t.createElement("svg",{className:z.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:z.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 ar=(0,le.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Dr=()=>{const z=ar();return t.createElement("svg",{className:z.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:z.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 ir=(0,le.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}}),Pn=()=>{const z=ir(),{isOpen:re}=(0,t.useContext)(A.SidebarContext);return t.createElement("div",{className:z.root},t.createElement(vn.Z,{component:b.OL,to:"/docs/default/component/local/",underline:"none",className:z.link},re?t.createElement(xr,null):t.createElement(Dr,null)))},sr=({children:z})=>t.createElement(A.SidebarPage,null,t.createElement(A.Sidebar,null,t.createElement(Pn,null),t.createElement(A.SidebarDivider,null),t.createElement(A.SidebarItem,{icon:Xn.Z,to:"/docs/default/component/local",text:"Docs Preview"})),z);var _n=e(80030),yr=e(32388),Er=e(4142);const Fr=(0,le.Z)(z=>({headerIcon:{color:z.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:z.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var In;(function(z){const re="light";z.LIGHT=re;const de="dark";z.DARK=de})(In||(In={}));const cr=()=>{const z=(0,s.useApi)(s.appThemeApiRef),re=Fr(),[de,we]=(0,t.useState)(z.getActiveThemeId()||In.LIGHT),_e={[In.LIGHT]:{icon:Er.Z,title:"Dark theme"},[In.DARK]:{icon:yr.Z,title:"Light theme"}},{title:At,icon:Et}=_e[de],lt=()=>{we(ht=>{const Ft=ht===In.LIGHT?In.DARK:In.LIGHT;return z.setActiveThemeId(Ft),Ft})};return t.createElement(Ge.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(_n.ZP,{title:At,arrow:!0},t.createElement(yt.Z,{size:"small",onClick:lt},t.createElement(Et,{className:re.headerIcon}))))},Br=()=>t.createElement(v.TechDocsReaderPage,null,t.createElement(v.TechDocsReaderPageHeader,null),t.createElement(v.TechDocsReaderPageContent,{withSearch:!1})),wr=t.createElement(Br,null),lr=Wt({apis:or,configLoader:Wn,plugins:Object.values(r)}),Mr=lr.getProvider(),vr=lr.getRouter(),$r=v.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:cr,location:m.oZ.Header})),Ar=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(T,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 Ln=()=>t.createElement(Mr,null,t.createElement(vr,null,t.createElement(sr,null,Ar)));l.render(t.createElement(Ln,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 l={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(R,x){const M=`linear-gradient(90deg, ${(R.length===1?[R[0],R[0]]:R).join(", ")})`,I=`${x}, ${M}`;return{colors:R,shape:x,backgroundImage:I}}const m={home:v(h.teal,l.wave),documentation:v(h.pinkSea,l.wave2),tool:v(h.purpleSky,l.round),service:v(h.marineBlue,l.wave),website:v(h.veryBlue,l.wave),library:v(h.rubyRed,l.wave),other:v(h.darkGrey,l.wave),app:v(h.toastyOrange,l.wave),apis:v(h.teal,l.wave2)},a='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function s(R){const{palette:x,fontFamily:_=a,defaultPageTheme:M,pageTheme:I=m}=R;if(!I[M])throw new Error(`${M} is not defined in pageTheme.`);return{palette:x,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:I[M],getPageTheme:({themeId:$})=>{var O;return(O=I[$])!=null?O:I[M]}}}function f(R){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:R.typography.fontFamily},body:{height:"100%",fontFamily:R.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:R.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:R.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:R.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:R.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:R.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,t.darken)(R.palette.link,.3),background:(0,t.lighten)(R.palette.link,.95)},[R.breakpoints.up("md")]:{minWidth:120,fontSize:R.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:R.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:R.spacing(1),marginBottom:R.spacing(1),color:R.palette.grey[900]},outlined:{color:R.palette.text.primary},label:{lineHeight:`${R.spacing(2.5)}px`,fontWeight:R.typography.fontWeightMedium,fontSize:`${R.spacing(1.75)}px`},labelSmall:{fontSize:`${R.spacing(1.5)}px`},deleteIcon:{color:R.palette.grey[500],width:`${R.spacing(3)}px`,height:`${R.spacing(3)}px`,margin:`0 ${R.spacing(.75)}px 0 -${R.spacing(.75)}px`},deleteIconSmall:{width:`${R.spacing(2)}px`,height:`${R.spacing(2)}px`,margin:`0 ${R.spacing(.5)}px 0 -${R.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(R){const x=s(R),_=(0,r.Z)(x),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(),l=y=>`__@backstage/${y}__`;function h(y,u){const A=l(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 w},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return I},EntityKindFilter:function(){return ae},EntityLifecyclePicker:function(){return ut},EntityListProvider:function(){return wt},EntityOwnerPicker:function(){return ct},EntityRefLink:function(){return ie},EntityRefLinks:function(){return j},EntityTable:function(){return $t},EntityTagPicker:function(){return Mn},EntityTypePicker:function(){return $n},FavoriteEntity:function(){return g},InspectEntityDialog:function(){return At},UnregisterEntityDialog:function(){return gn},UserListPicker:function(){return er},catalogApiRef:function(){return l},entityRouteRef:function(){return Nt},getEntityRelations:function(){return Ze},getEntitySourceLocation:function(){return Ve},humanizeEntityRef:function(){return kt},starredEntitiesApiRef:function(){return h},useAsyncEntity:function(){return Ae},useEntity:function(){return ee},useEntityList:function(){return pt},useEntityOwnership:function(){return V},useEntityPermission:function(){return ce},useRelatedEntities:function(){return dt},useStarredEntities:function(){return yt}});var r=e(30001),t=e(36964);const l=(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(P=>(P.next(new Set(this.starredEntities)),this.subscribers.add(P),()=>{this.subscribers.delete(P)})))}async toggleStarred(P){this.starredEntities.delete(P)||this.starredEntities.add(P);for(const Z of this.subscribers)Z.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),R=e(60905),x=e(36444);const _=C=>{const P=(0,s.Z)(Y=>Y.breakpoints.down("md")),Z=(0,f.Z)(),[G,X]=(0,a.useState)(!1);return P?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:Z.spacing(1),marginLeft:Z.spacing(1)},onClick:()=>X(!0),startIcon:a.createElement(x.Z,null)},"Filters"),a.createElement(u.ZP,{open:G,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:Z.spacing(1)}},"Filters"),C.children))):a.createElement(R.Z,{item:!0,lg:2},C.children)},M=C=>a.createElement(R.Z,{item:!0,xs:12,lg:10},C.children),I=C=>a.createElement(R.Z,{container:!0,style:{position:"relative"}},C.children);I.Filters=_,I.Content=M;var $=e(76241);const O=(0,$.CT)("entity-context"),w=({children:C,entity:P,loading:Z,error:G,refresh:X})=>{const Y={entity:P,loading:Z,error:G,refresh:X};return a.createElement(O.Provider,{value:(0,$.EI)({1:Y})},C)},J=C=>React.createElement(w,{entity:C.entity,loading:!Boolean(C.entity),error:void 0,refresh:void 0,children:C.children});function ee(){const C=(0,$.Vt)("entity-context");if(!C)throw new Error("Entity context is not available");const P=C.atVersion(1);if(!P)throw new Error("EntityContext v1 not available");if(!P.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:P.entity}}function Ae(){const C=(0,$.Vt)("entity-context");if(!C)throw new Error("Entity context is not available");const P=C.atVersion(1);if(!P)throw new Error("EntityContext v1 not available");const{entity:Z,loading:G,error:X,refresh:Y}=P;return{entity:Z,loading:G,error:X,refresh:Y}}var ke=e(76635),He=e(19126),se=e.n(He),ve=e(10289),Le=e(69294),je=e(48760),Xe=e(90736);function at(C){return C.reduce((P,Z)=>({...P,...Z.getCatalogFilters?Z.getCatalogFilters():{}}),{})}function tt(C){return P=>C.every(Z=>!Z.filterEntity||Z.filterEntity(P))}var Te=e(48023);function Ze(C,P,Z){var X;let G=((X=C==null?void 0:C.relations)==null?void 0:X.filter(Y=>Y.type===P).map(Y=>(0,Te.of)(Y.targetRef)))||[];return Z!=null&&Z.kind&&(G=G.filter(Y=>Y.kind.toLocaleLowerCase("en-US")===Z.kind.toLocaleLowerCase("en-US"))),G}function Ve(C,P){var G;const Z=(G=C.metadata.annotations)==null?void 0:G[Te.M6];if(!!Z)try{const X=(0,Te.Ou)(Z),Y=P.byUrl(X.target);return{locationTargetUrl:X.target,integrationType:Y==null?void 0:Y.type}}catch{return}}function Ye(C,P){const Z=new Set([...getEntityRelations(C,RELATION_MEMBER_OF,{kind:"group"}),...C?[getCompoundEntityRef(C)]:[]].map(stringifyEntityRef)),G=getEntityRelations(P,RELATION_OWNED_BY).map(stringifyEntityRef);for(const X of G)if(Z.has(X))return!0;return!1}const gt=(0,a.createContext)(void 0),wt=({children:C})=>{const P=(0,Xe.default)(),Z=(0,t.useApi)(l),[G,X]=(0,a.useState)({}),Y=(0,ve.TH)(),he=(0,a.useMemo)(()=>{var et;return(et=se().parse(Y.search,{ignoreQueryPrefix:!0}).filters)!=null?et:{}},[Y]),[Pe,$e]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:Oe,error:Fe},Me]=(0,Le.default)(async()=>{var An;const et=(0,ke.compact)(Object.values(G)),We=tt(et),zt=at(et),_t=at((0,ke.compact)(Object.values(Pe.appliedFilters))),Vn=Object.keys(G).reduce((cn,pn)=>{const xn=G[pn];return xn!=null&&xn.toQueryValue&&(cn[pn]=xn.toQueryValue()),cn},{});if((0,ke.isEqual)(_t,zt))$e({appliedFilters:G,backendEntities:Pe.backendEntities,entities:Pe.backendEntities.filter(We)});else{const cn=await Z.getEntities({filter:zt});$e({appliedFilters:G,backendEntities:cn.items,entities:cn.items.filter(We)})}if(P()){const cn=se().parse(Y.search,{ignoreQueryPrefix:!0}),pn=se().stringify({...cn,filters:Vn},{addQueryPrefix:!0,arrayFormat:"repeat"}),xn=`${window.location.pathname}${pn}`;(An=window.history)==null||An.replaceState(null,document.title,xn)}},[Z,he,G,Pe],{loading:!0});(0,je.Z)(Me,10,[G]);const Ke=(0,a.useCallback)(et=>{X(We=>{const zt=typeof et=="function"?et(We):et;return{...We,...zt}})},[]),St=(0,a.useMemo)(()=>({filters:Pe.appliedFilters,entities:Pe.entities,backendEntities:Pe.backendEntities,updateFilters:Ke,queryParameters:he,loading:Oe,error:Fe}),[Pe,Ke,he,Oe,Fe]);return a.createElement(gt.Provider,{value:St},C)};function pt(){const C=(0,a.useContext)(gt);if(!C)throw new Error("useEntityList must be used within EntityListProvider");return C}var Ut=e(64279),Vt=e(18149),Ot=e.n(Vt),Kt=e(829),Wt=e.n(Kt);const Nt=(0,$.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function En(C){var P,Z;return{kind:C.kind.toLocaleLowerCase("en-US"),namespace:(Z=(P=C.metadata.namespace)==null?void 0:P.toLocaleLowerCase("en-US"))!=null?Z:DEFAULT_NAMESPACE,name:C.metadata.name}}function kt(C,P){const Z=P==null?void 0:P.defaultKind;let G,X,Y;return"metadata"in C?(G=C.kind,X=C.metadata.namespace,Y=C.metadata.name):(G=C.kind,X=C.namespace,Y=C.name),X===Te.zG&&(X=void 0),G=G.toLocaleLowerCase("en-US"),G=Z&&Z.toLocaleLowerCase("en-US")===G?void 0:G,`${G?`${G}:`:""}${X?`${X}/`:""}${Y}`}var Rt=e(9118),dn=e(80030);const ie=(0,a.forwardRef)((C,P)=>{var et;const{entityRef:Z,defaultKind:G,title:X,children:Y,...he}=C,Pe=(0,t.useRouteRef)(Nt);let $e,Oe,Fe;if(typeof Z=="string"){const We=(0,Te.of)(Z);$e=We.kind,Oe=We.namespace,Fe=We.name}else"metadata"in Z?($e=Z.kind,Oe=Z.metadata.namespace,Fe=Z.metadata.name):($e=Z.kind,Oe=Z.namespace,Fe=Z.name);$e=$e.toLocaleLowerCase("en-US"),Oe=(et=Oe==null?void 0:Oe.toLocaleLowerCase("en-US"))!=null?et:Te.zG;const Me={kind:$e,namespace:Oe,name:Fe},Ke=kt({kind:$e,namespace:Oe,name:Fe},{defaultKind:G}),St=a.createElement(Rt.Link,{...he,ref:P,to:Pe(Me)},Y,!Y&&(X!=null?X:Ke));return X?a.createElement(dn.ZP,{title:Ke},St):St});function j(C){const{entityRefs:P,defaultKind:Z,...G}=C;return a.createElement(a.Fragment,null,P.map((X,Y)=>a.createElement(a.Fragment,{key:Y},Y>0&&", ",a.createElement(ie,{...G,entityRef:X,defaultKind:Z}))))}class ae{constructor(P){this.value=P}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class le{constructor(P){this.value=P}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class Ee{constructor(P){this.values=P}filterEntity(P){return this.values.every(Z=>{var G;return((G=P.metadata.tags)!=null?G:[]).includes(Z)})}toQueryValue(){return this.values}}class xe{constructor(P){this.value=P}filterEntity(P){var G;const Z=this.value.toLocaleUpperCase("en-US");return P.metadata.name.toLocaleUpperCase("en-US").includes(Z)||`${P.metadata.title}`.toLocaleUpperCase("en-US").includes(Z)||((G=P.metadata.tags)==null?void 0:G.join("").toLocaleUpperCase("en-US").indexOf(Z))!==-1}}class Ue{constructor(P){this.values=P}filterEntity(P){return this.values.some(Z=>Ze(P,Te.S4).some(G=>kt(G,{defaultKind:"group"})===Z))}toQueryValue(){return this.values}}class Ce{constructor(P){this.values=P}filterEntity(P){return this.values.some(Z=>{var G;return((G=P.spec)==null?void 0:G.lifecycle)===Z})}toQueryValue(){return this.values}}class Ge{constructor(P,Z,G){this.value=P,this.isOwnedEntity=Z,this.isStarredEntity=G}filterEntity(P){switch(this.value){case"owned":return this.isOwnedEntity(P);case"starred":return this.isStarredEntity(P);default:return!0}}toQueryValue(){return this.value}}function ft(){var We;const C=(0,t.useApi)(l),{filters:{kind:P,type:Z},queryParameters:{type:G},updateFilters:X}=pt(),Y=(0,a.useMemo)(()=>[G].flat().filter(Boolean),[G]),[he,Pe]=(0,a.useState)(Y.length?Y:(We=Z==null?void 0:Z.getTypes())!=null?We:[]);(0,a.useEffect)(()=>{Y.length&&Pe(Y)},[Y]);const[$e,Oe]=(0,a.useState)([]),Fe=(0,a.useMemo)(()=>P==null?void 0:P.value,[P]),{error:Me,loading:Ke,value:St}=(0,Ut.default)(async()=>Fe?await C.getEntityFacets({filter:{kind:Fe},facets:["spec.type"]}).then(_t=>_t.facets["spec.type"]||[]):[],[Fe,C]),et=(0,a.useRef)(St);return(0,a.useEffect)(()=>{const zt=et.current;if(et.current=St,Ke||!Fe||zt===St||!St)return;const _t=Wt()(St,An=>-An.count).map(An=>An.value);Oe(_t);const Vn=he.filter(An=>_t.includes(An));Ot()(he,Vn)||Pe(Vn)},[Ke,Fe,he,Pe,St]),(0,a.useEffect)(()=>{X({type:he.length?new le(he):void 0})},[he,X]),{loading:Ke,error:Me,availableTypes:$e,selectedTypes:he,setSelectedTypes:Pe}}const Tt=20;function dt(C,P){var $e,Oe;const Z=($e=P==null?void 0:P.type)==null?void 0:$e.toLocaleLowerCase("en-US"),G=(Oe=P==null?void 0:P.kind)==null?void 0:Oe.toLocaleLowerCase("en-US"),X=(0,t.useApi)(l),{loading:Y,value:he,error:Pe}=(0,Ut.default)(async()=>{var et;const Fe=(et=C.relations)==null?void 0:et.map(We=>({type:We.type,target:(0,Te.of)(We.targetRef)})).filter(We=>(!Z||We.type.toLocaleLowerCase("en-US")===Z)&&(!G||We.target.kind===G));if(!Fe)return[];const Me=Object.values((0,ke.groupBy)(Fe,({target:We})=>`${We.kind}:${We.namespace}`.toLocaleLowerCase("en-US"))),Ke=[];for(const We of Me)Ke.push({kind:We[0].target.kind,namespace:We[0].target.namespace,nameBatches:(0,ke.chunk)(We.map(zt=>zt.target.name),Tt)});return(await Promise.all(Ke.flatMap(We=>We.nameBatches.map(zt=>X.getEntities({filter:{kind:We.kind,"metadata.namespace":We.namespace,"metadata.name":zt}}))))).flatMap(We=>We.items)},[C,Z,G]);return{entities:he,loading:Y,error:Pe}}var nt=e(72164);function xt(C){return typeof C=="string"?C:(0,Te.eE)(C)}function yt(){const C=(0,t.useApi)(h),P=(0,nt.Z)(C.starredEntitie$(),new Set),Z=(0,a.useCallback)(X=>P.has(xt(X)),[P]),G=(0,a.useCallback)(X=>C.toggleStarred(xt(X)).then(),[C]);return{starredEntities:P,toggleStarredEntity:G,isStarredEntity:Z}}function ge(C){return typeof C=="string"?C:(0,Te.eE)(C)}function S(C){const P=(0,t.useApi)(h),[Z,G]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const Y=P.starredEntitie$().subscribe({next(he){G(he.has(ge(C)))}});return()=>{Y.unsubscribe()}},[C,P]),{toggleStarredEntity:(0,a.useCallback)(()=>P.toggleStarred(ge(C)).then(),[C,P]),isStarredEntity:Z}}function V(){const C=(0,t.useApi)(t.identityApiRef),{loading:P,value:Z}=(0,Ut.default)(async()=>{const{ownershipEntityRefs:X}=await C.getBackstageIdentity();return X},[]),G=(0,a.useMemo)(()=>{const X=new Set(Z!=null?Z:[]);return Y=>{const he=Ze(Y,Te.S4).map(Te.eE);for(const Pe of he)if(X.has(Pe))return!0;return!1}},[Z]);return(0,a.useMemo)(()=>({loading:P,isOwnedEntity:G}),[P,G])}var D=e(68099);function ce(C){const{entity:P,loading:Z,error:G}=Ae(),{allowed:X,loading:Y,error:he}=(0,D.gI)({permission:C,resourceRef:P?(0,Te.eE)(P):void 0});return Z||Y?{loading:!0,allowed:!1}:G?{loading:!1,allowed:!1,error:G}:{loading:!1,allowed:X,error:he}}const ue=C=>{var he;const{initialFilter:P,hidden:Z}=C,{updateFilters:G,queryParameters:{kind:X}}=useEntityList(),[Y]=useState((he=[X].flat()[0])!=null?he:P);return useEffect(()=>{G({kind:Y?new EntityKindFilter(Y):void 0})},[Y,G]),Z?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var W=e(79692),F=e(5806),ne=e(21324),ye=e(86619),pe=e(19996),Ie=e(25505),Be=e(38016),Ne=e(88013);const mt=(0,W.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),bt=a.createElement(Ie.Z,{fontSize:"small"}),st=a.createElement(pe.Z,{fontSize:"small"}),ut=()=>{var Oe,Fe;const C=mt(),{updateFilters:P,backendEntities:Z,filters:G,queryParameters:{lifecycles:X}}=pt(),Y=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,Pe]=(0,a.useState)(Y.length?Y:(Fe=(Oe=G.lifecycles)==null?void 0:Oe.values)!=null?Fe:[]);(0,a.useEffect)(()=>{Y.length&&Pe(Y)},[Y]),(0,a.useEffect)(()=>{P({lifecycles:he.length?new Ce(he):void 0})},[he,P]);const $e=(0,a.useMemo)(()=>[...new Set(Z.map(Me=>{var Ke;return(Ke=Me.spec)==null?void 0:Ke.lifecycle}).filter(Boolean))].sort(),[Z]);return $e.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Lifecycle"),a.createElement(Ne.ZP,{"aria-label":"Lifecycle",multiple:!0,options:$e,value:he,onChange:(Me,Ke)=>Pe(Ke),renderOption:(Me,{selected:Ke})=>a.createElement(F.Z,{control:a.createElement(ne.Z,{icon:bt,checkedIcon:st,checked:Ke}),label:Me}),size:"small",popupIcon:a.createElement(Be.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Me=>a.createElement(ye.Z,{...Me,className:C.input,variant:"outlined"})})):null},Mt=(0,W.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Qe=a.createElement(Ie.Z,{fontSize:"small"}),vt=a.createElement(pe.Z,{fontSize:"small"}),ct=()=>{var Oe,Fe;const C=Mt(),{updateFilters:P,backendEntities:Z,filters:G,queryParameters:{owners:X}}=pt(),Y=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,Pe]=(0,a.useState)(Y.length?Y:(Fe=(Oe=G.owners)==null?void 0:Oe.values)!=null?Fe:[]);(0,a.useEffect)(()=>{Y.length&&Pe(Y)},[Y]),(0,a.useEffect)(()=>{P({owners:he.length?new Ue(he):void 0})},[he,P]);const $e=(0,a.useMemo)(()=>[...new Set(Z.flatMap(Me=>Ze(Me,Te.S4).map(Ke=>kt(Ke,{defaultKind:"group"}))).filter(Boolean))].sort(),[Z]);return $e.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Owner"),a.createElement(Ne.ZP,{multiple:!0,"aria-label":"Owner",options:$e,value:he,onChange:(Me,Ke)=>Pe(Ke),renderOption:(Me,{selected:Ke})=>a.createElement(F.Z,{control:a.createElement(ne.Z,{icon:Qe,checkedIcon:vt,checked:Ke}),label:Me}),size:"small",popupIcon:a.createElement(Be.Z,{"data-testid":"owner-picker-expand"}),renderInput:Me=>a.createElement(ye.Z,{...Me,className:C.input,variant:"outlined"})})):null},Gt=(0,W.Z)(C=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),rt=()=>{var Y,he;const C=Gt(),{filters:P,updateFilters:Z}=useEntityList(),[G,X]=useState((he=(Y=P.text)==null?void 0:Y.value)!=null?he:"");return useDebounce(()=>{Z({text:G.length?new EntityTextFilter(G):void 0})},250,[G,Z]),React.createElement(Toolbar,{className:C.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:C.input,placeholder:"Search",autoComplete:"off",onChange:Pe=>X(Pe.target.value),value:G,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:G.length===0},React.createElement(Clear,null)))})))},Je=Object.freeze({createEntityRefColumn(C){const{defaultKind:P}=C;function Z(G){var X;return((X=G.metadata)==null?void 0:X.title)||kt(G,{defaultKind:P})}return{title:"Name",highlight:!0,customFilterAndSearch(G,X){return Z(X).includes(G)},customSort(G,X){return Z(G).localeCompare(Z(X))},render:G=>{var X;return a.createElement(ie,{entityRef:G,defaultKind:P,title:(X=G.metadata)==null?void 0:X.title})}}},createEntityRelationColumn({title:C,relation:P,defaultKind:Z,filter:G}){function X(he){return Ze(he,P,G)}function Y(he){return X(he).map(Pe=>kt(Pe,{defaultKind:Z})).join(", ")}return{title:C,customFilterAndSearch(he,Pe){return Y(Pe).includes(he)},customSort(he,Pe){return Y(he).localeCompare(Y(Pe))},render:he=>a.createElement(j,{entityRefs:X(he),defaultKind:Z})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Te.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Te.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Te.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:C=>a.createElement(Rt.OverflowTooltip,{text:C.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Ht=[Je.createEntityRefColumn({defaultKind:"system"}),Je.createDomainColumn(),Je.createOwnerColumn(),Je.createMetadataDescriptionColumn()],Dt=[Je.createEntityRefColumn({defaultKind:"component"}),Je.createSystemColumn(),Je.createOwnerColumn(),Je.createSpecTypeColumn(),Je.createSpecLifecycleColumn(),Je.createMetadataDescriptionColumn()],Pt=(0,W.Z)(C=>({empty:{padding:C.spacing(2),display:"flex",justifyContent:"center"}})),$t=C=>{const{entities:P,title:Z,emptyContent:G,variant:X="gridItem",columns:Y}=C,he=Pt(),Pe={minWidth:"0",width:"100%"};return X==="gridItem"&&(Pe.height="calc(100% - 10px)"),a.createElement(Rt.Table,{columns:Y,title:Z,style:Pe,emptyContent:G&&a.createElement("div",{className:he.empty},G),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:P})};$t.columns=Je,$t.systemEntityColumns=Ht,$t.componentEntityColumns=Dt;const Qt=(0,W.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Xt=a.createElement(Ie.Z,{fontSize:"small"}),an=a.createElement(pe.Z,{fontSize:"small"}),Mn=()=>{var Oe,Fe;const C=Qt(),{updateFilters:P,filters:Z,queryParameters:{tags:G}}=pt(),X=(0,t.useApi)(l),{value:Y}=(0,Ut.default)(async()=>{var St;const Me="metadata.tags",{facets:Ke}=await X.getEntityFacets({facets:[Me],filter:(St=Z.kind)==null?void 0:St.getCatalogFilters()});return Ke[Me].map(({value:et})=>et)},[Z.kind]),he=(0,a.useMemo)(()=>[G].flat().filter(Boolean),[G]),[Pe,$e]=(0,a.useState)(he.length?he:(Fe=(Oe=Z.tags)==null?void 0:Oe.values)!=null?Fe:[]);return(0,a.useEffect)(()=>{he.length&&$e(he)},[he]),(0,a.useEffect)(()=>{P({tags:Pe.length?new Ee(Pe):void 0})},[Pe,P]),Y!=null&&Y.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(b.Z,{variant:"button"},"Tags"),a.createElement(Ne.ZP,{multiple:!0,"aria-label":"Tags",options:Y,value:Pe,onChange:(Me,Ke)=>$e(Ke),renderOption:(Me,{selected:Ke})=>a.createElement(F.Z,{control:a.createElement(ne.Z,{icon:Xt,checkedIcon:an,checked:Ke}),label:Me}),size:"small",popupIcon:a.createElement(Be.Z,{"data-testid":"tag-picker-expand"}),renderInput:Me=>a.createElement(ye.Z,{...Me,className:C.input,variant:"outlined"})})):null};var fn=e(82108),rn=e.n(fn);const $n=C=>{var Oe;const{hidden:P,initialFilter:Z}=C,G=(0,t.useApi)(t.alertApiRef),{error:X,availableTypes:Y,selectedTypes:he,setSelectedTypes:Pe}=ft();if((0,a.useEffect)(()=>{X&&G.post({message:"Failed to load entity types",severity:"error"}),Z&&Pe([Z])},[X,G,Z,Pe]),Y.length===0||X)return null;const $e=[{value:"all",label:"All"},...Y.map(Fe=>({value:Fe,label:rn()(Fe)}))];return P?null:a.createElement(A.Z,{pb:1,pt:1},a.createElement(Rt.Select,{label:"Type",items:$e,selected:(Oe=$e.length>1?he[0]:void 0)!=null?Oe:"all",onChange:Fe=>Pe(Fe==="all"?[]:[String(Fe)])}))};var jn=e(15459),Yn=e(61837),Jn=e(11640),Qn=e(28347);const U=(0,jn.Z)({root:{color:"#f3ba37"}})(Jn.Z),g=C=>{const{toggleStarredEntity:P,isStarredEntity:Z}=S(C.entity);return a.createElement(Yn.Z,{"aria-label":"favorite",color:"inherit",...C,onClick:()=>P()},a.createElement(dn.ZP,{title:Z?"Remove from favorites":"Add to favorites"},Z?a.createElement(U,null):a.createElement(Qn.Z,null)))};var T=e(8629),B=e(79249),k=e(38724),fe=e(99152),me=e(6487),De=e(49429),ze=e(55999),Zt=e(72779),mn=e.n(Zt),zn=e(39412);const br=zn.Z;function gr(C,P){if(C)return C.toLocaleLowerCase("en-US");if(P)try{return(0,Te.of)(P).kind.toLocaleLowerCase("en-US")}catch{return}}function pr(C,P){const Z=(0,t.useApp)(),G=gr(C,P);return G&&Z.getSystemIcon(`kind:${G}`)||br}function rr(C){const{kind:P,entityRef:Z,...G}=C,X=pr(P,Z);return a.createElement(X,{...G})}const or=(0,W.Z)(C=>({node:{fill:C.palette.grey[300],stroke:C.palette.grey[300],"&.primary":{fill:C.palette.primary.light,stroke:C.palette.primary.light},"&.secondary":{fill:C.palette.secondary.light,stroke:C.palette.secondary.light}},text:{fill:C.palette.getContrastText(C.palette.grey[300]),"&.primary":{fill:C.palette.primary.contrastText},"&.secondary":{fill:C.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Pr(C){const P=(0,t.useApi)(l),Z=(0,Te.eE)(C),{loading:G,error:X,value:Y}=(0,Ut.default)(async()=>{const he=await P.getEntityAncestors({entityRef:Z}),Pe=new Array,$e=new Array;for(const Oe of he.items){const Fe=(0,Te.eE)(Oe.entity),Me=Fe===he.rootEntityRef;Pe.push({id:Fe,root:Me,...Oe.entity});for(const Ke of Oe.parentEntityRefs)$e.push({from:Fe,to:Ke})}return{nodes:Pe,edges:$e}},[Z]);return{loading:G,error:X,nodes:(Y==null?void 0:Y.nodes)||[],edges:(Y==null?void 0:Y.edges)||[]}}function Ir({node:C}){const P=or(),Z=(0,ve.s0)(),G=(0,t.useRouteRef)(Nt),[X,Y]=(0,a.useState)(0),[he,Pe]=(0,a.useState)(0),$e=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if($e.current){let{height:zt,width:_t}=$e.current.getBBox();zt=Math.round(zt),_t=Math.round(_t),(zt!==he||_t!==X)&&(Y(_t),Pe(zt))}},[X,he]);const Oe=10,Fe=he,Me=Fe+Oe,Ke=Me+X+Oe*2,St=he+Oe*2,et=C.metadata.title||(C.kind&&C.metadata.name&&C.metadata.namespace?kt({kind:C.kind,name:C.metadata.name,namespace:C.metadata.namespace||""}):C.id),We=()=>{Z(G({kind:C.kind,namespace:C.metadata.namespace||Te.zG,name:C.metadata.name}))};return a.createElement("g",{onClick:We,className:P.clickable},a.createElement("rect",{className:mn()(P.node,C.root?"secondary":"primary"),width:Ke,height:St,rx:10}),a.createElement(rr,{kind:C.kind,y:Oe,x:Oe,width:Fe,height:Fe,className:mn()(P.text,C.root?"secondary":"primary")}),a.createElement("text",{ref:$e,className:mn()(P.text,C.root?"secondary":"primary"),y:St/2,x:Me+(X+Oe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},et))}function Lr(C){const{loading:P,error:Z,nodes:G,edges:X}=Pr(C.entity);return P?a.createElement(Rt.Progress,null):Z?a.createElement(Rt.ResponseErrorPanel,{error:Z}):a.createElement(a.Fragment,null,a.createElement(ze.Z,{variant:"h2"},"Ancestry"),a.createElement(ze.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(Rt.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(Rt.DependencyGraph,{nodes:G,edges:X,renderNode:Ir,direction:Rt.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Wn=e(11776),vn=e(38402),Xn=e(86136),qn=e(99688),Or=e(49378),xr=e(54506),ar=e(94339),to=e(24579),Dr=e(27685);const ir=(0,W.Z)(C=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:C.spacing(2)},helpIcon:{marginLeft:C.spacing(1),color:C.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function Pn(C){const P=ir();return a.createElement(Or.Z,{...C,primaryTypographyProps:{className:P.monospace},secondaryTypographyProps:{className:P.monospace}})}function sr(C){const P=ir();return a.createElement(xr.Z,{className:P.monospace},C.children)}function _n(C){return a.createElement(A.Z,{mt:2},a.createElement(ar.Z,{variant:"outlined"},a.createElement(to.Z,null,a.createElement(b.Z,{variant:"h6",gutterBottom:!0},C.title,C.helpLink&&a.createElement(Er,{to:C.helpLink})),C.children)))}function yr(C){const[P,Z]=C.entry;return a.createElement(vn.Z,null,C.indent&&a.createElement(Xn.Z,null),a.createElement(Pn,{primary:P,secondary:Z.match(/^url:https?:\/\//)?a.createElement(a.Fragment,null,Z.substring(0,4),a.createElement(Rt.Link,{to:Z.substring(4)},Z.substring(4))):Z}))}function Er(C){const P=ir();return a.createElement(Rt.Link,{to:C.to,className:P.helpIcon},a.createElement(Dr.Z,{fontSize:"inherit"}))}const Fr=(0,W.Z)({root:{display:"flex",flexDirection:"column"}});function In(C){var $e,Oe;const P=(0,t.useApi)(l),Z=(0,Te.eE)(C),G=($e=C.metadata.annotations)==null?void 0:$e[Te.P1],X=(Oe=C.metadata.annotations)==null?void 0:Oe[Te.q1],{loading:Y,error:he,value:Pe}=(0,Ut.default)(async()=>!G&&!X?[]:(await P.getEntities({filter:[...G?[{[`metadata.annotations.${Te.P1}`]:G}]:[],...X?[{[`metadata.annotations.${Te.q1}`]:X}]:[]]})).items,[G,X]);return{loading:Y,error:he,location:G,originLocation:X,colocatedEntities:Pe==null?void 0:Pe.filter(Fe=>(0,Te.eE)(Fe)!==Z)}}function cr(C){return a.createElement(Wn.Z,{dense:!0},C.header&&a.createElement(yr,{key:"header",entry:C.header}),C.entities.map(P=>a.createElement(vn.Z,{key:(0,Te.eE)(P)},a.createElement(Xn.Z,null,a.createElement(rr,{kind:P.kind})),a.createElement(Pn,{primary:a.createElement(ie,{entityRef:P})}))))}function Br(C){const{entity:P}=C,{loading:Z,error:G,location:X,originLocation:Y,colocatedEntities:he}=In(P);if(Z)return a.createElement(Rt.Progress,null);if(G)return a.createElement(Rt.ResponseErrorPanel,{error:G});if(!X&&!Y)return a.createElement(qn.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return a.createElement(qn.Z,{severity:"info"},"There were no other entities on this location.");if(X===Y)return a.createElement(cr,{entities:he});const Pe=he.filter(Oe=>{var Fe;return((Fe=Oe.metadata.annotations)==null?void 0:Fe[Te.P1])===X}),$e=he.filter(Oe=>{var Fe;return((Fe=Oe.metadata.annotations)==null?void 0:Fe[Te.q1])===Y});return a.createElement(a.Fragment,null,Pe.length>0&&a.createElement(cr,{entities:Pe,header:["At the same location",X]}),$e.length>0&&a.createElement(cr,{entities:$e,header:["At the same origin",Y]}))}function wr(C){const P=Fr();return a.createElement(a.Fragment,null,a.createElement(ze.Z,{variant:"h2"},"Colocated"),a.createElement(ze.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:P.root},a.createElement(Br,{entity:C.entity})))}function lr(C){return Object.fromEntries([...Object.entries(C)].sort((P,Z)=>P[0]<Z[0]?-1:1))}function Mr(C){return a.createElement(a.Fragment,null,a.createElement(ze.Z,{variant:"h2"},"Entity as JSON"),a.createElement(ze.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(ze.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Rt.CodeSnippet,{text:JSON.stringify(lr(C.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var vr=e(3440),$r=e.n(vr);const Ar=(0,W.Z)({root:{display:"flex",flexDirection:"column"}});function sn(C){var Oe,Fe;const P=Ar(),{apiVersion:Z,kind:G,metadata:X,spec:Y,relations:he=[],status:Pe={}}=C.entity,$e=$r()(Wt()(he,Me=>Me.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(ze.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:P.root},a.createElement(_n,{title:"Identity"},a.createElement(Wn.Z,{dense:!0},a.createElement(vn.Z,null,a.createElement(Pn,{primary:"apiVersion",secondary:Z})),a.createElement(vn.Z,null,a.createElement(Pn,{primary:"kind",secondary:G})),(Y==null?void 0:Y.type)&&a.createElement(vn.Z,null,a.createElement(Pn,{primary:"spec.type",secondary:Y.type})),X.uid&&a.createElement(vn.Z,null,a.createElement(Pn,{primary:"uid",secondary:X.uid})),X.etag&&a.createElement(vn.Z,null,a.createElement(Pn,{primary:"etag",secondary:X.etag})))),a.createElement(_n,{title:"Metadata"},!!Object.keys(X.annotations||{}).length&&a.createElement(Wn.Z,{dense:!0,subheader:a.createElement(sr,null,"Annotations",a.createElement(Er,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(X.annotations).map(Me=>a.createElement(yr,{key:Me[0],indent:!0,entry:Me}))),!!Object.keys(X.labels||{}).length&&a.createElement(Wn.Z,{dense:!0,subheader:a.createElement(sr,null,"Labels")},Object.entries(X.labels).map(Me=>a.createElement(yr,{key:Me[0],indent:!0,entry:Me}))),!!((Oe=X.tags)!=null&&Oe.length)&&a.createElement(Wn.Z,{dense:!0,subheader:a.createElement(sr,null,"Tags")},X.tags.map((Me,Ke)=>a.createElement(vn.Z,{key:`${Me}-${Ke}`},a.createElement(Xn.Z,null),a.createElement(Pn,{primary:Me}))))),!!he.length&&a.createElement(_n,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries($e).map(([Me,Ke],St)=>a.createElement("div",{key:St},a.createElement(Wn.Z,{dense:!0,subheader:a.createElement(sr,null,Me)},Ke.map(et=>a.createElement(vn.Z,{key:et.targetRef},a.createElement(Xn.Z,null,a.createElement(rr,{entityRef:et.targetRef})),a.createElement(Pn,{primary:a.createElement(ie,{entityRef:et.targetRef})}))))))),!!((Fe=Pe.items)!=null&&Fe.length)&&a.createElement(_n,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Pe.items.map((Me,Ke)=>a.createElement("div",{key:Ke},a.createElement(b.Z,null,Me.level,": ",Me.type),a.createElement(A.Z,{ml:2},Me.message))))))}var Ln=e(60155),z=e.n(Ln);function re(C){return a.createElement(a.Fragment,null,a.createElement(ze.Z,{variant:"h2"},"Entity as YAML"),a.createElement(ze.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(ze.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(Rt.CodeSnippet,{text:z().stringify(lr(C.entity)),language:"yaml",showCopyCodeButton:!0}))))}const de=(0,W.Z)(C=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:C.palette.background.paper},tabs:{borderRight:`1px solid ${C.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function we(C){const{children:P,value:Z,index:G,...X}=C,Y=de();return a.createElement("div",{role:"tabpanel",hidden:Z!==G,id:`vertical-tabpanel-${G}`,"aria-labelledby":`vertical-tab-${G}`,className:Y.tabContents,...X},Z===G&&a.createElement(A.Z,{pl:3,pr:3},P))}function _e(C){return{id:`vertical-tab-${C}`,"aria-controls":`vertical-tabpanel-${C}`}}function At(C){const P=de(),[Z,G]=a.useState(0);return(0,a.useEffect)(()=>{G(0)},[C.open]),C.entity?a.createElement(T.Z,{fullWidth:!0,maxWidth:"xl",open:C.open,onClose:C.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:P.fullHeightDialog}},a.createElement(B.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(k.Z,{dividers:!0},a.createElement("div",{className:P.root},a.createElement(fe.Z,{orientation:"vertical",variant:"scrollable",value:Z,onChange:(X,Y)=>G(Y),"aria-label":"Inspector options",className:P.tabs},a.createElement(me.Z,{label:"Overview",..._e(0)}),a.createElement(me.Z,{label:"Ancestry",..._e(1)}),a.createElement(me.Z,{label:"Colocated",..._e(2)}),a.createElement(me.Z,{label:"Raw JSON",..._e(3)}),a.createElement(me.Z,{label:"Raw YAML",..._e(4)})),a.createElement(we,{value:Z,index:0},a.createElement(sn,{entity:C.entity})),a.createElement(we,{value:Z,index:1},a.createElement(Lr,{entity:C.entity})),a.createElement(we,{value:Z,index:2},a.createElement(wr,{entity:C.entity})),a.createElement(we,{value:Z,index:3},a.createElement(Mr,{entity:C.entity})),a.createElement(we,{value:Z,index:4},a.createElement(re,{entity:C.entity})))),a.createElement(De.Z,null,a.createElement(y.Z,{onClick:C.onClose,color:"primary"},"Close"))):null}var Et=e(85256);function lt(C){var St;const P=(0,t.useApi)(l),Z=(St=C.metadata.annotations)==null?void 0:St[Te.q1],G=C.metadata.uid,X=Z==="bootstrap:bootstrap",Y=(0,Ut.default)(async()=>{const et=P.getLocationByRef(Z);let We;if(!Z)We=Promise.resolve([]);else{const zt=`metadata.annotations.${Te.q1}`;We=P.getEntities({filter:{[zt]:Z},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(_t=>_t.items)}return Promise.all([et,We]).then(([zt,_t])=>({location:zt,colocatedEntities:_t}))},[P,C]),he=(0,a.useCallback)(async function(){const{location:We}=Y.value;await P.removeLocationById(We.id)},[P,Y]),Pe=(0,a.useCallback)(async function(){await P.removeEntityByUid(G)},[P,G]);if(X)return{type:"bootstrap",location:Z,deleteEntity:Pe};const{loading:$e,error:Oe,value:Fe}=Y;if($e)return{type:"loading"};if(Oe)return{type:"error",error:Oe};const{location:Me,colocatedEntities:Ke}=Fe;return Me?{type:"unregister",location:Z,colocatedEntities:Ke.map(Te.iB),unregisterLocation:he,deleteEntity:Pe}:{type:"only-delete",deleteEntity:Pe}}var ht=e(10179);const Ft=(0,W.Z)({advancedButton:{fontSize:"0.7em"}}),jt=({entity:C,onConfirm:P})=>{var St;const Z=(0,t.useApi)(t.alertApiRef),G=(0,t.useApi)(t.configApiRef),X=Ft(),Y=lt(C),[he,Pe]=(0,a.useState)(!1),[$e,Oe]=(0,a.useState)(!1),Fe=(St=G.getOptionalString("app.title"))!=null?St:"Backstage",Me=(0,a.useCallback)(async function(){if("unregisterLocation"in Y){Oe(!0);try{await Y.unregisterLocation(),P()}catch(We){(0,ht.BD)(We),Z.post({message:We.message})}finally{Oe(!1)}}},[Z,P,Y]),Ke=(0,a.useCallback)(async function(){if("deleteEntity"in Y){Oe(!0);try{await Y.deleteEntity(),P()}catch(We){(0,ht.BD)(We),Z.post({message:We.message})}finally{Oe(!1)}}},[Z,P,Y]);return Y.type==="loading"?a.createElement(Rt.Progress,null):Y.type==="error"?a.createElement(Rt.ResponseErrorPanel,{error:Y.error}):Y.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement(qn.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Y.location,'"). If you believe this is in error, please contact the ',Fe," ","integrator."),a.createElement(A.Z,{marginTop:2},!he&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Pe(!0)},"Advanced Options"),he&&a.createElement(a.Fragment,null,a.createElement(ze.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:$e,onClick:Ke},"Delete Entity")))):Y.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(ze.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:$e,onClick:Ke},"Delete Entity")):Y.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(ze.Z,null,"This action will unregister the following entities:"),a.createElement(ze.Z,{component:"ul"},Y.colocatedEntities.map(et=>a.createElement("li",{key:`${et.kind}:${et.namespace}/${et.name}`},a.createElement(ie,{entityRef:et})))),a.createElement(ze.Z,null,"Located at the following location:"),a.createElement(ze.Z,{component:"ul"},a.createElement("li",null,Y.location)),a.createElement(ze.Z,null,"To undo, just re-register the entity in ",Fe,"."),a.createElement(A.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:$e,onClick:Me},"Unregister Location"),!he&&a.createElement(A.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Pe(!0)},"Advanced Options"))),he&&a.createElement(a.Fragment,null,a.createElement(A.Z,{paddingTop:4,paddingBottom:4},a.createElement(Et.Z,null)),a.createElement(ze.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:$e,onClick:Ke},"Delete Entity"))):a.createElement(qn.Z,{severity:"error"},"Internal error: Unknown state")},gn=C=>{const{open:P,onConfirm:Z,onClose:G,entity:X}=C;return a.createElement(T.Z,{open:P,onClose:G},a.createElement(B.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(k.Z,null,a.createElement(jt,{entity:X,onConfirm:Z})),a.createElement(De.Z,null,a.createElement(y.Z,{onClick:G,color:"primary"},"Cancel")))};var hn=e(12231),ur=e(9520),On=e(47603);const dr=(0,W.Z)(C=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:C.spacing(1,0,1,0)},title:{margin:C.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:C.palette.text.primary},menuItem:{minHeight:C.spacing(6)},groupWrapper:{margin:C.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function jr(C){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:On.Z},{id:"starred",label:"Starred",icon:Jn.Z}]},{name:C!=null?C:"Company",items:[{id:"all",label:"All"}]}]}const er=C=>{var Gn;const{initialFilter:P,availableFilters:Z}=C,G=dr(),Y=(Gn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Gn:"Company",{filters:he,updateFilters:Pe,backendEntities:$e,queryParameters:{kind:Oe,user:Fe},loading:Me}=pt(),Ke=["starred","all"],St=jr(Y).map(Rn=>({...Rn,items:Rn.items.filter(({id:Sn})=>["group","user"].some(Nr=>Nr===Oe)?Ke.includes(Sn):!Z||Z.includes(Sn))})).filter(({items:Rn})=>!!Rn.length),{isStarredEntity:et}=yt(),{isOwnedEntity:We,loading:zt}=V(),_t=Me||zt,Vn=(0,a.useMemo)(()=>new Ge("owned",We,et),[We,et]),An=(0,a.useMemo)(()=>new Ge("starred",We,et),[We,et]),cn=(0,a.useMemo)(()=>[Fe].flat()[0],[Fe]),[pn,xn]=(0,a.useState)(cn!=null?cn:P),Rr=(0,a.useMemo)(()=>$e.filter(tt((0,ke.compact)(Object.values({...he,user:void 0})))),[he,$e]),Ur=(0,a.useMemo)(()=>({all:Rr.length,starred:Rr.filter(Rn=>An.filterEntity(Rn)).length,owned:Rr.filter(Rn=>Vn.filterEntity(Rn)).length}),[Rr,An,Vn]);return(0,a.useEffect)(()=>{cn&&xn(cn)},[cn]),(0,a.useEffect)(()=>{!_t&&!!pn&&pn!=="all"&&Ur[pn]===0&&xn("all")},[_t,Ur,pn,xn]),(0,a.useEffect)(()=>{Pe({user:pn?new Ge(pn,We,et):void 0})},[pn,We,et,Pe]),a.createElement(ar.Z,{className:G.root},St.map(Rn=>a.createElement(a.Fragment,{key:Rn.name},a.createElement(b.Z,{variant:"subtitle2",className:G.title},Rn.name),a.createElement(ar.Z,{className:G.groupWrapper},a.createElement(Wn.Z,{disablePadding:!0,dense:!0},Rn.items.map(Sn=>{var Nr,no;return a.createElement(hn.Z,{key:Sn.id,button:!0,divider:!0,onClick:()=>xn(Sn.id),selected:Sn.id===((Nr=he.user)==null?void 0:Nr.value),className:G.menuItem,disabled:Ur[Sn.id]===0,"data-testid":`user-picker-${Sn.id}`},Sn.icon&&a.createElement(Xn.Z,{className:G.listIcon},a.createElement(Sn.icon,{fontSize:"small"})),a.createElement(Or.Z,null,a.createElement(b.Z,{variant:"body1"},Sn.label)),a.createElement(ur.Z,null,(no=Ur[Sn.id])!=null?no:"-"))}))))))},Vr=({children:C,value:P})=>{var Pe;const[Z,G]=useState((Pe=P==null?void 0:P.filters)!=null?Pe:{}),X=useCallback($e=>{G(Oe=>{const Fe=typeof $e=="function"?$e(Oe):$e;return{...Oe,...Fe}})},[]),Y=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var $e,Oe,Fe,Me,Ke;return{entities:($e=P==null?void 0:P.entities)!=null?$e:Y.entities,backendEntities:(Oe=P==null?void 0:P.backendEntities)!=null?Oe:Y.backendEntities,updateFilters:(Fe=P==null?void 0:P.updateFilters)!=null?Fe:X,filters:Z,loading:(Me=P==null?void 0:P.loading)!=null?Me:!1,queryParameters:(Ke=P==null?void 0:P.queryParameters)!=null?Ke:Y.queryParameters,error:P==null?void 0:P.error}},[P,Y,Z,X]);return React.createElement(EntityListContext.Provider,{value:he},C)}},39398:function(q,i,e){"use strict";e.r(i),e.d(i,{AboutCard:function(){return ke},AboutContent:function(){return ee},AboutField:function(){return w}});var r=e(48023),t=e(9118),l=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),R=e(27604),x=e(2784),_=e(47851),M=e(60905),I=e(90436),$=e(7089);const O=(0,m.Z)(He=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:He.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function w(He){const{label:se,value:ve,gridSizes:Le,children:je}=He,Xe=O(),at=(0,l.useElementFilter)(je,Te=>Te.getElements()),tt=at.length>0?at:x.createElement(I.Z,{variant:"body2",className:Xe.value},ve||"unknown");return x.createElement(M.Z,{item:!0,...Le},x.createElement(I.Z,{variant:"subtitle2",className:Xe.label},se),tt)}const J=(0,m.Z)({description:{wordBreak:"break-word"}});function ee(He){var pt,Ut,Vt,Ot,Kt,Wt;const{entity:se}=He,ve=J(),Le=se.kind.toLocaleLowerCase("en-US")==="system",je=se.kind.toLocaleLowerCase("en-US")==="resource",Xe=se.kind.toLocaleLowerCase("en-US")==="component",at=se.kind.toLocaleLowerCase("en-US")==="api",tt=se.kind.toLocaleLowerCase("en-US")==="template",Te=se.kind.toLocaleLowerCase("en-US")==="location",Ze=se.kind.toLocaleLowerCase("en-US")==="group",Ve=(0,v.getEntityRelations)(se,r.cz,{kind:"system"}),Ye=(0,v.getEntityRelations)(se,r.cz,{kind:"component"}),gt=(0,v.getEntityRelations)(se,r.cz,{kind:"domain"}),wt=(0,v.getEntityRelations)(se,r.S4);return x.createElement(M.Z,{container:!0},x.createElement(w,{label:"Description",gridSizes:{xs:12}},x.createElement(I.Z,{variant:"body2",paragraph:!0,className:ve.description},((pt=se==null?void 0:se.metadata)==null?void 0:pt.description)||"No description")),x.createElement(w,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},wt.length>0&&x.createElement(v.EntityRefLinks,{entityRefs:wt,defaultKind:"group"})),(Le||gt.length>0)&&x.createElement(w,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},gt.length>0&&x.createElement(v.EntityRefLinks,{entityRefs:gt,defaultKind:"domain"})),(at||Xe||je||Ve.length>0)&&x.createElement(w,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},Ve.length>0&&x.createElement(v.EntityRefLinks,{entityRefs:Ve,defaultKind:"system"})),Xe&&Ye.length>0&&x.createElement(w,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},x.createElement(v.EntityRefLinks,{entityRefs:Ye,defaultKind:"component"})),(at||Xe||je||tt||Ze||Te||typeof((Ut=se==null?void 0:se.spec)==null?void 0:Ut.type)=="string")&&x.createElement(w,{label:"Type",value:(Vt=se==null?void 0:se.spec)==null?void 0:Vt.type,gridSizes:{xs:12,sm:6,lg:4}}),(at||Xe||typeof((Ot=se==null?void 0:se.spec)==null?void 0:Ot.lifecycle)=="string")&&x.createElement(w,{label:"Lifecycle",value:(Kt=se==null?void 0:se.spec)==null?void 0:Kt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),x.createElement(w,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Wt=se==null?void 0:se.metadata)==null?void 0:Wt.tags)||[]).map(Nt=>x.createElement($.Z,{key:Nt,size:"small",label:Nt}))))}const Ae=(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 ke(He){var Ot,Kt,Wt;const{variant:se}=He,ve=Ae(),{entity:Le}=(0,v.useEntity)(),je=(0,l.useApi)(h.q3),Xe=(0,l.useApi)(v.catalogApiRef),at=(0,l.useApi)(l.alertApiRef),tt=(0,l.useRouteRef)(_.jU),Te=(0,v.getEntitySourceLocation)(Le,je),Ze=(Ot=Le.metadata.annotations)==null?void 0:Ot[r.Tf],Ve={label:"View Source",disabled:!Te,icon:x.createElement(h.nW,{type:Te==null?void 0:Te.integrationType}),href:Te==null?void 0:Te.locationTargetUrl},Ye={label:"View TechDocs",disabled:!((Kt=Le.metadata.annotations)!=null&&Kt["backstage.io/techdocs-ref"])||!tt,icon:x.createElement(b.Z,null),href:tt&&tt({namespace:Le.metadata.namespace||r.zG,kind:Le.kind,name:Le.metadata.name})};let gt="";se==="gridItem"?gt=ve.gridItemCard:se==="fullHeight"&&(gt=ve.fullHeightCard);let wt="";se==="gridItem"?wt=ve.gridItemCardContent:se==="fullHeight"&&(wt=ve.fullHeightCardContent);const pt=(Wt=Le.metadata.annotations)==null?void 0:Wt[r.P1],Ut=(pt==null?void 0:pt.startsWith("url:"))||(pt==null?void 0:pt.startsWith("file:")),Vt=(0,x.useCallback)(async()=>{await Xe.refreshEntity((0,r.eE)(Le)),at.post({message:"Refresh scheduled",severity:"info"})},[Xe,at,Le]);return x.createElement(a.Z,{className:gt},x.createElement(s.Z,{title:"About",action:x.createElement(x.Fragment,null,Ut&&x.createElement(f.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Vt},x.createElement(A.Z,null)),x.createElement(f.Z,{component:t.Link,"aria-label":"Edit",disabled:!Ze,title:"Edit Metadata",to:Ze!=null?Ze:"#"},x.createElement(R.Z,null))),subheader:x.createElement(t.HeaderIconLinkRow,{links:[Ve,Ye]})}),x.createElement(y.Z,null),x.createElement(u.Z,{className:wt},x.createElement(ee,{entity:Le})))}},49782:function(q,i,e){"use strict";e.d(i,{K:function(){return A}});var r=e(2784),t=e(79692),l=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,l.Z)({root:{...b.typography.h4}}));function A(b){var He;const{initialFilter:R="component",allowedKinds:x}=b,_=u(),M=(0,y.useApi)(s.catalogApiRef),{value:I}=(0,f.default)(async()=>await M.getEntityFacets({facets:["kind"]}).then(se=>{var ve;return((ve=se.facets.kind)==null?void 0:ve.map(Le=>Le.value).sort())||[]})),{updateFilters:$,queryParameters:{kind:O}}=(0,s.useEntityList)(),w=(0,r.useMemo)(()=>{var se;return(se=[O].flat()[0])==null?void 0:se.toLocaleLowerCase("en-US")},[O]),[J,ee]=(0,r.useState)(w!=null?w:R);(0,r.useEffect)(()=>{$({kind:J?new s.EntityKindFilter(J):void 0})},[J,$]),(0,r.useEffect)(()=>{w&&ee(w)},[w]);const ke=[(0,h.Z)(J)].concat((He=I==null?void 0:I.filter(se=>x?x.some(ve=>ve.toLocaleLowerCase("en-US")===se.toLocaleLowerCase("en-US")):!0))!=null?He:[]).sort().reduce((se,ve)=>(se[ve.toLocaleLowerCase("en-US")]=ve,se),{});return r.createElement(v.Z,{input:r.createElement(m.Z,{value:J}),value:J,onChange:se=>ee(se.target.value),classes:_},Object.keys(ke).map(se=>r.createElement(a.Z,{value:se,key:se},`${ke[se]}s`)))}},30097:function(q,i,e){"use strict";e.d(i,{E:function(){return R}});var r=e(48023),t=e(53479),l=e(27604),h=e(2997),v=e(76635),m=e(2784),a=e(7089),s=e(9118);const f=Object.freeze({createNameColumn(x){function _(M){var I;return((I=M.metadata)==null?void 0:I.title)||(0,t.humanizeEntityRef)(M,{defaultKind:x==null?void 0:x.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:M},{entity:I}){return _(M).localeCompare(_(I))},render:({entity:M})=>{var I;return m.createElement(t.EntityRefLink,{entityRef:M,defaultKind:(x==null?void 0:x.defaultKind)||"Component",title:(I=M.metadata)==null?void 0:I.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:x})=>m.createElement(t.EntityRefLinks,{entityRefs:x.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:x})=>m.createElement(t.EntityRefLinks,{entityRefs:x.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:x})=>m.createElement(s.OverflowTooltip,{text:x.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:x})=>m.createElement(m.Fragment,null,x.metadata.tags&&x.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),R=x=>{var at,tt,Te;const{columns:_,actions:M,tableOptions:I}=x,{isStarredEntity:$,toggleStarredEntity:O}=(0,t.useStarredEntities)(),{loading:w,error:J,entities:ee,filters:Ae}=(0,t.useEntityList)(),ke=(0,m.useMemo)(()=>{var Ve;return[f.createNameColumn({defaultKind:(Ve=Ae.kind)==null?void 0:Ve.value}),...Ze(),f.createMetadataDescriptionColumn(),f.createTagsColumn()];function Ze(){var Ye;switch((Ye=Ae.kind)==null?void 0:Ye.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()]}}},[(at=Ae.kind)==null?void 0:at.value]),He=Ae.type===void 0,se=(0,v.capitalize)((Te=(tt=Ae.user)==null?void 0:tt.value)!=null?Te:"all");if(J)return m.createElement("div",null,m.createElement(s.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(s.CodeSnippet,{language:"text",text:J.toString()})));const ve=[({entity:Ze})=>{var Ye;const Ve=(Ye=Ze.metadata.annotations)==null?void 0:Ye[r.l2];return{icon:()=>m.createElement(h.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!Ve,onClick:()=>{!Ve||window.open(Ve,"_blank")}}},({entity:Ze})=>{var Ye;const Ve=(Ye=Ze.metadata.annotations)==null?void 0:Ye[r.Tf];return{icon:()=>m.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!Ve,onClick:()=>{!Ve||window.open(Ve,"_blank")}}},({entity:Ze})=>{const Ve=$(Ze);return{cellStyle:{paddingLeft:"1em"},icon:()=>Ve?m.createElement(b,null):m.createElement(y.Z,null),tooltip:Ve?"Remove from favorites":"Add to favorites",onClick:()=>O(Ze)}}],Le=ee.map(Ze=>{const Ve=(0,t.getEntityRelations)(Ze,r.cz,{kind:"system"}),Ye=(0,t.getEntityRelations)(Ze,r.S4);return{entity:Ze,resolved:{name:(0,t.humanizeEntityRef)(Ze,{defaultKind:"Component"}),ownedByRelationsTitle:Ye.map(gt=>(0,t.humanizeEntityRef)(gt,{defaultKind:"group"})).join(", "),ownedByRelations:Ye,partOfSystemRelationTitle:Ve.map(gt=>(0,t.humanizeEntityRef)(gt,{defaultKind:"system"})).join(", "),partOfSystemRelations:Ve}}}),je=(_||ke).find(Ze=>Ze.title==="Type");je&&(je.hidden=!He);const Xe=Le.length>20;return m.createElement(s.Table,{isLoading:w,columns:_||ke,options:{paging:Xe,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!w,padding:"dense",pageSizeOptions:[20,50,100],...I},title:`${se} (${ee.length})`,data:Le,actions:M||ve})};R.columns=f},47851:function(q,i,e){"use strict";e.d(i,{_Z:function(){return h},jU:function(){return l},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(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 l}});var r;(function(O){const w="DENY";O.DENY=w;const J="ALLOW";O.ALLOW=J;const ee="CONDITIONAL";O.CONDITIONAL=ee})(r||(r={}));function t(O,w){return O.name===w.name}function l(O,w){return"resourceType"in O?!w||O.resourceType===w:!1}function h(O){return O.attributes.action==="create"}function v(O){return O.attributes.action==="read"}function m(O){return O.attributes.action==="update"}function a(O){return O.attributes.action==="delete"}function s(O){return{authorize:async(w,J)=>await O.authorize(w,J),authorizeConditional(w,J){const ee=w;return O.authorize(ee,J)}}}function f({name:O,attributes:w,resourceType:J}){return J?{type:"resource",name:O,attributes:w,resourceType:J}:{type:"basic",name:O,attributes:w}}var y=e(10179),u=e(96279),A=e.n(u),b=e(9571),R=e(30195);const x=R.z.lazy(()=>R.z.object({rule:R.z.string(),resourceType:R.z.string(),params:R.z.array(R.z.unknown())}).or(R.z.object({anyOf:R.z.array(x).nonempty()})).or(R.z.object({allOf:R.z.array(x).nonempty()})).or(R.z.object({not:x}))),_=R.z.object({result:R.z.literal(r.ALLOW).or(R.z.literal(r.DENY))}),M=R.z.union([R.z.object({result:R.z.literal(r.ALLOW).or(R.z.literal(r.DENY))}),R.z.object({result:R.z.literal(r.CONDITIONAL),pluginId:R.z.string(),resourceType:R.z.string(),conditions:x})]),I=(O,w)=>R.z.object({items:R.z.array(R.z.intersection(R.z.object({id:R.z.string()}),O)).refine(J=>J.length===w.size&&J.every(({id:ee})=>w.has(ee)),{message:"Items in response do not match request"})});class ${constructor(w){Q(this,"enabled");Q(this,"discovery");var J;this.discovery=w.discovery,this.enabled=(J=w.config.getOptionalBoolean("permission.enabled"))!=null?J:!1}async authorize(w,J){return this.makeRequest(w,_,J)}async authorizeConditional(w,J){return this.makeRequest(w,M,J)}async makeRequest(w,J,ee){if(!this.enabled)return w.map(je=>({result:r.ALLOW}));const Ae={items:w.map(je=>({id:b.Z(),...je}))},ke=await this.discovery.getBaseUrl("permission"),He=await A()(`${ke}/authorize`,{method:"POST",body:JSON.stringify(Ae),headers:{...this.getAuthorizationHeader(ee==null?void 0:ee.token),"content-type":"application/json"}});if(!He.ok)throw await y.VL.fromResponse(He);const se=await He.json(),Le=I(J,new Set(Ae.items.map(({id:je})=>je))).parse(se).items.reduce((je,Xe)=>(je[Xe.id]=Xe,je),{});return Ae.items.map(je=>Le[je.id])}getAuthorizationHeader(w){return w?{Authorization:`Bearer ${w}`}:{}}}},68099:function(q,i,e){"use strict";e.d(i,{iM:function(){return v},RV:function(){return l},gI:function(){return a}});var r=e(2784),t=e(36964);const l=(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,R=new h.Y2({discovery:A,config:u});return new v(R,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)(l),{data:u,error:A}=(0,m.ZP)(f,async b=>{if((0,h.g2)(b.permission)&&!b.resourceRef)return h.rG.DENY;const{result:R}=await y.authorize(b);return R});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,R=usePermission(isResourcePermission(y)?{permission:y,resourceRef:u}:{permission:y}),x=useApp(),{NotFoundErrorPage:_}=x.getComponents();let M=A===void 0?React.createElement(_,null):A;return R.loading?M=null:R.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 se},DR:function(){return m},ZS:function(){return O},KY:function(){return s},$L:function(){return A},x1:function(){return w}});var r=e(2784),t=e(10289),l=e(36964);const h="techdocs.addons.addon.v1",v="techdocs.addons.wrapper.v1",m=()=>null;(0,l.attachComponentData)(m,v,!0);const a=ve=>`${h}.${ve.toLocaleLowerCase("en-US")}`;function s(ve){const{name:Le,component:je}=ve;return(0,l.createReactExtension)({name:Le,component:{sync:Xe=>r.createElement(je,{...Xe})},data:{[h]:ve,[a(Le)]:!0}})}const f=(ve,Le)=>ve.selectByComponentData({key:Le}).getElements()[0],y=ve=>ve.selectByComponentData({key:v}).selectByComponentData({key:h}),u=ve=>ve.selectByComponentData({key:v}).findComponentData({key:h}),A=()=>{const ve=(0,t.pC)(),Le=(0,l.useElementFilter)(ve,y),je=(0,l.useElementFilter)(ve,u),Xe=(0,r.useCallback)(Te=>{var Ve;if(!Le||!Te)return null;const Ze=a(Te.name);return(Ve=f(Le,Ze))!=null?Ve:null},[Le]),at=(0,r.useCallback)(Te=>{const Ze=je.find(Ve=>Ve.name===Te);return Ze?Xe(Ze):null},[je,Xe]),tt=(0,r.useCallback)(Te=>{const Ze=je.filter(Ve=>Ve.location===Te);return Ze.length?Ze.map(Xe):null},[je,Xe]);return{renderComponentByName:at,renderComponentsByLocation:tt}},b=(0,l.createApiRef)({id:"plugin.techdocs.service"});var R=e(64279),x=e(48023),_=e(76241);const M=(ve,Le)=>(0,x.eE)(ve)===(0,x.eE)(Le),I={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},$=(0,_.CT)("techdocs-reader-page-context"),O=(0,r.memo)(({entityRef:ve,children:Le})=>{const je=(0,l.useApi)(b),Xe=(0,R.default)(async()=>je.getTechDocsMetadata(ve),[ve]),at=(0,R.default)(async()=>je.getEntityMetadata(ve),[ve]),[tt,Te]=(0,r.useState)(I.title),[Ze,Ve]=(0,r.useState)(I.subtitle),[Ye,gt]=(0,r.useState)(I.shadowRoot),wt={metadata:Xe,entityRef:ve,entityMetadata:at,shadowRoot:Ye,setShadowRoot:gt,title:tt,setTitle:Te,subtitle:Ze,setSubtitle:Ve},pt=(0,_.EI)({1:wt});return r.createElement($.Provider,{value:pt},Le instanceof Function?Le(wt):Le)},(ve,Le)=>M(ve.entityRef,Le.entityRef)),w=()=>{const ve=(0,r.useContext)($);if(ve===void 0)return I;const Le=ve.atVersion(1);if(Le===void 0)throw new Error("No context found for version 1.");return Le};var J=e(54073);const ee=()=>{const{shadowRoot:ve}=useTechDocsReaderPage();return ve},Ae=ve=>{const Le=ee();return Le?ve.map(je=>Le==null?void 0:Le.querySelectorAll(je)).filter(je=>je.length).map(je=>Array.from(je)).flat():[]},ke=ve=>ve.toString()&&ve.rangeCount&&ve.getRangeAt(0).getBoundingClientRect().top,He=(ve=0)=>{const Le=ee(),[je,Xe]=useState(null),at=useMemo(()=>debounce(()=>{const tt=Le,Te=tt.getSelection?tt.getSelection():document.getSelection();Te&&ke(Te)?Xe(Te):Xe(null)},ve),[Le,Xe,ve]);return useEffect(()=>(window.document.addEventListener("selectionchange",at),()=>window.document.removeEventListener("selectionchange",at)),[at]),je},se=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 x},Router:function(){return R},isTechDocsAvailable:function(){return b}});var r=e(2784),t=e(10289),l=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,I;return Boolean((I=(M=_==null?void 0:_.metadata)==null?void 0:M.annotations)==null?void 0:I[A])},R=()=>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)})),x=_=>{var O;const{children:M}=_,{entity:I}=(0,l.useEntity)();return((O=I.metadata.annotations)==null?void 0:O[A])?r.createElement(t.Z5,null,r.createElement(t.AW,{element:r.createElement(f,{entity:I})},M)):r.createElement(h.MissingAnnotationEmptyState,{annotation:A})}},3337:function(q,i,e){"use strict";e.d(i,{D:function(){return t},g:function(){return l}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(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),l=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}`,R=await this.fetchApi.fetch(`${b.endsWith("/")?b:`${b}/`}index.html`);let x="";switch(R.status){case 404:throw x="Page not found. ",s||(x+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(x);case 500:throw x="Could not generate documentation or an error in the TechDocs backend. ",new Error(x);default:break}return R.text()}async syncEntityDocs(a,s=()=>{}){const{kind:f,namespace:y,name:u}=a,b=`${await this.getApiOrigin()}/sync/${y}/${f}/${u}`,{token:R}=await this.identityApi.getCredentials();return new Promise((x,_)=>{const M=new t.EventSourcePolyfill(b,{withCredentials:!0,headers:R?{Authorization:`Bearer ${R}`}:{}});M.addEventListener("log",I=>{I.data&&s(JSON.parse(I.data))}),M.addEventListener("finish",I=>{let $=!1;I.data&&({updated:$}=JSON.parse(I.data)),x($?"updated":"cached")}),M.onerror=I=>{switch(M.close(),I.status){case 404:_(new r.dR(I.message));return;default:_(new Error(I.data));return}}})}async getBaseUrl(a,s,f){const{kind:y,namespace:u,name:A}=s,R=`${await this.getApiOrigin()}/static/docs/${u}/${y}/${A}/${f}`;return new URL(a,R.endsWith("/")?R:`${R}/`).toString()}}},97589:function(q,i,e){"use strict";e.d(i,{D:function(){return r}});function r(t,l){return l.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),l=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(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(v.f,null),r.createElement(l.UserListPicker,{initialFilter:f}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.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),l=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:R}=b,x=(0,l.useRouteRef)(r.Fw),_=(0,l.useApi)(l.configApiRef);return R?f.createElement(h.ItemCardGrid,{"data-testid":"docs-explore"},R!=null&&R.length?R.map((M,I)=>{var $,O;return f.createElement(v.Z,{key:I},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:x({namespace:(0,t.D)((O=M.metadata.namespace)!=null?O:"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:R,entities:x}=useEntityList();return R?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:R.toString()})):b||!x?React.createElement(Progress,null):(x.sort((_,M)=>{var I,$;return((I=_.metadata.title)!=null?I:_.metadata.name).localeCompare(($=M.metadata.title)!=null?$:M.metadata.name)}),React.createElement(DocsCardGrid,{entities:x}))}},38634:function(q,i,e){"use strict";e.d(i,{H:function(){return u}});var r=e(2784),t=e(95074),l=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:R,loading:x,columns:_,actions:M}=A,[,I]=(0,t.Z)(),$=(0,l.useRouteRef)(m.Fw),O=(0,l.useApi)(l.configApiRef);if(!b)return null;const w=b.map(Ae=>{var He;const ke=(0,v.getEntityRelations)(Ae,h.S4);return{entity:Ae,resolved:{docsUrl:$({namespace:(0,y.D)((He=Ae.metadata.namespace)!=null?He:"default",O),kind:(0,y.D)(Ae.kind,O),name:(0,y.D)(Ae.metadata.name,O)}),ownedByRelations:ke,ownedByRelationsTitle:ke.map(se=>(0,v.humanizeEntityRef)(se,{defaultKind:"group"})).join(", ")}}}),J=[f.N.createNameColumn(),f.N.createOwnerColumn(),f.N.createTypeColumn()],ee=[s.n.createCopyDocsUrlAction(I)];return r.createElement(r.Fragment,null,x||w&&w.length>0?r.createElement(a.Table,{isLoading:x,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:w,columns:_||J,actions:M||ee,title:R?`${R} (${w.length})`:`All (${w.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),l=e(76635),h=e.n(l),v=e(9118),m=e(53479),a=e(38634),s=e(98095),f=e(3792);const y=u=>{var ee,Ae;const{columns:A,actions:b}=u,{loading:R,error:x,entities:_,filters:M}=(0,m.useEntityList)(),{isStarredEntity:I,toggleStarredEntity:$}=(0,m.useStarredEntities)(),[,O]=(0,t.Z)(),w=(0,l.capitalize)((Ae=(ee=M.user)==null?void 0:ee.value)!=null?Ae:"all"),J=[s.n.createCopyDocsUrlAction(O),s.n.createStarEntityAction(I,$)];return x?r.createElement(v.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(v.CodeSnippet,{language:"text",text:x.toString()})):r.createElement(a.H,{title:w,entities:_,loading:R,actions:b||J,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),l=e(2337),h=e(11640),v=e(28347);const m=(0,l.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),l=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(l.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),l=e(72580),h=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return l.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),l=e(2546);const h=()=>(0,t.pC)()||r.createElement(l.u,null)},1114:function(q,i,e){"use strict";e.d(i,{j:function(){return h}});var r=e(2784),t=e(9118),l=e(36964);const h=v=>{var f;const{children:m}=v,s=`Documentation available in ${(f=(0,l.useApi)(l.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 l{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 l})},[v]),null}},19192:function(q,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=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 l.g},techdocsPlugin:function(){return s.s4},techdocsStorageApiRef:function(){return l.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 l=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),l=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:R})=>new t.k({configApi:u,discoveryApi:A,identityApi:b,fetchApi:R})}),(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:l._Z,docRoot:l.Fw,entityContent:l.pd}}),m=v.provide((0,h.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.Router),mountPoint:l._Z})),a=v.provide((0,h.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.EmbeddedDocsRouter),mountPoint:l.pd})),s=v.provide((0,h.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(u=>u.TechDocsCustomHome),mountPoint:l._Z})),f=v.provide((0,h.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(u=>u.TechDocsIndexPage),mountPoint:l._Z})),y=v.provide((0,h.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(u=>u.TechDocsReaderPage),mountPoint:l.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),l=e(9118),h=e(47955),v=e(28626),m=e(99954),a=e(16172);const s=({withSearch:y,withHeader:u=!0})=>r.createElement(l.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:R,entityRef:x={kind:u,name:A,namespace:b}}=y,_=(0,t.pC)();if(!R){const I=(_?r.Children.toArray(_.props.children):[]).find($=>{var w,J;const{type:O}=$;return!((J=(w=O==null?void 0:O.__backstage_data)==null?void 0:w.map)!=null&&J.get(h.Zz))});return r.createElement(h.ZS,{entityRef:x},I||r.createElement(s,null))}return r.createElement(h.ZS,{entityRef:x},({metadata:M,entityMetadata:I,onReady:$})=>r.createElement(l.Page,{themeId:"documentation"},R instanceof Function?R({entityRef:x,techdocsMetadataValue:M.value,entityMetadataValue:I.value,onReady:$}):R))}},28626:function(q,i,e){"use strict";e.d(i,{Fq:function(){return yt},DK:function(){return Ae}});var r=e(2784),t=e(36617),l=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),R=e(41128),x=e(36964),_=e(36356),M=e(3337),I=e(64279),$=e(77446);function O({contentLoading:S,content:V,activeSyncState:D}){return S||D==="BUILD_READY_RELOAD"||!V&&D==="CHECKING"?"CHECKING":!V&&D==="BUILDING"?"INITIAL_BUILD":V?D==="BUILDING"?"CONTENT_STALE_REFRESHING":D==="BUILD_READY"?"CONTENT_STALE_READY":D==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function w(S,V){const D={...S};switch(V.type){case"sync":V.state==="CHECKING"&&(D.buildLog=[]),D.activeSyncState=V.state,D.syncError=V.syncError;break;case"contentLoading":D.contentLoading=!0,D.contentError=void 0;break;case"content":typeof V.path=="string"&&(D.path=V.path),D.contentLoading=!1,D.content=V.content,D.contentError=V.contentError;break;case"buildLog":D.buildLog=D.buildLog.concat(V.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(D.activeSyncState)&&["contentLoading","content"].includes(V.type)&&(D.activeSyncState="UP_TO_DATE",D.buildLog=[]),D}function J(S,V,D,ce){var Ie,Be;const[ue,W]=(0,r.useReducer)(w,{activeSyncState:"CHECKING",path:ce,contentLoading:!0,buildLog:[]}),F=(0,x.useApi)(M.D),{retry:ne}=(0,$.Z)(async()=>{W({type:"contentLoading"});try{const Ne=await F.getEntityDocs({kind:S,namespace:V,name:D},ce);return W({type:"content",content:Ne,path:ce}),Ne}catch(Ne){W({type:"content",contentError:Ne,path:ce})}},[F,S,V,D,ce]),ye=(0,r.useRef)({content:void 0,reload:()=>{}});return ye.current={content:ue.content,reload:ne},(0,I.default)(async()=>{W({type:"sync",state:"CHECKING"});const Ne=setTimeout(()=>{W({type:"sync",state:"BUILDING"})},1e3);try{switch(await F.syncEntityDocs({kind:S,namespace:V,name:D},bt=>{W({type:"buildLog",log:bt})})){case"updated":ye.current.content?W({type:"sync",state:"BUILD_READY"}):(ye.current.reload(),W({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":W({type:"sync",state:"UP_TO_DATE"});break;default:W({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(mt){W({type:"sync",state:"ERROR",syncError:mt})}finally{clearTimeout(Ne)}},[S,D,V,F,W,ye]),{state:(0,r.useMemo)(()=>O({activeSyncState:ue.activeSyncState,contentLoading:ue.contentLoading,content:ue.content}),[ue.activeSyncState,ue.content,ue.contentLoading]),contentReload:ne,path:ue.path,content:ue.content,contentErrorMessage:(Ie=ue.contentError)==null?void 0:Ie.toString(),syncErrorMessage:(Be=ue.syncError)==null?void 0:Be.toString(),buildLog:ue.buildLog}}const ee=(0,r.createContext)({}),Ae=()=>(0,r.useContext)(ee),ke=({children:S})=>{const{"*":V=""}=(0,A.UO)(),{entityRef:D}=(0,s.x1)(),{kind:ce,namespace:ue,name:W}=D,F=J(ce,ue,W,V);return r.createElement(ee.Provider,{value:F},S instanceof Function?S(F):S)},He=S=>V=>r.createElement(ke,null,r.createElement(S,{...V})),se=(S,V,D)=>{const ce=S==="src"&&V.endsWith(".svg"),ue=!V.match(/^([a-z]*:)?\/\//i),W=V.startsWith(D);return ce&&(ue||W)},ve=({techdocsStorageApi:S,entityId:V,path:D})=>async ce=>{const ue=await S.getApiOrigin(),W=async(F,ne)=>{for(const ye of F)if(ye.hasAttribute(ne)){const pe=ye.getAttribute(ne);if(!pe)return;const Ie=await S.getBaseUrl(pe,V,D);if(se(ne,pe,ue))try{const Ne=await(await fetch(Ie,{credentials:"include"})).text();ye.setAttribute(ne,`data:image/svg+xml;base64,${btoa(Ne)}`)}catch{ye.setAttribute("alt",`Error: ${pe}`)}else ye.setAttribute(ne,Ie)}};return await Promise.all([W(ce.querySelectorAll("img"),"src"),W(ce.querySelectorAll("script"),"src"),W(ce.querySelectorAll("source"),"src"),W(ce.querySelectorAll("link"),"href"),W(ce.querySelectorAll("a[download]"),"href")]),ce};var Le=e(68370),je=e(67097),Xe=e(47093),at=e(82717),tt=e.n(at);const Te=S=>V=>{const D=V.querySelector('[title="Edit this page"]');if(!D||!D.href)return V;const ce=new URL(D.href),ue=S.byUrl(ce);if((ue==null?void 0:ue.type)!=="github"&&(ue==null?void 0:ue.type)!=="gitlab")return V;const W=V.querySelector("article>h1").childNodes[0].textContent,F=encodeURIComponent(`Documentation Feedback: ${W}`),ne=encodeURIComponent(`Page source:
|
|
32
|
+
${D.href}
|
|
33
|
+
|
|
34
|
+
Feedback:`),ye=(ue==null?void 0:ue.type)==="github"?(0,Le.Pb)(ce.href,"blob"):ce.href,pe=tt()(ye),Ie=`/${pe.organization}/${pe.name}`,Be=D.cloneNode();switch(ue==null?void 0:ue.type){case"gitlab":Be.href=`${ce.origin}${Ie}/issues/new?issue[title]=${F}&issue[description]=${ne}`;break;case"github":Be.href=`${ce.origin}${Ie}/issues/new?title=${F}&body=${ne}`;break;default:return V}return Xe.render(r.createElement(je.Z),Be),Be.style.paddingLeft="5px",Be.title="Leave feedback for this page",Be.id="git-feedback-link",D==null||D.insertAdjacentElement("beforebegin",Be),V};var Ze=e(44882);const Ve=()=>S=>{const V=S.querySelector('.md-header label[for="__drawer"]'),D=S.querySelector("article");if(!V||!D)return S;const ce=V.cloneNode();return Xe.render(r.createElement(Ze.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"),D==null||D.prepend(ce),S},Ye=()=>S=>(((D,ce)=>{Array.from(D).filter(ue=>ue.hasAttribute(ce)).forEach(ue=>{const W=ue.getAttribute(ce);if(W){W.match(/^https?:\/\//i)&&ue.setAttribute("target","_blank");try{const F=gt(window.location.href);ue.setAttribute(ce,new URL(W,F).toString())}catch{ue.replaceWith(ue.textContent||W)}}})})(Array.from(S.getElementsByTagName("a")),"href"),S);function gt(S){const V=new URL(S);return!V.pathname.endsWith("/")&&!V.pathname.endsWith(".html")&&(V.pathname+="/"),V.toString()}const wt=({baseUrl:S,onClick:V})=>D=>(Array.from(D.getElementsByTagName("a")).forEach(ce=>{ce.addEventListener("click",ue=>{const F=ce.getAttribute("href");!F||F.startsWith(S)&&!ce.hasAttribute("download")&&(ue.preventDefault(),V(ue,F))})}),D);var pt=e(15459),Ut=e(80030),Vt=e(72379),Ot=e(41547);const Kt=(0,pt.Z)(S=>({tooltip:{fontSize:"inherit",color:S.palette.text.primary,margin:0,padding:S.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Ut.ZP),Wt=()=>r.createElement(Vt.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"})),Nt=({text:S})=>{const[V,D]=(0,r.useState)(!1),ce=(0,r.useCallback)(()=>{navigator.clipboard.writeText(S),D(!0)},[S]),ue=(0,r.useCallback)(()=>{D(!1)},[D]);return r.createElement(Kt,{title:"Copied to clipboard",placement:"left",open:V,onClose:ue,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:ce},r.createElement(Wt,null)))},En=S=>V=>{var ce;const D=V.querySelectorAll("pre > code");for(const ue of D){const W=ue.textContent||"",F=document.createElement("div");(ce=ue==null?void 0:ue.parentElement)==null||ce.prepend(F),Xe.render(r.createElement(Ot.Z,{theme:S},r.createElement(Nt,{text:W})),F)}return V},kt=()=>S=>{var V;return(V=S.querySelector(".md-header"))==null||V.remove(),S},Rt=()=>S=>{var V,D;return(V=S.querySelector(".md-footer .md-copyright"))==null||V.remove(),(D=S.querySelector(".md-footer-copyright"))==null||D.remove(),S},dn=({docStorageUrl:S,onLoading:V,onLoaded:D})=>ce=>{const ue=Array.from(ce.querySelectorAll('head > link[rel="stylesheet"]')).filter(F=>{var ne;return(ne=F.getAttribute("href"))==null?void 0:ne.startsWith(S)});let W=ue.length;return W>0&&V(ce),ue.forEach(F=>F.addEventListener("load",()=>{W-=1,W===0&&D(ce)})),ce};var ie=e(35368),j=e.n(ie);const ae=/main\.[A-Fa-f0-9]{8}\.min\.css$/,le=/^https:\/\/fonts\.googleapis\.com/,Ee=/^https:\/\/fonts\.gstatic\.com/,xe=S=>{if(S.nodeName&&S.nodeName==="LINK"){const V=S.getAttribute("href")||"";V.match(ae)&&S.setAttribute("rel","stylesheet"),V.match(le)&&S.setAttribute("rel","stylesheet"),V.match(Ee)&&S.setAttribute("rel","preconnect")}return S},Ue=S=>V=>{if(V.nodeName==="IFRAME"){const D=V.getAttribute("src");if(!D)return V.remove(),V;try{const ce=new URL(D);S.some(W=>ce.host===W)||V.remove()}catch(ce){console.warn(`Invalid iframe src, ${ce}`),V.remove()}}return V},Ce=S=>{const V=(S==null?void 0:S.getOptionalStringArray("allowedIframeHosts"))||[];return D=>{j().addHook("afterSanitizeAttributes",xe);const ce=["link"];return V.length>0&&(j().addHook("beforeSanitizeElements",Ue(V)),ce.push("iframe")),j().sanitize(D.innerHTML,{ADD_TAGS:ce,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},Ge=({css:S})=>V=>(V.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${S}</style>`),V),ft=()=>S=>(setTimeout(()=>{var V;if(window.location.hash){const D=window.location.hash.slice(1);(V=S==null?void 0:S.querySelector(`[id="${D}"]`))==null||V.scrollIntoView()}},200),S),Tt=async(S,V)=>{let D;if(typeof S=="string")D=new DOMParser().parseFromString(S,"text/html").documentElement;else if(S instanceof Element)D=S;else throw new Error("dom is not a recognized type");for(const ce of V)D=await ce(D);return D},dt=["h1","h2","h3","h4","h5","h6"],nt=S=>{const V=(0,A.s0)(),D=(0,b.Z)(),ce=(0,x.useApi)(M.D),ue=(0,x.useApi)(_.q3),W=(0,x.useApi)(x.configApiRef),{namespace:F,kind:ne,name:ye}=S,{state:pe,path:Ie,content:Be}=Ae(),Ne=D.palette.type==="dark",[mt,bt]=(0,r.useState)(),[st,ut]=(0,r.useState)(null),{isPinned:Mt}=(0,r.useContext)(f.SidebarPinStateContext),Qe=(0,r.useCallback)(()=>{if(!st||!mt)return;const rt=st.querySelector(".md-container > .md-tabs"),Je=window.matchMedia("screen and (max-width: 76.1875em)").matches,Ht=Math.max(st.getBoundingClientRect().top,0);mt.forEach(Dt=>{Je?Dt.style.top="0px":rt?Dt.style.top=`${Ht+rt.getBoundingClientRect().height}px`:Dt.style.top=`${Ht}px`})},[st,mt]);(0,r.useEffect)(()=>(Qe(),window.addEventListener("scroll",Qe,!0),window.addEventListener("resize",Qe),()=>{window.removeEventListener("scroll",Qe,!0),window.removeEventListener("resize",Qe)}),[Qe,pe]);const vt=(0,r.useCallback)(()=>{if(!st)return;const rt=st.querySelector(".md-footer");rt&&(rt.style.width=`${st.getBoundingClientRect().width}px`)},[st]);(0,r.useEffect)(()=>(vt(),window.addEventListener("resize",vt),()=>{window.removeEventListener("resize",vt)}));const ct=(0,r.useCallback)((rt,Je)=>Tt(rt,[Ce(W.getOptionalConfig("techdocs.sanitizer")),ve({techdocsStorageApi:ce,entityId:{kind:ne,name:ye,namespace:F},path:Je}),Ye(),Ve(),kt(),Rt(),Te(ue),Ge({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: ${D.palette.text.primary};
|
|
42
|
+
--md-default-fg-color--light: ${D.palette.text.secondary};
|
|
43
|
+
--md-default-fg-color--lighter: ${(0,R.$n)(D.palette.text.secondary,.7)};
|
|
44
|
+
--md-default-fg-color--lightest: ${(0,R.$n)(D.palette.text.secondary,.3)};
|
|
45
|
+
|
|
46
|
+
/* BACKGROUND */
|
|
47
|
+
--md-default-bg-color:${D.palette.background.default};
|
|
48
|
+
--md-default-bg-color--light: ${D.palette.background.paper};
|
|
49
|
+
--md-default-bg-color--lighter: ${(0,R.$n)(D.palette.background.paper,.7)};
|
|
50
|
+
--md-default-bg-color--lightest: ${(0,R.$n)(D.palette.background.paper,.3)};
|
|
51
|
+
|
|
52
|
+
/* PRIMARY */
|
|
53
|
+
--md-primary-fg-color: ${D.palette.primary.main};
|
|
54
|
+
--md-primary-fg-color--light: ${D.palette.primary.light};
|
|
55
|
+
--md-primary-fg-color--dark: ${D.palette.primary.dark};
|
|
56
|
+
--md-primary-bg-color: ${D.palette.primary.contrastText};
|
|
57
|
+
--md-primary-bg-color--light: ${(0,R.$n)(D.palette.primary.contrastText,.7)};
|
|
58
|
+
|
|
59
|
+
/* ACCENT */
|
|
60
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
+
|
|
62
|
+
/* SHADOW */
|
|
63
|
+
--md-shadow-z1: ${D.shadows[1]};
|
|
64
|
+
--md-shadow-z2: ${D.shadows[2]};
|
|
65
|
+
--md-shadow-z3: ${D.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: ${D.palette.text.primary};
|
|
102
|
+
--md-code-bg-color: ${D.palette.background.paper};
|
|
103
|
+
--md-code-hl-color: ${(0,R.Fq)(D.palette.warning.main,.5)};
|
|
104
|
+
--md-code-hl-keyword-color: ${Ne?D.palette.primary.light:D.palette.primary.dark};
|
|
105
|
+
--md-code-hl-function-color: ${Ne?D.palette.secondary.light:D.palette.secondary.dark};
|
|
106
|
+
--md-code-hl-string-color: ${Ne?D.palette.success.light:D.palette.success.dark};
|
|
107
|
+
--md-code-hl-number-color: ${Ne?D.palette.error.light:D.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: ${D.palette.text.primary};
|
|
122
|
+
--md-typeset-del-color: ${Ne?(0,R.Fq)(D.palette.error.dark,.5):(0,R.Fq)(D.palette.error.light,.5)};
|
|
123
|
+
--md-typeset-ins-color: ${Ne?(0,R.Fq)(D.palette.success.dark,.5):(0,R.Fq)(D.palette.success.light,.5)};
|
|
124
|
+
--md-typeset-mark-color: ${Ne?(0,R.Fq)(D.palette.warning.dark,.5):(0,R.Fq)(D.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
|
+
`}),Ge({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: ${D.typography.fontFamily};
|
|
145
|
+
font-family: var(--md-text-font-family);
|
|
146
|
+
background-color: unset;
|
|
147
|
+
}
|
|
148
|
+
`}),Ge({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:${D.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: ${D.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: ${Mt?"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
|
+
`}),Ge({css:`
|
|
336
|
+
.md-typeset {
|
|
337
|
+
font-size: var(--md-typeset-font-size);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
${dt.reduce((Ht,Dt)=>{const Pt=D.typography[Dt],{lineHeight:$t,fontFamily:Qt,fontWeight:Xt,fontSize:an}=Pt,Mn=fn=>{let rn=1;return typeof fn=="number"&&(rn=fn/16*.6),typeof fn=="string"&&(rn=fn.replace("rem","")),`calc(${rn} * var(--md-typeset-font-size))`};return Ht.concat(`
|
|
341
|
+
.md-typeset ${Dt} {
|
|
342
|
+
color: var(--md-default-fg-color);
|
|
343
|
+
line-height: ${$t};
|
|
344
|
+
font-family: ${Qt};
|
|
345
|
+
font-weight: ${Xt};
|
|
346
|
+
font-size: ${Mn(an)};
|
|
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 ${D.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
|
+
`}),Ge({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
|
+
`}),Ge({css:`
|
|
408
|
+
/* HIGHLIGHT */
|
|
409
|
+
.highlight .md-clipboard:after {
|
|
410
|
+
content: unset;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.highlight .nx {
|
|
414
|
+
color: ${Ne?"#ff53a3":"#ec407a"};
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* CODE HILITE */
|
|
418
|
+
.codehilite .gd {
|
|
419
|
+
background-color: ${Ne?"rgba(248,81,73,0.65)":"#fdd"};
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.codehilite .gi {
|
|
423
|
+
background-color: ${Ne?"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: ${D.palette.action.disabledBackground};
|
|
454
|
+
}
|
|
455
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
456
|
+
background-color: ${D.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
|
+
`})]),[ne,ye,F,ue,W,ce,D,Ne,Mt]),Gt=(0,r.useCallback)(async rt=>Tt(rt,[ft(),En(D),wt({baseUrl:window.location.origin,onClick:(Je,Ht)=>{var $t;const Dt=Je.ctrlKey||Je.metaKey,Pt=new URL(Ht);Pt.hash?Dt?window.open(`${Pt.pathname}${Pt.hash}`,"_blank"):(V(`${Pt.pathname}${Pt.hash}`),($t=rt==null?void 0:rt.querySelector(`#${Pt.hash.slice(1)}`))==null||$t.scrollIntoView()):Dt?window.open(Pt.pathname,"_blank"):V(Pt.pathname)}}),dn({docStorageUrl:await ce.getApiOrigin(),onLoading:Je=>{Je.style.setProperty("opacity","0")},onLoaded:Je=>{var Ht;Je.style.removeProperty("opacity"),(Ht=Je.querySelector(".md-nav__title"))==null||Ht.removeAttribute("for"),bt(Array.from(Je.querySelectorAll(".md-sidebar")))}})]),[D,V,ce]);return(0,r.useEffect)(()=>{if(!Be)return()=>{};let rt=!0;return ct(Be,Ie).then(async Je=>{if(!(Je!=null&&Je.innerHTML)||!rt)return;window.scroll({top:0});const Ht=await Gt(Je);ut(Ht)}),()=>{rt=!1}},[Be,Ie,ct,Gt]),st},xt=(0,l.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),yt=He(S=>{const{withSearch:V=!0,onReady:D}=S,ce=xt(),ue=(0,s.$L)(),{entityRef:W,shadowRoot:F,setShadowRoot:ne}=(0,s.x1)(),ye=nt(W),[pe,Ie]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),Be=(0,r.useCallback)(Mt=>{var vt;if(!ye||!Mt)return;Ie((0,t.Ue)({...(0,m.Z)(),insertionPoint:ye.querySelector("head")||void 0}));const Qe=(vt=Mt.shadowRoot)!=null?vt:Mt.attachShadow({mode:"open"});Qe.innerHTML="",Qe.appendChild(ye),ne(Qe),D instanceof Function&&D()},[ye,ne,D]),Ne=F==null?void 0:F.querySelector('[data-md-component="content"]'),mt=F==null?void 0:F.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),bt=F==null?void 0:F.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),st=document.createElement("div");mt==null||mt.prepend(st);const ut=document.createElement("div");return bt==null||bt.prepend(ut),ye?r.createElement(f.Content,null,r.createElement(h.Z,{container:!0},r.createElement(h.Z,{xs:12,item:!0},r.createElement(u.N,null)),V&&r.createElement(h.Z,{className:ce.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:W})),r.createElement(h.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:pe,sheetsManager:new Map},r.createElement("div",{ref:Be,"data-testid":"techdocs-native-shadowroot"}),r.createElement(v.Z,{container:st},ue.renderComponentsByLocation(s.oZ.PrimarySidebar)),r.createElement(v.Z,{container:Ne},ue.renderComponentsByLocation(s.oZ.Content)),r.createElement(v.Z,{container:ut},ue.renderComponentsByLocation(s.oZ.SecondarySidebar)))))):r.createElement(f.Content,null,r.createElement(f.Progress,null))}),ge=null},99954:function(q,i,e){"use strict";e.d(i,{S:function(){return A}});var r=e(2784),t=e(18671),l=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(l.Z,{animation:"wave",variant:"text",height:40}),A=b=>{const{children:R}=b,x=(0,v.$L)(),_=(0,f.useApi)(f.configApiRef),{title:M,setTitle:I,subtitle:$,setSubtitle:O,entityRef:w,metadata:{value:J},entityMetadata:{value:ee}}=(0,v.x1)();(0,r.useEffect)(()=>{!J||(I(at=>{const{site_name:tt}=J;return at||tt}),O(at=>{let{site_description:tt}=J;return(!tt||tt==="None")&&(tt="Home"),at||tt}))},[J,I,O]);const Ae=_.getOptional("app.title")||"Backstage",ke=[$,M,Ae].filter(Boolean).join(" | "),{locationMetadata:He,spec:se}=ee||{},ve=se==null?void 0:se.lifecycle,Le=ee?(0,m.getEntityRelations)(ee,a.S4):[],je=(0,f.useRouteRef)(y._Z)(),Xe=r.createElement(r.Fragment,null,r.createElement(s.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:w,defaultKind:"Component"})}),Le.length>0&&r.createElement(s.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:Le,defaultKind:"group"})}),ve?r.createElement(s.HeaderLabel,{label:"Lifecycle",value:ve}):null,He&&He.type!=="dir"&&He.type!=="file"?r.createElement(s.HeaderLabel,{label:"",value:r.createElement("a",{href:He.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(h.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return r.createElement(s.Header,{type:"Documentation",typeLink:je,title:M||u,subtitle:$||u},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,ke)),Xe,R,x.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),l=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(),u=(0,v.$L)().renderComponentsByLocation(v.oZ.Subheader);return u?r.createElement(l.Z,{classes:f,...s},u&&r.createElement(h.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},u)):null}},23738:function(q,i,e){"use strict";e.d(i,{N:function(){return O}});var r=e(2784),t=e(9118),l=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,l.Z)(w=>(0,a.Z)({paper:{width:"100%",[w.breakpoints.up("sm")]:{width:"75%"},[w.breakpoints.up("md")]:{width:"50%"},padding:w.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:w.palette.background.default}})),R=({buildLog:w,onClose:J})=>{const ee=b(),Ae=w.length===0?"Waiting for logs...":w.join(`
|
|
474
|
+
`);return r.createElement(s.Z,{container:!0,direction:"column",className:ee.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:J,color:"inherit"},r.createElement(A.Z,null))),r.createElement(t.LogViewer,{text:Ae,classes:{root:ee.logs}}))},x=({buildLog:w})=>{const J=b(),[ee,Ae]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(v.Z,{color:"inherit",onClick:()=>Ae(!0)},"Show Build Logs"),r.createElement(u.ZP,{classes:{paper:J.paper},anchor:"right",open:ee,onClose:()=>Ae(!1)},r.createElement(R,{buildLog:w,onClose:()=>Ae(!1)})))};var _=e(36964);const M=({errorMessage:w})=>{const J=(0,_.useApi)(_.configApiRef).getOptionalString("techdocs.builder");let ee="";return J!=="local"&&(ee="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:w||"Documentation not found",additionalInfo:ee})};var I=e(28626);const $=(0,l.Z)(w=>({root:{marginBottom:w.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),O=()=>{let w=null;const J=$(),{state:ee,contentReload:Ae,contentErrorMessage:ke,syncErrorMessage:He,buildLog:se}=(0,I.DK)(),ve=ee==="CHECKING"?r.createElement(t.Progress,null):null;return ee==="INITIAL_BUILD"&&(w=r.createElement(m.Z,{classes:{root:J.root},variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(x,{buildLog:se})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ee==="CONTENT_STALE_REFRESHING"&&(w=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(x,{buildLog:se}),classes:{root:J.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ee==="CONTENT_STALE_READY"&&(w=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(v.Z,{color:"inherit",onClick:()=>Ae()},"Refresh"),classes:{root:J.root}},"A newer version of this documentation is now available, please refresh to view.")),ee==="CONTENT_STALE_ERROR"&&(w=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(x,{buildLog:se}),classes:{root:J.root,message:J.message}},"Building a newer version of this documentation failed."," ",He)),ee==="CONTENT_NOT_FOUND"&&(w=r.createElement(r.Fragment,null,He&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(x,{buildLog:se}),classes:{root:J.root,message:J.message}},"Building a newer version of this documentation failed."," ",He),r.createElement(M,{errorMessage:ke}))),r.createElement(r.Fragment,null,ve,w)}},96393:function(q,i,e){"use strict";e.d(i,{Fq:function(){return l.Fq},SE:function(){return t.S}});var r=e(26220),t=e(99954),l=e(28626),h=e(16172),v=e(23738)},68725:function(q,i,e){"use strict";e.d(i,{Fw:function(){return l},_Z:function(){return t},pd:function(){return h}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},10459:function(q,i,e){"use strict";e.d(i,{S:function(){return yt}});var r=e(2784),t=e(79692),l=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=ge=>{const{result:S,lineClamp:V=5,asListItem:D=!0,asLink:ce=!0,title:ue}=ge,W=f(),F=()=>{var pe;return r.createElement(l.Z,{className:W.itemText,primaryTypographyProps:{variant:"h6"},primary:ue||`${S.title} | ${(pe=S.entityTitle)!=null?pe:S.name} docs`,secondary:r.createElement(s(),{line:V,truncateText:"\u2026",text:S.text,element:"span"})})},ne=({children:pe})=>ce?r.createElement(m.Link,{to:S.location},pe):r.createElement(r.Fragment,null,pe),ye=({children:pe})=>D?r.createElement(r.Fragment,null,r.createElement(h.Z,{alignItems:"flex-start",className:W.flexContainer},pe),r.createElement(v.Z,{component:"li"})):r.createElement(r.Fragment,null,pe);return r.createElement(ne,null,r.createElement(ye,null,r.createElement(F,null)))};var u=e(36964);const A=(0,u.createApiRef)({id:"plugin.search.queryservice"});var b=e(76241),R=e(64279),x=e(1849);const _=(0,b.CT)("search-context"),M=()=>{const ge=(0,r.useContext)(_);if(!ge)throw new Error("useSearch must be used within a SearchContextProvider");const S=ge.atVersion(1);if(!S)throw new Error("No SearchContext v1 found");return S},I={term:"",pageCursor:void 0,filters:{},types:[]},$=ge=>{var vt,ct,Gt,rt;const{initialState:S=I,children:V}=ge,D=(0,u.useApi)(A),[ce,ue]=(0,r.useState)(S.pageCursor),[W,F]=(0,r.useState)(S.filters),[ne,ye]=(0,r.useState)(S.term),[pe,Ie]=(0,r.useState)(S.types),Be=(0,x.Z)(ne),Ne=(0,R.default)(()=>D.query({term:ne,filters:W,pageCursor:ce,types:pe}),[ne,W,pe,ce]),mt=!Ne.loading&&!Ne.error&&((vt=Ne.value)==null?void 0:vt.nextPageCursor),bt=!Ne.loading&&!Ne.error&&((ct=Ne.value)==null?void 0:ct.previousPageCursor),st=(0,r.useCallback)(()=>{var Je;ue((Je=Ne.value)==null?void 0:Je.nextPageCursor)},[(Gt=Ne.value)==null?void 0:Gt.nextPageCursor]),ut=(0,r.useCallback)(()=>{var Je;ue((Je=Ne.value)==null?void 0:Je.previousPageCursor)},[(rt=Ne.value)==null?void 0:rt.previousPageCursor]);(0,r.useEffect)(()=>{ne&&Be&&ne!==Be&&ue(void 0)},[ne,Be,S.pageCursor]);const Mt={result:Ne,filters:W,setFilters:F,term:ne,setTerm:ye,types:pe,setTypes:Ie,pageCursor:ce,setPageCursor:ue,fetchNextPage:mt?st:void 0,fetchPreviousPage:bt?ut:void 0},Qe=(0,b.EI)({1:Mt});return r.createElement(u.AnalyticsContext,{attributes:{searchTypes:pe.sort().join(",")}},r.createElement(_.Provider,{value:Qe,children:V}))};var O=e(49208),w=e(62159);class J{constructor(S){Q(this,"config");this.config=new ConfigReader(S)}has(S){return this.config.has(S)}keys(){return this.config.keys()}get(S){return this.config.get(S)}getOptional(S){return this.config.getOptional(S)}getConfig(S){return this.config.getConfig(S)}getOptionalConfig(S){return this.config.getOptionalConfig(S)}getConfigArray(S){return this.config.getConfigArray(S)}getOptionalConfigArray(S){return this.config.getOptionalConfigArray(S)}getNumber(S){return this.config.getNumber(S)}getOptionalNumber(S){return this.config.getOptionalNumber(S)}getBoolean(S){return this.config.getBoolean(S)}getOptionalBoolean(S){return this.config.getOptionalBoolean(S)}getString(S){return this.config.getString(S)}getOptionalString(S){return this.config.getOptionalString(S)}getStringArray(S){return this.config.getStringArray(S)}getOptionalStringArray(S){return this.config.getOptionalStringArray(S)}}const ee={subscribe:()=>({unsubscribe:()=>{},closed:!0}),[Symbol.observable](){return this}};class Ae{constructor(S={}){Q(this,"errors",new Array);Q(this,"waiters",new Set);this.options=S}post(S,V){if(this.options.collect){this.errors.push({error:S,context:V});for(const D of this.waiters)D.pattern.test(S.message)&&(this.waiters.delete(D),D.resolve({error:S,context:V}));return}throw new Error(`MockErrorApi received unexpected error, ${S}`)}error$(){return ee}getErrors(){return this.errors}waitForError(S,V=2e3){return new Promise((D,ce)=>{setTimeout(()=>{ce(new Error("Timed out waiting for error"))},V),this.waiters.add({resolve:D,pattern:S})})}}var ke=e(96279);class He{constructor(S){Q(this,"implementation");this.implementation=se(S)}get fetch(){return this.implementation.fetch}}function se(ge){return createFetchApi({baseImplementation:ve(ge),middleware:[Le(ge),je(ge)].filter(S=>Boolean(S))})}function ve(ge){const S=ge==null?void 0:ge.baseImplementation;if(S){if(S==="none")return()=>Promise.resolve(new Response)}else return crossFetch;return S}function Le(ge){const S=ge==null?void 0:ge.resolvePluginProtocol;if(!!S)return FetchMiddlewares.resolvePluginProtocol({discoveryApi:S.discoveryApi})}function je(ge){const S=ge==null?void 0:ge.injectIdentityAuth;if(!S)return;const V="token"in S?{getCredentials:async()=>({token:S.token})}:S.identityApi;return FetchMiddlewares.injectIdentityAuth({identityApi:V,allowUrl:()=>!0})}var Xe=e(40749);class at{constructor(S=()=>AuthorizeResult.ALLOW){this.requestHandler=S}async authorize(S){return{result:this.requestHandler(S)}}}var tt=e(82394),Te=e.n(tt);class Ze{constructor(S,V,D){Q(this,"namespace");Q(this,"data");Q(this,"bucketStorageApis");Q(this,"subscribers",new Set);Q(this,"observable",new(Te())(S=>(this.subscribers.add(S),()=>{this.subscribers.delete(S)})));this.namespace=S,this.bucketStorageApis=V,this.data={...D}}static create(S){return new Ze("",new Map,S)}forBucket(S){return this.bucketStorageApis.has(S)||this.bucketStorageApis.set(S,new Ze(`${this.namespace}/${S}`,this.bucketStorageApis,this.data)),this.bucketStorageApis.get(S)}snapshot(S){if(this.data.hasOwnProperty(this.getKeyName(S))){const V=this.data[this.getKeyName(S)];return{key:S,presence:"present",value:V}}return{key:S,presence:"absent",value:void 0}}async set(S,V){const D=JSON.parse(JSON.stringify(V),(ce,ue)=>(typeof ue=="object"&&ue!==null&&Object.freeze(ue),ue));this.data[this.getKeyName(S)]=D,this.notifyChanges({key:S,presence:"present",value:D})}async remove(S){delete this.data[this.getKeyName(S)],this.notifyChanges({key:S,presence:"absent",value:void 0})}observe$(S){return this.observable.filter(({key:V})=>V===S)}getKeyName(S){return`${this.namespace}/${encodeURIComponent(S)}`}notifyChanges(S){for(const V of this.subscribers)V.next(S)}}var Ve=e(28981),Ye=e(83677),gt=e(63751);async function wt(ge){let S;return await act(async()=>{S=render(ge)}),S}const pt=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:ge})=>O.UrlPatternDiscovery.compile(`${ge.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)(u.alertApiRef,new O.AlertApiForwarder),(0,u.createApiFactory)(u.analyticsApiRef,new O.NoOpAnalyticsApi),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:ge})=>{const S=new O.ErrorAlerter(ge,new O.ErrorApiForwarder);return O.UnhandledErrorForwarder.forward(S,{hidden:!1}),S}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:ge})=>O.WebStorage.create({errorApi:ge})}),(0,u.createApiFactory)(u.oauthRequestApiRef,new O.OAuthRequestManager),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.GoogleAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:V.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.MicrosoftAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:V.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.GithubAuth.create({discoveryApi:ge,oauthRequestApi:S,defaultScopes:["read:user"],environment:V.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.OktaAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:V.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.GitlabAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:V.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.OneLoginAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:V.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.BitbucketAuth.create({discoveryApi:ge,oauthRequestApi:S,defaultScopes:["team"],environment:V.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:V})=>O.AtlassianAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:V.getOptionalString("auth.environment")})})],Ut=[(0,u.createApiFactory)(u.errorApiRef,new Ae),(0,u.createApiFactory)(u.storageApiRef,Ze.create())],Vt={"kind:api":Ye.Z,"kind:component":Ye.Z,"kind:domain":Ye.Z,"kind:group":Ye.Z,"kind:location":Ye.Z,"kind:system":Ye.Z,"kind:user":Ye.Z,brokenImage:Ye.Z,catalog:Ye.Z,scaffolder:Ye.Z,techdocs:Ye.Z,search:Ye.Z,chat:Ye.Z,dashboard:Ye.Z,docs:Ye.Z,email:Ye.Z,github:Ye.Z,group:Ye.Z,help:Ye.Z,user:Ye.Z,warning:Ye.Z},Ot=({error:ge})=>{throw new Error(`Reached ErrorBoundaryFallback Page with error, ${ge}`)},Kt=()=>{throw new Error("Reached NotFound Page")},Wt=({step:ge,error:S})=>{throw new Error(`Reached BootError Page at step ${ge} with error ${S}`)},Nt=()=>React.createElement("div",{"data-testid":"progress"}),En=ge=>null;function kt(ge){return String(ge).includes("{type=external,")}function Rt(ge,S={}){var ye;const{routeEntries:V=["/"]}=S,D=new Map,ce=createSpecializedApp({apis:mockApis,defaultApis,configLoader:!1,components:{Progress:Nt,BootErrorPage:Wt,NotFoundErrorPage:Kt,ErrorBoundaryFallback:Ot,Router:({children:pe})=>React.createElement(MemoryRouter,{initialEntries:V,children:pe})},icons:Vt,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[Ie,Be]of D)pe({ref:Ie},{ref:Be})}});let ue;ge instanceof Function?ue=React.createElement(ge,null):ue=ge;const W=Object.entries((ye=S.mountedRoutes)!=null?ye:{}).map(([pe,Ie])=>{const Be=()=>React.createElement("div",null,"Mounted at ",pe);if(kt(Ie)){const Ne=createRouteRef({id:"id"});D.set(Ie,Ne),attachComponentData(Be,"core.mountPoint",Ne)}else attachComponentData(Be,"core.mountPoint",Ie);return React.createElement(Route,{key:pe,path:pe,element:React.createElement(Be,null)})}),F=ce.getProvider(),ne=ce.getRouter();return React.createElement(F,null,React.createElement(ne,null,React.createElement(En,null,W),React.createElement(Routes,null,React.createElement(Route,{path:"/*",element:ue}))))}async function dn(ge,S={}){return renderWithEffects(Rt(ge,S))}class ie{static from(...S){return new ie(new Map(S.map(([V,D])=>[V.id,D])))}constructor(S){this.apis=S}get(S){return this.apis.get(S.id)}}const j=ge=>React.createElement(ApiProvider,{apis:ie.from(...ge.apis),children:ge.children});function ae(ge){const{mockedResults:S,children:V}=ge,D=()=>Promise.resolve(S||{}),ce=TestApiRegistry.from([searchApiRef,{query:D}]);return React.createElement(ApiProvider,{apis:ce,children:V})}const le=ge=>React.createElement(ae,{...ge},React.createElement(SearchContextProvider,{children:ge.children}));var Ee=e(86619),xe=e(50581),Ue=e(61837),Ce=e(4614),Ge=e(21853),ft=e(88013),Tt=e(10289),dt=e(48760);const nt=(0,t.Z)({root:{width:"100%"}}),xt=ge=>{const{entityId:S,debounceTime:V=150}=ge,[D,ce]=(0,r.useState)(!1),ue=(0,Tt.s0)(),{term:W,setTerm:F,setFilters:ne,result:{loading:ye,value:pe}}=M(),Ie=nt(),[Be,Ne]=(0,r.useState)([]);(0,r.useEffect)(()=>{let ct=!0;if(ct&&pe){const Gt=pe.results.slice(0,10);Ne(Gt)}return()=>{ct=!1}},[ye,pe]);const[mt,bt]=(0,r.useState)(W);(0,dt.Z)(()=>F(mt),V,[mt]);const{kind:st,name:ut,namespace:Mt}=S;(0,r.useEffect)(()=>{ne(ct=>({...ct,kind:st,namespace:Mt,name:ut}))},[st,Mt,ut,ne]);const Qe=ct=>{D||ce(!0),bt(ct.target.value)},vt=(ct,Gt)=>{if(Gt!=null&&Gt.document){const{location:rt}=Gt.document;ue(rt)}};return r.createElement(ft.ZP,{classes:{root:Ie.root},"data-testid":"techdocs-search-bar",size:"small",open:D,getOptionLabel:()=>"",filterOptions:ct=>ct,onClose:()=>{ce(!1)},onFocus:()=>{ce(!0)},onChange:vt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Be,renderOption:({document:ct})=>r.createElement(y,{result:ct,lineClamp:3,asListItem:!1,asLink:!1,title:ct.title}),loading:ye,renderInput:ct=>r.createElement(Ee.Z,{...ct,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${S.name} docs`,value:mt,onChange:Qe,InputProps:{...ct.InputProps,startAdornment:r.createElement(xe.Z,{position:"start"},r.createElement(Ue.Z,{"aria-label":"Query",disabled:!0},r.createElement(Ge.Z,null))),endAdornment:r.createElement(r.Fragment,null,ye?r.createElement(Ce.Z,{color:"inherit",size:20}):null,ct.InputProps.endAdornment)}})})},yt=ge=>{const S={term:"",types:["techdocs"],pageCursor:"",filters:ge.entityId};return r.createElement($,{initialState:S},r.createElement(xt,{...ge}))}},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.698e0a31.js.map
|