@techdocs/cli 0.0.0-nightly-20220730024935 → 0.0.0-nightly-20220802025813
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 +3 -3
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/main.f60454f5.js +492 -0
- package/dist/embedded-app/static/main.f60454f5.js.map +1 -0
- package/dist/embedded-app/static/{runtime.ec77374e.js → runtime.f60454f5.js} +1 -1
- package/dist/embedded-app/static/{runtime.ec77374e.js.map → runtime.f60454f5.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.ec77374e.js → vendor.f60454f5.js} +1 -1
- package/dist/embedded-app/static/{vendor.ec77374e.js.map → vendor.f60454f5.js.map} +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/main.ec77374e.js +0 -492
- package/dist/embedded-app/static/main.ec77374e.js.map +0 -1
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
(()=>{var nl=Object.defineProperty;var rl=(te,s,e)=>s in te?nl(te,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):te[s]=e;var X=(te,s,e)=>(rl(te,typeof s!="symbol"?s+"":s,e),e),Aa=(te,s,e)=>{if(!s.has(te))throw TypeError("Cannot "+e)};var at=(te,s,e)=>(Aa(te,s,"read from private field"),e?e.call(te):s.get(te)),Mn=(te,s,e)=>{if(s.has(te))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(te):s.set(te,e)},zn=(te,s,e,r)=>(Aa(te,s,"write to private field"),r?r.call(te,e):s.set(te,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(te,s,e){"use strict";e.d(s,{n3:function(){return R},MS:function(){return f}});var r=e(48023),t=e(10179),c=e(96279),i=e.n(c);const R=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class f{constructor(u){X(this,"discoveryApi");X(this,"fetchApi");this.discoveryApi=u.discoveryApi,this.fetchApi=u.fetchApi||{fetch:i()}}async getEntityAncestors(u,m){const{kind:y,namespace:g,name:E}=(0,r.of)(u.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}/ancestry`,m)}async getLocationById(u,m){return await this.requestOptional("GET",`/locations/${encodeURIComponent(u)}`,m)}async getEntities(u,m){const{filter:y=[],fields:g=[],offset:E,limit:S,after:b}=u!=null?u:{},O=[];for(const D of[y].flat()){const x=[];for(const[M,K]of Object.entries(D))for(const re of[K].flat())re===R?x.push(encodeURIComponent(M)):typeof re=="string"&&x.push(`${encodeURIComponent(M)}=${encodeURIComponent(re)}`);x.length&&O.push(`filter=${x.join(",")}`)}g.length&&O.push(`fields=${g.map(encodeURIComponent).join(",")}`),E!==void 0&&O.push(`offset=${E}`),S!==void 0&&O.push(`limit=${S}`),b!==void 0&&O.push(`after=${encodeURIComponent(b)}`);const $=O.length?`?${O.join("&")}`:"",B=await this.requestRequired("GET",`/entities${$}`,m),F=(D,x)=>{var re,le;if(((re=D.metadata)==null?void 0:re.name)===void 0||D.kind===void 0||((le=x.metadata)==null?void 0:le.name)===void 0||x.kind===void 0)return 0;const M=(0,r.eE)(D),K=(0,r.eE)(x);return M<K?-1:M>K?1:0};return{items:B.sort(F)}}async getEntityByRef(u,m){const{kind:y,namespace:g,name:E}=(0,r.of)(u);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,m)}async getEntityByName(u,m){const{kind:y,namespace:g="default",name:E}=u;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(g)}/${encodeURIComponent(E)}`,m)}async refreshEntity(u,m){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(m==null?void 0:m.token)&&{Authorization:`Bearer ${m==null?void 0:m.token}`}},method:"POST",body:JSON.stringify({entityRef:u})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(u,m){const{filter:y=[],facets:g}=u,E=[];for(const b of[y].flat()){const O=[];for(const[$,B]of Object.entries(b))for(const F of[B].flat())F===R?O.push(encodeURIComponent($)):typeof F=="string"&&O.push(`${encodeURIComponent($)}=${encodeURIComponent(F)}`);O.length&&E.push(`filter=${O.join(",")}`)}for(const b of g)E.push(`facet=${encodeURIComponent(b)}`);const S=E.length?`?${E.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${S}`,m)}async addLocation({type:u="url",target:m,dryRun:y},g){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(g==null?void 0:g.token)&&{Authorization:`Bearer ${g==null?void 0:g.token}`}},method:"POST",body:JSON.stringify({type:u,target:m})});if(E.status!==201)throw new Error(await E.text());const{location:S,entities:b,exists:O}=await E.json();if(!S)throw new Error(`Location wasn't added: ${m}`);return{location:S,entities:b,exists:O}}async getLocationByRef(u,m){return(await this.requestRequired("GET","/locations",m)).map(g=>g.data).find(g=>u===(0,r.NZ)(g))}async removeLocationById(u,m){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(u)}`,m)}async removeEntityByUid(u,m){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(u)}`,m)}async requestIgnored(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S)}async requestRequired(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S);return await S.json()}async requestOptional(u,m,y){const g=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(g,{method:u,headers:E});if(!S.ok){if(S.status===404)return;throw await t.VL.fromResponse(S)}return await S.json()}}},48023:function(te,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return Wt},q1:function(){return fn},M6:function(){return Ln},l2:function(){return t},zG:function(){return r},w$:function(){return Pe},nP:function(){return de},aS:function(){return Ct},S4:function(){return we},cz:function(){return gt},iB:function(){return bt},CV:function(){return Xe},of:function(){return At},Ou:function(){return kt},eE:function(){return Ie},NZ:function(){return Zt}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url",i="kubernetes.io/api-server",R="kubernetes.io/api-server-certificate-authority",f="kubernetes.io/auth-provider";var a=e(76635),u=e.n(a);class m{constructor(j=DEFAULT_NAMESPACE){X(this,"namespace");this.namespace=j}async enforce(j){return j.metadata.namespace?j:lodash.merge({metadata:{namespace:this.namespace}},j)}}class y{static isValidPrefixAndOrSuffix(j,ye,je,_e){if(typeof j!="string")return!1;const st=j.split(ye);return st.length===1?_e(st[0]):st.length===2?je(st[0])&&_e(st[1]):!1}static isJsonSafe(j){try{return u().isEqual(j,JSON.parse(JSON.stringify(j)))}catch{return!1}}static isValidDnsSubdomain(j){return typeof j=="string"&&j.length>=1&&j.length<=253&&j.split(".").every(y.isValidDnsLabel)}static isValidDnsLabel(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(j)}static isValidTag(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(j)}static isValidUrl(j){if(typeof j!="string")return!1;try{return new URL(j),!0}catch{return!1}}static isValidString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}static isNonEmptyString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}}var g=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}}}}}'),E=e(48231),S=e.n(E),b=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"}}}`),O=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),$=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const B=new Map,F=[g,b,O,$];function D(ue){if(!(ue!=null&&ue.length))throw new TypeError("Unknown error");const j=ue[0];throw new TypeError(`${j.instancePath||"<root>"} ${j.message}${j.params?` - ${Object.entries(j.params).map(([ye,je])=>`${ye}: ${je}`).join(", ")}`:""}`)}function x(ue,j={}){var Qt;const ye=(Qt=j==null?void 0:j.disableCache)!=null?Qt:!1,je=ye?"":JSON.stringify(ue);if(!ye){const en=B.get(je);if(en)return en}const _e=M(ue),st=new(S())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});_e.length&&st.addSchema(_e,void 0,void 0,!0);const Rt=st.compile(ue);return ye||B.set(je,Rt),Rt}function M(ue){if(typeof ue!="object")return[];const j=new Set;ue.$id&&j.add(ue.$id);const ye=new Array,je=[ue];for(;je.length;){const _e=je.pop();for(const st of K(_e))if(!j.has(st)){j.add(st);const Rt=F.find(Qt=>Qt.$id===st);Rt&&(ye.push(Rt),je.push(Rt))}}return ye}function*K(ue){const j=[ue];for(;j.length;){const ye=j.pop();if(typeof ye=="object"&&ye)for(const[je,_e]of Object.entries(ye))je==="$ref"&&typeof _e=="string"?yield _e.split("#")[0]:j.push(_e)}}function re(ue){const j=compileAjvSchema(ue||entityEnvelopeSchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}function le(ue){const j=x(ue);return ye=>{var st;if(j(ye)===!0)return ye;const _e=(st=j.errors)==null?void 0:st.filter(Rt=>["/kind","/apiVersion"].includes(Rt.instancePath));if((_e==null?void 0:_e.length)&&_e.every(Rt=>Rt.keyword==="enum"))return!1;throw D(j.errors)}}function Se(ue){const j=compileAjvSchema(ue||entitySchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}class De{static isValidApiVersion(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,ye=>ye.length>=1&&ye.length<=63&&/^[a-z0-9A-Z]+$/.test(ye))}static isValidKind(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(j)}static isValidObjectName(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(j)}static isValidNamespace(j){return y.isValidDnsLabel(j)}static isValidLabelKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,De.isValidObjectName)}static isValidLabelValue(j){return j===""||De.isValidObjectName(j)}static isValidAnnotationKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,De.isValidObjectName)}static isValidAnnotationValue(j){return typeof j=="string"}}const Fe={isValidApiVersion:De.isValidApiVersion,isValidKind:De.isValidKind,isValidEntityName:De.isValidObjectName,isValidNamespace:De.isValidNamespace,isValidLabelKey:De.isValidLabelKey,isValidLabelValue:De.isValidLabelValue,isValidAnnotationKey:De.isValidAnnotationKey,isValidAnnotationValue:De.isValidAnnotationValue,isValidTag:ue=>typeof ue=="string"&&ue.length>=1&&ue.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(ue)};function He(ue={}){return{...Fe,...ue}}class Ae{constructor(j=makeValidator()){X(this,"validators");this.validators=j}async enforce(j){var Rt,Qt,en,tn,pn,U,ae;function ye(ne,Ee,$e){if(Ee==null)throw new Error(`${ne} must have a value`);let ut;try{ut=$e(Ee)}catch(Ze){throw new Error(`${ne} could not be validated, ${Ze}`)}if(!ut){let Ze;switch($e.name){case"isValidLabelValue":case"isValidObjectName":Ze="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":Ze="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Ze="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Ze="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Ze="a string";break;case"isValidKind":Ze="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Ze="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":Ze="a non empty string";break;default:Ze=void 0;break}const jt=Ze?` expected ${Ze} but found "${Ee}".`:"";throw new Error(`"${ne}" is not valid;${jt} 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 je(ne,Ee,$e){return Ee===void 0||ye(ne,Ee,$e)}ye("apiVersion",j.apiVersion,this.validators.isValidApiVersion),ye("kind",j.kind,this.validators.isValidKind),ye("metadata.name",j.metadata.name,this.validators.isValidEntityName),je("metadata.namespace",j.metadata.namespace,this.validators.isValidNamespace);for(const[ne,Ee]of Object.entries((Rt=j.metadata.labels)!=null?Rt:[]))ye(`labels.${ne}`,ne,this.validators.isValidLabelKey),ye(`labels.${ne}`,Ee,this.validators.isValidLabelValue);for(const[ne,Ee]of Object.entries((Qt=j.metadata.annotations)!=null?Qt:[]))ye(`annotations.${ne}`,ne,this.validators.isValidAnnotationKey),ye(`annotations.${ne}`,Ee,this.validators.isValidAnnotationValue);const _e=(en=j.metadata.tags)!=null?en:[];for(let ne=0;ne<_e.length;++ne)ye(`tags.${ne}`,_e[ne],this.validators.isValidTag);const st=(tn=j.metadata.links)!=null?tn:[];for(let ne=0;ne<st.length;++ne)ye(`links.${ne}.url`,(pn=st[ne])==null?void 0:pn.url,CommonValidatorFunctions.isValidUrl),je(`links.${ne}.title`,(U=st[ne])==null?void 0:U.title,CommonValidatorFunctions.isNonEmptyString),je(`links.${ne}.icon`,(ae=st[ne])==null?void 0:ae.icon,KubernetesValidatorFunctions.isValidObjectName);return j}}class Je{constructor(){X(this,"validate")}async enforce(j){if(!this.validate){const _e=new Ajv({allowUnionTypes:!0});this.validate=_e.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(j)===!0)return j;const[je]=this.validate.errors||[];throw je?new Error(`Malformed envelope, ${je.instancePath||"<root>"} ${je.message}`):new Error("Malformed envelope, Unknown error")}}function tt(ue){let j=ue.indexOf(":");const ye=ue.indexOf("/");ye!==-1&&ye<j&&(j=-1);const je=j===-1?void 0:ue.slice(0,j),_e=ye===-1?void 0:ue.slice(j+1,ye),st=ue.slice(Math.max(j+1,ye+1));if(je===""||_e===""||st==="")throw new TypeError(`Entity reference "${ue}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:je,namespace:_e,name:st}}function bt(ue){return{kind:ue.kind,namespace:ue.metadata.namespace||r,name:ue.metadata.name}}function At(ue,j){var Qt,en,tn,pn;if(!ue)throw new Error("Entity reference must not be empty");const ye=j==null?void 0:j.defaultKind,je=(j==null?void 0:j.defaultNamespace)||r;let _e,st,Rt;if(typeof ue=="string"){const U=tt(ue);_e=(Qt=U.kind)!=null?Qt:ye,st=(en=U.namespace)!=null?en:je,Rt=U.name}else _e=(tn=ue.kind)!=null?tn:ye,st=(pn=ue.namespace)!=null?pn:je,Rt=ue.name;if(_e)if(st){if(!Rt){const U=JSON.stringify(ue);throw new Error(`Entity reference ${U} had missing or empty name`)}}else{const U=JSON.stringify(ue);throw new Error(`Entity reference ${U} had missing or empty namespace`)}else{const U=JSON.stringify(ue);throw new Error(`Entity reference ${U} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:_e,namespace:st,name:Rt}}function Ie(ue){var _e,st;let j,ye,je;return"metadata"in ue?(j=ue.kind,ye=(_e=ue.metadata.namespace)!=null?_e:r,je=ue.metadata.name):(j=ue.kind,ye=(st=ue.namespace)!=null?st:r,je=ue.name),`${j.toLocaleLowerCase("en-US")}:${ye.toLocaleLowerCase("en-US")}/${je.toLocaleLowerCase("en-US")}`}class mt{constructor(j){this.policies=j}async enforce(j){let ye=j;for(const je of this.policies){const _e=await je.enforce(ye);if(!_e)throw new Error(`Policy ${je.constructor.name} did not return a result`);ye=_e}return ye}}class ht{constructor(j){this.policies=j}async enforce(j){for(const ye of this.policies){const je=await ye.enforce(j);if(je)return je}throw new Error("The entity did not match any known policy")}}const it={allOf(ue){return new mt(ue)},oneOf(ue){return new ht(ue)}};var _=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 pe(ue){const j=le(ue);return{async check(ye){return j(ye)===ye}}}const be=pe(_);var We=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 et=pe(We);var ot=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 yt=pe(ot);var se=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 oe=pe(se);var Ye=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 Ge=pe(Ye),we="ownedBy",nt="ownerOf",J="consumesApi",z="apiConsumedBy",q="providesApi",ce="apiProvidedBy",de="dependsOn",Pe="dependencyOf",Oe="parentOf",Ce="childOf",Qe="memberOf",Ke="hasMember",gt="partOf",Ct="hasPart";var ct=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ResourceV1alpha1","description":"A resource describes the infrastructure a system needs to operate, like BigTable databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with components and systems allows to visualize resource footprint, and create tooling around them.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Resource","metadata":{"name":"artists-db","description":"Stores artist details"},"spec":{"type":"database","owner":"artist-relations-team","system":"artist-engagement-portal"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Resource"]},"spec":{"type":"object","required":["type","owner"],"properties":{"type":{"type":"string","description":"The type of resource.","examples":["database","s3-bucket","cluster"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the resource.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"dependsOn":{"type":"array","description":"An array of references to other entities that the resource depends on to function.","items":{"type":"string","minLength":1}},"system":{"type":"string","description":"An entity reference to the system that the resource belongs to.","minLength":1}}}}}]}');const Dt=pe(ct);var Ot=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 Pt=pe(Ot);var It=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 zt=pe(It),Wt="backstage.io/managed-by-location",fn="backstage.io/managed-by-origin-location",Ln="backstage.io/source-location";function kt(ue){if(typeof ue!="string")throw new TypeError(`Unable to parse location ref '${ue}', unexpected argument ${typeof ue}`);const j=ue.indexOf(":");if(j<0)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ye=ue.substring(0,j).trim(),je=ue.substring(j+1).trim();if(!ye||!je)throw new TypeError(`Unable to parse location ref '${ue}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ye==="http"||ye==="https")throw new TypeError(`Invalid location ref '${ue}', please prefix it with 'url:', e.g. 'url:${ue}'`);return{type:ye,target:je}}function Zt(ue){const{type:j,target:ye}=ue;if(j){if(!ye)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${j}:${ye}`}function Xe(ue){var ye,je,_e,st,Rt;const j=(Rt=(je=(ye=ue.metadata)==null?void 0:ye.annotations)==null?void 0:je[Ln])!=null?Rt:(st=(_e=ue.metadata)==null?void 0:_e.annotations)==null?void 0:st[Wt];if(!j)throw new Error(`Entity '${Ie(ue)}' is missing location`);return kt(j)}},23235:function(te,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){X(this,"subject",new r.J)}post(i){this.subject.next(i)}alert$(){return this.subject}}},47150:function(te,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(te,s,e){"use strict";e.d(s,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(R){X(this,"activeThemeId");X(this,"subject",new r.X(void 0));this.themes=R}static createWithStorage(R){var u;const f=new c(R);if(!window.localStorage)return f;const a=(u=window.localStorage.getItem(t))!=null?u:void 0;return f.setActiveThemeId(a),f.activeThemeId$().subscribe(m=>{m?window.localStorage.setItem(t,m):window.localStorage.removeItem(t)}),window.addEventListener("storage",m=>{var y;if(m.key===t){const g=(y=localStorage.getItem(t))!=null?y:void 0;f.setActiveThemeId(g)}}),f}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(R){this.activeThemeId=R,this.subject.next(R)}}},14721:function(te,s,e){"use strict";e.d(s,{m:function(){return m}});var r=e(9850),t=e.n(r),c=e(12782),i=e.n(c);const R=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function f(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 g=typeof y;return g==="number"&&isNaN(y)?"nan":g==="string"&&y===""?"empty-string":g}const u={type(y,g,E,S){return`Invalid type in config for key '${y}' in '${g}', got ${E}, wanted ${S}`},missing(y){return`Missing required config value at '${y}'`},convert(y,g,E){return`Unable to convert config value for key '${y}' in '${g}' to a ${E}`}};class m{constructor(g,E="mock-config",S,b=""){X(this,"filteredKeys");X(this,"notifiedFilteredKeys",new Set);this.data=g,this.context=E,this.fallback=S,this.prefix=b}static fromConfigs(g){return g.length===0?new m(void 0):g.reduce((E,{data:S,context:b,filteredKeys:O,deprecatedKeys:$})=>{const B=new m(S,b,E);if(B.filteredKeys=O,$)for(const{key:F,description:D}of $)console.warn(`The configuration key '${F}' of ${b} is deprecated and may be removed soon. ${D||""}`);return B},void 0)}has(g){var S,b;return this.readValue(g)!==void 0?!0:(b=(S=this.fallback)==null?void 0:S.has(g))!=null?b:!1}keys(){var S,b;const g=this.data?Object.keys(this.data):[],E=(b=(S=this.fallback)==null?void 0:S.keys())!=null?b:[];return[...new Set([...g,...E])]}get(g){const E=this.getOptional(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g!=null?g:"")));return E}getOptional(g){var b;const E=t()(this.readValue(g)),S=(b=this.fallback)==null?void 0:b.getOptional(g);return E===void 0?S:S===void 0?E:i()({},{value:S},{value:E},(O,$)=>!f($)||!f(O)?$:void 0).value}getConfig(g){const E=this.getOptionalConfig(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalConfig(g){var b;const E=this.readValue(g),S=(b=this.fallback)==null?void 0:b.getOptionalConfig(g);if(f(E))return this.copy(E,g,S);if(E!==void 0)throw new TypeError(u.type(this.fullKey(g),this.context,a(E),"object"));return S}getConfigArray(g){const E=this.getOptionalConfigArray(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalConfigArray(g){const E=this.readConfigValue(g,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[b,O]of S.entries())if(!f(O))return{expected:"object-array",value:O,key:`${g}[${b}]`};return!0});if(!!E)return E.map((S,b)=>this.copy(S,`${g}[${b}]`))}getNumber(g){const E=this.getOptionalNumber(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalNumber(g){const E=this.readConfigValue(g,b=>typeof b=="number"||typeof b=="string"||{expected:"number"});if(typeof E=="number"||E===void 0)return E;const S=Number(E);if(!Number.isFinite(S))throw new Error(u.convert(this.fullKey(g),this.context,"number"));return S}getBoolean(g){const E=this.getOptionalBoolean(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalBoolean(g){return this.readConfigValue(g,E=>typeof E=="boolean"||{expected:"boolean"})}getString(g){const E=this.getOptionalString(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalString(g){return this.readConfigValue(g,E=>typeof E=="string"&&E!==""||{expected:"string"})}getStringArray(g){const E=this.getOptionalStringArray(g);if(E===void 0)throw new Error(u.missing(this.fullKey(g)));return E}getOptionalStringArray(g){return this.readConfigValue(g,E=>{if(!Array.isArray(E))return{expected:"string-array"};for(const[S,b]of E.entries())if(typeof b!="string"||b==="")return{expected:"string-array",value:b,key:`${g}[${S}]`};return!0})}fullKey(g){return`${this.prefix}${this.prefix?".":""}${g}`}copy(g,E,S){const b=new m(g,this.context,S,this.fullKey(E));return b.filteredKeys=this.filteredKeys,b}readConfigValue(g,E){var O;const S=this.readValue(g);if(S===void 0)return(O=this.fallback)==null?void 0:O.readConfigValue(g,E);const b=E(S);if(b!==!0){const{key:$=g,value:B=S,expected:F}=b;throw new TypeError(u.type(this.fullKey($),this.context,a(B),F))}return S}readValue(g){const E=g?g.split("."):[];for(const b of E)if(!R.test(b))throw new TypeError(`Invalid config key '${g}'`);if(this.data===void 0)return;let S=this.data;for(const[b,O]of E.entries())if(f(S))S=S[O];else if(S!==void 0){const $=this.fullKey(E.slice(0,b).join("."));throw new TypeError(u.type($,this.context,a(S),"object"))}return S}}},4333:function(te,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(i){const R=i.split(/\{\{\s*pluginId\s*\}\}/),f=R.join("pluginId");let a;try{a=new URL(f)}catch{throw new Error(`${r} URL '${f}' 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(f.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(R)}constructor(i){this.parts=i}async getBaseUrl(i){return this.parts.join(i)}}},89536:function(te,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return c},Jv:function(){return i}});class r{constructor(f,a){this.alertApi=f,this.errorApi=a}post(f,a){return a!=null&&a.hidden||this.alertApi.post({message:f.message,severity:"error"}),this.errorApi.post(f,a)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){X(this,"subject",new t.J)}post(f,a){this.subject.next({error:f,context:a})}error$(){return this.subject}}class i{static forward(f,a){window.addEventListener("unhandledrejection",u=>{f.post(u.reason,a)})}}},14884:function(te,s,e){"use strict";e.d(s,{b:function(){return c}});var r=e(36964);function t(i){if(i.length<3)throw new Error(`The '${i}' feature flag must have a minimum length of three characters.`);if(i.length>150)throw new Error(`The '${i}' feature flag must not exceed 150 characters.`);if(!i.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${i}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){X(this,"registeredFeatureFlags",[]);X(this,"flags")}registerFlag(R){t(R.name),this.registeredFeatureFlags.push(R)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(R){return this.flags||(this.flags=this.load()),this.flags.get(R)===r.FeatureFlagState.Active}save(R){this.flags||(this.flags=this.load()),R.merge||this.flags.clear();for(const[a,u]of Object.entries(R.states))this.flags.set(a,u);const f=Array.from(this.flags.entries()).filter(([,a])=>a===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(f)))}load(){try{const R=window.localStorage.getItem("featureFlags");if(!R)return new Map;const f=JSON.parse(R);if(typeof f!="object"||f===null||Array.isArray(f))return new Map;const a=Object.entries(f).filter(([u,m])=>(t(u),m===r.FeatureFlagState.Active));return new Map(a)}catch{return new Map}}}},50160:function(te,s,e){"use strict";e.d(s,{I:function(){return u},j:function(){return r}});function r(m){var E;let y=m.baseImplementation||e.g.fetch;const g=[(E=m.middleware)!=null?E:[]].flat().reverse();for(const S of g)y=S.apply(y);return{fetch:y}}class t{static create(y){var b,O;const g=c(y),E=((b=y.header)==null?void 0:b.name)||"authorization",S=((O=y.header)==null?void 0:O.value)||($=>`Bearer ${$}`);return new t(y.identityApi,g,E,S)}constructor(y,g,E,S){this.identityApi=y,this.allowUrl=g,this.headerName=E,this.headerValue=S}apply(y){return async(g,E)=>{const S=new Request(g,E),{token:b}=await this.identityApi.getCredentials();return S.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(S.url)?y(g,E):(S.headers.set(this.headerName,this.headerValue(b)),y(S))}}}function c(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?i(m.urlPrefixAllowlist):m.config?i([m.config.getString("backend.baseUrl")]):()=>!1}function i(m){const y=m.map(g=>g.replace(/\/$/,""));return g=>y.some(E=>g===E||g.startsWith(`${E}/`))}function R(m,y){return!y||y==="/"?m:`${m.replace(/\/$/,"")}/${y.replace(/^\//,"")}`}class f{constructor(y){this.discoveryApi=y}apply(y){return async(g,E)=>{const S=new Request(g,E),b="plugin://";if(!S.url.startsWith(b))return y(g,E);const{hostname:O,pathname:$,search:B,hash:F,username:D,password:x}=new URL(`http://${S.url.substring(b.length)}`);let M=await this.discoveryApi.getBaseUrl(O);if(D||x){const re=new URL(M),le=`${D}${x?`:${x}`:""}@`;M=`${re.protocol}//${le}${re.host}${re.pathname}`}const K=`${R(M,$)}${B}${F}`;return y(K,typeof g=="string"||a(g)?E:g)}}}function a(m){return typeof m=="object"&&(m==null?void 0:m.constructor)===URL}class u{static resolvePluginProtocol(y){return new f(y.discoveryApi)}static injectIdentityAuth(y){return t.create(y)}constructor(){}}},11358:function(te,s,e){"use strict";e.d(s,{Y:function(){return R}});var r=e(98005);function t(f,a){for(const u of a)if(!f.has(u))return!1;return!0}function c(f,...a){const u=new Set(f);for(const m of a)for(const y of m)u.add(y);return u}class i{constructor(){X(this,"requests",[]);X(this,"subject",new r.X(this.getCurrentPending()))}request(a){return new Promise((u,m)=>{this.requests.push({scopes:a,resolve:u,reject:m}),this.subject.next(this.getCurrentPending())})}resolve(a,u){this.requests=this.requests.filter(m=>t(a,m.scopes)?(m.resolve(u),!1):!0),this.subject.next(this.getCurrentPending())}reject(a){this.requests.forEach(u=>u.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((u,m)=>c(u,m.scopes),this.requests[0].scopes);return{scopes:a,resolve:u=>{a&&this.resolve(a,u)},reject:u=>{a&&this.reject(u)}}}}class R{constructor(){X(this,"subject",new r.X([]));X(this,"currentRequests",[]);X(this,"handlerCount",0)}createAuthRequester(a){const u=new i,m=this.handlerCount;return this.handlerCount++,u.pending().subscribe({next:y=>{const g=this.currentRequests.slice(),E=this.makeAuthRequest(y,a);E?g[m]=E:delete g[m],this.currentRequests=g,this.subject.next(g.filter(Boolean))}}),y=>u.request(y)}makeAuthRequest(a,u){const{scopes:m}=a;if(!!m)return{provider:u.provider,trigger:async()=>{const y=await u.onAuthRequest(m);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(te,s,e){"use strict";e.d(s,{C:function(){return i}});var r=e(82394),t=e.n(r);const c=new Map;class i{constructor(f,a){X(this,"subscribers",new Set);X(this,"observable",new(t())(f=>(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));this.namespace=f,this.errorApi=a}static create(f){var a;return new i((a=f.namespace)!=null?a:"",f.errorApi)}get(f){return this.snapshot(f).value}snapshot(f){let a,u="absent";try{const m=localStorage.getItem(this.getKeyName(f));m&&(a=JSON.parse(m,(y,g)=>(typeof g=="object"&&g!==null&&Object.freeze(g),g)),u="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${f}`))}return{key:f,value:a,presence:u}}forBucket(f){const a=`${this.namespace}/${f}`;return c.has(a)||c.set(a,new i(a,this.errorApi)),c.get(a)}async set(f,a){localStorage.setItem(this.getKeyName(f),JSON.stringify(a)),this.notifyChanges(f)}async remove(f){localStorage.removeItem(this.getKeyName(f)),this.notifyChanges(f)}observe$(f){return this.observable.filter(({key:a})=>a===f)}getKeyName(f){return`${this.namespace}/${encodeURIComponent(f)}`}notifyChanges(f){const a=this.snapshot(f);for(const u of this.subscribers)u.next(a)}}},59589:function(te,s,e){"use strict";e.d(s,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:a="development",provider:u=t,oauthRequestApi:m}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:a})}}},6098:function(te,s,e){"use strict";e.d(s,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:a="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["team"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:a,defaultScopes:y})}}},44431:function(te,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(te,s,e){"use strict";e.d(s,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:a="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read:user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:a,defaultScopes:y})}}},2922:function(te,s,e){"use strict";e.d(s,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:a="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read_user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:a,defaultScopes:y})}}},59938:function(te,s,e){"use strict";e.d(s,{e:function(){return i}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class i{static create(f){const{discoveryApi:a,oauthRequestApi:u,environment:m="development",provider:y=t,defaultScopes:g=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=f;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:u,provider:y,environment:m,defaultScopes:g,scopeTransform(E){return E.map(S=>S==="openid"?S:S==="profile"||S==="email"?`${c}userinfo.${S}`:S.startsWith(c)?S:`${c}${S}`)}})}}},91668:function(te,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return m.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return R.s},OneLoginAuth:function(){return u.$}});var r=e(44474),t=e(2922),c=e(59938),i=e(91205);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}});var R=e(26079),f=e(67604),a=e(38482),u=e(58381),m=e(44431);e.o(m,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"ConfigReader")&&e.d(s,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(s,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(s,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return m.createSpecializedApp}}),e.o(m,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return m.defaultConfigLoader}});var y=e(59589)},38482:function(te,s,e){"use strict";e.d(s,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(R){const{environment:f="development",provider:a=t,oauthRequestApi:u,discoveryApi:m,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:a,environment:f,defaultScopes:y})}}},73124:function(te,s,e){"use strict";e.d(s,{Z:function(){return f}});function r(a){return new Promise((u,m)=>{const y=a.width||500,g=a.height||700,E=window.screen.width/2-y/2,S=window.screen.height/2-g/2,b=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${g},top=${S},left=${E}`);let O="";if(!b||typeof b.closed=="undefined"||b.closed){const D=new Error("Failed to open auth popup.");D.name="PopupRejectedError",m(D);return}const $=D=>{if(D.source!==b||D.origin!==a.origin)return;const{data:x}=D;if(x.type==="config_info"){O=x.targetOrigin;return}if(x.type!=="authorization_response")return;const M=x;if("error"in M){const K=new Error(M.error.message);K.name=M.error.name,m(K)}else u(M.response);F()},B=setInterval(()=>{if(b.closed){const D=`Login failed, ${O&&O!==window.location.origin?`Incorrect app origin, expected ${O}`:"popup was closed"}`,x=new Error(D);x.name="PopupClosedError",m(x),F()}},100);function F(){window.removeEventListener("message",$),clearInterval(B)}window.addEventListener("message",$)})}function t(a){return[...a].join(" ")}class c{constructor(u){X(this,"discoveryApi");X(this,"environment");X(this,"provider");X(this,"joinScopesFunc");X(this,"authRequester");X(this,"sessionTransform");const{discoveryApi:m,environment:y,provider:g,joinScopes:E=t,oauthRequestApi:S,sessionTransform:b=O=>O}=u;this.authRequester=S.createAuthRequester({provider:g,onAuthRequest:O=>this.showPopup(O)}),this.discoveryApi=m,this.environment=y,this.provider=g,this.joinScopesFunc=E,this.sessionTransform=b}async createSession(u){return u.instantPopup?this.showPopup(u.scopes):this.authRequester(u.scopes)}async refreshSession(){const u=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(!u.ok){const y=new Error(`Auth refresh request failed, ${u.statusText}`);throw y.status=u.status,y}const m=await u.json();if(m.error){const y=new Error(m.error.message);throw m.error.name&&(y.name=m.error.name),y}return await this.sessionTransform(m)}async removeSession(){const u=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!u.ok){const m=new Error(`Logout request failed, ${u.statusText}`);throw m.status=u.status,m}}async showPopup(u){const m=this.joinScopesFunc(u),y=await this.buildUrl("/start",{scope:m,origin:location.origin}),g=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(g)}async buildUrl(u,m){const y=await this.discoveryApi.getBaseUrl("auth"),g=this.buildQueryString({...m,env:this.environment});return`${y}/${this.provider.id}${u}${g}`}buildQueryString(u){if(!u)return"";const m=Object.entries(u).map(([y,g])=>{if(typeof g=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(g)}`;if(g)return encodeURIComponent(y)}).filter(Boolean).join("&");return m?`?${m}`:""}}var i=e(57018);const R={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class f{constructor(u){X(this,"sessionManager");X(this,"scopeTransform");this.sessionManager=u.sessionManager,this.scopeTransform=u.scopeTransform}static create(u){const{discoveryApi:m,environment:y="development",provider:g=R,oauthRequestApi:E,defaultScopes:S=[],scopeTransform:b=B=>B}=u,O=new c({discoveryApi:m,environment:y,provider:g,oauthRequestApi:E,sessionTransform(B){return{...B,providerInfo:{idToken:B.providerInfo.idToken,accessToken:B.providerInfo.accessToken,scopes:f.normalizeScopes(b,B.providerInfo.scope),expiresAt:new Date(Date.now()+B.providerInfo.expiresInSeconds*1e3)}}}}),$=new i.RefreshingAuthSessionManager({connector:O,defaultScopes:new Set(S),sessionScopes:B=>B.providerInfo.scopes,sessionShouldRefresh:B=>(B.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new f({sessionManager:$,scopeTransform:b})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(u,m){var E;const y=f.normalizeScopes(this.scopeTransform,u),g=await this.sessionManager.getSession({...m,scopes:y});return(E=g==null?void 0:g.providerInfo.accessToken)!=null?E:""}async getIdToken(u={}){var y;const m=await this.sessionManager.getSession(u);return(y=m==null?void 0:m.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.backstageIdentity}async getProfile(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.profile}static normalizeScopes(u,m){if(!m)return new Set;const y=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(u(y))}}},91205:function(te,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(te,s,e){"use strict";e.d(s,{s:function(){return R}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="okta.";class R{static create(a){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:g,defaultScopes:E=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:g,provider:y,environment:m,defaultScopes:E,scopeTransform(S){return S.map(b=>c.has(b)||b.startsWith(i)?b:`${i}${b}`)}})}}},58381:function(te,s,e){"use strict";e.d(s,{$:function(){return R}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="onelogin.";class R{static create(a){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:g}=a;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:g,provider:y,environment:m,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(S=>c.has(S)||S.startsWith(i)?S:`${i}${S}`)}})}}},67604:function(te,s,e){"use strict";var r=e(57018),t=e(30195);const c=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),i={id:"saml",title:"SAML",icon:()=>null};class R{static create(a){const{discoveryApi:u,environment:m="development",provider:y=i}=a,g=new DirectAuthConnector({discoveryApi:u,environment:m,provider:y}),E=new StaticAuthSessionManager({connector:g}),S=new AuthSessionStore({manager:E,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new R(S)}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 u=await this.sessionManager.getSession(a);return u==null?void 0:u.backstageIdentity}async getProfile(a={}){const u=await this.sessionManager.getSession(a);return u==null?void 0:u.profile}}},91631:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return i.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return R.m},ErrorAlerter:function(){return a.KN},ErrorApiForwarder:function(){return a.gr},FetchMiddlewares:function(){return m.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return u.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return c.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return a.Jv},UrlPatternDiscovery:function(){return f.p},WebStorage:function(){return g.C},createFetchApi:function(){return m.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),i=e(58652),R=e(14721),f=e(4333),a=e(89536),u=e(14884),m=e(50160),y=e(11358),g=e(56054)},56494:function(te,s,e){"use strict";e.d(s,{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(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(te,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(c){c[c.default=10]="default";const i=50;c[c.app=i]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){X(this,"factories",new Map)}register(i,R){const f=r[i],a=this.factories.get(R.api.id);return a&&a.priority>=f?!1:(this.factories.set(R.api.id,{priority:f,factory:R}),!0)}get(i){const R=this.factories.get(i.id);if(!!R)return R.factory}getAllApis(){const i=new Set;for(const{factory:R}of this.factories.values())i.add(R.api);return i}}},14406:function(te,s,e){"use strict";e.d(s,{g:function(){return a}});var r=e(2784),t=e(13980),c=e.n(t);class i{constructor(...m){X(this,"holders");this.holders=m}get(m){for(const y of this.holders){const g=y.get(m);if(g)return g}}}var R=e(76241);const f=(0,R.CT)("api-context"),a=u=>{var S;const{apis:m,children:y}=u,g=(S=(0,r.useContext)(f))==null?void 0:S.atVersion(1),E=g?new i(m,g):m;return r.createElement(f.Provider,{value:(0,R.EI)({1:E}),children:y})};a.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(te,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(c){X(this,"apis",new Map);this.factories=c}static validateFactories(c,i){for(const R of i){const f=[R],a=new Set;for(;f.length;){const u=f.shift(),m=c.get(u);if(!!m)for(const y of Object.values(m.deps)){if(y.id===R.id)throw new Error(`Circular dependency of api factory for ${R}`);a.has(y)||(a.add(y),f.push(y))}}}}get(c){return this.load(c)}load(c,i=[]){const R=this.apis.get(c.id);if(R)return R;const f=this.factories.get(c);if(!f)return;if(i.includes(f.api))throw new Error(`Circular dependency of api factory for ${f.api}`);const a=this.loadDeps(c,f.deps,[...i,f.api]),u=f.factory(a);return this.apis.set(c.id,u),u}loadDeps(c,i,R){const f={};for(const a in i)if(i.hasOwnProperty(a)){const u=i[a],m=this.load(u,R);if(!m)throw new Error(`No API factory available for dependency ${u} of dependent ${c}`);f[a]=m}return f}}},76105:function(te,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return c.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),c=e(80396),i=e(82488),R=e.n(i);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"GithubAuth")&&e.d(s,{GithubAuth:function(){return i.GithubAuth}}),e.o(i,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return i.GitlabAuth}}),e.o(i,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return i.GoogleAuth}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}})},82488:function(){},82370:function(te,s,e){"use strict";e.d(s,{b:function(){return nt}});var r=e(2784),t=e(10289),c=e(64279),i=e(56494),R=e(36964),f=e(76105);function a(J){const z={};for(const ce in J.collectors)J.collectors.hasOwnProperty(ce)&&(z[ce]=J.collectors[ce]());const q=[{node:r.Children.toArray(J.root),parent:void 0,contexts:{}}];for(;q.length!==0;){const{node:ce,parent:de,contexts:Pe}=q.shift();r.Children.forEach(ce,Oe=>{if(!(0,r.isValidElement)(Oe))return;const Ce={};for(const Qe in z)if(z.hasOwnProperty(Qe)){const Ke=z[Qe];Ce[Qe]=Ke.visit(Ke.accumulator,Oe,de,Pe[Qe])}for(const Qe of J.discoverers){const Ke=Qe(Oe);Ke&&q.push({node:Ke,parent:Oe,contexts:Ce})}})}return Object.fromEntries(Object.entries(z).map(([ce,de])=>[ce,de.accumulator]))}function u(J,z){return()=>({accumulator:J(),visit:z})}function m(J){var z;return(z=J.props)==null?void 0:z.children}function y(J){var z,q,ce;if(((z=J.props)==null?void 0:z.path)&&((q=J.props)==null?void 0:q.element))return(ce=J.props)==null?void 0:ce.element}const g=u(()=>new Set,(J,z)=>{const q=(0,R.getComponentData)(z,"core.plugin");q&&J.add(q)});var E=e(88934);const S={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},b=u(()=>({paths:new Map,parents:new Map,objects:new Array}),(J,z,q,ce)=>{var Ot,Pt,It,zt,Wt;if((q==null?void 0:q.props.element)===z)return ce;let de=ce==null?void 0:ce.obj,Pe=ce==null?void 0:ce.routeRef,Oe=ce==null?void 0:ce.sticky;const Ce=(Ot=z.props)==null?void 0:Ot.path,Qe=(Pt=de==null?void 0:de.children)!=null?Pt:J.objects,Ke=Boolean((It=z.props)==null?void 0:It.caseSensitive);let gt=ce==null?void 0:ce.path;if((0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");gt=Ce}const Ct=(zt=z.props)==null?void 0:zt.element;let ct=(0,R.getComponentData)(z,"core.mountPoint");if(!ct&&(0,r.isValidElement)(Ct)&&(ct=(0,R.getComponentData)(Ct,"core.mountPoint")),ct){let fn=Ce;if(gt&&(fn?gt=void 0:fn=gt),!fn)throw new Error("Mounted routable extension must have a path");J.paths.set(ct,fn),Pe&&Oe?(J.parents.set(ct,Pe),Ce&&(Pe=ct,Oe=!1)):(J.parents.set(ct,Pe),Pe=ct),Ce?(de={caseSensitive:Ke,path:Ce,element:"mounted",routeRefs:new Set([ct]),children:[S],plugin:(0,R.getComponentData)(z.props.element,"core.plugin")},Qe.push(de)):de==null||de.routeRefs.add(ct)}if((0,R.getComponentData)(z,"core.gatherMountPoints")&&(Oe=!0),(0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");ct||(de={caseSensitive:Ke,path:Ce,element:"gathered",routeRefs:new Set,children:[S],plugin:(Wt=ce==null?void 0:ce.obj)==null?void 0:Wt.plugin},Qe.push(de))}return{obj:de,path:gt,routeRef:Pe,sticky:Oe}}),O=u(()=>new Set,(J,z)=>{if(z.type===E.L){const q=z.props;J.add("with"in q?q.with:q.without)}});var $=e(76241);const B=(0,$.uW)("route-ref-type",()=>Symbol("route-ref-type"));function F(J){return J[B]==="absolute"}function D(J){return J[B]==="sub"}function x(J){return J[B]==="external"}function M(...J){const z=J.join("/").replace(/\/\/+/g,"/");return z!=="/"&&z.endsWith("/")?z.slice(0,-1):z}function K(J,z,q){let ce,de="";if(F(J))ce=J;else if(D(J))ce=J.parent,de=J.path;else if(x(J)){const Ce=q.get(J);if(!Ce)return[void 0,""];if(F(Ce))ce=Ce;else if(D(Ce))ce=Ce.parent,de=Ce.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ce}`)}else throw J[B]?new Error(`Unknown or invalid route ref type, ${J[B]}`):new Error(`Unknown object passed to useRouteRef, got ${J}`);if(!ce)return[void 0,""];const Pe=z.get(ce);if(!Pe)return[void 0,""];const Oe=M(Pe,de);return[ce,Oe]}function re(J,z,q,ce,de){var gt;const Pe=(gt=(0,t.fp)(de,z))!=null?gt:[],Oe=Array();let Ce=-1;for(let Ct=J;Ct&&(Ce=Pe.findIndex(ct=>ct.route.routeRefs.has(Ct)),Ce===-1);Ct=ce.get(Ct))Oe.unshift(Ct);Oe.length===0&&(Ce-=1);const Qe=Ce===-1?"":Pe[Ce].pathname,Ke=M(...Oe.slice(0,-1).map(Ct=>{const ct=q.get(Ct);if(!ct)throw new Error(`No path for ${Ct}`);if(ct.includes(":"))throw new Error(`Cannot route to ${J} with parent ${Ct} as it has parameters`);return ct}));return Qe+Ke}class le{constructor(z,q,ce,de,Pe){this.routePaths=z,this.routeParents=q,this.routeObjects=ce,this.routeBindings=de,this.appBasePath=Pe}resolve(z,q){const[ce,de]=K(z,this.routePaths,this.routeBindings);if(!ce)return;let Pe;typeof q=="string"?Pe=this.trimPath(q):q.pathname?Pe={...q,pathname:this.trimPath(q.pathname)}:Pe=q;const Oe=this.appBasePath+re(ce,Pe,this.routePaths,this.routeParents,this.routeObjects);return(...[Qe])=>Oe+(0,t.Gn)(de,Qe)}trimPath(z){return z&&(z.startsWith(this.appBasePath)?z.slice(this.appBasePath.length):z)}}const Se=(0,$.CT)("routing-context"),De=({routePaths:J,routeParents:z,routeObjects:q,routeBindings:ce,basePath:de="",children:Pe})=>{const Oe=new le(J,z,q,ce,de),Ce=(0,$.EI)({1:Oe});return r.createElement(Se.Provider,{value:Ce},Pe)},Fe=(J,z)=>{var q,ce;try{const de=(0,t.fp)(z,{pathname:J}),Pe=(q=de==null?void 0:de.filter(Ce=>{var Qe;return((Qe=Ce==null?void 0:Ce.route.routeRefs)==null?void 0:Qe.size)>0}).pop())==null?void 0:q.route;if(!Pe)return{};let Oe;return Pe.routeRefs.size===1&&(Oe=Pe.routeRefs.values().next().value),{extension:"App",pluginId:((ce=Pe.plugin)==null?void 0:ce.getId())||"root",...Oe?{routeRef:Oe.id}:{}}}catch{return{}}},He=({pathname:J,search:z,hash:q})=>{const ce=(0,R.useAnalytics)();return(0,r.useEffect)(()=>{ce.captureEvent("navigate",`${J}${z}${q}`)},[ce,J,z,q]),null},Ae=({routeObjects:J})=>{const{pathname:z,search:q,hash:ce}=(0,t.TH)();return r.createElement(R.AnalyticsContext,{attributes:Fe(z,J)},r.createElement(He,{pathname:z,search:q,hash:ce}))};function Je(J,z){const q=new Set(z.values());q.delete(void 0);for(const ce of z.keys()){if(q.has(ce))continue;let de=ce,Pe="";for(;de;){const Ce=J.get(de);if(!Ce)throw new Error(`No path for ${de}`);Pe=`${Ce}${Pe}`,de=z.get(de)}const Oe=Pe.match(/:(\w+)/g);if(Oe){for(let Ce=0;Ce<Oe.length;Ce++)for(let Qe=Ce+1;Qe<Oe.length;Qe++)if(Oe[Qe]===Oe[Ce])throw new Error(`Parameter ${Oe[Qe]} is duplicated in path ${Pe}`)}}}function tt(J,z){for(const q of z)if(!!q.externalRoutes){for(const[ce,de]of Object.entries(q.externalRoutes))if(!de.optional&&!J.has(de))throw new Error(`External route '${ce}' of the '${q.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const bt=(0,$.CT)("app-context"),At=({appContext:J,children:z})=>{const q=(0,$.EI)({1:J});return r.createElement(bt.Provider,{value:q,children:z})};function Ie(J){return new Error(`Tried to access IdentityApi ${J} before app was loaded`)}function mt(J){console.warn(`WARNING: Call to ${J} is deprecated and will break in the future`)}class ht{constructor(){X(this,"target");X(this,"waitForTarget");X(this,"resolveTarget",()=>{});X(this,"signOutTargetUrl","/");this.waitForTarget=new Promise(z=>{this.resolveTarget=z})}setTarget(z,q){this.target=z,this.signOutTargetUrl=q.signOutTargetUrl,this.resolveTarget(z)}getUserId(){if(!this.target)throw Ie("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return mt("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Ie("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return mt("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(z=>z.getProfileInfo())}async getBackstageIdentity(){const z=await this.waitForTarget.then(q=>q.getBackstageIdentity());return z.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${z.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),z}async getCredentials(){return this.waitForTarget.then(z=>z.getCredentials())}async getIdToken(){return this.waitForTarget.then(z=>{if(!z.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return mt("getIdToken"),z.getIdToken()})}async signOut(){await this.waitForTarget.then(z=>z.signOut()),location.href=this.signOutTargetUrl}}var it=e(72164);function _(J,z,q){if(J!==void 0){const de=q.find(Pe=>Pe.id===J);if(de)return de}if(z){const de=q.find(Pe=>Pe.variant==="dark");if(de)return de}const ce=q.find(de=>de.variant==="light");return ce||q[0]}const pe=()=>{const J=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[z,q]=(0,r.useState)(J.matches);return(0,r.useEffect)(()=>{const ce=de=>{q(de.matches)};return J.addListener(ce),()=>{J.removeListener(ce)}},[J]),z};function be({children:J}){const z=(0,R.useApi)(R.appThemeApiRef),q=(0,it.Z)(z.activeThemeId$(),z.getActiveThemeId()),ce=Boolean(window.matchMedia)?pe():!1,de=_(q,ce,z.getInstalledThemes());if(!de)throw new Error("App has no themes");return r.createElement(de.Provider,{children:J})}var We=e(46611);class et{constructor(){X(this,"apis",[])}add(z,q){return this.apis.push([z.id,q]),q}build(){return new ot(new Map(this.apis))}}class ot{static builder(){return new et}static from(z){return new ot(new Map(z.map(([q,ce])=>[q.id,ce])))}static with(z,q){return new ot(new Map([[z.id,q]]))}constructor(z){this.apis=z}with(z,q){return new ot(new Map([...this.apis,[z.id,q]]))}get(z){return this.apis.get(z.id)}}function yt(J){const z=new Map;return J&&J({bind:(ce,de)=>{for(const[Pe,Oe]of Object.entries(de)){const Ce=ce[Pe];if(!Ce)throw new Error(`Key ${Pe} is not an existing external route`);if(!Oe&&!Ce.optional)throw new Error(`External route ${Pe} is required but was undefined`);Oe&&z.set(Ce,Oe)}}}),z}const se=(0,r.createContext)({routeObjects:[]});function oe(J){var q;let{pathname:z}=new URL((q=J.getOptionalString("app.baseUrl"))!=null?q:"/","http://dummy.dev");return z=z.replace(/\/*$/,""),z}function Ye(J,z,q){var Qe;const ce=Boolean(J),de=(0,c.default)(J||(()=>Promise.resolve([])));let Pe;if(ce&&de.loading){const{Progress:Ke}=z;Pe=r.createElement(Ke,null)}else if(de.error){const{BootErrorPage:Ke}=z;Pe=r.createElement(Ke,{step:"load-config",error:de.error})}const{ThemeProvider:Oe=be}=z;return Pe?{node:r.createElement(i.ApiProvider,{apis:ot.with(R.appThemeApiRef,q)},r.createElement(Oe,null,Pe))}:{api:i.ConfigReader.fromConfigs((Qe=de.value)!=null?Qe:[])}}class Ge{constructor(z){this.app=z}getPlugins(){return this.app.getPlugins()}getSystemIcon(z){return this.app.getSystemIcon(z)}getComponents(){return this.app.getComponents()}}class we{constructor(z){X(this,"apiHolder");X(this,"configApi");X(this,"apis");X(this,"icons");X(this,"plugins");X(this,"components");X(this,"themes");X(this,"configLoader");X(this,"defaultApis");X(this,"bindRoutes");X(this,"appIdentityProxy",new ht);X(this,"apiFactoryRegistry");var q,ce,de,Pe;this.apis=(q=z.apis)!=null?q:[],this.icons=z.icons,this.plugins=new Set((ce=z.plugins)!=null?ce:[]),this.components=z.components,this.themes=z.themes,this.configLoader=(de=z.configLoader)!=null?de:We.t,this.defaultApis=(Pe=z.defaultApis)!=null?Pe:[],this.bindRoutes=z.bindRoutes,this.apiFactoryRegistry=new f.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(z){return this.icons[z]}getComponents(){return this.components}getProvider(){const z=new Ge(this);let q=!1;return({children:de})=>{const Pe=(0,r.useMemo)(()=>i.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Oe,featureFlags:Ce,routeBindings:Qe}=(0,r.useMemo)(()=>{const ct=a({root:de,discoverers:[m,y],collectors:{routing:b,collectedPlugins:g,featureFlags:O}});return ct.collectedPlugins.forEach(Dt=>this.plugins.add(Dt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ct,routeBindings:yt(this.bindRoutes)}},[de]);q||(q=!0,Je(Oe.paths,Oe.parents),tt(Qe,this.plugins));const Ke=Ye(this.configLoader,this.components,Pe),gt="api"in Ke;if(gt){const{api:ct}=Ke;this.configApi=ct}if((0,r.useEffect)(()=>{if(gt){const ct=this.getApiHolder().get(R.featureFlagsApiRef);for(const Dt of this.plugins.values())if("getFeatureFlags"in Dt)for(const Ot of Dt.getFeatureFlags())ct.registerFlag({name:Ot.name,pluginId:Dt.getId()});else for(const Ot of Dt.output())Ot.type==="feature-flag"&&ct.registerFlag({name:Ot.name,pluginId:Dt.getId()});for(const Dt of Ce)ct.registerFlag({name:Dt,pluginId:""})}},[gt,Ke,Ce]),"node"in Ke)return Ke.node;const{ThemeProvider:Ct=be}=this.components;return r.createElement(i.ApiProvider,{apis:this.getApiHolder()},r.createElement(At,{appContext:z},r.createElement(Ct,null,r.createElement(De,{routePaths:Oe.paths,routeParents:Oe.parents,routeObjects:Oe.objects,routeBindings:Qe,basePath:oe(Ke.api)},r.createElement(se.Provider,{value:{routeObjects:Oe.objects}},de)))))}}getRouter(){const{Router:z,SignInPage:q}=this.components,ce=({component:Pe,children:Oe})=>{const[Ce,Qe]=(0,r.useState)(),Ke=(0,R.useApi)(R.configApiRef),gt=oe(Ke);return Ce?(this.appIdentityProxy.setTarget(Ce,{signOutTargetUrl:gt||"/"}),Oe):r.createElement(Pe,{onSignInSuccess:Qe})};return({children:Pe})=>{const Oe=(0,R.useApi)(R.configApiRef),Ce=oe(Oe),Qe=`${Ce}/*`,{routeObjects:Ke}=(0,r.useContext)(se);return q?r.createElement(z,null,r.createElement(Ae,{routeObjects:Ke}),r.createElement(ce,{component:q},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:Ce||"/"}),r.createElement(z,null,r.createElement(Ae,{routeObjects:Ke}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)}))))}}getApiHolder(){if(this.apiHolder){for(const z of this.plugins)for(const q of z.getApis())this.apiFactoryRegistry.get(q.api)||this.apiFactoryRegistry.register("default",q);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:R.appThemeApiRef,deps:{},factory:()=>i.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:R.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:R.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:R.featureFlagsApiRef,deps:{},factory:()=>new i.LocalStorageFeatureFlags});for(const z of this.defaultApis)this.apiFactoryRegistry.register("default",z);for(const z of this.plugins)for(const q of z.getApis())if(!this.apiFactoryRegistry.register("default",q))throw new Error(`Plugin ${z.getId()} tried to register duplicate or forbidden API factory for ${q.api}`);for(const z of this.apis)if(!this.apiFactoryRegistry.register("app",z))throw new Error(`Duplicate or forbidden API factory for ${z.api} in app`);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new f.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(z){const q=new Set;for(const ce of z){const de=ce.getId();if(q.has(de))throw new Error(`Duplicate plugin found '${de}'`);q.add(de)}}}function nt(J){return new we(J)}},46611:function(te,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const i=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const f=JSON.parse(t);Array.isArray(f)?i.push(...f):i.push({data:f,context:"env"})}catch(f){throw new Error(`Failed to load runtime configuration, ${f}`)}const R=window.__APP_CONFIG__;return R&&i.push({context:"window",data:R}),i}},44056:function(te,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),c=e(73495),i=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(te,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return c.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(te,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return f}});function r(u,m){for(const y of m)if(!u.has(y))return!1;return!0}class t{constructor(m){this.options=m}sessionExistsAndHasScope(m,y){if(!m)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const g=this.options.sessionScopes(m);return r(g,y)}getExtendedScope(m,y){const g=new Set(this.options.defaultScopes);if(m&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(m);for(const S of E)g.add(S)}if(y)for(const E of y)g.add(E);return g}}var c=e(98005),i=e(36964);class R{constructor(){X(this,"subject",new c.X(i.SessionState.SignedOut));X(this,"signedIn",!1)}setIsSignedIn(m){this.signedIn!==m&&(this.signedIn=m,this.subject.next(this.signedIn?i.SessionState.SignedIn:i.SessionState.SignedOut))}sessionState$(){return this.subject}}class f{constructor(m){X(this,"connector");X(this,"helper");X(this,"sessionScopesFunc");X(this,"sessionShouldRefreshFunc");X(this,"stateTracker",new R);X(this,"refreshPromise");X(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E,sessionShouldRefresh:S}=m;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=S,this.helper=new t({sessionScopes:E,defaultScopes:g})}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const g=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),S=this.sessionScopesFunc(g);return r(S,E)&&(this.currentSession=g),g}catch(g){if(m.optional)return;throw g}}if(!this.currentSession&&!m.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(m)}catch{}if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.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 m=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),m}finally{delete this.refreshPromise}}}class a{constructor(m){X(this,"connector");X(this,"helper");X(this,"stateTracker",new SessionStateTracker);X(this,"currentSession");const{connector:y,defaultScopes:g=new Set,sessionScopes:E}=m;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:E,defaultScopes:g})}setSession(m){this.currentSession=m,this.stateTracker.setIsSignedIn(Boolean(m))}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes))return this.currentSession;if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(te,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return i}});var r=e(82394),t=e.n(r);class c{constructor(){X(this,"isClosed",!1);X(this,"terminatingError");X(this,"observable",new(t())(f=>this.isClosed?(this.terminatingError?f.error(this.terminatingError):f.complete(),()=>{}):(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));X(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(a=>a.next(f))}error(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(a=>a.error(f))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,a,u){const m=typeof f=="function"?{next:f,error:a,complete:u}:f;return this.observable.subscribe(m)}}class i{constructor(f){X(this,"isClosed");X(this,"currentValue");X(this,"terminatingError");X(this,"observable");X(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=f,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(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=f,this.subscribers.forEach(a=>a.next(f))}error(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(a=>a.error(f))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,a,u){const m=typeof f=="function"?{next:f,error:a,complete:u}:f;return this.observable.subscribe(m)}}},88934:function(te,s,e){"use strict";e.d(s,{L:function(){return c}});var r=e(36964),t=e(2784);const c=i=>{const{children:R}=i,f=(0,r.useApi)(r.featureFlagsApiRef),a="with"in i?f.isActive(i.with):!f.isActive(i.without);return t.createElement(t.Fragment,null,a?R:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(te,s,e){"use strict";e.d(s,{w:function(){return i}});var r=e(2784),t=e(10289),c=e(36964);const i=f=>{const a=(0,c.useApp)(),{NotFoundErrorPage:u}=a.getComponents(),m=(0,c.useElementFilter)(f.children,y=>y.getElements().flatMap(g=>{var S;let E=g.props.path;return E===""?[]:(E=(S=E==null?void 0:E.replace(/\/\*$/,""))!=null?S:"/",[{path:E,element:g,children:g.props.children?[{path:E==="/"?"/":"/*",element:g.props.children}]:void 0}])}).sort((g,E)=>E.path.localeCompare(g.path)).map(g=>(g.path=g.path==="/"?"/":`${g.path}/*`,g)));return m.push({element:r.createElement(u,null),path:"/*"}),(0,t.V$)(m)};var R=e(88934)},82339:function(te,s,e){"use strict";e.d(s,{Button:function(){return le},CodeSnippet:function(){return Ie},Content:function(){return na},ContentHeader:function(){return mi},CreateButton:function(){return it},DependencyGraph:function(){return fn},DependencyGraphTypes:function(){return r},EmptyState:function(){return Qt},ErrorPage:function(){return Ei},ErrorPanel:function(){return wt},Header:function(){return da},HeaderIconLinkRow:function(){return Vn},HeaderLabel:function(){return Li},HeaderTabs:function(){return ra},InfoCard:function(){return rr},ItemCardGrid:function(){return wi},ItemCardHeader:function(){return Fi},Link:function(){return K},LogViewer:function(){return hr},MissingAnnotationEmptyState:function(){return pn},OverflowTooltip:function(){return Br},Page:function(){return ma},PageWithHeader:function(){return Ni},Progress:function(){return wr},ResponseErrorPanel:function(){return cn},RoutedTabs:function(){return oa},Select:function(){return rt},Sidebar:function(){return ls},SidebarDivider:function(){return Cs},SidebarItem:function(){return ea},SidebarPage:function(){return Ja},SubvalueCell:function(){return $s},SupportButton:function(){return Va},Table:function(){return oi},WarningPanel:function(){return an},sidebarConfig:function(){return Xn},useSidebarOpenState:function(){return mo},useSidebarPinState:function(){return Vr}});var r={};e.r(r),e.d(r,{Nm:function(){return _},ht:function(){return We},LJ:function(){return be}});var t=e(2784),c=e(36964),i=e(19928);function R(n){const[o,l]=useState([]),d=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const Z=d.alert$().subscribe(G=>l(H=>H.concat(G)));return()=>{Z.unsubscribe()}},[d]),o.length===0)return null;const[v]=o,P=()=>{l(Z=>Z.filter(G=>G!==v))};return React.createElement(Snackbar,{open:!0,anchorOrigin:p},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:P,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:v.severity},React.createElement("span",null,v.message.toString(),o.length>1&&React.createElement("em",null,` (${o.length-1} older ${pluralize("message",o.length-1)})`))))}var f=e(79692),a=e(12420);const u=(0,f.Z)(n=>(0,a.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function m(n){const{displayName:o,picture:l,customStyles:d}=n,p=u();let v={...d};return l||(v={backgroundColor:stringToColor(o||""),...d}),React.createElement(MaterialAvatar,{alt:o,src:l,className:p.avatar,style:v},o&&extractInitials(o))}var y=e(77277),g=e(72779),E=e.n(g),S=e(86689),b=e(62833),O=e(76635);const $=(0,f.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),B=n=>/^([a-z+.-]+):/.test(n),F=()=>{try{return(0,c.useApi)(c.configApiRef).getOptionalString("app.baseUrl")}catch{return}},D=()=>{var d;const n="http://dummy.dev",o=(d=F())!=null?d:"/",{pathname:l}=new URL(o,n);return(0,O.trimEnd)(l,"/")},x=n=>{let o=String(n);const l=D(),d=B(o),p=o.startsWith(l);return!d&&!p&&(o=l.concat(o)),o},M=n=>{var o;return n instanceof Array?n.map(M).join(" ").trim():typeof n=="object"&&n?M((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},K=t.forwardRef(({onClick:n,noTrack:o,...l},d)=>{const p=$(),v=(0,c.useAnalytics)(),P=x(l.to),Z=M(l.children)||P,G=B(P),H=G&&!!/^https?:/.exec(P),ie=ee=>{n==null||n(ee),o||v.captureEvent("click",Z,{attributes:{to:P}})};return G?t.createElement(S.Z,{...H?{target:"_blank",rel:"noopener"}:{},...l,ref:d,href:P,onClick:ie,className:E()(p.externalLink,l.className)},l.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(S.Z,{...l,ref:d,component:b.rU,to:P,onClick:ie})}),re=t.forwardRef((n,o)=>t.createElement(K,{ref:o,...n,color:"initial"})),le=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:re,...n}));var Se=e(60364),De=e(61837),Fe=e(80030),He=e(19353),Ae=e(95074);function Je(n){const{text:o,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard","aria-label":p="Copy text"}=n,v=(0,c.useApi)(c.errorApiRef),[P,Z]=(0,t.useState)(!1),[{error:G},H]=(0,Ae.Z)();(0,t.useEffect)(()=>{G&&v.post(G)},[G,v]);const ie=ee=>{ee.stopPropagation(),Z(!0),H(o)};return t.createElement(t.Fragment,null,t.createElement(Fe.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>Z(!1),open:P},t.createElement(De.Z,{onClick:ie,"aria-label":p},t.createElement(He.Z,null))))}var tt=e(83229),bt=e(26639),At=e(39595);function Ie(n){const{text:o,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:P=!1}=n,Z=(0,Se.Z)(),G=Z.palette.type==="dark"?bt.Z:At.Z,H=Z.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(tt.Z,{customStyle:v,language:l,style:G,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:Z.palette.textVerySubtle},lineProps:ie=>p!=null&&p.includes(ie)?{style:{backgroundColor:H}}:{}},o),P&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(Je,{text:o})))}var mt=e(41156),ht=e(88188);function it(n){const{title:o,to:l}=n,d=(0,mt.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement(De.Z,{component:b.rU,color:"primary",title:o,size:"small",to:l},t.createElement(ht.Z,null)):t.createElement(y.Z,{component:b.rU,variant:"contained",color:"primary",to:l},o):null}var _;(function(n){const o="TB";n.TOP_BOTTOM=o;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(_||(_={}));var pe;(function(n){const o="UL";n.UP_LEFT=o;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(pe||(pe={}));var be;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const l="tight-tree";n.TIGHT_TREE=l;const d="longest-path";n.LONGEST_PATH=d})(be||(be={}));var We;(function(n){const o="l";n.LEFT=o;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(We||(We={}));var et=e(84945),ot=e(11105),yt=e(97963),se=e(46506),oe=e.n(se),Ye=e(54073),Ge=e.n(Ye),we=e(10368);const nt=(0,f.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function J({node:{id:n}}){const o=nt(),[l,d]=t.useState(0),[p,v]=t.useState(0),P=t.useRef(null);t.useLayoutEffect(()=>{if(P.current){let{height:ie,width:ee}=P.current.getBBox();ie=Math.round(ie),ee=Math.round(ee),(ie!==p||ee!==l)&&(d(ee),v(ie))}},[l,p]);const Z=10,G=l+Z*2,H=p+Z*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:G,height:H,rx:10}),t.createElement("text",{ref:P,className:o.text,y:H/2,x:G/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const z="arrow-marker",q="node",ce="edge",de="label",Pe=(0,we.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Oe=n=>t.createElement(J,{...n});function Ce({render:n=Oe,setNode:o,node:l}){const{width:d,height:p,x:v=0,y:P=0}=l,Z=l,G=Pe(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:ie,width:ee}=H.current.getBBox();ie=Math.round(ie),ee=Math.round(ee),(ie!==p||ee!==d)&&o(l.id,{...l,height:ie,width:ee})}},[l,d,p,o]),t.createElement("g",{ref:H,"data-testid":q,className:G.node,transform:`translate(${v-d/2},${P-p/2})`},n({node:Z}))}var Qe=e(55876),Ke=e(66481),gt=e(19574),Ct=e.n(gt);const ct=(0,we.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Dt({edge:{label:n}}){const o=ct();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Ot=(0,we.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"}),Pt=n=>t.createElement(Dt,{...n}),It=Qe.Z().x(n=>n.x).y(n=>n.y).curve(Ke.Z);function zt({render:n=Pt,setEdge:o,id:l,edge:d}){const{x:p=0,y:v=0,width:P,height:Z,points:G}=d,H=d,ie=Ot(),ee=t.useRef(null);t.useLayoutEffect(()=>{if(ee.current){let{height:Te,width:Me}=ee.current.getBBox();Te=Math.round(Te),Me=Math.round(Me),(Te!==Z||Me!==P)&&o(l,{...d,height:Te,width:Me})}},[d,Z,P,o,l]);let ve="";if(G){const Te=G.filter(Me=>Ct()(Me.x)&&Ct()(Me.y));ve=It(Te)||""}return t.createElement(t.Fragment,null,ve&&t.createElement("path",{"data-testid":ce,className:ie.path,markerEnd:`url(#${z})`,d:ve}),H.label?t.createElement("g",{ref:ee,"data-testid":de,className:ie.label,transform:`translate(${p},${v})`},n({edge:H})):null)}const Wt="workspace";function fn(n){var sr,Ir;const{edges:o,nodes:l,renderNode:d,direction:p=_.TOP_BOTTOM,align:v,nodeMargin:P=50,edgeMargin:Z=10,rankMargin:G=50,paddingX:H=0,paddingY:ie=0,acyclicer:ee,ranker:ve=be.NETWORK_SIMPLEX,labelPosition:Te=We.RIGHT,labelOffset:Me=10,edgeRanks:lt=1,edgeWeight:$t=1,renderLabel:Kt,defs:_t,zoom:Ht="enabled",...Tt}=n,rn=(0,yt.Z)(),[Nt,or]=t.useState(100),[kn,qn]=t.useState(100),Ut=t.useRef(new(oe()).graphlib.Graph),[Tr,Kr]=t.useState(((sr=Ut.current.graph())==null?void 0:sr.width)||0),[br,ro]=t.useState(((Ir=Ut.current.graph())==null?void 0:Ir.height)||0),[Ao,oo]=t.useState([]),[ao,Ro]=t.useState([]),un=Math.max(Tr,Nt),Pn=Math.max(br,kn),lr=t.useMemo(()=>Ge()(dn=>{if(!dn)return;const vn=ot.Z(dn),ln=ot.Z(dn.getElementById(Wt));function Hn(){vn.call(et.sP().scaleExtent([1,10]).on("zoom",_n=>{_n.transform.x=Math.min(0,Math.max(_n.transform.x,un-un*_n.transform.k)),_n.transform.y=Math.min(0,Math.max(_n.transform.y,Pn-Pn*_n.transform.k)),ln.attr("transform",_n.transform)}))}Ht==="enabled"?Hn():Ht==="enable-on-click"&&vn.on("click",()=>Hn());const{width:jn,height:so}=dn.getBoundingClientRect();Nt!==jn&&or(jn),kn!==so&&qn(so)},100),[kn,Nt,un,Pn,Ht]),ar=t.useCallback(()=>{const dn=Ut.current.nodes(),vn=Ut.current.edges();dn.forEach(ln=>{l.some(jn=>jn.id===ln)||Ut.current.removeNode(ln)}),vn.forEach(ln=>{o.some(jn=>jn.from===ln.v&&jn.to===ln.w)||Ut.current.removeEdge(ln.v,ln.w)}),l.forEach(ln=>{const Hn=Ut.current.nodes().find(jn=>ln.id===jn);if(Hn&&Ut.current.node(Hn)){const{width:jn,height:so,x:_n,y:tl}=Ut.current.node(Hn);Ut.current.setNode(Hn,{...ln,width:jn,height:so,x:_n,y:tl})}else Ut.current.setNode(ln.id,{...ln,width:0,height:0})}),o.forEach(ln=>{Ut.current.setEdge(ln.from,ln.to,{...ln,label:ln.label,width:0,height:0,labelpos:Te,labeloffset:Me,weight:$t,minlen:lt})})},[o,l,Te,Me,$t,lt]),sn=t.useMemo(()=>Ge()(()=>{oe().layout(Ut.current);const{height:dn,width:vn}=Ut.current.graph(),ln=Math.max(0,dn||0),Hn=Math.max(0,vn||0);Kr(Hn),ro(ln),oo(Ut.current.nodes()),Ro(Ut.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(Ut.current.setGraph({rankdir:p,align:v,nodesep:P,edgesep:Z,ranksep:G,marginx:H,marginy:ie,acyclicer:ee,ranker:ve}),ar(),sn(),sn.cancel),[ee,v,p,Z,H,ie,P,G,ve,ar,sn]);function In(dn,vn){return Ut.current.setNode(dn,vn),sn(),Ut.current}function Pr(dn,vn){return Ut.current.setEdge(dn,vn),sn(),Ut.current}return t.createElement("svg",{ref:lr,...Tt,width:"100%",height:Pn,viewBox:`0 0 ${un} ${Pn}`},t.createElement("defs",null,t.createElement("marker",{id:z,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:rn.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),_t),t.createElement("g",{id:Wt},t.createElement("svg",{width:Tr,height:br,y:Pn/2-br/2,x:un/2-Tr/2,viewBox:`0 0 ${Tr} ${br}`},ao.map(dn=>{const vn=Ut.current.edge(dn);return vn?t.createElement(zt,{key:`${dn.v}-${dn.w}`,id:dn,setEdge:Pr,render:Kt,edge:vn}):null}),Ao.map(dn=>{const vn=Ut.current.node(dn);return vn?t.createElement(Ce,{key:dn,setNode:In,render:d,node:vn}):null}))))}const Ln=(0,f.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"}),kt=n=>{var Te;const{variant:o,message:l,id:d,fixed:p=!1}=n,v=Ln(),Z=useApi(storageApiRef).forBucket("notifications"),G=(Te=Z.snapshot("dismissedBanners").value)!=null?Te:[],[H,ie]=useState(new Set(G)),ee=useObservable(Z.observe$("dismissedBanners"));useEffect(()=>{var Me;if(ee!=null&&ee.value){const lt=(Me=ee==null?void 0:ee.value)!=null?Me:[];ie(new Set(lt))}},[ee==null?void 0:ee.value]);const ve=()=>{Z.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(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[o]),message:v.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:ve},React.createElement(Close,{className:v.icon}))]}))};var Zt=e(60905),Xe=e(90436),ue=e.p+"static/missingAnnotation.67f79e98..svg",j=e.p+"static/noInformation.4b426325..svg",ye=e.p+"static/createComponent.975d1e1e..svg",je=e.p+"static/noBuild.1715fa71..svg";const _e=(0,f.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),st=({missing:n})=>{const o=_e();switch(n){case"field":return t.createElement("img",{src:ue,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:j,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:ye,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:je,alt:"no Build",className:o.generalImg});default:return null}},Rt=(0,f.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 Qt(n){const{title:o,description:l,missing:d,action:p}=n,v=Rt();return t.createElement(Zt.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement(Zt.Z,{item:!0,xs:12,md:6},t.createElement(Zt.Z,{container:!0,direction:"column"},t.createElement(Zt.Z,{item:!0,xs:!0},t.createElement(Xe.Z,{variant:"h5"},o)),t.createElement(Zt.Z,{item:!0,xs:!0},t.createElement(Xe.Z,{variant:"body1"},l)),t.createElement(Zt.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement(Zt.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(st,{missing:d})))}const en=`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`,tn=(0,f.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function pn(n){const{annotation:o,readMoreUrl:l}=n,d=l||"https://backstage.io/docs/features/software-catalog/well-known-annotations",p=tn(),v=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(Qt,{missing:"field",title:"Missing Annotation",description:v,action:t.createElement(t.Fragment,null,t.createElement(Xe.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:p.code},t.createElement(Ie,{text:en.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:K,to:d},"Read more"))})}var U=e(11776),ae=e(38402),ne=e(49378),Ee=e(41128),$e=e(27616),ut=e(8284),Ze=e(70660),jt=e(91750),Vt=e(38016);const Gt=(n,o)=>(o.palette.type==="light"?Ee._j:Ee.$n)(o.palette[n].light,.6),Bt=(n,o)=>(o.palette.type==="light"?Ee.$n:Ee._j)(o.palette[n].light,.9),Et=(0,f.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>Gt(o,n)}})),Xt=({severity:n})=>{const o=Et({severity:n});return t.createElement(jt.Z,{classes:o})},on=({severity:n})=>{const o=Et({severity:n});return t.createElement(Vt.Z,{classes:o})},Yt=(0,f.Z)(n=>({panel:{backgroundColor:({severity:o})=>Bt(o,n),color:({severity:o})=>Gt(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>Gt(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>Gt(o,n),backgroundColor:({severity:o})=>Bt(o,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),qt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function an(n){const{severity:o="warning",title:l,message:d,children:p,defaultExpanded:v}=n,P=Yt({severity:o}),Z=qt(o)+(l?`: ${l}`:"");return t.createElement($e.Z,{defaultExpanded:v!=null?v:!1,className:P.panel,role:"alert"},t.createElement(ut.Z,{expandIcon:t.createElement(on,{severity:o}),className:P.summary},t.createElement(Xt,{severity:o}),t.createElement(Xe.Z,{className:P.summaryText,variant:"subtitle1"},Z)),(d||p)&&t.createElement(Ze.Z,null,t.createElement(Zt.Z,{container:!0},d&&t.createElement(Zt.Z,{item:!0,xs:12},t.createElement(Xe.Z,{className:P.message,variant:"body1"},d)),p&&t.createElement(Zt.Z,{item:!0,xs:12,className:P.details},p))))}const nn=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Mt=({error:n,message:o,stack:l,children:d})=>{const p=nn();return t.createElement(U.Z,{dense:!0},t.createElement(ae.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(Je,{text:n})),t.createElement(ae.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Message",secondary:o}),t.createElement(Je,{text:o})),l&&t.createElement(ae.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(Je,{text:l})),d)};function wt(n){const{title:o,error:l,defaultExpanded:d,children:p}=n;return t.createElement(an,{severity:"error",title:o!=null?o:l.message,defaultExpanded:d},t.createElement(Mt,{error:l.name,message:l.message,stack:l.stack,children:p}))}var Jt=e(85256);const Sn=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function cn(n){var Me;const{title:o,error:l,defaultExpanded:d}=n,p=Sn();if(l.name!=="ResponseError")return t.createElement(wt,{title:o!=null?o:l.message,defaultExpanded:d,error:l});const{body:v,cause:P}=l,{request:Z,response:G}=v,H=`${G.statusCode}: ${P.name}`,ie=Z&&`${Z.method} ${Z.url}`,ee=P.message.replace(/\\n/g,`
|
|
12
|
+
`),ve=(Me=P.stack)==null?void 0:Me.replace(/\\n/g,`
|
|
13
|
+
`),Te=JSON.stringify(v,void 0,2);return t.createElement(wt,{title:o!=null?o:l.message,defaultExpanded:d,error:{name:H,message:ee,stack:ve}},ie&&t.createElement(ae.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Request",secondary:Z?`${ie}`:void 0}),t.createElement(Je,{text:ie})),t.createElement(t.Fragment,null,t.createElement(Jt.Z,{component:"li",className:p.divider}),t.createElement(ae.Z,{alignItems:"flex-start"},t.createElement(ne.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Ie,{language:"json",text:Te,showCopyCodeButton:!0})))}var An=e(47093);function On(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function Rn(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function wn(n){const o=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),v=p||On(n);return p||Rn(v),v.appendChild(o.current),function(){o.current.remove(),v.childNodes.length===-1&&v.remove()}},[n]);function l(){return o.current||(o.current=document.createElement("div")),o.current}return l()}var w=null;const h="core.calloutSeen";function C(){const[n,o]=useState(()=>{const d=localStorage.getItem(h);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const v=localStorage.getItem(h),Z={...v?JSON.parse(v):{},[d]:p};o(Z),localStorage.setItem(h,JSON.stringify(Z))},[]);return{states:n,setState:l}}function L(n){const{states:o,setState:l}=C(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:o[n]===!0,markSeen:d}}function V(n){const{seen:o,markSeen:l}=L(n);return{show:o===!1,hide:l}}const me=(0,f.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 ge(n){const{featureId:o,title:l,description:d,children:p}=n,{show:v,hide:P}=useShowCallout(o),Z=usePortal("core.callout"),G=useRef(null),[H,ie]=useState(),ee=me(),ve=useCallback(()=>{if(G.current){const Te=G.current.getBoundingClientRect(),Me=Math.max(Te.width,Te.height),lt=800,$t=Te.x-(Me-Te.width)/2-lt,Kt=Te.y-(Me-Te.height)/2-lt,_t=Me+2*lt,Ht=450,Tt=Te.x+Te.width/2-Ht,rn=Te.y-(Me-Te.height)/2+Me+20;ie({dotLeft:$t,dotTop:Kt,dotSize:_t,borderWidth:lt,textTop:rn,textLeft:Tt,textWidth:Ht})}},[]);return useEffect(()=>(window.addEventListener("resize",ve),window.addEventListener("scroll",ve),()=>{window.removeEventListener("resize",ve),window.removeEventListener("scroll",ve)}),[ve]),useLayoutEffect(ve,[G.current,ve]),v?React.createElement(React.Fragment,null,React.createElement("div",{className:ee.featureWrapper,ref:G},p),createPortal(React.createElement("div",{className:ee.backdrop},React.createElement(ClickAwayListener,{onClickAway:P},React.createElement(React.Fragment,null,React.createElement("div",{className:ee.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:P,onKeyDown:P,role:"button",tabIndex:0},React.createElement("div",{className:ee.pulseCircle})),React.createElement("div",{className:ee.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},l),React.createElement(Typography,null,d))))),Z)):React.createElement(React.Fragment,null,p)}var Le=e(35292);const pt=(0,f.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:n.palette.text.secondary,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 St({color:n="primary",disabled:o=!1,href:l="#",icon:d=t.createElement(Le.Z,null),label:p,onClick:v,title:P}){const Z=pt();return o?t.createElement(S.Z,{title:P,className:E()(Z.link,Z.disabled),underline:"none"},d,t.createElement("span",{className:Z.label},p)):t.createElement(S.Z,{title:P,className:E()(Z.link,Z[n]),to:l,component:K,onClick:v},d,t.createElement("span",{className:Z.label},p))}const hn=(0,f.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function Vn(n){const{links:o}=n,l=hn();return t.createElement("nav",{className:l.links},o.map((d,p)=>t.createElement(St,{key:p+1,...d})))}const cr=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
|
+
`},ur=100,dr=10,Gn=(0,f.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:ur,height:`calc(100% + ${dr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-dr,background:`linear-gradient(90deg, ${cr(n.palette.type)})`},fadeRight:{right:-dr,background:`linear-gradient(270deg, ${cr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function $n(n){const[[o,l],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const v=()=>{const P=p.scrollLeft,Z=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([P,Z])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[o,l]}function er(n,o,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const v=performance.now(),P=requestAnimationFrame(Z=>{if(!n.current)return;const G=Z-v,H=Math.abs(d)*G/o,ee=Math.max(l,H)*Math.sign(d);n.current.scrollBy({left:ee});const ve=d-ee;Math.sign(d)!==Math.sign(ve)?p(0):p(ve)});return()=>cancelAnimationFrame(P)},[n,d,o,l]),p}function fr(n){const{scrollStep:o=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...v}=n,P=Gn(n),Z=React.useRef(),[G,H]=$n(Z),ie=er(Z,l,d),ee=ve=>{!Z.current||ie(ve?o:-o)};return React.createElement("div",{...v,className:P.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:P.container,ref:Z},p),React.createElement("div",{className:classNames(P.fade,P.fadeLeft,{[P.fadeHidden]:G===0})}),React.createElement("div",{className:classNames(P.fade,P.fadeRight,{[P.fadeHidden]:H===0})}),G>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ee(!1),className:classNames(P.button,P.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ee(!0),className:classNames(P.button,P.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Lr=(0,f.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function io(n){const o=Lr(n),{shorthand:l,alpha:d}=n;return l?React.createElement("span",{className:o[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:o[d?"alpha":"beta"]},d?"Alpha":"Beta")}const mr=(0,t.lazy)(()=>Promise.all([e.e(4949),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function hr(n){const{Progress:o}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement(mr,{...n}))}const Or=(0,f.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"}),ir={code:({inline:n,className:o,children:l,...d})=>{const p=String(l).replace(/\n+$/,""),v=/language-(\w+)/.exec(o||"");return!n&&v?t.createElement(Ie,{language:v[1],text:p}):t.createElement("code",{className:o,...d},l)}};function Un(n){const{content:o,dialect:l="gfm",linkTarget:d,transformLinkUri:p,transformImageUri:v,className:P}=n,Z=Or();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:`${Z.markdown} ${P}`,children:o,components:ir,linkTarget:d,transformLinkUri:p,transformImageUri:v})}var tr=e(10179);const nr=(0,f.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),kr=({request:n,busy:o,setBusy:l})=>{const d=nr(),[p,v]=useState(),P=async()=>{l(!0);try{await n.trigger()}catch(G){v(isError(G)?G.message:"An unspecified error occurred")}finally{l(!1)}},Z=n.provider.icon;return React.createElement(ListItem,{disabled:o,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(Z,{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:P},"Log in"))};var gr=null;const pr=(0,f.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:n.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Yr(n){const o=pr(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),P=()=>{v.forEach(Z=>Z.reject())};return React.createElement(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog},"aria-labelledby":"oauth-req-dialog-title"},React.createElement("main",null,React.createElement(DialogTitle,{classes:{root:o.title},id:"oauth-req-dialog-title"},React.createElement(Typography,{className:o.titleHeading,variant:"h1"},"Login Required")),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,v.map(Z=>React.createElement(LoginRequestListItem,{key:Z.provider.title,request:Z,busy:l,setBusy:d}))))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:P},"Reject All")))}var xr=e(15277),yr=e.n(xr),Dr=e(29862);const Fr=(0,f.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Br(n){var P;const[o,l]=(0,t.useState)(!1),d=(0,Dr.t)(),p=Fr(),v=Z=>{d()&&l(Z)};return t.createElement(Fe.ZP,{title:(P=n.title)!=null?P:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(yr(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var Mr=e(67358);function wr(n){const[o,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),o?t.createElement(Mr.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var $r=e(94339),Er=e(14503),Ur=e(24579),vr=e(32552),gn=e(15459),xn=e(95544),yn=e(27597);const Yn=(0,f.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 Nr(n){const{link:o,title:l,onClick:d}=n,p=Yn();return t.createElement("div",null,t.createElement(Jt.Z,null),t.createElement(K,{to:o,onClick:d,underline:"none"},t.createElement(xn.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(xn.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Xe.Z,null,t.createElement("strong",null,l))),t.createElement(yn.Z,{className:p.arrow}))))}const Zr=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(le,{to:o.href,variant:"contained"},o.name)},Ar=class extends t.Component{constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,l){console.error(`ErrorBoundary, error: ${o}, info: ${l}`),this.setState({error:o,errorInfo:l})}render(){const{slackChannel:o,children:l}=this.props,{error:d}=this.state;return d?t.createElement(wt,{title:"Something Went Wrong",error:d},t.createElement(Zr,{slackChannel:o})):l}},Rr=(0,f.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"}),zr=(0,gn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(Er.Z),Sr={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 rr(n){const{title:o,subheader:l,divider:d=!0,deepLink:p,slackChannel:v,errorBoundaryProps:P,variant:Z,children:G,headerStyle:H,headerProps:ie,icon:ee,action:ve,actionsClassName:Te,actions:Me,cardClassName:lt,actionsTopRight:$t,className:Kt,noPadding:_t,titleTypographyProps:Ht}=n,Tt=Rr();let rn={},Nt={};Z&&Z.split(/[\s]+/g).forEach(Ut=>{rn={...rn,...Sr.card[Ut]},Nt={...Nt,...Sr.cardContent[Ut]}});const or=()=>t.createElement("div",{className:Tt.headerSubheader},l&&t.createElement("div",{className:Tt.subheader},l),ee),kn=P||(v?{slackChannel:v}:{});return t.createElement($r.Z,{style:rn,className:Kt},t.createElement(Ar,{...kn},o&&t.createElement(vr.Z,{classes:{root:Tt.header,title:Tt.headerTitle,subheader:Tt.headerSubheader,avatar:Tt.headerAvatar,action:Tt.headerAction,content:Tt.headerContent},title:o,subheader:or(),action:ve,style:{...H},titleTypographyProps:Ht,...ie}),$t&&t.createElement(zr,null,$t),d&&t.createElement(Jt.Z,null),t.createElement(Ur.Z,{className:E()(lt,{[Tt.noPadding]:_t}),style:Nt},G),Me&&t.createElement(Er.Z,{className:Te},Me),p&&t.createElement(Nr,{...p})))}var lo=e(39307);const Wr=(0,f.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"}),I={fractional:!0,inverse:!1,unit:"%",max:100},k=({palette:n,value:o,inverse:l,max:d})=>{if(isNaN(o))return"#ddd";const p=d||I.max,v=l?p-o:o;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function fe(n){const[o,l]=useState(null),{getColor:d=k}=n,p=Wr(n),{palette:v}=useTheme(),{value:P,fractional:Z,inverse:G,unit:H,max:ie,description:ee}={...I,...n},ve=Z?Math.round(P*ie):P,Te=ie!==100?Math.round(P):ve,[Me,lt]=useState(!1);return useEffect(()=>{const $t=o,Kt=()=>lt(!0),_t=()=>lt(!1);return $t&&ee?($t.addEventListener("mouseenter",Kt),$t.addEventListener("mouseleave",_t),()=>{$t.removeEventListener("mouseenter",Kt),$t.removeEventListener("mouseleave",_t)}):()=>{lt(!1)}},[ee,o]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:ve,strokeWidth:12,trailWidth:12,strokeColor:d({palette:v,value:Te,inverse:G,max:ie}),className:p.circle}),ee&&Me?React.createElement("div",{className:p.description},ee):React.createElement("div",{className:p.overlay},isNaN(P)?"N/A":`${Te}${H}`))}const Be=(0,f.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function qe(n){const o=Be(n),{title:l,subheader:d,progress:p,inverse:v,deepLink:P,description:Z,icon:G,variant:H,getColor:ie}=n,ee={inverse:v,description:Z,getColor:ie,value:p};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:P,variant:H,icon:G},React.createElement(Gauge,{...ee})))}function ft(n){const{value:o,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(o))return null;let p=Math.round(o*100*100)/100;p>100&&(p=100);const v=l({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:v})))}var vt=e(21324),xt=e(7089),dt=e(1292),A=e(42494),T=e(74603),N=e(56939),W=e(12231),Y=e(73698),Q=e(72379);const he=(0,f.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ue=()=>{const n=he();return t.createElement(Q.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 xe=(0,f.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var ze=()=>{const n=xe();return t.createElement(Q.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,gn.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"})(T.Z),Lt=(0,f.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}},formLabel:{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 rt(n){const{multiple:o,items:l,label:d,placeholder:p,selected:v,onChange:P,triggerReset:Z,native:G=!1,disabled:H=!1,margin:ie}=n,ee=Lt(),[ve,Te]=(0,t.useState)(v||(o?[]:"")),[Me,lt]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Te(o?[]:"")},[Z,o]),(0,t.useEffect)(()=>{v!==void 0&&Te(v)},[v]);const $t=Tt=>{Te(Tt.target.value),P(Tt.target.value)},Kt=Tt=>{if(H){Tt.preventDefault();return}lt(rn=>o&&!(Tt.target instanceof HTMLElement)?!0:!rn)},_t=()=>{lt(!1)},Ht=Tt=>()=>{const rn=ve.filter(Nt=>Nt!==Tt);Te(rn),P(rn)};return t.createElement("div",{className:ee.root},t.createElement(dt.Z,{onClickAway:_t},t.createElement(A.Z,{className:ee.formControl},t.createElement(N.Z,{className:ee.formLabel},d),t.createElement(Y.Z,{"aria-label":d,value:ve,native:G,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:o,margin:ie,onChange:$t,onClick:Kt,open:Me,input:t.createElement(ke,null),label:d,tabIndex:0,renderValue:Tt=>{var rn;return o&&ve.length!==0?t.createElement("div",{className:ee.chips},Tt.map(Nt=>{var or,kn;return t.createElement(xt.Z,{key:(or=l.find(qn=>qn.value===Nt))==null?void 0:or.value,label:(kn=l.find(qn=>qn.value===Nt))==null?void 0:kn.label,clickable:!0,onDelete:Ht(Nt),className:ee.chip})})):t.createElement(Xe.Z,null,ve.length===0?p||"":(rn=l.find(Nt=>Nt.value===Tt))==null?void 0:rn.label)},IconComponent:()=>Me?t.createElement(ze,null):t.createElement(Ue,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!o&&t.createElement(W.Z,{value:[]},p),G?l&&l.map(Tt=>t.createElement("option",{value:Tt.value,key:Tt.value},Tt.label)):l&&l.map(Tt=>t.createElement(W.Z,{key:Tt.value,value:Tt.value},o&&t.createElement(vt.Z,{color:"primary",checked:ve.includes(Tt.value)||!1,className:ee.checkbox}),Tt.label))))))}const Ve=()=>{},Ft=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Ve,stepHistory:[],setStepHistory:Ve,onStepChange:Ve});function mn(n){const{children:o,elevated:l,onStepChange:d,activeStep:p=0}=n,[v,P]=useState(p),[Z,G]=useState([0]);useEffect(()=>{P(p)},[p]);const H=[];let ie;return Children.forEach(o,ee=>{isValidElement(ee)&&(ee.props.end?ie=ee:H.push(ee))}),React.createElement(React.Fragment,null,React.createElement(Ft.Provider,{value:{stepIndex:v,setStepIndex:P,stepHistory:Z,setStepHistory:G,onStepChange:d,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:l?2:0},H)),v>=Children.count(o)-1&&ie)}const Jn=(0,f.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),Dn=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),En=({text:n,handleClick:o,disabled:l,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:o},n||(d?"Finish":"Next")),Cn=({text:n,handleClick:o,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Nn=({actions:n={},children:o})=>{const l=Jn(),{stepperLength:d,stepIndex:p,setStepIndex:v,stepHistory:P,setStepHistory:Z,onStepChange:G}=useContext(VerticalStepperContext),H=(Te,Me)=>{Me&&Me(),G&&G(p,Te),v(Te)},ie=()=>{const Te=n.nextStep?n.nextStep(p,d-1):p+1;H(Te,n.onNext),Z([...P,Te])},ee=()=>{P.pop(),H(P[P.length-1],n.onBack),Z([...P])},ve=()=>{H(0,n.onRestart),Z([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(Cn,{text:n.backText,handleClick:ee,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(En,{text:n.nextText,handleClick:ie,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(Dn,{text:n.restartText,handleClick:ve,stepIndex:p}),o)},Cr=(0,f.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Hr(n){const{title:o,children:l,end:d,actions:p,...v}=n,P=Cr();return d?React.createElement("div",{className:P.end},React.createElement(Typography,{variant:"h6"},o),l,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...v},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},o)),React.createElement(StepContent,null,l,React.createElement(SimpleStepperFooter,{actions:p})))}const Qn=(0,f.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 Tn(n){const o=Qn(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Fn(n){const o=Qn(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function jr(n){const o=Qn(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function co(n){const o=Qn(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function ol(n){const o=Qn(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function al(n){const o=Qn(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var sl=e(74600),So=e(15584);const Ra=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),Sa={root:{border:"0",verticalAlign:"top"}},Ca=n=>(0,a.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),Ta=n=>(0,a.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),ba=(0,gn.Z)(Ra,{name:"BackstageMetadataTableTitleCell"})(So.Z),Pa=(0,gn.Z)(Sa,{name:"BackstageMetadataTableCell"})(So.Z),il=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),ll=({title:n,children:o,...l})=>React.createElement(TableRow,null,n&&React.createElement(ba,null,n),React.createElement(Pa,{colSpan:n?1:2,...l},o)),Co=(0,gn.Z)(Ca,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),cl=(0,gn.Z)(Ta,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),To=(0,a.Z)({root:{margin:"0 0",listStyleType:"none"}}),Ia=n=>(0,a.Z)({root:{...To.root,paddingLeft:n.spacing(1)}}),bo=(0,gn.Z)(To,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(Co,{classes:n},o)),Po=(0,gn.Z)(Ia,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(Co,{classes:n},o));function La(n,o){const l=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},uo(d)));return o?React.createElement(Po,null,l):React.createElement(bo,null,l)}function Oa(n,o,l){const d=Object.keys(n).map(p=>{const v=uo(n[p],!0),P=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${P}: `,v)});return o?React.createElement(Po,null,d):React.createElement(bo,null,d)}function uo(n,o,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?Oa(n,o,l):Array.isArray(n)?La(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const xa=({value:n,options:o})=>React.createElement(Fragment,null,uo(n,o)),Da=({title:n,value:o,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(xa,{value:o,options:l}));function Fa(n,o){return Object.keys(n).map(l=>React.createElement(Da,{key:l,title:l,value:n[l],options:o}))}function ul(n){const{metadata:o,dense:l=!0,options:d}=n,p=Fa(o,d||{});return React.createElement(MetadataTable,{dense:l},p)}var Ba=e(49429),Ma=e(86136),Io=e(79784),wa=e(19126),Lo=e.n(wa);function $a(n){return qs.stringify(n,{strictNullHandling:!0})}function Oo(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function xo(n,o){return Oo(n)[o]}function Ua(n,o,l){const d={...Oo(n),[o]:l};return $a(d)}function dl(n,o=250){const[l,d]=useSearchParams(),p=l.toString(),[v,P]=useState(xo(p,n));return useEffect(()=>{const Z=xo(p,n);P(G=>isEqual(Z,G)?G:Z)},[p,P,n]),useDebouncedEffect(()=>{const Z=Ua(p,n,v);p!==Z&&d(Z,{replace:!0})},[d,v,p,n],o),[v,P]}const Na={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 Do(){const o=(0,c.useApiHolder)().get(c.configApiRef),l=o==null?void 0:o.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:Na}var Za=e(80079);function Wn(n,o){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...o}):t.createElement(Za.Z,{...o})}function fl(n){return Wn("brokenImage",n)}function ml(n){return Wn("catalog",n)}function hl(n){return Wn("chat",n)}function gl(n){return Wn("dashboard",n)}function pl(n){return Wn("docs",n)}function yl(n){return Wn("email",n)}function El(n){return Wn("github",n)}function vl(n){return Wn("group",n)}function Jr(n){return Wn("help",n)}function Al(n){return Wn("user",n)}function Rl(n){return Wn("warning",n)}const za=(0,f.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Wa=({icon:n})=>{var d;const o=(0,c.useApp)(),l=n&&(d=o.getSystemIcon(n))!=null?d:Jr;return t.createElement(l,null)},Ha=({link:n})=>{var o;return t.createElement(K,{to:n.url},(o=n.title)!=null?o:n.url)},ja=({item:n})=>{var o;return t.createElement(ae.Z,null,t.createElement(Ma.Z,null,t.createElement(Wa,{icon:n.icon})),t.createElement(ne.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((l,d,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(Ha,{link:d,key:d.url})],[])}))};function Va(n){const{title:o,children:l}=n,{items:d}=Do(),[p,v]=(0,t.useState)(!1),[P,Z]=(0,t.useState)(null),G=za(),H=(0,mt.Z)(ve=>ve.breakpoints.down("sm")),ie=ve=>{Z(ve.currentTarget),v(!0)},ee=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(xn.Z,{display:"flex",ml:1},H?t.createElement(De.Z,{color:"primary",size:"small",onClick:ie,"data-testid":"support-button"},t.createElement(Jr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:ie,startIcon:t.createElement(Jr,null)},"Support")),t.createElement(Io.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ee},t.createElement(U.Z,{className:G.popoverList},o&&t.createElement(ae.Z,{alignItems:"flex-start"},t.createElement(Xe.Z,{variant:"subtitle1"},o)),t.Children.map(l,(ve,Te)=>t.createElement(ae.Z,{alignItems:"flex-start",key:`child-${Te}`},ve)),d&&d.map((ve,Te)=>t.createElement(ja,{item:ve,key:`item-${Te}`}))),t.createElement(Ba.Z,null,t.createElement(y.Z,{color:"primary",onClick:ee},"Close"))))}var fo=e(18671),Zn=e(10289);const Qr=72,Fo=24,Bo=18,Xn={drawerWidthClosed:Qr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Qr,iconSize:Qr-Fo*2,iconPadding:Fo,selectedIndicatorWidth:3,userBadgePadding:Bo,userBadgeDiameter:Qr-Bo*2,mobileSidebarHeight:56},Ga=n=>({...Xn,...n,iconContainerWidth:Xn.drawerWidthClosed,iconSize:Xn.drawerWidthClosed-Xn.iconPadding*2,userBadgeDiameter:Xn.drawerWidthClosed-Xn.userBadgePadding*2}),Mo={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Xn.defaultOpenDelayMs+200},Ka=n=>({...Mo,...n}),Sl="@backstage/core/sidebar-intro-dismissed",Kn=(0,t.createContext)({sidebarConfig:Xn,submenuConfig:Mo}),wo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Xr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(Xr||(Xr={}));const $o={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Xr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Xr.SIDEBAR_PIN_STATE,JSON.stringify(n))}};var qr=e(76241);const Uo={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},No=(0,t.createContext)(Uo),Zo=(0,qr.CT)("sidebar-pin-state-context"),ka=({children:n,value:o})=>t.createElement(No.Provider,{value:o},t.createElement(Zo.Provider,{value:(0,qr.EI)({1:o})},n)),Vr=()=>{const n=(0,t.useContext)(Zo),o=(0,t.useContext)(No);if(n===void 0)return o||Uo;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l},Ya=(0,f.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:o=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:o=>o.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),zo=(0,t.createContext)({content:{contentRef:void 0}});function Ja(n){const[o,l]=(0,t.useState)(()=>$o.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Kn),p=(0,t.useRef)(null),v=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{$o.setSidebarPinState(o)},[o]);const P=(0,mt.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),Z=()=>l(!o),G=Ya({isPinned:o,sidebarConfig:d});return t.createElement(ka,{value:{isPinned:o,toggleSidebarPinState:Z,isMobile:P}},t.createElement(zo.Provider,{value:v},t.createElement("div",{className:G.root},n.children)))}function Wo(){const{content:n}=(0,t.useContext)(zo);return{focusContent:(0,t.useCallback)(()=>{var l,d;(d=(l=n==null?void 0:n.contentRef)==null?void 0:l.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}const Ho={isOpen:!1,setOpen:()=>{}},jo=(0,t.createContext)(Ho),Vo=(0,qr.CT)("sidebar-open-state-context"),Go=({children:n,value:o})=>t.createElement(jo.Provider,{value:o},t.createElement(Vo.Provider,{value:(0,qr.EI)({1:o})},n)),mo=()=>{const n=(0,t.useContext)(Vo),o=(0,t.useContext)(jo);if(n===void 0)return o||Ho;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l};var Qa=e(50023),Xa=e(4190),qa=e(87685),_a=e(44882),es=e(57998);const ts=(0,f.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"}})),ns=n=>{const{to:o,label:l,icon:d,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Kn),P=ts({sidebarConfig:v}),Z=(0,Zn.TH)(),{selectedMenuItemIndex:G,setSelectedMenuItemIndex:H}=(0,t.useContext)(Yo),ie=(ve,Te)=>{H(Te===G?-1:Te)},ee=p===G&&G>=0||p!==G&&!(G>=0)&&o===Z.pathname;return t.createElement(es.Z,{label:l,icon:d,component:K,to:o||Z.pathname,onChange:ie,value:p,selected:ee,classes:P})},Ko=n=>{const{children:o,to:l,label:d,icon:p,value:v}=n,{isMobile:P}=Vr();return P?t.createElement(ns,{to:l,label:d,icon:p,value:v}):t.createElement(t.Fragment,null,o)},ko=(0,f.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.text.primary,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.text.primary},marginMobileSidebar:o=>({marginBottom:`${o.sidebarConfig.mobileSidebarHeight}px`})})),rs=n=>(0,O.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),os=t.createElement(Ko).type,as=({children:n,label:o="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Kn),v=ko({sidebarConfig:p});return t.createElement(Xa.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(xn.Z,{className:v.overlayHeader},t.createElement(Xe.Z,{variant:"h3"},o),t.createElement(De.Z,{onClick:d,classes:{root:v.overlayHeaderClose}},t.createElement(qa.Z,null))),t.createElement(xn.Z,{component:"nav"},n))},Yo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ss=n=>{const{sidebarConfig:o}=(0,t.useContext)(Kn),{children:l}=n,d=ko({sidebarConfig:o}),p=(0,Zn.TH)(),[v,P]=(0,t.useState)(-1);(0,t.useEffect)(()=>{P(-1)},[p.pathname]);let Z=(0,c.useElementFilter)(l,H=>H.getElements().filter(ie=>ie.type===os));if(l)Z.length?Z=rs(Z):Z.push(t.createElement(Ko,{key:"default_menu",icon:t.createElement(_a.Z,null)},l));else return null;const G=v>=0&&!Z[v].props.to;return t.createElement(Go,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Yo.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:P}},t.createElement(as,{label:Z[v]&&Z[v].props.label,open:G,onClose:()=>P(-1)},Z[v]&&Z[v].props.children),t.createElement(Qa.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},Z)))},Jo=(0,f.Z)(n=>({drawer:o=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:o.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:o=>({width:o.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var Bn;(function(n){n[n.Closed=0]="Closed";const l=0+1;n[n.Idle=l]="Idle";const d=l+1;n[n.Open=d]="Open"})(Bn||(Bn={}));const is=n=>{const{sidebarConfig:o}=(0,t.useContext)(Kn),{openDelayMs:l=o.defaultOpenDelayMs,closeDelayMs:d=o.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,P=Jo({sidebarConfig:o}),Z=(0,mt.Z)(Kt=>Kt.breakpoints.down("md"),{noSsr:!0}),[G,H]=(0,t.useState)(Bn.Closed),ie=(0,t.useRef)(),{isPinned:ee,toggleSidebarPinState:ve}=Vr(),Te=()=>{ee||p||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),G!==Bn.Open&&!Z&&(ie.current=window.setTimeout(()=>{ie.current=void 0,H(Bn.Open)},l),H(Bn.Idle)))},Me=()=>{ee||p||(ie.current&&(clearTimeout(ie.current),ie.current=void 0),G===Bn.Idle?H(Bn.Closed):G===Bn.Open&&(ie.current=window.setTimeout(()=>{ie.current=void 0,H(Bn.Closed)},d)))},lt=G===Bn.Open&&!Z||ee,$t=Kt=>{Kt?(H(Bn.Open),ve()):(H(Bn.Closed),ve())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(cs,null),t.createElement(Go,{value:{isOpen:lt,setOpen:$t}},t.createElement("div",{className:P.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Te,onFocus:p?()=>{}:Te,onMouseLeave:p?()=>{}:Me,onBlur:p?()=>{}:Me},t.createElement("div",{className:E()(P.drawer,{[P.drawerOpen]:lt})},v))))},ls=n=>{var G,H;const o=Ga((G=n.sidebarOptions)!=null?G:{}),l=Ka((H=n.submenuOptions)!=null?H:{}),{children:d,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:P}=n,{isMobile:Z}=Vr();return Z?t.createElement(ss,null,d):t.createElement(Kn.Provider,{value:{sidebarConfig:o,submenuConfig:l}},t.createElement(is,{openDelayMs:v,closeDelayMs:P,disableExpandOnHover:p},d))};function cs(){const{sidebarConfig:n}=(0,t.useContext)(Kn),{focusContent:o,contentRef:l}=Wo(),d=Jo({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:E()(d.visuallyHidden)},"Skip to content"):null}function Qo(n,o){const l=new URLSearchParams(o.search).toString(),d=Lo().parse(l),p=new URLSearchParams(n.search).toString(),v=Lo().parse(p);return(0,O.isEqual)(o.pathname,n.pathname)&&(0,O.isMatch)(v,d)}const us=(0,f.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,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor}},textContent:{color:n.palette.navigation.color,paddingLeft:n.spacing(4),paddingRight:n.spacing(1),fontSize:"14px",whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),Cl=n=>{const{title:o,subtitle:l,to:d,icon:p,dropdownItems:v}=n,P=us(),{setIsHoveredOn:Z}=useContext(SidebarItemWithSubmenuContext),G=()=>{Z(!1)},H=useResolvedPath(d!=null?d:""),ie=useLocation();let ee=isLocationMatch(ie,H);const[ve,Te]=useState(!1),Me=()=>{Te(!ve)};return v!==void 0?(v.some(lt=>{const $t=resolvePath(lt.to);return ee=isLocationMatch(ie,$t),ee}),React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:o,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:Me,onTouchStart:lt=>lt.stopPropagation(),className:classnames(P.item,ee?P.selected:void 0)},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},o,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)),ve?React.createElement(ArrowDropUpIcon,{className:P.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:P.dropdownArrow}))),v&&ve&&React.createElement("div",{className:P.dropdown},v.map((lt,$t)=>React.createElement(Tooltip,{key:$t,title:lt.title,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:lt.to,underline:"none",className:P.dropdownItem,onClick:G,onTouchStart:Kt=>Kt.stopPropagation()},React.createElement(Typography,{className:P.textContent},lt.title))))))):React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:o,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:d,underline:"none",className:classnames(P.item,ee?P.selected:void 0),onClick:G,onTouchStart:lt=>lt.stopPropagation()},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},o,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)))))},ds=(0,f.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:o=>{var l,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:o.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:o.submenuConfig.drawerWidthClosed,transitionDelay:`${o.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:o=>({width:o.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),fs=n=>{const{isOpen:o}=mo(),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(Kn),p=o?l.drawerWidthOpen:l.drawerWidthClosed,v=ds({left:p,submenuConfig:d}),{isHoveredOn:P}=(0,t.useContext)(wo),[Z,G]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{G(P)},[P]),t.createElement("div",{className:E()(v.drawer,{[v.drawerOpen]:Z})},t.createElement(Xe.Z,{variant:"h5",className:v.title},n.title),n.children)};var _r=e(76600),ms=e(26739),Xo=e(98989),hs=e(59797),gs=e(83543);const ps=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Tl=()=>{const n=ps();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 bl=null;const ys=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Pl=()=>{const n=ys();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 Il=null;const Es=n=>(0,f.Z)(o=>{var l,d,p,v;return{root:{color:o.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[o.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(l=o.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(v=(p=o.palette.navigation.navItem)==null?void 0:p.hoverBackground)!=null?v:"#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 eo(n){return(0,t.useMemo)(()=>Es(n),[n])()}const vs=(n,o)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!d){if(v!=null&&v.length){v.forEach(({to:P})=>d=d||Qo(o,(0,Zn.i3)(P)));return}p&&(d=Qo(o,(0,Zn.i3)(p)))}}),d},[o.pathname]);function qo(n){return n.to===void 0}const As=t.createElement(fs).type,Rs=t.forwardRef(function({to:o,end:l,style:d,className:p,activeStyle:v,caseSensitive:P,activeClassName:Z="active","aria-current":G="page",...H},ie){let{pathname:ee}=(0,Zn.TH)(),{pathname:ve}=(0,Zn.WU)(o);P||(ee=ee.toLocaleLowerCase("en-US"),ve=ve.toLocaleLowerCase("en-US"));let Te=ee===ve;!Te&&!l&&(Te=ee.startsWith(`${ve}/`));const Me=Te?G:void 0;return t.createElement(b.rU,{...H,to:o,ref:ie,"aria-current":Me,style:{...d,...Te?v:void 0},className:E()([p,Te?Z:void 0])})}),_o=(0,t.forwardRef)((n,o)=>{const{icon:l,text:d,hasNotifications:p=!1,hasSubmenu:v=!1,disableHighlight:P=!1,onClick:Z,children:G,className:H,...ie}=n,{sidebarConfig:ee}=(0,t.useContext)(Kn),ve=eo(ee),{isOpen:Te}=mo(),Me=!Te&&v?{display:"flex",marginLeft:"24px"}:{},lt=t.createElement("div",{style:Me},t.createElement(l,{fontSize:"small"}),!Te&&v?t.createElement(Xo.Z,null):t.createElement(t.Fragment,null)),$t=t.createElement(ms.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:E()({[ve.closedItemIcon]:!Te})},lt),Kt=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ve.iconContainer},$t),d&&t.createElement(Xe.Z,{variant:"subtitle2",className:ve.label},d),t.createElement("div",{className:ve.secondaryAction},G)),_t=Te?Kt:$t,Ht={onClick:Z,className:E()(H,ve.root,Te?ve.open:ve.closed,qo(n)&&ve.buttonItem,{[ve.highlightable]:!P})};return qo(n)?t.createElement("button",{"aria-label":d,...Ht,ref:o},_t):t.createElement(Rs,{...Ht,activeClassName:ve.selected,to:n.to?n.to:"",ref:o,"aria-label":d||n.to,...ie},_t)}),Ss=({children:n,...o})=>{const{sidebarConfig:l}=(0,t.useContext)(Kn),d=eo(l),[p,v]=(0,t.useState)(!1),P=(0,Zn.TH)(),Z=vs(n,P),G=(0,mt.Z)(ve=>ve.breakpoints.down("sm")),H=()=>{v(!0)},ie=()=>{v(!1)},ee=()=>G?p?t.createElement(hs.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(gs.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(Xo.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(wo.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:ie,onTouchStart:p?ie:H,onMouseEnter:H,className:E()(p&&d.highlighted)},t.createElement(_o,{hasSubmenu:!0,className:Z?d.selected:"",...o},ee()),p&&n))},ea=(0,t.forwardRef)((n,o)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===As));return l?t.createElement(Ss,{...n},l):t.createElement(_o,{...n,ref:o})});function Ll(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[l,d]=useState(""),p=eo(o),v=n.icon?n.icon:SearchIcon,P=()=>{n.onSearch(l),d("")},Z=ee=>{ee.key==="Enter"&&(ee.preventDefault(),P())},G=ee=>{d(ee.target.value)},H=ee=>{ee.preventDefault(),ee.stopPropagation()},ie=ee=>{P(),ee.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(ea,{icon:v,to:n.to,onClick:ie,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:H,onChange:G,onKeyDown:Z,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const Ol=(0,_r.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),xl=(0,_r.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),Cs=(0,_r.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),Ts=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),Dl=(0,_r.Z)("div")(({theme:n})=>{const o=Ts(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),Fl=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),o=eo(n),{isOpen:l,setOpen:d}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{d(!l)};return React.createElement("button",{onClick:v,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:o.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},bs=(0,f.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 Ps(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),l=bs({sidebarConfig:o}),{text:d,onClose:p}=n,v=()=>p();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:v,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const ta=n=>{const{text:o,onDismiss:l}=n,[d,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(Ps,{text:o,onClose:v}))},Is=null,Ls="And your recently viewed plugins will pop up here!";function Bl(n){const{isOpen:o}=useSidebarOpenState(),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:P}=d!=null?d:{},Z=()=>{p(H=>({...l,...H,starredItemsDismissed:!0}))},G=()=>{p(H=>({...l,...H,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!v&&React.createElement(React.Fragment,null,React.createElement(ta,{text:Is,onDismiss:Z}),React.createElement(SidebarDivider,null)),!P&&React.createElement(ta,{text:Ls,onDismiss:G})):null}const Os=(0,f.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function na(n){const{className:o,stretch:l,noPadding:d,children:p,...v}=n,{contentRef:P}=Wo(),Z=Os();return t.createElement("article",{ref:P,tabIndex:-1,...v,className:E()(Z.root,o,{[Z.stretch]:l,[Z.noPadding]:d})},p)}var xs=e(6487),Ds=e(99152);const Fs=(0,f.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3),minWidth:0},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 ra(n){const{tabs:o,onChange:l,selectedIndex:d}=n,[p,v]=(0,t.useState)(d!=null?d:0),P=Fs(),Z=(0,t.useCallback)((G,H)=>{d===void 0&&v(H),l&&d!==H&&l(H)},[d,l]);return(0,t.useEffect)(()=>{d!==void 0&&v(d)},[d]),t.createElement("div",{className:P.tabsWrapper},t.createElement(Ds.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:Z,value:p},o.map((G,H)=>t.createElement(xs.Z,{...G.tabProps,"data-testid":`header-tab-${H}`,label:G.label,key:G.id,value:H,className:P.defaultTab,classes:{selected:P.selected,root:P.tabRoot}}))))}function Bs(n){var Z,G,H;const o=(0,Zn.UO)(),d=n.map(({path:ie,children:ee})=>({caseSensitive:!1,path:`${ie}/*`,element:ee})).sort((ie,ee)=>ee.path.replace(/\/\*$/,"").localeCompare(ie.path.replace(/\/\*$/,""))),p=(Z=(0,Zn.V$)(d))!=null?Z:n[0].children,[v]=(G=(0,Zn.fp)(d,`/${o["*"]}`))!=null?G:[],P=v?n.findIndex(ie=>`${ie.path}/*`===v.route.path):0;return{index:P===-1?0:P,element:p,route:(H=n[P])!=null?H:n[0]}}function oa(n){const{routes:o}=n,l=(0,Zn.s0)(),{index:d,route:p,element:v}=Bs(o),P=(0,t.useMemo)(()=>o.map(G=>({id:G.path,label:G.title,tabProps:G.tabProps})),[o]),Z=G=>l(o[G].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(ra,{tabs:P,selectedIndex:d,onChange:Z}),t.createElement(na,null,t.createElement(fo.q,{title:p.title}),v))}const ho=()=>null;(0,c.attachComponentData)(ho,"core.gatherMountPoints",!0);function aa(n){const o=t.createElement(ho,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(l=>{if(!(0,t.isValidElement)(l))return[];if(l.type===t.Fragment)return aa(l.props.children);if(l.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:v,tabProps:P}=l.props;return[{path:d,title:p,children:v,tabProps:P}]})}function Ms(n){const o=aa(n.children);return t.createElement(oa,{routes:o})}Ms.Route=ho;const ws=(0,f.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function $s(n){const{value:o,subvalue:l}=n,d=ws();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},o),t.createElement("div",{className:d.subvalue},l))}var Us=e(21070),Ns=e(90324),Zs=e(98281),zs=e(48049),sa=e(51209),ia=e(33375),Ws=e(44233),Hs=e(27604),go=e(36444),js=e(37971),Vs=e(59709),Gs=e(17373),Ks=e(3702),ks=e(93111),to=e(67222);const Ys=(0,f.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"}),Js=n=>{var G;const o=Ys(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[v,P]=(0,t.useState)(!1),Z=()=>{p({}),P(H=>!H)};return(0,t.useEffect)(()=>{l(d)},[d,l]),t.createElement("div",{className:o.root},t.createElement("div",{className:o.header},t.createElement("div",{className:o.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:Z},"Clear all")),t.createElement("div",{className:o.filters},((G=n.filters)==null?void 0:G.length)&&n.filters.map(H=>t.createElement(rt,{triggerReset:v,key:H.element.label,...H.element,selected:d[H.element.label],onChange:ie=>p({...d,[H.element.label]:ie})}))))},Qs={Add:(0,t.forwardRef)((n,o)=>t.createElement(Us.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(Zs.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(ia.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Ws.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(sa.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Hs.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Ks.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(go.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(js.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(Vs.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(sa.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(zs.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(ia.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(go.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ns.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Gs.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(ks.Z,{...n,ref:o}))};function la(n,o){const l=o.split(".");let d=n[l[0]];for(let p=1;p<l.length;++p){if(d===void 0)return d;const v=l[p];d=d[v]}return d}const Xs=(0,gn.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"})(to.W$),ca=(0,gn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(to.UW),_s=(0,f.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),ei=(0,f.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ti(n,o){return n.map(l=>{const d={};let p=l.cellStyle||{};if(l.highlight)if(d.color=o.palette.textContrast,typeof p=="object")p.fontWeight=o.typography.fontWeightBold;else{const v=p;p=(P,Z,G)=>({...v(P,Z,G),fontWeight:o.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function ni(n,o){return(0,O.transform)(n,(l,d,p)=>{(0,O.isEqual)(d,o[p])||(l[p]=d)})}const ua={search:"",filtersOpen:!1,filters:{}};function ri(n){const{toolbarRef:o,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:v}=n,P=_s(),Z=(0,t.useCallback)(G=>{n.onSearchChanged(G),l(G)},[n,l]);return d?t.createElement("div",{className:P.root},t.createElement("div",{className:P.root},t.createElement(De.Z,{onClick:v,"aria-label":"filter list"},t.createElement(go.Z,null)),t.createElement(Xe.Z,{className:P.title},"Filters (",p,")")),t.createElement(ca,{...n,ref:o,onSearchChanged:Z})):t.createElement(ca,{...n,ref:o,onSearchChanged:Z})}function oi(n){const{data:o,columns:l,options:d,title:p,subtitle:v,filters:P,initialState:Z,emptyContent:G,onStateChange:H,components:ie,...ee}=n,ve=ei(),Te=(0,Se.Z)(),Me={...ua,...Z},[lt,$t]=(0,t.useState)(Me.filtersOpen),Kt=(0,t.useCallback)(()=>$t(un=>!un),[$t]),[_t,Ht]=(0,t.useState)(0),[Tt,rn]=(0,t.useState)(o),[Nt,or]=(0,t.useState)(Me.filters),kn=ti(l,Te),[qn,Ut]=(0,t.useState)(Me.search);(0,t.useEffect)(()=>{if(H){const un=ni({search:qn,filtersOpen:lt,filters:Nt},ua);H(un)}},[qn,lt,Nt,H]);const Tr={headerStyle:{textTransform:"uppercase"}},Kr=(0,t.useCallback)(un=>{var Pn;return(Pn=l.find(lr=>lr.title===un))==null?void 0:Pn.field},[l]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Nt){rn(o);return}const un=Object.values(Nt);if(o&&un.flat().length){const Pn=o.filter(lr=>!!Object.entries(Nt).filter(([,ar])=>!!ar.length).every(([ar,sn])=>{const In=la(lr,Kr(ar));return Array.isArray(In)&&Array.isArray(sn)?In.some(Pr=>sn.includes(Pr)):Array.isArray(In)?In.includes(sn):Array.isArray(sn)?sn.includes(In):In===sn}));rn(Pn)}else rn(o);Ht(un.flat().length)},[o,Nt,Kr]);const br=(un,Pn)=>{const lr=sn=>{const In=new Set,Pr=sr=>{sr!=null&&In.add(sr)};return Pn&&Pn.forEach(sr=>{const Ir=la(sr,Kr(sn));Array.isArray(Ir)?Ir.forEach(Pr):Pr(Ir)}),In},ar=sn=>({placeholder:"All results",label:sn.column,multiple:sn.type==="multiple-select",items:[...lr(sn.column)].sort().map(In=>({label:In,value:In}))});return un.map(sn=>({type:sn.type,element:ar(sn)}))},ro=!!(P!=null&&P.length),Ao=(0,t.useCallback)(un=>t.createElement(ri,{setSearch:Ut,hasFilters:ro,selectedFiltersLength:_t,toggleFilters:Kt,...un}),[Kt,ro,_t,Ut]),oo=typeof o!="function"&&o.length===0,ao=l.length,Ro=(0,t.useCallback)(un=>G&&oo?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:ao},G))):t.createElement(to.os,{...un}),[oo,G,ao]);return t.createElement("div",{className:ve.root},lt&&o&&typeof o!="function"&&(P==null?void 0:P.length)&&t.createElement(Js,{filters:br(P,o),selectedFilters:Nt,onChangeFilters:or}),t.createElement(to.ZP,{components:{Header:Xs,Toolbar:Ao,Body:Ro,...ie},options:{...Tr,...d},columns:kn,icons:Qs,title:t.createElement(t.Fragment,null,t.createElement(Xe.Z,{variant:"h5",component:"h2"},p),v&&t.createElement(Xe.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof o=="function"?o:Tt,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ee}))}const Ml=n=>{const{children:o,value:l,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},l===d&&React.createElement(Box,{p:3},o))},ai=(0,f.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"}),wl=n=>{const o=ai(n),{ariaLabel:l,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},si=(n,o)=>o?n?"20px":"0":"40px",ii=(0,f.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>si(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),$l=n=>{const o=ii(n),{isFirstNav:l,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...p})},li=(0,f.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Ul=n=>{const o=li(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ci=(0,f.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 Nl(n){const{tabs:o}=n,l=ci(),[d,p]=useState([0,0]),[v,P]=useState(0),[Z,G]=useState(0),[H,ie]=useState([[]]),ee=useRef(),{width:ve}=useWindowSize(),Te=(_t,Ht)=>{p([v,Ht])},Me=()=>{P(v-1)},lt=()=>{P(v+1)},$t=()=>v+1<H.length;useEffect(()=>{const Ht=v===0?1:2,Tt=ee.current.offsetWidth-20-Ht*30,rn=d[0]*Z+d[1],Nt=Math.floor(Tt/170);G(Nt),ie(chunkArray(o,Nt)),p([Math.floor(rn/Nt),rn%Nt])},[ve,o]);const Kt=v===d[0]?d[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:ee,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Kt,onChange:Te,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:Me,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[v].map((_t,Ht)=>React.createElement(StyledTab,{value:Ht,isFirstIndex:Ht===0,isFirstNav:v===0,key:Ht,icon:_t.icon||void 0,label:_t.label||void 0})),$t()&&React.createElement(StyledIcon,{isNext:!0,onClick:lt,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Kt!==!1?H[v].map((_t,Ht)=>React.createElement(TabPanel,{key:Ht,value:Ht,index:Kt},_t.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var Zl=e(44311);function ui(n,o){const l=n[n.length-1];if(!!l)return l>=.9?o.palette.status.ok:l>=.5?o.palette.status.warning:o.palette.status.error}function zl(n){var l;const o=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(l=n.color)!=null?l:ui(n.data,o)})):null}const di=n=>(0,f.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"}),fi=({title:n="Unknown page",className:o})=>t.createElement(Xe.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function mi(n){const{description:o,title:l,titleComponent:d=void 0,children:p,textAlign:v="left"}=n,P=di({textAlign:v})(),Z=d||t.createElement(fi,{title:l,className:P.title});return t.createElement(t.Fragment,null,t.createElement(fo.q,{title:l}),t.createElement("div",{className:P.container},t.createElement("div",{className:P.leftItemsBox},Z,o&&t.createElement(Xe.Z,{className:P.description,variant:"body2"},o)),t.createElement("div",{className:P.rightItemsBox},p)))}var hi=e.p+"static/mic-drop.fe3ef4d0..svg";const gi=(0,f.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"}),pi=()=>{const n=gi();return t.createElement("img",{src:hi,className:n.micDrop,alt:"Girl dropping mic from her hands"})},yi=(0,f.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 Ei(n){const{status:o,statusMessage:l,additionalInfo:d,supportUrl:p}=n,v=yi(),P=(0,Zn.s0)(),Z=Do();return t.createElement(Zt.Z,{container:!0,spacing:0,className:v.container},t.createElement(pi,null),t.createElement(Zt.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Xe.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",o,": ",l),t.createElement(Xe.Z,{variant:"body1",className:v.subtitle},d),t.createElement(Xe.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(Xe.Z,{variant:"h6"},t.createElement(K,{to:"#","data-testid":"go-back-link",onClick:()=>P(-1)},"Go back"),"... or please"," ",t.createElement(K,{to:p||Z.url},"contact support")," if you think this is a bug.")))}var vi=e(16173);const Ai=(0,gn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Xe.Z),po=(0,gn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(xn.Z);function Ri(n){const{children:o,...l}=n,[d,p]=t.useState(null),v=t.Children.toArray(o),[P,Z,...G]=v,H=G.length?G.pop():v[v.length-1],ie=v.length>3,ee=Me=>{p(Me.currentTarget)},ve=()=>{p(null)},Te=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(vi.Z,{"aria-label":"breadcrumb",...l},v.length>1&&t.createElement(po,{clone:!0},P),v.length>2&&t.createElement(po,{clone:!0},Z),ie&&t.createElement(Ai,{onClick:ee},"..."),t.createElement(xn.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Io.ZP,{open:Te,anchorEl:d,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(U.Z,null,G.map((Me,lt)=>t.createElement(ae.Z,{key:lt,button:!0},t.createElement(po,{clone:!0},Me))))))}const Si=(0,f.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",alignItems:"center"},title:{color:n.page.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.page.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.page.fontColor},breadcrumb:{color:n.page.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"}),Ci=({type:n,typeLink:o,classes:l,pageTitle:d})=>n?o?t.createElement(Ri,{className:l.breadcrumb},t.createElement(K,{to:o},n),t.createElement(Xe.Z,null,d)):t.createElement(Xe.Z,{className:l.type},n):null,Ti=({pageTitle:n,classes:o,tooltip:l})=>{const d=t.createElement(Xe.Z,{className:o.title,variant:"h1"},n);return l?t.createElement(Fe.ZP,{title:l,placement:"top-start"},d):d},bi=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(Xe.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function da(n){const{children:o,pageTitleOverride:l,style:d,subtitle:p,title:v,tooltip:P,type:Z,typeLink:G}=n,H=Si(),ee=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",ve=l||v,Te=v||l,Me=`${ve} | %s | ${ee}`,lt=`${ve} | ${ee}`;return t.createElement(t.Fragment,null,t.createElement(fo.q,{titleTemplate:Me,defaultTitle:lt}),t.createElement("header",{style:d,className:H.header},t.createElement(xn.Z,{className:H.leftItemsBox},t.createElement(Ci,{classes:H,type:Z,typeLink:G,pageTitle:Te}),t.createElement(Ti,{classes:H,pageTitle:Te,tooltip:P}),t.createElement(bi,{classes:H,subtitle:p})),t.createElement(Zt.Z,{container:!0,className:H.rightItemsBox,spacing:4},o)))}const Pi=(0,f.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"}),Ii=({value:n,className:o})=>t.createElement(Xe.Z,{className:o},n);function Li(n){const{label:o,value:l,url:d}=n,p=Pi(),v=t.createElement(Ii,{className:p.value,value:l||"<Unknown>"});return t.createElement(Zt.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Xe.Z,{className:p.label},o),d?t.createElement(K,{to:d},v):v))}const Oi={hour:"2-digit",minute:"2-digit"};function fa(n){const o=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let P=v.getString("label");const Z={timeZone:v.getString("timezone"),...Oi};try{new Date().toLocaleString(l,Z)}catch{console.warn(`The timezone ${Z.timeZone} is invalid. Defaulting to GMT`),Z.timeZone="GMT",P="GMT"}const G=o.toLocaleTimeString(l,Z);d.push({time:G,label:P})}return d}function Wl(n){const o=useApi(configApiRef),l=[],[d,p]=React.useState(l);return React.useEffect(()=>{p(fa(o));const v=setInterval(()=>{p(fa(o))},1e3);return()=>{clearInterval(v)}},[o]),d.length!==0?React.createElement(React.Fragment,null,d.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const xi=n=>(0,a.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),Di=(0,f.Z)(xi,{name:"BackstageItemCardHeader"});function Fi(n){const{title:o,subtitle:l,children:d}=n,p=Di(n);return t.createElement("div",{className:p.root},l&&t.createElement(Xe.Z,{variant:"subtitle2",component:"h3"},l),o&&t.createElement(Xe.Z,{variant:"h6",component:"h4"},o),d)}function Hl(n){const{description:o,tags:l,title:d,type:p,subtitle:v,label:P,onClick:Z,href:G}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:v||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((H,ie)=>React.createElement(Chip,{size:"small",label:H,key:ie}))):null,o),React.createElement(CardActions,null,!G&&React.createElement(Button,{to:"#",onClick:Z,color:"primary"},P),G&&React.createElement(Button,{to:G,color:"primary"},P)))}const Bi=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Mi=(0,f.Z)(Bi,{name:"BackstageItemCardGrid"});function wi(n){const{children:o,...l}=n,d=Mi(l);return t.createElement("div",{className:d.root,...l},o)}var $i=e(41547);const Ui=(0,f.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 ma(n){const{themeId:o,children:l}=n,{isMobile:d}=Vr(),p=Ui({isMobile:d});return t.createElement($i.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:o})})},t.createElement("main",{className:p.root},l))}function Ni(n){const{themeId:o,children:l,...d}=n;return t.createElement(ma,{themeId:o},t.createElement(da,{...d}),l)}var bn=e(30195);const jl=bn.z.object({providerInfo:bn.z.object({}).catchall(bn.z.unknown()).optional(),profile:bn.z.object({email:bn.z.string().optional(),displayName:bn.z.string().optional(),picture:bn.z.string().optional()}),backstageIdentity:bn.z.object({token:bn.z.string(),identity:bn.z.object({type:bn.z.literal("user"),userEntityRef:bn.z.string(),ownershipEntityRefs:bn.z.array(bn.z.string())})})}),ha={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Zi(n){const o=new Date(Date.now()+ha.defaultTokenExpiryMillis);if(!n)return o;const[l,d,p]=n.split("."),v=JSON.parse(atob(d));return typeof v.exp!="number"?o:new Date(v.exp*1e3-ha.tokenExpiryMarginMillis)}class Vl{constructor(o){X(this,"options");X(this,"abortController");X(this,"state");this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),l=o.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!d)throw new TypeError(`Invalid user entity reference "${l}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const o=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Zi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:l,previous:o},l}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!l.ok)throw await ResponseError.fromResponse(l);return proxiedSessionSchema.parse(await l.json())}}const Gl=n=>{const o=useApi(discoveryApiRef),[{status:l,error:d},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await v.start(),n.onSignInSuccess(v)});return useMountEffect(p),l==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},zi=(0,f.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),yo=({children:n})=>{const o=zi();return t.createElement(Zt.Z,{component:"li",item:!0,classes:o},n)};class Eo{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 Wi(n){const[o,l,d]=n.split(".");return JSON.parse(atob(l))}class vo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new vo(o)}async getIdToken(){var o,l;return(l=(o=this.result).getIdToken)==null?void 0:l.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:d}=Wi(o);return{type:"user",userEntityRef:l,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var l,d;return{token:await((d=(l=this.result).getIdToken)==null?void 0:d.call(l))}}async signOut(){var o,l;return(l=(o=this.result).signOut)==null?void 0:l.call(o)}}class Gr{constructor(o,l,d){X(this,"profilePromise");this.identity=o,this.authApi=l,this.profile=d}static createGuest(){return new Eo}static fromLegacy(o){return vo.fromResult(o)}static create(o){return new Gr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!l)throw new TypeError(`Invalid user entity reference "${o}"`);return l[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Hi={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:l,title:d,message:p}=n,v=(0,c.useApi)(l),P=(0,c.useApi)(c.errorApiRef),Z=async()=>{try{const G=await v.getBackstageIdentity({instantPopup:!0});if(!G)throw new Error(`The ${d} provider is not configured to support sign-in`);const H=await v.getProfile();o(Gr.create({identity:G.identity,profile:H,authApi:v}))}catch(G){P.post(new tr.SP("Login failed",G))}};return t.createElement(yo,null,t.createElement(rr,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:Z},"Sign In")},t.createElement(Xe.Z,{variant:"body1"},p)))},loader:async(n,o)=>{const l=n.get(o),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const p=await l.getProfile();return Gr.create({identity:d.identity,profile:p,authApi:l})}},ji={Component:({onSignInSuccess:n})=>t.createElement(yo,null,t.createElement(rr,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new Eo)},"Enter")},t.createElement(Xe.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new Eo};var Vi=e(63955),ga=e(86619),pa=e(74828),Gi=e(45455),Ki=e.n(Gi);const ki=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Yi=(0,f.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),ya=n=>{const{ref:o,...l}=n;return{inputRef:o,...l}},Ji={Component:({onSignInSuccess:n})=>{const o=Yi(),{register:l,handleSubmit:d,formState:p}=(0,Vi.cI)({mode:"onChange"}),{errors:v}=p,P=({userId:Z})=>{n(Gr.fromLegacy({userId:Z,profile:{email:`${Z}@example.com`}}))};return t.createElement(yo,null,t.createElement(rr,{title:"Custom User",variant:"fullHeight"},t.createElement(Xe.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:o.form,onSubmit:d(P)},t.createElement(A.Z,null,t.createElement(ga.Z,{...ya(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&t.createElement(pa.Z,{error:!0},v.userId.message)),t.createElement(A.Z,null,t.createElement(ga.Z,{...ya(l("idToken",{required:!1,validate:Z=>!Z||ki.test(Z)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(v.idToken)}),v.idToken&&t.createElement(pa.Z,{error:!0},v.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(p!=null&&p.isDirty)||!Ki()(v)},"Continue"))))},loader:async()=>{}},no="@backstage/core:SignInPage:provider",Ea={guest:ji,custom:Ji,common:Hi};function va(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function ql(n){return n.reduce((l,d)=>{if(typeof d=="string")return va(d,l),l[d]={components:Ea[d],id:d},l;const{id:p}=d;return va(p,l),l[p]={components:Ea.common,id:p,config:d},l},{})}const _l=(n,o)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,v]=useState(!0),P=useCallback(G=>{o(IdentityApiSignOutProxy.from({identityApi:G,signOut:async()=>{var H;localStorage.removeItem(no),await((H=G.signOut)==null?void 0:H.call(G))}}))},[o]);useLayoutEffect(()=>{var ee;if(!p)return;const G=localStorage.getItem(no);if(G===null){v(!1);return}const H=n[G];if(!H){v(!1);return}let ie=!1;return H.components.loader(d,(ee=H.config)==null?void 0:ee.apiRef).then(ve=>{ie||(ve?P(ve):v(!1))}).catch(ve=>{ie||(localStorage.removeItem(no),l.post(ve),v(!1))}),()=>{ie=!0}},[p,l,o,d,n,P]);const Z=useMemo(()=>Object.keys(n).map(G=>{const H=n[G],{Component:ie}=H.components,ee=ve=>{localStorage.setItem(no,H.id),P(ve)};return React.createElement(ie,{key:H.id,config:H.config,onSignInSuccess:ee})}),[n,P]);return[p,Z]},Qi=({onSignInSuccess:n,providers:o=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),v=useStyles(),P=getSignInProviders(o),[Z,G]=useSignInProviders(P,n);return Z?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:v},G)))},Xi=({provider:n,auto:o,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[P,Z]=useState(),[G,H]=useState(!1),ie=async({checkExisting:ee,showPopup:ve})=>{try{let Te;if(ee&&(Te=await p.getBackstageIdentity({optional:!0})),!Te&&(ve||o)&&(H(!0),Te=await p.getBackstageIdentity({instantPopup:!0}),!Te))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Te){H(!0);return}const Me=await p.getProfile();l(UserIdentity.create({identity:Te.identity,authApi:p,profile:Me}))}catch(Te){Z(Te),H(!0)}};return useMountEffect(()=>ie({checkExisting:!0})),G?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:v.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:()=>{ie({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),P&&P.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},P.message)))))):React.createElement(Progress,null)};function ec(n){return"provider"in n?React.createElement(Xi,{...n}):React.createElement(Qi,{...n})}const qi=(0,f.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"}),_i=(0,gn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(vr.Z);function tc(n){const{slackChannel:o,errorBoundaryProps:l,children:d,title:p,deepLink:v,value:P,onChange:Z}=n,G=qi(),[H,ie]=useState(0),ee=Z||((Me,lt)=>ie(lt));let ve;P?React.Children.map(d,Me=>{React.isValidElement(Me)&&(Me==null?void 0:Me.props.value)===P&&(ve=Me==null?void 0:Me.props.children)}):React.Children.map(d,(Me,lt)=>{React.isValidElement(Me)&<===H&&(ve=Me==null?void 0:Me.props.children)});const Te=l||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Te},p&&React.createElement(_i,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:G,value:P||H,onChange:ee},d),React.createElement(Divider,null),React.createElement(CardContent,null,ve),v&&React.createElement(BottomLink,{...v})))}const el=(0,f.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 nc(n){const{children:o,...l}=n,d=el();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},24877:function(te,s,e){"use strict";e.d(s,{f:function(){return R},z:function(){return y}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),i=()=>{const g=(0,t.useContext)(c);if(g===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const E=g.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E},R=g=>{const{attributes:E,children:S}=g,O={...i(),...E},$=(0,r.EI)({1:O});return t.createElement(c.Provider,{value:$},S)};function f(g,E){const S=b=>React.createElement(R,{attributes:E},React.createElement(g,{...b}));return S.displayName=`WithAnalyticsContext(${g.displayName||g.name||"Component"})`,S}var a=e(27399);class u{constructor(E,S={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=E,this.context=S}setContext(E){this.context=E}captureEvent(E,S,{value:b,attributes:O}={}){try{this.analyticsApi.captureEvent({action:E,subject:S,value:b,attributes:O,context:this.context})}catch($){console.warn("Error during analytics event capture. %o",$)}}}function m(){try{return(0,a.useApi)(a.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function y(){const g=(0,t.useRef)(null),E=i(),S=m();function b(){return g.current===null&&(g.current=new u(S)),g.current}const O=b();return O.setContext(E),O}},39135:function(te,s,e){"use strict";e.d(s,{CL:function(){return B},sM:function(){return t},$v:function(){return g},v_:function(){return E},hg:function(){return S},uB:function(){return y},bq:function(){return m},Ds:function(){return b},NW:function(){return O},VE:function(){return $},W0:function(){return F},gP:function(){return D},F4:function(){return i},ux:function(){return f},Kp:function(){return c},$4:function(){return x},p_:function(){return a},ZM:function(){return M},D:function(){return R},gW:function(){return u},E6:function(){return K}});var r=e(86833),t;(function(re){const le="SignedIn";re.SignedIn=le;const Se="SignedOut";re.SignedOut=Se})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),i=(0,r.createApiRef)({id:"core.auth.github"}),R=(0,r.createApiRef)({id:"core.auth.okta"}),f=(0,r.createApiRef)({id:"core.auth.gitlab"}),a=(0,r.createApiRef)({id:"core.auth.microsoft"}),u=(0,r.createApiRef)({id:"core.auth.onelogin"}),m=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),g=(0,r.createApiRef)({id:"core.alert"}),E=(0,r.createApiRef)({id:"core.analytics"}),S=(0,r.createApiRef)({id:"core.apptheme"}),b=(0,r.createApiRef)({id:"core.config"}),O=(0,r.createApiRef)({id:"core.discovery"}),$=(0,r.createApiRef)({id:"core.error"});var B;(function(re){re[re.None=0]="None";const Se=1;re[re.Active=Se]="Active"})(B||(B={}));const F=(0,r.createApiRef)({id:"core.featureflags"}),D=(0,r.createApiRef)({id:"core.fetch"}),x=(0,r.createApiRef)({id:"core.identity"}),M=(0,r.createApiRef)({id:"core.oauthrequest"}),K=(0,r.createApiRef)({id:"core.storage"})},27399:function(te,s,e){"use strict";e.d(s,{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(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(s,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return r.usePluginOptions}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(te,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(i){if(this.config=i,!i.id.split(".").flatMap(f=>f.split("-")).every(f=>f.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${i.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(c){return new r(c)}},25182:function(te,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(te,s,e){"use strict";e.d(s,{createApiFactory:function(){return R.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),c=e(16362),i=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return c.usePluginOptions}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var R=e(25182)},16362:function(){},5761:function(te,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return i}});var r=e(2784),t=e(76241);function c(){const f=(0,t.Vt)("api-context");if(!f)throw new Error("API context is not available");const a=f.atVersion(1);if(!a)throw new Error("ApiContext v1 not available");return a}function i(f){const u=c().get(f);if(!u)throw new Error(`No implementation available for ${f}`);return u}function R(f){return function(u){const m=g=>{const E=c(),S={};for(const b in f)if(f.hasOwnProperty(b)){const O=f[b],$=E.get(O);if(!$)throw new Error(`No implementation available for ${O}`);S[b]=$}return React.createElement(u,{...g,...S})},y=u.displayName||u.name||"Component";return m.displayName=`withApis(${y})`,m}}},31311:function(te,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(te,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const c=(0,r.Vt)("app-context");if(!c)throw new Error("App context is not available");const i=c.atVersion(1);if(!i)throw new Error("AppContext v1 not available");return i}},74181:function(te,s,e){"use strict";e.d(s,{R5:function(){return i},CO:function(){return S},YO:function(){return b},P4:function(){return E},IY:function(){return R},vJ:function(){return F}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function i(D,x,M){var le;const K=D;let re=(le=K[c])!=null?le:t.get(D);if(re||(re={map:new Map},Object.defineProperty(K,c,{enumerable:!1,configurable:!0,writable:!1,value:re}),t.set(D,re)),re.map.has(x)){const Se=D.displayName||D.name;throw new Error(`Attempted to attach duplicate data "${x}" to component "${Se}"`)}re.map.set(x,M)}function R(D,x){var re;if(!D)return;const M=D.type;if(!M)return;const K=(re=M[c])!=null?re:t.get(M);if(!!K)return K.map.get(x)}var f=e(2784),a=e(24877),u=e(31311),m=e(82772);class y extends f.Component{constructor(){super(...arguments);X(this,"state",{error:void 0});X(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(M){return{error:M}}render(){const{error:M}=this.state,{app:K,plugin:re}=this.props,{ErrorBoundaryFallback:le}=K.getComponents();return M?f.createElement(le,{error:M,resetError:this.handleErrorReset,plugin:re}):this.props.children}}var g=e(40338);function E(D){const{component:x,mountPoint:M,name:K}=D;return b({component:{lazy:()=>x().then(re=>{const le=De=>{try{(0,m.tg)(M)}catch(Fe){if(typeof Fe=="object"&&Fe!==null){const{message:He}=Fe;if(typeof He=="string"&&He.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${M} 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 Fe}return f.createElement(re,{...De})},Se=K||re.displayName||re.name||"LazyComponent";return le.displayName=`RoutableExtension(${Se})`,le},re=>Se=>{const De=(0,u.useApp)(),{BootErrorPage:Fe}=De.getComponents();return f.createElement(Fe,{step:"load-chunk",error:re})})},data:{"core.mountPoint":M},name:K})}function S(D){const{component:x,name:M}=D;return b({component:x,name:M})}function b(D){const{data:x={},name:M}=D;M||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let K;if("lazy"in D.component){const le=D.component.lazy;K=(0,f.lazy)(()=>le().then(Se=>({default:Se})))}else K=D.component.sync;const re=M||K.displayName||K.name||"Component";return{expose(le){const Se=De=>{const Fe=(0,u.useApp)(),{Progress:He}=Fe.getComponents(),Ae=x==null?void 0:x["core.mountPoint"];return f.createElement(f.Suspense,{fallback:f.createElement(He,null)},f.createElement(y,{app:Fe,plugin:le},f.createElement(a.f,{attributes:{pluginId:le.getId(),...M&&{extension:M},...Ae&&{routeRef:Ae.id}}},f.createElement(g.o,{plugin:le},f.createElement(K,{...De})))))};i(Se,"core.plugin",le);for(const[De,Fe]of Object.entries(x))i(Se,De,Fe);return Se.displayName=`Extension(${re})`,Se}}}var O=e(27399);function $(D,x,M,K){return f.Children.toArray(D).flatMap(re=>{if(!(0,f.isValidElement)(re))return[];if(re.type===f.Fragment)return $(re.props.children,x,M,K);if(R(re,"core.featureFlagged")){const le=re.props;return("with"in le?x.isActive(le.with):!x.isActive(le.without))?$(re.props.children,x,M,K):[]}if(M===void 0||M(re))return[re];if(K)throw new Error(K);return $(re.props.children,x,M,K)})}class B{constructor(x,M){this.node=x,this.featureFlagsApi=M}selectByComponentData(x){const M=$(this.node,this.featureFlagsApi,K=>R(K,x.key)!==void 0,x.withStrictError);return new B(M,this.featureFlagsApi)}findComponentData(x){return $(this.node,this.featureFlagsApi,K=>R(K,x.key)!==void 0).map(K=>R(K,x.key)).filter(K=>K!==void 0)}getElements(){return $(this.node,this.featureFlagsApi)}}function F(D,x,M=[]){const K=(0,O.useApi)(O.featureFlagsApiRef),re=new B(D,K);return(0,f.useMemo)(()=>x(re),[D,...M])}},80274:function(){},36964:function(te,s,e){"use strict";e.d(s,{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 R.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return R.CO},createExternalRouteRef:function(){return m.x8},createPlugin:function(){return u.r},createReactExtension:function(){return R.YO},createRoutableExtension:function(){return R.P4},createRouteRef:function(){return m.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return R.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 i.useApp},useElementFilter:function(){return R.vJ},usePluginOptions:function(){return c.y},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(24877),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return t.usePluginOptions}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(40338),i=e(31311);e.o(i,"attachComponentData")&&e.d(s,{attachComponentData:function(){return i.attachComponentData}}),e.o(i,"createApiFactory")&&e.d(s,{createApiFactory:function(){return i.createApiFactory}}),e.o(i,"createApiRef")&&e.d(s,{createApiRef:function(){return i.createApiRef}}),e.o(i,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return i.createComponentExtension}}),e.o(i,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return i.createExternalRouteRef}}),e.o(i,"createPlugin")&&e.d(s,{createPlugin:function(){return i.createPlugin}}),e.o(i,"createReactExtension")&&e.d(s,{createReactExtension:function(){return i.createReactExtension}}),e.o(i,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return i.createRoutableExtension}}),e.o(i,"createRouteRef")&&e.d(s,{createRouteRef:function(){return i.createRouteRef}}),e.o(i,"getComponentData")&&e.d(s,{getComponentData:function(){return i.getComponentData}}),e.o(i,"useApi")&&e.d(s,{useApi:function(){return i.useApi}}),e.o(i,"useApiHolder")&&e.d(s,{useApiHolder:function(){return i.useApiHolder}}),e.o(i,"useElementFilter")&&e.d(s,{useElementFilter:function(){return i.useElementFilter}}),e.o(i,"useRouteRef")&&e.d(s,{useRouteRef:function(){return i.useRouteRef}}),e.o(i,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return i.useRouteRefParams}});var R=e(74181),f=e(80274),a=e.n(f);e.o(f,"createApiFactory")&&e.d(s,{createApiFactory:function(){return f.createApiFactory}}),e.o(f,"createApiRef")&&e.d(s,{createApiRef:function(){return f.createApiRef}}),e.o(f,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return f.createExternalRouteRef}}),e.o(f,"createPlugin")&&e.d(s,{createPlugin:function(){return f.createPlugin}}),e.o(f,"createRouteRef")&&e.d(s,{createRouteRef:function(){return f.createRouteRef}}),e.o(f,"useApi")&&e.d(s,{useApi:function(){return f.useApi}}),e.o(f,"useApiHolder")&&e.d(s,{useApiHolder:function(){return f.useApiHolder}}),e.o(f,"useRouteRef")&&e.d(s,{useRouteRef:function(){return f.useRouteRef}}),e.o(f,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return f.useRouteRefParams}});var u=e(96896),m=e(82772)},40338:function(te,s,e){"use strict";e.d(s,{o:function(){return i},y:function(){return R}});var r=e(76241),t=e(2784);const c="plugin-context",i=({children:f,plugin:a})=>{const{Provider:u}=(0,r.CT)(c);return t.createElement(u,{value:(0,r.EI)({1:{plugin:a}})},f)};function R(){const f=(0,r.Vt)(c);if(!f)throw new Error("Plugin Options context is not available");const a=f.atVersion(1);if(!a)throw new Error("Plugin Options v1 is not available");return a.plugin.getPluginOptions()}},96896:function(te,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(i){X(this,"options");this.config=i}getId(){return this.config.id}getApis(){var i;return(i=this.config.apis)!=null?i:[]}getFeatureFlags(){var i,R;return(R=(i=this.config.featureFlags)==null?void 0:i.slice())!=null?R:[]}get routes(){var i;return(i=this.config.routes)!=null?i:{}}get externalRoutes(){var i;return(i=this.config.externalRoutes)!=null?i:{}}provide(i){return i.expose(this)}__experimentalReconfigure(i){this.config.__experimentalConfigure&&(this.options=this.config.__experimentalConfigure(i))}getPluginOptions(){var i;return this.config.__experimentalConfigure&&!this.options&&(this.options=this.config.__experimentalConfigure()),(i=this.options)!=null?i:{}}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(te,s,e){var b,O,$;"use strict";e.d(s,{x8:function(){return m},NT:function(){return i},tg:function(){return E},Oi:function(){return S}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(F,D){X(this,b,"absolute");this.id=F,this.params=D}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}b=t;function i(B){var F;return new c(B.id,(F=B.params)!=null?F:[])}const R=/^\w+$/;class f{constructor(F,D,x,M){X(this,O,"sub");this.id=F,this.path=D,this.parent=x,this.params=M}toString(){return`routeRef{type=sub,id=${this.id}}`}}O=t;function a(B){const{id:F,path:D,parent:x}=B,M=D.split("/").filter(le=>le.startsWith(":")).map(le=>le.substring(1)),K=[...x.params,...M];if(x.params.some(le=>M.includes(le)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!D.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${D}'`);if(D.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${D}'`);for(const le of M)if(!R.test(le))throw new Error(`SubRouteRef path has invalid param, got '${le}'`);return new f(F,D,x,K)}class u{constructor(F,D,x){X(this,$,"external");this.id=F,this.params=D,this.optional=x}toString(){return`routeRef{type=external,id=${this.id}}`}}$=t;function m(B){var F;return new u(B.id,(F=B.params)!=null?F:[],Boolean(B.optional))}var y=e(2784),g=e(10289);function E(B){const F=(0,g.TH)(),D=(0,r.Vt)("routing-context");if(!D)throw new Error("Routing context is not available");const x=D.atVersion(1),M=(0,y.useMemo)(()=>x&&x.resolve(B,F),[x,B,F]);if(!D)throw new Error("useRouteRef used outside of routing context");if(!x)throw new Error("RoutingContext v1 not available");const K="optional"in B&&B.optional;if(!M&&!K)throw new Error(`No path for ${B}`);return M}function S(B){return(0,g.UO)()}},10179:function(te,s,e){"use strict";e.d(s,{SP:function(){return b},dR:function(){return g},VL:function(){return $},BD:function(){return t}});function r(B){if(typeof B!="object"||B===null||Array.isArray(B))return!1;const F=B;return!(typeof F.name!="string"||F.name===""||typeof F.message!="string")}function t(B){if(typeof B!="object"||B===null||Array.isArray(B))throw new Error(`Encountered invalid error, not an object, got '${B}'`);const F=B;if(typeof F.name!="string"||F.name==="")throw new Error(`Encountered error object without a name, got '${B}'`);if(typeof F.message!="string")throw new Error(`Encountered error object without a message, got '${B}'`)}var c=e(24852);function i(B,F){const D=serializeErrorInternal(B),x={name:"Unknown",message:"<no reason given>",...D};return F!=null&&F.includeStack||delete x.stack,x}function R(B){const F=(0,c.deserializeError)(B);return B.stack||(F.stack=void 0),F}function f(B){if(r(B)){const F=String(B);return F!=="[object Object]"?F:`${B.name}: ${B.message}`}return`unknown error '${B}'`}class a extends Error{constructor(D,x){var K;let M=D;if(x!==void 0){const re=f(x);M?M+=`; caused by ${re}`:M=`caused by ${re}`}super(M);X(this,"cause");(K=Error.captureStackTrace)==null||K.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(x)?x:void 0}}class u extends null{}class m extends null{}class y extends null{}class g extends a{}class E extends null{}class S extends null{}class b extends a{constructor(F,D){super(F,D),this.name=r(D)?D.name:"Error"}}async function O(B){var F;try{const D=await B.text();if(D){if((F=B.headers.get("content-type"))!=null&&F.startsWith("application/json"))try{const x=JSON.parse(D);if(x.error&&x.response)return x}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}, ${D}`},response:{statusCode:B.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${B.status} ${B.statusText}`},response:{statusCode:B.status}}}class $ extends Error{constructor(D){super(D.message);X(this,"response");X(this,"body");X(this,"cause");this.name="ResponseError",this.response=D.response,this.body=D.data,this.cause=D.cause}static async fromResponse(D){const x=await O(D),M=x.response.statusCode||D.status,K=x.error.name||D.statusText,re=`Request failed with ${M} ${K}`,le=R(x.error);return new $({message:re,response:D,data:x,cause:le})}}},36356:function(te,s,e){var g,E,S,b,O;"use strict";e.d(s,{nW:function(){return y},ae:function(){return f},q3:function(){return a}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class c{constructor(F){Mn(this,g,void 0);zn(this,g,F)}async getCredentials(F){const D=new URL(F.url),x=at(this,g).find(M=>M.isUrlSupported(D));if(!x)throw new Error(`No auth provider available for '${F.url}', see https://backstage.io/link?scm-auth`);return x.getCredentials(F)}}g=new WeakMap;const $=class{constructor(F,D,x,M){Mn(this,E,void 0);Mn(this,S,void 0);Mn(this,b,void 0);Mn(this,O,void 0);zn(this,E,D),zn(this,S,x),zn(this,b,M),zn(this,O,F)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:F,gitlab:D,azure:x,bitbucket:M})=>$.merge($.forGithub(F),$.forGitlab(D),$.forAzure(x),$.forBitbucket(M))})}static forAuthApi(F,D){return new $("generic",F,D.host,D.scopeMapping)}static forGithub(F,D){var M;const x=(M=D==null?void 0:D.host)!=null?M:"github.com";return new $("github",F,x,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(F,D){var M;const x=(M=D==null?void 0:D.host)!=null?M:"gitlab.com";return new $("gitlab",F,x,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(F,D){var M;const x=(M=D==null?void 0:D.host)!=null?M:"dev.azure.com";return new $("azure",F,x,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(F,D){var M;const x=(M=D==null?void 0:D.host)!=null?M:"bitbucket.org";return new $("bitbucket",F,x,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...F){return new c(F)}isUrlSupported(F){return F.host===at(this,S)}getAdditionalScopesForProvider(F){var D,x;return!(F!=null&&F.customScopes)||at(this,O)==="generic"?[]:(x=(D=F.customScopes)==null?void 0:D[at(this,O)])!=null?x:[]}async getCredentials(F){const{url:D,additionalScope:x,...M}=F,K=at(this,b).default.slice();x!=null&&x.repoWrite&&K.push(...at(this,b).repoWrite);const re=this.getAdditionalScopesForProvider(x);re.length&&K.push(...re);const le=[...new Set(K)],Se=await at(this,E).getAccessToken(le,M);return{token:Se,headers:{Authorization:`Bearer ${Se}`}}}};let i=$;E=new WeakMap,S=new WeakMap,b=new WeakMap,O=new WeakMap;var R=e(68370);class f{static fromConfig(F){return R.Lx.fromConfig(F)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var u=e(73250),m=e(2784);const y=B=>{var K;const{type:F}=B,D=(0,r.useApp)(),x=u.Z,M=F&&(K=D.getSystemIcon(F))!=null?K:x;return m.createElement(M,null)}},68370:function(te,s,e){var Xt,on,Yt,qt,an,nn,Mt;"use strict";e.d(s,{Lx:function(){return Bt},Pb:function(){return Qt}});var r=e(82717),t=e.n(r),c=e(76635);function i(w){const h=new URL("http://example.com");return h.host=w,h.host===w}function R(w){try{return new URL(w),!0}catch{return!1}}function f(w,h){return{list(){return w},byUrl(C){try{const L=typeof C=="string"?new URL(C):C;return w.find(V=>h(V)===L.host)}catch{return}},byHost(C){return w.find(L=>h(L)===C)}}}function a(w){const{url:h,base:C,lineNumber:L}=w;try{return new URL(h),h}catch{}let V;if(h.startsWith("/")){const{filepath:me}=t()(C);V=new URL(C);const ge=(0,c.trimEnd)(V.pathname.substring(0,V.pathname.length-me.length),"/");V.pathname=`${ge}${h}`}else V=new URL(h,C);return V.search=new URL(C).search,L&&(V.hash=`L${L}`),V.toString()}const u="amazonaws.com";function m(w){var St;const h=w.getOptionalString("endpoint"),C=(St=w.getOptionalBoolean("s3ForcePathStyle"))!=null?St:!1;let L,V;if(h){try{const hn=new URL(h);L=hn.host,V=hn.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${h}' is not a valid URL`)}if(V!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${h}'`)}else L=u;const me=w.getOptionalString("accessKeyId"),ge=w.getOptionalString("secretAccessKey"),Le=w.getOptionalString("roleArn"),pt=w.getOptionalString("externalId");return{host:L,endpoint:h,s3ForcePathStyle:C,accessKeyId:me,secretAccessKey:ge,roleArn:Le,externalId:pt}}function y(w){const h=w.map(m);return h.some(C=>C.host===u)||h.push({host:u}),h}const Et=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(h){this.integrationConfig=h}resolveUrl(h){return a(h)}resolveEditUrl(h){return h}};let g=Et;X(g,"factory",({config:h})=>{var L;const C=y((L=h.getOptionalConfigArray("integrations.awsS3"))!=null?L:[]);return f(C.map(V=>new Et(V)),V=>V.config.host)});const E="GB",wt=class{constructor(h,C,L,V,me,ge){Mn(this,Xt,void 0);Mn(this,on,void 0);Mn(this,Yt,void 0);Mn(this,qt,void 0);Mn(this,an,void 0);Mn(this,nn,void 0);Mn(this,Mt,(...h)=>{const C=new URL(at(this,Xt));return C.pathname=h.map(L=>encodeURIComponent(L)).join("/"),C});zn(this,Xt,h),zn(this,on,C),zn(this,Yt,L),zn(this,qt,V),zn(this,an,me),zn(this,nn,ge)}static fromRepoUrl(h){var hn;const C=new URL(h);let L,V,me;const ge=C.pathname.split("/").map(Vn=>decodeURIComponent(Vn));if(ge[2]==="_git"?(L=ge[1],V=me=ge[3]):ge[3]==="_git"?(L=ge[1],V=ge[2],me=ge[4]):ge[4]==="_git"&&(L=`${ge[1]}/${ge[2]}`,V=ge[3],me=ge[5]),!L||!V||!me)throw new Error("Azure URL must point to a git repository");const Le=(hn=C.searchParams.get("path"))!=null?hn:void 0;let pt;const St=C.searchParams.get("version");if(St){if(St.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");pt=St.slice(2)}return new wt(C.origin,L,V,me,Le,pt)}toRepoUrl(){let h;return at(this,Yt)===at(this,qt)?h=at(this,Mt).call(this,at(this,on),"_git",at(this,qt)):h=at(this,Mt).call(this,at(this,on),at(this,Yt),"_git",at(this,qt)),at(this,an)&&h.searchParams.set("path",at(this,an)),at(this,nn)&&h.searchParams.set("version",E+at(this,nn)),h.toString()}toFileUrl(){if(!at(this,an))throw new Error("Azure URL must point to a specific path to be able to download a file");const h=at(this,Mt).call(this,at(this,on),at(this,Yt),"_apis","git","repositories",at(this,qt),"items");return h.searchParams.set("api-version","6.0"),h.searchParams.set("path",at(this,an)),at(this,nn)&&h.searchParams.set("version",at(this,nn)),h.toString()}toArchiveUrl(){const h=at(this,Mt).call(this,at(this,on),at(this,Yt),"_apis","git","repositories",at(this,qt),"items");return h.searchParams.set("recursionLevel","full"),h.searchParams.set("download","true"),h.searchParams.set("api-version","6.0"),at(this,an)&&h.searchParams.set("scopePath",at(this,an)),at(this,nn)&&h.searchParams.set("version",at(this,nn)),h.toString()}toCommitsUrl(){const h=at(this,Mt).call(this,at(this,on),at(this,Yt),"_apis","git","repositories",at(this,qt),"commits");return h.searchParams.set("api-version","6.0"),at(this,nn)&&h.searchParams.set("searchCriteria.itemVersion.version",at(this,nn)),h.toString()}getOwner(){return at(this,on)}getProject(){return at(this,Yt)}getRepo(){return at(this,qt)}getPath(){return at(this,an)}getRef(){return at(this,nn)}};let S=wt;Xt=new WeakMap,on=new WeakMap,Yt=new WeakMap,qt=new WeakMap,an=new WeakMap,nn=new WeakMap,Mt=new WeakMap;const b="dev.azure.com";function O(w){var L;const h=(L=w.getOptionalString("host"))!=null?L:b,C=w.getOptionalString("token");if(!i(h))throw new Error(`Invalid Azure integration config, '${h}' is not a valid host`);return{host:h,token:C}}function $(w){const h=w.map(O);return h.some(C=>C.host===b)||h.push({host:b}),h}const Jt=class{constructor(h){this.integrationConfig=h}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){var V;const{url:C,base:L}=h;if(R(C))return C;try{const me=S.fromRepoUrl(L),ge=new URL(L),Le=new URL(`https://a.com${(V=me.getPath())!=null?V:""}`),pt=new URL(C,Le).pathname;return ge.searchParams.set("path",pt),h.lineNumber&&(ge.searchParams.set("line",String(h.lineNumber)),ge.searchParams.set("lineEnd",String(h.lineNumber+1)),ge.searchParams.set("lineStartColumn","1"),ge.searchParams.set("lineEndColumn","1")),ge.toString()}catch{return new URL(C,L).toString()}}resolveEditUrl(h){return h}};let B=Jt;X(B,"factory",({config:h})=>{var L;const C=$((L=h.getOptionalConfigArray("integrations.azure"))!=null?L:[]);return f(C.map(V=>new Jt(V)),V=>V.config.host)});var F=e(48834).lW;function D(w){return AzureUrl.fromRepoUrl(w).toFileUrl()}function x(w){return AzureUrl.fromRepoUrl(w).toArchiveUrl()}function M(w){return AzureUrl.fromRepoUrl(w).toCommitsUrl()}function K(w,h){const C=h?{...h}:{};if(w.token){const L=F.from(`:${w.token}`,"utf8");C.Authorization=`Basic ${L.toString("base64")}`}return{headers:C}}const re="bitbucket.org",le="https://api.bitbucket.org/2.0";function Se(w){var ge;const h=(ge=w.getOptionalString("host"))!=null?ge:re;let C=w.getOptionalString("apiBaseUrl");const L=w.getOptionalString("token"),V=w.getOptionalString("username"),me=w.getOptionalString("appPassword");if(!i(h))throw new Error(`Invalid Bitbucket integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):h===re?C=le:C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:L,username:V,appPassword:me}}function De(w){const h=w.map(Se);return h.some(C=>C.host===re)||h.push({host:re,apiBaseUrl:le}),h}const Sn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=a(h);if(!h.lineNumber)return C;const L=new URL(C);return this.integrationConfig.host==="bitbucket.org"?L.hash=`lines-${h.lineNumber}`:L.hash=`${h.lineNumber}`,L.toString()}resolveEditUrl(h){const C=t()(h),L=new URL(h);return L.searchParams.set("mode","edit"),L.searchParams.set("spa","0"),L.searchParams.set("at",C.ref),L.toString()}};let Fe=Sn;X(Fe,"factory",({config:h})=>{var L,V,me;const C=De((me=h.getOptionalConfigArray("integrations.bitbucket"))!=null?me:[...(L=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?L:[],...(V=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?V:[]]);return f(C.map(ge=>new Sn(ge)),ge=>ge.config.host)});var He=e(96279),Ae=e(48834).lW;async function Je(w,h){const{name:C,owner:L,resource:V}=parseGitUrl(w),me=V==="bitbucket.org";let ge=me?`${h.apiBaseUrl}/repositories/${L}/${C}`:`${h.apiBaseUrl}/projects/${L}/repos/${C}/default-branch`,Le=await fetch(ge,At(h));if(Le.status===404&&!me&&(ge=`${h.apiBaseUrl}/projects/${L}/repos/${C}/branches/default`,Le=await fetch(ge,At(h))),!Le.ok){const St=`Failed to retrieve default branch from ${ge}, ${Le.status} ${Le.statusText}`;throw new Error(St)}let pt;if(me)pt=(await Le.json()).mainbranch.name;else{const{displayId:St}=await Le.json();pt=St}if(!pt)throw new Error(`Failed to read default branch from ${ge}. Response ${Le.status} ${Le.json()}`);return pt}async function tt(w,h){const{name:C,owner:L,ref:V,protocol:me,resource:ge,filepath:Le}=parseGitUrl(w),pt=ge==="bitbucket.org";let St=V;St||(St=await Je(w,h));const hn=Le?`&path=${encodeURIComponent(decodeURIComponent(Le))}`:"";return pt?`${me}://${ge}/${L}/${C}/get/${St}.tar.gz`:`${h.apiBaseUrl}/projects/${L}/repos/${C}/archive?format=tgz&at=${St}&prefix=${L}-${C}${hn}`}function bt(w,h){try{const{owner:C,name:L,ref:V,filepathtype:me,filepath:ge}=parseGitUrl(w);if(!C||!L||me!=="browse"&&me!=="raw"&&me!=="src")throw new Error("Invalid Bitbucket URL or file path");const Le=ge.replace(/^\//,"");if(h.host==="bitbucket.org"){if(!V)throw new Error("Invalid Bitbucket URL or file path");return`${h.apiBaseUrl}/repositories/${C}/${L}/src/${V}/${Le}`}return`${h.apiBaseUrl}/projects/${C}/repos/${L}/raw/${Le}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${w}, ${C}`)}}function At(w){const h={};if(w.token)h.Authorization=`Bearer ${w.token}`;else if(w.username&&w.appPassword){const C=Ae.from(`${w.username}:${w.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}const Ie="bitbucket.org",mt="https://api.bitbucket.org/2.0";function ht(w){const h=Ie,C=mt,L=w.getString("username"),V=w.getString("appPassword");return{host:h,apiBaseUrl:C,username:L,appPassword:V}}function it(w){const h=w.map(ht);return h.length===0&&h.push({host:Ie,apiBaseUrl:mt}),h}const cn=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=a(h);if(h.lineNumber){const L=new URL(C);return L.hash=`lines-${h.lineNumber}`,L.toString()}return C}resolveEditUrl(h){const C=t()(h),L=new URL(h);return L.searchParams.set("mode","edit"),L.searchParams.set("at",C.ref),L.toString()}};let _=cn;X(_,"factory",({config:h})=>{var L;const C=it((L=h.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?L:[]);return f(C.map(V=>new cn(V)),V=>V.config.host)});var pe=e(48834).lW;async function be(w,h){const{name:C,owner:L}=parseGitUrl(w),V=`${h.apiBaseUrl}/repositories/${L}/${C}`,me=await fetch(V,ot(h));if(!me.ok){const pt=`Failed to retrieve default branch from ${V}, ${me.status} ${me.statusText}`;throw new Error(pt)}const Le=(await me.json()).mainbranch.name;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${me.status} ${me.json()}`);return Le}async function We(w,h){const{name:C,owner:L,ref:V,protocol:me,resource:ge}=parseGitUrl(w);let Le=V;return Le||(Le=await be(w,h)),`${me}://${ge}/${L}/${C}/get/${Le}.tar.gz`}function et(w,h){try{const{owner:C,name:L,ref:V,filepathtype:me,filepath:ge}=parseGitUrl(w);if(!C||!L||me!=="src"&&me!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Le=ge.replace(/^\//,"");if(!V)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${h.apiBaseUrl}/repositories/${C}/${L}/src/${V}/${Le}`}catch(C){throw new Error(`Incorrect URL: ${w}, ${C}`)}}function ot(w){const h={};if(w.username&&w.appPassword){const C=pe.from(`${w.username}:${w.appPassword}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}function yt(w){const h=w.getString("host");let C=w.getOptionalString("apiBaseUrl");const L=w.getOptionalString("token"),V=w.getOptionalString("username"),me=w.getOptionalString("password");if(!i(h))throw new Error(`Invalid Bitbucket Server integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${h}/rest/api/1.0`,{host:h,apiBaseUrl:C,token:L,username:V,password:me}}function se(w){return w.map(yt)}const An=class{constructor(h){this.integrationConfig=h}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const C=a(h);if(h.lineNumber){const L=new URL(C);return L.hash=h.lineNumber.toString(),L.toString()}return C}resolveEditUrl(h){return h.includes("?")?h.substring(0,h.indexOf("?")):h}};let oe=An;X(oe,"factory",({config:h})=>{var L;const C=se((L=h.getOptionalConfigArray("integrations.bitbucketServer"))!=null?L:[]);return f(C.map(V=>new An(V)),V=>V.config.host)});var Ye=e(48834).lW;async function Ge(w,h){const{name:C,owner:L}=parseGitUrl(w);let V=`${h.apiBaseUrl}/projects/${L}/repos/${C}/default-branch`,me=await fetch(V,J(h));if(me.status===404&&(V=`${h.apiBaseUrl}/projects/${L}/repos/${C}/branches/default`,me=await fetch(V,J(h))),!me.ok){const pt=`Failed to retrieve default branch from ${V}, ${me.status} ${me.statusText}`;throw new Error(pt)}const{displayId:ge}=await me.json(),Le=ge;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${me.status} ${me.json()}`);return Le}async function we(w,h){const{name:C,owner:L,ref:V,filepath:me}=parseGitUrl(w);let ge=V;ge||(ge=await Ge(w,h));const Le=me?`&path=${encodeURIComponent(decodeURIComponent(me))}`:"";return`${h.apiBaseUrl}/projects/${L}/repos/${C}/archive?format=tgz&at=${ge}&prefix=${L}-${C}${Le}`}function nt(w,h){try{const{owner:C,name:L,ref:V,filepathtype:me,filepath:ge}=parseGitUrl(w);if(!C||!L||me!=="browse"&&me!=="raw"&&me!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Le=ge.replace(/^\//,"");return`${h.apiBaseUrl}/projects/${C}/repos/${L}/raw/${Le}?at=${V}`}catch(C){throw new Error(`Incorrect URL: ${w}, ${C}`)}}function J(w){const h={};if(w.token&&(h.Authorization=`Bearer ${w.token}`),w.username&&w.password){const C=Ye.from(`${w.username}:${w.password}`,"utf8");h.Authorization=`Basic ${C.toString("base64")}`}return{headers:h}}function z(w){const h=w.getString("host");let C=w.getOptionalString("baseUrl"),L=w.getOptionalString("cloneUrl"),V=w.getOptionalString("gitilesBaseUrl");const me=w.getOptionalString("username"),ge=w.getOptionalString("password");if(i(h)){if(C&&!R(C))throw new Error(`Invalid Gerrit integration config, '${C}' is not a valid baseUrl`);if(L&&!R(L))throw new Error(`Invalid Gerrit integration config, '${L}' is not a valid cloneUrl`);if(V&&!R(V))throw new Error(`Invalid Gerrit integration config, '${V}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):C=`https://${h}`,V?V=(0,c.trimEnd)(V,"/"):V=`https://${h}`,L?L=(0,c.trimEnd)(L,"/"):L=C,{host:h,baseUrl:C,cloneUrl:L,gitilesBaseUrl:V,username:me,password:ge}}function q(w){return w.map(z)}var ce=e(48834).lW;const de=")]}'";function Pe(w,h){const L=h.replace(w.gitilesBaseUrl,"").split("/").filter(St=>!!St),V=L.indexOf("+");if(V<=0)throw new Error(`Unable to parse project from url: ${h}`);const me=(0,c.trimStart)(L.slice(0,V).join("/"),"/"),ge=L.indexOf("heads");if(ge<=0)throw new Error(`Unable to parse branch from url: ${h}`);const Le=L[ge+1],pt=L.slice(ge+2).join("/");return{branch:Le,filePath:pt===""?"/":pt,project:me}}function Oe(w,h,C,L){return`${w.gitilesBaseUrl}/${h}/+/refs/heads/${C}/${(0,c.trimStart)(L,"/")}`}function Ce(w){return w.password?"/a/":"/"}function Qe(w,h){const{branch:C,project:L}=Pe(w,h);return`${w.baseUrl}${Ce(w)}projects/${encodeURIComponent(L)}/branches/${C}`}function Ke(w,h){const{project:C}=Pe(w,h);return`${w.cloneUrl}${Ce(w)}${C}`}function gt(w,h){const{branch:C,filePath:L,project:V}=Pe(w,h);return`${w.baseUrl}${Ce(w)}projects/${encodeURIComponent(V)}/branches/${C}/files/${encodeURIComponent(L)}/content`}function Ct(w){return`${w.baseUrl}${Ce(w)}projects/`}function ct(w){const h={};if(!w.password)return h;const C=ce.from(`${w.username}:${w.password}`,"utf8");return h.Authorization=`Basic ${C.toString("base64")}`,{headers:h}}async function Dt(w){const h=await w.text();if(h.startsWith(de))try{return JSON.parse(h.slice(de.length))}catch(C){throw new Error(`Invalid response from Gerrit: ${h.slice(0,10)} - ${C}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${h.slice(0,10)}`)}const On=class{constructor(h){this.integrationConfig=h}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){const{url:C,base:L,lineNumber:V}=h;let me;if(C.startsWith("/")){const{branch:ge,project:Le}=Pe(this.config,L);return Oe(this.config,Le,ge,C)}return C?me=new URL(C,L):me=new URL(L),V&&(me.hash=V.toString()),me.toString()}resolveEditUrl(h){return h}};let Ot=On;X(Ot,"factory",({config:h})=>{var L;const C=q((L=h.getOptionalConfigArray("integrations.gerrit"))!=null?L:[]);return f(C.map(V=>new On(V)),V=>V.config.host)});const Pt="github.com",It="https://api.github.com",zt="https://raw.githubusercontent.com";function Wt(w){var ge,Le;const h=(ge=w.getOptionalString("host"))!=null?ge:Pt;let C=w.getOptionalString("apiBaseUrl"),L=w.getOptionalString("rawBaseUrl");const V=w.getOptionalString("token"),me=(Le=w.getOptionalConfigArray("apps"))==null?void 0:Le.map(pt=>({appId:pt.getNumber("appId"),clientId:pt.getString("clientId"),clientSecret:pt.getString("clientSecret"),webhookSecret:pt.getString("webhookSecret"),privateKey:pt.getString("privateKey"),allowedInstallationOwners:pt.getOptionalStringArray("allowedInstallationOwners")}));if(!i(h))throw new Error(`Invalid GitHub integration config, '${h}' is not a valid host`);return C?C=(0,c.trimEnd)(C,"/"):h===Pt&&(C=It),L?L=(0,c.trimEnd)(L,"/"):h===Pt&&(L=zt),{host:h,apiBaseUrl:C,rawBaseUrl:L,token:V,apps:me}}function fn(w){const h=w.map(Wt);return h.some(C=>C.host===Pt)||h.push({host:Pt,apiBaseUrl:It,rawBaseUrl:zt}),h}function Ln(w,h,C){try{const{owner:L,name:V,ref:me,filepathtype:ge,filepath:Le}=parseGitUrl(w);if(!L||!V||!me||ge!=="blob"&&ge!=="raw"&&ge!=="tree")throw new Error("Invalid GitHub URL or file path");const pt=Le.replace(/^\//,"");return Zt(h,C)==="api"?`${h.apiBaseUrl}/repos/${L}/${V}/contents/${pt}?ref=${me}`:`${h.rawBaseUrl}/${L}/${V}/${me}/${pt}`}catch(L){throw new Error(`Incorrect URL: ${w}, ${L}`)}}function kt(w,h){const C={};return Zt(w,h)==="api"&&(C.Accept="application/vnd.github.v3.raw"),h.token&&(C.Authorization=`token ${h.token}`),{headers:C}}function Zt(w,h){return w.apiBaseUrl&&(h.token||!w.rawBaseUrl)?"api":"raw"}var Xe=e(55912);class ue{constructor(){X(this,"tokenCache",new Map);X(this,"isNotExpired",h=>h.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(h,C){const L=this.tokenCache.get(h);if(L&&this.isNotExpired(L.expiresAt))return{accessToken:L.token};const V=await C();return this.tokenCache.set(h,V),{accessToken:V.token}}}const j={Accept:"application/vnd.github.machine-man-preview+json"};class ye{constructor(h,C){X(this,"appClient");X(this,"baseUrl");X(this,"baseAuthConfig");X(this,"cache",new ue);X(this,"allowedInstallationOwners");this.allowedInstallationOwners=h.allowedInstallationOwners,this.baseUrl=C,this.baseAuthConfig={appId:h.appId,privateKey:h.privateKey.replace(/\\n/gm,`
|
|
31
|
+
`)},this.appClient=new Octokit({baseUrl:C,headers:j,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(h,C){var ge;const{installationId:L,suspended:V}=await this.getInstallationData(h);if(this.allowedInstallationOwners&&!((ge=this.allowedInstallationOwners)!=null&&ge.includes(h)))return{accessToken:void 0};if(V)throw new Error(`The GitHub application for ${h} is suspended`);const me=C?`${h}/${C}`:h;return this.cache.getOrCreateToken(me,async()=>{var pt;const Le=await this.appClient.apps.createInstallationAccessToken({installation_id:L,headers:j});if(C&&Le.data.repository_selection==="selected"){const St=new Octokit({baseUrl:this.baseUrl,auth:Le.data.token}),hn=await St.paginate(St.apps.listReposAccessibleToInstallation);if(!((pt=hn.repositories)!=null?pt:hn).some(ur=>ur.name===C))throw new Error(`The Backstage GitHub application used in the ${h} organization does not have access to a repository with the name ${C}`)}return{token:Le.data.token,expiresAt:DateTime.fromISO(Le.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(h){const L=(await this.getInstallations()).find(me=>{var ge,Le;return((Le=(ge=me.account)==null?void 0:ge.login)==null?void 0:Le.toLocaleLowerCase("en-US"))===h.toLocaleLowerCase("en-US")});if(L)return{installationId:L.id,suspended:Boolean(L.suspended_by)};const V=new Error(`No app installation found for ${h} in ${this.baseAuthConfig.appId}`);throw V.name="NotFoundError",V}}class je{constructor(h){X(this,"apps");var C,L;this.apps=(L=(C=h.apps)==null?void 0:C.map(V=>new ye(V,h.apiBaseUrl)))!=null?L:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(C=>C.getInstallations()))).flat():[]}async getAppToken(h,C){if(this.apps.length===0)return;const L=await Promise.all(this.apps.map(Le=>Le.getInstallationCredentials(h,C).then(pt=>({credentials:pt,error:void 0}),pt=>({credentials:void 0,error:pt})))),V=L.find(Le=>Le.credentials);if(V)return V.credentials.accessToken;const ge=L.map(Le=>Le.error).find(Le=>Le.name!=="NotFoundError");if(ge)throw ge}}class _e{constructor(h,C){this.githubAppCredentialsMux=h,this.token=C}async getCredentials(h){const C=parseGitUrl(h.url),L=C.owner||C.name,V=C.owner?C.name:void 0;let me="app",ge=await this.githubAppCredentialsMux.getAppToken(L,V);return ge||(me="token",ge=this.token),{headers:ge?{Authorization:`Bearer ${ge}`}:void 0,token:ge,type:me}}}X(_e,"create",null);class st{static fromIntegrations(h){const C=new Map;return h.github.list().forEach(L=>{const V=SingleInstanceGithubCredentialsProvider.create(L.config);C.set(L.config.host,V)}),new st(C)}constructor(h){this.providers=h}async getCredentials(h){const C=new URL(h.url),L=this.providers.get(C.host);if(!L)throw new Error(`There is no GitHub integration that matches ${h.url}. Please add a configuration for an integration.`);return L.getCredentials(h)}}const Rn=class{constructor(h){this.integrationConfig=h}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return Qt(a(h),"tree")}resolveEditUrl(h){return Qt(h,"edit")}};let Rt=Rn;X(Rt,"factory",({config:h})=>{var L;const C=fn((L=h.getOptionalConfigArray("integrations.github"))!=null?L:[]);return f(C.map(V=>new Rn(V)),V=>V.config.host)});function Qt(w,h){return w.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(C,L,V,me)=>`//${L}/${V}/${me}/${h}/`)}const en="gitlab.com",tn="https://gitlab.com/api/v4";function pn(w){const h=w.getString("host");let C=w.getOptionalString("apiBaseUrl");const L=w.getOptionalString("token");let V=w.getOptionalString("baseUrl");if(C?C=(0,c.trimEnd)(C,"/"):h===en&&(C=tn),V?V=(0,c.trimEnd)(V,"/"):V=`https://${h}`,i(h)){if(!C||!R(C))throw new Error(`Invalid GitLab integration config, '${C}' is not a valid apiBaseUrl`);if(!R(V))throw new Error(`Invalid GitLab integration config, '${V}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${h}' is not a valid host`);return{host:h,token:L,apiBaseUrl:C,baseUrl:V}}function U(w){const h=w.map(pn);return h.some(C=>C.host===en)||h.push({host:en,apiBaseUrl:tn,baseUrl:`https://${en}`}),h}function ae(w){let h="";return w.host!==en&&(h=new URL(w.baseUrl).pathname),trimEnd(h,"/")}var ne=e(10179);async function Ee(w,h){if(w.includes("/-/blob/")){const C=await jt(w,h);return Ze(w,C,h).toString()}return ut(w).toString()}function $e(w){const{token:h=""}=w;return{headers:{"PRIVATE-TOKEN":h}}}function ut(w){try{const h=new URL(w),C=h.pathname.split("/").filter(Boolean),L=C.indexOf("blob",2);if(L<2||L===C.length-1)throw new InputError("Wrong GitLab URL");const V=C.slice(0,L),me=C.slice(L+1);if(!me.join("/").match(/\.(yaml|yml)$/))throw new InputError("Wrong GitLab URL");return h.pathname=[...V,"raw",...me].join("/"),h}catch(h){throw new InputError(`Incorrect url: ${w}, ${h}`)}}function Ze(w,h,C){try{const L=new URL(w),V=L.pathname.split("/-/blob/")[1],[me,...ge]=V.split("/"),Le=getGitLabIntegrationRelativePath(C);return L.pathname=[...Le?[Le]:[],"api/v4/projects",h,"repository/files",encodeURIComponent(decodeURIComponent(ge.join("/"))),"raw"].join("/"),L.search=`?ref=${me}`,L}catch(L){throw new Error(`Incorrect url: ${w}, ${L}`)}}async function jt(w,h){const C=new URL(w);if(!C.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let L=C.pathname.split("/-/blob/")[0];const V=getGitLabIntegrationRelativePath(h);V&&(L=L.replace(V,""));const me=new URL(`${C.origin}${V}/api/v4/projects/${encodeURIComponent(L.replace(/^\//,""))}`),ge=await fetch(me.toString(),$e(h)),Le=await ge.json();if(!ge.ok)throw new Error(`GitLab Error '${Le.error}', ${Le.error_description}`);return Number(Le.id)}catch(L){throw new Error(`Could not get GitLab project ID for: ${w}, ${L}`)}}const wn=class{constructor(h){this.integrationConfig=h}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(h){return a(h)}resolveEditUrl(h){return Gt(h,"edit")}};let Vt=wn;X(Vt,"factory",({config:h})=>{var L;const C=U((L=h.getOptionalConfigArray("integrations.gitlab"))!=null?L:[]);return f(C.map(V=>new wn(V)),V=>V.config.host)});function Gt(w,h){return w.replace(/\/\-\/(blob|tree|edit)\//,`/-/${h}/`)}class Bt{constructor(h){X(this,"byType");this.byType=h}static fromConfig(h){return new Bt({awsS3:g.factory({config:h}),azure:B.factory({config:h}),bitbucket:Fe.factory({config:h}),bitbucketCloud:_.factory({config:h}),bitbucketServer:oe.factory({config:h}),gerrit:Ot.factory({config:h}),github:Rt.factory({config:h}),gitlab:Vt.factory({config:h})})}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(h=>h.list())}byUrl(h){let C=Object.values(this.byType).map(L=>L.byUrl(h)).filter(Boolean);if(C.length>1){const L=C.filter(V=>!(V instanceof Fe));L.length!==0&&(C=L)}return C[0]}byHost(h){return Object.values(this.byType).map(C=>C.byHost(h)).find(Boolean)}resolveUrl(h){const C=this.byUrl(h.base);return C?C.resolveUrl(h):a(h)}resolveEditUrl(h){const C=this.byUrl(h);return C?C.resolveEditUrl(h):h}}},90775:function(te,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return R.plugin}});var t=e(2784),c=e(47093),i=e(10289),R=e(82250),f=e(56338),a=e(49208),u=e(36964),m=e(68099);const y=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:I})=>a.UrlPatternDiscovery.compile(`${I.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)({api:u.alertApiRef,deps:{},factory:()=>new a.AlertApiForwarder}),(0,u.createApiFactory)({api:u.analyticsApiRef,deps:{},factory:()=>new a.NoOpAnalyticsApi}),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:I})=>{const k=new a.ErrorAlerter(I,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(k,{hidden:!1}),k}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:I})=>a.WebStorage.create({errorApi:I})}),(0,u.createApiFactory)({api:u.fetchApiRef,deps:{configApi:u.configApiRef,identityApi:u.identityApiRef,discoveryApi:u.discoveryApiRef},factory:({configApi:I,identityApi:k,discoveryApi:fe})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:fe}),a.FetchMiddlewares.injectIdentityAuth({identityApi:k,config:I})]})}),(0,u.createApiFactory)({api:u.oauthRequestApiRef,deps:{},factory:()=>new a.OAuthRequestManager}),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.GoogleAuth.create({discoveryApi:I,oauthRequestApi:k,environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:k,environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.GithubAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["read:user"],environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.OktaAuth.create({discoveryApi:I,oauthRequestApi:k,environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.GitlabAuth.create({discoveryApi:I,oauthRequestApi:k,environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:k,environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["team"],environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:fe})=>a.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:k,environment:fe.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:m.RV,deps:{discovery:u.discoveryApiRef,identity:u.identityApiRef,config:u.configApiRef},factory:({config:I,discovery:k,identity:fe})=>m.iM.create({config:I,discovery:k,identity:fe})})];var g=e(77277),E=e(82339),S=e(62833);function b({children:I}){return(0,i.GV)()?t.createElement(t.Fragment,null,I):t.createElement(i.VA,null,I)}const O=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),$=({step:I,error:k})=>{let fe="";return I==="load-config"?fe=`The configuration failed to load, someone should have a look at this error: ${k.message}`:I==="load-chunk"&&(fe=`Lazy loaded chunk failed to load, try to reload the page: ${k.message}`),t.createElement(b,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:fe}))},B=({error:I,resetError:k,plugin:fe})=>t.createElement(E.ErrorPanel,{title:`Error in ${fe==null?void 0:fe.getId()}`,defaultExpanded:!0,error:I},t.createElement(g.Z,{variant:"outlined",onClick:k},"Retry")),F={Progress:E.Progress,Router:S.VK,NotFoundErrorPage:O,BootErrorPage:$,ErrorBoundaryFallback:B};var D=e(43642),x=e(80079),M=e(90941),K=e(32915),re=e(40562),le=e(21853),Se=e(60744),De=e(66569),Fe=e(30254),He=e(13384),Ae=e(15933),Je=e(58838),tt=e(86737),bt=e(4989),At=e(44407),Ie=e(18628),mt=e(84219),ht=e(98685),it=e(39781);const _={brokenImage:x.Z,catalog:Ie.Z,scaffolder:K.Z,techdocs:re.Z,search:le.Z,chat:Se.Z,dashboard:De.Z,docs:Fe.Z,email:He.Z,github:Je.Z,group:mt.Z,help:tt.Z,"kind:api":Ae.Z,"kind:component":At.Z,"kind:domain":D.Z,"kind:group":mt.Z,"kind:location":bt.Z,"kind:system":M.Z,"kind:user":ht.Z,user:ht.Z,warning:it.Z};var pe=e(73689),be=e(48032);const We={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},et={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function ot(I){var dt;const{colors:k,shape:fe,options:Be}=I,ft=`linear-gradient(90deg, ${(k.length===1?[k[0],k[0]]:k).join(", ")})`,vt=`${fe}, ${ft}`,xt=(dt=Be==null?void 0:Be.fontColor)!=null?dt:"#FFFFFF";return{colors:k,shape:fe,backgroundImage:vt,fontColor:xt}}const yt={home:ot({colors:et.teal,shape:We.wave}),documentation:ot({colors:et.pinkSea,shape:We.wave2}),tool:ot({colors:et.purpleSky,shape:We.round}),service:ot({colors:et.marineBlue,shape:We.wave}),website:ot({colors:et.veryBlue,shape:We.wave}),library:ot({colors:et.rubyRed,shape:We.wave}),other:ot({colors:et.darkGrey,shape:We.wave}),app:ot({colors:et.toastyOrange,shape:We.wave}),apis:ot({colors:et.teal,shape:We.wave2}),card:ot({colors:et.greens,shape:We.wave})},se=16,oe='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Ye(I){const{palette:k,htmlFontSize:fe=se,fontFamily:Be=oe,defaultPageTheme:qe,pageTheme:ft=yt}=I;if(!ft[qe])throw new Error(`${qe} is not defined in pageTheme.`);return{palette:k,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:fe,fontFamily:Be,h6:{fontWeight:700,fontSize:20,marginBottom:2},h5:{fontWeight:700,fontSize:24,marginBottom:4},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:ft[qe],getPageTheme:({themeId:vt})=>{var xt;return(xt=ft[vt])!=null?xt:ft[qe]}}}function Ge(I){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:I.typography.fontFamily},body:{height:"100%",fontFamily:I.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:I.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:I.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:I.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,be.darken)(I.palette.link,.3),background:(0,be.lighten)(I.palette.link,.95)},[I.breakpoints.up("md")]:{minWidth:120,fontSize:I.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:I.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:I.spacing(1),marginBottom:I.spacing(1),color:I.palette.grey[900]},outlined:{color:I.palette.text.primary},label:{lineHeight:`${I.spacing(2.5)}px`,fontWeight:I.typography.fontWeightMedium,fontSize:`${I.spacing(1.75)}px`},labelSmall:{fontSize:`${I.spacing(1.5)}px`},deleteIcon:{color:I.palette.grey[500],width:`${I.spacing(3)}px`,height:`${I.spacing(3)}px`,margin:`0 ${I.spacing(.75)}px 0 -${I.spacing(.75)}px`},deleteIconSmall:{width:`${I.spacing(2)}px`,height:`${I.spacing(2)}px`,margin:`0 ${I.spacing(.5)}px 0 -${I.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 we(I){const k=Ye(I),fe=(0,pe.Z)(k),Be=Ge(fe);return{...fe,overrides:Be}}var nt=e(34505);const J=we({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:nt.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:yt}),z=we({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:nt.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:yt});var q=e(98192),ce=e(15222),de=e(41547),Pe=e(87561);const Oe=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ce.Z,null),Provider:({children:I})=>t.createElement(de.Z,{theme:J},t.createElement(Pe.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(q.Z,null),Provider:({children:I})=>t.createElement(de.Z,{theme:z},t.createElement(Pe.ZP,null,I))}];function Ce(I){var k,fe,Be;return(0,a.createSpecializedApp)({...I,apis:(k=I==null?void 0:I.apis)!=null?k:[],bindRoutes:I==null?void 0:I.bindRoutes,components:{...F,...I==null?void 0:I.components},configLoader:I==null?void 0:I.configLoader,defaultApis:y,icons:{..._,...I==null?void 0:I.icons},plugins:(fe=I==null?void 0:I.plugins)!=null?fe:[],themes:(Be=I==null?void 0:I.themes)!=null?Be:Oe})}var Qe=e(82394),Ke=e.n(Qe),gt=e(48023),Ct=e(76635);async function ct({storageApi:I}){var ft;const k=I.forBucket("settings"),fe=I.forBucket("starredEntities"),Be=k.snapshot("starredEntities").value;if(!(0,Ct.isArray)(Be))return;const qe=new Set((ft=fe.snapshot("entityRefs").value)!=null?ft:[]);Be.filter(Ct.isString).map(vt=>vt.split(":")).filter(vt=>vt.length===4&&vt[0]==="entity").map(([vt,xt,dt,A])=>(0,gt.eE)({kind:xt,namespace:dt,name:A})).forEach(vt=>qe.add(vt)),await fe.set("entityRefs",Array.from(qe)),await k.remove("starredEntities")}class Dt{constructor(k){X(this,"settingsStore");X(this,"starredEntities");X(this,"subscribers",new Set);X(this,"observable",new(Ke())(k=>(k.next(new Set(this.starredEntities)),this.subscribers.add(k),()=>{this.subscribers.delete(k)})));var fe;ct(k).then(),this.settingsStore=k.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((fe=this.settingsStore.snapshot("entityRefs").value)!=null?fe:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Be=>{var qe;this.starredEntities=new Set((qe=Be.value)!=null?qe:[]),this.notifyChanges()}})}async toggleStarred(k){this.starredEntities.has(k)?this.starredEntities.delete(k):this.starredEntities.add(k),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const k of this.subscribers)k.next(new Set(this.starredEntities))}}var Ot=e(39398),Pt=e(49782),It=e(79692),zt=e(74450);const Wt=(0,It.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function fn(I){var ft,vt;const k=I.result,fe=Wt(),Be=useAnalytics(),qe=()=>{Be.captureEvent("discover",k.title,{attributes:{to:k.location},value:I.rank})};return React.createElement(Link,{noTrack:!0,to:k.location,onClick:qe},React.createElement(ListItem,{alignItems:"flex-start"},I.icon&&React.createElement(ListItemIcon,null,I.icon),React.createElement("div",{className:fe.flexContainer},React.createElement(ListItemText,{className:fe.itemText,primaryTypographyProps:{variant:"h6"},primary:(ft=I.highlight)!=null&&ft.fields.title?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.title,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.title,secondary:(vt=I.highlight)!=null&&vt.fields.text?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.text,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.text}),React.createElement(Box,null,k.kind&&React.createElement(Chip,{label:`Kind: ${k.kind}`,size:"small"}),k.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${k.lifecycle}`,size:"small"})))),React.createElement(Divider,{component:"li"}))}var Ln=e(30097),kt=e(17429),Zt=e(95544),Xe=e(99688),ue=e(12231),j=e(86136),ye=e(49378),je=e(85256),_e=e(61837),st=e(79784),Rt=e(50758),Qt=e(31654),en=e(43054),tn=e(40749);const pn="catalog-entity",U=(0,tn.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:pn}),ae=(0,tn.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),ne=(0,tn.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:pn}),Ee=(0,tn.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:pn}),$e=(0,tn.J$)({name:"catalog.location.read",attributes:{action:"read"}}),ut=(0,tn.J$)({name:"catalog.location.create",attributes:{action:"create"}}),Ze=(0,tn.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),jt=[U,ae,ne,Ee,$e,ut,Ze];var Vt=e(49166);function Gt(I){var dt;const{unregisterEntityOptions:k,isUnregisterAllowed:fe,onUnregisterEntity:Be,onClose:qe}=I,ft=typeof(k==null?void 0:k.disableUnregister)=="boolean",vt=(dt=!fe||(ft?!!(k!=null&&k.disableUnregister):(k==null?void 0:k.disableUnregister)==="disable"))!=null?dt:!1;let xt=t.createElement(t.Fragment,null);return(k==null?void 0:k.disableUnregister)!=="hidden"&&(xt=t.createElement(ue.Z,{onClick:()=>{qe(),Be()},disabled:vt},t.createElement(j.Z,null,t.createElement(Vt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Unregister entity"}))),t.createElement(t.Fragment,null,xt)}const Bt=(0,It.Z)(I=>({button:{color:I.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function Et(I){const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:fe,onUnregisterEntity:Be,onInspectEntity:qe}=I,[ft,vt]=(0,t.useState)(),xt=Bt(),A=(0,kt.useEntityPermission)(ne).allowed,T=Y=>{vt(Y.currentTarget)},N=()=>{vt(void 0)},W=k&&[...k.map(Y=>t.createElement(ue.Z,{key:Y.title,onClick:()=>{N(),Y.onClick()}},t.createElement(j.Z,null,t.createElement(Y.Icon,{fontSize:"small"})),t.createElement(ye.Z,{primary:Y.title}))),t.createElement(je.Z,{key:"the divider is here!"})];return t.createElement(t.Fragment,null,t.createElement(_e.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!ft,role:"button",onClick:T,"data-testid":"menu-button",className:xt.button,id:"long-menu"},t.createElement(en.Z,null)),t.createElement(st.ZP,{open:Boolean(ft),onClose:N,anchorEl:ft,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(Rt.Z,null,W,t.createElement(Gt,{unregisterEntityOptions:fe,isUnregisterAllowed:A,onUnregisterEntity:Be,onClose:N}),t.createElement(ue.Z,{onClick:()=>{N(),qe()}},t.createElement(j.Z,null,t.createElement(Qt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Inspect entity"})))))}const Xt="plugin.catalog.entityLayoutRoute",on=()=>null;(0,u.attachComponentData)(on,Xt,!0),(0,u.attachComponentData)(on,"core.gatherMountPoints",!0);function Yt(I){const{entity:k,title:fe}=I;return t.createElement(Zt.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Zt.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},fe),k&&t.createElement(kt.FavoriteEntity,{entity:k}))}function qt(I,k,fe,Be){var xt,dt,A,T,N;const qe=(xt=I!=null?I:Be==null?void 0:Be.kind)!=null?xt:"",ft=(dt=k!=null?k:Be==null?void 0:Be.metadata.namespace)!=null?dt:"";return{headerTitle:`${(N=(T=(A=Be==null?void 0:Be.metadata.title)!=null?A:fe)!=null?T:Be==null?void 0:Be.metadata.name)!=null?N:""}${ft&&ft!==gt.zG?` in ${ft}`:""}`,headerType:(()=>{let W=qe.toLocaleLowerCase("en-US");return Be&&Be.spec&&"type"in Be.spec&&(W+=" \u2014 ",W+=Be.spec.type.toLocaleLowerCase("en-US")),W})()}}function an(I){var Be;const{entity:k}=I,fe=(0,kt.getEntityRelations)(k,gt.S4);return t.createElement(t.Fragment,null,fe.length>0&&t.createElement(E.HeaderLabel,{label:"Owner",value:t.createElement(kt.EntityRefLinks,{entityRefs:fe,defaultKind:"Group",color:"inherit"})}),((Be=k.spec)==null?void 0:Be.lifecycle)&&t.createElement(E.HeaderLabel,{label:"Lifecycle",value:k.spec.lifecycle}))}const nn=I=>{var ke,Lt,rt;const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:fe,children:Be,NotFoundComponent:qe}=I,{kind:ft,namespace:vt,name:xt}=(0,u.useRouteRefParams)(kt.entityRouteRef),{entity:dt,loading:A,error:T}=(0,kt.useAsyncEntity)(),N=(0,i.TH)(),W=(0,u.useElementFilter)(Be,Ve=>Ve.selectByComponentData({key:Xt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Ft})=>{if(dt){if(Ft.if&&!Ft.if(dt))return[]}else return[];return[{path:Ft.path,title:Ft.title,children:Ft.children,tabProps:Ft.tabProps}]}),[dt]),{headerTitle:Y,headerType:Q}=qt(ft,vt,xt,dt),[he,Re]=(0,t.useState)(!1),[Ue,xe]=(0,t.useState)(!1),Ne=(0,i.s0)(),ze=async()=>{Re(!1),xe(!1),Ne("/")};return(0,t.useEffect)(()=>{Re(!1),xe(!1)},[N.pathname]),t.createElement(E.Page,{themeId:(rt=(Lt=(ke=dt==null?void 0:dt.spec)==null?void 0:ke.type)==null?void 0:Lt.toString())!=null?rt:"home"},t.createElement(E.Header,{title:t.createElement(Yt,{title:Y,entity:dt}),pageTitleOverride:Y,type:Q},dt&&t.createElement(t.Fragment,null,t.createElement(an,{entity:dt}),t.createElement(Et,{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:fe,onUnregisterEntity:()=>Re(!0),onInspectEntity:()=>xe(!0)}))),A&&t.createElement(E.Progress,null),dt&&t.createElement(E.RoutedTabs,{routes:W}),T&&t.createElement(E.Content,null,t.createElement(Xe.Z,{severity:"error"},T.toString())),!A&&!T&&!dt&&t.createElement(E.Content,null,qe||t.createElement(E.WarningPanel,{title:"Entity not found"},"There is no ",ft," with the requested"," ",t.createElement(E.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(kt.UnregisterEntityDialog,{open:he,entity:dt,onConfirm:ze,onClose:()=>Re(!1)}),t.createElement(kt.InspectEntityDialog,{open:Ue,entity:dt,onClose:()=>xe(!1)}))};nn.Route=on;var Mt=e(10179);function wt(I){const{open:k,onClose:fe,onConfirm:Be,entity:qe}=I,[ft,vt]=useState(!1),xt=useApi(catalogApiRef),dt=useApi(alertApiRef),A=async()=>{vt(!0);try{const T=qe.metadata.uid;await xt.removeEntityByUid(T),Be()}catch(T){assertError(T),dt.post({message:T.message})}finally{vt(!1)}};return React.createElement(Dialog,{open:k,onClose:fe},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:ft,onClick:A},"Delete"),React.createElement(Button,{onClick:fe,color:"primary"},"Cancel")))}var Jt=e(47851);function Sn(I){var k,fe;return((fe=(k=I==null?void 0:I.metadata)==null?void 0:k.annotations)==null?void 0:fe["backstage.io/orphan"])==="true"}function cn(){const I=useNavigate(),k=useRouteRef(rootRouteRef),[fe,Be]=useState(!1),{entity:qe}=useEntity(),ft=async()=>{Be(!1),I(k())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Be(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:fe,entity:qe,onConfirm:ft,onClose:()=>Be(!1)}))}var An=e(30001);const On=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Rn(I,k){return{items:(await k.getEntityAncestors({entityRef:I})).items.map(qe=>{var xt,dt;return{errors:((dt=(xt=qe.entity.status)==null?void 0:xt.items)!=null?dt:[]).filter(On).map(A=>A.error).filter(A=>Boolean(A)),entity:qe.entity}}).filter(qe=>qe.errors.length>0)}}async function wn(I,k){const fe=k.apis.get(catalogApiRef);if(!fe)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Rn(stringifyEntityRef(I),fe)).items.length>0}function w(){const{entity:I}=useEntity(),k=stringifyEntityRef(I),fe=useApi(catalogApiRef),{loading:Be,error:qe,value:ft}=useAsync(async()=>Rn(k,fe),[k,fe]);return qe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:qe})):Be||!ft?null:React.createElement(React.Fragment,null,ft.items.map((vt,xt)=>React.createElement(Box,{key:xt,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(vt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:vt.entity})),vt.errors.map((dt,A)=>React.createElement(ResponseErrorPanel,{key:A,error:dt})))))}var h=e(64279);const C="core.backstage.entitySwitch",L=I=>null;(0,u.attachComponentData)(L,C,!0);const V=I=>{var vt,xt;const{entity:k,loading:fe}=(0,kt.useAsyncEntity)(),Be=(0,u.useApiHolder)(),qe=(0,u.useElementFilter)(I.children,dt=>dt.selectByComponentData({key:C,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(A=>{var W;if(fe)return[];const{if:T,children:N}=A.props;return k?[{if:(W=T==null?void 0:T(k,{apis:Be}))!=null?W:!0,children:N}]:[{if:T===void 0,children:N}]}),[Be,k,fe]);return qe.some(dt=>typeof dt.if=="object"&&"then"in dt.if)?t.createElement(me,{results:qe}):(xt=(vt=qe.find(dt=>dt.if))==null?void 0:vt.children)!=null?xt:null};function me({results:I}){const{loading:k,value:fe}=(0,h.default)(async()=>{var qe;const Be=I.map(async({if:ft,children:vt})=>{try{if(await ft)return vt}catch{}return null});return(qe=(await Promise.all(Be)).find(Boolean))!=null?qe:null},[I]);return k||!fe?null:fe}V.Case=L;const ge=null,Le=kt.CatalogFilterLayout.Filters,pt=kt.CatalogFilterLayout.Content,St=(0,u.createPlugin)({id:"catalog",apis:[(0,u.createApiFactory)({api:kt.catalogApiRef,deps:{discoveryApi:u.discoveryApiRef,fetchApi:u.fetchApiRef},factory:({discoveryApi:I,fetchApi:k})=>new An.MS({discoveryApi:I,fetchApi:k})}),(0,u.createApiFactory)({api:kt.starredEntitiesApiRef,deps:{storageApi:u.storageApiRef},factory:({storageApi:I})=>new Dt({storageApi:I})})],routes:{catalogIndex:Jt._Z,catalogEntity:kt.entityRouteRef},externalRoutes:{createComponent:Jt.yw,viewTechDoc:Jt.jU},__experimentalConfigure(I){return{...{createButtonTitle:"Create"},...I}}}),hn=St.provide((0,u.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(5162).then(e.bind(e,74036)).then(I=>I.CatalogPage),mountPoint:Jt._Z})),Vn=St.provide((0,u.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:kt.entityRouteRef})),cr=St.provide((0,u.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(I=>I.AboutCard)}})),ur=St.provide((0,u.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(3555).then(e.bind(e,73555)).then(I=>I.EntityLinksCard)}})),dr=St.provide((0,u.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(I=>I.HasSystemsCard)}})),Gn=St.provide((0,u.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(I=>I.HasComponentsCard)}})),$n=St.provide((0,u.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),er=St.provide((0,u.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),fr=St.provide((0,u.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(I=>I.DependsOnComponentsCard)}})),Lr=St.provide((0,u.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(I=>I.DependencyOfComponentsCard)}})),io=St.provide((0,u.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),mr=St.provide((0,u.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var hr=e(36356);class Or{constructor({configApi:k,discoveryApi:fe,identityApi:Be}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=k,this.discoveryApi=fe,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){return`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(k,fe){const qe=`${await this.getApiOrigin()}/${fe}`,ft=await fetch(`${qe.endsWith("/")?qe:`${qe}/`}index.html`);if(ft.status===404)throw new Error("Page not found");return ft.text()}async syncEntityDocs(k){return"cached"}async getBaseUrl(k,fe,Be){const qe=await this.getApiOrigin();return new URL(k,`${qe}/${Be}`).toString()}}class ir{constructor({configApi:k,discoveryApi:fe,identityApi:Be}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=k,this.discoveryApi=fe,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(k){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(k){return{site_name:"Live preview environment",site_description:""}}}const Un=[(0,u.createApiFactory)({api:f.Dl,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:fe})=>new Or({configApi:I,discoveryApi:k,identityApi:fe})}),(0,u.createApiFactory)({api:f.gT,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:fe})=>new ir({configApi:I,discoveryApi:k,identityApi:fe})}),(0,u.createApiFactory)({api:hr.q3,deps:{configApi:u.configApiRef},factory:({configApi:I})=>hr.ae.fromConfig(I)})],tr={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},nr={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function kr(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function gr(){const I=await(0,a.defaultConfigLoader)(),k=await kr();return[...I,{context:"detected",data:k?tr:nr}]}var pr=e(86689),Yr=e(58845);const xr=(0,It.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Dr=()=>{const I=xr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:I.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 Fr=(0,It.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Mr=()=>{const I=Fr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:I.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 wr=(0,It.Z)({root:{width:E.sidebarConfig.drawerWidthClosed,height:3*E.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:E.sidebarConfig.drawerWidthClosed,marginLeft:24}}),$r=()=>{const I=wr(),{isOpen:k}=(0,E.useSidebarOpenState)();return t.createElement("div",{className:I.root},t.createElement(pr.Z,{component:S.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},k?t.createElement(Dr,null):t.createElement(Mr,null)))},Er=({children:I})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement($r,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:Yr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var Ur=e(80030),vr=e(32388),gn=e(4142);const xn=(0,It.Z)(I=>({headerIcon:{color:I.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:I.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var yn;(function(I){const k="light";I.LIGHT=k;const fe="dark";I.DARK=fe})(yn||(yn={}));const Yn=()=>{const I=(0,u.useApi)(u.appThemeApiRef),k=xn(),[fe,Be]=(0,t.useState)(I.getActiveThemeId()||yn.LIGHT),qe={[yn.LIGHT]:{icon:gn.Z,title:"Dark theme"},[yn.DARK]:{icon:vr.Z,title:"Light theme"}},{title:ft,icon:vt}=qe[fe],xt=()=>{Be(dt=>{const A=dt===yn.LIGHT?yn.DARK:yn.LIGHT;return I.setActiveThemeId(A),A})};return t.createElement(Zt.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Ur.ZP,{title:ft,arrow:!0},t.createElement(_e.Z,{size:"small",onClick:xt},t.createElement(vt,{className:k.headerIcon}))))},Nr=()=>t.createElement(R.TechDocsReaderPage,null,t.createElement(R.TechDocsReaderPageHeader,null),t.createElement(R.TechDocsReaderPageContent,{withSearch:!1})),Zr=t.createElement(Nr,null),Ar=Ce({apis:Un,configLoader:gr,plugins:Object.values(r)}),Rr=Ar.getProvider(),zr=Ar.getRouter(),Sr=R.techdocsPlugin.provide((0,f.KY)({name:"ThemeToggleAddon",component:Yn,location:f.oZ.Header})),rr=t.createElement(a.FlatRoutes,null,t.createElement(i.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(i.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(Vn,null)}),t.createElement(i.AW,{path:"/docs",element:t.createElement(R.TechDocsIndexPage,null)},t.createElement(R.DefaultTechDocsHome,null)),t.createElement(i.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(R.TechDocsReaderPage,null)},Zr,t.createElement(f.DR,null,t.createElement(Sr,null))));var Wr=()=>t.createElement(Rr,null,t.createElement(zr,null,t.createElement(Er,null,rr)));c.render(t.createElement(Wr,null),document.getElementById("root"))},76241:function(te,s,e){"use strict";e.d(s,{CT:function(){return f},EI:function(){return m},uW:function(){return i},Vt:function(){return a}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),c=y=>`__@backstage/${y}__`;function i(y,g){const E=c(y);let S=t[E];return S||(S=g(),t[E]=S,S)}var R=e(2784);function f(y){return i(y,()=>(0,R.createContext)(void 0))}function a(y){return(0,R.useContext)(f(y))}function u(y){return{set(g){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(g))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function m(y){return Object.freeze(y),{atVersion(g){return y[g]}}}},17429:function(te,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return M},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return F},EntityKindFilter:function(){return q},EntityLifecyclePicker:function(){return pn},EntityListProvider:function(){return pe},EntityOwnerPicker:function(){return Ee},EntityProcessingStatusPicker:function(){return xt},EntityRefLink:function(){return J},EntityRefLinks:function(){return z},EntityTable:function(){return Bt},EntityTagPicker:function(){return Yt},EntityTypePicker:function(){return nn},FavoriteEntity:function(){return An},InspectEntityDialog:function(){return Nr},UnregisterEntityDialog:function(){return rr},UserListPicker:function(){return Be},catalogApiRef:function(){return c},entityRouteRef:function(){return oe},getEntityRelations:function(){return mt},getEntitySourceLocation:function(){return ht},humanizeEntityRef:function(){return Ge},starredEntitiesApiRef:function(){return i},useAsyncEntity:function(){return le},useEntity:function(){return re},useEntityList:function(){return be},useEntityOwnership:function(){return fn},useEntityPermission:function(){return kt},useRelatedEntities:function(){return Dt},useStarredEntities:function(){return It}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),i=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var R=e(82394);class f{constructor(){X(this,"starredEntities",new Set);X(this,"subscribers",new Set);X(this,"observable",new ObservableImpl(T=>(T.next(new Set(this.starredEntities)),this.subscribers.add(T),()=>{this.subscribers.delete(T)})))}async toggleStarred(T){this.starredEntities.delete(T)||this.starredEntities.add(T);for(const N of this.subscribers)N.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),u=e(41156),m=e(60364),y=e(77277),g=e(4190),E=e(95544),S=e(90436),b=e(60905),O=e(36444);const $=A=>{const T=(0,u.Z)(Q=>Q.breakpoints.down("md")),N=(0,m.Z)(),[W,Y]=(0,a.useState)(!1);return T?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:N.spacing(1),marginLeft:N.spacing(1)},onClick:()=>Y(!0),startIcon:a.createElement(O.Z,null)},"Filters"),a.createElement(g.ZP,{open:W,onClose:()=>Y(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},a.createElement(E.Z,{m:2},a.createElement(S.Z,{variant:"h6",component:"h2",style:{marginBottom:N.spacing(1)}},"Filters"),A.children))):a.createElement(b.Z,{item:!0,lg:2},A.children)},B=A=>a.createElement(b.Z,{item:!0,xs:12,lg:10},A.children),F=A=>a.createElement(b.Z,{container:!0,style:{position:"relative"}},A.children);F.Filters=$,F.Content=B;var D=e(76241);const x=(0,D.CT)("entity-context"),M=({children:A,entity:T,loading:N,error:W,refresh:Y})=>{const Q={entity:T,loading:N,error:W,refresh:Y};return a.createElement(x.Provider,{value:(0,D.EI)({1:Q})},A)},K=A=>React.createElement(M,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function re(){const A=(0,D.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");if(!T.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:T.entity}}function le(){const A=(0,D.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const T=A.atVersion(1);if(!T)throw new Error("EntityContext v1 not available");const{entity:N,loading:W,error:Y,refresh:Q}=T;return{entity:N,loading:W,error:Y,refresh:Q}}var Se=e(76635),De=e(19126),Fe=e.n(De),He=e(10289),Ae=e(69294),Je=e(48760),tt=e(90736);function bt(A){return A.reduce((T,N)=>({...T,...N.getCatalogFilters?N.getCatalogFilters():{}}),{})}function At(A){return T=>A.every(N=>!N.filterEntity||N.filterEntity(T))}var Ie=e(48023);function mt(A,T,N){var Y;let W=((Y=A==null?void 0:A.relations)==null?void 0:Y.filter(Q=>Q.type===T).map(Q=>(0,Ie.of)(Q.targetRef)))||[];return N!=null&&N.kind&&(W=W.filter(Q=>Q.kind.toLocaleLowerCase("en-US")===N.kind.toLocaleLowerCase("en-US"))),W}function ht(A,T){var W;const N=(W=A.metadata.annotations)==null?void 0:W[Ie.M6];if(!!N)try{const Y=(0,Ie.Ou)(N),Q=T.byUrl(Y.target);return{locationTargetUrl:Y.target,integrationType:Q==null?void 0:Q.type}}catch{return}}function it(A,T){const N=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),W=getEntityRelations(T,RELATION_OWNED_BY).map(stringifyEntityRef);for(const Y of W)if(N.has(Y))return!0;return!1}const _=(0,a.createContext)(void 0),pe=({children:A})=>{const T=(0,tt.default)(),N=(0,t.useApi)(c),[W,Y]=(0,a.useState)({}),Q=(0,He.TH)(),he=(0,a.useMemo)(()=>{var rt;return(rt=Fe().parse(Q.search,{ignoreQueryPrefix:!0}).filters)!=null?rt:{}},[Q]),[Re,Ue]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:xe,error:Ne},ze]=(0,Ae.default)(async()=>{var Dn;const rt=(0,Se.compact)(Object.values(W)),Ve=At(rt),Ft=bt(rt),mn=bt((0,Se.compact)(Object.values(Re.appliedFilters))),Jn=Object.keys(W).reduce((En,Cn)=>{const Nn=W[Cn];return Nn!=null&&Nn.toQueryValue&&(En[Cn]=Nn.toQueryValue()),En},{});if((0,Se.isEqual)(mn,Ft))Ue({appliedFilters:W,backendEntities:Re.backendEntities,entities:Re.backendEntities.filter(Ve)});else{const En=await N.getEntities({filter:Ft});Ue({appliedFilters:W,backendEntities:En.items,entities:En.items.filter(Ve)})}if(T()){const En=Fe().parse(Q.search,{ignoreQueryPrefix:!0}),Cn=Fe().stringify({...En,filters:Jn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Nn=`${window.location.pathname}${Cn}`;(Dn=window.history)==null||Dn.replaceState(null,document.title,Nn)}},[N,he,W,Re],{loading:!0});(0,Je.Z)(ze,10,[W]);const ke=(0,a.useCallback)(rt=>{Y(Ve=>{const Ft=typeof rt=="function"?rt(Ve):rt;return{...Ve,...Ft}})},[]),Lt=(0,a.useMemo)(()=>({filters:Re.appliedFilters,entities:Re.entities,backendEntities:Re.backendEntities,updateFilters:ke,queryParameters:he,loading:xe,error:Ne}),[Re,ke,he,xe,Ne]);return a.createElement(_.Provider,{value:Lt},A)};function be(){const A=(0,a.useContext)(_);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var We=e(64279),et=e(18149),ot=e.n(et),yt=e(829),se=e.n(yt);const oe=(0,D.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function Ye(A){var T,N;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(N=(T=A.metadata.namespace)==null?void 0:T.toLocaleLowerCase("en-US"))!=null?N:DEFAULT_NAMESPACE,name:A.metadata.name}}function Ge(A,T){const N=T==null?void 0:T.defaultKind;let W,Y,Q;return"metadata"in A?(W=A.kind,Y=A.metadata.namespace,Q=A.metadata.name):(W=A.kind,Y=A.namespace,Q=A.name),Y===Ie.zG&&(Y=void 0),W=W.toLocaleLowerCase("en-US"),W=N&&N.toLocaleLowerCase("en-US")===W?void 0:W,`${W?`${W}:`:""}${Y?`${Y}/`:""}${Q}`}var we=e(82339),nt=e(80030);const J=(0,a.forwardRef)((A,T)=>{var rt;const{entityRef:N,defaultKind:W,title:Y,children:Q,...he}=A,Re=(0,t.useRouteRef)(oe);let Ue,xe,Ne;if(typeof N=="string"){const Ve=(0,Ie.of)(N);Ue=Ve.kind,xe=Ve.namespace,Ne=Ve.name}else"metadata"in N?(Ue=N.kind,xe=N.metadata.namespace,Ne=N.metadata.name):(Ue=N.kind,xe=N.namespace,Ne=N.name);Ue=Ue.toLocaleLowerCase("en-US"),xe=(rt=xe==null?void 0:xe.toLocaleLowerCase("en-US"))!=null?rt:Ie.zG;const ze={kind:Ue,namespace:xe,name:Ne},ke=Ge({kind:Ue,namespace:xe,name:Ne},{defaultKind:W}),Lt=a.createElement(we.Link,{...he,ref:T,to:Re(ze)},Q,!Q&&(Y!=null?Y:ke));return Y?a.createElement(nt.ZP,{title:ke},Lt):Lt});function z(A){const{entityRefs:T,defaultKind:N,...W}=A;return a.createElement(a.Fragment,null,T.map((Y,Q)=>a.createElement(a.Fragment,{key:Q},Q>0&&", ",a.createElement(J,{...W,entityRef:Y,defaultKind:N}))))}class q{constructor(T){this.value=T}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ce{constructor(T){this.value=T}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class de{constructor(T){this.values=T}filterEntity(T){return this.values.every(N=>{var W;return((W=T.metadata.tags)!=null?W:[]).includes(N)})}toQueryValue(){return this.values}}class Pe{constructor(T){this.value=T}filterEntity(T){var W;const N=this.value.toLocaleUpperCase("en-US");return T.metadata.name.toLocaleUpperCase("en-US").includes(N)||`${T.metadata.title}`.toLocaleUpperCase("en-US").includes(N)||((W=T.metadata.tags)==null?void 0:W.join("").toLocaleUpperCase("en-US").indexOf(N))!==-1}}class Oe{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>mt(T,Ie.S4).some(W=>Ge(W,{defaultKind:"group"})===N))}toQueryValue(){return this.values}}class Ce{constructor(T){this.values=T}filterEntity(T){return this.values.some(N=>{var W;return((W=T.spec)==null?void 0:W.lifecycle)===N})}toQueryValue(){return this.values}}class Qe{constructor(T,N,W){this.value=T,this.isOwnedEntity=N,this.isStarredEntity=W}filterEntity(T){switch(this.value){case"owned":return this.isOwnedEntity(T);case"starred":return this.isStarredEntity(T);default:return!0}}toQueryValue(){return this.value}}class Ke{constructor(T){this.value=T}filterEntity(T){var W;const N=(W=T.metadata.annotations)==null?void 0:W["backstage.io/orphan"];return N!==void 0&&this.value.toString()===N}}class gt{constructor(T){this.value=T}filterEntity(T){var W,Y;const N=((Y=(W=T==null?void 0:T.status)==null?void 0:W.items)==null?void 0:Y.length)>0;return N!==void 0&&this.value===N}}function Ct(){var Ve;const A=(0,t.useApi)(c),{filters:{kind:T,type:N},queryParameters:{type:W},updateFilters:Y}=be(),Q=(0,a.useMemo)(()=>[W].flat().filter(Boolean),[W]),[he,Re]=(0,a.useState)(Q.length?Q:(Ve=N==null?void 0:N.getTypes())!=null?Ve:[]);(0,a.useEffect)(()=>{Q.length&&Re(Q)},[Q]);const[Ue,xe]=(0,a.useState)([]),Ne=(0,a.useMemo)(()=>T==null?void 0:T.value,[T]),{error:ze,loading:ke,value:Lt}=(0,We.default)(async()=>Ne?await A.getEntityFacets({filter:{kind:Ne},facets:["spec.type"]}).then(mn=>mn.facets["spec.type"]||[]):[],[Ne,A]),rt=(0,a.useRef)(Lt);return(0,a.useEffect)(()=>{const Ft=rt.current;if(rt.current=Lt,ke||!Ne||Ft===Lt||!Lt)return;const mn=[...new Set(se()(Lt,Dn=>-Dn.count).map(Dn=>Dn.value.toLocaleLowerCase("en-US")))];xe(mn);const Jn=he.filter(Dn=>mn.includes(Dn));ot()(he,Jn)||Re(Jn)},[ke,Ne,he,Re,Lt]),(0,a.useEffect)(()=>{Y({type:he.length?new ce(he):void 0})},[he,Y]),{loading:ke,error:ze,availableTypes:Ue,selectedTypes:he,setSelectedTypes:Re}}const ct=20;function Dt(A,T){var Ue,xe;const N=(Ue=T==null?void 0:T.type)==null?void 0:Ue.toLocaleLowerCase("en-US"),W=(xe=T==null?void 0:T.kind)==null?void 0:xe.toLocaleLowerCase("en-US"),Y=(0,t.useApi)(c),{loading:Q,value:he,error:Re}=(0,We.default)(async()=>{var rt;const Ne=(rt=A.relations)==null?void 0:rt.map(Ve=>({type:Ve.type,target:(0,Ie.of)(Ve.targetRef)})).filter(Ve=>(!N||Ve.type.toLocaleLowerCase("en-US")===N)&&(!W||Ve.target.kind===W));if(!Ne)return[];const ze=Object.values((0,Se.groupBy)(Ne,({target:Ve})=>`${Ve.kind}:${Ve.namespace}`.toLocaleLowerCase("en-US"))),ke=[];for(const Ve of ze)ke.push({kind:Ve[0].target.kind,namespace:Ve[0].target.namespace,nameBatches:(0,Se.chunk)(Ve.map(Ft=>Ft.target.name),ct)});return(await Promise.all(ke.flatMap(Ve=>Ve.nameBatches.map(Ft=>Y.getEntities({filter:{kind:Ve.kind,"metadata.namespace":Ve.namespace,"metadata.name":Ft}}))))).flatMap(Ve=>Ve.items)},[A,N,W]);return{entities:he,loading:Q,error:Re}}var Ot=e(72164);function Pt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function It(){const A=(0,t.useApi)(i),T=(0,Ot.Z)(A.starredEntitie$(),new Set),N=(0,a.useCallback)(Y=>T.has(Pt(Y)),[T]),W=(0,a.useCallback)(Y=>A.toggleStarred(Pt(Y)).then(),[A]);return{starredEntities:T,toggleStarredEntity:W,isStarredEntity:N}}function zt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function Wt(A){const T=(0,t.useApi)(i),[N,W]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const Q=T.starredEntitie$().subscribe({next(he){W(he.has(zt(A)))}});return()=>{Q.unsubscribe()}},[A,T]),{toggleStarredEntity:(0,a.useCallback)(()=>T.toggleStarred(zt(A)).then(),[A,T]),isStarredEntity:N}}function fn(){const A=(0,t.useApi)(t.identityApiRef),{loading:T,value:N}=(0,We.default)(async()=>{const{ownershipEntityRefs:Y}=await A.getBackstageIdentity();return Y},[]),W=(0,a.useMemo)(()=>{const Y=new Set(N!=null?N:[]);return Q=>{const he=mt(Q,Ie.S4).map(Ie.eE);for(const Re of he)if(Y.has(Re))return!0;return!1}},[N]);return(0,a.useMemo)(()=>({loading:T,isOwnedEntity:W}),[T,W])}var Ln=e(68099);function kt(A){const{entity:T,loading:N,error:W}=le(),{allowed:Y,loading:Q,error:he}=(0,Ln.gI)({permission:A,resourceRef:T?(0,Ie.eE)(T):void 0});return N||Q?{loading:!0,allowed:!1}:W?{loading:!1,allowed:!1,error:W}:{loading:!1,allowed:Y,error:he}}const Zt=A=>{var he;const{initialFilter:T,hidden:N}=A,{updateFilters:W,queryParameters:{kind:Y}}=useEntityList(),[Q]=useState((he=[Y].flat()[0])!=null?he:T);return useEffect(()=>{W({kind:Q?new EntityKindFilter(Q):void 0})},[Q,W]),N?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var Xe=e(79692),ue=e(5806),j=e(21324),ye=e(86619),je=e(19996),_e=e(25505),st=e(38016),Rt=e(88013);const Qt=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),en=a.createElement(_e.Z,{fontSize:"small"}),tn=a.createElement(je.Z,{fontSize:"small"}),pn=()=>{var xe,Ne;const A=Qt(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{lifecycles:Y}}=be(),Q=(0,a.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[he,Re]=(0,a.useState)(Q.length?Q:(Ne=(xe=W.lifecycles)==null?void 0:xe.values)!=null?Ne:[]);(0,a.useEffect)(()=>{Q.length&&Re(Q)},[Q]),(0,a.useEffect)(()=>{T({lifecycles:he.length?new Ce(he):void 0})},[he,T]);const Ue=(0,a.useMemo)(()=>[...new Set(N.map(ze=>{var ke;return(ke=ze.spec)==null?void 0:ke.lifecycle}).filter(Boolean))].sort(),[N]);return Ue.length?a.createElement(E.Z,{pb:1,pt:1},a.createElement(S.Z,{variant:"button",component:"label"},"Lifecycle",a.createElement(Rt.ZP,{multiple:!0,options:Ue,value:he,onChange:(ze,ke)=>Re(ke),renderOption:(ze,{selected:ke})=>a.createElement(ue.Z,{control:a.createElement(j.Z,{icon:en,checkedIcon:tn,checked:ke}),label:ze}),size:"small",popupIcon:a.createElement(st.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:ze=>a.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},U=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),ae=a.createElement(_e.Z,{fontSize:"small"}),ne=a.createElement(je.Z,{fontSize:"small"}),Ee=()=>{var xe,Ne;const A=U(),{updateFilters:T,backendEntities:N,filters:W,queryParameters:{owners:Y}}=be(),Q=(0,a.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[he,Re]=(0,a.useState)(Q.length?Q:(Ne=(xe=W.owners)==null?void 0:xe.values)!=null?Ne:[]);(0,a.useEffect)(()=>{Q.length&&Re(Q)},[Q]),(0,a.useEffect)(()=>{T({owners:he.length?new Oe(he):void 0})},[he,T]);const Ue=(0,a.useMemo)(()=>[...new Set(N.flatMap(ze=>mt(ze,Ie.S4).map(ke=>Ge(ke,{defaultKind:"group"}))).filter(Boolean))].sort(),[N]);return Ue.length?a.createElement(E.Z,{pb:1,pt:1},a.createElement(S.Z,{variant:"button",component:"label"},"Owner",a.createElement(Rt.ZP,{multiple:!0,options:Ue,value:he,onChange:(ze,ke)=>Re(ke),renderOption:(ze,{selected:ke})=>a.createElement(ue.Z,{control:a.createElement(j.Z,{icon:ae,checkedIcon:ne,checked:ke}),label:ze}),size:"small",popupIcon:a.createElement(st.Z,{"data-testid":"owner-picker-expand"}),renderInput:ze=>a.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},$e=(0,Xe.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),ut=()=>{var Q,he;const A=$e(),{filters:T,updateFilters:N}=useEntityList(),[W,Y]=useState((he=(Q=T.text)==null?void 0:Q.value)!=null?he:"");return useDebounce(()=>{N({text:W.length?new EntityTextFilter(W):void 0})},250,[W,N]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:Re=>Y(Re.target.value),value:W,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>Y(""),edge:"end",disabled:W.length===0},React.createElement(Clear,null)))})))},Ze=Object.freeze({createEntityRefColumn(A){const{defaultKind:T}=A;function N(W){var Y;return((Y=W.metadata)==null?void 0:Y.title)||Ge(W,{defaultKind:T})}return{title:"Name",highlight:!0,customFilterAndSearch(W,Y){return N(Y).includes(W)},customSort(W,Y){return N(W).localeCompare(N(Y))},render:W=>{var Y;return a.createElement(J,{entityRef:W,defaultKind:T,title:(Y=W.metadata)==null?void 0:Y.title})}}},createEntityRelationColumn({title:A,relation:T,defaultKind:N,filter:W}){function Y(he){return mt(he,T,W)}function Q(he){return Y(he).map(Re=>Ge(Re,{defaultKind:N})).join(", ")}return{title:A,customFilterAndSearch(he,Re){return Q(Re).includes(he)},customSort(he,Re){return Q(he).localeCompare(Q(Re))},render:he=>a.createElement(z,{entityRefs:Y(he),defaultKind:N})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Ie.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Ie.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Ie.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>a.createElement(we.OverflowTooltip,{text:A.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),jt=[Ze.createEntityRefColumn({defaultKind:"system"}),Ze.createDomainColumn(),Ze.createOwnerColumn(),Ze.createMetadataDescriptionColumn()],Vt=[Ze.createEntityRefColumn({defaultKind:"component"}),Ze.createSystemColumn(),Ze.createOwnerColumn(),Ze.createSpecTypeColumn(),Ze.createSpecLifecycleColumn(),Ze.createMetadataDescriptionColumn()],Gt=(0,Xe.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),Bt=A=>{const{entities:T,title:N,emptyContent:W,variant:Y="gridItem",columns:Q}=A,he=Gt(),Re={minWidth:"0",width:"100%"};return Y==="gridItem"&&(Re.height="calc(100% - 10px)"),a.createElement(we.Table,{columns:Q,title:N,style:Re,emptyContent:W&&a.createElement("div",{className:he.empty},W),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:T})};Bt.columns=Ze,Bt.systemEntityColumns=jt,Bt.componentEntityColumns=Vt;const Et=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),Xt=a.createElement(_e.Z,{fontSize:"small"}),on=a.createElement(je.Z,{fontSize:"small"}),Yt=()=>{var xe,Ne;const A=Et(),{updateFilters:T,filters:N,queryParameters:{tags:W}}=be(),Y=(0,t.useApi)(c),{value:Q}=(0,We.default)(async()=>{var Lt;const ze="metadata.tags",{facets:ke}=await Y.getEntityFacets({facets:[ze],filter:(Lt=N.kind)==null?void 0:Lt.getCatalogFilters()});return ke[ze].map(({value:rt})=>rt)},[N.kind]),he=(0,a.useMemo)(()=>[W].flat().filter(Boolean),[W]),[Re,Ue]=(0,a.useState)(he.length?he:(Ne=(xe=N.tags)==null?void 0:xe.values)!=null?Ne:[]);return(0,a.useEffect)(()=>{he.length&&Ue(he)},[he]),(0,a.useEffect)(()=>{T({tags:Re.length?new de(Re):void 0})},[Re,T]),Q!=null&&Q.length?a.createElement(E.Z,{pb:1,pt:1},a.createElement(S.Z,{variant:"button",component:"label"},"Tags",a.createElement(Rt.ZP,{multiple:!0,options:Q,value:Re,onChange:(ze,ke)=>Ue(ke),renderOption:(ze,{selected:ke})=>a.createElement(ue.Z,{control:a.createElement(j.Z,{icon:Xt,checkedIcon:on,checked:ke}),label:ze}),size:"small",popupIcon:a.createElement(st.Z,{"data-testid":"tag-picker-expand"}),renderInput:ze=>a.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null};var qt=e(82108),an=e.n(qt);const nn=A=>{var xe;const{hidden:T,initialFilter:N}=A,W=(0,t.useApi)(t.alertApiRef),{error:Y,availableTypes:Q,selectedTypes:he,setSelectedTypes:Re}=Ct();if((0,a.useEffect)(()=>{Y&&W.post({message:"Failed to load entity types",severity:"error"}),N&&Re([N])},[Y,W,N,Re]),Q.length===0||Y)return null;const Ue=[{value:"all",label:"All"},...Q.map(Ne=>({value:Ne,label:an()(Ne)}))];return T?null:a.createElement(E.Z,{pb:1,pt:1},a.createElement(we.Select,{label:"Type",items:Ue,selected:(xe=Ue.length>1?he[0]:void 0)!=null?xe:"all",onChange:Ne=>Re(Ne==="all"?[]:[String(Ne)])}))};var Mt=e(15459),wt=e(61837),Jt=e(11640),Sn=e(28347);const cn=(0,Mt.Z)({root:{color:"#f3ba37"}})(Jt.Z),An=A=>{const{toggleStarredEntity:T,isStarredEntity:N}=Wt(A.entity);return a.createElement(wt.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>T()},a.createElement(nt.ZP,{title:N?"Remove from favorites":"Add to favorites"},N?a.createElement(cn,null):a.createElement(Sn.Z,null)))};var On=e(8629),Rn=e(79249),wn=e(38724),w=e(99152),h=e(6487),C=e(49429),L=e(55999),V=e(72779),me=e.n(V),ge=e(39412);const Le=ge.Z;function pt(A,T){if(A)return A.toLocaleLowerCase("en-US");if(T)try{return(0,Ie.of)(T).kind.toLocaleLowerCase("en-US")}catch{return}}function St(A,T){const N=(0,t.useApp)(),W=pt(A,T);return W&&N.getSystemIcon(`kind:${W}`)||Le}function hn(A){const{kind:T,entityRef:N,...W}=A,Y=St(T,N);return a.createElement(Y,{...W})}const Vn=(0,Xe.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function cr(A){const T=(0,t.useApi)(c),N=(0,Ie.eE)(A),{loading:W,error:Y,value:Q}=(0,We.default)(async()=>{const he=await T.getEntityAncestors({entityRef:N}),Re=new Array,Ue=new Array;for(const xe of he.items){const Ne=(0,Ie.eE)(xe.entity),ze=Ne===he.rootEntityRef;Re.push({id:Ne,root:ze,...xe.entity});for(const ke of xe.parentEntityRefs)Ue.push({from:Ne,to:ke})}return{nodes:Re,edges:Ue}},[N]);return{loading:W,error:Y,nodes:(Q==null?void 0:Q.nodes)||[],edges:(Q==null?void 0:Q.edges)||[]}}function ur({node:A}){const T=Vn(),N=(0,He.s0)(),W=(0,t.useRouteRef)(oe),[Y,Q]=(0,a.useState)(0),[he,Re]=(0,a.useState)(0),Ue=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(Ue.current){let{height:Ft,width:mn}=Ue.current.getBBox();Ft=Math.round(Ft),mn=Math.round(mn),(Ft!==he||mn!==Y)&&(Q(mn),Re(Ft))}},[Y,he]);const xe=10,Ne=he,ze=Ne+xe,ke=ze+Y+xe*2,Lt=he+xe*2,rt=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?Ge({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),Ve=()=>{N(W({kind:A.kind,namespace:A.metadata.namespace||Ie.zG,name:A.metadata.name}))};return a.createElement("g",{onClick:Ve,className:T.clickable},a.createElement("rect",{className:me()(T.node,A.root?"secondary":"primary"),width:ke,height:Lt,rx:10}),a.createElement(hn,{kind:A.kind,y:xe,x:xe,width:Ne,height:Ne,className:me()(T.text,A.root?"secondary":"primary")}),a.createElement("text",{ref:Ue,className:me()(T.text,A.root?"secondary":"primary"),y:Lt/2,x:ze+(Y+xe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},rt))}function dr(A){const{loading:T,error:N,nodes:W,edges:Y}=cr(A.entity);return T?a.createElement(we.Progress,null):N?a.createElement(we.ResponseErrorPanel,{error:N}):a.createElement(a.Fragment,null,a.createElement(L.Z,{variant:"h2"},"Ancestry"),a.createElement(L.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(we.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(E.Z,{mt:4},a.createElement(we.DependencyGraph,{nodes:W,edges:Y,renderNode:ur,direction:we.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var Gn=e(11776),$n=e(38402),er=e(86136),fr=e(99688),Lr=e(49378),io=e(54506),mr=e(94339),hr=e(24579),Or=e(27685);const ir=(0,Xe.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function Un(A){const T=ir();return a.createElement(Lr.Z,{...A,primaryTypographyProps:{className:T.monospace},secondaryTypographyProps:{className:T.monospace}})}function tr(A){const T=ir();return a.createElement(io.Z,{className:T.monospace},A.children)}function nr(A){return a.createElement(E.Z,{mt:2},a.createElement(mr.Z,{variant:"outlined"},a.createElement(hr.Z,null,a.createElement(S.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&a.createElement(pr,{to:A.helpLink})),A.children)))}function kr(A){if(A.match(/^url:https?:\/\//))return A.slice(4);if(A.match(/^https?:\/\//))return A}function gr(A){const[T,N]=A.entry,W=kr(N);return a.createElement($n.Z,null,A.indent&&a.createElement(er.Z,null),a.createElement(Un,{primary:T,secondary:W?a.createElement(we.Link,{to:W},N):N}))}function pr(A){const T=ir();return a.createElement(we.Link,{to:A.to,className:T.helpIcon},a.createElement(Or.Z,{fontSize:"inherit"}))}const Yr=(0,Xe.Z)({root:{display:"flex",flexDirection:"column"}});function xr(A){var Ue,xe;const T=(0,t.useApi)(c),N=(0,Ie.eE)(A),W=(Ue=A.metadata.annotations)==null?void 0:Ue[Ie.P1],Y=(xe=A.metadata.annotations)==null?void 0:xe[Ie.q1],{loading:Q,error:he,value:Re}=(0,We.default)(async()=>!W&&!Y?[]:(await T.getEntities({filter:[...W?[{[`metadata.annotations.${Ie.P1}`]:W}]:[],...Y?[{[`metadata.annotations.${Ie.q1}`]:Y}]:[]]})).items,[W,Y]);return{loading:Q,error:he,location:W,originLocation:Y,colocatedEntities:Re==null?void 0:Re.filter(Ne=>(0,Ie.eE)(Ne)!==N)}}function yr(A){return a.createElement(Gn.Z,{dense:!0},A.header&&a.createElement(gr,{key:"header",entry:A.header}),A.entities.map(T=>a.createElement($n.Z,{key:(0,Ie.eE)(T)},a.createElement(er.Z,null,a.createElement(hn,{kind:T.kind})),a.createElement(Un,{primary:a.createElement(J,{entityRef:T})}))))}function Dr(A){const{entity:T}=A,{loading:N,error:W,location:Y,originLocation:Q,colocatedEntities:he}=xr(T);if(N)return a.createElement(we.Progress,null);if(W)return a.createElement(we.ResponseErrorPanel,{error:W});if(!Y&&!Q)return a.createElement(fr.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return a.createElement(fr.Z,{severity:"info"},"There were no other entities on this location.");if(Y===Q)return a.createElement(yr,{entities:he});const Re=he.filter(xe=>{var Ne;return((Ne=xe.metadata.annotations)==null?void 0:Ne[Ie.P1])===Y}),Ue=he.filter(xe=>{var Ne;return((Ne=xe.metadata.annotations)==null?void 0:Ne[Ie.q1])===Q});return a.createElement(a.Fragment,null,Re.length>0&&a.createElement(yr,{entities:Re,header:["At the same location",Y]}),Ue.length>0&&a.createElement(yr,{entities:Ue,header:["At the same origin",Q]}))}function Fr(A){const T=Yr();return a.createElement(a.Fragment,null,a.createElement(L.Z,{variant:"h2"},"Colocated"),a.createElement(L.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:T.root},a.createElement(Dr,{entity:A.entity})))}function Br(A){return Object.fromEntries([...Object.entries(A)].sort((T,N)=>T[0]<N[0]?-1:1))}function Mr(A){return a.createElement(a.Fragment,null,a.createElement(L.Z,{variant:"h2"},"Entity as JSON"),a.createElement(L.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(L.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(we.CodeSnippet,{text:JSON.stringify(Br(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var wr=e(3440),$r=e.n(wr);const Er=(0,Xe.Z)({root:{display:"flex",flexDirection:"column"}});function Ur(A){var xe,Ne;const T=Er(),{apiVersion:N,kind:W,metadata:Y,spec:Q,relations:he=[],status:Re={}}=A.entity,Ue=$r()(se()(he,ze=>ze.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(L.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:T.root},a.createElement(nr,{title:"Identity"},a.createElement(Gn.Z,{dense:!0},a.createElement($n.Z,null,a.createElement(Un,{primary:"apiVersion",secondary:N})),a.createElement($n.Z,null,a.createElement(Un,{primary:"kind",secondary:W})),(Q==null?void 0:Q.type)&&a.createElement($n.Z,null,a.createElement(Un,{primary:"spec.type",secondary:Q.type})),Y.uid&&a.createElement($n.Z,null,a.createElement(Un,{primary:"uid",secondary:Y.uid})),Y.etag&&a.createElement($n.Z,null,a.createElement(Un,{primary:"etag",secondary:Y.etag})))),a.createElement(nr,{title:"Metadata"},!!Object.keys(Y.annotations||{}).length&&a.createElement(Gn.Z,{dense:!0,subheader:a.createElement(tr,null,"Annotations",a.createElement(pr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(Y.annotations).map(ze=>a.createElement(gr,{key:ze[0],indent:!0,entry:ze}))),!!Object.keys(Y.labels||{}).length&&a.createElement(Gn.Z,{dense:!0,subheader:a.createElement(tr,null,"Labels")},Object.entries(Y.labels).map(ze=>a.createElement(gr,{key:ze[0],indent:!0,entry:ze}))),!!((xe=Y.tags)!=null&&xe.length)&&a.createElement(Gn.Z,{dense:!0,subheader:a.createElement(tr,null,"Tags")},Y.tags.map((ze,ke)=>a.createElement($n.Z,{key:`${ze}-${ke}`},a.createElement(er.Z,null),a.createElement(Un,{primary:ze}))))),!!he.length&&a.createElement(nr,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ue).map(([ze,ke],Lt)=>a.createElement("div",{key:Lt},a.createElement(Gn.Z,{dense:!0,subheader:a.createElement(tr,null,ze)},ke.map(rt=>a.createElement($n.Z,{key:rt.targetRef},a.createElement(er.Z,null,a.createElement(hn,{entityRef:rt.targetRef})),a.createElement(Un,{primary:a.createElement(J,{entityRef:rt.targetRef})}))))))),!!((Ne=Re.items)!=null&&Ne.length)&&a.createElement(nr,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Re.items.map((ze,ke)=>a.createElement("div",{key:ke},a.createElement(S.Z,null,ze.level,": ",ze.type),a.createElement(E.Z,{ml:2},ze.message))))))}var vr=e(72847);function gn(A){return a.createElement(a.Fragment,null,a.createElement(L.Z,{variant:"h2"},"Entity as YAML"),a.createElement(L.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(L.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(we.CodeSnippet,{text:vr.ZP.stringify(Br(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const xn=(0,Xe.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function yn(A){const{children:T,value:N,index:W,...Y}=A,Q=xn();return a.createElement("div",{role:"tabpanel",hidden:N!==W,id:`vertical-tabpanel-${W}`,"aria-labelledby":`vertical-tab-${W}`,className:Q.tabContents,...Y},N===W&&a.createElement(E.Z,{pl:3,pr:3},T))}function Yn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function Nr(A){const T=xn(),[N,W]=a.useState(0);return(0,a.useEffect)(()=>{W(0)},[A.open]),A.entity?a.createElement(On.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:T.fullHeightDialog}},a.createElement(Rn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(wn.Z,{dividers:!0},a.createElement("div",{className:T.root},a.createElement(w.Z,{orientation:"vertical",variant:"scrollable",value:N,onChange:(Y,Q)=>W(Q),"aria-label":"Inspector options",className:T.tabs},a.createElement(h.Z,{label:"Overview",...Yn(0)}),a.createElement(h.Z,{label:"Ancestry",...Yn(1)}),a.createElement(h.Z,{label:"Colocated",...Yn(2)}),a.createElement(h.Z,{label:"Raw JSON",...Yn(3)}),a.createElement(h.Z,{label:"Raw YAML",...Yn(4)})),a.createElement(yn,{value:N,index:0},a.createElement(Ur,{entity:A.entity})),a.createElement(yn,{value:N,index:1},a.createElement(dr,{entity:A.entity})),a.createElement(yn,{value:N,index:2},a.createElement(Fr,{entity:A.entity})),a.createElement(yn,{value:N,index:3},a.createElement(Mr,{entity:A.entity})),a.createElement(yn,{value:N,index:4},a.createElement(gn,{entity:A.entity})))),a.createElement(C.Z,null,a.createElement(y.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var Zr=e(85256);function Ar(A){var Lt;const T=(0,t.useApi)(c),N=(Lt=A.metadata.annotations)==null?void 0:Lt[Ie.q1],W=A.metadata.uid,Y=N==="bootstrap:bootstrap",Q=(0,We.default)(async()=>{const rt=T.getLocationByRef(N);let Ve;if(!N)Ve=Promise.resolve([]);else{const Ft=`metadata.annotations.${Ie.q1}`;Ve=T.getEntities({filter:{[Ft]:N},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(mn=>mn.items)}return Promise.all([rt,Ve]).then(([Ft,mn])=>({location:Ft,colocatedEntities:mn}))},[T,A]),he=(0,a.useCallback)(async function(){const{location:Ve}=Q.value;await T.removeLocationById(Ve.id)},[T,Q]),Re=(0,a.useCallback)(async function(){await T.removeEntityByUid(W)},[T,W]);if(Y)return{type:"bootstrap",location:N,deleteEntity:Re};const{loading:Ue,error:xe,value:Ne}=Q;if(Ue)return{type:"loading"};if(xe)return{type:"error",error:xe};const{location:ze,colocatedEntities:ke}=Ne;return ze?{type:"unregister",location:N,colocatedEntities:ke.map(Ie.iB),unregisterLocation:he,deleteEntity:Re}:{type:"only-delete",deleteEntity:Re}}var Rr=e(10179);const zr=(0,Xe.Z)({advancedButton:{fontSize:"0.7em"}}),Sr=({entity:A,onConfirm:T})=>{var Lt;const N=(0,t.useApi)(t.alertApiRef),W=(0,t.useApi)(t.configApiRef),Y=zr(),Q=Ar(A),[he,Re]=(0,a.useState)(!1),[Ue,xe]=(0,a.useState)(!1),Ne=(Lt=W.getOptionalString("app.title"))!=null?Lt:"Backstage",ze=(0,a.useCallback)(async function(){if("unregisterLocation"in Q){xe(!0);try{await Q.unregisterLocation(),T()}catch(Ve){(0,Rr.BD)(Ve),N.post({message:Ve.message})}finally{xe(!1)}}},[N,T,Q]),ke=(0,a.useCallback)(async function(){if("deleteEntity"in Q){xe(!0);try{await Q.deleteEntity(),T()}catch(Ve){(0,Rr.BD)(Ve),N.post({message:Ve.message})}finally{xe(!1)}}},[N,T,Q]);return Q.type==="loading"?a.createElement(we.Progress,null):Q.type==="error"?a.createElement(we.ResponseErrorPanel,{error:Q.error}):Q.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement(fr.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Q.location,'"). If you believe this is in error, please contact the ',Ne," ","integrator."),a.createElement(E.Z,{marginTop:2},!he&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Re(!0)},"Advanced Options"),he&&a.createElement(a.Fragment,null,a.createElement(L.Z,null,"You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ke},"Delete Entity")))):Q.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(L.Z,null,"This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ke},"Delete Entity")):Q.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(L.Z,null,"This action will unregister the following entities:"),a.createElement(L.Z,{component:"ul"},Q.colocatedEntities.map(rt=>a.createElement("li",{key:`${rt.kind}:${rt.namespace}/${rt.name}`},a.createElement(J,{entityRef:rt})))),a.createElement(L.Z,null,"Located at the following location:"),a.createElement(L.Z,{component:"ul"},a.createElement("li",null,Q.location)),a.createElement(L.Z,null,"To undo, just re-register the entity in ",Ne,"."),a.createElement(E.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ze},"Unregister Location"),!he&&a.createElement(E.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Re(!0)},"Advanced Options"))),he&&a.createElement(a.Fragment,null,a.createElement(E.Z,{paddingTop:4,paddingBottom:4},a.createElement(Zr.Z,null)),a.createElement(L.Z,null,"You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog."),a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ke},"Delete Entity"))):a.createElement(fr.Z,{severity:"error"},"Internal error: Unknown state")},rr=A=>{const{open:T,onConfirm:N,onClose:W,entity:Y}=A;return a.createElement(On.Z,{open:T,onClose:W},a.createElement(Rn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(wn.Z,null,a.createElement(Sr,{entity:Y,onConfirm:N})),a.createElement(C.Z,null,a.createElement(y.Z,{onClick:W,color:"primary"},"Cancel")))};var lo=e(12231),Wr=e(9520),I=e(47603);const k=(0,Xe.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function fe(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:I.Z},{id:"starred",label:"Starred",icon:Jt.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const Be=A=>{var Qn;const{initialFilter:T,availableFilters:N}=A,W=k(),Q=(Qn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Qn:"Company",{filters:he,updateFilters:Re,backendEntities:Ue,queryParameters:{kind:xe,user:Ne},loading:ze}=be(),ke=["starred","all"],Lt=fe(Q).map(Tn=>({...Tn,items:Tn.items.filter(({id:Fn})=>["group","user"].some(jr=>jr===xe)?ke.includes(Fn):!N||N.includes(Fn))})).filter(({items:Tn})=>!!Tn.length),{isStarredEntity:rt}=It(),{isOwnedEntity:Ve,loading:Ft}=fn(),mn=ze||Ft,Jn=(0,a.useMemo)(()=>new Qe("owned",Ve,rt),[Ve,rt]),Dn=(0,a.useMemo)(()=>new Qe("starred",Ve,rt),[Ve,rt]),En=(0,a.useMemo)(()=>[Ne].flat()[0],[Ne]),[Cn,Nn]=(0,a.useState)(En!=null?En:T),Cr=(0,a.useMemo)(()=>Ue.filter(At((0,Se.compact)(Object.values({...he,user:void 0})))),[he,Ue]),Hr=(0,a.useMemo)(()=>({all:Cr.length,starred:Cr.filter(Tn=>Dn.filterEntity(Tn)).length,owned:Cr.filter(Tn=>Jn.filterEntity(Tn)).length}),[Cr,Dn,Jn]);return(0,a.useEffect)(()=>{En&&Nn(En)},[En]),(0,a.useEffect)(()=>{!mn&&!!Cn&&Cn!=="all"&&Hr[Cn]===0&&Nn("all")},[mn,Hr,Cn,Nn]),(0,a.useEffect)(()=>{Re({user:Cn?new Qe(Cn,Ve,rt):void 0})},[Cn,Ve,rt,Re]),a.createElement(mr.Z,{className:W.root},Lt.map(Tn=>a.createElement(a.Fragment,{key:Tn.name},a.createElement(S.Z,{variant:"subtitle2",component:"span",className:W.title},Tn.name),a.createElement(mr.Z,{className:W.groupWrapper},a.createElement(Gn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":Tn.name},Tn.items.map(Fn=>{var jr,co;return a.createElement(lo.Z,{role:"none presentation",key:Fn.id,button:!0,divider:!0,onClick:()=>Nn(Fn.id),selected:Fn.id===((jr=he.user)==null?void 0:jr.value),className:W.menuItem,disabled:Hr[Fn.id]===0,"data-testid":`user-picker-${Fn.id}`,tabIndex:0,ContainerProps:{role:"menuitem"}},Fn.icon&&a.createElement(er.Z,{className:W.listIcon},a.createElement(Fn.icon,{fontSize:"small"})),a.createElement(Lr.Z,null,a.createElement(S.Z,{variant:"body1"},Fn.label," ")),a.createElement(Wr.Z,null,(co=Hr[Fn.id])!=null?co:"-"))}))))))},qe=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),ft=a.createElement(_e.Z,{fontSize:"small"}),vt=a.createElement(je.Z,{fontSize:"small"}),xt=()=>{const A=qe(),{updateFilters:T}=be(),[N,W]=(0,a.useState)([]);function Y(Re){T({orphan:Re?new Ke(Re):void 0})}function Q(Re){T({error:Re?new gt(Re):void 0})}const he=["Is Orphan","Has Error"];return a.createElement(E.Z,{pb:1,pt:1},a.createElement(S.Z,{variant:"button",component:"label"},"Processing Status",a.createElement(Rt.ZP,{multiple:!0,options:he,value:N,onChange:(Re,Ue)=>{W(Ue),Y(Ue.includes("Is Orphan")),Q(Ue.includes("Has Error"))},renderOption:(Re,{selected:Ue})=>a.createElement(ue.Z,{control:a.createElement(j.Z,{icon:ft,checkedIcon:vt,checked:Ue}),label:Re}),size:"small",popupIcon:a.createElement(st.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:Re=>a.createElement(ye.Z,{...Re,className:A.input,variant:"outlined"})})))},dt=({children:A,value:T})=>{var Re;const[N,W]=useState((Re=T==null?void 0:T.filters)!=null?Re:{}),Y=useCallback(Ue=>{W(xe=>{const Ne=typeof Ue=="function"?Ue(xe):Ue;return{...xe,...Ne}})},[]),Q=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var Ue,xe,Ne,ze,ke;return{entities:(Ue=T==null?void 0:T.entities)!=null?Ue:Q.entities,backendEntities:(xe=T==null?void 0:T.backendEntities)!=null?xe:Q.backendEntities,updateFilters:(Ne=T==null?void 0:T.updateFilters)!=null?Ne:Y,filters:N,loading:(ze=T==null?void 0:T.loading)!=null?ze:!1,queryParameters:(ke=T==null?void 0:T.queryParameters)!=null?ke:Q.queryParameters,error:T==null?void 0:T.error}},[T,Q,N,Y]);return React.createElement(EntityListContext.Provider,{value:he},A)}},39398:function(te,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Fe},AboutContent:function(){return Se},AboutField:function(){return M}});var r=e(48023),t=e(82339),c=e(36964),i=e(36356),R=e(17429),f=e(79692),a=e(94339),u=e(32552),m=e(61837),y=e(85256),g=e(24579),E=e(52866),S=e(30254),b=e(27604),O=e(2784),$=e(47851),B=e(60905),F=e(90436),D=e(7089);const x=(0,f.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 M(He){const{label:Ae,value:Je,gridSizes:tt,children:bt}=He,At=x(),Ie=(0,c.useElementFilter)(bt,ht=>ht.getElements()),mt=Ie.length>0?Ie:O.createElement(F.Z,{variant:"body2",className:At.value},Je||"unknown");return O.createElement(B.Z,{item:!0,...tt},O.createElement(F.Z,{variant:"h2",className:At.label},Ae),mt)}var K=e(45915);const re=(0,f.Z)({description:{wordBreak:"break-word"}});function le(He,Ae,Je){if(Ae==="url"||He.includes("://"))return He;const tt=Je.type==="file"?`file://${Je.target}`:Je.target;return Ae==="file"||Je.type==="file"?new URL(He,tt).href:tt}function Se(He){var ot,yt,se,oe,Ye,Ge,we,nt;const{entity:Ae}=He,Je=re(),tt=Ae.kind.toLocaleLowerCase("en-US")==="system",bt=Ae.kind.toLocaleLowerCase("en-US")==="resource",At=Ae.kind.toLocaleLowerCase("en-US")==="component",Ie=Ae.kind.toLocaleLowerCase("en-US")==="api",mt=Ae.kind.toLocaleLowerCase("en-US")==="template",ht=Ae.kind.toLocaleLowerCase("en-US")==="location",it=Ae.kind.toLocaleLowerCase("en-US")==="group",_=(0,R.getEntityRelations)(Ae,r.cz,{kind:"system"}),pe=(0,R.getEntityRelations)(Ae,r.cz,{kind:"component"}),be=(0,R.getEntityRelations)(Ae,r.cz,{kind:"domain"}),We=(0,R.getEntityRelations)(Ae,r.S4);let et;try{et=(0,r.CV)(Ae)}catch{et=void 0}return O.createElement(B.Z,{container:!0},O.createElement(M,{label:"Description",gridSizes:{xs:12}},O.createElement(F.Z,{variant:"body2",paragraph:!0,className:Je.description},((ot=Ae==null?void 0:Ae.metadata)==null?void 0:ot.description)||"No description")),O.createElement(M,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},We.length>0&&O.createElement(R.EntityRefLinks,{entityRefs:We,defaultKind:"group"})),(tt||be.length>0)&&O.createElement(M,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},be.length>0&&O.createElement(R.EntityRefLinks,{entityRefs:be,defaultKind:"domain"})),(Ie||At||bt||_.length>0)&&O.createElement(M,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},_.length>0&&O.createElement(R.EntityRefLinks,{entityRefs:_,defaultKind:"system"})),At&&pe.length>0&&O.createElement(M,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},O.createElement(R.EntityRefLinks,{entityRefs:pe,defaultKind:"component"})),(Ie||At||bt||mt||it||ht||typeof((yt=Ae==null?void 0:Ae.spec)==null?void 0:yt.type)=="string")&&O.createElement(M,{label:"Type",value:(se=Ae==null?void 0:Ae.spec)==null?void 0:se.type,gridSizes:{xs:12,sm:6,lg:4}}),(Ie||At||typeof((oe=Ae==null?void 0:Ae.spec)==null?void 0:oe.lifecycle)=="string")&&O.createElement(M,{label:"Lifecycle",value:(Ye=Ae==null?void 0:Ae.spec)==null?void 0:Ye.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),O.createElement(M,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Ge=Ae==null?void 0:Ae.metadata)==null?void 0:Ge.tags)||[]).map(J=>O.createElement(D.Z,{key:J,size:"small",label:J}))),ht&&(((we=Ae==null?void 0:Ae.spec)==null?void 0:we.targets)||((nt=Ae==null?void 0:Ae.spec)==null?void 0:nt.target))&&O.createElement(M,{label:"Targets",gridSizes:{xs:12}},O.createElement(K.s,{cols:1,items:(Ae.spec.targets||[Ae.spec.target]).map(J=>J).map(J=>{var z;return{text:J,href:le(J,((z=Ae==null?void 0:Ae.spec)==null?void 0:z.type)||"unknown",et)}})})))}const De=(0,f.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 Fe(He){var se,oe,Ye;const{variant:Ae}=He,Je=De(),{entity:tt}=(0,R.useEntity)(),bt=(0,c.useApi)(i.q3),At=(0,c.useApi)(R.catalogApiRef),Ie=(0,c.useApi)(c.alertApiRef),mt=(0,c.useRouteRef)($.jU),ht=(0,R.getEntitySourceLocation)(tt,bt),it=(se=tt.metadata.annotations)==null?void 0:se[r.Tf],_={label:"View Source",disabled:!ht,icon:O.createElement(i.nW,{type:ht==null?void 0:ht.integrationType}),href:ht==null?void 0:ht.locationTargetUrl},pe={label:"View TechDocs",disabled:!((oe=tt.metadata.annotations)!=null&&oe["backstage.io/techdocs-ref"])||!mt,icon:O.createElement(S.Z,null),href:mt&&mt({namespace:tt.metadata.namespace||r.zG,kind:tt.kind,name:tt.metadata.name})};let be="";Ae==="gridItem"?be=Je.gridItemCard:Ae==="fullHeight"&&(be=Je.fullHeightCard);let We="";Ae==="gridItem"?We=Je.gridItemCardContent:Ae==="fullHeight"&&(We=Je.fullHeightCardContent);const et=(Ye=tt.metadata.annotations)==null?void 0:Ye[r.P1],ot=(et==null?void 0:et.startsWith("url:"))||(et==null?void 0:et.startsWith("file:")),yt=(0,O.useCallback)(async()=>{await At.refreshEntity((0,r.eE)(tt)),Ie.post({message:"Refresh scheduled",severity:"info"})},[At,Ie,tt]);return O.createElement(a.Z,{className:be},O.createElement(u.Z,{title:"About",action:O.createElement(O.Fragment,null,ot&&O.createElement(m.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:yt},O.createElement(E.Z,null)),O.createElement(m.Z,{component:t.Link,"aria-label":"Edit",disabled:!it,title:"Edit Metadata",to:it!=null?it:"#"},O.createElement(b.Z,null))),subheader:O.createElement(t.HeaderIconLinkRow,{links:[_,pe]})}),O.createElement(y.Z,null),O.createElement(g.Z,{className:We},O.createElement(Se,{entity:tt})))}},49782:function(te,s,e){"use strict";e.d(s,{K:function(){return E}});var r=e(2784),t=e(79692),c=e(12420),i=e(97580),R=e(73698),f=e(74603),a=e(12231),u=e(17429),m=e(64279),y=e(36964);const g=(0,t.Z)(S=>(0,c.Z)({root:{...S.typography.h4}}));function E(S){var De;const{initialFilter:b="component",allowedKinds:O}=S,$=g(),B=(0,y.useApi)(u.catalogApiRef),{value:F}=(0,m.default)(async()=>await B.getEntityFacets({facets:["kind"]}).then(Fe=>{var He;return((He=Fe.facets.kind)==null?void 0:He.map(Ae=>Ae.value).sort())||[]})),{updateFilters:D,queryParameters:{kind:x}}=(0,u.useEntityList)(),M=(0,r.useMemo)(()=>{var Fe;return(Fe=[x].flat()[0])==null?void 0:Fe.toLocaleLowerCase("en-US")},[x]),[K,re]=(0,r.useState)(M!=null?M:b);(0,r.useEffect)(()=>{D({kind:K?new u.EntityKindFilter(K):void 0})},[K,D]),(0,r.useEffect)(()=>{M&&re(M)},[M]);const Se=[(0,i.Z)(K)].concat((De=F==null?void 0:F.filter(Fe=>O?O.some(He=>He.toLocaleLowerCase("en-US")===Fe.toLocaleLowerCase("en-US")):!0))!=null?De:[]).sort().reduce((Fe,He)=>(Fe[He.toLocaleLowerCase("en-US")]=He,Fe),{});return r.createElement(R.Z,{input:r.createElement(f.Z,{value:K}),value:K,onChange:Fe=>re(Fe.target.value),classes:$},Object.keys(Se).map(Fe=>r.createElement(a.Z,{value:Fe,key:Fe},`${Se[Fe]}s`)))}},30097:function(te,s,e){"use strict";e.d(s,{E:function(){return O}});var r=e(48023),t=e(82339),c=e(17429),i=e(90436),R=e(15459),f=e(27604),a=e(2997),u=e(11640),m=e(28347),y=e(76635),g=e(2784),E=e(7089);const S=Object.freeze({createNameColumn($){function B(F){var D;return((D=F.metadata)==null?void 0:D.title)||(0,c.humanizeEntityRef)(F,{defaultKind:$==null?void 0:$.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:F},{entity:D}){return B(F).localeCompare(B(D))},render:({entity:F})=>{var D;return g.createElement(c.EntityRefLink,{entityRef:F,defaultKind:($==null?void 0:$.defaultKind)||"Component",title:(D=F.metadata)==null?void 0:D.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:$})=>g.createElement(c.EntityRefLinks,{entityRefs:$.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:$})=>g.createElement(c.EntityRefLinks,{entityRefs:$.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:$})=>{var B,F;return g.createElement(g.Fragment,null,(((B=$==null?void 0:$.spec)==null?void 0:B.targets)||((F=$==null?void 0:$.spec)==null?void 0:F.target))&&g.createElement(t.OverflowTooltip,{text:($.spec.targets||[$.spec.target]).join(", "),placement:"bottom-start"}))}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:$})=>g.createElement(t.OverflowTooltip,{text:$.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:$})=>g.createElement(g.Fragment,null,$.metadata.tags&&$.metadata.tags.map(B=>g.createElement(E.Z,{key:B,label:B,size:"small",variant:"outlined",style:{marginBottom:"0px"}}))),width:"auto"}},createTitleColumn($){return{title:"Title",field:"entity.metadata.title",hidden:$==null?void 0:$.hidden,searchable:!0}}}),b=(0,R.Z)({root:{color:"#f3ba37"}})(u.Z),O=$=>{var Ie,mt,ht;const{columns:B,actions:F,tableOptions:D,subtitle:x}=$,{isStarredEntity:M,toggleStarredEntity:K}=(0,c.useStarredEntities)(),{loading:re,error:le,entities:Se,filters:De}=(0,c.useEntityList)(),Fe=(0,g.useMemo)(()=>{var _;return[S.createTitleColumn({hidden:!0}),S.createNameColumn({defaultKind:(_=De.kind)==null?void 0:_.value}),...it(),S.createMetadataDescriptionColumn(),S.createTagsColumn()];function it(){var pe;switch((pe=De.kind)==null?void 0:pe.value){case"user":return[];case"domain":case"system":return[S.createOwnerColumn()];case"group":case"template":return[S.createSpecTypeColumn()];case"location":return[S.createSpecTypeColumn(),S.createSpecTargetsColumn()];default:return[S.createSystemColumn(),S.createOwnerColumn(),S.createSpecTypeColumn(),S.createSpecLifecycleColumn()]}}},[(Ie=De.kind)==null?void 0:Ie.value]),He=De.type===void 0,Ae=(0,y.capitalize)((ht=(mt=De.user)==null?void 0:mt.value)!=null?ht:"all");if(le)return g.createElement("div",null,g.createElement(t.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},g.createElement(t.CodeSnippet,{language:"text",text:le.toString()})));const Je=[({entity:it})=>{var be;const _=(be=it.metadata.annotations)==null?void 0:be[r.l2],pe="View";return{icon:()=>g.createElement(g.Fragment,null,g.createElement(i.Z,{variant:"srOnly"},pe),g.createElement(a.Z,{fontSize:"small"})),tooltip:pe,disabled:!_,onClick:()=>{!_||window.open(_,"_blank")}}},({entity:it})=>{var be;const _=(be=it.metadata.annotations)==null?void 0:be[r.Tf],pe="Edit";return{icon:()=>g.createElement(g.Fragment,null,g.createElement(i.Z,{variant:"srOnly"},pe),g.createElement(f.Z,{fontSize:"small"})),tooltip:pe,disabled:!_,onClick:()=>{!_||window.open(_,"_blank")}}},({entity:it})=>{const _=M(it),pe=_?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>g.createElement(g.Fragment,null,g.createElement(i.Z,{variant:"srOnly"},pe),_?g.createElement(b,null):g.createElement(m.Z,null)),tooltip:pe,onClick:()=>K(it)}}],tt=Se.map(it=>{const _=(0,c.getEntityRelations)(it,r.cz,{kind:"system"}),pe=(0,c.getEntityRelations)(it,r.S4);return{entity:it,resolved:{name:(0,c.humanizeEntityRef)(it,{defaultKind:"Component"}),ownedByRelationsTitle:pe.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"group"})).join(", "),ownedByRelations:pe,partOfSystemRelationTitle:_.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"system"})).join(", "),partOfSystemRelations:_}}}),bt=(B||Fe).find(it=>it.title==="Type");bt&&(bt.hidden=!He);const At=tt.length>20;return g.createElement(t.Table,{isLoading:re,columns:B||Fe,options:{paging:At,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!re,padding:"dense",pageSizeOptions:[20,50,100],...D},title:`${Ae} (${Se.length})`,data:tt,actions:F||Je,subtitle:x})};O.columns=S},45915:function(te,s,e){"use strict";e.d(s,{s:function(){return b}});var r=e(90348),t=e(11861),c=e(2784),i=e(79692),R=e(95544),f=e(90436),a=e(52160),u=e(82339);const m=(0,i.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function y(O){const{href:$,text:B,Icon:F}=O,D=m();return c.createElement(R.Z,{display:"flex"},c.createElement(R.Z,{mr:1,className:D.svgIcon},c.createElement(f.Z,{component:"div"},F?c.createElement(F,null):c.createElement(a.Z,null))),c.createElement(R.Z,{flexGrow:"1"},c.createElement(u.Link,{to:$,target:"_blank",rel:"noopener"},B||$)))}var g=e(41156);const E={xs:1,sm:1,md:1,lg:2,xl:3};function S(O){var F,D;const $=[(0,g.Z)(x=>x.breakpoints.up("xl"))?"xl":null,(0,g.Z)(x=>x.breakpoints.up("lg"))?"lg":null,(0,g.Z)(x=>x.breakpoints.up("md"))?"md":null,(0,g.Z)(x=>x.breakpoints.up("sm"))?"sm":null,(0,g.Z)(x=>x.breakpoints.up("xs"))?"xs":null];let B=1;if(typeof O=="number")B=O;else{const x=(F=$.find(M=>M!==null))!=null?F:"xs";B=(D=O==null?void 0:O[x])!=null?D:E[x]}return B}function b(O){const{items:$,cols:B=void 0}=O,F=S(B);return c.createElement(r.Z,{rowHeight:"auto",cols:F},$.map(({text:D,href:x,Icon:M},K)=>c.createElement(t.Z,{key:K},c.createElement(y,{href:x,text:D!=null?D:x,Icon:M}))))}},47851:function(te,s,e){"use strict";e.d(s,{_Z:function(){return i},jU:function(){return c},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"catalog"})},40749:function(te,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return D},J$:function(){return m},g2:function(){return c}});var r;(function(x){const M="DENY";x.DENY=M;const K="ALLOW";x.ALLOW=K;const re="CONDITIONAL";x.CONDITIONAL=re})(r||(r={}));function t(x,M){return x.name===M.name}function c(x,M){return"resourceType"in x?!M||x.resourceType===M:!1}function i(x){return x.attributes.action==="create"}function R(x){return x.attributes.action==="read"}function f(x){return x.attributes.action==="update"}function a(x){return x.attributes.action==="delete"}function u(x){return{authorize:async(M,K)=>await x.authorize(M,K),authorizeConditional(M,K){const re=M;return x.authorize(re,K)}}}function m({name:x,attributes:M,resourceType:K}){return K?{type:"resource",name:x,attributes:M,resourceType:K}:{type:"basic",name:x,attributes:M}}var y=e(10179),g=e(96279),E=e.n(g),S=e(9571),b=e(30195);const O=b.z.lazy(()=>b.z.object({rule:b.z.string(),resourceType:b.z.string(),params:b.z.array(b.z.unknown())}).or(b.z.object({anyOf:b.z.array(O).nonempty()})).or(b.z.object({allOf:b.z.array(O).nonempty()})).or(b.z.object({not:O}))),$=b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),B=b.z.union([b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),b.z.object({result:b.z.literal(r.CONDITIONAL),pluginId:b.z.string(),resourceType:b.z.string(),conditions:O})]),F=(x,M)=>b.z.object({items:b.z.array(b.z.intersection(b.z.object({id:b.z.string()}),x)).refine(K=>K.length===M.size&&K.every(({id:re})=>M.has(re)),{message:"Items in response do not match request"})});class D{constructor(M){X(this,"enabled");X(this,"discovery");var K;this.discovery=M.discovery,this.enabled=(K=M.config.getOptionalBoolean("permission.enabled"))!=null?K:!1}async authorize(M,K){return this.makeRequest(M,$,K)}async authorizeConditional(M,K){return this.makeRequest(M,B,K)}async makeRequest(M,K,re){if(!this.enabled)return M.map(Je=>({result:r.ALLOW}));const le={items:M.map(Je=>({id:S.Z(),...Je}))},Se=await this.discovery.getBaseUrl("permission"),De=await E()(`${Se}/authorize`,{method:"POST",body:JSON.stringify(le),headers:{...this.getAuthorizationHeader(re==null?void 0:re.token),"content-type":"application/json"}});if(!De.ok)throw await y.VL.fromResponse(De);const Fe=await De.json(),Ae=F(K,new Set(le.items.map(({id:Je})=>Je))).parse(Fe).items.reduce((Je,tt)=>(Je[tt.id]=tt,Je),{});return le.items.map(Je=>Ae[Je.id])}getAuthorizationHeader(M){return M?{Authorization:`Bearer ${M}`}:{}}}},68099:function(te,s,e){"use strict";e.d(s,{iM:function(){return R},RV:function(){return c},gI:function(){return a}});var r=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var i=e(40749);class R{constructor(y,g){this.permissionClient=y,this.identityApi=g}static create(y){const{config:g,discovery:E,identity:S}=y,b=new i.Y2({discovery:E,config:g});return new R(b,S)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var f=e(49857);function a(m){const y=(0,t.useApi)(c),{data:g,error:E}=(0,f.ZP)(m,async S=>{if((0,i.g2)(S.permission)&&!S.resourceRef)return i.rG.DENY;const{result:b}=await y.authorize(S);return b});return E?{error:E,loading:!1,allowed:!1}:g===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:g===i.rG.ALLOW}}const u=m=>{const{permission:y,resourceRef:g,errorComponent:E,...S}=m,b=usePermission(isResourcePermission(y)?{permission:y,resourceRef:g}:{permission:y}),O=useApp(),{NotFoundErrorPage:$}=O.getComponents();let B=E===void 0?React.createElement($,null):E;return b.loading?B=null:b.allowed&&(B=m.element),React.createElement(Route,{...S,element:B})}},74450:function(te,s,e){"use strict";e.d(s,{FA:function(){return a},Nd:function(){return K},Rx:function(){return D}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class c{constructor(oe){this.mockedResults=oe}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var i=e(2784),R=e(79692);const f=(0,R.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),a=({text:se,preTag:oe,postTag:Ye})=>{const Ge=f(),we=(0,i.useMemo)(()=>se.split(new RegExp(`(${oe}.+?${Ye})`)),[Ye,oe,se]);return i.createElement(i.Fragment,null,we.map((nt,J)=>nt.includes(oe)?i.createElement("mark",{className:Ge.highlight,key:J},nt.replace(new RegExp(`${oe}|${Ye}`,"g"),"")):nt))};var u=e(42494),m=e(84899),y=e(5806),g=e(21324),E=e(56939),S=e(73698),b=e(12231),O=e(76241),$=e(64279),B=e(1849);const F=(0,O.CT)("search-context"),D=()=>{const se=(0,i.useContext)(F);if(!se)throw new Error("useSearch must be used within a SearchContextProvider");const oe=se.atVersion(1);if(!oe)throw new Error("No SearchContext v1 found");return oe},x=()=>useContext(F)!==void 0,M={term:"",pageCursor:void 0,filters:{},types:[]},K=se=>{var Ot,Pt,It,zt;const{initialState:oe=M,children:Ye}=se,Ge=(0,r.useApi)(t),[we,nt]=(0,i.useState)(oe.pageCursor),[J,z]=(0,i.useState)(oe.filters),[q,ce]=(0,i.useState)(oe.term),[de,Pe]=(0,i.useState)(oe.types),Oe=(0,B.Z)(q),Ce=(0,$.default)(()=>Ge.query({term:q,filters:J,pageCursor:we,types:de}),[q,J,de,we]),Qe=!Ce.loading&&!Ce.error&&((Ot=Ce.value)==null?void 0:Ot.nextPageCursor),Ke=!Ce.loading&&!Ce.error&&((Pt=Ce.value)==null?void 0:Pt.previousPageCursor),gt=(0,i.useCallback)(()=>{var Wt;nt((Wt=Ce.value)==null?void 0:Wt.nextPageCursor)},[(It=Ce.value)==null?void 0:It.nextPageCursor]),Ct=(0,i.useCallback)(()=>{var Wt;nt((Wt=Ce.value)==null?void 0:Wt.previousPageCursor)},[(zt=Ce.value)==null?void 0:zt.previousPageCursor]);(0,i.useEffect)(()=>{Oe!==void 0&&q!==Oe&&nt(void 0)},[q,Oe,nt]);const ct={result:Ce,filters:J,setFilters:z,term:q,setTerm:ce,types:de,setTypes:Pe,pageCursor:we,setPageCursor:nt,fetchNextPage:Qe?gt:void 0,fetchPreviousPage:Ke?Ct:void 0},Dt=(0,O.EI)({1:ct});return i.createElement(r.AnalyticsContext,{attributes:{searchTypes:de.sort().join(",")}},i.createElement(F.Provider,{value:Dt,children:Ye}))};var re=e(86619),le=e(7089),Se=e(88013),De=e(69294),Fe=e(48760);const He=(se,oe,Ye=[],Ge=250)=>{const we=(0,i.useRef)({}),nt=se||(()=>Promise.resolve([])),[J,z]=(0,De.default)(nt,[oe],{loading:!0});if((0,Fe.Z)(()=>{we.current[oe]===void 0&&(we.current[oe]=z(oe).then(ce=>(we.current[oe]=ce,ce)))},Ge,[z,oe]),Ye.length)return{loading:!1,value:Ye};const q=we.current[oe];return Array.isArray(q)?{loading:!1,value:q}:J},Ae=(se,oe)=>{const{setFilters:Ye}=D();(0,i.useEffect)(()=>{oe&&[oe].flat().length>0&&Ye(Ge=>({...Ge,[se]:oe}))},[])},Je=se=>{const{className:oe,defaultValue:Ye,name:Ge,values:we,valuesDebounceMs:nt,label:J,filterSelectedOptions:z,limitTags:q,multiple:ce}=se,[de,Pe]=(0,i.useState)("");Ae(Ge,Ye);const Oe=typeof we=="function"?we:void 0,Ce=typeof we=="function"?void 0:we,{value:Qe,loading:Ke}=He(Oe,de,Ce,nt),{filters:gt,setFilters:Ct}=D(),ct=gt[Ge]||(ce?[]:null),Dt=(It,zt)=>{Ct(Wt=>{const{[Ge]:fn,...Ln}=Wt;return zt?{...Ln,[Ge]:zt}:{...Ln}})},Ot=It=>i.createElement(re.Z,{...It,name:"search",variant:"outlined",label:J,fullWidth:!0}),Pt=(It,zt)=>It.map((Wt,fn)=>i.createElement(le.Z,{label:Wt,color:"primary",...zt({index:fn})}));return i.createElement(Se.ZP,{filterSelectedOptions:z,limitTags:q,multiple:ce,className:oe,id:`${ce?"multi-":""}select-filter-${Ge}--select`,options:Qe||[],loading:Ke,value:ct,onChange:Dt,onInputChange:(It,zt)=>Pe(zt),renderInput:Ot,renderTags:Pt})},tt=(0,R.Z)({label:{textTransform:"capitalize"}}),bt=se=>{const{className:oe,defaultValue:Ye,label:Ge,name:we,values:nt=[],valuesDebounceMs:J}=se,z=tt(),{filters:q,setFilters:ce}=D();Ae(we,Ye);const de=typeof nt=="function"?nt:void 0,Pe=typeof nt=="function"?void 0:nt,{value:Oe=[],loading:Ce}=He(de,"",Pe,J),Qe=Ke=>{const{target:{value:gt,checked:Ct}}=Ke;ce(ct=>{const{[we]:Dt,...Ot}=ct,Pt=(Dt||[]).filter(zt=>zt!==gt),It=Ct?[...Pt,gt]:Pt;return It.length?{...Ot,[we]:It}:Ot})};return i.createElement(u.Z,{className:oe,disabled:Ce,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Ge?i.createElement(m.Z,{className:z.label},Ge):null,Oe.map(Ke=>{var gt;return i.createElement(y.Z,{key:Ke,control:i.createElement(g.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Ke},value:Ke,name:Ke,onChange:Qe,checked:((gt=q[we])!=null?gt:[]).includes(Ke)}),label:Ke})}))},At=se=>{const{className:oe,defaultValue:Ye,label:Ge,name:we,values:nt,valuesDebounceMs:J}=se,z=tt();Ae(we,Ye);const q=typeof nt=="function"?nt:void 0,ce=typeof nt=="function"?void 0:nt,{value:de=[],loading:Pe}=He(q,"",ce,J),{filters:Oe,setFilters:Ce}=D(),Qe=Ke=>{const{target:{value:gt}}=Ke;Ce(Ct=>{const{[we]:ct,...Dt}=Ct;return gt?{...Dt,[we]:gt}:Dt})};return i.createElement(u.Z,{disabled:Pe,className:oe,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Ge?i.createElement(E.Z,{className:z.label,margin:"dense"},Ge):null,i.createElement(S.Z,{variant:"outlined",value:Oe[we]||"",onChange:Qe},i.createElement(b.Z,{value:""},i.createElement("em",null,"All")),de.map(Ke=>i.createElement(b.Z,{key:Ke,value:Ke},Ke))))},Ie=({component:se,...oe})=>i.createElement(se,{...oe});Ie.Checkbox=se=>i.createElement(Ie,{...se,component:bt}),Ie.Select=se=>i.createElement(Ie,{...se,component:At}),Ie.Autocomplete=se=>i.createElement(Ie,{...se,component:Je});var mt=e(82339);const ht=({children:se})=>{const{result:{loading:oe,error:Ye,value:Ge}}=useSearch();return oe?React.createElement(Progress,null):Ye?React.createElement(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:Ye}):Ge!=null&&Ge.results.length?React.createElement(React.Fragment,null,se({results:Ge.results})):React.createElement(EmptyState,{missing:"data",title:"Sorry, no results were found"})},it=se=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"}},React.createElement(ht,{...se})),_=(0,R.Z)(se=>({root:{display:"flex",justifyContent:"space-between",gap:se.spacing(2),margin:se.spacing(2,0)}})),pe=()=>{const{fetchNextPage:se,fetchPreviousPage:oe}=useSearch(),Ye=_();return!se&&!oe?React.createElement(React.Fragment,null):React.createElement("nav",{"arial-label":"pagination navigation",className:Ye.root},React.createElement(Button,{"aria-label":"previous page",disabled:!oe,onClick:oe,startIcon:React.createElement(ArrowBackIosIcon,null)},"Previous"),React.createElement(Button,{"aria-label":"next page",disabled:!se,onClick:se,endIcon:React.createElement(ArrowForwardIosIcon,null)},"Next"))},be=({children:se})=>{const oe=useAnalytics(),{term:Ye}=useSearch();return useEffect(()=>{Ye&&oe.captureEvent("search",Ye)},[oe,Ye]),React.createElement(React.Fragment,null,se)},We=({onChange:se,onKeyDown:oe,onSubmit:Ye,debounceTime:Ge=200,clearButton:we=!0,fullWidth:nt=!0,value:J,inputProps:z={},endAdornment:q,...ce})=>{const de=useApi(configApiRef),[Pe,Oe]=useState(J),Ce=useSearchContextCheck();useEffect(()=>{Oe(Pt=>Pt!==J?J:Pt)},[J]),useDebounce(()=>se(Pe),Ge,[Pe]);const Qe=useCallback(Pt=>{Oe(Pt.target.value)},[Oe]),Ke=useCallback(Pt=>{oe&&oe(Pt),Ye&&Pt.key==="Enter"&&Ye()},[oe,Ye]),gt=useCallback(()=>{se("")},[se]),Ct=`Search in ${de.getOptionalString("app.title")||"Backstage"}`,ct=React.createElement(InputAdornment,{position:"start"},React.createElement(IconButton,{"aria-label":"Query",disabled:!0},React.createElement(SearchIcon,null))),Dt=React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"Clear",onClick:gt},React.createElement(ClearButton,null))),Ot=React.createElement(TrackSearch,null,React.createElement(InputBase,{"data-testid":"search-bar-next",value:Pe,placeholder:Ct,startAdornment:ct,endAdornment:we?Dt:q,inputProps:{"aria-label":"Search",...z},fullWidth:nt,onChange:Qe,onKeyDown:Ke,...ce}));return Ce?Ot:React.createElement(SearchContextProvider,null,Ot)},et=({onChange:se,...oe})=>{const{term:Ye,setTerm:Ge}=useSearch(),we=useCallback(nt=>{se?se(nt):Ge(nt)},[se,Ge]);return React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"}},React.createElement(We,{value:Ye,onChange:we,...oe}))},ot=({result:se,highlight:oe,rank:Ye,icon:Ge,secondaryAction:we,lineClamp:nt=5})=>{const J=useAnalytics(),z=()=>{J.captureEvent("discover",se.title,{attributes:{to:se.location},value:Ye})};return React.createElement(Link,{noTrack:!0,to:se.location,onClick:z},React.createElement(ListItem,{alignItems:"center"},Ge&&React.createElement(ListItemIcon,null,Ge),React.createElement(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:oe!=null&&oe.fields.title?React.createElement(HighlightedSearchResultText,{text:oe.fields.title,preTag:oe.preTag,postTag:oe.postTag}):se.title,secondary:React.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:nt,overflow:"hidden"}},oe!=null&&oe.fields.text?React.createElement(HighlightedSearchResultText,{text:oe.fields.text,preTag:oe.preTag,postTag:oe.postTag}):se.text)}),we&&React.createElement(Box,{alignItems:"flex-end"},we)),React.createElement(Divider,null))},yt=se=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"}},React.createElement(ot,{...se}))},56338:function(te,s,e){"use strict";e.d(s,{Ox:function(){return Ae},Zz:function(){return R},oZ:function(){return le},DR:function(){return f},ZS:function(){return K},VA:function(){return bt},KY:function(){return u},gT:function(){return S},Dl:function(){return b},ux:function(){return tt},$L:function(){return E},x1:function(){return re}});var r=e(2784),t=e(10289),c=e(36964);const i="techdocs.addons.addon.v1",R="techdocs.addons.wrapper.v1",f=()=>null;(0,c.attachComponentData)(f,R,!0);const a=_=>`${i}.${_.toLocaleLowerCase("en-US")}`;function u(_){const{name:pe,component:be}=_;return(0,c.createReactExtension)({name:pe,component:{sync:We=>r.createElement(be,{...We})},data:{[i]:_,[a(pe)]:!0}})}const m=(_,pe)=>_.selectByComponentData({key:pe}).getElements()[0],y=_=>_.selectByComponentData({key:R}).selectByComponentData({key:i}),g=_=>_.selectByComponentData({key:R}).findComponentData({key:i}),E=()=>{const _=(0,t.pC)(),pe=(0,c.useElementFilter)(_,y),be=(0,c.useElementFilter)(_,g),We=(0,r.useCallback)(yt=>{var oe;if(!pe||!yt)return null;const se=a(yt.name);return(oe=m(pe,se))!=null?oe:null},[pe]),et=(0,r.useCallback)(yt=>{const se=be.find(oe=>oe.name===yt);return se?We(se):null},[be,We]),ot=(0,r.useCallback)(yt=>{const se=be.filter(oe=>oe.location===yt);return se.length?se.map(We):null},[be,We]);return{renderComponentByName:et,renderComponentsByLocation:ot}},S=(0,c.createApiRef)({id:"plugin.techdocs.service"}),b=(0,c.createApiRef)({id:"plugin.techdocs.storageservice"});var O=e(64279),$=e(48023),B=e(76241);function F(_,pe){return pe.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(_.kind=_.kind.toLocaleLowerCase(),_.name=_.name.toLocaleLowerCase(),_.namespace=_.namespace.toLocaleLowerCase()),_}const D=(_,pe)=>(0,$.eE)(_)===(0,$.eE)(pe),x={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},M=(0,B.CT)("techdocs-reader-page-context"),K=(0,r.memo)(({entityRef:_,children:pe})=>{const be=(0,c.useApi)(S),We=(0,c.useApi)(c.configApiRef),et=(0,O.default)(async()=>be.getTechDocsMetadata(_),[_]),ot=(0,O.default)(async()=>be.getEntityMetadata(_),[_]),[yt,se]=(0,r.useState)(x.title),[oe,Ye]=(0,r.useState)(x.subtitle),[Ge,we]=(0,r.useState)(x.shadowRoot),nt={metadata:et,entityRef:F(_,We),entityMetadata:ot,shadowRoot:Ge,setShadowRoot:we,title:yt,setTitle:se,subtitle:oe,setSubtitle:Ye},J=(0,B.EI)({1:nt});return r.createElement(M.Provider,{value:J},pe instanceof Function?pe(nt):pe)},(_,pe)=>D(_.entityRef,pe.entityRef)),re=()=>{const _=(0,r.useContext)(M);if(_===void 0)return x;const pe=_.atVersion(1);if(pe===void 0)throw new Error("No context found for version 1.");return pe},le=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var Se=e(6553),De=e(50236),Fe=e(19219),He=e(82339);const Ae="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",Je=_=>{(0,r.useEffect)(()=>{var ot;if(!_)return()=>{};const pe=_.querySelectorAll('head > link[rel="stylesheet"]');let be=(ot=pe==null?void 0:pe.length)!=null?ot:0;const We=new CustomEvent(Ae);if(!be)return _.dispatchEvent(We),()=>{};const et=()=>{--be===0&&_.dispatchEvent(We)};return pe==null||pe.forEach(yt=>{yt.addEventListener("load",et)}),()=>{pe==null||pe.forEach(yt=>{yt.removeEventListener("load",et)})}},[_])},tt=_=>{const[pe,be]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!_)return()=>{};be(!0);const We=_.style;We.setProperty("opacity","0");const et=()=>{be(!1),We.setProperty("opacity","1")};return _.addEventListener(Ae,et),()=>{_.removeEventListener(Ae,et)}},[_]),pe},bt=({element:_,onAppend:pe,children:be})=>{const[We,et]=(0,r.useState)((0,Se.Ue)({...(0,De.Z)(),insertionPoint:void 0}));Je(_);const ot=tt(_),yt=(0,r.useCallback)(se=>{if(!_||!se)return;et((0,Se.Ue)({...(0,De.Z)(),insertionPoint:_.querySelector("head")||void 0}));let oe=se.shadowRoot;oe||(oe=se.attachShadow({mode:"open"})),oe.replaceChildren(_),typeof pe=="function"&&pe(oe)},[_,pe]);return r.createElement(r.Fragment,null,ot&&r.createElement(He.Progress,null),r.createElement(Fe.ZP,{jss:We,sheetsManager:new Map},r.createElement("div",{ref:yt,"data-testid":"techdocs-native-shadowroot"}),be))};var At=e(54073);const Ie=()=>{const{shadowRoot:_}=useTechDocsReaderPage();return _},mt=_=>{const pe=Ie();return pe?_.map(be=>pe==null?void 0:pe.querySelectorAll(be)).filter(be=>be.length).map(be=>Array.from(be)).flat():[]},ht=_=>_.toString()&&_.rangeCount&&_.getRangeAt(0).getBoundingClientRect().top,it=(_=0)=>{const pe=Ie(),[be,We]=useState(null),et=useMemo(()=>debounce(()=>{const ot=pe,yt=ot.getSelection?ot.getSelection():document.getSelection();yt&&ht(yt)?We(yt):We(null)},_),[pe,We,_]);return useEffect(()=>(window.document.addEventListener("selectionchange",et),()=>window.document.removeEventListener("selectionchange",et)),[et]),be}},94067:function(te,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return O},Router:function(){return b},isTechDocsAvailable:function(){return S}});var r=e(2784),t=e(10289),c=e(17429),i=e(82339),R=e(48023),f=e(20961),a=e(16172),u=e(63126);const m=({entity:$})=>{const B=(0,R.iB)($);return r.createElement(f.I6,{entityRef:B},r.createElement(a.b,null),r.createElement(u.F,{withSearch:!1}))};var y=e(50021),g=e(26220);const E="backstage.io/techdocs-ref",S=$=>{var B,F;return Boolean((F=(B=$==null?void 0:$.metadata)==null?void 0:B.annotations)==null?void 0:F[E])},b=()=>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(g.TechDocsReaderPage,null)})),O=$=>{var M;const{children:B}=$,{entity:F}=(0,c.useEntity)(),D=(0,t.V$)([{path:"/*",element:r.createElement(m,{entity:F}),children:[{path:"/*",element:B}]}]);return((M=F.metadata.annotations)==null?void 0:M[E])?D:r.createElement(i.MissingAnnotationEmptyState,{annotation:E})}},3337:function(te,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(te,s,e){"use strict";e.d(s,{k:function(){return R},p:function(){return i}});var r=e(10179),t=e(76372),c=e.n(t);class i{constructor(a){X(this,"configApi");X(this,"discoveryApi");X(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:u,namespace:m,name:y}=a,E=`${await this.getApiOrigin()}/metadata/techdocs/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}async getEntityMetadata(a){const{kind:u,namespace:m,name:y}=a,E=`${await this.getApiOrigin()}/metadata/entity/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}}class R{constructor(a){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");X(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,u){const{kind:m,namespace:y,name:g}=a,S=`${await this.getStorageUrl()}/${y}/${m}/${g}/${u}`,b=await this.fetchApi.fetch(`${S.endsWith("/")?S:`${S}/`}index.html`);let O="";switch(b.status){case 404:throw O="Page not found. ",u||(O+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(O);case 500:throw O="Could not generate documentation or an error in the TechDocs backend. ",new Error(O);default:break}return b.text()}async syncEntityDocs(a,u=()=>{}){const{kind:m,namespace:y,name:g}=a,S=`${await this.getApiOrigin()}/sync/${y}/${m}/${g}`,{token:b}=await this.identityApi.getCredentials();return new Promise((O,$)=>{const B=new t.EventSourcePolyfill(S,{withCredentials:!0,headers:b?{Authorization:`Bearer ${b}`}:{}});B.addEventListener("log",F=>{F.data&&u(JSON.parse(F.data))}),B.addEventListener("finish",F=>{let D=!1;F.data&&({updated:D}=JSON.parse(F.data)),O(D?"updated":"cached")}),B.onerror=F=>{switch(B.close(),F.status){case 404:$(new r.dR(F.message));return;default:$(new Error(F.data));return}}})}async getBaseUrl(a,u,m){const{kind:y,namespace:g,name:E}=u,b=`${await this.getApiOrigin()}/static/docs/${g}/${y}/${E}/${m}`;return new URL(a,b.endsWith("/")?b:`${b}/`).toString()}}},97589:function(te,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(te,s,e){"use strict";e.d(s,{u:function(){return a}});var r=e(2784),t=e(82339),c=e(17429),i=e(1114),R=e(70335),f=e(21956);const a=u=>{const{initialFilter:m="owned",columns:y,actions:g}=u;return r.createElement(i.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(c.EntityListProvider,null,r.createElement(c.CatalogFilterLayout,null,r.createElement(c.CatalogFilterLayout.Filters,null,r.createElement(R.f,null),r.createElement(c.UserListPicker,{initialFilter:m}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.CatalogFilterLayout.Content,null,r.createElement(f.EntityListDocsTable,{actions:g,columns:y}))))))}},51016:function(te,s,e){"use strict";e.d(s,{f:function(){return y}});var r=e(68725),t=e(97589),c=e(36964),i=e(82339),R=e(94339),f=e(16111),a=e(24579),u=e(14503),m=e(2784);const y=S=>{const{entities:b}=S,O=(0,c.useRouteRef)(r.Fw),$=(0,c.useApi)(c.configApiRef);return b?m.createElement(i.ItemCardGrid,{"data-testid":"docs-explore"},b!=null&&b.length?b.map((B,F)=>{var D,x;return m.createElement(R.Z,{key:F},m.createElement(f.Z,null,m.createElement(i.ItemCardHeader,{title:(D=B.metadata.title)!=null?D:B.metadata.name})),m.createElement(a.Z,null,B.metadata.description),m.createElement(u.Z,null,m.createElement(i.Button,{to:O({namespace:(0,t.D)((x=B.metadata.namespace)!=null?x:"default",$),kind:(0,t.D)(B.kind,$),name:(0,t.D)(B.metadata.name,$)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var g=e(17429);const E=()=>{const{loading:S,error:b,entities:O}=useEntityList();return b?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:b.toString()})):S||!O?React.createElement(Progress,null):(O.sort(($,B)=>{var F,D;return((F=$.metadata.title)!=null?F:$.metadata.name).localeCompare((D=B.metadata.title)!=null?D:B.metadata.name)}),React.createElement(DocsCardGrid,{entities:O}))}},38634:function(te,s,e){"use strict";e.d(s,{H:function(){return g}});var r=e(2784),t=e(95074),c=e(36964),i=e(48023),R=e(17429),f=e(68725),a=e(82339),u=e(98095),m=e(3792),y=e(97589);const g=E=>{const{entities:S,title:b,loading:O,columns:$,actions:B}=E,[,F]=(0,t.Z)(),D=(0,c.useRouteRef)(f.Fw),x=(0,c.useApi)(c.configApiRef);if(!S)return null;const M=S.map(le=>{var De;const Se=(0,R.getEntityRelations)(le,i.S4);return{entity:le,resolved:{docsUrl:D({namespace:(0,y.D)((De=le.metadata.namespace)!=null?De:"default",x),kind:(0,y.D)(le.kind,x),name:(0,y.D)(le.metadata.name,x)}),ownedByRelations:Se,ownedByRelationsTitle:Se.map(Fe=>(0,R.humanizeEntityRef)(Fe,{defaultKind:"group"})).join(", ")}}}),K=[m.N.createNameColumn(),m.N.createOwnerColumn(),m.N.createTypeColumn()],re=[u.n.createCopyDocsUrlAction(F)];return r.createElement(r.Fragment,null,O||M&&M.length>0?r.createElement(a.Table,{isLoading:O,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:M,columns:$||K,actions:B||re,title:b?`${b} (${M.length})`:`All (${M.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")}))};g.columns=m.N,g.actions=u.n},12481:function(te,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),i=e.n(c),R=e(82339),f=e(17429),a=e(38634),u=e(98095),m=e(3792);const y=g=>{var re,le;const{columns:E,actions:S}=g,{loading:b,error:O,entities:$,filters:B}=(0,f.useEntityList)(),{isStarredEntity:F,toggleStarredEntity:D}=(0,f.useStarredEntities)(),[,x]=(0,t.Z)(),M=(0,c.capitalize)((le=(re=B.user)==null?void 0:re.value)!=null?le:"all"),K=[u.n.createCopyDocsUrlAction(x),u.n.createStarEntityAction(F,D)];return O?r.createElement(R.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(R.CodeSnippet,{language:"text",text:O.toString()})):r.createElement(a.H,{title:M,entities:$,loading:b,actions:S||K,columns:E})};y.columns=m.N,y.actions=u.n},98095:function(te,s,e){"use strict";e.d(s,{n:function(){return a}});var r=e(2784),t=e(39981),c=e(2337),i=e(11640),R=e(28347);const f=(0,c.Z)({root:{color:"#f3ba37"}})(i.Z),a={createCopyDocsUrlAction(u){return m=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>u(`${window.location.origin}${m.resolved.docsUrl}`)})},createStarEntityAction(u,m){return({entity:y})=>{const g=u(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>g?r.createElement(f,null):r.createElement(R.Z,null),tooltip:g?"Remove from favorites":"Add to favorites",onClick:()=>m(y)}}}}},3792:function(te,s,e){"use strict";e.d(s,{N:function(){return R}});var r=e(2784),t=e(82339),c=e(17429);function i(f){return f.metadata.title||f.metadata.name}const R={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:f=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:f.resolved.docsUrl},i(f.entity)),subvalue:f.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:f})=>r.createElement(c.EntityRefLinks,{entityRefs:f.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(te,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),c=e(72580),i=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(te,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return i}});var r=e(2784),t=e(10289),c=e(2546);const i=R=>(0,t.pC)()||r.createElement(c.u,{...R})},1114:function(te,s,e){"use strict";e.d(s,{j:function(){return i}});var r=e(2784),t=e(82339),c=e(36964);const i=R=>{var m;const{children:f}=R,u=`Documentation available in ${(m=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?m:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},f)}},70335:function(te,s,e){"use strict";e.d(s,{f:function(){return i}});var r=e(2784),t=e(17429);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const i=()=>{const{updateFilters:R}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{R({techdocs:new c})},[R]),null}},7729:function(te,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956);e.o(t,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return t.DefaultTechDocsHome}});var c=e(2546),i=e(1114),R=e(70335)},15390:function(te,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}});var r=e(7729)},82250:function(te,s,e){"use strict";e.d(s,{TechDocsIndexPage:function(){return u.Jl},TechDocsReaderPage:function(){return u.I6},TechDocsReaderPageContent:function(){return R.Fq},TechDocsReaderPageHeader:function(){return R.SE},plugin:function(){return u.s4},techdocsPlugin:function(){return u.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(s,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}});var c=e(3337),i=e(42723),R=e(96393),f=e(47861),a=e(15390);e.o(a,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return a.DefaultTechDocsHome}});var u=e(20961),m=e(94067)},20961:function(te,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return m},s4:function(){return R}});var r=e(56338),t=e(42723),c=e(68725),i=e(36964);const R=(0,i.createPlugin)({id:"techdocs",apis:[(0,i.createApiFactory)({api:r.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef,fetchApi:i.fetchApiRef},factory:({configApi:g,discoveryApi:E,identityApi:S,fetchApi:b})=>new t.k({configApi:g,discoveryApi:E,identityApi:S,fetchApi:b})}),(0,i.createApiFactory)({api:r.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({configApi:g,discoveryApi:E,fetchApi:S})=>new t.p({configApi:g,discoveryApi:E,fetchApi:S})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),f=R.provide((0,i.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.Router),mountPoint:c._Z})),a=R.provide((0,i.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(g=>g.EmbeddedDocsRouter),mountPoint:c.pd})),u=R.provide((0,i.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(g=>g.TechDocsCustomHome),mountPoint:c._Z})),m=R.provide((0,i.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(g=>g.TechDocsIndexPage),mountPoint:c._Z})),y=R.provide((0,i.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(g=>g.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(te,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return u},TechDocsReaderPage:function(){return m}});var r=e(2784),t=e(10289),c=e(82339),i=e(56338),R=e(63126),f=e(99954),a=e(16172);const u=({withSearch:y,withHeader:g=!0})=>r.createElement(c.Page,{themeId:"documentation"},g&&r.createElement(f.S,null),r.createElement(a.b,null),r.createElement(R.F,{withSearch:y})),m=y=>{const{kind:g,name:E,namespace:S}=(0,t.UO)(),{children:b,entityRef:O={kind:g,name:E,namespace:S}}=y,$=(0,t.pC)();if(!b){const F=($?r.Children.toArray($.props.children):[]).find(D=>{var M,K;const{type:x}=D;return!((K=(M=x==null?void 0:x.__backstage_data)==null?void 0:M.map)!=null&&K.get(i.Zz))});return r.createElement(i.ZS,{entityRef:O},F||r.createElement(u,null))}return r.createElement(i.ZS,{entityRef:O},({metadata:B,entityMetadata:F,onReady:D})=>r.createElement("div",{className:"techdocs-reader-page"},r.createElement(c.Page,{themeId:"documentation"},b instanceof Function?b({entityRef:O,techdocsMetadataValue:B.value,entityMetadataValue:F.value,onReady:D}):b)))}},63126:function(te,s,e){"use strict";e.d(s,{F:function(){return tn}});var r=e(2784),t=e(79692),c=e(60905),i=e(56338),R=e(82339),f=e(47861),a=e(4614),u=e(77277),m=e(99688),y=e(12420),g=e(90436),E=e(61837),S=e(4190),b=e(87685);const O=(0,t.Z)(U=>(0,y.Z)({paper:{width:"100%",[U.breakpoints.up("sm")]:{width:"75%"},[U.breakpoints.up("md")]:{width:"50%"},padding:U.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:U.palette.background.default}})),$=({buildLog:U,onClose:ae})=>{const ne=O(),Ee=U.length===0?"Waiting for logs...":U.join(`
|
|
32
|
+
`);return r.createElement(c.Z,{container:!0,direction:"column",className:ne.root,spacing:0,wrap:"nowrap"},r.createElement(c.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(g.Z,{variant:"h5"},"Build Details"),r.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:ae,color:"inherit"},r.createElement(b.Z,null))),r.createElement(R.LogViewer,{text:Ee,classes:{root:ne.logs}}))},B=({buildLog:U})=>{const ae=O(),[ne,Ee]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(u.Z,{color:"inherit",onClick:()=>Ee(!0)},"Show Build Logs"),r.createElement(S.ZP,{classes:{paper:ae.paper},anchor:"right",open:ne,onClose:()=>Ee(!1)},r.createElement($,{buildLog:U,onClose:()=>Ee(!1)})))};var F=e(36964);const D=({errorMessage:U})=>{const ae=(0,F.useApi)(F.configApiRef).getOptionalString("techdocs.builder");let ne="";return ae!=="local"&&(ne="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(R.ErrorPage,{status:"404",statusMessage:U||"Documentation not found",additionalInfo:ne})};var x=e(2263);const M=(0,t.Z)(U=>({root:{marginBottom:U.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),K=()=>{let U=null;const ae=M(),{state:ne,contentReload:Ee,contentErrorMessage:$e,syncErrorMessage:ut,buildLog:Ze}=(0,x.DK)();return ne==="INITIAL_BUILD"&&(U=r.createElement(m.Z,{classes:{root:ae.root},variant:"outlined",severity:"info",icon:r.createElement(a.Z,{size:"24px"}),action:r.createElement(B,{buildLog:Ze})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ne==="CONTENT_STALE_REFRESHING"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(a.Z,{size:"24px"}),action:r.createElement(B,{buildLog:Ze}),classes:{root:ae.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ne==="CONTENT_STALE_READY"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(u.Z,{color:"inherit",onClick:()=>Ee()},"Refresh"),classes:{root:ae.root}},"A newer version of this documentation is now available, please refresh to view.")),ne==="CONTENT_STALE_ERROR"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:Ze}),classes:{root:ae.root,message:ae.message}},"Building a newer version of this documentation failed."," ",ut)),ne==="CONTENT_NOT_FOUND"&&(U=r.createElement(r.Fragment,null,ut&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(B,{buildLog:Ze}),classes:{root:ae.root,message:ae.message}},"Building a newer version of this documentation failed."," ",ut),r.createElement(D,{errorMessage:$e}))),U};var re=e(10289),le=e(60364),Se=e(41156),De=e(36356),Fe=e(35368),He=e.n(Fe);const Ae=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Je=/^https:\/\/fonts\.googleapis\.com/,tt=/^https:\/\/fonts\.gstatic\.com/,bt=U=>U.nodeName==="LINK",At=U=>{const ae=(U==null?void 0:U.getAttribute("href"))||"",ne=ae.match(Ae),Ee=ae.match(Je),$e=ae.match(tt);return ne||Ee||$e},Ie=U=>(bt(U)&&!At(U)&&U.remove(),U),mt=U=>U.nodeName==="IFRAME",ht=(U,ae)=>{const ne=U.getAttribute("src")||"";try{const{host:Ee}=new URL(ne);return ae.includes(Ee)}catch{return!1}},it=U=>ae=>(mt(ae)&&!ht(ae,U)&&ae.remove(),ae),_=()=>{const U=(0,F.useApi)(F.configApiRef);return(0,r.useMemo)(()=>U.getOptionalConfig("techdocs.sanitizer"),[U])},pe=()=>{const U=_();return(0,r.useCallback)(async ae=>{const ne=U==null?void 0:U.getOptionalStringArray("allowedIframeHosts");He().addHook("beforeSanitizeElements",Ie);const Ee=["link"];return ne&&(Ee.push("iframe"),He().addHook("beforeSanitizeElements",it(ne))),He().sanitize(ae.innerHTML,{ADD_TAGS:Ee,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[U])};var be=e(41128),We=({theme:U})=>`
|
|
33
|
+
/*================== Variables ==================*/
|
|
34
|
+
/*
|
|
35
|
+
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
36
|
+
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
:host {
|
|
40
|
+
/* FONT */
|
|
41
|
+
--md-default-fg-color: ${U.palette.text.primary};
|
|
42
|
+
--md-default-fg-color--light: ${U.palette.text.secondary};
|
|
43
|
+
--md-default-fg-color--lighter: ${(0,be.$n)(U.palette.text.secondary,.7)};
|
|
44
|
+
--md-default-fg-color--lightest: ${(0,be.$n)(U.palette.text.secondary,.3)};
|
|
45
|
+
|
|
46
|
+
/* BACKGROUND */
|
|
47
|
+
--md-default-bg-color:${U.palette.background.default};
|
|
48
|
+
--md-default-bg-color--light: ${U.palette.background.paper};
|
|
49
|
+
--md-default-bg-color--lighter: ${(0,be.$n)(U.palette.background.paper,.7)};
|
|
50
|
+
--md-default-bg-color--lightest: ${(0,be.$n)(U.palette.background.paper,.3)};
|
|
51
|
+
|
|
52
|
+
/* PRIMARY */
|
|
53
|
+
--md-primary-fg-color: ${U.palette.primary.main};
|
|
54
|
+
--md-primary-fg-color--light: ${U.palette.primary.light};
|
|
55
|
+
--md-primary-fg-color--dark: ${U.palette.primary.dark};
|
|
56
|
+
--md-primary-bg-color: ${U.palette.primary.contrastText};
|
|
57
|
+
--md-primary-bg-color--light: ${(0,be.$n)(U.palette.primary.contrastText,.7)};
|
|
58
|
+
|
|
59
|
+
/* ACCENT */
|
|
60
|
+
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
+
|
|
62
|
+
/* SHADOW */
|
|
63
|
+
--md-shadow-z1: ${U.shadows[1]};
|
|
64
|
+
--md-shadow-z2: ${U.shadows[2]};
|
|
65
|
+
--md-shadow-z3: ${U.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: ${U.palette.text.primary};
|
|
102
|
+
--md-code-bg-color: ${U.palette.background.paper};
|
|
103
|
+
--md-code-hl-color: ${(0,be.Fq)(U.palette.warning.main,.5)};
|
|
104
|
+
--md-code-hl-keyword-color: ${U.palette.type==="dark"?U.palette.primary.light:U.palette.primary.dark};
|
|
105
|
+
--md-code-hl-function-color: ${U.palette.type==="dark"?U.palette.secondary.light:U.palette.secondary.dark};
|
|
106
|
+
--md-code-hl-string-color: ${U.palette.type==="dark"?U.palette.success.light:U.palette.success.dark};
|
|
107
|
+
--md-code-hl-number-color: ${U.palette.type==="dark"?U.palette.error.light:U.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: ${U.palette.text.primary};
|
|
122
|
+
--md-typeset-del-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.error.dark,.5):(0,be.Fq)(U.palette.error.light,.5)};
|
|
123
|
+
--md-typeset-ins-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.success.dark,.5):(0,be.Fq)(U.palette.success.light,.5)};
|
|
124
|
+
--md-typeset-mark-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.warning.dark,.5):(0,be.Fq)(U.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
|
+
`,et=({theme:U})=>`
|
|
141
|
+
/*================== Reset ==================*/
|
|
142
|
+
|
|
143
|
+
body {
|
|
144
|
+
--md-text-color: var(--md-default-fg-color);
|
|
145
|
+
--md-text-link-color: var(--md-accent-fg-color);
|
|
146
|
+
--md-text-font-family: ${U.typography.fontFamily};
|
|
147
|
+
font-family: var(--md-text-font-family);
|
|
148
|
+
background-color: unset;
|
|
149
|
+
}
|
|
150
|
+
`;const ot="224px";var yt=({theme:U,sidebar:ae})=>`
|
|
151
|
+
/*================== Layout ==================*/
|
|
152
|
+
|
|
153
|
+
.md-grid {
|
|
154
|
+
max-width: 100%;
|
|
155
|
+
margin: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.md-nav {
|
|
159
|
+
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
160
|
+
}
|
|
161
|
+
.md-nav__link {
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
}
|
|
166
|
+
.md-nav__icon {
|
|
167
|
+
height: 20px !important;
|
|
168
|
+
width: 20px !important;
|
|
169
|
+
margin-left:${U.spacing(1)}px;
|
|
170
|
+
}
|
|
171
|
+
.md-nav__icon svg {
|
|
172
|
+
margin: 0;
|
|
173
|
+
width: 20px !important;
|
|
174
|
+
height: 20px !important;
|
|
175
|
+
}
|
|
176
|
+
.md-nav__icon:after {
|
|
177
|
+
width: 20px !important;
|
|
178
|
+
height: 20px !important;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
182
|
+
text-decoration: underline;
|
|
183
|
+
color: var(--md-typeset-a-color);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.md-main__inner {
|
|
187
|
+
margin-top: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.md-sidebar {
|
|
191
|
+
bottom: 75px;
|
|
192
|
+
position: fixed;
|
|
193
|
+
width: 16rem;
|
|
194
|
+
overflow-y: auto;
|
|
195
|
+
overflow-x: hidden;
|
|
196
|
+
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
197
|
+
scrollbar-width: thin;
|
|
198
|
+
}
|
|
199
|
+
.md-sidebar .md-sidebar__scrollwrap {
|
|
200
|
+
width: calc(12.1rem);
|
|
201
|
+
}
|
|
202
|
+
.md-sidebar--secondary {
|
|
203
|
+
right: ${U.spacing(3)}px;
|
|
204
|
+
}
|
|
205
|
+
.md-sidebar::-webkit-scrollbar {
|
|
206
|
+
width: 5px;
|
|
207
|
+
}
|
|
208
|
+
.md-sidebar::-webkit-scrollbar-button {
|
|
209
|
+
width: 5px;
|
|
210
|
+
height: 5px;
|
|
211
|
+
}
|
|
212
|
+
.md-sidebar::-webkit-scrollbar-track {
|
|
213
|
+
background: #eee;
|
|
214
|
+
border: 1 px solid rgb(250, 250, 250);
|
|
215
|
+
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
216
|
+
border-radius: 3px;
|
|
217
|
+
}
|
|
218
|
+
.md-sidebar::-webkit-scrollbar-thumb {
|
|
219
|
+
width: 5px;
|
|
220
|
+
background: rgb(193, 193, 193);
|
|
221
|
+
border: transparent;
|
|
222
|
+
border-radius: 3px;
|
|
223
|
+
}
|
|
224
|
+
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
225
|
+
background: rgb(125, 125, 125);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.md-content {
|
|
229
|
+
max-width: calc(100% - 16rem * 2);
|
|
230
|
+
margin-left: 16rem;
|
|
231
|
+
margin-bottom: 50px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.md-footer {
|
|
235
|
+
position: fixed;
|
|
236
|
+
bottom: 0px;
|
|
237
|
+
}
|
|
238
|
+
.md-footer__title {
|
|
239
|
+
background-color: unset;
|
|
240
|
+
}
|
|
241
|
+
.md-footer-nav__link {
|
|
242
|
+
width: 16rem;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.md-dialog {
|
|
246
|
+
background-color: unset;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@media screen and (min-width: 76.25em) {
|
|
250
|
+
.md-sidebar {
|
|
251
|
+
height: auto;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@media screen and (max-width: 76.1875em) {
|
|
256
|
+
.md-nav {
|
|
257
|
+
transition: none !important;
|
|
258
|
+
background-color: var(--md-default-bg-color)
|
|
259
|
+
}
|
|
260
|
+
.md-nav--primary .md-nav__title {
|
|
261
|
+
cursor: auto;
|
|
262
|
+
color: var(--md-default-fg-color);
|
|
263
|
+
font-weight: 700;
|
|
264
|
+
white-space: normal;
|
|
265
|
+
line-height: 1rem;
|
|
266
|
+
height: auto;
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-flow: column;
|
|
269
|
+
row-gap: 1.6rem;
|
|
270
|
+
padding: 1.2rem .8rem .8rem;
|
|
271
|
+
background-color: var(--md-default-bg-color);
|
|
272
|
+
}
|
|
273
|
+
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
274
|
+
box-shadow: none;
|
|
275
|
+
}
|
|
276
|
+
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
277
|
+
border-top: none;
|
|
278
|
+
}
|
|
279
|
+
.md-nav--primary .md-nav__title .md-nav__button {
|
|
280
|
+
display: none;
|
|
281
|
+
}
|
|
282
|
+
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
283
|
+
color: var(--md-default-fg-color);
|
|
284
|
+
position: static;
|
|
285
|
+
height: auto;
|
|
286
|
+
margin: 0 0 0 -0.2rem;
|
|
287
|
+
}
|
|
288
|
+
.md-nav--primary > .md-nav__title [for="none"] {
|
|
289
|
+
padding-top: 0;
|
|
290
|
+
}
|
|
291
|
+
.md-nav--primary .md-nav__item {
|
|
292
|
+
border-top: none;
|
|
293
|
+
}
|
|
294
|
+
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
295
|
+
font-size : var(--md-typeset-font-size);
|
|
296
|
+
}
|
|
297
|
+
.md-nav .md-source {
|
|
298
|
+
display: none;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.md-sidebar {
|
|
302
|
+
height: 100%;
|
|
303
|
+
}
|
|
304
|
+
.md-sidebar--primary {
|
|
305
|
+
width: 12.1rem !important;
|
|
306
|
+
z-index: 200;
|
|
307
|
+
left: ${ae.isPinned?`calc(-12.1rem + ${ot})`:"calc(-12.1rem + 72px)"} !important;
|
|
308
|
+
}
|
|
309
|
+
.md-sidebar--secondary:not([hidden]) {
|
|
310
|
+
display: none;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.md-content {
|
|
314
|
+
max-width: 100%;
|
|
315
|
+
margin-left: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.md-header__button {
|
|
319
|
+
margin: 0.4rem 0;
|
|
320
|
+
margin-left: 0.4rem;
|
|
321
|
+
padding: 0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.md-overlay {
|
|
325
|
+
left: 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.md-footer {
|
|
329
|
+
position: static;
|
|
330
|
+
padding-left: 0;
|
|
331
|
+
}
|
|
332
|
+
.md-footer-nav__link {
|
|
333
|
+
/* footer links begin to overlap at small sizes without setting width */
|
|
334
|
+
width: 50%;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@media screen and (max-width: 600px) {
|
|
339
|
+
.md-sidebar--primary {
|
|
340
|
+
left: -12.1rem !important;
|
|
341
|
+
width: 12.1rem;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
`;const se=["h1","h2","h3","h4","h5","h6"];var oe=({theme:U})=>`
|
|
345
|
+
/*================== Typeset ==================*/
|
|
346
|
+
|
|
347
|
+
.md-typeset {
|
|
348
|
+
font-size: var(--md-typeset-font-size);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
${se.reduce((ae,ne)=>{var Bt;const Ee=(Bt=U.typography.htmlFontSize)!=null?Bt:16,$e=U.typography[ne],{lineHeight:ut,fontFamily:Ze,fontWeight:jt,fontSize:Vt}=$e,Gt=Et=>{let Xt=1;return typeof Et=="number"&&(Xt=Et/Ee),typeof Et=="string"&&(Xt=Et.replace("rem","")),`calc(${Xt} * var(--md-typeset-font-size))`};return ae.concat(`
|
|
352
|
+
.md-typeset ${ne} {
|
|
353
|
+
color: var(--md-default-fg-color);
|
|
354
|
+
line-height: ${ut};
|
|
355
|
+
font-family: ${Ze};
|
|
356
|
+
font-weight: ${jt};
|
|
357
|
+
font-size: ${Gt(Vt)};
|
|
358
|
+
}
|
|
359
|
+
`)},"")}
|
|
360
|
+
|
|
361
|
+
.md-typeset .md-content__button {
|
|
362
|
+
color: var(--md-default-fg-color);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.md-typeset hr {
|
|
366
|
+
border-bottom: 0.05rem dotted ${U.palette.divider};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.md-typeset details {
|
|
370
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
371
|
+
}
|
|
372
|
+
.md-typeset details summary {
|
|
373
|
+
padding-left: 2.5rem !important;
|
|
374
|
+
}
|
|
375
|
+
.md-typeset details summary:before,
|
|
376
|
+
.md-typeset details summary:after {
|
|
377
|
+
top: 50% !important;
|
|
378
|
+
width: 20px !important;
|
|
379
|
+
height: 20px !important;
|
|
380
|
+
transform: rotate(0deg) translateY(-50%) !important;
|
|
381
|
+
}
|
|
382
|
+
.md-typeset details[open] > summary:after {
|
|
383
|
+
transform: rotate(90deg) translateX(-50%) !important;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.md-typeset blockquote {
|
|
387
|
+
color: var(--md-default-fg-color--light);
|
|
388
|
+
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.md-typeset table:not([class]) {
|
|
392
|
+
font-size: var(--md-typeset-font-size);
|
|
393
|
+
border: 1px solid var(--md-default-fg-color);
|
|
394
|
+
border-bottom: none;
|
|
395
|
+
border-collapse: collapse;
|
|
396
|
+
}
|
|
397
|
+
.md-typeset table:not([class]) th {
|
|
398
|
+
font-weight: bold;
|
|
399
|
+
}
|
|
400
|
+
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
401
|
+
border-bottom: 1px solid var(--md-default-fg-color);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
405
|
+
background-color: hsla(0, 0%, 0%, 0.32);
|
|
406
|
+
}
|
|
407
|
+
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
408
|
+
background-color: hsla(0, 0%, 0%, 0.87);
|
|
409
|
+
}
|
|
410
|
+
`,Ye=()=>`
|
|
411
|
+
/*================== Animations ==================*/
|
|
412
|
+
/*
|
|
413
|
+
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
414
|
+
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
415
|
+
*/
|
|
416
|
+
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
417
|
+
transition: none;
|
|
418
|
+
}
|
|
419
|
+
`,Ge=({theme:U})=>`
|
|
420
|
+
/*================== Extensions ==================*/
|
|
421
|
+
|
|
422
|
+
/* HIGHLIGHT */
|
|
423
|
+
.highlight .md-clipboard:after {
|
|
424
|
+
content: unset;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.highlight .nx {
|
|
428
|
+
color: ${U.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/* CODE HILITE */
|
|
432
|
+
.codehilite .gd {
|
|
433
|
+
background-color: ${U.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.codehilite .gi {
|
|
437
|
+
background-color: ${U.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* TABBED */
|
|
441
|
+
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
442
|
+
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
443
|
+
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
444
|
+
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
445
|
+
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
446
|
+
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
447
|
+
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
448
|
+
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
449
|
+
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
450
|
+
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
451
|
+
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
452
|
+
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
453
|
+
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
454
|
+
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
455
|
+
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
456
|
+
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
457
|
+
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
458
|
+
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
459
|
+
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
460
|
+
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
461
|
+
color: var(--md-accent-fg-color);
|
|
462
|
+
border-color: var(--md-accent-fg-color);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/* TASK-LIST */
|
|
466
|
+
.task-list-control .task-list-indicator::before {
|
|
467
|
+
background-color: ${U.palette.action.disabledBackground};
|
|
468
|
+
}
|
|
469
|
+
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
470
|
+
background-color: ${U.palette.success.main};
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/* ADMONITION */
|
|
474
|
+
.admonition {
|
|
475
|
+
font-size: var(--md-typeset-font-size) !important;
|
|
476
|
+
}
|
|
477
|
+
.admonition .admonition-title {
|
|
478
|
+
padding-left: 2.5rem !important;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.admonition .admonition-title:before {
|
|
482
|
+
top: 50% !important;
|
|
483
|
+
width: 20px !important;
|
|
484
|
+
height: 20px !important;
|
|
485
|
+
transform: translateY(-50%) !important;
|
|
486
|
+
}
|
|
487
|
+
`;const we=[We,et,yt,oe,Ye,Ge],nt=()=>(0,R.useSidebarPinState)(),J=()=>{const U=nt(),ae=(0,le.Z)();return(0,r.useMemo)(()=>{const ne={theme:ae,sidebar:U};return we.reduce((Ee,$e)=>Ee+$e(ne),"")},[ae,U])},z=()=>{const U=J();return(0,r.useCallback)(ae=>(ae.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${U}</style>`),ae),[U])},q=(U,ae,ne)=>{const Ee=U==="src"&&ae.endsWith(".svg"),$e=!ae.match(/^([a-z]*:)?\/\//i),ut=ae.startsWith(ne);return Ee&&($e||ut)},ce=({techdocsStorageApi:U,entityId:ae,path:ne})=>async Ee=>{const $e=await U.getApiOrigin(),ut=async(Ze,jt)=>{for(const Vt of Ze)if(Vt.hasAttribute(jt)){const Gt=Vt.getAttribute(jt);if(!Gt)return;const Bt=await U.getBaseUrl(Gt,ae,ne);if(q(jt,Gt,$e))try{const Xt=await(await fetch(Bt,{credentials:"include"})).text();Vt.setAttribute(jt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(Xt)))}`)}catch{Vt.setAttribute("alt",`Error: ${Gt}`)}else Vt.setAttribute(jt,Bt)}};return await Promise.all([ut(Ee.querySelectorAll("img"),"src"),ut(Ee.querySelectorAll("script"),"src"),ut(Ee.querySelectorAll("source"),"src"),ut(Ee.querySelectorAll("link"),"href"),ut(Ee.querySelectorAll("a[download]"),"href")]),Ee};var de=e(68370),Pe=e(67097),Oe=e(47093),Ce=e(82717),Qe=e.n(Ce);const Ke=U=>ae=>{var Xt;const ne=ae.querySelector('[title="Edit this page"]');if(!ne||!ne.href)return ae;const Ee=new URL(ne.href),$e=U.byUrl(Ee);if(($e==null?void 0:$e.type)!=="github"&&($e==null?void 0:$e.type)!=="gitlab")return ae;const ut=((Xt=ae.querySelector("article>h1"))==null?void 0:Xt.childNodes[0].textContent)||"",Ze=encodeURIComponent(`Documentation Feedback: ${ut}`),jt=encodeURIComponent(`Page source:
|
|
488
|
+
${ne.href}
|
|
489
|
+
|
|
490
|
+
Feedback:`),Vt=($e==null?void 0:$e.type)==="github"?(0,de.Pb)(Ee.href,"blob"):Ee.href,Gt=Qe()(Vt),Bt=`/${Gt.organization}/${Gt.name}`,Et=ne.cloneNode();switch($e==null?void 0:$e.type){case"gitlab":Et.href=`${Ee.origin}${Bt}/issues/new?issue[title]=${Ze}&issue[description]=${jt}`;break;case"github":Et.href=`${Ee.origin}${Bt}/issues/new?title=${Ze}&body=${jt}`;break;default:return ae}return Oe.render(r.createElement(Pe.Z),Et),Et.style.paddingLeft="5px",Et.title="Leave feedback for this page",Et.id="git-feedback-link",ne==null||ne.insertAdjacentElement("beforebegin",Et),ae};var gt=e(44882);const Ct=()=>U=>{const ae=U.querySelector('.md-header label[for="__drawer"]'),ne=U.querySelector("article");if(!ae||!ne)return U;const Ee=ae.cloneNode();return Oe.render(r.createElement(gt.Z),Ee),Ee.id="toggle-sidebar",Ee.title="Toggle Sidebar",Ee.classList.add("md-content__button"),Ee.style.setProperty("padding","0 0 0 5px"),Ee.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),ne==null||ne.prepend(Ee),U},ct=()=>U=>(((ne,Ee)=>{Array.from(ne).filter($e=>$e.hasAttribute(Ee)).forEach($e=>{const ut=$e.getAttribute(Ee);if(ut){ut.match(/^https?:\/\//i)&&$e.setAttribute("target","_blank");try{const Ze=Dt(window.location.href);$e.setAttribute(Ee,new URL(ut,Ze).toString())}catch{$e.replaceWith($e.textContent||ut)}}})})(Array.from(U.getElementsByTagName("a")),"href"),U);function Dt(U){const ae=new URL(U);return!ae.pathname.endsWith("/")&&!ae.pathname.endsWith(".html")&&(ae.pathname+="/"),ae.toString()}const Ot=({baseUrl:U,onClick:ae})=>ne=>(Array.from(ne.getElementsByTagName("a")).forEach(Ee=>{Ee.addEventListener("click",$e=>{const Ze=Ee.getAttribute("href");!Ze||Ze.startsWith(U)&&!Ee.hasAttribute("download")&&($e.preventDefault(),ae($e,Ze))})}),ne);var Pt=e(15459),It=e(80030),zt=e(72379),Wt=e(41547);const fn=(0,Pt.Z)(U=>({tooltip:{fontSize:"inherit",color:U.palette.text.primary,margin:0,padding:U.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(It.ZP),Ln=()=>r.createElement(zt.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"})),kt=({text:U})=>{const[ae,ne]=(0,r.useState)(!1),Ee=(0,r.useCallback)(()=>{navigator.clipboard.writeText(U),ne(!0)},[U]),$e=(0,r.useCallback)(()=>{ne(!1)},[ne]);return r.createElement(fn,{title:"Copied to clipboard",placement:"left",open:ae,onClose:$e,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:Ee},r.createElement(Ln,null)))},Zt=U=>ae=>{var Ee;const ne=ae.querySelectorAll("pre > code");for(const $e of ne){const ut=$e.textContent||"",Ze=document.createElement("div");(Ee=$e==null?void 0:$e.parentElement)==null||Ee.prepend(Ze),Oe.render(r.createElement(Wt.Z,{theme:U},r.createElement(kt,{text:ut})),Ze)}return ae},Xe=()=>U=>{var ae;return(ae=U.querySelector(".md-header"))==null||ae.remove(),U},ue=()=>U=>{var ae,ne;return(ae=U.querySelector(".md-footer .md-copyright"))==null||ae.remove(),(ne=U.querySelector(".md-footer-copyright"))==null||ne.remove(),U},j=({onLoading:U,onLoaded:ae})=>ne=>(U(),ne.addEventListener(i.Ox,function Ee(){ae(),ne.removeEventListener(i.Ox,Ee)}),ne),ye=()=>U=>(setTimeout(()=>{var ae;if(window.location.hash){const ne=window.location.hash.slice(1);(ae=U==null?void 0:U.querySelector(`[id="${ne}"]`))==null||ae.scrollIntoView()}},200),U),je=async(U,ae)=>{let ne;if(typeof U=="string")ne=new DOMParser().parseFromString(U,"text/html").documentElement;else if(U instanceof Element)ne=U;else throw new Error("dom is not a recognized type");for(const Ee of ae)ne=await Ee(ne);return ne},_e="screen and (max-width: 76.1875em)",st=U=>{const ae=(0,re.s0)(),ne=(0,le.Z)(),Ee=(0,Se.Z)(_e),$e=pe(),ut=z(),Ze=(0,F.useApi)(i.Dl),jt=(0,F.useApi)(De.q3),{state:Vt,path:Gt,content:Bt}=(0,x.DK)(),[Et,Xt]=(0,r.useState)(null),on=(0,i.ux)(Et),Yt=(0,r.useCallback)(()=>{if(!Et)return;Et.querySelectorAll(".md-sidebar").forEach(wt=>{var Jt,Sn,cn;if(Ee)wt.style.top="0px";else{const An=document==null?void 0:document.querySelector(".techdocs-reader-page"),On=(Jt=An==null?void 0:An.getBoundingClientRect().top)!=null?Jt:0;let Rn=(Sn=Et.getBoundingClientRect().top)!=null?Sn:0;const wn=Et.querySelector(".md-container > .md-tabs"),w=(cn=wn==null?void 0:wn.getBoundingClientRect().height)!=null?cn:0;Rn<On&&(Rn=On),wt.style.top=`${Math.max(Rn,0)+w}px`}wt.style.setProperty("opacity","1")})},[Et,Ee]);(0,r.useEffect)(()=>(window.addEventListener("resize",Yt),window.addEventListener("scroll",Yt,!0),()=>{window.removeEventListener("resize",Yt),window.removeEventListener("scroll",Yt,!0)}),[Et,Yt]);const qt=(0,r.useCallback)(()=>{if(!Et)return;const Mt=Et.querySelector(".md-footer");Mt&&(Mt.style.width=`${Et.getBoundingClientRect().width}px`)},[Et]);(0,r.useEffect)(()=>(window.addEventListener("resize",qt),()=>{window.removeEventListener("resize",qt)}),[Et,qt]),(0,r.useEffect)(()=>{on||(qt(),Yt())},[Vt,on,qt,Yt]);const an=(0,r.useCallback)((Mt,wt)=>je(Mt,[$e,ce({techdocsStorageApi:Ze,entityId:U,path:wt}),ct(),Ct(),Xe(),ue(),Ke(jt),ut]),[U,jt,Ze,$e,ut]),nn=(0,r.useCallback)(async Mt=>je(Mt,[ye(),Zt(ne),Ot({baseUrl:window.location.origin,onClick:(wt,Jt)=>{var An;const Sn=wt.ctrlKey||wt.metaKey,cn=new URL(Jt);cn.hash?Sn?window.open(`${cn.pathname}${cn.hash}`,"_blank"):(ae(`${cn.pathname}${cn.hash}`),(An=Mt==null?void 0:Mt.querySelector(`#${cn.hash.slice(1)}`))==null||An.scrollIntoView()):Sn?window.open(cn.pathname,"_blank"):ae(cn.pathname)}}),j({onLoading:()=>{},onLoaded:()=>{var wt;(wt=Mt.querySelector(".md-nav__title"))==null||wt.removeAttribute("for")}}),j({onLoading:()=>{Array.from(Mt.querySelectorAll(".md-sidebar")).forEach(Jt=>{Jt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[ne,ae]);return(0,r.useEffect)(()=>{if(!Bt)return()=>{};let Mt=!0;return an(Bt,Gt).then(async wt=>{if(!(wt!=null&&wt.innerHTML)||!Mt)return;window.scroll({top:0});const Jt=await nn(wt);Xt(Jt)}),()=>{Mt=!1}},[Bt,Gt,an,nn]),Et};var Rt=e(8560);const Qt=()=>{const U=(0,i.$L)(),{shadowRoot:ae}=(0,i.x1)(),ne=ae==null?void 0:ae.querySelector('[data-md-component="content"]'),Ee=ae==null?void 0:ae.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let $e=Ee==null?void 0:Ee.querySelector('[data-techdocs-addons-location="primary sidebar"]');$e||($e=document.createElement("div"),$e.setAttribute("data-techdocs-addons-location","primary sidebar"),Ee==null||Ee.prepend($e));const ut=ae==null?void 0:ae.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Ze=ut==null?void 0:ut.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Ze||(Ze=document.createElement("div"),Ze.setAttribute("data-techdocs-addons-location","secondary sidebar"),ut==null||ut.prepend(Ze)),r.createElement(r.Fragment,null,r.createElement(Rt.Z,{container:$e},U.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(Rt.Z,{container:ne},U.renderComponentsByLocation(i.oZ.Content)),r.createElement(Rt.Z,{container:Ze},U.renderComponentsByLocation(i.oZ.SecondarySidebar)))},en=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),tn=(0,x.m1)(U=>{var Bt;const{withSearch:ae=!0,onReady:ne}=U,Ee=en(),{entityMetadata:{value:$e,loading:ut},entityRef:Ze,setShadowRoot:jt}=(0,i.x1)(),Vt=st(Ze),Gt=(0,r.useCallback)(Et=>{jt(Et),ne instanceof Function&&ne()},[jt,ne]);return ut===!1&&!$e?r.createElement(R.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):Vt?r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(K,null)),ae&&r.createElement(c.Z,{className:Ee.search,xs:"auto",item:!0},r.createElement(f.S,{entityId:Ze,entityTitle:(Bt=$e==null?void 0:$e.metadata)==null?void 0:Bt.title})),r.createElement(c.Z,{xs:12,item:!0},r.createElement(i.VA,{element:Vt,onAppend:Gt},r.createElement(Qt,null))))):r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(K,null))))}),pn=null},99954:function(te,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),c=e(98069),i=e(73250),R=e(56338),f=e(17429),a=e(48023),u=e(82339),m=e(36964),y=e(68725);const g=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),E=S=>{const{children:b}=S,O=(0,R.$L)(),$=(0,m.useApi)(m.configApiRef),{title:B,setTitle:F,subtitle:D,setSubtitle:x,entityRef:M,metadata:{value:K,loading:re},entityMetadata:{value:le,loading:Se}}=(0,R.x1)();(0,r.useEffect)(()=>{!K||(F(ht=>{const{site_name:it}=K;return ht||it}),x(ht=>{let{site_description:it}=K;return(!it||it==="None")&&(it="Home"),ht||it}))},[K,F,x]);const De=$.getOptional("app.title")||"Backstage",Fe=[B,D,De].filter(Boolean).join(" | "),{locationMetadata:He,spec:Ae}=le||{},Je=Ae==null?void 0:Ae.lifecycle,tt=le?(0,f.getEntityRelations)(le,a.S4):[],bt=(0,m.useRouteRef)(y._Z)(),At=r.createElement(r.Fragment,null,r.createElement(u.HeaderLabel,{label:"Component",value:r.createElement(f.EntityRefLink,{color:"inherit",entityRef:M,title:le==null?void 0:le.metadata.title,defaultKind:"Component"})}),tt.length>0&&r.createElement(u.HeaderLabel,{label:"Owner",value:r.createElement(f.EntityRefLinks,{color:"inherit",entityRefs:tt,defaultKind:"group"})}),Je?r.createElement(u.HeaderLabel,{label:"Lifecycle",value:Je}):null,He&&He.type!=="dir"&&He.type!=="file"?r.createElement(u.HeaderLabel,{label:"",value:r.createElement("a",{href:He.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(i.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Se&&le===void 0||!re&&K===void 0?null:r.createElement(u.Header,{type:"Documentation",typeLink:bt,title:B||g,subtitle:D||g},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,Fe)),At,b,O.renderComponentsByLocation(R.oZ.Header))}},16172:function(te,s,e){"use strict";e.d(s,{b:function(){return g}});var r=e(2784),t=e(79692),c=e(15223),i=e(95544),R=e(80030),f=e(61837),a=e(48348),u=e(47603),m=e(56338);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),g=({toolbarProps:E})=>{const S=y(),[b,O]=(0,r.useState)(null),$=(0,r.useCallback)(re=>{O(re.currentTarget)},[]),B=(0,r.useCallback)(()=>{O(null)},[]),{entityMetadata:{value:F,loading:D}}=(0,m.x1)(),x=(0,m.$L)(),M=x.renderComponentsByLocation(m.oZ.Subheader),K=x.renderComponentsByLocation(m.oZ.Settings);return!M&&!K||D===!1&&!F?null:r.createElement(c.Z,{classes:S,...E},r.createElement(i.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},M,K?r.createElement(r.Fragment,null,r.createElement(R.ZP,{title:"Settings"},r.createElement(f.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:$},r.createElement(u.Z,null))),r.createElement(a.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(b),onClose:B,keepMounted:!0},K)):null))}},2263:function(te,s,e){"use strict";e.d(s,{DK:function(){return g},m1:function(){return S}});var r=e(2784),t=e(10289),c=e(56338),i=e(36964),R=e(64279),f=e(77446);function a({contentLoading:b,content:O,activeSyncState:$}){return b||$==="BUILD_READY_RELOAD"||!O&&$==="CHECKING"?"CHECKING":!O&&$==="BUILDING"?"INITIAL_BUILD":O?$==="BUILDING"?"CONTENT_STALE_REFRESHING":$==="BUILD_READY"?"CONTENT_STALE_READY":$==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function u(b,O){const $={...b};switch(O.type){case"sync":O.state==="CHECKING"&&($.buildLog=[]),$.activeSyncState=O.state,$.syncError=O.syncError;break;case"contentLoading":$.contentLoading=!0,$.contentError=void 0;break;case"content":typeof O.path=="string"&&($.path=O.path),$.contentLoading=!1,$.content=O.content,$.contentError=O.contentError;break;case"buildLog":$.buildLog=$.buildLog.concat(O.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes($.activeSyncState)&&["contentLoading","content"].includes(O.type)&&($.activeSyncState="UP_TO_DATE",$.buildLog=[]),$}function m(b,O,$,B){var le,Se;const[F,D]=(0,r.useReducer)(u,{activeSyncState:"CHECKING",path:B,contentLoading:!0,buildLog:[]}),x=(0,i.useApi)(c.Dl),{retry:M}=(0,f.Z)(async()=>{D({type:"contentLoading"});try{const De=await x.getEntityDocs({kind:b,namespace:O,name:$},B);return D({type:"content",content:De,path:B}),De}catch(De){D({type:"content",contentError:De,path:B})}},[x,b,O,$,B]),K=(0,r.useRef)({content:void 0,reload:()=>{}});return K.current={content:F.content,reload:M},(0,R.default)(async()=>{D({type:"sync",state:"CHECKING"});const De=setTimeout(()=>{D({type:"sync",state:"BUILDING"})},1e3);try{switch(await x.syncEntityDocs({kind:b,namespace:O,name:$},He=>{D({type:"buildLog",log:He})})){case"updated":K.current.content?D({type:"sync",state:"BUILD_READY"}):(K.current.reload(),D({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":D({type:"sync",state:"UP_TO_DATE"});break;default:D({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Fe){D({type:"sync",state:"ERROR",syncError:Fe})}finally{clearTimeout(De)}},[b,$,O,x,D,K]),{state:(0,r.useMemo)(()=>a({activeSyncState:F.activeSyncState,contentLoading:F.contentLoading,content:F.content}),[F.activeSyncState,F.content,F.contentLoading]),contentReload:M,path:F.path,content:F.content,contentErrorMessage:(le=F.contentError)==null?void 0:le.toString(),syncErrorMessage:(Se=F.syncError)==null?void 0:Se.toString(),buildLog:F.buildLog}}const y=(0,r.createContext)({}),g=()=>(0,r.useContext)(y),E=({children:b})=>{const{"*":O=""}=(0,t.UO)(),{entityRef:$}=(0,c.x1)(),{kind:B,namespace:F,name:D}=$,x=m(B,F,D,O);return r.createElement(y.Provider,{value:x},b instanceof Function?b(x):b)},S=b=>O=>r.createElement(E,null,r.createElement(b,{...O}))},96393:function(te,s,e){"use strict";e.d(s,{Fq:function(){return i.F},SE:function(){return c.S}});var r=e(2263),t=e(26220),c=e(99954),i=e(63126),R=e(16172)},68725:function(te,s,e){"use strict";e.d(s,{Fw:function(){return c},_Z:function(){return t},pd:function(){return i}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),c=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(te,s,e){"use strict";e.d(s,{S:function(){return K}});var r=e(2784),t=e(79692),c=e(49378),i=e(38402),R=e(86136),f=e(85256),a=e(82339),u=e(36964),m=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),g=re=>{const{result:le,highlight:Se,rank:De,lineClamp:Fe=5,asListItem:He=!0,asLink:Ae=!0,title:Je,icon:tt}=re,bt=y(),At=(0,u.useAnalytics)(),Ie=()=>{At.captureEvent("discover",le.title,{attributes:{to:le.location},value:De})},mt=()=>{const _=Se!=null&&Se.fields.title?r.createElement(m.FA,{text:Se.fields.title,preTag:Se.preTag,postTag:Se.postTag}):le.title,pe=Se!=null&&Se.fields.entityTitle?r.createElement(m.FA,{text:Se.fields.entityTitle,preTag:Se.preTag,postTag:Se.postTag}):le.entityTitle,be=Se!=null&&Se.fields.name?r.createElement(m.FA,{text:Se.fields.name,preTag:Se.preTag,postTag:Se.postTag}):le.name;return r.createElement(c.Z,{className:bt.itemText,primaryTypographyProps:{variant:"h6"},primary:Je||r.createElement(r.Fragment,null,_," | ",pe!=null?pe:be," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Fe,overflow:"hidden"}},Se!=null&&Se.fields.text?r.createElement(m.FA,{text:Se.fields.text,preTag:Se.preTag,postTag:Se.postTag}):le.text)})},ht=({children:_})=>Ae?r.createElement(a.Link,{noTrack:!0,to:le.location,onClick:Ie},_):r.createElement(r.Fragment,null,_),it=({children:_})=>He?r.createElement(r.Fragment,null,r.createElement(i.Z,{alignItems:"flex-start"},tt&&r.createElement(R.Z,null,tt),r.createElement("div",{className:bt.flexContainer},_)),r.createElement(f.Z,{component:"li"})):r.createElement(r.Fragment,null,_);return r.createElement(ht,null,r.createElement(it,null,r.createElement(mt,null)))};var E=e(86619),S=e(50581),b=e(61837),O=e(4614),$=e(21853),B=e(88013),F=e(10289),D=e(48760);const x=(0,t.Z)({root:{width:"100%"}}),M=re=>{const{entityId:le,entityTitle:Se,debounceTime:De=150}=re,[Fe,He]=(0,r.useState)(!1),Ae=(0,F.s0)(),{term:Je,setTerm:tt,setFilters:bt,result:{loading:At,value:Ie}}=(0,m.Rx)(),mt=x(),[ht,it]=(0,r.useState)([]);(0,r.useEffect)(()=>{let se=!0;if(se&&Ie){const oe=Ie.results.slice(0,10);it(oe)}return()=>{se=!1}},[At,Ie]);const[_,pe]=(0,r.useState)(Je);(0,D.Z)(()=>tt(_),De,[_]);const{kind:be,name:We,namespace:et}=le;(0,r.useEffect)(()=>{bt(se=>({...se,kind:be,namespace:et,name:We}))},[be,et,We,bt]);const ot=se=>{Fe||He(!0),pe(se.target.value)},yt=(se,oe)=>{if(oe!=null&&oe.document){const{location:Ye}=oe.document;Ae(Ye)}};return r.createElement(B.ZP,{classes:{root:mt.root},"data-testid":"techdocs-search-bar",size:"small",open:Fe,getOptionLabel:()=>"",filterOptions:se=>se,onClose:()=>{He(!1)},onFocus:()=>{He(!0)},onChange:yt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:ht,renderOption:({document:se,highlight:oe})=>r.createElement(g,{result:se,lineClamp:3,asListItem:!1,asLink:!1,title:se.title,highlight:oe}),loading:At,renderInput:se=>r.createElement(E.Z,{...se,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Se||le.name} docs`,value:_,onChange:ot,InputProps:{...se.InputProps,startAdornment:r.createElement(S.Z,{position:"start"},r.createElement(b.Z,{"aria-label":"Query",disabled:!0},r.createElement($.Z,null))),endAdornment:r.createElement(r.Fragment,null,At?r.createElement(O.Z,{color:"inherit",size:20}):null,se.InputProps.endAdornment)}})})},K=re=>{const le={term:"",types:["techdocs"],pageCursor:"",filters:re.entityId};return r.createElement(m.Nd,{initialState:le},r.createElement(M,{...re}))}},98157:function(){},53260:function(){}},function(te){var s=function(r){return te(te.s=r)};te.O(0,[2370,6202,9284,9035,2126,7012,2194,4983,3222,6816,5218,4736],function(){return s(88649),s(90775)});var e=te.O()}]);})();
|
|
491
|
+
|
|
492
|
+
//# sourceMappingURL=main.f60454f5.js.map
|