@techdocs/cli 0.0.0-nightly-20220421024404 → 0.0.0-nightly-20220422024928

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,476 +0,0 @@
1
- (()=>{var Ws=Object.defineProperty;var Hs=(_,i,e)=>i in _?Ws(_,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):_[i]=e;var q=(_,i,e)=>(Hs(_,typeof i!="symbol"?i+"":i,e),e),ia=(_,i,e)=>{if(!i.has(_))throw TypeError("Cannot "+e)};var Qe=(_,i,e)=>(ia(_,i,"read from private field"),e?e.call(_):i.get(_)),gn=(_,i,e)=>{if(i.has(_))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(_):i.set(_,e)},Tn=(_,i,e,r)=>(ia(_,i,"write to private field"),r?r.call(_,e):i.set(_,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(_,i,e){"use strict";e.d(i,{n3:function(){return v},MS:function(){return m}});var r=e(48023),t=e(10179),l=e(96279),h=e.n(l);const v=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class m{constructor(s){q(this,"discoveryApi");q(this,"fetchApi");this.discoveryApi=s.discoveryApi,this.fetchApi=s.fetchApi||{fetch:h()}}async getEntityAncestors(s,d){const{kind:y,namespace:u,name:A}=(0,r.of)(s.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}/ancestry`,d)}async getLocationById(s,d){return await this.requestOptional("GET",`/locations/${encodeURIComponent(s)}`,d)}async getEntities(s,d){const{filter:y=[],fields:u=[],offset:A,limit:T,after:R}=s!=null?s:{},D=[];for(const B of[y].flat()){const O=[];for(const[M,k]of Object.entries(B))for(const ee of[k].flat())ee===v?O.push(encodeURIComponent(M)):typeof ee=="string"&&O.push(`${encodeURIComponent(M)}=${encodeURIComponent(ee)}`);O.length&&D.push(`filter=${O.join(",")}`)}u.length&&D.push(`fields=${u.map(encodeURIComponent).join(",")}`),A!==void 0&&D.push(`offset=${A}`),T!==void 0&&D.push(`limit=${T}`),R!==void 0&&D.push(`after=${encodeURIComponent(R)}`);const ne=D.length?`?${D.join("&")}`:"",w=await this.requestRequired("GET",`/entities${ne}`,d),I=(B,O)=>{var ee,Se;if(((ee=B.metadata)==null?void 0:ee.name)===void 0||B.kind===void 0||((Se=O.metadata)==null?void 0:Se.name)===void 0||O.kind===void 0)return 0;const M=(0,r.eE)(B),k=(0,r.eE)(O);return M<k?-1:M>k?1:0};return{items:w.sort(I)}}async getEntityByRef(s,d){const{kind:y,namespace:u,name:A}=(0,r.of)(s);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,d)}async getEntityByName(s,d){const{kind:y,namespace:u="default",name:A}=s;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(u)}/${encodeURIComponent(A)}`,d)}async refreshEntity(s,d){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(d==null?void 0:d.token)&&{Authorization:`Bearer ${d==null?void 0:d.token}`}},method:"POST",body:JSON.stringify({entityRef:s})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(s,d){const{filter:y=[],facets:u}=s,A=[];for(const R of[y].flat()){const D=[];for(const[ne,w]of Object.entries(R))for(const I of[w].flat())I===v?D.push(encodeURIComponent(ne)):typeof I=="string"&&D.push(`${encodeURIComponent(ne)}=${encodeURIComponent(I)}`);D.length&&A.push(`filter=${D.join(",")}`)}for(const R of u)A.push(`facet=${encodeURIComponent(R)}`);const T=A.length?`?${A.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${T}`,d)}async addLocation({type:s="url",target:d,dryRun:y},u){const A=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(u==null?void 0:u.token)&&{Authorization:`Bearer ${u==null?void 0:u.token}`}},method:"POST",body:JSON.stringify({type:s,target:d})});if(A.status!==201)throw new Error(await A.text());const{location:T,entities:R,exists:D}=await A.json();if(!T)throw new Error(`Location wasn't added: ${d}`);return{location:T,entities:R,exists:D}}async getLocationByRef(s,d){return(await this.requestRequired("GET","/locations",d)).map(u=>u.data).find(u=>s===(0,r.NZ)(u))}async removeLocationById(s,d){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(s)}`,d)}async removeEntityByUid(s,d){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(s)}`,d)}async requestIgnored(s,d,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${d}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(u,{method:s,headers:A});if(!T.ok)throw await t.VL.fromResponse(T)}async requestRequired(s,d,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${d}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(u,{method:s,headers:A});if(!T.ok)throw await t.VL.fromResponse(T);return await T.json()}async requestOptional(s,d,y){const u=`${await this.discoveryApi.getBaseUrl("catalog")}${d}`,A=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},T=await this.fetchApi.fetch(u,{method:s,headers:A});if(!T.ok){if(T.status===404)return;throw await t.VL.fromResponse(T)}return await T.json()}}},48023:function(_,i,e){"use strict";e.d(i,{Tf:function(){return l},P1:function(){return ge},q1:function(){return S},M6:function(){return H},l2:function(){return t},zG:function(){return r},w$:function(){return ie},nP:function(){return j},aS:function(){return Ve},S4:function(){return Wt},cz:function(){return Ae},iB:function(){return Le},of:function(){return He},Ou:function(){return F},eE:function(){return ke},NZ:function(){return se}});const r="default",t="backstage.io/view-url",l="backstage.io/edit-url";var h=e(76635),v=e.n(h);class m{constructor(P=DEFAULT_NAMESPACE){q(this,"namespace");this.namespace=P}async enforce(P){return P.metadata.namespace?P:lodash.merge({metadata:{namespace:this.namespace}},P)}}class a{static isValidPrefixAndOrSuffix(P,Q,le,ue){if(typeof P!="string")return!1;const Ce=P.split(Q);return Ce.length===1?ue(Ce[0]):Ce.length===2?le(Ce[0])&&ue(Ce[1]):!1}static isJsonSafe(P){try{return v().isEqual(P,JSON.parse(JSON.stringify(P)))}catch{return!1}}static isValidDnsSubdomain(P){return typeof P=="string"&&P.length>=1&&P.length<=253&&P.split(".").every(a.isValidDnsLabel)}static isValidDnsLabel(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(P)}static isValidTag(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(P)}static isValidUrl(P){if(typeof P!="string")return!1;try{return new URL(P),!0}catch{return!1}}static isValidString(P){var Q;return typeof P=="string"&&((Q=P==null?void 0:P.trim())==null?void 0:Q.length)>=1}static isNonEmptyString(P){var Q;return typeof P=="string"&&((Q=P==null?void 0:P.trim())==null?void 0:Q.length)>=1}}var s=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),d=e(48231),y=e.n(d),u=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),A=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}}}}'),T=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const R=new Map,D=[s,u,A,T];function ne(U){if(!(U!=null&&U.length))throw new TypeError("Unknown error");const P=U[0];throw new TypeError(`${P.instancePath||"<root>"} ${P.message}${P.params?` - ${Object.entries(P.params).map(([Q,le])=>`${Q}: ${le}`).join(", ")}`:""}`)}function w(U,P={}){var we;const Q=(we=P==null?void 0:P.disableCache)!=null?we:!1,le=Q?"":JSON.stringify(U);if(!Q){const ut=R.get(le);if(ut)return ut}const ue=I(U),Ce=new(y())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});ue.length&&Ce.addSchema(ue,void 0,void 0,!0);const xe=Ce.compile(U);return Q||R.set(le,xe),xe}function I(U){if(typeof U!="object")return[];const P=new Set;U.$id&&P.add(U.$id);const Q=new Array,le=[U];for(;le.length;){const ue=le.pop();for(const Ce of B(ue))if(!P.has(Ce)){P.add(Ce);const xe=D.find(we=>we.$id===Ce);xe&&(Q.push(xe),le.push(xe))}}return Q}function*B(U){const P=[U];for(;P.length;){const Q=P.pop();if(typeof Q=="object"&&Q)for(const[le,ue]of Object.entries(Q))le==="$ref"&&typeof ue=="string"?yield ue.split("#")[0]:P.push(ue)}}function O(U){const P=compileAjvSchema(U||entityEnvelopeSchema);return Q=>{if(P(Q)===!0)return Q;throw throwAjvError(P.errors)}}function M(U){const P=w(U);return Q=>{var Ce;if(P(Q)===!0)return Q;const ue=(Ce=P.errors)==null?void 0:Ce.filter(xe=>["/kind","/apiVersion"].includes(xe.instancePath));if((ue==null?void 0:ue.length)&&ue.every(xe=>xe.keyword==="enum"))return!1;throw ne(P.errors)}}function k(U){const P=compileAjvSchema(U||entitySchema);return Q=>{if(P(Q)===!0)return Q;throw throwAjvError(P.errors)}}class ee{static isValidApiVersion(P){return a.isValidPrefixAndOrSuffix(P,"/",a.isValidDnsSubdomain,Q=>Q.length>=1&&Q.length<=63&&/^[a-z0-9A-Z]+$/.test(Q))}static isValidKind(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(P)}static isValidObjectName(P){return typeof P=="string"&&P.length>=1&&P.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(P)}static isValidNamespace(P){return a.isValidDnsLabel(P)}static isValidLabelKey(P){return a.isValidPrefixAndOrSuffix(P,"/",a.isValidDnsSubdomain,ee.isValidObjectName)}static isValidLabelValue(P){return P===""||ee.isValidObjectName(P)}static isValidAnnotationKey(P){return a.isValidPrefixAndOrSuffix(P,"/",a.isValidDnsSubdomain,ee.isValidObjectName)}static isValidAnnotationValue(P){return typeof P=="string"}}const Se={isValidApiVersion:ee.isValidApiVersion,isValidKind:ee.isValidKind,isValidEntityName:ee.isValidObjectName,isValidNamespace:ee.isValidNamespace,isValidLabelKey:ee.isValidLabelKey,isValidLabelValue:ee.isValidLabelValue,isValidAnnotationKey:ee.isValidAnnotationKey,isValidAnnotationValue:ee.isValidAnnotationValue,isValidTag:U=>typeof U=="string"&&U.length>=1&&U.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(U)};function Ke(U={}){return{...Se,...U}}class We{constructor(P=makeValidator()){q(this,"validators");this.validators=P}async enforce(P){var xe,we,ut,Et,nt,it,Ct;function Q(Ye,V,p){if(V==null)throw new Error(`${Ye} must have a value`);let x;try{x=p(V)}catch(N){throw new Error(`${Ye} could not be validated, ${N}`)}if(!x){let N;switch(p.name){case"isValidLabelValue":case"isValidObjectName":N="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":N="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":N="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":N="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":N="a string";break;case"isValidKind":N="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":N="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":N="a non empty string";break;default:N=void 0;break}const G=N?` expected ${N} but found "${V}".`:"";throw new Error(`"${Ye}" is not valid;${G} 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 le(Ye,V,p){return V===void 0||Q(Ye,V,p)}Q("apiVersion",P.apiVersion,this.validators.isValidApiVersion),Q("kind",P.kind,this.validators.isValidKind),Q("metadata.name",P.metadata.name,this.validators.isValidEntityName),le("metadata.namespace",P.metadata.namespace,this.validators.isValidNamespace);for(const[Ye,V]of Object.entries((xe=P.metadata.labels)!=null?xe:[]))Q(`labels.${Ye}`,Ye,this.validators.isValidLabelKey),Q(`labels.${Ye}`,V,this.validators.isValidLabelValue);for(const[Ye,V]of Object.entries((we=P.metadata.annotations)!=null?we:[]))Q(`annotations.${Ye}`,Ye,this.validators.isValidAnnotationKey),Q(`annotations.${Ye}`,V,this.validators.isValidAnnotationValue);const ue=(ut=P.metadata.tags)!=null?ut:[];for(let Ye=0;Ye<ue.length;++Ye)Q(`tags.${Ye}`,ue[Ye],this.validators.isValidTag);const Ce=(Et=P.metadata.links)!=null?Et:[];for(let Ye=0;Ye<Ce.length;++Ye)Q(`links.${Ye}.url`,(nt=Ce[Ye])==null?void 0:nt.url,CommonValidatorFunctions.isValidUrl),le(`links.${Ye}.title`,(it=Ce[Ye])==null?void 0:it.title,CommonValidatorFunctions.isNonEmptyString),le(`links.${Ye}.icon`,(Ct=Ce[Ye])==null?void 0:Ct.icon,KubernetesValidatorFunctions.isValidObjectName);return P}}class fe{constructor(){q(this,"validate")}async enforce(P){if(!this.validate){const ue=new Ajv({allowUnionTypes:!0});this.validate=ue.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(P)===!0)return P;const[le]=this.validate.errors||[];throw le?new Error(`Malformed envelope, ${le.instancePath||"<root>"} ${le.message}`):new Error("Malformed envelope, Unknown error")}}function ye(U){let P=U.indexOf(":");const Q=U.indexOf("/");Q!==-1&&Q<P&&(P=-1);const le=P===-1?void 0:U.slice(0,P),ue=Q===-1?void 0:U.slice(P+1,Q),Ce=U.slice(Math.max(P+1,Q+1));if(le===""||ue===""||Ce==="")throw new TypeError(`Entity reference "${U}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:le,namespace:ue,name:Ce}}function Le(U){return{kind:U.kind,namespace:U.metadata.namespace||r,name:U.metadata.name}}function He(U,P){var we,ut,Et,nt;if(!U)throw new Error("Entity reference must not be empty");const Q=P==null?void 0:P.defaultKind,le=(P==null?void 0:P.defaultNamespace)||r;let ue,Ce,xe;if(typeof U=="string"){const it=ye(U);ue=(we=it.kind)!=null?we:Q,Ce=(ut=it.namespace)!=null?ut:le,xe=it.name}else ue=(Et=U.kind)!=null?Et:Q,Ce=(nt=U.namespace)!=null?nt:le,xe=U.name;if(ue)if(Ce){if(!xe){const it=JSON.stringify(U);throw new Error(`Entity reference ${it} had missing or empty name`)}}else{const it=JSON.stringify(U);throw new Error(`Entity reference ${it} had missing or empty namespace`)}else{const it=JSON.stringify(U);throw new Error(`Entity reference ${it} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:ue,namespace:Ce,name:xe}}function ke(U){var ue,Ce;let P,Q,le;return"metadata"in U?(P=U.kind,Q=(ue=U.metadata.namespace)!=null?ue:r,le=U.metadata.name):(P=U.kind,Q=(Ce=U.namespace)!=null?Ce:r,le=U.name),`${P.toLocaleLowerCase("en-US")}:${Q.toLocaleLowerCase("en-US")}/${le.toLocaleLowerCase("en-US")}`}class et{constructor(P){this.policies=P}async enforce(P){let Q=P;for(const le of this.policies){const ue=await le.enforce(Q);if(!ue)throw new Error(`Policy ${le.constructor.name} did not return a result`);Q=ue}return Q}}class tt{constructor(P){this.policies=P}async enforce(P){for(const Q of this.policies){const le=await Q.enforce(P);if(le)return le}throw new Error("The entity did not match any known policy")}}const Te={allOf(U){return new et(U)},oneOf(U){return new tt(U)}};var Ue=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 je(U){const P=M(U);return{async check(Q){return P(Q)===Q}}}const Je=je(Ue);var vt=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 Dt=je(vt);var ct=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 Pt=je(ct);var Ft=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 It=je(Ft);var Nt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const wt=je(Nt),Wt="ownedBy",tn="ownerOf",$t="consumesApi",mt="apiConsumedBy",nn="providesApi",ae="apiProvidedBy",j="dependsOn",ie="dependencyOf",ce="parentOf",pe="childOf",Oe="memberOf",Ze="hasMember",Ae="partOf",Ve="hasPart";var dt=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 At=je(dt);var gt=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 rt=je(gt);var xt=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"UserV1alpha1","description":"A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. These catalog user entries are connected to the way that authentication within the Backstage ecosystem works. See the auth section of the docs for a discussion of these concepts.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"User","metadata":{"name":"jdoe"},"spec":{"profile":{"displayName":"Jenny Doe","email":"jenny-doe@example.com","picture":"https://example.com/staff/jenny-with-party-hat.jpeg"},"memberOf":["team-b","employees"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["User"]},"spec":{"type":"object","required":["memberOf"],"properties":{"profile":{"type":"object","description":"Optional profile information about the user, mainly for display purposes. All fields of this structure are also optional. The email would be a primary email of some form, that the user may wish to be used for contacting them. The picture is expected to be a URL pointing to an image that's representative of the user, and that a browser could fetch and render on a profile page or similar.","properties":{"displayName":{"type":"string","description":"A simple display name to present to users.","examples":["Jenny Doe"],"minLength":1},"email":{"type":"string","description":"An email where this user can be reached.","examples":["jenny-doe@example.com"],"minLength":1},"picture":{"type":"string","description":"The URL of an image that represents this user.","examples":["https://example.com/staff/jenny-with-party-hat.jpeg"],"minLength":1}}},"memberOf":{"type":"array","description":"The list of groups that the user is a direct member of (i.e., no transitive memberships are listed here). The list must be present, but may be empty if the user is not member of any groups. The items are not guaranteed to be ordered in any particular way. The entries of this array are entity references.","items":{"type":"string","examples":["team-b","employees"],"minLength":1}}}}}}]}`);const lt=je(xt),ge="backstage.io/managed-by-location",S="backstage.io/managed-by-origin-location",H="backstage.io/source-location";function F(U){if(typeof U!="string")throw new TypeError(`Unable to parse location ref '${U}', unexpected argument ${typeof U}`);const P=U.indexOf(":");if(P<0)throw new TypeError(`Unable to parse location ref '${U}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const Q=U.substring(0,P).trim(),le=U.substring(P+1).trim();if(!Q||!le)throw new TypeError(`Unable to parse location ref '${U}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(Q==="http"||Q==="https")throw new TypeError(`Invalid location ref '${U}', please prefix it with 'url:', e.g. 'url:${U}'`);return{type:Q,target:le}}function se(U){const{type:P,target:Q}=U;if(P){if(!Q)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${P}:${Q}`}function de(U){var Q,le,ue,Ce,xe;const P=(xe=(le=(Q=U.metadata)==null?void 0:Q.annotations)==null?void 0:le[ANNOTATION_SOURCE_LOCATION])!=null?xe:(Ce=(ue=U.metadata)==null?void 0:ue.annotations)==null?void 0:Ce[ANNOTATION_LOCATION];if(!P)throw new Error(`Entity '${stringifyEntityRef(U)}' is missing location`);return F(P)}},62159:function(_,i,e){"use strict";e.d(i,{m:function(){return d}});var r=e(9850),t=e.n(r),l=e(12782),h=e.n(l);const v=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function m(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function a(y){if(y===null)return"null";if(Array.isArray(y))return"array";const u=typeof y;return u==="number"&&isNaN(y)?"nan":u==="string"&&y===""?"empty-string":u}const s={type(y,u,A,T){return`Invalid type in config for key '${y}' in '${u}', got ${A}, wanted ${T}`},missing(y){return`Missing required config value at '${y}'`},convert(y,u,A){return`Unable to convert config value for key '${y}' in '${u}' to a ${A}`}};class d{constructor(u,A="mock-config",T,R=""){q(this,"filteredKeys");q(this,"notifiedFilteredKeys",new Set);this.data=u,this.context=A,this.fallback=T,this.prefix=R}static fromConfigs(u){return u.length===0?new d(void 0):u.reduce((A,{data:T,context:R,filteredKeys:D,deprecatedKeys:ne})=>{const w=new d(T,R,A);if(w.filteredKeys=D,ne)for(const{key:I,description:B}of ne)console.warn(`The configuration key '${I}' of ${R} is deprecated and may be removed soon. ${B||""}`);return w},void 0)}has(u){var T,R;return this.readValue(u)!==void 0?!0:(R=(T=this.fallback)==null?void 0:T.has(u))!=null?R:!1}keys(){var T,R;const u=this.data?Object.keys(this.data):[],A=(R=(T=this.fallback)==null?void 0:T.keys())!=null?R:[];return[...new Set([...u,...A])]}get(u){const A=this.getOptional(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u!=null?u:"")));return A}getOptional(u){var R;const A=t()(this.readValue(u)),T=(R=this.fallback)==null?void 0:R.getOptional(u);return A===void 0?T:T===void 0?A:h()({},{value:T},{value:A},(D,ne)=>!m(ne)||!m(D)?ne:void 0).value}getConfig(u){const A=this.getOptionalConfig(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfig(u){var R;const A=this.readValue(u),T=(R=this.fallback)==null?void 0:R.getOptionalConfig(u);if(m(A))return this.copy(A,u,T);if(A!==void 0)throw new TypeError(s.type(this.fullKey(u),this.context,a(A),"object"));return T}getConfigArray(u){const A=this.getOptionalConfigArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalConfigArray(u){const A=this.readConfigValue(u,T=>{if(!Array.isArray(T))return{expected:"object-array"};for(const[R,D]of T.entries())if(!m(D))return{expected:"object-array",value:D,key:`${u}[${R}]`};return!0});if(!!A)return A.map((T,R)=>this.copy(T,`${u}[${R}]`))}getNumber(u){const A=this.getOptionalNumber(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalNumber(u){const A=this.readConfigValue(u,R=>typeof R=="number"||typeof R=="string"||{expected:"number"});if(typeof A=="number"||A===void 0)return A;const T=Number(A);if(!Number.isFinite(T))throw new Error(s.convert(this.fullKey(u),this.context,"number"));return T}getBoolean(u){const A=this.getOptionalBoolean(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalBoolean(u){return this.readConfigValue(u,A=>typeof A=="boolean"||{expected:"boolean"})}getString(u){const A=this.getOptionalString(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalString(u){return this.readConfigValue(u,A=>typeof A=="string"&&A!==""||{expected:"string"})}getStringArray(u){const A=this.getOptionalStringArray(u);if(A===void 0)throw new Error(s.missing(this.fullKey(u)));return A}getOptionalStringArray(u){return this.readConfigValue(u,A=>{if(!Array.isArray(A))return{expected:"string-array"};for(const[T,R]of A.entries())if(typeof R!="string"||R==="")return{expected:"string-array",value:R,key:`${u}[${T}]`};return!0})}fullKey(u){return`${this.prefix}${this.prefix?".":""}${u}`}copy(u,A,T){const R=new d(u,this.context,T,this.fullKey(A));return R.filteredKeys=this.filteredKeys,R}readConfigValue(u,A){var D;const T=this.readValue(u);if(T===void 0)return(D=this.fallback)==null?void 0:D.readConfigValue(u,A);const R=A(T);if(R!==!0){const{key:ne=u,value:w=T,expected:I}=R;throw new TypeError(s.type(this.fullKey(ne),this.context,a(w),I))}return T}readValue(u){const A=u?u.split("."):[];for(const R of A)if(!v.test(R))throw new TypeError(`Invalid config key '${u}'`);if(this.data===void 0)return;let T=this.data;for(const[R,D]of A.entries())if(m(T))T=T[D];else if(T!==void 0){const ne=this.fullKey(A.slice(0,R).join("."));throw new TypeError(s.type(ne,this.context,a(T),"object"))}return T}}},23235:function(_,i,e){"use strict";e.d(i,{C:function(){return t}});var r=e(98005);class t{constructor(){q(this,"subject",new r.J)}post(h){this.subject.next(h)}alert$(){return this.subject}}},47150:function(_,i,e){"use strict";e.d(i,{g:function(){return r}});class r{captureEvent(l){}}},58652:function(_,i,e){"use strict";e.d(i,{C:function(){return l}});var r=e(98005);const t="theme";class l{constructor(v){q(this,"activeThemeId");q(this,"subject",new r.X(void 0));this.themes=v}static createWithStorage(v){var s;const m=new l(v);if(!window.localStorage)return m;const a=(s=window.localStorage.getItem(t))!=null?s:void 0;return m.setActiveThemeId(a),m.activeThemeId$().subscribe(d=>{d?window.localStorage.setItem(t,d):window.localStorage.removeItem(t)}),window.addEventListener("storage",d=>{var y;if(d.key===t){const u=(y=localStorage.getItem(t))!=null?y:void 0;m.setActiveThemeId(u)}}),m}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(v){this.activeThemeId=v,this.subject.next(v)}}},22053:function(_,i,e){"use strict";e.d(i,{m:function(){return r.m}});var r=e(62159)},4333:function(_,i,e){"use strict";e.d(i,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(h){const v=h.split(/\{\{\s*pluginId\s*\}\}/),m=v.join("pluginId");let a;try{a=new URL(m)}catch{throw new Error(`${r} URL '${m}' is invalid`)}if(a.hash)throw new Error(`${r} URL must not have a hash`);if(a.search)throw new Error(`${r} URL must not have a query`);if(m.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(v)}constructor(h){this.parts=h}async getBaseUrl(h){return this.parts.join(h)}}},89536:function(_,i,e){"use strict";e.d(i,{KN:function(){return r},gr:function(){return l},Jv:function(){return h}});class r{constructor(m,a){this.alertApi=m,this.errorApi=a}post(m,a){return a!=null&&a.hidden||this.alertApi.post({message:m.message,severity:"error"}),this.errorApi.post(m,a)}error$(){return this.errorApi.error$()}}var t=e(98005);class l{constructor(){q(this,"subject",new t.J)}post(m,a){this.subject.next({error:m,context:a})}error$(){return this.subject}}class h{static forward(m,a){window.addEventListener("unhandledrejection",s=>{m.post(s.reason,a)})}}},14884:function(_,i,e){"use strict";e.d(i,{b:function(){return l}});var r=e(36964);function t(h){if(h.length<3)throw new Error(`The '${h}' feature flag must have a minimum length of three characters.`);if(h.length>150)throw new Error(`The '${h}' feature flag must not exceed 150 characters.`);if(!h.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${h}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class l{constructor(){q(this,"registeredFeatureFlags",[]);q(this,"flags")}registerFlag(v){t(v.name),this.registeredFeatureFlags.push(v)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(v){return this.flags||(this.flags=this.load()),this.flags.get(v)===r.FeatureFlagState.Active}save(v){this.flags||(this.flags=this.load()),v.merge||this.flags.clear();for(const[a,s]of Object.entries(v.states))this.flags.set(a,s);const m=Array.from(this.flags.entries()).filter(([,a])=>a===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(m)))}load(){try{const v=window.localStorage.getItem("featureFlags");if(!v)return new Map;const m=JSON.parse(v);if(typeof m!="object"||m===null||Array.isArray(m))return new Map;const a=Object.entries(m).filter(([s,d])=>(t(s),d===r.FeatureFlagState.Active));return new Map(a)}catch{return new Map}}}},50160:function(_,i,e){"use strict";e.d(i,{I:function(){return a},j:function(){return r}});function r(s){var u;let d=s.baseImplementation||e.g.fetch;const y=[(u=s.middleware)!=null?u:[]].flat().reverse();for(const A of y)d=A.apply(d);return{fetch:d}}class t{static create(d){var T,R;const y=l(d),u=((T=d.header)==null?void 0:T.name)||"authorization",A=((R=d.header)==null?void 0:R.value)||(D=>`Bearer ${D}`);return new t(d.identityApi,y,u,A)}constructor(d,y,u,A){this.identityApi=d,this.allowUrl=y,this.headerName=u,this.headerValue=A}apply(d){return async(y,u)=>{const A=new Request(y,u),{token:T}=await this.identityApi.getCredentials();return A.headers.get(this.headerName)||typeof T!="string"||!T||!this.allowUrl(A.url)?d(y,u):(A.headers.set(this.headerName,this.headerValue(T)),d(A))}}}function l(s){return s.allowUrl?s.allowUrl:s.urlPrefixAllowlist?h(s.urlPrefixAllowlist):s.config?h([s.config.getString("backend.baseUrl")]):()=>!1}function h(s){const d=s.map(y=>y.replace(/\/$/,""));return y=>d.some(u=>y===u||y.startsWith(`${u}/`))}function v(s,d){return!d||d==="/"?s:`${s.replace(/\/$/,"")}/${d.replace(/^\//,"")}`}class m{constructor(d){this.discoveryApi=d}apply(d){return async(y,u)=>{const A=new Request(y,u),T="plugin://";if(!A.url.startsWith(T))return d(y,u);const{hostname:R,pathname:D,search:ne,hash:w,username:I,password:B}=new URL(`http://${A.url.substring(T.length)}`);let O=await this.discoveryApi.getBaseUrl(R);if(I||B){const k=new URL(O),ee=`${I}${B?`:${B}`:""}@`;O=`${k.protocol}//${ee}${k.host}${k.pathname}`}const M=`${v(O,D)}${ne}${w}`;return d(M,typeof y=="string"?u:y)}}}class a{static resolvePluginProtocol(d){return new m(d.discoveryApi)}static injectIdentityAuth(d){return t.create(d)}constructor(){}}},11358:function(_,i,e){"use strict";e.d(i,{Y:function(){return v}});var r=e(98005);function t(m,a){for(const s of a)if(!m.has(s))return!1;return!0}function l(m,...a){const s=new Set(m);for(const d of a)for(const y of d)s.add(y);return s}class h{constructor(){q(this,"requests",[]);q(this,"subject",new r.X(this.getCurrentPending()))}request(a){return new Promise((s,d)=>{this.requests.push({scopes:a,resolve:s,reject:d}),this.subject.next(this.getCurrentPending())})}resolve(a,s){this.requests=this.requests.filter(d=>t(a,d.scopes)?(d.resolve(s),!1):!0),this.subject.next(this.getCurrentPending())}reject(a){this.requests.forEach(s=>s.reject(a)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const a=this.requests.length===0?void 0:this.requests.slice(1).reduce((s,d)=>l(s,d.scopes),this.requests[0].scopes);return{scopes:a,resolve:s=>{a&&this.resolve(a,s)},reject:s=>{a&&this.reject(s)}}}}class v{constructor(){q(this,"subject",new r.X([]));q(this,"currentRequests",[]);q(this,"handlerCount",0)}createAuthRequester(a){const s=new h,d=this.handlerCount;return this.handlerCount++,s.pending().subscribe({next:y=>{const u=this.currentRequests.slice(),A=this.makeAuthRequest(y,a);A?u[d]=A:delete u[d],this.currentRequests=u,this.subject.next(u.filter(Boolean))}}),y=>s.request(y)}makeAuthRequest(a,s){const{scopes:d}=a;if(!!d)return{provider:s.provider,trigger:async()=>{const y=await s.onAuthRequest(d);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(_,i,e){"use strict";e.d(i,{C:function(){return h}});var r=e(82394),t=e.n(r);const l=new Map;class h{constructor(m,a){q(this,"subscribers",new Set);q(this,"observable",new(t())(m=>(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));this.namespace=m,this.errorApi=a}static create(m){var a;return new h((a=m.namespace)!=null?a:"",m.errorApi)}get(m){return this.snapshot(m).value}snapshot(m){let a,s="absent";try{const d=localStorage.getItem(this.getKeyName(m));d&&(a=JSON.parse(d,(y,u)=>(typeof u=="object"&&u!==null&&Object.freeze(u),u)),s="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${m}`))}return{key:m,value:a,presence:s}}forBucket(m){const a=`${this.namespace}/${m}`;return l.has(a)||l.set(a,new h(a,this.errorApi)),l.get(a)}async set(m,a){localStorage.setItem(this.getKeyName(m),JSON.stringify(a)),this.notifyChanges(m)}async remove(m){localStorage.removeItem(this.getKeyName(m)),this.notifyChanges(m)}observe$(m){return this.observable.filter(({key:a})=>a===m)}getKeyName(m){return`${this.namespace}/${encodeURIComponent(m)}`}notifyChanges(m){const a=this.snapshot(m);for(const s of this.subscribers)s.next(a)}}},59589:function(_,i,e){"use strict";e.d(i,{u:function(){return l}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:d}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:d,provider:s,environment:a})}}},6098:function(_,i,e){"use strict";e.d(i,{Z:function(){return l}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:d,defaultScopes:y=["team"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:d,provider:s,environment:a,defaultScopes:y})}}},44431:function(_,i,e){"use strict";e.d(i,{BitbucketAuth:function(){return l.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var l=e(6098)},19347:function(){},44474:function(_,i,e){"use strict";e.d(i,{T:function(){return l}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:d,defaultScopes:y=["read:user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:d,provider:s,environment:a,defaultScopes:y})}}},2922:function(_,i,e){"use strict";e.d(i,{a:function(){return l}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class l{static create(v){const{discoveryApi:m,environment:a="development",provider:s=t,oauthRequestApi:d,defaultScopes:y=["read_user"]}=v;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:d,provider:s,environment:a,defaultScopes:y})}}},59938:function(_,i,e){"use strict";e.d(i,{e:function(){return h}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},l="https://www.googleapis.com/auth/";class h{static create(m){const{discoveryApi:a,oauthRequestApi:s,environment:d="development",provider:y=t,defaultScopes:u=["openid",`${l}userinfo.email`,`${l}userinfo.profile`]}=m;return r.OAuth2.create({discoveryApi:a,oauthRequestApi:s,provider:y,environment:d,defaultScopes:u,scopeTransform(A){return A.map(T=>T==="openid"?T:T==="profile"||T==="email"?`${l}userinfo.${T}`:T.startsWith(l)?T:`${l}${T}`)}})}}},91668:function(_,i,e){"use strict";e.d(i,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return d.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return l.e},MicrosoftAuth:function(){return a._},OktaAuth:function(){return v.s},OneLoginAuth:function(){return s.$}});var r=e(44474),t=e(2922),l=e(59938),h=e(91205);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}});var v=e(26079),m=e(67604),a=e(38482),s=e(58381),d=e(44431);e.o(d,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return d.AlertApiForwarder}}),e.o(d,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return d.AppThemeSelector}}),e.o(d,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return d.AtlassianAuth}}),e.o(d,"ConfigReader")&&e.d(i,{ConfigReader:function(){return d.ConfigReader}}),e.o(d,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return d.ErrorAlerter}}),e.o(d,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return d.ErrorApiForwarder}}),e.o(d,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return d.FetchMiddlewares}}),e.o(d,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return d.FlatRoutes}}),e.o(d,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return d.LocalStorageFeatureFlags}}),e.o(d,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return d.NoOpAnalyticsApi}}),e.o(d,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return d.OAuthRequestManager}}),e.o(d,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return d.UnhandledErrorForwarder}}),e.o(d,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return d.UrlPatternDiscovery}}),e.o(d,"WebStorage")&&e.d(i,{WebStorage:function(){return d.WebStorage}}),e.o(d,"createFetchApi")&&e.d(i,{createFetchApi:function(){return d.createFetchApi}}),e.o(d,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return d.createSpecializedApp}}),e.o(d,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return d.defaultConfigLoader}});var y=e(59589)},38482:function(_,i,e){"use strict";e.d(i,{_:function(){return l}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class l{static create(v){const{environment:m="development",provider:a=t,oauthRequestApi:s,discoveryApi:d,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=v;return r.OAuth2.create({discoveryApi:d,oauthRequestApi:s,provider:a,environment:m,defaultScopes:y})}}},73124:function(_,i,e){"use strict";e.d(i,{Z:function(){return m}});function r(a){return new Promise((s,d)=>{const y=a.width||500,u=a.height||700,A=window.screen.width/2-y/2,T=window.screen.height/2-u/2,R=window.open(a.url,a.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${u},top=${T},left=${A}`);let D="";if(!R||typeof R.closed=="undefined"||R.closed){const B=new Error("Failed to open auth popup.");B.name="PopupRejectedError",d(B);return}const ne=B=>{if(B.source!==R||B.origin!==a.origin)return;const{data:O}=B;if(O.type==="config_info"){D=O.targetOrigin;return}if(O.type!=="authorization_response")return;const M=O;if("error"in M){const k=new Error(M.error.message);k.name=M.error.name,d(k)}else s(M.response);I()},w=setInterval(()=>{if(R.closed){const B=`Login failed, ${D&&D!==window.location.origin?`Incorrect app origin, expected ${D}`:"popup was closed"}`,O=new Error(B);O.name="PopupClosedError",d(O),I()}},100);function I(){window.removeEventListener("message",ne),clearInterval(w)}window.addEventListener("message",ne)})}function t(a){return[...a].join(" ")}class l{constructor(s){q(this,"discoveryApi");q(this,"environment");q(this,"provider");q(this,"joinScopesFunc");q(this,"authRequester");q(this,"sessionTransform");const{discoveryApi:d,environment:y,provider:u,joinScopes:A=t,oauthRequestApi:T,sessionTransform:R=D=>D}=s;this.authRequester=T.createAuthRequester({provider:u,onAuthRequest:D=>this.showPopup(D)}),this.discoveryApi=d,this.environment=y,this.provider=u,this.joinScopesFunc=A,this.sessionTransform=R}async createSession(s){return s.instantPopup?this.showPopup(s.scopes):this.authRequester(s.scopes)}async refreshSession(){const s=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(y=>{throw new Error(`Auth refresh request failed, ${y}`)});if(!s.ok){const y=new Error(`Auth refresh request failed, ${s.statusText}`);throw y.status=s.status,y}const d=await s.json();if(d.error){const y=new Error(d.error.message);throw d.error.name&&(y.name=d.error.name),y}return await this.sessionTransform(d)}async removeSession(){const s=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(d=>{throw new Error(`Logout request failed, ${d}`)});if(!s.ok){const d=new Error(`Logout request failed, ${s.statusText}`);throw d.status=s.status,d}}async showPopup(s){const d=this.joinScopesFunc(s),y=await this.buildUrl("/start",{scope:d,origin:location.origin}),u=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(u)}async buildUrl(s,d){const y=await this.discoveryApi.getBaseUrl("auth"),u=this.buildQueryString({...d,env:this.environment});return`${y}/${this.provider.id}${s}${u}`}buildQueryString(s){if(!s)return"";const d=Object.entries(s).map(([y,u])=>{if(typeof u=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(u)}`;if(u)return encodeURIComponent(y)}).filter(Boolean).join("&");return d?`?${d}`:""}}var h=e(57018);const v={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class m{constructor(s){q(this,"sessionManager");q(this,"scopeTransform");this.sessionManager=s.sessionManager,this.scopeTransform=s.scopeTransform}static create(s){const{discoveryApi:d,environment:y="development",provider:u=v,oauthRequestApi:A,defaultScopes:T=[],scopeTransform:R=w=>w}=s,D=new l({discoveryApi:d,environment:y,provider:u,oauthRequestApi:A,sessionTransform(w){return{...w,providerInfo:{idToken:w.providerInfo.idToken,accessToken:w.providerInfo.accessToken,scopes:m.normalizeScopes(R,w.providerInfo.scope),expiresAt:new Date(Date.now()+w.providerInfo.expiresInSeconds*1e3)}}}}),ne=new h.RefreshingAuthSessionManager({connector:D,defaultScopes:new Set(T),sessionScopes:w=>w.providerInfo.scopes,sessionShouldRefresh:w=>(w.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new m({sessionManager:ne,scopeTransform:R})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(s,d){var A;const y=m.normalizeScopes(this.scopeTransform,s),u=await this.sessionManager.getSession({...d,scopes:y});return(A=u==null?void 0:u.providerInfo.accessToken)!=null?A:""}async getIdToken(s={}){var y;const d=await this.sessionManager.getSession(s);return(y=d==null?void 0:d.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(s={}){const d=await this.sessionManager.getSession(s);return d==null?void 0:d.backstageIdentity}async getProfile(s={}){const d=await this.sessionManager.getSession(s);return d==null?void 0:d.profile}static normalizeScopes(s,d){if(!d)return new Set;const y=Array.isArray(d)?d:d.split(/[\s|,]/).filter(Boolean);return new Set(s(y))}}},91205:function(_,i,e){"use strict";e.d(i,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),l=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(i,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(i,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(i,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(_,i,e){"use strict";e.d(i,{s:function(){return v}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="okta.";class v{static create(a){const{discoveryApi:s,environment:d="development",provider:y=t,oauthRequestApi:u,defaultScopes:A=["openid","email","profile","offline_access"]}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:d,defaultScopes:A,scopeTransform(T){return T.map(R=>l.has(R)||R.startsWith(h)?R:`${h}${R}`)}})}}},58381:function(_,i,e){"use strict";e.d(i,{$:function(){return v}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},l=new Set(["openid","profile","email","phone","address","groups","offline_access"]),h="onelogin.";class v{static create(a){const{discoveryApi:s,environment:d="development",provider:y=t,oauthRequestApi:u}=a;return r.OAuth2.create({discoveryApi:s,oauthRequestApi:u,provider:y,environment:d,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(A){return A.map(T=>l.has(T)||T.startsWith(h)?T:`${h}${T}`)}})}}},67604:function(_,i,e){"use strict";var r=e(57018),t=e(30195);const l=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({id:t.z.string(),token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),h={id:"saml",title:"SAML",icon:()=>null};class v{static create(a){const{discoveryApi:s,environment:d="development",provider:y=h}=a,u=new DirectAuthConnector({discoveryApi:s,environment:d,provider:y}),A=new StaticAuthSessionManager({connector:u}),T=new AuthSessionStore({manager:A,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new v(T)}sessionState$(){return this.sessionManager.sessionState$()}constructor(a){this.sessionManager=a}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(a={}){const s=await this.sessionManager.getSession(a);return s==null?void 0:s.backstageIdentity}async getProfile(a={}){const s=await this.sessionManager.getSession(a);return s==null?void 0:s.profile}}},91631:function(_,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return h.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return v.m},ErrorAlerter:function(){return a.KN},ErrorApiForwarder:function(){return a.gr},FetchMiddlewares:function(){return d.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return s.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return l.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return a.Jv},UrlPatternDiscovery:function(){return m.p},WebStorage:function(){return u.C},createFetchApi:function(){return d.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),l=e(47150),h=e(58652),v=e(22053),m=e(4333),a=e(89536),s=e(14884),d=e(50160),y=e(11358),u=e(56054)},56494:function(_,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(i,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(i,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(i,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(_,i,e){"use strict";e.d(i,{p:function(){return t}});var r;(function(l){l[l.default=10]="default";const h=50;l[l.app=h]="app",l[l.static=100]="static"})(r||(r={}));class t{constructor(){q(this,"factories",new Map)}register(h,v){const m=r[h],a=this.factories.get(v.api.id);return a&&a.priority>=m?!1:(this.factories.set(v.api.id,{priority:m,factory:v}),!0)}get(h){const v=this.factories.get(h.id);if(!!v)return v.factory}getAllApis(){const h=new Set;for(const{factory:v}of this.factories.values())h.add(v.api);return h}}},14406:function(_,i,e){"use strict";e.d(i,{g:function(){return a}});var r=e(2784),t=e(13980),l=e.n(t);class h{constructor(...d){q(this,"holders");this.holders=d}get(d){for(const y of this.holders){const u=y.get(d);if(u)return u}}}var v=e(76241);const m=(0,v.CT)("api-context"),a=s=>{var T;const{apis:d,children:y}=s,u=(T=(0,r.useContext)(m))==null?void 0:T.atVersion(1),A=u?new h(d,u):d;return r.createElement(m.Provider,{value:(0,v.EI)({1:A}),children:y})};a.propTypes={apis:l().shape({get:l().func.isRequired}).isRequired,children:l().node}},12132:function(_,i,e){"use strict";e.d(i,{M:function(){return r}});class r{constructor(l){q(this,"apis",new Map);this.factories=l}static validateFactories(l,h){for(const v of h){const m=[v],a=new Set;for(;m.length;){const s=m.shift(),d=l.get(s);if(!!d)for(const y of Object.values(d.deps)){if(y.id===v.id)throw new Error(`Circular dependency of api factory for ${v}`);a.has(y)||(a.add(y),m.push(y))}}}}get(l){return this.load(l)}load(l,h=[]){const v=this.apis.get(l.id);if(v)return v;const m=this.factories.get(l);if(!m)return;if(h.includes(m.api))throw new Error(`Circular dependency of api factory for ${m.api}`);const a=this.loadDeps(l,m.deps,[...h,m.api]),s=m.factory(a);return this.apis.set(l.id,s),s}loadDeps(l,h,v){const m={};for(const a in h)if(h.hasOwnProperty(a)){const s=h[a],d=this.load(s,v);if(!d)throw new Error(`No API factory available for dependency ${s} of dependent ${l}`);m[a]=d}return m}}},76105:function(_,i,e){"use strict";e.d(i,{ApiFactoryRegistry:function(){return l.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),l=e(80396),h=e(82488),v=e.n(h);e.o(h,"AlertApiForwarder")&&e.d(i,{AlertApiForwarder:function(){return h.AlertApiForwarder}}),e.o(h,"AppThemeSelector")&&e.d(i,{AppThemeSelector:function(){return h.AppThemeSelector}}),e.o(h,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return h.AtlassianAuth}}),e.o(h,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return h.BitbucketAuth}}),e.o(h,"ConfigReader")&&e.d(i,{ConfigReader:function(){return h.ConfigReader}}),e.o(h,"ErrorAlerter")&&e.d(i,{ErrorAlerter:function(){return h.ErrorAlerter}}),e.o(h,"ErrorApiForwarder")&&e.d(i,{ErrorApiForwarder:function(){return h.ErrorApiForwarder}}),e.o(h,"FetchMiddlewares")&&e.d(i,{FetchMiddlewares:function(){return h.FetchMiddlewares}}),e.o(h,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return h.FlatRoutes}}),e.o(h,"GithubAuth")&&e.d(i,{GithubAuth:function(){return h.GithubAuth}}),e.o(h,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return h.GitlabAuth}}),e.o(h,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return h.GoogleAuth}}),e.o(h,"LocalStorageFeatureFlags")&&e.d(i,{LocalStorageFeatureFlags:function(){return h.LocalStorageFeatureFlags}}),e.o(h,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return h.MicrosoftAuth}}),e.o(h,"NoOpAnalyticsApi")&&e.d(i,{NoOpAnalyticsApi:function(){return h.NoOpAnalyticsApi}}),e.o(h,"OAuthRequestManager")&&e.d(i,{OAuthRequestManager:function(){return h.OAuthRequestManager}}),e.o(h,"OktaAuth")&&e.d(i,{OktaAuth:function(){return h.OktaAuth}}),e.o(h,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return h.OneLoginAuth}}),e.o(h,"UnhandledErrorForwarder")&&e.d(i,{UnhandledErrorForwarder:function(){return h.UnhandledErrorForwarder}}),e.o(h,"UrlPatternDiscovery")&&e.d(i,{UrlPatternDiscovery:function(){return h.UrlPatternDiscovery}}),e.o(h,"WebStorage")&&e.d(i,{WebStorage:function(){return h.WebStorage}}),e.o(h,"createFetchApi")&&e.d(i,{createFetchApi:function(){return h.createFetchApi}}),e.o(h,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return h.createSpecializedApp}}),e.o(h,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return h.defaultConfigLoader}})},82488:function(){},82370:function(_,i,e){"use strict";e.d(i,{b:function(){return nn}});var r=e(2784),t=e(10289),l=e(64279),h=e(56494),v=e(36964),m=e(76105);function a(ae){const j={};for(const ce in ae.collectors)ae.collectors.hasOwnProperty(ce)&&(j[ce]=ae.collectors[ce]());const ie=[{node:r.Children.toArray(ae.root),parent:void 0,contexts:{}}];for(;ie.length!==0;){const{node:ce,parent:pe,contexts:Oe}=ie.shift();r.Children.forEach(ce,Ze=>{if(!(0,r.isValidElement)(Ze))return;const Ae={};for(const Ve in j)if(j.hasOwnProperty(Ve)){const dt=j[Ve];Ae[Ve]=dt.visit(dt.accumulator,Ze,pe,Oe[Ve])}for(const Ve of ae.discoverers){const dt=Ve(Ze);dt&&ie.push({node:dt,parent:Ze,contexts:Ae})}})}return Object.fromEntries(Object.entries(j).map(([ce,pe])=>[ce,pe.accumulator]))}function s(ae,j){return()=>({accumulator:ae(),visit:j})}function d(ae){var j;return(j=ae.props)==null?void 0:j.children}function y(ae){var j,ie,ce;if(((j=ae.props)==null?void 0:j.path)&&((ie=ae.props)==null?void 0:ie.element))return(ce=ae.props)==null?void 0:ce.element}const u=s(()=>new Set,(ae,j)=>{const ie=(0,v.getComponentData)(j,"core.plugin");ie&&ae.add(ie)});var A=e(88934);const T={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},R=s(()=>({paths:new Map,parents:new Map,objects:new Array}),(ae,j,ie,ce)=>{var lt,ge,S,H,F;if((ie==null?void 0:ie.props.element)===j)return ce;let pe=ce==null?void 0:ce.obj,Oe=ce==null?void 0:ce.routeRef,Ze=ce==null?void 0:ce.sticky;const Ae=(lt=j.props)==null?void 0:lt.path,Ve=(ge=pe==null?void 0:pe.children)!=null?ge:ae.objects,dt=Boolean((S=j.props)==null?void 0:S.caseSensitive);let At=ce==null?void 0:ce.path;if((0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Ae)throw new Error("Mount point gatherer must have a path");At=Ae}const gt=(H=j.props)==null?void 0:H.element;let rt=(0,v.getComponentData)(j,"core.mountPoint");if(!rt&&(0,r.isValidElement)(gt)&&(rt=(0,v.getComponentData)(gt,"core.mountPoint")),rt){let se=Ae;if(At&&(se?At=void 0:se=At),!se)throw new Error("Mounted routable extension must have a path");ae.paths.set(rt,se),Oe&&Ze?(ae.parents.set(rt,Oe),Ae&&(Oe=rt,Ze=!1)):(ae.parents.set(rt,Oe),Oe=rt),Ae?(pe={caseSensitive:dt,path:Ae,element:"mounted",routeRefs:new Set([rt]),children:[T],plugin:(0,v.getComponentData)(j.props.element,"core.plugin")},Ve.push(pe)):pe==null||pe.routeRefs.add(rt)}if((0,v.getComponentData)(j,"core.gatherMountPoints")&&(Ze=!0),(0,v.getComponentData)(j,"core.gatherMountPoints")){if(!Ae)throw new Error("Mount point gatherer must have a path");rt||(pe={caseSensitive:dt,path:Ae,element:"gathered",routeRefs:new Set,children:[T],plugin:(F=ce==null?void 0:ce.obj)==null?void 0:F.plugin},Ve.push(pe))}return{obj:pe,path:At,routeRef:Oe,sticky:Ze}}),D=s(()=>new Set,(ae,j)=>{if(j.type===A.L){const ie=j.props;ae.add("with"in ie?ie.with:ie.without)}});var ne=e(76241);const w=(0,ne.uW)("route-ref-type",()=>Symbol("route-ref-type"));function I(ae){return ae[w]==="absolute"}function B(ae){return ae[w]==="sub"}function O(ae){return ae[w]==="external"}function M(...ae){const j=ae.join("/").replace(/\/\/+/g,"/");return j!=="/"&&j.endsWith("/")?j.slice(0,-1):j}function k(ae,j,ie){let ce,pe="";if(I(ae))ce=ae;else if(B(ae))ce=ae.parent,pe=ae.path;else if(O(ae)){const Ae=ie.get(ae);if(!Ae)return[void 0,""];if(I(Ae))ce=Ae;else if(B(Ae))ce=Ae.parent,pe=Ae.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ae}`)}else throw ae[w]?new Error(`Unknown or invalid route ref type, ${ae[w]}`):new Error(`Unknown object passed to useRouteRef, got ${ae}`);if(!ce)return[void 0,""];const Oe=j.get(ce);if(!Oe)return[void 0,""];const Ze=M(Oe,pe);return[ce,Ze]}function ee(ae,j,ie,ce,pe){var At;const Oe=(At=(0,t.fp)(pe,j))!=null?At:[],Ze=Array();let Ae=-1;for(let gt=ae;gt&&(Ae=Oe.findIndex(rt=>rt.route.routeRefs.has(gt)),Ae===-1);gt=ce.get(gt))Ze.unshift(gt);Ze.length===0&&(Ae-=1);const Ve=Ae===-1?"":Oe[Ae].pathname,dt=M(...Ze.slice(0,-1).map(gt=>{const rt=ie.get(gt);if(!rt)throw new Error(`No path for ${gt}`);if(rt.includes(":"))throw new Error(`Cannot route to ${ae} with parent ${gt} as it has parameters`);return rt}));return Ve+dt}class Se{constructor(j,ie,ce,pe,Oe){this.routePaths=j,this.routeParents=ie,this.routeObjects=ce,this.routeBindings=pe,this.appBasePath=Oe}resolve(j,ie){const[ce,pe]=k(j,this.routePaths,this.routeBindings);if(!ce)return;let Oe;typeof ie=="string"?Oe=this.trimPath(ie):ie.pathname?Oe={...ie,pathname:this.trimPath(ie.pathname)}:Oe=ie;const Ze=this.appBasePath+ee(ce,Oe,this.routePaths,this.routeParents,this.routeObjects);return(...[Ve])=>Ze+(0,t.Gn)(pe,Ve)}trimPath(j){return j&&(j.startsWith(this.appBasePath)?j.slice(this.appBasePath.length):j)}}const Ke=(0,ne.CT)("routing-context"),We=({routePaths:ae,routeParents:j,routeObjects:ie,routeBindings:ce,basePath:pe="",children:Oe})=>{const Ze=new Se(ae,j,ie,ce,pe),Ae=(0,ne.EI)({1:Ze});return r.createElement(Ke.Provider,{value:Ae},Oe)},fe=(ae,j)=>{var ie,ce;try{const pe=(0,t.fp)(j,{pathname:ae}),Oe=(ie=pe==null?void 0:pe.filter(Ae=>{var Ve;return((Ve=Ae==null?void 0:Ae.route.routeRefs)==null?void 0:Ve.size)>0}).pop())==null?void 0:ie.route;if(!Oe)return{};let Ze;return Oe.routeRefs.size===1&&(Ze=Oe.routeRefs.values().next().value),{extension:"App",pluginId:((ce=Oe.plugin)==null?void 0:ce.getId())||"root",...Ze?{routeRef:Ze.id}:{}}}catch{return{}}},ye=({pathname:ae,search:j,hash:ie})=>{const ce=(0,v.useAnalytics)();return(0,r.useEffect)(()=>{ce.captureEvent("navigate",`${ae}${j}${ie}`)},[ce,ae,j,ie]),null},Le=({routeObjects:ae})=>{const{pathname:j,search:ie,hash:ce}=(0,t.TH)();return r.createElement(v.AnalyticsContext,{attributes:fe(j,ae)},r.createElement(ye,{pathname:j,search:ie,hash:ce}))};function He(ae,j){const ie=new Set(j.values());ie.delete(void 0);for(const ce of j.keys()){if(ie.has(ce))continue;let pe=ce,Oe="";for(;pe;){const Ae=ae.get(pe);if(!Ae)throw new Error(`No path for ${pe}`);Oe=`${Ae}${Oe}`,pe=j.get(pe)}const Ze=Oe.match(/:(\w+)/g);if(Ze){for(let Ae=0;Ae<Ze.length;Ae++)for(let Ve=Ae+1;Ve<Ze.length;Ve++)if(Ze[Ve]===Ze[Ae])throw new Error(`Parameter ${Ze[Ve]} is duplicated in path ${Oe}`)}}}function ke(ae,j){for(const ie of j)if(!!ie.externalRoutes){for(const[ce,pe]of Object.entries(ie.externalRoutes))if(!pe.optional&&!ae.has(pe))throw new Error(`External route '${ce}' of the '${ie.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const et=(0,ne.CT)("app-context"),tt=({appContext:ae,children:j})=>{const ie=(0,ne.EI)({1:ae});return r.createElement(et.Provider,{value:ie,children:j})};function Te(ae){return new Error(`Tried to access IdentityApi ${ae} before app was loaded`)}function Ue(ae){console.warn(`WARNING: Call to ${ae} is deprecated and will break in the future`)}class je{constructor(){q(this,"target");q(this,"waitForTarget");q(this,"resolveTarget",()=>{});this.waitForTarget=new Promise(j=>{this.resolveTarget=j})}setTarget(j){this.target=j,this.resolveTarget(j)}getUserId(){if(!this.target)throw Te("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return Ue("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Te("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return Ue("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(j=>j.getProfileInfo())}async getBackstageIdentity(){const j=await this.waitForTarget.then(ie=>ie.getBackstageIdentity());return j.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${j.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),j}async getCredentials(){return this.waitForTarget.then(j=>j.getCredentials())}async getIdToken(){return this.waitForTarget.then(j=>{if(!j.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return Ue("getIdToken"),j.getIdToken()})}async signOut(){await this.waitForTarget.then(j=>j.signOut()),location.reload()}}var Je=e(72164);function vt(ae,j,ie){if(ae!==void 0){const pe=ie.find(Oe=>Oe.id===ae);if(pe)return pe}if(j){const pe=ie.find(Oe=>Oe.variant==="dark");if(pe)return pe}const ce=ie.find(pe=>pe.variant==="light");return ce||ie[0]}const Dt=()=>{const ae=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[j,ie]=(0,r.useState)(ae.matches);return(0,r.useEffect)(()=>{const ce=pe=>{ie(pe.matches)};return ae.addListener(ce),()=>{ae.removeListener(ce)}},[ae]),j};function ct({children:ae}){const j=(0,v.useApi)(v.appThemeApiRef),ie=(0,Je.Z)(j.activeThemeId$(),j.getActiveThemeId()),ce=Boolean(window.matchMedia)?Dt():!1,pe=vt(ie,ce,j.getInstalledThemes());if(!pe)throw new Error("App has no themes");return r.createElement(pe.Provider,{children:ae})}var Pt=e(46611);class Ft{constructor(){q(this,"apis",[])}add(j,ie){return this.apis.push([j.id,ie]),ie}build(){return new It(new Map(this.apis))}}class It{static builder(){return new Ft}static from(j){return new It(new Map(j.map(([ie,ce])=>[ie.id,ce])))}static with(j,ie){return new It(new Map([[j.id,ie]]))}constructor(j){this.apis=j}with(j,ie){return new It(new Map([...this.apis,[j.id,ie]]))}get(j){return this.apis.get(j.id)}}function Nt(ae){const j=new Map;return ae&&ae({bind:(ce,pe)=>{for(const[Oe,Ze]of Object.entries(pe)){const Ae=ce[Oe];if(!Ae)throw new Error(`Key ${Oe} is not an existing external route`);if(!Ze&&!Ae.optional)throw new Error(`External route ${Oe} is required but was undefined`);Ze&&j.set(Ae,Ze)}}}),j}const wt=(0,r.createContext)({routeObjects:[]});function Wt(ae){var ie;let{pathname:j}=new URL((ie=ae.getOptionalString("app.baseUrl"))!=null?ie:"/","http://dummy.dev");return j=j.replace(/\/*$/,""),j}function tn(ae,j,ie){var Ve;const ce=Boolean(ae),pe=(0,l.default)(ae||(()=>Promise.resolve([])));let Oe;if(ce&&pe.loading){const{Progress:dt}=j;Oe=r.createElement(dt,null)}else if(pe.error){const{BootErrorPage:dt}=j;Oe=r.createElement(dt,{step:"load-config",error:pe.error})}const{ThemeProvider:Ze=ct}=j;return Oe?{node:r.createElement(h.ApiProvider,{apis:It.with(v.appThemeApiRef,ie)},r.createElement(Ze,null,Oe))}:{api:h.ConfigReader.fromConfigs((Ve=pe.value)!=null?Ve:[])}}class $t{constructor(j){this.app=j}getPlugins(){return this.app.getPlugins()}getSystemIcon(j){return this.app.getSystemIcon(j)}getComponents(){return this.app.getComponents()}}class mt{constructor(j){q(this,"apiHolder");q(this,"configApi");q(this,"apis");q(this,"icons");q(this,"plugins");q(this,"components");q(this,"themes");q(this,"configLoader");q(this,"defaultApis");q(this,"bindRoutes");q(this,"appIdentityProxy",new je);q(this,"apiFactoryRegistry");var ie,ce,pe,Oe;this.apis=(ie=j.apis)!=null?ie:[],this.icons=j.icons,this.plugins=new Set((ce=j.plugins)!=null?ce:[]),this.components=j.components,this.themes=j.themes,this.configLoader=(pe=j.configLoader)!=null?pe:Pt.t,this.defaultApis=(Oe=j.defaultApis)!=null?Oe:[],this.bindRoutes=j.bindRoutes,this.apiFactoryRegistry=new m.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(j){return this.icons[j]}getComponents(){return this.components}getProvider(){const j=new $t(this);let ie=!1;return({children:pe})=>{const Oe=(0,r.useMemo)(()=>h.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Ze,featureFlags:Ae,routeBindings:Ve}=(0,r.useMemo)(()=>{const rt=a({root:pe,discoverers:[d,y],collectors:{routing:R,collectedPlugins:u,featureFlags:D}});return rt.collectedPlugins.forEach(xt=>this.plugins.add(xt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...rt,routeBindings:Nt(this.bindRoutes)}},[pe]);ie||(ie=!0,He(Ze.paths,Ze.parents),ke(Ve,this.plugins));const dt=tn(this.configLoader,this.components,Oe),At="api"in dt;if(At){const{api:rt}=dt;this.configApi=rt}if((0,r.useEffect)(()=>{if(At){const rt=this.getApiHolder().get(v.featureFlagsApiRef);for(const xt of this.plugins.values())if("getFeatureFlags"in xt)for(const lt of xt.getFeatureFlags())rt.registerFlag({name:lt.name,pluginId:xt.getId()});else for(const lt of xt.output())lt.type==="feature-flag"&&rt.registerFlag({name:lt.name,pluginId:xt.getId()});for(const xt of Ae)rt.registerFlag({name:xt,pluginId:""})}},[At,dt,Ae]),"node"in dt)return dt.node;const{ThemeProvider:gt=ct}=this.components;return r.createElement(h.ApiProvider,{apis:this.getApiHolder()},r.createElement(tt,{appContext:j},r.createElement(gt,null,r.createElement(We,{routePaths:Ze.paths,routeParents:Ze.parents,routeObjects:Ze.objects,routeBindings:Ve,basePath:Wt(dt.api)},r.createElement(wt.Provider,{value:{routeObjects:Ze.objects}},pe)))))}}getRouter(){const{Router:j,SignInPage:ie}=this.components,ce=({component:Oe,children:Ze})=>{const[Ae,Ve]=(0,r.useState)();return Ae?(this.appIdentityProxy.setTarget(Ae),Ze):r.createElement(Oe,{onSignInSuccess:Ve})};return({children:Oe})=>{const Ze=(0,v.useApi)(v.configApiRef),Ae=`${Wt(Ze)}/*`,{routeObjects:Ve}=(0,r.useContext)(wt);return ie?r.createElement(j,null,r.createElement(Le,{routeObjects:Ve}),r.createElement(ce,{component:ie},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ae,element:r.createElement(r.Fragment,null,Oe)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}}),r.createElement(j,null,r.createElement(Le,{routeObjects:Ve}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Ae,element:r.createElement(r.Fragment,null,Oe)}))))}}getApiHolder(){if(this.apiHolder){for(const j of this.plugins)for(const ie of j.getApis())this.apiFactoryRegistry.get(ie.api)||this.apiFactoryRegistry.register("default",ie);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:v.appThemeApiRef,deps:{},factory:()=>h.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:v.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:v.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:v.featureFlagsApiRef,deps:{},factory:()=>new h.LocalStorageFeatureFlags});for(const j of this.defaultApis)this.apiFactoryRegistry.register("default",j);for(const j of this.plugins)for(const ie of j.getApis())if(!this.apiFactoryRegistry.register("default",ie))throw new Error(`Plugin ${j.getId()} tried to register duplicate or forbidden API factory for ${ie.api}`);for(const j of this.apis)if(!this.apiFactoryRegistry.register("app",j))throw new Error(`Duplicate or forbidden API factory for ${j.api} in app`);return m.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new m.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(j){const ie=new Set;for(const ce of j){const pe=ce.getId();if(ie.has(pe))throw new Error(`Duplicate plugin found '${pe}'`);ie.add(pe)}}}function nn(ae){return new mt(ae)}},46611:function(_,i,e){"use strict";e.d(i,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const l=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!l)throw new Error("No static configuration provided");if(!Array.isArray(l))throw new Error("Static configuration has invalid format");const h=l.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const m=JSON.parse(t);Array.isArray(m)?h.push(...m):h.push({data:m,context:"env"})}catch(m){throw new Error(`Failed to load runtime configuration, ${m}`)}const v=window.__APP_CONFIG__;return v&&h.push({context:"window",data:v}),h}},44056:function(_,i,e){"use strict";e.d(i,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),l=e(73495),h=e.n(l);e.o(l,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return l.AtlassianAuth}}),e.o(l,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return l.BitbucketAuth}}),e.o(l,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return l.FlatRoutes}}),e.o(l,"GithubAuth")&&e.d(i,{GithubAuth:function(){return l.GithubAuth}}),e.o(l,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return l.GitlabAuth}}),e.o(l,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return l.GoogleAuth}}),e.o(l,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return l.MicrosoftAuth}}),e.o(l,"OktaAuth")&&e.d(i,{OktaAuth:function(){return l.OktaAuth}}),e.o(l,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return l.OneLoginAuth}})},73495:function(){},49208:function(_,i,e){"use strict";e.d(i,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return l.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(i,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(i,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(i,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(i,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(i,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(i,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(i,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(i,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(i,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(i,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(i,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(i,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(i,{OneLoginAuth:function(){return t.OneLoginAuth}});var l=e(63938)},57018:function(_,i,e){"use strict";e.d(i,{RefreshingAuthSessionManager:function(){return m}});function r(s,d){for(const y of d)if(!s.has(y))return!1;return!0}class t{constructor(d){this.options=d}sessionExistsAndHasScope(d,y){if(!d)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const u=this.options.sessionScopes(d);return r(u,y)}getExtendedScope(d,y){const u=new Set(this.options.defaultScopes);if(d&&this.options.sessionScopes!==void 0){const A=this.options.sessionScopes(d);for(const T of A)u.add(T)}if(y)for(const A of y)u.add(A);return u}}var l=e(98005),h=e(36964);class v{constructor(){q(this,"subject",new l.X(h.SessionState.SignedOut));q(this,"signedIn",!1)}setIsSignedIn(d){this.signedIn!==d&&(this.signedIn=d,this.subject.next(this.signedIn?h.SessionState.SignedIn:h.SessionState.SignedOut))}sessionState$(){return this.subject}}class m{constructor(d){q(this,"connector");q(this,"helper");q(this,"sessionScopesFunc");q(this,"sessionShouldRefreshFunc");q(this,"stateTracker",new v);q(this,"refreshPromise");q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A,sessionShouldRefresh:T}=d;this.connector=y,this.sessionScopesFunc=A,this.sessionShouldRefreshFunc=T,this.helper=new t({sessionScopes:A,defaultScopes:u})}async getSession(d){if(this.helper.sessionExistsAndHasScope(this.currentSession,d.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const u=await this.collapsedSessionRefresh(),A=this.sessionScopesFunc(this.currentSession),T=this.sessionScopesFunc(u);return r(T,A)&&(this.currentSession=u),u}catch(u){if(d.optional)return;throw u}}if(!this.currentSession&&!d.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(d)}catch{}if(!d.optional)return this.currentSession=await this.connector.createSession({...d,scopes:this.helper.getExtendedScope(this.currentSession,d.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const d=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),d}finally{delete this.refreshPromise}}}class a{constructor(d){q(this,"connector");q(this,"helper");q(this,"stateTracker",new SessionStateTracker);q(this,"currentSession");const{connector:y,defaultScopes:u=new Set,sessionScopes:A}=d;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:A,defaultScopes:u})}setSession(d){this.currentSession=d,this.stateTracker.setIsSignedIn(Boolean(d))}async getSession(d){if(this.helper.sessionExistsAndHasScope(this.currentSession,d.scopes))return this.currentSession;if(!d.optional)return this.currentSession=await this.connector.createSession({...d,scopes:this.helper.getExtendedScope(this.currentSession,d.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(_,i,e){"use strict";e.d(i,{J:function(){return l},X:function(){return h}});var r=e(82394),t=e.n(r);class l{constructor(){q(this,"isClosed",!1);q(this,"terminatingError");q(this,"observable",new(t())(m=>this.isClosed?(this.terminatingError?m.error(this.terminatingError):m.complete(),()=>{}):(this.subscribers.add(m),()=>{this.subscribers.delete(m)})));q(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,s){const d=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(d)}}class h{constructor(m){q(this,"isClosed");q(this,"currentValue");q(this,"terminatingError");q(this,"observable");q(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=m,this.terminatingError=void 0,this.observable=new(t())(a=>this.isClosed?(this.terminatingError?a.error(this.terminatingError):a.complete(),()=>{}):(a.next(this.currentValue),this.subscribers.add(a),()=>{this.subscribers.delete(a)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=m,this.subscribers.forEach(a=>a.next(m))}error(m){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=m,this.subscribers.forEach(a=>a.error(m))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(m=>m.complete())}subscribe(m,a,s){const d=typeof m=="function"?{next:m,error:a,complete:s}:m;return this.observable.subscribe(d)}}},88934:function(_,i,e){"use strict";e.d(i,{L:function(){return l}});var r=e(36964),t=e(2784);const l=h=>{const{children:v}=h,m=(0,r.useApi)(r.featureFlagsApiRef),a="with"in h?m.isActive(h.with):!m.isActive(h.without);return t.createElement(t.Fragment,null,a?v:null)};(0,r.attachComponentData)(l,"core.featureFlagged",!0)},63938:function(_,i,e){"use strict";e.d(i,{w:function(){return h}});var r=e(2784),t=e(10289),l=e(36964);const h=m=>{const a=(0,l.useApp)(),{NotFoundErrorPage:s}=a.getComponents(),d=(0,l.useElementFilter)(m.children,y=>y.getElements().flatMap(u=>{var T;let A=u.props.path;return A===""?[]:(A=(T=A==null?void 0:A.replace(/\/\*$/,""))!=null?T:"/",[{path:A,element:u,children:u.props.children?[{path:A==="/"?"/":"/*",element:u.props.children}]:void 0}])}).sort((u,A)=>A.path.localeCompare(u.path)).map(u=>(u.path=u.path==="/"?"/":`${u.path}/*`,u)));return d.push({element:r.createElement(s,null),path:"/*"}),(0,t.V$)(d)};var v=e(88934)},9118:function(_,i,e){"use strict";e.d(i,{Button:function(){return w},CodeSnippet:function(){return fe},Content:function(){return Wo},ContentHeader:function(){return qi},CreateButton:function(){return He},DependencyGraph:function(){return rt},DependencyGraphTypes:function(){return r},EmptyState:function(){return Ce},ErrorPage:function(){return rs},ErrorPanel:function(){return cn},Header:function(){return Qo},HeaderIconLinkRow:function(){return or},HeaderLabel:function(){return ms},HeaderTabs:function(){return Ho},InfoCard:function(){return ft},ItemCardGrid:function(){return As},ItemCardHeader:function(){return ys},Link:function(){return D},LogViewer:function(){return Sr},MissingAnnotationEmptyState:function(){return ut},OverflowTooltip:function(){return Pr},Page:function(){return qo},PageWithHeader:function(){return Cs},Progress:function(){return Xn},ResponseErrorPanel:function(){return $r},RoutedTabs:function(){return jo},Select:function(){return _e},Sidebar:function(){return Ya},SidebarContext:function(){return Br},SidebarDivider:function(){return li},SidebarItem:function(){return Uo},SidebarPage:function(){return Ma},SidebarPinStateContext:function(){return dr},SubvalueCell:function(){return Si},SupportButton:function(){return xa},Table:function(){return ji},WarningPanel:function(){return sn},sidebarConfig:function(){return Bn}});var r={};e.r(r),e.d(r,{Nm:function(){return ke},ht:function(){return Te},LJ:function(){return tt}});var t=e(2784),l=e(36964),h=e(19928);function v(n){const[o,c]=useState([]),f=useApi(alertApiRef);if(useEffect(()=>{const L=f.alert$().subscribe($=>c(Y=>Y.concat($)));return()=>{L.unsubscribe()}},[f]),o.length===0)return null;const[g]=o,E=()=>{c(L=>L.filter($=>$!==g))};return React.createElement(Snackbar,{open:!0,anchorOrigin:{vertical:"top",horizontal:"center"}},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:E,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:g.severity},React.createElement("span",null,g.message.toString(),o.length>1&&React.createElement("em",null,` (${o.length-1} older ${pluralize("message",o.length-1)})`))))}var m=e(79692),a=e(12420);const s=(0,m.Z)(n=>(0,a.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function d(n){const{displayName:o,picture:c,customStyles:f}=n,g=s();return React.createElement(MaterialAvatar,{alt:o,src:c,className:g.avatar,style:{backgroundColor:stringToColor(o||c||""),...f}},o&&extractInitials(o))}var y=e(77277),u=e(86689),A=e(62833);const T=n=>/^([a-z+.-]+):/.test(n),R=n=>{var o;return n instanceof Array?n.map(R).join(" ").trim():typeof n=="object"&&n?R((o=n==null?void 0:n.props)==null?void 0:o.children):["string","number"].includes(typeof n)?String(n):""},D=t.forwardRef(({onClick:n,noTrack:o,...c},f)=>{const g=(0,l.useAnalytics)(),E=String(c.to),L=R(c.children)||E,$=T(E),Y=$&&!!/^https?:/.exec(E),W=oe=>{n==null||n(oe),o||g.captureEvent("click",L,{attributes:{to:E}})};return $?t.createElement(u.Z,{ref:f,href:E,onClick:W,...Y?{target:"_blank",rel:"noopener"}:{},...c}):t.createElement(u.Z,{ref:f,component:A.rU,onClick:W,...c})}),ne=t.forwardRef((n,o)=>t.createElement(D,{ref:o,...n,color:"initial"})),w=t.forwardRef((n,o)=>t.createElement(y.Z,{ref:o,component:ne,...n}));var I=e(60364),B=e(61837),O=e(80030),M=e(19353),k=e(95074);function ee(n){const{text:o,tooltipDelay:c=1e3,tooltipText:f="Text copied to clipboard"}=n,g=(0,l.useApi)(l.errorApiRef),[E,L]=(0,t.useState)(!1),[{error:$},Y]=(0,k.Z)();(0,t.useEffect)(()=>{$&&g.post($)},[$,g]);const W=oe=>{oe.stopPropagation(),L(!0),Y(o)};return t.createElement(t.Fragment,null,t.createElement(O.ZP,{id:"copy-test-tooltip",title:f,placement:"top",leaveDelay:c,onClose:()=>L(!1),open:E},t.createElement(B.Z,{onClick:W},t.createElement(M.Z,null))))}var Se=e(55768),Ke=e(26639),We=e(39595);function fe(n){const{text:o,language:c,showLineNumbers:f=!1,highlightedNumbers:g,customStyle:E,showCopyCodeButton:L=!1}=n,$=(0,I.Z)(),Y=$.palette.type==="dark"?Ke.Z:We.Z,W=$.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(Se.Z,{customStyle:E,language:c,style:Y,showLineNumbers:f,wrapLines:!0,lineNumberStyle:{color:$.palette.textVerySubtle},lineProps:oe=>g!=null&&g.includes(oe)?{style:{backgroundColor:W}}:{}},o),L&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(ee,{text:o})))}var ye=e(41156),Le=e(88188);function He(n){const{title:o,to:c}=n,f=(0,ye.Z)(g=>g.breakpoints.down("xs"));return c?f?t.createElement(B.Z,{component:A.rU,color:"primary",title:o,size:"small",to:c},t.createElement(Le.Z,null)):t.createElement(y.Z,{component:A.rU,variant:"contained",color:"primary",to:c},o):null}var ke;(function(n){const o="TB";n.TOP_BOTTOM=o;const c="BT";n.BOTTOM_TOP=c;const f="LR";n.LEFT_RIGHT=f;const g="RL";n.RIGHT_LEFT=g})(ke||(ke={}));var et;(function(n){const o="UL";n.UP_LEFT=o;const c="UR";n.UP_RIGHT=c;const f="DL";n.DOWN_LEFT=f;const g="DR";n.DOWN_RIGHT=g})(et||(et={}));var tt;(function(n){const o="network-simplex";n.NETWORK_SIMPLEX=o;const c="tight-tree";n.TIGHT_TREE=c;const f="longest-path";n.LONGEST_PATH=f})(tt||(tt={}));var Te;(function(n){const o="l";n.LEFT=o;const c="r";n.RIGHT=c;const f="c";n.CENTER=f})(Te||(Te={}));var Ue=e(13387),je=e(11105),Je=e(97963),vt=e(46506),Dt=e.n(vt),ct=e(54073),Pt=e.n(ct),Ft=e(10368);const It=(0,m.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function Nt({node:{id:n}}){const o=It(),[c,f]=t.useState(0),[g,E]=t.useState(0),L=t.useRef(null);t.useLayoutEffect(()=>{if(L.current){let{height:oe,width:te}=L.current.getBBox();oe=Math.round(oe),te=Math.round(te),(oe!==g||te!==c)&&(f(te),E(oe))}},[c,g]);const $=10,Y=c+$*2,W=g+$*2;return t.createElement("g",null,t.createElement("rect",{className:o.node,width:Y,height:W,rx:10}),t.createElement("text",{ref:L,className:o.text,y:W/2,x:Y/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const wt="arrow-marker",Wt="node",tn="edge",$t="label",mt=(0,Ft.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),nn=n=>t.createElement(Nt,{...n});function ae({render:n=nn,setNode:o,node:c}){const{width:f,height:g,x:E=0,y:L=0}=c,$=c,Y=mt(),W=t.useRef(null);return t.useLayoutEffect(()=>{if(W.current){let{height:oe,width:te}=W.current.getBBox();oe=Math.round(oe),te=Math.round(te),(oe!==g||te!==f)&&o(c.id,{...c,height:oe,width:te})}},[c,f,g,o]),t.createElement("g",{ref:W,"data-testid":Wt,className:Y.node,transform:`translate(${E-f/2},${L-g/2})`},n({node:$}))}var j=e(40408),ie=e(49810),ce=e(19574),pe=e.n(ce);const Oe=(0,Ft.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function Ze({edge:{label:n}}){const o=Oe();return t.createElement("text",{className:o.text,textAnchor:"middle"},n)}const Ae=(0,Ft.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"}),Ve=n=>t.createElement(Ze,{...n}),dt=j.Z().x(n=>n.x).y(n=>n.y).curve(ie.Z);function At({render:n=Ve,setEdge:o,id:c,edge:f}){const{x:g=0,y:E=0,width:L,height:$,points:Y}=f,W=f,oe=Ae(),te=t.useRef(null);t.useLayoutEffect(()=>{if(te.current){let{height:ve,width:be}=te.current.getBBox();ve=Math.round(ve),be=Math.round(be),(ve!==$||be!==L)&&o(c,{...f,height:ve,width:be})}},[f,$,L,o,c]);let Re="";if(Y){const ve=Y.filter(be=>pe()(be.x)&&pe()(be.y));Re=dt(ve)||""}return t.createElement(t.Fragment,null,Re&&t.createElement("path",{"data-testid":tn,className:oe.path,markerEnd:`url(#${wt})`,d:Re}),W.label?t.createElement("g",{ref:te,"data-testid":$t,className:oe.label,transform:`translate(${g},${E})`},n({edge:W})):null)}const gt="workspace";function rt(n){var mr,aa;const{edges:o,nodes:c,renderNode:f,direction:g=ke.TOP_BOTTOM,align:E,nodeMargin:L=50,edgeMargin:$=10,rankMargin:Y=50,paddingX:W=0,paddingY:oe=0,acyclicer:te,ranker:Re=tt.NETWORK_SIMPLEX,labelPosition:ve=Te.RIGHT,labelOffset:be=10,edgeRanks:at=1,edgeWeight:Tt=1,renderLabel:Ut,defs:Vt,zoom:ot="enabled",...bt}=n,Ot=(0,Je.Z)(),[Yt,Un]=t.useState(100),[Sn,wr]=t.useState(100),St=t.useRef(new(Dt()).graphlib.Graph),[zn,fo]=t.useState(((mr=St.current.graph())==null?void 0:mr.width)||0),[er,mo]=t.useState(((aa=St.current.graph())==null?void 0:aa.height)||0),[Xr,qr]=t.useState([]),[ho,Xt]=t.useState([]),hn=Math.max(zn,Yt),Cn=Math.max(er,Sn),tr=t.useMemo(()=>Pt()(Ht=>{if(!Ht)return;const qt=je.Z(Ht),zt=je.Z(Ht.getElementById(gt));function In(){qt.call(Ue.sP().scaleExtent([1,10]).on("zoom",Mn=>{Mn.transform.x=Math.min(0,Math.max(Mn.transform.x,hn-hn*Mn.transform.k)),Mn.transform.y=Math.min(0,Math.max(Mn.transform.y,Cn-Cn*Mn.transform.k)),zt.attr("transform",Mn.transform)}))}ot==="enabled"?In():ot==="enable-on-click"&&qt.on("click",()=>In());const{width:Ln,height:_r}=Ht.getBoundingClientRect();Yt!==Ln&&Un(Ln),Sn!==_r&&wr(_r)},100),[Sn,Yt,hn,Cn,ot]),Gt=t.useCallback(()=>{const Ht=St.current.nodes(),qt=St.current.edges();Ht.forEach(zt=>{c.some(Ln=>Ln.id===zt)||St.current.removeNode(zt)}),qt.forEach(zt=>{o.some(Ln=>Ln.from===zt.v&&Ln.to===zt.w)||St.current.removeEdge(zt.v,zt.w)}),c.forEach(zt=>{const In=St.current.nodes().find(Ln=>zt.id===Ln);if(In&&St.current.node(In)){const{width:Ln,height:_r,x:Mn,y:zs}=St.current.node(In);St.current.setNode(In,{...zt,width:Ln,height:_r,x:Mn,y:zs})}else St.current.setNode(zt.id,{...zt,width:0,height:0})}),o.forEach(zt=>{St.current.setEdge(zt.from,zt.to,{...zt,label:zt.label,width:0,height:0,labelpos:ve,labeloffset:be,weight:Tt,minlen:at})})},[o,c,ve,be,Tt,at]),Kt=t.useMemo(()=>Pt()(()=>{Dt().layout(St.current);const{height:Ht,width:qt}=St.current.graph(),zt=Math.max(0,Ht||0),In=Math.max(0,qt||0);fo(In),mo(zt),qr(St.current.nodes()),Xt(St.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(St.current.setGraph({rankdir:g,align:E,nodesep:L,edgesep:$,ranksep:Y,marginx:W,marginy:oe,acyclicer:te,ranker:Re}),Gt(),Kt(),Kt.cancel),[te,E,g,$,W,oe,L,Y,Re,Gt,Kt]);function fr(Ht,qt){return St.current.setNode(Ht,qt),Kt(),St.current}function nr(Ht,qt){return St.current.setEdge(Ht,qt),Kt(),St.current}return t.createElement("svg",{ref:tr,...bt,width:"100%",height:Cn,viewBox:`0 0 ${hn} ${Cn}`},t.createElement("defs",null,t.createElement("marker",{id:wt,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:Ot.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),Vt),t.createElement("g",{id:gt},t.createElement("svg",{width:zn,height:er,y:Cn/2-er/2,x:hn/2-zn/2,viewBox:`0 0 ${zn} ${er}`},ho.map(Ht=>{const qt=St.current.edge(Ht);return qt?t.createElement(At,{key:`${Ht.v}-${Ht.w}`,id:Ht,setEdge:nr,render:Ut,edge:qt}):null}),Xr.map(Ht=>{const qt=St.current.node(Ht);return qt?t.createElement(ae,{key:Ht,setNode:fr,render:f,node:qt}):null}))))}var xt=e(72779),lt=e.n(xt);const ge=(0,m.Z)(n=>{var o;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(o=n.palette.banner.warning)!=null?o:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),S=n=>{var ve;const{variant:o,message:c,id:f,fixed:g=!1}=n,E=ge(),$=useApi(storageApiRef).forBucket("notifications"),Y=(ve=$.snapshot("dismissedBanners").value)!=null?ve:[],[W,oe]=useState(new Set(Y)),te=useObservable($.observe$("dismissedBanners"));useEffect(()=>{var be;if(te!=null&&te.value){const at=(be=te==null?void 0:te.value)!=null?be:[];oe(new Set(at))}},[te==null?void 0:te.value]);const Re=()=>{$.set("dismissedBanners",[...W,f])};return React.createElement(Snackbar,{anchorOrigin:g?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!W.has(f),classes:{root:classNames(E.root,!g&&E.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(E.content,E[o]),message:E.message},message:c,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:Re},React.createElement(Close,{className:E.icon}))]}))};var H=e(60905),F=e(90436),se=e(86284),de=e(96465),U=e(19133),P=e(3871);const Q=(0,m.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),le=({missing:n})=>{const o=Q();switch(n){case"field":return t.createElement("img",{src:se,className:o.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:de,alt:"no Information",className:o.generalImg});case"content":return t.createElement("img",{src:U,alt:"create Component",className:o.generalImg});case"data":return t.createElement("img",{src:P,alt:"no Build",className:o.generalImg});default:return null}},ue=(0,m.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function Ce(n){const{title:o,description:c,missing:f,action:g}=n,E=ue();return t.createElement(H.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:E.root,spacing:2},t.createElement(H.Z,{item:!0,xs:12,md:6},t.createElement(H.Z,{container:!0,direction:"column"},t.createElement(H.Z,{item:!0,xs:!0},t.createElement(F.Z,{variant:"h5"},o)),t.createElement(H.Z,{item:!0,xs:!0},t.createElement(F.Z,{variant:"body1"},c)),t.createElement(H.Z,{item:!0,xs:!0,className:E.action},g))),t.createElement(H.Z,{item:!0,xs:12,md:6,className:E.imageContainer},t.createElement(le,{missing:f})))}const xe=`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`,we=(0,m.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function ut(n){const{annotation:o}=n,c=we(),f=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(Ce,{missing:"field",title:"Missing Annotation",description:f,action:t.createElement(t.Fragment,null,t.createElement(F.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:c.code},t.createElement(fe,{text:xe.replace("ANNOTATION",o),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:D,to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"},"Read more"))})}var Et=e(11776),nt=e(38402),it=e(49378),Ct=e(41128),Ye=e(27616),V=e(8284),p=e(70660),x=e(91750),N=e(38016);const G=(n,o)=>(o.palette.type==="light"?Ct._j:Ct.$n)(o.palette[n].light,.6),Pe=(n,o)=>(o.palette.type==="light"?Ct.$n:Ct._j)(o.palette[n].light,.9),Ee=(0,m.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:o})=>G(o,n)}})),$e=({severity:n})=>{const o=Ee({severity:n});return t.createElement(x.Z,{classes:o})},Xe=({severity:n})=>{const o=Ee({severity:n});return t.createElement(N.Z,{classes:o})},Rt=(0,m.Z)(n=>({panel:{backgroundColor:({severity:o})=>Pe(o,n),color:({severity:o})=>G(o,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:o})=>G(o,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:o})=>G(o,n),backgroundColor:({severity:o})=>Pe(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"}),_t=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function sn(n){const{severity:o="warning",title:c,message:f,children:g,defaultExpanded:E}=n,L=Rt({severity:o}),$=_t(o)+(c?`: ${c}`:"");return t.createElement(Ye.Z,{defaultExpanded:E!=null?E:!1,className:L.panel,role:"alert"},t.createElement(V.Z,{expandIcon:t.createElement(Xe,{severity:o}),className:L.summary},t.createElement($e,{severity:o}),t.createElement(F.Z,{className:L.summaryText,variant:"subtitle1"},$)),(f||g)&&t.createElement(p.Z,null,t.createElement(H.Z,{container:!0},f&&t.createElement(H.Z,{item:!0,xs:12},t.createElement(F.Z,{className:L.message,variant:"body1"},f)),g&&t.createElement(H.Z,{item:!0,xs:12,className:L.details},g))))}const Wn=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),bn=({error:n,message:o,stack:c,children:f})=>{const g=Wn();return t.createElement(Et.Z,{dense:!0},t.createElement(nt.Z,{alignItems:"flex-start"},t.createElement(it.Z,{classes:{secondary:g.text},primary:"Error",secondary:n}),t.createElement(ee,{text:n})),t.createElement(nt.Z,{alignItems:"flex-start"},t.createElement(it.Z,{classes:{secondary:g.text},primary:"Message",secondary:o}),t.createElement(ee,{text:o})),c&&t.createElement(nt.Z,{alignItems:"flex-start"},t.createElement(it.Z,{classes:{secondary:g.text},primary:"Stack Trace",secondary:c}),t.createElement(ee,{text:c})),f)};function cn(n){const{title:o,error:c,defaultExpanded:f,children:g}=n;return t.createElement(sn,{severity:"error",title:o!=null?o:c.message,defaultExpanded:f},t.createElement(bn,{error:c.name,message:c.message,stack:c.stack,children:g}))}var Hn=e(85256);const hr=(0,m.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function $r(n){var be;const{title:o,error:c,defaultExpanded:f}=n,g=hr();if(c.name!=="ResponseError")return t.createElement(cn,{title:o!=null?o:c.message,defaultExpanded:f,error:c});const{body:E,cause:L}=c,{request:$,response:Y}=E,W=`${Y.statusCode}: ${L.name}`,oe=$&&`${$.method} ${$.url}`,te=L.message.replace(/\\n/g,`
12
- `),Re=(be=L.stack)==null?void 0:be.replace(/\\n/g,`
13
- `),ve=JSON.stringify(E,void 0,2);return t.createElement(cn,{title:o!=null?o:c.message,defaultExpanded:f,error:{name:W,message:te,stack:Re}},oe&&t.createElement(nt.Z,{alignItems:"flex-start"},t.createElement(it.Z,{classes:{secondary:g.text},primary:"Request",secondary:$?`${oe}`:void 0}),t.createElement(ee,{text:oe})),t.createElement(t.Fragment,null,t.createElement(Hn.Z,{component:"li",className:g.divider}),t.createElement(nt.Z,{alignItems:"flex-start"},t.createElement(it.Z,{classes:{secondary:g.text},primary:"Full Error as JSON"})),t.createElement(fe,{language:"json",text:ve,showCopyCodeButton:!0})))}var Nr=e(47093);function Zr(n){const o=document.createElement("div");return o.setAttribute("id",n),o}function Jt(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function eo(n){const o=useRef(null);useEffect(function(){const g=document.querySelector(`#${n}`),E=g||Zr(n);return g||Jt(E),E.appendChild(o.current),function(){o.current.remove(),E.childNodes.length===-1&&E.remove()}},[n]);function c(){return o.current||(o.current=document.createElement("div")),o.current}return c()}var gr=null;const jn="core.calloutSeen";function pr(){const[n,o]=useState(()=>{const f=localStorage.getItem(jn);return f?JSON.parse(f):{}}),c=useCallback((f,g)=>{const E=localStorage.getItem(jn),$={...E?JSON.parse(E):{},[f]:g};o($),localStorage.setItem(jn,JSON.stringify($))},[]);return{states:n,setState:c}}function Ur(n){const{states:o,setState:c}=pr(),f=useCallback(()=>{c(n,!0)},[c,n]);return{seen:o[n]===!0,markSeen:f}}function Vn(n){const{seen:o,markSeen:c}=Ur(n);return{show:o===!1,hide:c}}const yr=(0,m.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function Zt(n){const{featureId:o,title:c,description:f,children:g}=n,{show:E,hide:L}=useShowCallout(o),$=usePortal("core.callout"),Y=useRef(null),[W,oe]=useState(),te=yr(),Re=useCallback(()=>{if(Y.current){const ve=Y.current.getBoundingClientRect(),be=Math.max(ve.width,ve.height),at=800,Tt=ve.x-(be-ve.width)/2-at,Ut=ve.y-(be-ve.height)/2-at,Vt=be+2*at,ot=450,bt=ve.x+ve.width/2-ot,Ot=ve.y-(be-ve.height)/2+be+20;oe({dotLeft:Tt,dotTop:Ut,dotSize:Vt,borderWidth:at,textTop:Ot,textLeft:bt,textWidth:ot})}},[]);return useEffect(()=>(window.addEventListener("resize",Re),window.addEventListener("scroll",Re),()=>{window.removeEventListener("resize",Re),window.removeEventListener("scroll",Re)}),[Re]),useLayoutEffect(Re,[Y.current,Re]),E?React.createElement(React.Fragment,null,React.createElement("div",{className:te.featureWrapper,ref:Y},g),createPortal(React.createElement("div",{className:te.backdrop},React.createElement(ClickAwayListener,{onClickAway:L},React.createElement(React.Fragment,null,React.createElement("div",{className:te.dot,"data-testid":"dot",style:{left:W==null?void 0:W.dotLeft,top:W==null?void 0:W.dotTop,width:W==null?void 0:W.dotSize,height:W==null?void 0:W.dotSize,borderWidth:W==null?void 0:W.borderWidth},onClick:L,onKeyDown:L,role:"button",tabIndex:0},React.createElement("div",{className:te.pulseCircle})),React.createElement("div",{className:te.text,"data-testid":"text",style:{left:W==null?void 0:W.textLeft,top:W==null?void 0:W.textTop,width:W==null?void 0:W.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},c),React.createElement(Typography,null,f))))),$)):React.createElement(React.Fragment,null,g)}var zr=e(35292);const rr=(0,m.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:"gray",cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function Wr({color:n="primary",disabled:o=!1,href:c="#",icon:f=t.createElement(zr.Z,null),label:g,onClick:E,title:L}){const $=rr();return o?t.createElement(u.Z,{title:L,className:lt()($.link,$.disabled),underline:"none"},f,t.createElement("span",{className:$.label},g)):t.createElement(u.Z,{title:L,className:lt()($.link,$[n]),to:c,component:D,onClick:E},f,t.createElement("span",{className:$.label},g))}const Er=(0,m.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function or(n){const{links:o}=n,c=Er();return t.createElement("nav",{className:c.links},o.map((f,g)=>t.createElement(Wr,{key:g+1,...f})))}const ar=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
- `},Gn=100,Kn=10,vr=(0,m.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Gn,height:`calc(100% + ${Kn}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-Kn,background:`linear-gradient(90deg, ${ar(n.palette.type)})`},fadeRight:{right:-Kn,background:`linear-gradient(270deg, ${ar(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function Ar(n){const[[o,c],f]=React.useState([0,0]);return React.useLayoutEffect(()=>{const g=n.current;if(!g){f([0,0]);return}const E=()=>{const L=g.scrollLeft,$=g.scrollWidth-g.offsetWidth-g.scrollLeft;f([L,$])};return E(),g.addEventListener("scroll",E),window.addEventListener("resize",E),()=>{g.removeEventListener("scroll",E),window.removeEventListener("resize",E)}},[n]),[o,c]}function Rr(n,o,c){const[f,g]=React.useState(0);return React.useLayoutEffect(()=>{if(f===0)return;const E=performance.now(),L=requestAnimationFrame($=>{if(!n.current)return;const Y=$-E,W=Math.abs(f)*Y/o,te=Math.max(c,W)*Math.sign(f);n.current.scrollBy({left:te});const Re=f-te;Math.sign(f)!==Math.sign(Re)?g(0):g(Re)});return()=>cancelAnimationFrame(L)},[n,f,o,c]),g}function On(n){const{scrollStep:o=100,scrollSpeed:c=50,minScrollDistance:f=5,children:g,...E}=n,L=vr(n),$=React.useRef(),[Y,W]=Ar($),oe=Rr($,c,f),te=Re=>{!$.current||oe(Re?o:-o)};return React.createElement("div",{...E,className:L.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:L.container,ref:$},g),React.createElement("div",{className:classNames(L.fade,L.fadeLeft,{[L.fadeHidden]:Y===0})}),React.createElement("div",{className:classNames(L.fade,L.fadeRight,{[L.fadeHidden]:W===0})}),Y>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>te(!1),className:classNames(L.button,L.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),W>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>te(!0),className:classNames(L.button,L.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const ln=(0,m.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function wn(n){const o=ln(n),{shorthand:c,alpha:f}=n;return c?React.createElement("span",{className:o[f?"alpha":"beta"],style:{fontSize:"120%"}},f?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:o[f?"alpha":"beta"]},f?"Alpha":"Beta")}const $n=(0,t.lazy)(()=>Promise.all([e.e(3860),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function Sr(n){const{Progress:o}=(0,l.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(o,null)},t.createElement($n,{...n}))}const Cr=(0,m.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),Yn={code:({inline:n,className:o,children:c,...f})=>{const g=String(c).replace(/\n+$/,""),E=/language-(\w+)/.exec(o||"");return!n&&E?t.createElement(fe,{language:E[1],text:g}):t.createElement("code",{className:o,...f},c)}};function to(n){const{content:o,dialect:c="gfm",linkTarget:f}=n,g=Cr();return React.createElement(ReactMarkdown,{remarkPlugins:c==="gfm"?[gfm]:[],className:g.markdown,children:o,components:Yn,linkTarget:f})}var Tr=e(10179);const Jn=(0,m.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),pn=({request:n,busy:o,setBusy:c})=>{const f=Jn(),[g,E]=useState(),L=async()=>{c(!0);try{await n.trigger()}catch(Y){E(isError(Y)?Y.message:"An unspecified error occurred")}finally{c(!1)}},$=n.provider.icon;return React.createElement(ListItem,{button:!0,disabled:o,classes:{root:f.root}},React.createElement(ListItemAvatar,null,React.createElement($,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:g&&React.createElement(Typography,{color:"error"},g)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:L},"Log in"))};var kn=null;const Nn=(0,m.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function ir(n){const o=Nn(),[c,f]=useState(!1),g=useApi(oauthRequestApiRef),E=useObservable(useMemo(()=>g.authRequest$(),[g]),[]),L=()=>{E.forEach($=>$.reject())};return React.createElement(Dialog,{open:Boolean(E.length),fullWidth:!0,maxWidth:"xs",classes:{paper:o.dialog}},React.createElement(DialogTitle,{classes:{root:o.title}},"Login Required"),React.createElement(DialogContent,{dividers:!0,classes:{root:o.contentList}},React.createElement(List,null,E.map($=>React.createElement(LoginRequestListItem,{key:$.provider.title,request:$,busy:c,setBusy:f})))),React.createElement(DialogActions,{classes:{root:o.actionButtons}},React.createElement(Button,{onClick:L},"Reject All")))}var sr=e(15277),br=e.n(sr),yn=e(29862);const Qn=(0,m.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Pr(n){var L;const[o,c]=(0,t.useState)(!1),f=(0,yn.t)(),g=Qn(),E=$=>{f()&&c($)};return t.createElement(O.ZP,{title:(L=n.title)!=null?L:n.text||"",placement:n.placement,disableHoverListener:!o},t.createElement(br(),{text:n.text,line:n.line,onToggled:E,containerClassName:g.container}))}var Ir=e(67358);function Xn(n){const[o,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const f=setTimeout(()=>c(!0),250);return()=>clearTimeout(f)},[]),o?t.createElement(Ir.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var Lr=e(94339),cr=e(14503),Or=e(24579),lr=e(32552),kt=e(15459),En=e(95544),z=e(27597);const re=(0,m.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function me(n){const{link:o,title:c,onClick:f}=n,g=re();return t.createElement("div",null,t.createElement(Hn.Z,null),t.createElement(D,{to:o,onClick:f,underline:"none"},t.createElement(En.Z,{display:"flex",alignItems:"center",className:g.root},t.createElement(En.Z,{className:g.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(F.Z,null,t.createElement("strong",null,c))),t.createElement(z.Z,{className:g.arrow}))))}const Be=n=>{const{slackChannel:o}=n;if(o){if(typeof o=="string")return t.createElement(t.Fragment,null,"Please contact ",o," for help.");if(!o.href)return t.createElement(t.Fragment,null,"Please contact ",o.name," for help.")}else return null;return t.createElement(w,{to:o.href,variant:"contained"},o.name)},qe=class extends t.Component{constructor(o){super(o),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(o,c){console.error(`ErrorBoundary, error: ${o}, info: ${c}`),this.setState({error:o,errorInfo:c})}render(){const{slackChannel:o,children:c}=this.props,{error:f}=this.state;return f?t.createElement(cn,{title:"Something Went Wrong",error:f},t.createElement(Be,{slackChannel:o})):c}},pt=(0,m.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),ht=(0,kt.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(cr.Z),st={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 ft(n){const{title:o,subheader:c,divider:f=!0,deepLink:g,slackChannel:E,errorBoundaryProps:L,variant:$,children:Y,headerStyle:W,headerProps:oe,icon:te,action:Re,actionsClassName:ve,actions:be,cardClassName:at,actionsTopRight:Tt,className:Ut,noPadding:Vt,titleTypographyProps:ot}=n,bt=pt();let Ot={},Yt={};$&&$.split(/[\s]+/g).forEach(St=>{Ot={...Ot,...st.card[St]},Yt={...Yt,...st.cardContent[St]}});const Un=()=>t.createElement("div",{className:bt.headerSubheader},c&&t.createElement("div",{className:bt.subheader},c),te),Sn=L||(E?{slackChannel:E}:{});return t.createElement(Lr.Z,{style:Ot,className:Ut},t.createElement(qe,{...Sn},o&&t.createElement(lr.Z,{classes:{root:bt.header,title:bt.headerTitle,subheader:bt.headerSubheader,avatar:bt.headerAvatar,action:bt.headerAction,content:bt.headerContent},title:o,subheader:Un(),action:Re,style:{...W},titleTypographyProps:ot,...oe}),Tt&&t.createElement(ht,null,Tt),f&&t.createElement(Hn.Z,null),t.createElement(Or.Z,{className:lt()(at,{[bt.noPadding]:Vt}),style:Yt},Y),be&&t.createElement(cr.Z,{className:ve},be),g&&t.createElement(me,{...g})))}var Lt=e(39307);const Mt=(0,m.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),rn={fractional:!0,inverse:!1,unit:"%",max:100},en=({palette:n,value:o,inverse:c,max:f})=>{if(isNaN(o))return"#ddd";const g=f||rn.max,E=c?g-o:o;return E<g/3?n.status.error:E<g*(2/3)?n.status.warning:n.status.ok};function qn(n){const[o,c]=useState(null),{getColor:f=en}=n,g=Mt(n),{palette:E}=useTheme(),{value:L,fractional:$,inverse:Y,unit:W,max:oe,description:te}={...rn,...n},Re=$?Math.round(L*oe):L,ve=oe!==100?Math.round(L):Re,[be,at]=useState(!1);return useEffect(()=>{const Tt=o,Ut=()=>at(!0),Vt=()=>at(!1);return Tt&&te?(Tt.addEventListener("mouseenter",Ut),Tt.addEventListener("mouseleave",Vt),()=>{Tt.removeEventListener("mouseenter",Ut),Tt.removeEventListener("mouseleave",Vt)}):()=>{at(!1)}},[te,o]),React.createElement("div",{ref:c,className:g.root},React.createElement(Circle,{strokeLinecap:"butt",percent:Re,strokeWidth:12,trailWidth:12,strokeColor:f({palette:E,value:ve,inverse:Y,max:oe}),className:g.circle}),te&&be?React.createElement("div",{className:g.description},te):React.createElement("div",{className:g.overlay},isNaN(L)?"N/A":`${ve}${W}`))}const vn=(0,m.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function _n(n){const o=vn(n),{title:c,subheader:f,progress:g,inverse:E,deepLink:L,description:$,icon:Y,variant:W,getColor:oe}=n,te={inverse:E,description:$,getColor:oe,value:g};return React.createElement("div",{className:o.root},React.createElement(InfoCard,{title:c,subheader:f,deepLink:L,variant:W,icon:Y},React.createElement(Gauge,{...te})))}function Hr(n){const{value:o,getColor:c=getProgressColor}=n,{palette:f}=useTheme();if(isNaN(o))return null;let g=Math.round(o*100*100)/100;g>100&&(g=100);const E=c({palette:f,value:g,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${g}%`},React.createElement("span",null,React.createElement(Line,{percent:g,strokeWidth:4,trailWidth:4,strokeColor:E})))}var Zn=e(21324),jr=e(7089),C=e(1292),b=e(42494),Z=e(74603),K=e(12231),X=e(73698),J=e(72379);const he=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ne=()=>{const n=he();return t.createElement(J.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const De=(0,m.Z)(()=>(0,a.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var Me=()=>{const n=De();return t.createElement(J.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const Ge=(0,kt.Z)(n=>(0,a.Z)({root:{"label + &":{marginTop:n.spacing(3)}},input:{borderRadius:4,position:"relative",backgroundColor:n.palette.background.paper,border:"1px solid #ced4da",fontSize:16,padding:"10px 26px 10px 12px",transition:n.transitions.create(["border-color","box-shadow"]),fontFamily:"Helvetica Neue","&:focus":{background:n.palette.background.paper,borderRadius:4}}}),{name:"BackstageSelectInputBase"})(Z.Z),yt=(0,m.Z)(n=>(0,a.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function _e(n){const{multiple:o,items:c,label:f,placeholder:g,selected:E,onChange:L,triggerReset:$,native:Y=!1,disabled:W=!1}=n,oe=yt(),[te,Re]=(0,t.useState)(E||(o?[]:"")),[ve,be]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Re(o?[]:"")},[$,o]),(0,t.useEffect)(()=>{E!==void 0&&Re(E)},[E]);const at=ot=>{Re(ot.target.value),L(ot.target.value)},Tt=ot=>{if(W){ot.preventDefault();return}be(bt=>o&&!(ot.target instanceof HTMLElement)?!0:!bt)},Ut=()=>{be(!1)},Vt=ot=>()=>{const bt=te.filter(Ot=>Ot!==ot);Re(bt),L(bt)};return t.createElement("div",{className:oe.root},t.createElement(F.Z,{variant:"button"},f),t.createElement(C.Z,{onClickAway:Ut},t.createElement(b.Z,{className:oe.formControl},t.createElement(X.Z,{value:te,native:Y,disabled:W,"data-testid":"select",displayEmpty:!0,multiple:o,onChange:at,onClick:Tt,open:ve,input:t.createElement(Ge,null),renderValue:ot=>{var bt;return o&&te.length!==0?t.createElement("div",{className:oe.chips},ot.map(Ot=>{var Yt,Un;return t.createElement(jr.Z,{key:(Yt=c.find(Sn=>Sn.value===Ot))==null?void 0:Yt.value,label:(Un=c.find(Sn=>Sn.value===Ot))==null?void 0:Un.label,clickable:!0,onDelete:Vt(Ot),className:oe.chip})})):t.createElement(F.Z,null,te.length===0?g||"":(bt=c.find(Ot=>Ot.value===ot))==null?void 0:bt.label)},IconComponent:()=>ve?t.createElement(Me,null):t.createElement(Ne,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},g&&!o&&t.createElement(K.Z,{value:[]},g),Y?c&&c.map(ot=>t.createElement("option",{value:ot.value,key:ot.value},ot.label)):c&&c.map(ot=>t.createElement(K.Z,{key:ot.value,value:ot.value},o&&t.createElement(Zn.Z,{color:"primary",checked:te.includes(ot.value)||!1,className:oe.checkbox}),ot.label))))))}const ze=()=>{},Bt=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:ze,stepHistory:[],setStepHistory:ze,onStepChange:ze});function jt(n){const{children:o,elevated:c,onStepChange:f,activeStep:g=0}=n,[E,L]=useState(g),[$,Y]=useState([0]);useEffect(()=>{L(g)},[g]);const W=[];let oe;return Children.forEach(o,te=>{isValidElement(te)&&(te.props.end?oe=te:W.push(te))}),React.createElement(React.Fragment,null,React.createElement(Bt.Provider,{value:{stepIndex:E,setStepIndex:L,stepHistory:$,setStepHistory:Y,onStepChange:f,stepperLength:Children.count(o)}},React.createElement(MuiStepper,{activeStep:E,orientation:"vertical",elevation:c?2:0},W)),E>=Children.count(o)-1&&oe)}const Dn=(0,m.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),un=({text:n,handleClick:o})=>React.createElement(Button,{onClick:o},n||"Reset"),Qt=({text:n,handleClick:o,disabled:c,last:f,stepIndex:g})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:c,"data-testid":`nextButton-${g}`,onClick:o},n||(f?"Finish":"Next")),on=({text:n,handleClick:o,disabled:c,stepIndex:f})=>React.createElement(Button,{onClick:o,"data-testid":`backButton-${f}`,disabled:c},n||"Back"),An=({actions:n={},children:o})=>{const c=Dn(),{stepperLength:f,stepIndex:g,setStepIndex:E,stepHistory:L,setStepHistory:$,onStepChange:Y}=useContext(VerticalStepperContext),W=(ve,be)=>{be&&be(),Y&&Y(g,ve),E(ve)},oe=()=>{const ve=n.nextStep?n.nextStep(g,f-1):g+1;W(ve,n.onNext),$([...L,ve])},te=()=>{L.pop(),W(L[L.length-1],n.onBack),$([...L])},Re=()=>{W(0,n.onRestart),$([0])};return React.createElement("div",{className:c.root},[void 0,!0].includes(n.showBack)&&g!==0&&React.createElement(on,{text:n.backText,handleClick:te,disabled:g===0,stepIndex:g}),[void 0,!0].includes(n.showNext)&&React.createElement(Qt,{text:n.nextText,handleClick:oe,disabled:!!f&&g>=f||!!n.canNext&&!n.canNext(),stepIndex:g}),n.showRestart&&g!==0&&React.createElement(un,{text:n.restartText,handleClick:Re,stepIndex:g}),o)},ur=(0,m.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function xr(n){const{title:o,children:c,end:f,actions:g,...E}=n,L=ur();return f?React.createElement("div",{className:L.end},React.createElement(Typography,{variant:"h6"},o),c,React.createElement(SimpleStepperFooter,{actions:{...g||{},showNext:!1}})):React.createElement(MuiStep,{...E},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},o)),React.createElement(StepContent,null,c,React.createElement(SimpleStepperFooter,{actions:g})))}const Fn=(0,m.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function dn(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function fn(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Dr(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.error),"aria-label":"Status error","aria-hidden":"true",...n})}function no(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function js(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.running),"aria-label":"Status running","aria-hidden":"true",...n})}function Vs(n){const o=Fn(n);return React.createElement("span",{className:classNames(o.status,o.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var Gs=e(74600),go=e(15584);const sa=n=>(0,a.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),ca={root:{border:"0",verticalAlign:"top"}},la=n=>(0,a.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),ua=n=>(0,a.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),da=(0,kt.Z)(sa,{name:"BackstageMetadataTableTitleCell"})(go.Z),fa=(0,kt.Z)(ca,{name:"BackstageMetadataTableCell"})(go.Z),Ks=({dense:n,children:o})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,o)),Ys=({title:n,children:o,...c})=>React.createElement(TableRow,null,n&&React.createElement(da,null,n),React.createElement(fa,{colSpan:n?1:2,...c},o)),po=(0,kt.Z)(la,{name:"BackstageMetadataTableList"})(({classes:n,children:o})=>t.createElement("ul",{className:n.root},o)),Js=(0,kt.Z)(ua,{name:"BackstageMetadataTableListItem"})(({classes:n,children:o})=>t.createElement("li",{className:n.root},o)),yo=(0,a.Z)({root:{margin:"0 0",listStyleType:"none"}}),ma=n=>(0,a.Z)({root:{...yo.root,paddingLeft:n.spacing(1)}}),Eo=(0,kt.Z)(yo,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o)),vo=(0,kt.Z)(ma,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:o})=>t.createElement(po,{classes:n},o));function ha(n,o){const c=n.map((f,g)=>React.createElement(MetadataListItem,{key:g},ro(f)));return o?React.createElement(vo,null,c):React.createElement(Eo,null,c)}function ga(n,o,c){const f=Object.keys(n).map(g=>{const E=ro(n[g],!0),L=c&&c.titleFormat?c.titleFormat(g):startCase(g);return React.createElement(MetadataListItem,{key:g},`${L}: `,E)});return o?React.createElement(vo,null,f):React.createElement(Eo,null,f)}function ro(n,o,c){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?ga(n,o,c):Array.isArray(n)?ha(n,c):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const pa=({value:n,options:o})=>React.createElement(Fragment,null,ro(n,o)),ya=({title:n,value:o,options:c})=>React.createElement(MetadataTableItem,{title:c&&c.titleFormat?c.titleFormat(n):startCase(n)},React.createElement(pa,{value:o,options:c}));function Ea(n,o){return Object.keys(n).map(c=>React.createElement(ya,{key:c,title:c,value:n[c],options:o}))}function ks(n){const{metadata:o,dense:c=!0,options:f}=n,g=Ea(o,f||{});return React.createElement(MetadataTable,{dense:c},g)}var va=e(49429),Aa=e(86136),Ao=e(79784),Fr=e(76635),Ra=e(19126),Ro=e.n(Ra);function Sa(n){return qs.stringify(n,{strictNullHandling:!0})}function So(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Co(n,o){return So(n)[o]}function Ca(n,o,c){const f={...So(n),[o]:c};return Sa(f)}function Qs(n,o=250){const[c,f]=useSearchParams(),g=c.toString(),[E,L]=useState(Co(g,n));return useEffect(()=>{const $=Co(g,n);L(Y=>isEqual($,Y)?Y:$)},[g,L,n]),useDebouncedEffect(()=>{const $=Ca(g,n,E);g!==$&&f($,{replace:!0})},[f,E,g,n],o),[E,L]}const Ta={url:"https://github.com/backstage/backstage/issues",items:[{title:"Support Not Configured",icon:"warning",links:[{title:"Add `app.support` config key",url:"https://github.com/backstage/backstage/blob/master/app-config.yaml"}]}]};function To(){const o=(0,l.useApiHolder)().get(l.configApiRef),c=o==null?void 0:o.getOptionalConfig("app.support");return c?{url:c.getString("url"),items:c.getConfigArray("items").flatMap(f=>{var g;return{title:f.getString("title"),icon:f.getOptionalString("icon"),links:((g=f.getOptionalConfigArray("links"))!=null?g:[]).flatMap(E=>({url:E.getString("url"),title:E.getString("title")}))}})}:Ta}var ba=e(80079);function Pn(n,o){const f=(0,l.useApp)().getSystemIcon(n);return f?t.createElement(f,{...o}):t.createElement(ba.Z,{...o})}function Xs(n){return Pn("brokenImage",n)}function _s(n){return Pn("catalog",n)}function ec(n){return Pn("chat",n)}function tc(n){return Pn("dashboard",n)}function nc(n){return Pn("docs",n)}function rc(n){return Pn("email",n)}function oc(n){return Pn("github",n)}function ac(n){return Pn("group",n)}function Vr(n){return Pn("help",n)}function ic(n){return Pn("user",n)}function sc(n){return Pn("warning",n)}const Pa=(0,m.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Ia=({icon:n})=>{var f;const o=(0,l.useApp)(),c=n&&(f=o.getSystemIcon(n))!=null?f:Vr;return t.createElement(c,null)},La=({link:n})=>{var o;return t.createElement(D,{to:n.url},(o=n.title)!=null?o:n.url)},Oa=({item:n})=>{var o;return t.createElement(nt.Z,null,t.createElement(Aa.Z,null,t.createElement(Ia,{icon:n.icon})),t.createElement(it.Z,{primary:n.title,secondary:(o=n.links)==null?void 0:o.reduce((c,f,g)=>[...c,g>0&&t.createElement("br",{key:g}),t.createElement(La,{link:f,key:f.url})],[])}))};function xa(n){const{title:o,children:c}=n,{items:f}=To(),[g,E]=(0,t.useState)(!1),[L,$]=(0,t.useState)(null),Y=Pa(),W=(0,ye.Z)(Re=>Re.breakpoints.down("sm")),oe=Re=>{$(Re.currentTarget),E(!0)},te=()=>{E(!1)};return t.createElement(t.Fragment,null,t.createElement(En.Z,{display:"flex",ml:1},W?t.createElement(B.Z,{color:"primary",size:"small",onClick:oe,"data-testid":"support-button"},t.createElement(Vr,null)):t.createElement(y.Z,{"data-testid":"support-button",color:"primary",onClick:oe,startIcon:t.createElement(Vr,null)},"Support")),t.createElement(Ao.ZP,{"data-testid":"support-button-popover",open:g,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:te},t.createElement(Et.Z,{className:Y.popoverList},o&&t.createElement(nt.Z,{alignItems:"flex-start"},t.createElement(F.Z,{variant:"subtitle1"},o)),t.Children.map(c,(Re,ve)=>t.createElement(nt.Z,{alignItems:"flex-start",key:`child-${ve}`},Re)),f&&f.map((Re,ve)=>t.createElement(Oa,{item:Re,key:`item-${ve}`}))),t.createElement(va.Z,null,t.createElement(y.Z,{color:"primary",onClick:te},"Close"))))}var oo=e(18671),Rn=e(10289);const Gr=72,bo=24,Po=18,Bn={drawerWidthClosed:Gr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Gr,iconSize:Gr-bo*2,iconPadding:bo,selectedIndicatorWidth:3,userBadgePadding:Po,userBadgeDiameter:Gr-Po*2,mobileSidebarHeight:56},Da=n=>({...Bn,...n,iconContainerWidth:Bn.drawerWidthClosed,iconSize:Bn.drawerWidthClosed-Bn.iconPadding*2,userBadgeDiameter:Bn.drawerWidthClosed-Bn.userBadgePadding*2}),Io={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Bn.defaultOpenDelayMs+200},Fa=n=>({...Io,...n}),cc="@backstage/core/sidebar-intro-dismissed",Br=(0,t.createContext)({isOpen:!1,setOpen:()=>{}}),xn=(0,t.createContext)({sidebarConfig:Bn,submenuConfig:Io}),Lo=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Kr;(function(n){const o="sidebarPinState";n.SIDEBAR_PIN_STATE=o})(Kr||(Kr={}));const Oo={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Kr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Kr.SIDEBAR_PIN_STATE,JSON.stringify(n))}},Ba=(0,m.Z)(n=>({root:o=>({width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:()=>o.isPinned?o.sidebarConfig.drawerWidthOpen:o.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:o.sidebarConfig.mobileSidebarHeight}}),content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),dr=(0,t.createContext)({isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1}),xo=(0,t.createContext)({content:{contentRef:void 0}});function Ma(n){const[o,c]=(0,t.useState)(()=>Oo.getSidebarPinState()),{sidebarConfig:f}=(0,t.useContext)(xn),g=(0,t.useRef)(null),E=(0,t.useMemo)(()=>({content:{contentRef:g}}),[g]);(0,t.useEffect)(()=>{Oo.setSidebarPinState(o)},[o]);const L=(0,ye.Z)(W=>W.breakpoints.down("xs"),{noSsr:!0}),$=()=>c(!o),Y=Ba({isPinned:o,sidebarConfig:f});return t.createElement(dr.Provider,{value:{isPinned:o,toggleSidebarPinState:$,isMobile:L}},t.createElement(xo.Provider,{value:E},t.createElement("div",{className:Y.root},n.children)))}function Do(){const{content:n}=(0,t.useContext)(xo);return{focusContent:(0,t.useCallback)(()=>{var c,f;(f=(c=n==null?void 0:n.contentRef)==null?void 0:c.current)==null||f.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}var wa=e(50023),$a=e(4190),Na=e(87685),Za=e(44882),Ua=e(57998);const za=(0,m.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:o=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${o.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),Wa=n=>{const{to:o,label:c,icon:f,value:g}=n,{sidebarConfig:E}=(0,t.useContext)(xn),L=za({sidebarConfig:E}),$=(0,Rn.TH)(),{selectedMenuItemIndex:Y,setSelectedMenuItemIndex:W}=(0,t.useContext)(Mo),oe=(Re,ve)=>{W(ve===Y?-1:ve)},te=g===Y&&Y>=0||g!==Y&&!(Y>=0)&&o===$.pathname;return t.createElement(Ua.Z,{label:c,icon:f,component:D,to:o||$.pathname,onChange:oe,value:g,selected:te,classes:L})},Fo=n=>{const{children:o,to:c,label:f,icon:g,value:E}=n,{isMobile:L}=(0,t.useContext)(dr);return L?t.createElement(Wa,{to:c,label:f,icon:g,value:E}):t.createElement(t.Fragment,null,o)},Bo=(0,m.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:o=>({background:n.palette.navigation.background,width:"100%",bottom:`${o.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${o.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.bursts.fontColor,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.bursts.fontColor},marginMobileSidebar:o=>({marginBottom:`${o.sidebarConfig.mobileSidebarHeight}px`})})),Ha=n=>(0,Fr.orderBy)(n,({props:{priority:o}})=>Number.isInteger(o)?o:-1,"desc"),ja=t.createElement(Fo).type,Va=({children:n,label:o="Menu",open:c,onClose:f})=>{const{sidebarConfig:g}=(0,t.useContext)(xn),E=Bo({sidebarConfig:g});return t.createElement($a.ZP,{anchor:"bottom",open:c,onClose:f,ModalProps:{BackdropProps:{classes:{root:E.marginMobileSidebar}}},classes:{root:E.marginMobileSidebar,paperAnchorBottom:E.overlay}},t.createElement(En.Z,{className:E.overlayHeader},t.createElement(F.Z,{variant:"h3"},o),t.createElement(B.Z,{onClick:f,classes:{root:E.overlayHeaderClose}},t.createElement(Na.Z,null))),t.createElement(En.Z,null,n))},Mo=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),Ga=n=>{const{sidebarConfig:o}=(0,t.useContext)(xn),{children:c}=n,f=Bo({sidebarConfig:o}),g=(0,Rn.TH)(),[E,L]=(0,t.useState)(-1);(0,t.useEffect)(()=>{L(-1)},[g.pathname]);let $=(0,l.useElementFilter)(c,W=>W.getElements().filter(oe=>oe.type===ja));if(c)$.length?$=Ha($):$.push(t.createElement(Fo,{key:"default_menu",icon:t.createElement(Za.Z,null)},c));else return null;const Y=E>=0&&!$[E].props.to;return t.createElement(Br.Provider,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(Mo.Provider,{value:{selectedMenuItemIndex:E,setSelectedMenuItemIndex:L}},t.createElement(Va,{label:$[E]&&$[E].props.label,open:Y,onClose:()=>L(-1)},$[E]&&$[E].props.children),t.createElement(wa.Z,{className:f.root,"data-testid":"mobile-sidebar-root"},$)))},wo=(0,m.Z)(n=>({drawer:o=>({display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",left:0,top:0,bottom:0,zIndex:n.zIndex.appBar,background:n.palette.navigation.background,overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",width:o.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:o=>({width:o.sidebarConfig.drawerWidthOpen,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shorter})}),visuallyHidden:{top:0,position:"absolute",zIndex:1e3,transform:"translateY(-200%)","&:focus":{transform:"translateY(5px)"}}}),{name:"BackstageSidebar"});var mn;(function(n){n[n.Closed=0]="Closed";const c=0+1;n[n.Idle=c]="Idle";const f=c+1;n[n.Open=f]="Open"})(mn||(mn={}));const Ka=n=>{const{sidebarConfig:o}=(0,t.useContext)(xn),{openDelayMs:c=o.defaultOpenDelayMs,closeDelayMs:f=o.defaultCloseDelayMs,disableExpandOnHover:g,children:E}=n,L=wo({sidebarConfig:o}),$=(0,ye.Z)(Ut=>Ut.breakpoints.down("md"),{noSsr:!0}),[Y,W]=(0,t.useState)(mn.Closed),oe=(0,t.useRef)(),{isPinned:te,toggleSidebarPinState:Re}=(0,t.useContext)(dr),ve=()=>{te||g||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),Y!==mn.Open&&!$&&(oe.current=window.setTimeout(()=>{oe.current=void 0,W(mn.Open)},c),W(mn.Idle)))},be=()=>{te||g||(oe.current&&(clearTimeout(oe.current),oe.current=void 0),Y===mn.Idle?W(mn.Closed):Y===mn.Open&&(oe.current=window.setTimeout(()=>{oe.current=void 0,W(mn.Closed)},f)))},at=Y===mn.Open&&!$||te,Tt=Ut=>{Ut?(W(mn.Open),Re()):(W(mn.Closed),Re())};return t.createElement("div",{style:{}},t.createElement(Ja,null),t.createElement(Br.Provider,{value:{isOpen:at,setOpen:Tt}},t.createElement("div",{className:L.root,"data-testid":"sidebar-root",onMouseEnter:g?()=>{}:ve,onFocus:g?()=>{}:ve,onMouseLeave:g?()=>{}:be,onBlur:g?()=>{}:be},t.createElement("div",{className:lt()(L.drawer,{[L.drawerOpen]:at})},E))))},Ya=n=>{var Y,W;const o=Da((Y=n.sidebarOptions)!=null?Y:{}),c=Fa((W=n.submenuOptions)!=null?W:{}),{children:f,disableExpandOnHover:g,openDelayMs:E,closeDelayMs:L}=n,{isMobile:$}=(0,t.useContext)(dr);return $?t.createElement(Ga,null,f):t.createElement(xn.Provider,{value:{sidebarConfig:o,submenuConfig:c}},t.createElement(Ka,{openDelayMs:E,closeDelayMs:L,disableExpandOnHover:g},f))};function Ja(){const{sidebarConfig:n}=(0,t.useContext)(xn),{focusContent:o,contentRef:c}=Do(),f=wo({sidebarConfig:n});return c!=null&&c.current?t.createElement(y.Z,{onClick:o,variant:"contained",className:lt()(f.visuallyHidden)},"Skip to content"):null}function $o(n,o){const c=new URLSearchParams(o.search).toString(),f=Ro().parse(c),g=new URLSearchParams(n.search).toString(),E=Ro().parse(g);return(0,Fr.isEqual)(o.pathname,n.pathname)&&(0,Fr.isMatch)(E,f)}const ka=(0,m.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0"},textContent:{color:n.palette.navigation.color,display:"flex",justifyContent:"center",[n.breakpoints.down("xs")]:{display:"block",paddingLeft:n.spacing(4)},fontSize:"14px"}}),{name:"BackstageSidebarSubmenuItem"}),lc=n=>{const{title:o,to:c,icon:f,dropdownItems:g}=n,E=ka(),{setIsHoveredOn:L}=useContext(SidebarItemWithSubmenuContext),$=()=>{L(!1)},Y=useResolvedPath(c),W=useLocation();let oe=isLocationMatch(W,Y);const[te,Re]=useState(!1),ve=()=>{Re(!te)};return g!==void 0?(g.some(be=>{const at=resolvePath(be.to);return oe=isLocationMatch(W,at),oe}),React.createElement("div",{className:E.itemContainer},React.createElement("button",{onClick:ve,onTouchStart:be=>be.stopPropagation(),className:classnames(E.item,oe?E.selected:void 0)},React.createElement(f,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o),te?React.createElement(ArrowDropUpIcon,{className:E.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:E.dropdownArrow})),g&&te&&React.createElement("div",{className:E.dropdown},g.map((be,at)=>React.createElement(Link,{to:be.to,underline:"none",className:E.dropdownItem,onClick:$,onTouchStart:Tt=>Tt.stopPropagation(),key:at},React.createElement(Typography,{className:E.textContent},be.title)))))):React.createElement("div",{className:E.itemContainer},React.createElement(Link,{to:c,underline:"none",className:classnames(E.item,oe?E.selected:void 0),onClick:$,onTouchStart:be=>be.stopPropagation()},React.createElement(f,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:E.label},o)))},Qa=(0,m.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:o=>{var c,f;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:(f=(c=n.palette.navigation.submenu)==null?void 0:c.background)!=null?f:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:o.submenuConfig.drawerWidthClosed,transitionDelay:`${o.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:o=>({width:o.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),Xa=n=>{const{isOpen:o}=(0,t.useContext)(Br),{sidebarConfig:c,submenuConfig:f}=(0,t.useContext)(xn),g=o?c.drawerWidthOpen:c.drawerWidthClosed,E=Qa({left:g,submenuConfig:f}),{isHoveredOn:L}=(0,t.useContext)(Lo),[$,Y]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{Y(L)},[L]),t.createElement("div",{className:lt()(E.drawer,{[E.drawerOpen]:$})},t.createElement(F.Z,{variant:"h5",className:E.title},n.title),n.children)};var Yr=e(76600),qa=e(26739),_a=e(98989),ei=e(59797),ti=e(83543);const ni=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),uc=()=>{const n=ni();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var dc=null;const ri=(0,m.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),fc=()=>{const n=ri();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var mc=null;const oi=n=>(0,m.Z)(o=>{var c,f,g,E;return{root:{color:o.palette.navigation.color,display:"flex",flexFlow:"row nowrap",alignItems:"center",height:48,cursor:"pointer"},buttonItem:{background:"none",border:"none",width:"100%",margin:0,padding:0,textAlign:"inherit",font:"inherit"},closed:{width:n.drawerWidthClosed,justifyContent:"center"},open:{[o.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(f=(c=o.palette.navigation.navItem)==null?void 0:c.hoverBackground)!=null?f:"#404040"}},highlighted:{background:(E=(g=o.palette.navigation.navItem)==null?void 0:g.hoverBackground)!=null?E:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:n.iconContainerWidth,marginRight:-o.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:o.typography.fontSize},searchFieldHTMLInput:{padding:o.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:o.spacing(6),textAlign:"center",marginRight:o.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:o.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${o.palette.navigation.indicator}`,color:o.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function Jr(n){return(0,t.useMemo)(()=>oi(n),[n])()}const ai=(n,o)=>(0,l.useElementFilter)(n.props.children,c=>{let f=!1;return c.getElements().forEach(({props:{to:g,dropdownItems:E}})=>{if(!f){if(E!=null&&E.length){E.forEach(({to:L})=>f=f||$o(o,(0,Rn.i3)(L)));return}g&&(f=$o(o,(0,Rn.i3)(g)))}}),f},[o.pathname]);function No(n){return n.to===void 0}const ii=t.createElement(Xa).type,si=t.forwardRef(function({to:o,end:c,style:f,className:g,activeStyle:E,caseSensitive:L,activeClassName:$="active","aria-current":Y="page",...W},oe){let{pathname:te}=(0,Rn.TH)(),{pathname:Re}=(0,Rn.WU)(o);L||(te=te.toLocaleLowerCase("en-US"),Re=Re.toLocaleLowerCase("en-US"));let ve=te===Re;!ve&&!c&&(ve=te.startsWith(`${Re}/`));const be=ve?Y:void 0;return t.createElement(A.rU,{...W,to:o,ref:oe,"aria-current":be,style:{...f,...ve?E:void 0},className:lt()([g,ve?$:void 0])})}),Zo=(0,t.forwardRef)((n,o)=>{const{icon:c,text:f,hasNotifications:g=!1,disableHighlight:E=!1,onClick:L,children:$,className:Y,...W}=n,{sidebarConfig:oe}=(0,t.useContext)(xn),te=Jr(oe),{isOpen:Re}=(0,t.useContext)(Br),ve=t.createElement(qa.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!g,className:lt()({[te.closedItemIcon]:!Re})},t.createElement(c,{fontSize:"small"})),be=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:te.iconContainer},ve),f&&t.createElement(F.Z,{variant:"subtitle2",className:te.label},f),t.createElement("div",{className:te.secondaryAction},$)),at=Re?be:ve,Tt={onClick:L,className:lt()(Y,te.root,Re?te.open:te.closed,No(n)&&te.buttonItem,{[te.highlightable]:!E})};return No(n)?t.createElement("button",{"aria-label":f,...Tt,ref:o},at):t.createElement(si,{...Tt,activeClassName:te.selected,to:n.to?n.to:"",ref:o,"aria-label":f||n.to,...W},at)}),ci=({children:n,...o})=>{const{sidebarConfig:c}=(0,t.useContext)(xn),f=Jr(c),[g,E]=(0,t.useState)(!1),L=(0,Rn.TH)(),$=ai(n,L),Y=(0,ye.Z)(Re=>Re.breakpoints.down("sm")),W=()=>{E(!0)},oe=()=>{E(!1)},te=()=>Y?g?t.createElement(ei.Z,{fontSize:"small",className:f.submenuArrow}):t.createElement(ti.Z,{fontSize:"small",className:f.submenuArrow}):!g&&t.createElement(_a.Z,{fontSize:"small",className:f.submenuArrow});return t.createElement(Lo.Provider,{value:{isHoveredOn:g,setIsHoveredOn:E}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:oe,onTouchStart:g?oe:W,onMouseEnter:W,className:lt()(g&&f.highlighted)},t.createElement(Zo,{className:$?f.selected:"",...o},te()),g&&n))},Uo=(0,t.forwardRef)((n,o)=>{const[c]=(0,l.useElementFilter)(n.children,f=>f.getElements().filter(g=>g.type===ii));return c?t.createElement(ci,{...n},c):t.createElement(Zo,{...n,ref:o})});function hc(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),[c,f]=useState(""),g=Jr(o),E=n.icon?n.icon:SearchIcon,L=()=>{n.onSearch(c),f("")},$=te=>{te.key==="Enter"&&(te.preventDefault(),L())},Y=te=>{f(te.target.value)},W=te=>{te.preventDefault(),te.stopPropagation()},oe=te=>{L(),te.preventDefault()};return React.createElement("div",{className:g.searchRoot},React.createElement(Uo,{icon:E,to:n.to,onClick:oe,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:c,onClick:W,onChange:Y,onKeyDown:$,className:g.searchContainer,InputProps:{disableUnderline:!0,className:g.searchField},inputProps:{className:g.searchFieldHTMLInput}})))}const gc=(0,Yr.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),pc=(0,Yr.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),li=(0,Yr.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),ui=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),yc=(0,Yr.Z)("div")(({theme:n})=>{const o=ui(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":o,"&:hover":o}}),Ec=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),o=Jr(n),{isOpen:c,setOpen:f}=useContext(SidebarContext);if(useMediaQuery(L=>L.breakpoints.down("md"),{noSsr:!0}))return null;const E=()=>{f(!c)};return React.createElement("button",{onClick:E,className:o.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:o.arrows},c?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},di=(0,m.Z)(n=>({introCard:o=>({color:"#b5b5b5",fontSize:12,width:o.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:o.sidebarConfig.iconPadding,paddingRight:o.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function fi(n){const{sidebarConfig:o}=useContext(SidebarConfigContext),c=di({sidebarConfig:o}),{text:f,onClose:g}=n,E=()=>g();return React.createElement("div",{className:c.introCard},React.createElement(Typography,{variant:"subtitle2"},f),React.createElement("div",{className:c.introDismiss},React.createElement(Link,{component:"button",onClick:E,underline:"none",className:c.introDismissLink},React.createElement(CloseIcon,{className:c.introDismissIcon}),React.createElement(Typography,{component:"span",className:c.introDismissText},"Dismiss"))))}const zo=n=>{const{text:o,onDismiss:c}=n,[f,g]=useState(!1),E=()=>{g(!0)};return React.createElement(Collapse,{in:!f,onExited:c},React.createElement(fi,{text:o,onClose:E}))},mi=null,hi="And your recently viewed plugins will pop up here!";function vc(n){const{isOpen:o}=useContext(SidebarContext),c={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[f,g]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:E,recentlyViewedItemsDismissed:L}=f!=null?f:{},$=()=>{g(W=>({...c,...W,starredItemsDismissed:!0}))},Y=()=>{g(W=>({...c,...W,recentlyViewedItemsDismissed:!0}))};return o?React.createElement(React.Fragment,null,!E&&React.createElement(React.Fragment,null,React.createElement(zo,{text:mi,onDismiss:$}),React.createElement(SidebarDivider,null)),!L&&React.createElement(zo,{text:hi,onDismiss:Y})):null}const gi=(0,m.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function Wo(n){const{className:o,stretch:c,noPadding:f,children:g,...E}=n,{contentRef:L}=Do(),$=gi();return t.createElement("article",{ref:L,tabIndex:-1,...E,className:lt()($.root,o,{[$.stretch]:c,[$.noPadding]:f})},g)}var pi=e(6487),yi=e(99152);const Ei=(0,m.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3)},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function Ho(n){const{tabs:o,onChange:c,selectedIndex:f}=n,[g,E]=(0,t.useState)(f!=null?f:0),L=Ei(),$=(Y,W)=>{f===void 0&&E(W),c&&c(W)};return(0,t.useEffect)(()=>{f!==void 0&&E(f)},[f]),t.createElement("div",{className:L.tabsWrapper},t.createElement(yi.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:$,value:g},o.map((Y,W)=>t.createElement(pi.Z,{...Y.tabProps,"data-testid":`header-tab-${W}`,label:Y.label,key:Y.id,value:W,className:L.defaultTab,classes:{selected:L.selected,root:L.tabRoot}}))))}function vi(n){var $,Y,W;const o=(0,Rn.UO)(),f=n.map(({path:oe,children:te})=>({caseSensitive:!1,path:`${oe}/*`,element:te})).sort((oe,te)=>te.path.replace(/\/\*$/,"").localeCompare(oe.path.replace(/\/\*$/,""))),g=($=(0,Rn.V$)(f))!=null?$:n[0].children,[E]=(Y=(0,Rn.fp)(f,`/${o["*"]}`))!=null?Y:[],L=E?n.findIndex(oe=>`${oe.path}/*`===E.route.path):0;return{index:L===-1?0:L,element:g,route:(W=n[L])!=null?W:n[0]}}function jo(n){const{routes:o}=n,c=(0,Rn.s0)(),{index:f,route:g,element:E}=vi(o),L=(0,t.useMemo)(()=>o.map(Y=>({id:Y.path,label:Y.title,tabProps:Y.tabProps})),[o]),$=Y=>c(o[Y].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(Ho,{tabs:L,selectedIndex:f,onChange:$}),t.createElement(Wo,null,t.createElement(oo.q,{title:g.title}),E))}const ao=()=>null;(0,l.attachComponentData)(ao,"core.gatherMountPoints",!0);function Vo(n){const o=t.createElement(ao,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(c=>{if(!(0,t.isValidElement)(c))return[];if(c.type===t.Fragment)return Vo(c.props.children);if(c.type!==o)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:f,title:g,children:E,tabProps:L}=c.props;return[{path:f,title:g,children:E,tabProps:L}]})}function Ai(n){const o=Vo(n.children);return t.createElement(jo,{routes:o})}Ai.Route=ao;const Ri=(0,m.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function Si(n){const{value:o,subvalue:c}=n,f=Ri();return t.createElement(t.Fragment,null,t.createElement("div",{className:f.value},o),t.createElement("div",{className:f.subvalue},c))}var Ci=e(21070),Ti=e(90324),bi=e(98281),Pi=e(48049),Go=e(51209),Ko=e(33375),Ii=e(44233),Li=e(27604),io=e(36444),Oi=e(37971),xi=e(59709),Di=e(17373),Fi=e(3702),Bi=e(93111),kr=e(67222);const Mi=(0,m.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),wi=n=>{var Y;const o=Mi(),{onChangeFilters:c}=n,[f,g]=(0,t.useState)({...n.selectedFilters}),[E,L]=(0,t.useState)(!1),$=()=>{g({}),L(W=>!W)};return(0,t.useEffect)(()=>{c(f)},[f,c]),t.createElement("div",{className:o.root},t.createElement("div",{className:o.header},t.createElement("div",{className:o.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:$},"Clear all")),t.createElement("div",{className:o.filters},((Y=n.filters)==null?void 0:Y.length)&&n.filters.map(W=>t.createElement(_e,{triggerReset:E,key:W.element.label,...W.element,selected:f[W.element.label],onChange:oe=>g({...f,[W.element.label]:oe})}))))},$i={Add:(0,t.forwardRef)((n,o)=>t.createElement(Ci.Z,{...n,ref:o})),Check:(0,t.forwardRef)((n,o)=>t.createElement(bi.Z,{...n,ref:o})),Clear:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Delete:(0,t.forwardRef)((n,o)=>t.createElement(Ii.Z,{...n,ref:o})),DetailPanel:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),Edit:(0,t.forwardRef)((n,o)=>t.createElement(Li.Z,{...n,ref:o})),Export:(0,t.forwardRef)((n,o)=>t.createElement(Fi.Z,{...n,ref:o})),Filter:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),FirstPage:(0,t.forwardRef)((n,o)=>t.createElement(Oi.Z,{...n,ref:o})),LastPage:(0,t.forwardRef)((n,o)=>t.createElement(xi.Z,{...n,ref:o})),NextPage:(0,t.forwardRef)((n,o)=>t.createElement(Go.Z,{...n,ref:o})),PreviousPage:(0,t.forwardRef)((n,o)=>t.createElement(Pi.Z,{...n,ref:o})),ResetSearch:(0,t.forwardRef)((n,o)=>t.createElement(Ko.Z,{...n,ref:o})),Search:(0,t.forwardRef)((n,o)=>t.createElement(io.Z,{...n,ref:o})),SortArrow:(0,t.forwardRef)((n,o)=>t.createElement(Ti.Z,{...n,ref:o})),ThirdStateCheck:(0,t.forwardRef)((n,o)=>t.createElement(Di.Z,{...n,ref:o})),ViewColumn:(0,t.forwardRef)((n,o)=>t.createElement(Bi.Z,{...n,ref:o}))};function Yo(n,o){const c=o.split(".");let f=n[c[0]];for(let g=1;g<c.length;++g){if(f===void 0)return f;const E=c[g];f=f[E]}return f}const Ni=(0,kt.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"})(kr.W$),Jo=(0,kt.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(kr.UW),Zi=(0,m.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),Ui=(0,m.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function zi(n,o){return n.map(c=>{const f={};let g=c.cellStyle||{};if(c.highlight)if(f.color=o.palette.textContrast,typeof g=="object")g.fontWeight=o.typography.fontWeightBold;else{const E=g;g=(L,$,Y)=>({...E(L,$,Y),fontWeight:o.typography.fontWeightBold})}return{...c,headerStyle:f,cellStyle:g}})}function Wi(n,o){return(0,Fr.transform)(n,(c,f,g)=>{(0,Fr.isEqual)(f,o[g])||(c[g]=f)})}const ko={search:"",filtersOpen:!1,filters:{}};function Hi(n){const{toolbarRef:o,setSearch:c,hasFilters:f,selectedFiltersLength:g,toggleFilters:E}=n,L=Zi(),$=(0,t.useCallback)(Y=>{n.onSearchChanged(Y),c(Y)},[n,c]);return f?t.createElement("div",{className:L.root},t.createElement("div",{className:L.root},t.createElement(B.Z,{onClick:E,"aria-label":"filter list"},t.createElement(io.Z,null)),t.createElement(F.Z,{className:L.title},"Filters (",g,")")),t.createElement(Jo,{...n,ref:o,onSearchChanged:$})):t.createElement(Jo,{...n,ref:o,onSearchChanged:$})}function ji(n){const{data:o,columns:c,options:f,title:g,subtitle:E,filters:L,initialState:$,emptyContent:Y,onStateChange:W,...oe}=n,te=Ui(),Re=(0,I.Z)(),ve={...ko,...$},[be,at]=(0,t.useState)(ve.filtersOpen),Tt=(0,t.useCallback)(()=>at(Xt=>!Xt),[at]),[Ut,Vt]=(0,t.useState)(0),[ot,bt]=(0,t.useState)(o),[Ot,Yt]=(0,t.useState)(ve.filters),Un=zi(c,Re),[Sn,wr]=(0,t.useState)(ve.search);(0,t.useEffect)(()=>{if(W){const Xt=Wi({search:Sn,filtersOpen:be,filters:Ot},ko);W(Xt)}},[Sn,be,Ot,W]);const St={headerStyle:{textTransform:"uppercase"}},zn=(0,t.useCallback)(Xt=>{var hn;return(hn=c.find(Cn=>Cn.title===Xt))==null?void 0:hn.field},[c]);(0,t.useEffect)(()=>{if(typeof o=="function")return;if(!Ot){bt(o);return}const Xt=Object.values(Ot);if(o&&Xt.flat().length){const hn=o.filter(Cn=>!!Object.entries(Ot).filter(([,tr])=>!!tr.length).every(([tr,Gt])=>{const Kt=Yo(Cn,zn(tr));return Array.isArray(Kt)&&Array.isArray(Gt)?Kt.some(fr=>Gt.includes(fr)):Array.isArray(Kt)?Kt.includes(Gt):Array.isArray(Gt)?Gt.includes(Kt):Kt===Gt}));bt(hn)}else bt(o);Vt(Xt.flat().length)},[o,Ot,zn]);const fo=(Xt,hn)=>{const Cn=Gt=>{const Kt=new Set,fr=nr=>{nr!=null&&Kt.add(nr)};return hn&&hn.forEach(nr=>{const mr=Yo(nr,zn(Gt));Array.isArray(mr)?mr.forEach(fr):fr(mr)}),Kt},tr=Gt=>({placeholder:"All results",label:Gt.column,multiple:Gt.type==="multiple-select",items:[...Cn(Gt.column)].sort().map(Kt=>({label:Kt,value:Kt}))});return Xt.map(Gt=>({type:Gt.type,element:tr(Gt)}))},er=!!(L!=null&&L.length),mo=(0,t.useCallback)(Xt=>t.createElement(Hi,{setSearch:wr,hasFilters:er,selectedFiltersLength:Ut,toggleFilters:Tt,...Xt}),[Tt,er,Ut,wr]),Xr=typeof o!="function"&&o.length===0,qr=c.length,ho=(0,t.useCallback)(Xt=>Y&&Xr?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:qr},Y))):t.createElement(kr.os,{...Xt}),[Xr,Y,qr]);return t.createElement("div",{className:te.root},be&&o&&typeof o!="function"&&(L==null?void 0:L.length)&&t.createElement(wi,{filters:fo(L,o),selectedFilters:Ot,onChangeFilters:Yt}),t.createElement(kr.ZP,{components:{Header:Ni,Toolbar:mo,Body:ho},options:{...St,...f},columns:Un,icons:$i,title:t.createElement(t.Fragment,null,t.createElement(F.Z,{variant:"h5",component:"h3"},g),E&&t.createElement(F.Z,{color:"textSecondary",variant:"body1"},E)),data:typeof o=="function"?o:ot,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...oe}))}const Ac=n=>{const{children:o,value:c,index:f,...g}=n;return React.createElement("div",{role:"tabpanel",hidden:c!==f,"aria-labelledby":`scrollable-auto-tab-${f}`,...g},c===f&&React.createElement(Box,{p:3},o))},Vi=(0,m.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),Rc=n=>{const o=Vi(n),{ariaLabel:c,onClick:f}=n;return React.createElement(IconButton,{onClick:f,className:o.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":c},n.children)},Gi=(n,o)=>o?n?"20px":"0":"40px",Ki=(0,m.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:o=>Gi(o.isFirstNav,o.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),Sc=n=>{const o=Ki(n),{isFirstNav:c,isFirstIndex:f,...g}=n;return React.createElement(Tab,{classes:o,disableRipple:!0,...g})},Yi=(0,m.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Cc=n=>{const o=Yi(n);return React.createElement(Tabs,{classes:o,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},Ji=(0,m.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Tc(n){const{tabs:o}=n,c=Ji(),[f,g]=useState([0,0]),[E,L]=useState(0),[$,Y]=useState(0),[W,oe]=useState([[]]),te=useRef(),{width:Re}=useWindowSize(),ve=(Vt,ot)=>{g([E,ot])},be=()=>{L(E-1)},at=()=>{L(E+1)},Tt=()=>E+1<W.length;useEffect(()=>{const ot=E===0?1:2,bt=te.current.offsetWidth-20-ot*30,Ot=f[0]*$+f[1],Yt=Math.floor(bt/170);Y(Yt),oe(chunkArray(o,Yt)),g([Math.floor(Ot/Yt),Ot%Yt])},[Re,o]);const Ut=E===f[0]?f[1]:!1;return React.createElement("div",{className:c.root},React.createElement(AppBar,{ref:te,className:c.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:Ut,onChange:ve,selectionFollowsFocus:!0},E!==0&&React.createElement(StyledIcon,{onClick:be,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),W[E].map((Vt,ot)=>React.createElement(StyledTab,{value:ot,isFirstIndex:ot===0,isFirstNav:E===0,key:ot,icon:Vt.icon||void 0,label:Vt.label||void 0})),Tt()&&React.createElement(StyledIcon,{isNext:!0,onClick:at,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),Ut!==!1?W[E].map((Vt,ot)=>React.createElement(TabPanel,{key:ot,value:ot,index:Ut},Vt.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:f[1],index:f[1]},W[f[0]][f[1]].content))}var bc=e(44311);function ki(n,o){const c=n[n.length-1];if(!!c)return c>=.9?o.palette.status.ok:c>=.5?o.palette.status.warning:o.palette.status.error}function Pc(n){var c;const o=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(c=n.color)!=null?c:ki(n.data,o)})):null}const Qi=n=>(0,m.Z)(o=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:o.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:o.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),Xi=({title:n="Unknown page",className:o})=>t.createElement(F.Z,{variant:"h4",component:"h2",className:o,"data-testid":"header-title"},n);function qi(n){const{description:o,title:c,titleComponent:f=void 0,children:g,textAlign:E="left"}=n,L=Qi({textAlign:E})(),$=f||t.createElement(Xi,{title:c,className:L.title});return t.createElement(t.Fragment,null,t.createElement(oo.q,{title:c}),t.createElement("div",{className:L.container},t.createElement("div",{className:L.leftItemsBox},$,o&&t.createElement(F.Z,{className:L.description,variant:"body2"},o)),t.createElement("div",{className:L.rightItemsBox},g)))}var _i=e(29788);const es=(0,m.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),ts=()=>{const n=es();return t.createElement("img",{src:_i,className:n.micDrop,alt:"Girl dropping mic from her hands"})},ns=(0,m.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function rs(n){const{status:o,statusMessage:c,additionalInfo:f,supportUrl:g}=n,E=ns(),L=(0,Rn.s0)(),$=To();return t.createElement(H.Z,{container:!0,spacing:0,className:E.container},t.createElement(ts,null),t.createElement(H.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(F.Z,{"data-testid":"error",variant:"body1",className:E.subtitle},"ERROR ",o,": ",c),t.createElement(F.Z,{variant:"body1",className:E.subtitle},f),t.createElement(F.Z,{variant:"h2",className:E.title},"Looks like someone dropped the mic!"),t.createElement(F.Z,{variant:"h6"},t.createElement(D,{to:"#","data-testid":"go-back-link",onClick:()=>L(-1)},"Go back"),"... or please"," ",t.createElement(D,{to:g||$.url},"contact support")," if you think this is a bug.")))}var os=e(16173);const as=(0,kt.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(F.Z),so=(0,kt.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(En.Z);function is(n){const{children:o,...c}=n,[f,g]=t.useState(null),E=t.Children.toArray(o),[L,$,...Y]=E,W=Y.length?Y.pop():E[E.length-1],oe=E.length>3,te=be=>{g(be.currentTarget)},Re=()=>{g(null)},ve=Boolean(f);return t.createElement(t.Fragment,null,t.createElement(os.Z,{"aria-label":"breadcrumb",...c},E.length>1&&t.createElement(so,{clone:!0},L),E.length>2&&t.createElement(so,{clone:!0},$),oe&&t.createElement(as,{onClick:te},"..."),t.createElement(En.Z,{style:{fontStyle:"italic"}},W)),t.createElement(Ao.ZP,{open:ve,anchorEl:f,onClose:Re,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(Et.Z,null,Y.map((be,at)=>t.createElement(nt.Z,{key:at,button:!0},t.createElement(so,{clone:!0},be))))))}const ss=(0,m.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto"},title:{color:n.palette.bursts.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.palette.bursts.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.palette.bursts.fontColor},breadcrumb:{color:n.palette.bursts.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),cs=({type:n,typeLink:o,classes:c,pageTitle:f})=>n?o?t.createElement(is,{className:c.breadcrumb},t.createElement(D,{to:o},n),t.createElement(F.Z,null,f)):t.createElement(F.Z,{className:c.type},n):null,ls=({pageTitle:n,classes:o,tooltip:c})=>{const f=t.createElement(F.Z,{className:o.title,variant:"h1"},n);return c?t.createElement(O.ZP,{title:c,placement:"top-start"},f):f},us=({classes:n,subtitle:o})=>o?typeof o!="string"?t.createElement(t.Fragment,null,o):t.createElement(F.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},o):null;function Qo(n){const{children:o,pageTitleOverride:c,style:f,subtitle:g,title:E,tooltip:L,type:$,typeLink:Y}=n,W=ss(),te=(0,l.useApi)(l.configApiRef).getOptionalString("app.title")||"Backstage",Re=c||E,ve=E||c,be=`${Re} | %s | ${te}`,at=`${Re} | ${te}`;return t.createElement(t.Fragment,null,t.createElement(oo.q,{titleTemplate:be,defaultTitle:at}),t.createElement("header",{style:f,className:W.header},t.createElement(En.Z,{className:W.leftItemsBox},t.createElement(cs,{classes:W,type:$,typeLink:Y,pageTitle:ve}),t.createElement(ls,{classes:W,pageTitle:ve,tooltip:L}),t.createElement(us,{classes:W,subtitle:g})),t.createElement(H.Z,{container:!0,className:W.rightItemsBox,spacing:4},o)))}const ds=(0,m.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),fs=({value:n,className:o})=>t.createElement(F.Z,{className:o},n);function ms(n){const{label:o,value:c,url:f}=n,g=ds(),E=t.createElement(fs,{className:g.value,value:c||"<Unknown>"});return t.createElement(H.Z,{item:!0},t.createElement("span",{className:g.root},t.createElement(F.Z,{className:g.label},o),f?t.createElement(D,{to:f},E):E))}const hs={hour:"2-digit",minute:"2-digit"};function Xo(n){const o=new Date,c=window.navigator.language,f=[];if(!n.has("homepage.clocks"))return f;const g=n.getConfigArray("homepage.clocks");for(const E of g)if(E.has("label")&&E.has("timezone")){let L=E.getString("label");const $={timeZone:E.getString("timezone"),...hs};try{new Date().toLocaleString(c,$)}catch{console.warn(`The timezone ${$.timeZone} is invalid. Defaulting to GMT`),$.timeZone="GMT",L="GMT"}const Y=o.toLocaleTimeString(c,$);f.push({time:Y,label:L})}return f}function Ic(n){const o=useApi(configApiRef),c=[],[f,g]=React.useState(c);return React.useEffect(()=>{g(Xo(o));const E=setInterval(()=>{g(Xo(o))},1e3);return()=>{clearInterval(E)}},[o]),f.length!==0?React.createElement(React.Fragment,null,f.map(E=>React.createElement(HeaderLabel,{label:E.label,value:E.time,key:E.label}))):null}const gs=n=>(0,a.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.palette.bursts.gradient.linear,backgroundPosition:0,backgroundSize:"inherit"}}),ps=(0,m.Z)(gs,{name:"BackstageItemCardHeader"});function ys(n){const{title:o,subtitle:c,children:f}=n,g=ps(n);return t.createElement("div",{className:g.root},c&&t.createElement(F.Z,{variant:"subtitle2",component:"h3"},c),o&&t.createElement(F.Z,{variant:"h6",component:"h4"},o),f)}function Lc(n){const{description:o,tags:c,title:f,type:g,subtitle:E,label:L,onClick:$,href:Y}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:f,subtitle:E||g})),React.createElement(CardContent,null,c!=null&&c.length?React.createElement(Box,null,c.map((W,oe)=>React.createElement(Chip,{size:"small",label:W,key:oe}))):null,o),React.createElement(CardActions,null,!Y&&React.createElement(Button,{to:"#",onClick:$,color:"primary"},L),Y&&React.createElement(Button,{to:Y,color:"primary"},L)))}const Es=n=>(0,a.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),vs=(0,m.Z)(Es,{name:"BackstageItemCardGrid"});function As(n){const{children:o,...c}=n,f=vs(c);return t.createElement("div",{className:f.root,...c},o)}var Rs=e(41547);const Ss=(0,m.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function qo(n){const{themeId:o,children:c}=n,{isMobile:f}=(0,t.useContext)(dr),g=Ss({isMobile:f});return t.createElement(Rs.Z,{theme:E=>({...E,page:E.getPageTheme({themeId:o})})},t.createElement("div",{className:g.root},c))}function Cs(n){const{themeId:o,children:c,...f}=n;return t.createElement(qo,{themeId:o},t.createElement(Qo,{...f}),c)}var an=e(30195);const Oc=an.z.object({providerInfo:an.z.object({}).catchall(an.z.unknown()).optional(),profile:an.z.object({email:an.z.string().optional(),displayName:an.z.string().optional(),picture:an.z.string().optional()}),backstageIdentity:an.z.object({token:an.z.string(),identity:an.z.object({type:an.z.literal("user"),userEntityRef:an.z.string(),ownershipEntityRefs:an.z.array(an.z.string())})})}),_o={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Ts(n){const o=new Date(Date.now()+_o.defaultTokenExpiryMillis);if(!n)return o;const[c,f,g]=n.split("."),E=JSON.parse(atob(f));return typeof E.exp!="number"?o:new Date(E.exp*1e3-_o.tokenExpiryMarginMillis)}class xc{constructor(o){q(this,"options");q(this,"abortController");q(this,"state");this.options=o,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:o}=this.getSessionSync(),c=o.identity.userEntityRef,f=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(c);if(!f)throw new TypeError(`Invalid user entity reference "${c}"`);return f[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const o=this.state.type==="active"?this.state.session:void 0,c=this.fetchSession().then(f=>(this.state={type:"active",session:f,expiresAt:Ts(f.backstageIdentity.token)},f),f=>{throw this.state={type:"failed",error:f},f});return this.state={type:"fetching",promise:c,previous:o},c}async fetchSession(){const o=await this.options.discoveryApi.getBaseUrl("auth"),c=await fetch(`${o}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!c.ok)throw await ResponseError.fromResponse(c);return proxiedSessionSchema.parse(await c.json())}}const Dc=n=>{const o=useApi(discoveryApiRef),[{status:c,error:f},{execute:g}]=useAsync(async()=>{const E=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:o});await E.start(),n.onSignInSuccess(E)});return useMountEffect(g),c==="loading"?React.createElement(Progress,null):f?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:f}):null},bs=(0,m.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),co=({children:n})=>{const o=bs();return t.createElement(H.Z,{component:"li",item:!0,classes:o},n)};class lo{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const o="user:default/guest";return{type:"user",userEntityRef:o,ownershipEntityRefs:[o]}}async getCredentials(){return{}}async signOut(){}}function Ps(n){const[o,c,f]=n.split(".");return JSON.parse(atob(c))}class uo{constructor(o){this.result=o}getUserId(){return this.result.userId}static fromResult(o){return new uo(o)}async getIdToken(){var o,c;return(c=(o=this.result).getIdToken)==null?void 0:c.call(o)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const o=await this.getIdToken();if(!o){const g=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:g,ownershipEntityRefs:[g]}}const{sub:c,ent:f}=Ps(o);return{type:"user",userEntityRef:c,ownershipEntityRefs:f!=null?f:[]}}async getCredentials(){var c,f;return{token:await((f=(c=this.result).getIdToken)==null?void 0:f.call(c))}}async signOut(){var o,c;return(c=(o=this.result).signOut)==null?void 0:c.call(o)}}class Mr{constructor(o,c,f){q(this,"profilePromise");this.identity=o,this.authApi=c,this.profile=f}static createGuest(){return new lo}static fromLegacy(o){return uo.fromResult(o)}static create(o){return new Mr(o.identity,o.authApi,o.profile)}getUserId(){const o=this.identity.userEntityRef,c=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(o);if(!c)throw new TypeError(`Invalid user entity reference "${o}"`);return c[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(o){throw this.profilePromise=void 0,o}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Is={Component:({config:n,onSignInSuccess:o})=>{const{apiRef:c,title:f,message:g}=n,E=(0,l.useApi)(c),L=(0,l.useApi)(l.errorApiRef),$=async()=>{try{const Y=await E.getBackstageIdentity({instantPopup:!0});if(!Y)throw new Error(`The ${f} provider is not configured to support sign-in`);const W=await E.getProfile();o(Mr.create({identity:Y.identity,profile:W,authApi:E}))}catch(Y){L.post(new Tr.SP("Login failed",Y))}};return t.createElement(co,null,t.createElement(ft,{variant:"fullHeight",title:f,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:$},"Sign In")},t.createElement(F.Z,{variant:"body1"},g)))},loader:async(n,o)=>{const c=n.get(o),f=await c.getBackstageIdentity({optional:!0});if(!f)return;const g=await c.getProfile();return Mr.create({identity:f.identity,profile:g,authApi:c})}},Ls={Component:({onSignInSuccess:n})=>t.createElement(co,null,t.createElement(ft,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new lo)},"Enter")},t.createElement(F.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new lo};var Os=e(63955),ea=e(86619),ta=e(74828),xs=e(45455),Ds=e.n(xs);const Fs=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Bs=(0,m.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),na=n=>{const{ref:o,...c}=n;return{inputRef:o,...c}},Ms={Component:({onSignInSuccess:n})=>{const o=Bs(),{register:c,handleSubmit:f,formState:g}=(0,Os.cI)({mode:"onChange"}),{errors:E}=g,L=({userId:$})=>{n(Mr.fromLegacy({userId:$,profile:{email:`${$}@example.com`}}))};return t.createElement(co,null,t.createElement(ft,{title:"Custom User",variant:"fullHeight"},t.createElement(F.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:f(L)},t.createElement(b.Z,null,t.createElement(ea.Z,{...na(c("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(E.userId)}),E.userId&&t.createElement(ta.Z,{error:!0},E.userId.message)),t.createElement(b.Z,null,t.createElement(ea.Z,{...na(c("idToken",{required:!1,validate:$=>!$||Fs.test($)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(E.idToken)}),E.idToken&&t.createElement(ta.Z,{error:!0},E.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:o.button,disabled:!(g!=null&&g.isDirty)||!Ds()(E)},"Continue"))))},loader:async()=>{}},Qr="@backstage/core:SignInPage:provider",ra={guest:Ls,custom:Ms,common:Is};function oa(n,o){if(n in o)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function Zc(n){return n.reduce((c,f)=>{if(typeof f=="string")return oa(f,c),c[f]={components:ra[f],id:f},c;const{id:g}=f;return oa(g,c),c[g]={components:ra.common,id:g,config:f},c},{})}const Uc=(n,o)=>{const c=useApi(errorApiRef),f=useApiHolder(),[g,E]=useState(!0),L=useCallback(Y=>{o(IdentityApiSignOutProxy.from({identityApi:Y,signOut:async()=>{var W;localStorage.removeItem(Qr),await((W=Y.signOut)==null?void 0:W.call(Y))}}))},[o]);useLayoutEffect(()=>{var te;if(!g)return;const Y=localStorage.getItem(Qr);if(Y===null){E(!1);return}const W=n[Y];if(!W){E(!1);return}let oe=!1;return W.components.loader(f,(te=W.config)==null?void 0:te.apiRef).then(Re=>{oe||(Re?L(Re):E(!1))}).catch(Re=>{oe||(localStorage.removeItem(Qr),c.post(Re),E(!1))}),()=>{oe=!0}},[g,c,o,f,n,L]);const $=useMemo(()=>Object.keys(n).map(Y=>{const W=n[Y],{Component:oe}=W.components,te=Re=>{localStorage.setItem(Qr,W.id),L(Re)};return React.createElement(oe,{key:W.id,config:W.config,onSignInSuccess:te})}),[n,L]);return[g,$]},ws=({onSignInSuccess:n,providers:o=[],title:c,align:f="left"})=>{const g=useApi(configApiRef),E=useStyles(),L=getSignInProviders(o),[$,Y]=useSignInProviders(L,n);return $?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:g.getString("app.title")}),React.createElement(Content,null,c&&React.createElement(ContentHeader,{title:c,textAlign:f}),React.createElement(Grid,{container:!0,justifyContent:f==="center"?f:"flex-start",spacing:2,component:"ul",classes:E},Y)))},$s=({provider:n,auto:o,onSignInSuccess:c})=>{const f=useStyles(),g=useApi(n.apiRef),E=useApi(configApiRef),[L,$]=useState(),[Y,W]=useState(!1),oe=async({checkExisting:te,showPopup:Re})=>{try{let ve;if(te&&(ve=await g.getBackstageIdentity({optional:!0})),!ve&&(Re||o)&&(W(!0),ve=await g.getBackstageIdentity({instantPopup:!0}),!ve))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!ve){W(!0);return}const be=await g.getProfile();c(UserIdentity.create({identity:ve.identity,authApi:g,profile:be}))}catch(ve){$(ve),W(!0)}};return useMountEffect(()=>oe({checkExisting:!0})),Y?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:E.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:f},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{oe({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),L&&L.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},L.message)))))):React.createElement(Progress,null)};function zc(n){return"provider"in n?React.createElement($s,{...n}):React.createElement(ws,{...n})}const Ns=(0,m.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),Zs=(0,kt.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(lr.Z);function Wc(n){const{slackChannel:o,errorBoundaryProps:c,children:f,title:g,deepLink:E,value:L,onChange:$}=n,Y=Ns(),[W,oe]=useState(0),te=$||((be,at)=>oe(at));let Re;L?React.Children.map(f,be=>{React.isValidElement(be)&&(be==null?void 0:be.props.value)===L&&(Re=be==null?void 0:be.props.children)}):React.Children.map(f,(be,at)=>{React.isValidElement(be)&&at===W&&(Re=be==null?void 0:be.props.children)});const ve=c||(o?{slackChannel:o}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...ve},g&&React.createElement(Zs,{title:g}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:Y,value:L||W,onChange:te},f),React.createElement(Divider,null),React.createElement(CardContent,null,Re),E&&React.createElement(BottomLink,{...E})))}const Us=(0,m.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function Hc(n){const{children:o,...c}=n,f=Us();return React.createElement(Tab,{disableRipple:!0,classes:f,...c})}},88609:function(_,i,e){"use strict";e.d(i,{Os:function(){return h},fC:function(){return v}});var r=e(76241),t=e(2784);const l=(0,r.CT)("analytics-context"),h=()=>{const a=(0,t.useContext)(l);if(a===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const s=a.atVersion(1);if(s===void 0)throw new Error("No context found for version 1.");return s},v=a=>{const{attributes:s,children:d}=a,u={...h(),...s},A=(0,r.EI)({1:u});return t.createElement(l.Provider,{value:A},d)};function m(a,s){const d=y=>React.createElement(v,{attributes:s},React.createElement(a,{...y}));return d.displayName=`WithAnalyticsContext(${a.displayName||a.name||"Component"})`,d}},28461:function(_,i,e){"use strict";e.d(i,{f:function(){return r.fC},z:function(){return m}});var r=e(88609),t=e(27399),l=e(2784);class h{constructor(s,d={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=s,this.context=d}setContext(s){this.context=s}captureEvent(s,d,{value:y,attributes:u}={}){try{this.analyticsApi.captureEvent({action:s,subject:d,value:y,attributes:u,context:this.context})}catch(A){console.warn("Error during analytics event capture. %o",A)}}}function v(){try{return(0,t.useApi)(t.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function m(){const a=(0,l.useRef)(null),s=(0,r.Os)(),d=v();function y(){return a.current===null&&(a.current=new h(d)),a.current}const u=y();return u.setContext(s),u}},39135:function(_,i,e){"use strict";e.d(i,{CL:function(){return w},sM:function(){return t},$v:function(){return u},v_:function(){return A},hg:function(){return T},uB:function(){return y},bq:function(){return d},Ds:function(){return R},NW:function(){return D},VE:function(){return ne},W0:function(){return I},gP:function(){return B},F4:function(){return h},ux:function(){return m},Kp:function(){return l},$4:function(){return O},p_:function(){return a},ZM:function(){return M},D:function(){return v},gW:function(){return s},E6:function(){return k}});var r=e(86833),t;(function(ee){const Se="SignedIn";ee.SignedIn=Se;const Ke="SignedOut";ee.SignedOut=Ke})(t||(t={}));const l=(0,r.createApiRef)({id:"core.auth.google"}),h=(0,r.createApiRef)({id:"core.auth.github"}),v=(0,r.createApiRef)({id:"core.auth.okta"}),m=(0,r.createApiRef)({id:"core.auth.gitlab"}),a=(0,r.createApiRef)({id:"core.auth.microsoft"}),s=(0,r.createApiRef)({id:"core.auth.onelogin"}),d=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),u=(0,r.createApiRef)({id:"core.alert"}),A=(0,r.createApiRef)({id:"core.analytics"}),T=(0,r.createApiRef)({id:"core.apptheme"}),R=(0,r.createApiRef)({id:"core.config"}),D=(0,r.createApiRef)({id:"core.discovery"}),ne=(0,r.createApiRef)({id:"core.error"});var w;(function(ee){ee[ee.None=0]="None";const Ke=1;ee[ee.Active=Ke]="Active"})(w||(w={}));const I=(0,r.createApiRef)({id:"core.featureflags"}),B=(0,r.createApiRef)({id:"core.fetch"}),O=(0,r.createApiRef)({id:"core.identity"}),M=(0,r.createApiRef)({id:"core.oauthrequest"}),k=(0,r.createApiRef)({id:"core.storage"})},27399:function(_,i,e){"use strict";e.d(i,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(i,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(i,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(i,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(i,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(i,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(i,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(i,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(i,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(i,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(i,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(i,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(i,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(i,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"useRouteRef")&&e.d(i,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(_,i,e){"use strict";e.d(i,{T:function(){return t}});class r{constructor(h){if(this.config=h,!h.id.split(".").flatMap(m=>m.split("-")).every(m=>m.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${h.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(l){return new r(l)}},25182:function(_,i,e){"use strict";e.d(i,{n:function(){return r}});function r(t,l){return"id"in t?{api:t,deps:{},factory:()=>l}:t}},86833:function(_,i,e){"use strict";e.d(i,{createApiFactory:function(){return v.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),l=e(16362),h=e.n(l);e.o(l,"FeatureFlagState")&&e.d(i,{FeatureFlagState:function(){return l.FeatureFlagState}}),e.o(l,"SessionState")&&e.d(i,{SessionState:function(){return l.SessionState}}),e.o(l,"alertApiRef")&&e.d(i,{alertApiRef:function(){return l.alertApiRef}}),e.o(l,"analyticsApiRef")&&e.d(i,{analyticsApiRef:function(){return l.analyticsApiRef}}),e.o(l,"appThemeApiRef")&&e.d(i,{appThemeApiRef:function(){return l.appThemeApiRef}}),e.o(l,"atlassianAuthApiRef")&&e.d(i,{atlassianAuthApiRef:function(){return l.atlassianAuthApiRef}}),e.o(l,"attachComponentData")&&e.d(i,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"bitbucketAuthApiRef")&&e.d(i,{bitbucketAuthApiRef:function(){return l.bitbucketAuthApiRef}}),e.o(l,"configApiRef")&&e.d(i,{configApiRef:function(){return l.configApiRef}}),e.o(l,"createApiFactory")&&e.d(i,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(i,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(i,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(i,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"discoveryApiRef")&&e.d(i,{discoveryApiRef:function(){return l.discoveryApiRef}}),e.o(l,"errorApiRef")&&e.d(i,{errorApiRef:function(){return l.errorApiRef}}),e.o(l,"featureFlagsApiRef")&&e.d(i,{featureFlagsApiRef:function(){return l.featureFlagsApiRef}}),e.o(l,"fetchApiRef")&&e.d(i,{fetchApiRef:function(){return l.fetchApiRef}}),e.o(l,"getComponentData")&&e.d(i,{getComponentData:function(){return l.getComponentData}}),e.o(l,"githubAuthApiRef")&&e.d(i,{githubAuthApiRef:function(){return l.githubAuthApiRef}}),e.o(l,"gitlabAuthApiRef")&&e.d(i,{gitlabAuthApiRef:function(){return l.gitlabAuthApiRef}}),e.o(l,"googleAuthApiRef")&&e.d(i,{googleAuthApiRef:function(){return l.googleAuthApiRef}}),e.o(l,"identityApiRef")&&e.d(i,{identityApiRef:function(){return l.identityApiRef}}),e.o(l,"microsoftAuthApiRef")&&e.d(i,{microsoftAuthApiRef:function(){return l.microsoftAuthApiRef}}),e.o(l,"oauthRequestApiRef")&&e.d(i,{oauthRequestApiRef:function(){return l.oauthRequestApiRef}}),e.o(l,"oktaAuthApiRef")&&e.d(i,{oktaAuthApiRef:function(){return l.oktaAuthApiRef}}),e.o(l,"oneloginAuthApiRef")&&e.d(i,{oneloginAuthApiRef:function(){return l.oneloginAuthApiRef}}),e.o(l,"storageApiRef")&&e.d(i,{storageApiRef:function(){return l.storageApiRef}}),e.o(l,"useApp")&&e.d(i,{useApp:function(){return l.useApp}}),e.o(l,"useElementFilter")&&e.d(i,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(i,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return l.useRouteRefParams}});var v=e(25182)},16362:function(){},5761:function(_,i,e){"use strict";e.d(i,{I_:function(){return l},h_:function(){return h}});var r=e(2784),t=e(76241);function l(){const m=(0,t.Vt)("api-context");if(!m)throw new Error("API context is not available");const a=m.atVersion(1);if(!a)throw new Error("ApiContext v1 not available");return a}function h(m){const s=l().get(m);if(!s)throw new Error(`No implementation available for ${m}`);return s}function v(m){return function(s){const d=u=>{const A=l(),T={};for(const R in m)if(m.hasOwnProperty(R)){const D=m[R],ne=A.get(D);if(!ne)throw new Error(`No implementation available for ${D}`);T[R]=ne}return React.createElement(s,{...u,...T})},y=s.displayName||s.name||"Component";return d.displayName=`withApis(${y})`,d}}},31311:function(_,i,e){"use strict";e.d(i,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),l=e.n(t);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(_,i,e){"use strict";e.d(i,{q:function(){return t}});var r=e(76241);const t=()=>{const l=(0,r.Vt)("app-context");if(!l)throw new Error("App context is not available");const h=l.atVersion(1);if(!h)throw new Error("AppContext v1 not available");return h}},74181:function(_,i,e){"use strict";e.d(i,{R5:function(){return h},CO:function(){return A},YO:function(){return T},P4:function(){return u},IY:function(){return v},vJ:function(){return w}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),l="__backstage_data";function h(I,B,O){var ee;const M=I;let k=(ee=M[l])!=null?ee:t.get(I);if(k||(k={map:new Map},Object.defineProperty(M,l,{enumerable:!1,configurable:!0,writable:!1,value:k}),t.set(I,k)),k.map.has(B)){const Se=I.displayName||I.name;throw new Error(`Attempted to attach duplicate data "${B}" to component "${Se}"`)}k.map.set(B,O)}function v(I,B){var k;if(!I)return;const O=I.type;if(!O)return;const M=(k=O[l])!=null?k:t.get(O);if(!!M)return M.map.get(B)}var m=e(2784),a=e(88609),s=e(31311),d=e(82772);class y extends m.Component{constructor(){super(...arguments);q(this,"state",{error:void 0});q(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(O){return{error:O}}render(){const{error:O}=this.state,{app:M,plugin:k}=this.props,{ErrorBoundaryFallback:ee}=M.getComponents();return O?m.createElement(ee,{error:O,resetError:this.handleErrorReset,plugin:k}):this.props.children}}function u(I){const{component:B,mountPoint:O,name:M}=I;return T({component:{lazy:()=>B().then(k=>{const ee=Ke=>{try{(0,d.tg)(O)}catch(We){if(typeof We=="object"&&We!==null){const{message:fe}=We;if(typeof fe=="string"&&fe.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${O} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw We}return m.createElement(k,{...Ke})},Se=M||k.displayName||k.name||"LazyComponent";return ee.displayName=`RoutableExtension(${Se})`,ee},k=>Se=>{const Ke=(0,s.useApp)(),{BootErrorPage:We}=Ke.getComponents();return m.createElement(We,{step:"load-chunk",error:k})})},data:{"core.mountPoint":O},name:M})}function A(I){const{component:B,name:O}=I;return T({component:B,name:O})}function T(I){const{data:B={},name:O}=I;O||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let M;if("lazy"in I.component){const ee=I.component.lazy;M=(0,m.lazy)(()=>ee().then(Se=>({default:Se})))}else M=I.component.sync;const k=O||M.displayName||M.name||"Component";return{expose(ee){const Se=Ke=>{const We=(0,s.useApp)(),{Progress:fe}=We.getComponents(),ye=B==null?void 0:B["core.mountPoint"];return m.createElement(m.Suspense,{fallback:m.createElement(fe,null)},m.createElement(y,{app:We,plugin:ee},m.createElement(a.fC,{attributes:{pluginId:ee.getId(),...O&&{extension:O},...ye&&{routeRef:ye.id}}},m.createElement(M,{...Ke}))))};h(Se,"core.plugin",ee);for(const[Ke,We]of Object.entries(B))h(Se,Ke,We);return Se.displayName=`Extension(${k})`,Se}}}var R=e(27399);function D(I,B,O,M){return m.Children.toArray(I).flatMap(k=>{if(!(0,m.isValidElement)(k))return[];if(k.type===m.Fragment)return D(k.props.children,B,O,M);if(v(k,"core.featureFlagged")){const ee=k.props;return("with"in ee?B.isActive(ee.with):!B.isActive(ee.without))?D(k.props.children,B,O,M):[]}if(O===void 0||O(k))return[k];if(M)throw new Error(M);return D(k.props.children,B,O,M)})}class ne{constructor(B,O){this.node=B,this.featureFlagsApi=O}selectByComponentData(B){const O=D(this.node,this.featureFlagsApi,M=>v(M,B.key)!==void 0,B.withStrictError);return new ne(O,this.featureFlagsApi)}findComponentData(B){return D(this.node,this.featureFlagsApi,M=>v(M,B.key)!==void 0).map(M=>v(M,B.key)).filter(M=>M!==void 0)}getElements(){return D(this.node,this.featureFlagsApi)}}function w(I,B,O=[]){const M=(0,R.useApi)(R.featureFlagsApiRef),k=new ne(I,M);return(0,m.useMemo)(()=>B(k),[I,...O])}},80274:function(){},36964:function(_,i,e){"use strict";e.d(i,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return h.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return h.CO},createExternalRouteRef:function(){return s.x8},createPlugin:function(){return a.r},createReactExtension:function(){return h.YO},createRoutableExtension:function(){return h.P4},createRouteRef:function(){return s.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return h.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return l.useApp},useElementFilter:function(){return h.vJ},useRouteRef:function(){return s.tg},useRouteRefParams:function(){return s.Oi}});var r=e(28461),t=e(27399);e.o(t,"attachComponentData")&&e.d(i,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(i,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(i,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(i,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(i,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(i,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(i,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(i,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(i,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(i,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(i,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(i,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return t.useRouteRefParams}});var l=e(31311);e.o(l,"attachComponentData")&&e.d(i,{attachComponentData:function(){return l.attachComponentData}}),e.o(l,"createApiFactory")&&e.d(i,{createApiFactory:function(){return l.createApiFactory}}),e.o(l,"createApiRef")&&e.d(i,{createApiRef:function(){return l.createApiRef}}),e.o(l,"createComponentExtension")&&e.d(i,{createComponentExtension:function(){return l.createComponentExtension}}),e.o(l,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return l.createExternalRouteRef}}),e.o(l,"createPlugin")&&e.d(i,{createPlugin:function(){return l.createPlugin}}),e.o(l,"createReactExtension")&&e.d(i,{createReactExtension:function(){return l.createReactExtension}}),e.o(l,"createRoutableExtension")&&e.d(i,{createRoutableExtension:function(){return l.createRoutableExtension}}),e.o(l,"createRouteRef")&&e.d(i,{createRouteRef:function(){return l.createRouteRef}}),e.o(l,"getComponentData")&&e.d(i,{getComponentData:function(){return l.getComponentData}}),e.o(l,"useApi")&&e.d(i,{useApi:function(){return l.useApi}}),e.o(l,"useApiHolder")&&e.d(i,{useApiHolder:function(){return l.useApiHolder}}),e.o(l,"useElementFilter")&&e.d(i,{useElementFilter:function(){return l.useElementFilter}}),e.o(l,"useRouteRef")&&e.d(i,{useRouteRef:function(){return l.useRouteRef}}),e.o(l,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return l.useRouteRefParams}});var h=e(74181),v=e(80274),m=e.n(v);e.o(v,"createApiFactory")&&e.d(i,{createApiFactory:function(){return v.createApiFactory}}),e.o(v,"createApiRef")&&e.d(i,{createApiRef:function(){return v.createApiRef}}),e.o(v,"createExternalRouteRef")&&e.d(i,{createExternalRouteRef:function(){return v.createExternalRouteRef}}),e.o(v,"createPlugin")&&e.d(i,{createPlugin:function(){return v.createPlugin}}),e.o(v,"createRouteRef")&&e.d(i,{createRouteRef:function(){return v.createRouteRef}}),e.o(v,"useApi")&&e.d(i,{useApi:function(){return v.useApi}}),e.o(v,"useApiHolder")&&e.d(i,{useApiHolder:function(){return v.useApiHolder}}),e.o(v,"useRouteRef")&&e.d(i,{useRouteRef:function(){return v.useRouteRef}}),e.o(v,"useRouteRefParams")&&e.d(i,{useRouteRefParams:function(){return v.useRouteRefParams}});var a=e(96896),s=e(82772)},96896:function(_,i,e){"use strict";e.d(i,{r:function(){return t}});class r{constructor(h){this.config=h}getId(){return this.config.id}getApis(){var h;return(h=this.config.apis)!=null?h:[]}getFeatureFlags(){var h,v;return(v=(h=this.config.featureFlags)==null?void 0:h.slice())!=null?v:[]}get routes(){var h;return(h=this.config.routes)!=null?h:{}}get externalRoutes(){var h;return(h=this.config.externalRoutes)!=null?h:{}}provide(h){return h.expose(this)}toString(){return`plugin{${this.config.id}}`}}function t(l){return new r(l)}},82772:function(_,i,e){var R,D,ne;"use strict";e.d(i,{x8:function(){return d},NT:function(){return h},tg:function(){return A},Oi:function(){return T}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class l{constructor(I,B){q(this,R,"absolute");this.id=I,this.params=B}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}R=t;function h(w){var I;return new l(w.id,(I=w.params)!=null?I:[])}const v=/^\w+$/;class m{constructor(I,B,O,M){q(this,D,"sub");this.id=I,this.path=B,this.parent=O,this.params=M}toString(){return`routeRef{type=sub,id=${this.id}}`}}D=t;function a(w){const{id:I,path:B,parent:O}=w,M=B.split("/").filter(Se=>Se.startsWith(":")).map(Se=>Se.substring(1)),k=[...O.params,...M];if(O.params.some(Se=>M.includes(Se)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!B.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${B}'`);if(B.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${B}'`);for(const Se of M)if(!v.test(Se))throw new Error(`SubRouteRef path has invalid param, got '${Se}'`);return new m(I,B,O,k)}class s{constructor(I,B,O){q(this,ne,"external");this.id=I,this.params=B,this.optional=O}toString(){return`routeRef{type=external,id=${this.id}}`}}ne=t;function d(w){var I;return new s(w.id,(I=w.params)!=null?I:[],Boolean(w.optional))}var y=e(2784),u=e(10289);function A(w){const I=(0,u.TH)(),B=(0,r.Vt)("routing-context");if(!B)throw new Error("Routing context is not available");const O=B.atVersion(1),M=(0,y.useMemo)(()=>O&&O.resolve(w,I),[O,w,I]);if(!B)throw new Error("useRouteRef used outside of routing context");if(!O)throw new Error("RoutingContext v1 not available");const k="optional"in w&&w.optional;if(!M&&!k)throw new Error(`No path for ${w}`);return M}function T(w){return(0,u.UO)()}},10179:function(_,i,e){"use strict";e.d(i,{SP:function(){return R},dR:function(){return u},VL:function(){return ne},BD:function(){return t}});function r(w){if(typeof w!="object"||w===null||Array.isArray(w))return!1;const I=w;return!(typeof I.name!="string"||I.name===""||typeof I.message!="string")}function t(w){if(typeof w!="object"||w===null||Array.isArray(w))throw new Error(`Encountered invalid error, not an object, got '${w}'`);const I=w;if(typeof I.name!="string"||I.name==="")throw new Error(`Encountered error object without a name, got '${w}'`);if(typeof I.message!="string")throw new Error(`Encountered error object without a message, got '${w}'`)}var l=e(24852);function h(w,I){const B=serializeErrorInternal(w),O={name:"Unknown",message:"<no reason given>",...B};return I!=null&&I.includeStack||delete O.stack,O}function v(w){const I=(0,l.deserializeError)(w);return w.stack||(I.stack=void 0),I}function m(w){if(r(w)){const I=String(w);return I!=="[object Object]"?I:`${w.name}: ${w.message}`}return`unknown error '${w}'`}class a extends Error{constructor(B,O){var k;let M=B;if(O!==void 0){const ee=m(O);M?M+=`; caused by ${ee}`:M=`caused by ${ee}`}super(M);q(this,"cause");(k=Error.captureStackTrace)==null||k.call(Error,this,this.constructor),this.name=this.constructor.name,this.cause=r(O)?O:void 0}}class s extends null{}class d extends null{}class y extends null{}class u extends a{}class A extends null{}class T extends null{}class R extends a{constructor(I,B){super(I,B),this.name=r(B)?B.name:"Error"}}async function D(w){var I;try{const B=await w.text();if(B){if((I=w.headers.get("content-type"))!=null&&I.startsWith("application/json"))try{const O=JSON.parse(B);if(O.error&&O.response)return O}catch{}return{error:{name:"Error",message:`Request failed with status ${w.status} ${w.statusText}, ${B}`},response:{statusCode:w.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${w.status} ${w.statusText}`},response:{statusCode:w.status}}}class ne extends Error{constructor(B){super(B.message);q(this,"response");q(this,"body");q(this,"cause");this.name="ResponseError",this.response=B.response,this.body=B.data,this.cause=B.cause}static async fromResponse(B){const O=await D(B),M=O.response.statusCode||B.status,k=O.error.name||B.statusText,ee=`Request failed with ${M} ${k}`,Se=v(O.error);return new ne({message:ee,response:B,data:O,cause:Se})}}},36356:function(_,i,e){var u,A,T,R,D;"use strict";e.d(i,{nW:function(){return y},ae:function(){return m},q3:function(){return a}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class l{constructor(I){gn(this,u,void 0);Tn(this,u,I)}async getCredentials(I){const B=new URL(I.url),O=Qe(this,u).find(M=>M.isUrlSupported(B));if(!O)throw new Error(`No auth provider available for '${I.url}', see https://backstage.io/link?scm-auth`);return O.getCredentials(I)}}u=new WeakMap;const ne=class{constructor(I,B,O,M){gn(this,A,void 0);gn(this,T,void 0);gn(this,R,void 0);gn(this,D,void 0);Tn(this,A,B),Tn(this,T,O),Tn(this,R,M),Tn(this,D,I)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:I,gitlab:B,azure:O,bitbucket:M})=>ne.merge(ne.forGithub(I),ne.forGitlab(B),ne.forAzure(O),ne.forBitbucket(M))})}static forAuthApi(I,B){return new ne("generic",I,B.host,B.scopeMapping)}static forGithub(I,B){var M;const O=(M=B==null?void 0:B.host)!=null?M:"github.com";return new ne("github",I,O,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(I,B){var M;const O=(M=B==null?void 0:B.host)!=null?M:"gitlab.com";return new ne("gitlab",I,O,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(I,B){var M;const O=(M=B==null?void 0:B.host)!=null?M:"dev.azure.com";return new ne("azure",I,O,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(I,B){var M;const O=(M=B==null?void 0:B.host)!=null?M:"bitbucket.org";return new ne("bitbucket",I,O,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...I){return new l(I)}isUrlSupported(I){return I.host===Qe(this,T)}getAdditionalScopesForProvider(I){var B,O;return!(I!=null&&I.customScopes)||Qe(this,D)==="generic"?[]:(O=(B=I.customScopes)==null?void 0:B[Qe(this,D)])!=null?O:[]}async getCredentials(I){const{url:B,additionalScope:O,...M}=I,k=Qe(this,R).default.slice();O!=null&&O.repoWrite&&k.push(...Qe(this,R).repoWrite);const ee=this.getAdditionalScopesForProvider(O);ee.length&&k.push(...ee);const Se=[...new Set(k)],Ke=await Qe(this,A).getAccessToken(Se,M);return{token:Ke,headers:{Authorization:`Bearer ${Ke}`}}}};let h=ne;A=new WeakMap,T=new WeakMap,R=new WeakMap,D=new WeakMap;var v=e(86574);class m{static fromConfig(I){return v.Lx.fromConfig(I)}}const a=(0,r.createApiRef)({id:"integration.scmintegrations"});var s=e(73250),d=e(2784);const y=w=>{var k;const{type:I}=w,B=(0,r.useApp)(),O=s.Z,M=I&&(k=B.getSystemIcon(I))!=null?k:O;return d.createElement(M,null)}},86574:function(_,i,e){var U,P,Q,le,ue,Ce,xe;"use strict";e.d(i,{Lx:function(){return de},Pb:function(){return pe}});var r=e(82717),t=e.n(r),l=e(76635);function h(V){const p=new URL("http://example.com");return p.host=V,p.host===V}function v(V){try{return new URL(V),!0}catch{return!1}}function m(V,p){return{list(){return V},byUrl(x){try{const N=typeof x=="string"?new URL(x):x;return V.find(G=>p(G)===N.host)}catch{return}},byHost(x){return V.find(N=>p(N)===x)}}}function a(V){const{url:p,base:x,lineNumber:N}=V;try{return new URL(p),p}catch{}let G;if(p.startsWith("/")){const{filepath:Pe}=t()(x);G=new URL(x);const Ee=(0,l.trimEnd)(G.pathname.substring(0,G.pathname.length-Pe.length),"/");G.pathname=`${Ee}${p}`}else G=new URL(p,x);return G.search=new URL(x).search,N&&(G.hash=`L${N}`),G.toString()}const s="GB",we=class{constructor(p,x,N,G,Pe,Ee){gn(this,U,void 0);gn(this,P,void 0);gn(this,Q,void 0);gn(this,le,void 0);gn(this,ue,void 0);gn(this,Ce,void 0);gn(this,xe,(...p)=>{const x=new URL(Qe(this,U));return x.pathname=p.map(N=>encodeURIComponent(N)).join("/"),x});Tn(this,U,p),Tn(this,P,x),Tn(this,Q,N),Tn(this,le,G),Tn(this,ue,Pe),Tn(this,Ce,Ee)}static fromRepoUrl(p){var _t;const x=new URL(p);let N,G,Pe;const Ee=x.pathname.split("/").map(sn=>decodeURIComponent(sn));if(Ee[2]==="_git"?(N=Ee[1],G=Pe=Ee[3]):Ee[3]==="_git"&&(N=Ee[1],G=Ee[2],Pe=Ee[4]),!N||!G||!Pe)throw new Error("Azure URL must point to a git repository");const $e=(_t=x.searchParams.get("path"))!=null?_t:void 0;let Xe;const Rt=x.searchParams.get("version");if(Rt){if(Rt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Xe=Rt.slice(2)}return new we(x.origin,N,G,Pe,$e,Xe)}toRepoUrl(){let p;return Qe(this,Q)===Qe(this,le)?p=Qe(this,xe).call(this,Qe(this,P),"_git",Qe(this,le)):p=Qe(this,xe).call(this,Qe(this,P),Qe(this,Q),"_git",Qe(this,le)),Qe(this,ue)&&p.searchParams.set("path",Qe(this,ue)),Qe(this,Ce)&&p.searchParams.set("version",s+Qe(this,Ce)),p.toString()}toFileUrl(){if(!Qe(this,ue))throw new Error("Azure URL must point to a specific path to be able to download a file");const p=Qe(this,xe).call(this,Qe(this,P),Qe(this,Q),"_apis","git","repositories",Qe(this,le),"items");return p.searchParams.set("api-version","6.0"),p.searchParams.set("path",Qe(this,ue)),Qe(this,Ce)&&p.searchParams.set("version",Qe(this,Ce)),p.toString()}toArchiveUrl(){const p=Qe(this,xe).call(this,Qe(this,P),Qe(this,Q),"_apis","git","repositories",Qe(this,le),"items");return p.searchParams.set("recursionLevel","full"),p.searchParams.set("download","true"),p.searchParams.set("api-version","6.0"),Qe(this,ue)&&p.searchParams.set("scopePath",Qe(this,ue)),Qe(this,Ce)&&p.searchParams.set("version",Qe(this,Ce)),p.toString()}toCommitsUrl(){const p=Qe(this,xe).call(this,Qe(this,P),Qe(this,Q),"_apis","git","repositories",Qe(this,le),"commits");return p.searchParams.set("api-version","6.0"),Qe(this,Ce)&&p.searchParams.set("searchCriteria.itemVersion.version",Qe(this,Ce)),p.toString()}getOwner(){return Qe(this,P)}getProject(){return Qe(this,Q)}getRepo(){return Qe(this,le)}getPath(){return Qe(this,ue)}getRef(){return Qe(this,Ce)}};let d=we;U=new WeakMap,P=new WeakMap,Q=new WeakMap,le=new WeakMap,ue=new WeakMap,Ce=new WeakMap,xe=new WeakMap;const y="dev.azure.com";function u(V){var N;const p=(N=V.getOptionalString("host"))!=null?N:y,x=V.getOptionalString("token");if(!h(p))throw new Error(`Invalid Azure integration config, '${p}' is not a valid host`);return{host:p,token:x}}function A(V){const p=V.map(u);return p.some(x=>x.host===y)||p.push({host:y}),p}const ut=class{constructor(p){this.integrationConfig=p}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){var G;const{url:x,base:N}=p;if(v(x))return x;try{const Pe=d.fromRepoUrl(N),Ee=new URL(N),$e=new URL(`https://a.com${(G=Pe.getPath())!=null?G:""}`),Xe=new URL(x,$e).pathname;return Ee.searchParams.set("path",Xe),p.lineNumber&&(Ee.searchParams.set("line",String(p.lineNumber)),Ee.searchParams.set("lineEnd",String(p.lineNumber+1)),Ee.searchParams.set("lineStartColumn","1"),Ee.searchParams.set("lineEndColumn","1")),Ee.toString()}catch{return new URL(x,N).toString()}}resolveEditUrl(p){return p}};let T=ut;q(T,"factory",({config:p})=>{var N;const x=A((N=p.getOptionalConfigArray("integrations.azure"))!=null?N:[]);return m(x.map(G=>new ut(G)),G=>G.config.host)});var R=e(48834).Buffer;function D(V){return AzureUrl.fromRepoUrl(V).toFileUrl()}function ne(V){return AzureUrl.fromRepoUrl(V).toArchiveUrl()}function w(V){return AzureUrl.fromRepoUrl(V).toCommitsUrl()}function I(V,p){const x=p?{...p}:{};if(V.token){const N=R.from(`:${V.token}`,"utf8");x.Authorization=`Basic ${N.toString("base64")}`}return{headers:x}}const B="bitbucket.org",O="https://api.bitbucket.org/2.0";function M(V){var Ee;const p=(Ee=V.getOptionalString("host"))!=null?Ee:B;let x=V.getOptionalString("apiBaseUrl");const N=V.getOptionalString("token"),G=V.getOptionalString("username"),Pe=V.getOptionalString("appPassword");if(!h(p))throw new Error(`Invalid Bitbucket integration config, '${p}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):p===B?x=O:x=`https://${p}/rest/api/1.0`,{host:p,apiBaseUrl:x,token:N,username:G,appPassword:Pe}}function k(V){const p=V.map(M);return p.some(x=>x.host===B)||p.push({host:B,apiBaseUrl:O}),p}const Et=class{constructor(p){this.integrationConfig=p}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){const x=a(p);if(!p.lineNumber)return x;const N=new URL(x);return this.integrationConfig.host==="bitbucket.org"?N.hash=`lines-${p.lineNumber}`:N.hash=`${p.lineNumber}`,N.toString()}resolveEditUrl(p){const x=t()(p),N=new URL(p);return N.searchParams.set("mode","edit"),N.searchParams.set("spa","0"),N.searchParams.set("at",x.ref),N.toString()}};let ee=Et;q(ee,"factory",({config:p})=>{var N;const x=k((N=p.getOptionalConfigArray("integrations.bitbucket"))!=null?N:[]);return m(x.map(G=>new Et(G)),G=>G.config.host)});var Se=e(96279),Ke=e(48834).Buffer;async function We(V,p){const{name:x,owner:N,resource:G}=parseGitUrl(V),Pe=G==="bitbucket.org";let Ee=Pe?`${p.apiBaseUrl}/repositories/${N}/${x}`:`${p.apiBaseUrl}/projects/${N}/repos/${x}/default-branch`,$e=await fetch(Ee,Le(p));if($e.status===404&&!Pe&&(Ee=`${p.apiBaseUrl}/projects/${N}/repos/${x}/branches/default`,$e=await fetch(Ee,Le(p))),!$e.ok){const Rt=`Failed to retrieve default branch from ${Ee}, ${$e.status} ${$e.statusText}`;throw new Error(Rt)}let Xe;if(Pe)Xe=(await $e.json()).mainbranch.name;else{const{displayId:Rt}=await $e.json();Xe=Rt}if(!Xe)throw new Error(`Failed to read default branch from ${Ee}. Response ${$e.status} ${$e.json()}`);return Xe}async function fe(V,p){const{name:x,owner:N,ref:G,protocol:Pe,resource:Ee,filepath:$e}=parseGitUrl(V),Xe=Ee==="bitbucket.org";let Rt=G;Rt||(Rt=await We(V,p));const _t=$e?`&path=${encodeURIComponent($e)}`:"";return Xe?`${Pe}://${Ee}/${N}/${x}/get/${Rt}.tar.gz`:`${p.apiBaseUrl}/projects/${N}/repos/${x}/archive?format=tgz&at=${Rt}&prefix=${N}-${x}${_t}`}function ye(V,p){try{const{owner:x,name:N,ref:G,filepathtype:Pe,filepath:Ee}=parseGitUrl(V);if(!x||!N||Pe!=="browse"&&Pe!=="raw"&&Pe!=="src")throw new Error("Invalid Bitbucket URL or file path");const $e=Ee.replace(/^\//,"");if(p.host==="bitbucket.org"){if(!G)throw new Error("Invalid Bitbucket URL or file path");return`${p.apiBaseUrl}/repositories/${x}/${N}/src/${G}/${$e}`}return`${p.apiBaseUrl}/projects/${x}/repos/${N}/raw/${$e}?at=${G}`}catch(x){throw new Error(`Incorrect URL: ${V}, ${x}`)}}function Le(V){const p={};if(V.token)p.Authorization=`Bearer ${V.token}`;else if(V.username&&V.appPassword){const x=Ke.from(`${V.username}:${V.appPassword}`,"utf8");p.Authorization=`Basic ${x.toString("base64")}`}return{headers:p}}function He(V){const p=V.getString("host");let x=V.getOptionalString("baseUrl"),N=V.getOptionalString("gitilesBaseUrl");const G=V.getOptionalString("username"),Pe=V.getOptionalString("password");if(h(p)){if(x&&!v(x))throw new Error(`Invalid Gerrit integration config, '${x}' is not a valid baseUrl`);if(N&&!v(N))throw new Error(`Invalid Gerrit integration config, '${N}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${p}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):x=`https://${p}`,N?N=(0,l.trimEnd)(N,"/"):N=`https://${p}`,{host:p,baseUrl:x,gitilesBaseUrl:N,username:G,password:Pe}}function ke(V){return V.map(He)}const nt=class{constructor(p){this.integrationConfig=p}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){const{url:x,base:N,lineNumber:G}=p;let Pe;return x?Pe=new URL(x,N):Pe=new URL(N),G&&(Pe.hash=G.toString()),Pe.toString()}resolveEditUrl(p){return p}};let et=nt;q(et,"factory",({config:p})=>{var N;const x=ke((N=p.getOptionalConfigArray("integrations.gerrit"))!=null?N:[]);return m(x.map(G=>new nt(G)),G=>G.config.host)});var tt=e(48834).Buffer;const Te=")]}'";function Ue(V,p){const N=p.replace(V.gitilesBaseUrl,"").split("/").filter(Rt=>!!Rt),G=N.indexOf("+");if(G<=0)throw new Error(`Unable to parse project from url: ${p}`);const Pe=trimStart(N.slice(0,G).join("/"),"/"),Ee=N.indexOf("heads");if(Ee<=0)throw new Error(`Unable to parse branch from url: ${p}`);const $e=N[Ee+1],Xe=N.slice(Ee+2).join("/");return{branch:$e,filePath:Xe===""?"/":Xe,project:Pe}}function je(V){return V.password?"/a/":"/"}function Je(V,p){const{branch:x,filePath:N,project:G}=Ue(V,p);return`${V.baseUrl}${je(V)}projects/${encodeURIComponent(G)}/branches/${x}/files/${encodeURIComponent(N)}/content`}function vt(V){const p={};if(!V.password)return p;const x=tt.from(`${V.username}:${V.password}`,"utf8");return p.Authorization=`Basic ${x.toString("base64")}`,{headers:p}}async function Dt(V){const p=await V.text();if(p.startsWith(Te))try{return JSON.parse(p.slice(Te.length))}catch(x){throw new Error(`Invalid response from Gerrit: ${p.slice(0,10)} - ${x}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${p.slice(0,10)}`)}const ct="github.com",Pt="https://api.github.com",Ft="https://raw.githubusercontent.com";function It(V){var Ee,$e;const p=(Ee=V.getOptionalString("host"))!=null?Ee:ct;let x=V.getOptionalString("apiBaseUrl"),N=V.getOptionalString("rawBaseUrl");const G=V.getOptionalString("token"),Pe=($e=V.getOptionalConfigArray("apps"))==null?void 0:$e.map(Xe=>({appId:Xe.getNumber("appId"),clientId:Xe.getString("clientId"),clientSecret:Xe.getString("clientSecret"),webhookSecret:Xe.getString("webhookSecret"),privateKey:Xe.getString("privateKey"),allowedInstallationOwners:Xe.getOptionalStringArray("allowedInstallationOwners")}));if(!h(p))throw new Error(`Invalid GitHub integration config, '${p}' is not a valid host`);return x?x=(0,l.trimEnd)(x,"/"):p===ct&&(x=Pt),N?N=(0,l.trimEnd)(N,"/"):p===ct&&(N=Ft),{host:p,apiBaseUrl:x,rawBaseUrl:N,token:G,apps:Pe}}function Nt(V){const p=V.map(It);return p.some(x=>x.host===ct)||p.push({host:ct,apiBaseUrl:Pt,rawBaseUrl:Ft}),p}function wt(V,p,x){try{const{owner:N,name:G,ref:Pe,filepathtype:Ee,filepath:$e}=parseGitUrl(V);if(!N||!G||!Pe||Ee!=="blob"&&Ee!=="raw"&&Ee!=="tree")throw new Error("Invalid GitHub URL or file path");const Xe=$e.replace(/^\//,"");return tn(p,x)==="api"?`${p.apiBaseUrl}/repos/${N}/${G}/contents/${Xe}?ref=${Pe}`:`${p.rawBaseUrl}/${N}/${G}/${Pe}/${Xe}`}catch(N){throw new Error(`Incorrect URL: ${V}, ${N}`)}}function Wt(V,p){const x={};return tn(V,p)==="api"&&(x.Accept="application/vnd.github.v3.raw"),p.token&&(x.Authorization=`token ${p.token}`),{headers:x}}function tn(V,p){return V.apiBaseUrl&&(p.token||!V.rawBaseUrl)?"api":"raw"}class $t{constructor(){q(this,"tokenCache",new Map);q(this,"isNotExpired",p=>p.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(p,x){const N=this.tokenCache.get(p);if(N&&this.isNotExpired(N.expiresAt))return{accessToken:N.token};const G=await x();return this.tokenCache.set(p,G),{accessToken:G.token}}}const mt={Accept:"application/vnd.github.machine-man-preview+json"};class nn{constructor(p,x){q(this,"appClient");q(this,"baseUrl");q(this,"baseAuthConfig");q(this,"cache",new $t);q(this,"allowedInstallationOwners");this.allowedInstallationOwners=p.allowedInstallationOwners,this.baseUrl=x,this.baseAuthConfig={appId:p.appId,privateKey:p.privateKey.replace(/\\n/gm,`
31
- `)},this.appClient=new Octokit({baseUrl:x,headers:mt,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(p,x){var Ee;const{installationId:N,suspended:G}=await this.getInstallationData(p);if(this.allowedInstallationOwners&&!((Ee=this.allowedInstallationOwners)!=null&&Ee.includes(p)))return{accessToken:void 0};if(G)throw new Error(`The GitHub application for ${p} is suspended`);const Pe=x?`${p}/${x}`:p;return this.cache.getOrCreateToken(Pe,async()=>{const $e=await this.appClient.apps.createInstallationAccessToken({installation_id:N,headers:mt});if(x&&$e.data.repository_selection==="selected"){const Xe=new Octokit({baseUrl:this.baseUrl,auth:$e.data.token});if(!(await Xe.paginate(Xe.apps.listReposAccessibleToInstallation)).some(sn=>sn.name===x))throw new Error(`The Backstage GitHub application used in the ${p} organization does not have access to a repository with the name ${x}`)}return{token:$e.data.token,expiresAt:DateTime.fromISO($e.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(p){const N=(await this.getInstallations()).find(Pe=>{var Ee,$e;return(($e=(Ee=Pe.account)==null?void 0:Ee.login)==null?void 0:$e.toLocaleLowerCase("en-US"))===p.toLocaleLowerCase("en-US")});if(N)return{installationId:N.id,suspended:Boolean(N.suspended_by)};const G=new Error(`No app installation found for ${p} in ${this.baseAuthConfig.appId}`);throw G.name="NotFoundError",G}}class ae{constructor(p){q(this,"apps");var x,N;this.apps=(N=(x=p.apps)==null?void 0:x.map(G=>new nn(G,p.apiBaseUrl)))!=null?N:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(x=>x.getInstallations()))).flat():[]}async getAppToken(p,x){if(this.apps.length===0)return;const N=await Promise.all(this.apps.map($e=>$e.getInstallationCredentials(p,x).then(Xe=>({credentials:Xe,error:void 0}),Xe=>({credentials:void 0,error:Xe})))),G=N.find($e=>$e.credentials);if(G)return G.credentials.accessToken;const Ee=N.map($e=>$e.error).find($e=>$e.name!=="NotFoundError");if(Ee)throw Ee}}class j{constructor(p,x){this.githubAppCredentialsMux=p,this.token=x}async getCredentials(p){const x=parseGitUrl(p.url),N=x.owner||x.name,G=x.owner?x.name:void 0;let Pe="app",Ee=await this.githubAppCredentialsMux.getAppToken(N,G);return Ee||(Pe="token",Ee=this.token),{headers:Ee?{Authorization:`Bearer ${Ee}`}:void 0,token:Ee,type:Pe}}}q(j,"create",null);class ie{static fromIntegrations(p){const x=new Map;return p.github.list().forEach(N=>{const G=SingleInstanceGithubCredentialsProvider.create(N.config);x.set(N.config.host,G)}),new ie(x)}constructor(p){this.providers=p}async getCredentials(p){const x=new URL(p.url),N=this.providers.get(x.host);if(!N)throw new Error(`There is no GitHub integration that matches ${p.url}. Please add a configuration for an integration.`);return N.getCredentials(p)}}const it=class{constructor(p){this.integrationConfig=p}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){return pe(a(p),"tree")}resolveEditUrl(p){return pe(p,"edit")}};let ce=it;q(ce,"factory",({config:p})=>{var N;const x=Nt((N=p.getOptionalConfigArray("integrations.github"))!=null?N:[]);return m(x.map(G=>new it(G)),G=>G.config.host)});function pe(V,p){return V.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(x,N,G,Pe)=>`//${N}/${G}/${Pe}/${p}/`)}const Oe="gitlab.com",Ze="https://gitlab.com/api/v4";function Ae(V){const p=V.getString("host");let x=V.getOptionalString("apiBaseUrl");const N=V.getOptionalString("token");let G=V.getOptionalString("baseUrl");if(x?x=(0,l.trimEnd)(x,"/"):p===Oe&&(x=Ze),G?G=(0,l.trimEnd)(G,"/"):G=`https://${p}`,h(p)){if(!x||!v(x))throw new Error(`Invalid GitLab integration config, '${x}' is not a valid apiBaseUrl`);if(!v(G))throw new Error(`Invalid GitLab integration config, '${G}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${p}' is not a valid host`);return{host:p,token:N,apiBaseUrl:x,baseUrl:G}}function Ve(V){const p=V.map(Ae);return p.some(x=>x.host===Oe)||p.push({host:Oe,apiBaseUrl:Ze,baseUrl:`https://${Oe}`}),p}async function dt(V,p){if(V.includes("/-/blob/")){const x=await xt(V,p);return rt(V,x).toString()}return gt(V).toString()}function At(V){const{token:p=""}=V;return{headers:{"PRIVATE-TOKEN":p}}}function gt(V){try{const p=new URL(V),[x,N,G,Pe,...Ee]=p.pathname.split("/");if(x!==""||N===""||G===""||Pe!=="blob"||!Ee.join("/").match(/\.(yaml|yml)$/))throw new Error("Wrong GitLab URL");return p.pathname=[x,N,G,"raw",...Ee].join("/"),p}catch(p){throw new Error(`Incorrect url: ${V}, ${p}`)}}function rt(V,p){try{const x=new URL(V),N=x.pathname.split("/-/blob/")[1],[G,...Pe]=N.split("/");return x.pathname=["/api/v4/projects",p,"repository/files",encodeURIComponent(decodeURIComponent(Pe.join("/"))),"raw"].join("/"),x.search=`?ref=${G}`,x}catch(x){throw new Error(`Incorrect url: ${V}, ${x}`)}}async function xt(V,p){const x=new URL(V);if(!x.pathname.includes("/-/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{const N=x.pathname.split("/-/blob/")[0],G=new URL(`${x.origin}/api/v4/projects/${encodeURIComponent(N.replace(/^\//,""))}`),Pe=await fetch(G.toString(),At(p)),Ee=await Pe.json();if(!Pe.ok)throw new Error(`GitLab Error '${Ee.error}', ${Ee.error_description}`);return Number(Ee.id)}catch(N){throw new Error(`Could not get GitLab project ID for: ${V}, ${N}`)}}const Ct=class{constructor(p){this.integrationConfig=p}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(p){return a(p)}resolveEditUrl(p){return ge(p,"edit")}};let lt=Ct;q(lt,"factory",({config:p})=>{var N;const x=Ve((N=p.getOptionalConfigArray("integrations.gitlab"))!=null?N:[]);return m(x.map(G=>new Ct(G)),G=>G.config.host)});function ge(V,p){return V.replace(/\/\-\/(blob|tree|edit)\//,`/-/${p}/`)}const S="amazonaws.com";function H(V){var Rt;const p=V.getOptionalString("endpoint"),x=(Rt=V.getOptionalBoolean("s3ForcePathStyle"))!=null?Rt:!1;let N,G;if(p){try{const _t=new URL(p);N=_t.host,G=_t.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${p}' is not a valid URL`)}if(G!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${p}'`)}else N=S;const Pe=V.getOptionalString("accessKeyId"),Ee=V.getOptionalString("secretAccessKey"),$e=V.getOptionalString("roleArn"),Xe=V.getOptionalString("externalId");return{host:N,endpoint:p,s3ForcePathStyle:x,accessKeyId:Pe,secretAccessKey:Ee,roleArn:$e,externalId:Xe}}function F(V){const p=V.map(H);return p.some(x=>x.host===S)||p.push({host:S}),p}const Ye=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(p){this.integrationConfig=p}resolveUrl(p){return a(p)}resolveEditUrl(p){return p}};let se=Ye;q(se,"factory",({config:p})=>{var N;const x=F((N=p.getOptionalConfigArray("integrations.awsS3"))!=null?N:[]);return m(x.map(G=>new Ye(G)),G=>G.config.host)});class de{constructor(p){q(this,"byType");this.byType=p}static fromConfig(p){return new de({awsS3:se.factory({config:p}),azure:T.factory({config:p}),bitbucket:ee.factory({config:p}),gerrit:et.factory({config:p}),github:ce.factory({config:p}),gitlab:lt.factory({config:p})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}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(p=>p.list())}byUrl(p){return Object.values(this.byType).map(x=>x.byUrl(p)).find(Boolean)}byHost(p){return Object.values(this.byType).map(x=>x.byHost(p)).find(Boolean)}resolveUrl(p){const x=this.byUrl(p.base);return x?x.resolveUrl(p):a(p)}resolveEditUrl(p){const x=this.byUrl(p);return x?x.resolveEditUrl(p):p}}},30294:function(_,i,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return v.plugin}});var t=e(2784),l=e(47093),h=e(10289),v=e(82250),m=e(47955),a=e(49208),s=e(36964),d=e(68099);const y=[(0,s.createApiFactory)({api:s.discoveryApiRef,deps:{configApi:s.configApiRef},factory:({configApi:z})=>a.UrlPatternDiscovery.compile(`${z.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,s.createApiFactory)({api:s.alertApiRef,deps:{},factory:()=>new a.AlertApiForwarder}),(0,s.createApiFactory)({api:s.analyticsApiRef,deps:{},factory:()=>new a.NoOpAnalyticsApi}),(0,s.createApiFactory)({api:s.errorApiRef,deps:{alertApi:s.alertApiRef},factory:({alertApi:z})=>{const re=new a.ErrorAlerter(z,new a.ErrorApiForwarder);return a.UnhandledErrorForwarder.forward(re,{hidden:!1}),re}}),(0,s.createApiFactory)({api:s.storageApiRef,deps:{errorApi:s.errorApiRef},factory:({errorApi:z})=>a.WebStorage.create({errorApi:z})}),(0,s.createApiFactory)({api:s.fetchApiRef,deps:{configApi:s.configApiRef,identityApi:s.identityApiRef,discoveryApi:s.discoveryApiRef},factory:({configApi:z,identityApi:re,discoveryApi:me})=>(0,a.createFetchApi)({middleware:[a.FetchMiddlewares.resolvePluginProtocol({discoveryApi:me}),a.FetchMiddlewares.injectIdentityAuth({identityApi:re,config:z})]})}),(0,s.createApiFactory)({api:s.oauthRequestApiRef,deps:{},factory:()=>new a.OAuthRequestManager}),(0,s.createApiFactory)({api:s.googleAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.GoogleAuth.create({discoveryApi:z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.microsoftAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.MicrosoftAuth.create({discoveryApi:z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.githubAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.GithubAuth.create({discoveryApi:z,oauthRequestApi:re,defaultScopes:["read:user"],environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oktaAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.OktaAuth.create({discoveryApi:z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.gitlabAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.GitlabAuth.create({discoveryApi:z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.oneloginAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.OneLoginAuth.create({discoveryApi:z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.bitbucketAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.BitbucketAuth.create({discoveryApi:z,oauthRequestApi:re,defaultScopes:["team"],environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:s.atlassianAuthApiRef,deps:{discoveryApi:s.discoveryApiRef,oauthRequestApi:s.oauthRequestApiRef,configApi:s.configApiRef},factory:({discoveryApi:z,oauthRequestApi:re,configApi:me})=>a.AtlassianAuth.create({discoveryApi:z,oauthRequestApi:re,environment:me.getOptionalString("auth.environment")})}),(0,s.createApiFactory)({api:d.RV,deps:{discovery:s.discoveryApiRef,identity:s.identityApiRef,config:s.configApiRef},factory:({config:z,discovery:re,identity:me})=>d.iM.create({config:z,discovery:re,identity:me})})];var u=e(77277),A=e(9118),T=e(62833);function R({children:z}){return(0,h.GV)()?t.createElement(t.Fragment,null,z):t.createElement(h.VA,null,z)}const D=()=>t.createElement(A.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),ne=({step:z,error:re})=>{let me="";return z==="load-config"?me=`The configuration failed to load, someone should have a look at this error: ${re.message}`:z==="load-chunk"&&(me=`Lazy loaded chunk failed to load, try to reload the page: ${re.message}`),t.createElement(R,null,t.createElement(A.ErrorPage,{status:"501",statusMessage:me}))},w=({error:z,resetError:re,plugin:me})=>t.createElement(A.ErrorPanel,{title:`Error in ${me==null?void 0:me.getId()}`,defaultExpanded:!0,error:z},t.createElement(u.Z,{variant:"outlined",onClick:re},"Retry")),I={Progress:A.Progress,Router:T.VK,NotFoundErrorPage:D,BootErrorPage:ne,ErrorBoundaryFallback:w};var B=e(43642),O=e(80079),M=e(90941),k=e(32915),ee=e(40562),Se=e(21853),Ke=e(60744),We=e(66569),fe=e(30254),ye=e(13384),Le=e(15933),He=e(58838),ke=e(86737),et=e(4989),tt=e(44407),Te=e(18628),Ue=e(84219),je=e(98685),Je=e(39781);const vt={brokenImage:O.Z,catalog:Te.Z,scaffolder:k.Z,techdocs:ee.Z,search:Se.Z,chat:Ke.Z,dashboard:We.Z,docs:fe.Z,email:ye.Z,github:He.Z,group:Ue.Z,help:ke.Z,"kind:api":Le.Z,"kind:component":tt.Z,"kind:domain":B.Z,"kind:group":Ue.Z,"kind:location":et.Z,"kind:system":M.Z,"kind:user":je.Z,user:je.Z,warning:Je.Z};var Dt=e(28981),ct=e(98192),Pt=e(15222),Ft=e(41547),It=e(87561);const Nt=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(Pt.Z,null),Provider:({children:z})=>t.createElement(Ft.Z,{theme:Dt.lightTheme},t.createElement(It.ZP,null,z))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(ct.Z,null),Provider:({children:z})=>t.createElement(Ft.Z,{theme:Dt.darkTheme},t.createElement(It.ZP,null,z))}];function wt(z){var re,me,Be;return(0,a.createSpecializedApp)({...z,apis:(re=z==null?void 0:z.apis)!=null?re:[],bindRoutes:z==null?void 0:z.bindRoutes,components:{...I,...z==null?void 0:z.components},configLoader:z==null?void 0:z.configLoader,defaultApis:y,icons:{...vt,...z==null?void 0:z.icons},plugins:(me=z==null?void 0:z.plugins)!=null?me:[],themes:(Be=z==null?void 0:z.themes)!=null?Be:Nt})}var Wt=e(82394),tn=e.n(Wt),$t=e(48023),mt=e(76635);async function nn({storageApi:z}){var pt;const re=z.forBucket("settings"),me=z.forBucket("starredEntities"),Be=re.snapshot("starredEntities").value;if(!(0,mt.isArray)(Be))return;const qe=new Set((pt=me.snapshot("entityRefs").value)!=null?pt:[]);Be.filter(mt.isString).map(ht=>ht.split(":")).filter(ht=>ht.length===4&&ht[0]==="entity").map(([ht,st,ft,Lt])=>(0,$t.eE)({kind:st,namespace:ft,name:Lt})).forEach(ht=>qe.add(ht)),await me.set("entityRefs",Array.from(qe)),await re.remove("starredEntities")}class ae{constructor(re){q(this,"settingsStore");q(this,"starredEntities");q(this,"subscribers",new Set);q(this,"observable",new(tn())(re=>(re.next(new Set(this.starredEntities)),this.subscribers.add(re),()=>{this.subscribers.delete(re)})));var me;nn(re).then(),this.settingsStore=re.storageApi.forBucket("starredEntities"),this.starredEntities=new Set((me=this.settingsStore.snapshot("entityRefs").value)!=null?me:[]),this.settingsStore.observe$("entityRefs").subscribe({next:Be=>{var qe;this.starredEntities=new Set((qe=Be.value)!=null?qe:[]),this.notifyChanges()}})}async toggleStarred(re){this.starredEntities.has(re)?this.starredEntities.delete(re):this.starredEntities.add(re),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const re of this.subscribers)re.next(new Set(this.starredEntities))}}var j=e(39398),ie=e(49782),ce=e(79692);const pe=(0,ce.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function Oe(z){const re=z.result,me=pe();return React.createElement(Link,{to:re.location},React.createElement(ListItem,{alignItems:"flex-start",className:me.flexContainer},React.createElement(ListItemText,{className:me.itemText,primaryTypographyProps:{variant:"h6"},primary:re.title,secondary:re.text}),React.createElement(Box,null,re.kind&&React.createElement(Chip,{label:`Kind: ${re.kind}`,size:"small"}),re.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${re.lifecycle}`,size:"small"}))),React.createElement(Divider,{component:"li"}))}var Ze=e(30097),Ae=e(53479),Ve=e(95544),dt=e(99688),At=e(12231),gt=e(86136),rt=e(49378),xt=e(85256),lt=e(61837),ge=e(79784),S=e(50758),H=e(49166),F=e(31654),se=e(43054),de=e(40749);const U="catalog-entity",P=(0,de.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:U}),Q=(0,de.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),le=(0,de.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:U}),ue=(0,de.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:U}),Ce=(0,de.J$)({name:"catalog.location.read",attributes:{action:"read"}}),xe=(0,de.J$)({name:"catalog.location.create",attributes:{action:"create"}}),we=(0,de.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),ut=(0,ce.Z)({button:{color:"white"}});function Et(z){var qn;const{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:Be,onInspectEntity:qe}=z,[pt,ht]=(0,t.useState)(),st=ut(),ft=(0,Ae.useEntityPermission)(le),Lt=vn=>{ht(vn.currentTarget)},Mt=()=>{ht(void 0)},rn=re&&[...re.map(vn=>t.createElement(At.Z,{key:vn.title,onClick:()=>{Mt(),vn.onClick()}},t.createElement(gt.Z,null,t.createElement(vn.Icon,{fontSize:"small"})),t.createElement(rt.Z,{primary:vn.title}))),t.createElement(xt.Z,{key:"the divider is here!"})],en=(qn=!ft.allowed||(me==null?void 0:me.disableUnregister))!=null?qn:!1;return t.createElement(t.Fragment,null,t.createElement(lt.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:Lt,"data-testid":"menu-button",className:st.button},t.createElement(se.Z,null)),t.createElement(ge.ZP,{open:Boolean(pt),onClose:Mt,anchorEl:pt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},t.createElement(S.Z,null,rn,t.createElement(At.Z,{onClick:()=>{Mt(),Be()},disabled:en},t.createElement(gt.Z,null,t.createElement(H.Z,{fontSize:"small"})),t.createElement(rt.Z,{primary:"Unregister entity"})),t.createElement(At.Z,{onClick:()=>{Mt(),qe()}},t.createElement(gt.Z,null,t.createElement(F.Z,{fontSize:"small"})),t.createElement(rt.Z,{primary:"Inspect entity"})))))}const nt="plugin.catalog.entityLayoutRoute",it=()=>null;(0,s.attachComponentData)(it,nt,!0),(0,s.attachComponentData)(it,"core.gatherMountPoints",!0);function Ct(z){const{entity:re,title:me}=z;return t.createElement(Ve.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Ve.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},me),re&&t.createElement(Ae.FavoriteEntity,{entity:re}))}function Ye(z,re,me,Be){var st,ft,Lt,Mt,rn;const qe=(st=z!=null?z:Be==null?void 0:Be.kind)!=null?st:"",pt=(ft=re!=null?re:Be==null?void 0:Be.metadata.namespace)!=null?ft:"";return{headerTitle:`${(rn=(Mt=(Lt=Be==null?void 0:Be.metadata.title)!=null?Lt:me)!=null?Mt:Be==null?void 0:Be.metadata.name)!=null?rn:""}${pt&&pt!==$t.zG?` in ${pt}`:""}`,headerType:(()=>{let en=qe.toLocaleLowerCase("en-US");return Be&&Be.spec&&"type"in Be.spec&&(en+=" \u2014 ",en+=Be.spec.type.toLocaleLowerCase("en-US")),en})()}}function V(z){var Be;const{entity:re}=z,me=(0,Ae.getEntityRelations)(re,$t.S4);return t.createElement(t.Fragment,null,me.length>0&&t.createElement(A.HeaderLabel,{label:"Owner",value:t.createElement(Ae.EntityRefLinks,{entityRefs:me,defaultKind:"Group",color:"inherit"})}),((Be=re.spec)==null?void 0:Be.lifecycle)&&t.createElement(A.HeaderLabel,{label:"Lifecycle",value:re.spec.lifecycle}))}const p=z=>{var b,Z,K;const{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:me,children:Be}=z,{kind:qe,namespace:pt,name:ht}=(0,s.useRouteRefParams)(Ae.entityRouteRef),{entity:st,loading:ft,error:Lt}=(0,Ae.useAsyncEntity)(),Mt=(0,h.TH)(),rn=(0,s.useElementFilter)(Be,X=>X.selectByComponentData({key:nt,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:J})=>{if(st){if(J.if&&!J.if(st))return[]}else return[];return[{path:J.path,title:J.title,children:J.children,tabProps:J.tabProps}]}),[st]),{headerTitle:en,headerType:qn}=Ye(qe,pt,ht,st),[vn,_n]=(0,t.useState)(!1),[Hr,Zn]=(0,t.useState)(!1),jr=(0,h.s0)(),C=async()=>{_n(!1),Zn(!1),jr("/")};return(0,t.useEffect)(()=>{_n(!1),Zn(!1)},[Mt.pathname]),t.createElement(A.Page,{themeId:(K=(Z=(b=st==null?void 0:st.spec)==null?void 0:b.type)==null?void 0:Z.toString())!=null?K:"home"},t.createElement(A.Header,{title:t.createElement(Ct,{title:en,entity:st}),pageTitleOverride:en,type:qn},st&&t.createElement(t.Fragment,null,t.createElement(V,{entity:st}),t.createElement(Et,{UNSTABLE_extraContextMenuItems:re,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:()=>_n(!0),onInspectEntity:()=>Zn(!0)}))),ft&&t.createElement(A.Progress,null),st&&t.createElement(A.RoutedTabs,{routes:rn}),Lt&&t.createElement(A.Content,null,t.createElement(dt.Z,{severity:"error"},Lt.toString())),!ft&&!Lt&&!st&&t.createElement(A.Content,null,t.createElement(A.WarningPanel,{title:"Entity not found"},"There is no ",qe," with the requested"," ",t.createElement(A.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Ae.UnregisterEntityDialog,{open:vn,entity:st,onConfirm:C,onClose:()=>_n(!1)}),t.createElement(Ae.InspectEntityDialog,{open:Hr,entity:st,onClose:()=>Zn(!1)}))};p.Route=it;var x=e(10179);function N(z){const{open:re,onClose:me,onConfirm:Be,entity:qe}=z,[pt,ht]=useState(!1),st=useApi(catalogApiRef),ft=useApi(alertApiRef),Lt=async()=>{ht(!0);try{const Mt=qe.metadata.uid;await st.removeEntityByUid(Mt),Be()}catch(Mt){assertError(Mt),ft.post({message:Mt.message})}finally{ht(!1)}};return React.createElement(Dialog,{open:re,onClose:me},React.createElement(DialogTitle,{id:"responsive-dialog-title"},"Are you sure you want to delete this entity?"),React.createElement(DialogActions,null,React.createElement(Button,{variant:"contained",color:"secondary",disabled:pt,onClick:Lt},"Delete"),React.createElement(Button,{onClick:me,color:"primary"},"Cancel")))}var G=e(47851);function Pe(z){var re,me;return((me=(re=z==null?void 0:z.metadata)==null?void 0:re.annotations)==null?void 0:me["backstage.io/orphan"])==="true"}function Ee(){const z=useNavigate(),re=useRouteRef(rootRouteRef),[me,Be]=useState(!1),{entity:qe}=useEntity(),pt=async()=>{Be(!1),z(re())};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:me,entity:qe,onConfirm:pt,onClose:()=>Be(!1)}))}var $e=e(30001);const Xe=z=>z.error&&z.level==="error"&&z.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function Rt(z,re){return{items:(await re.getEntityAncestors({entityRef:z})).items.map(qe=>{var st,ft;return{errors:((ft=(st=qe.entity.status)==null?void 0:st.items)!=null?ft:[]).filter(Xe).map(Lt=>Lt.error).filter(Lt=>Boolean(Lt)),entity:qe.entity}}).filter(qe=>qe.errors.length>0)}}async function _t(z,re){const me=re.apis.get(catalogApiRef);if(!me)throw new Error(`No implementation available for ${catalogApiRef}`);return(await Rt(stringifyEntityRef(z),me)).items.length>0}function sn(){const{entity:z}=useEntity(),re=stringifyEntityRef(z),me=useApi(catalogApiRef),{loading:Be,error:qe,value:pt}=useAsync(async()=>Rt(re,me),[re,me]);return qe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:qe})):Be||!pt?null:React.createElement(React.Fragment,null,pt.items.map((ht,st)=>React.createElement(Box,{key:st,mb:1},stringifyEntityRef(z)!==stringifyEntityRef(ht.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:ht.entity})),ht.errors.map((ft,Lt)=>React.createElement(ResponseErrorPanel,{key:Lt,error:ft})))))}var Wn=e(64279);const bn="core.backstage.entitySwitch",cn=z=>null;(0,s.attachComponentData)(cn,bn,!0);const Hn=z=>{var ht,st;const{entity:re,loading:me}=(0,Ae.useAsyncEntity)(),Be=(0,s.useApiHolder)(),qe=(0,s.useElementFilter)(z.children,ft=>ft.selectByComponentData({key:bn,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(Lt=>{var en;if(me)return[];const{if:Mt,children:rn}=Lt.props;return re?[{if:(en=Mt==null?void 0:Mt(re,{apis:Be}))!=null?en:!0,children:rn}]:[{if:Mt===void 0,children:rn}]}),[Be,re,me]);return qe.some(ft=>typeof ft.if=="object"&&"then"in ft.if)?t.createElement(hr,{results:qe}):(st=(ht=qe.find(ft=>ft.if))==null?void 0:ht.children)!=null?st:null};function hr({results:z}){const{loading:re,value:me}=(0,Wn.default)(async()=>{var qe;const Be=z.map(async({if:pt,children:ht})=>{try{if(await pt)return ht}catch{}return null});return(qe=(await Promise.all(Be)).find(Boolean))!=null?qe:null},[z]);return re||!me?null:me}Hn.Case=cn;const $r=null,Nr=Ae.CatalogFilterLayout.Filters,Zr=Ae.CatalogFilterLayout.Content,Jt=(0,s.createPlugin)({id:"catalog",apis:[(0,s.createApiFactory)({api:Ae.catalogApiRef,deps:{discoveryApi:s.discoveryApiRef,fetchApi:s.fetchApiRef},factory:({discoveryApi:z,fetchApi:re})=>new $e.MS({discoveryApi:z,fetchApi:re})}),(0,s.createApiFactory)({api:Ae.starredEntitiesApiRef,deps:{storageApi:s.storageApiRef},factory:({storageApi:z})=>new ae({storageApi:z})})],routes:{catalogIndex:G._Z,catalogEntity:Ae.entityRouteRef},externalRoutes:{createComponent:G.yw,viewTechDoc:G.jU}}),eo=Jt.provide((0,s.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(7758).then(e.bind(e,7758)).then(z=>z.CatalogPage),mountPoint:G._Z})),gr=Jt.provide((0,s.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(z=>z.CatalogEntityPage),mountPoint:Ae.entityRouteRef})),jn=Jt.provide((0,s.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(z=>z.AboutCard)}})),pr=Jt.provide((0,s.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(1959).then(e.bind(e,81959)).then(z=>z.EntityLinksCard)}})),Ur=Jt.provide((0,s.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(z=>z.HasSystemsCard)}})),Vn=Jt.provide((0,s.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(z=>z.HasComponentsCard)}})),yr=Jt.provide((0,s.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(z=>z.HasSubcomponentsCard)}})),Zt=Jt.provide((0,s.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(z=>z.HasResourcesCard)}})),zr=Jt.provide((0,s.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(z=>z.DependsOnComponentsCard)}})),rr=Jt.provide((0,s.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(z=>z.DependencyOfComponentsCard)}})),Wr=Jt.provide((0,s.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(z=>z.DependsOnResourcesCard)}})),Er=Jt.provide((0,s.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(z=>z.RelatedEntitiesCard)}}));var or=e(36356);class ar{constructor({configApi:re,discoveryApi:me,identityApi:Be}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=re,this.discoveryApi=me,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(re,me){const qe=`${await this.getApiOrigin()}/${me}`,pt=await fetch(`${qe.endsWith("/")?qe:`${qe}/`}index.html`);if(pt.status===404)throw new Error("Page not found");return pt.text()}async syncEntityDocs(re){return"cached"}async getBaseUrl(re,me,Be){const qe=await this.getApiOrigin();return new URL(re,`${qe}/${Be}`).toString()}}class Gn{constructor({configApi:re,discoveryApi:me,identityApi:Be}){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");this.configApi=re,this.discoveryApi=me,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(re){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(re){return{site_name:"Live preview environment",site_description:""}}}const Kn=[(0,s.createApiFactory)({api:v.techdocsStorageApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:z,discoveryApi:re,identityApi:me})=>new ar({configApi:z,discoveryApi:re,identityApi:me})}),(0,s.createApiFactory)({api:v.techdocsApiRef,deps:{configApi:s.configApiRef,discoveryApi:s.discoveryApiRef,identityApi:s.identityApiRef},factory:({configApi:z,discoveryApi:re,identityApi:me})=>new Gn({configApi:z,discoveryApi:re,identityApi:me})}),(0,s.createApiFactory)({api:or.q3,deps:{configApi:s.configApiRef},factory:({configApi:z})=>or.ae.fromConfig(z)})],vr={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},Ar={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function Rr(){const z=await fetch("/.detect");return z.ok?(await z.text()).trim()==="techdocs-cli-server":!1}async function On(){const z=await(0,a.defaultConfigLoader)(),re=await Rr();return[...z,{context:"detected",data:re?vr:Ar}]}var ln=e(86689),wn=e(58845);const $n=(0,ce.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var Cr=()=>{const z=$n();return t.createElement("svg",{className:z.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:z.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Yn=(0,ce.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Tr=()=>{const z=Yn();return t.createElement("svg",{className:z.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:z.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const Jn=(0,ce.Z)({root:{width:A.sidebarConfig.drawerWidthClosed,height:3*A.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:A.sidebarConfig.drawerWidthClosed,marginLeft:24}}),pn=()=>{const z=Jn(),{isOpen:re}=(0,t.useContext)(A.SidebarContext);return t.createElement("div",{className:z.root},t.createElement(ln.Z,{component:T.OL,to:"/docs/default/component/local/",underline:"none",className:z.link},re?t.createElement(Cr,null):t.createElement(Tr,null)))},kn=({children:z})=>t.createElement(A.SidebarPage,null,t.createElement(A.Sidebar,null,t.createElement(pn,null),t.createElement(A.SidebarDivider,null),t.createElement(A.SidebarItem,{icon:wn.Z,to:"/docs/default/component/local",text:"Docs Preview"})),z);var Nn=e(80030),ir=e(32388),sr=e(4142);const br=(0,ce.Z)(z=>({headerIcon:{color:z.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:z.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var yn;(function(z){const re="light";z.LIGHT=re;const me="dark";z.DARK=me})(yn||(yn={}));const Qn=()=>{const z=(0,s.useApi)(s.appThemeApiRef),re=br(),[me,Be]=(0,t.useState)(z.getActiveThemeId()||yn.LIGHT),qe={[yn.LIGHT]:{icon:sr.Z,title:"Dark theme"},[yn.DARK]:{icon:ir.Z,title:"Light theme"}},{title:pt,icon:ht}=qe[me],st=()=>{Be(ft=>{const Lt=ft===yn.LIGHT?yn.DARK:yn.LIGHT;return z.setActiveThemeId(Lt),Lt})};return t.createElement(Ve.Z,{display:"flex",alignItems:"center",mr:2},t.createElement(Nn.ZP,{title:pt,arrow:!0},t.createElement(lt.Z,{size:"small",onClick:st},t.createElement(ht,{className:re.headerIcon}))))},Pr=()=>t.createElement(v.TechDocsReaderPage,null,t.createElement(v.TechDocsReaderPageHeader,null),t.createElement(v.TechDocsReaderPageContent,{withSearch:!1})),Ir=t.createElement(Pr,null),Xn=wt({apis:Kn,configLoader:On,plugins:Object.values(r)}),Lr=Xn.getProvider(),cr=Xn.getRouter(),Or=v.techdocsPlugin.provide((0,m.KY)({name:"ThemeToggleAddon",component:Qn,location:m.oZ.Header})),lr=t.createElement(a.FlatRoutes,null,t.createElement(h.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(h.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(gr,null)}),t.createElement(h.AW,{path:"/docs",element:t.createElement(v.TechDocsIndexPage,null)},t.createElement(v.DefaultTechDocsHome,null)),t.createElement(h.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(v.TechDocsReaderPage,null)},Ir,t.createElement(m.DR,null,t.createElement(Or,null))));var En=()=>t.createElement(Lr,null,t.createElement(cr,null,t.createElement(kn,null,lr)));l.render(t.createElement(En,null),document.getElementById("root"))},28981:function(_,i,e){"use strict";e.d(i,{darkTheme:function(){return T},lightTheme:function(){return A}});var r=e(73689),t=e(48032);const l={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},h={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"]};function v(R,D){const w=`linear-gradient(90deg, ${(R.length===1?[R[0],R[0]]:R).join(", ")})`,I=`${D}, ${w}`;return{colors:R,shape:D,backgroundImage:I}}const m={home:v(h.teal,l.wave),documentation:v(h.pinkSea,l.wave2),tool:v(h.purpleSky,l.round),service:v(h.marineBlue,l.wave),website:v(h.veryBlue,l.wave),library:v(h.rubyRed,l.wave),other:v(h.darkGrey,l.wave),app:v(h.toastyOrange,l.wave),apis:v(h.teal,l.wave2)},a='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function s(R){const{palette:D,fontFamily:ne=a,defaultPageTheme:w,pageTheme:I=m}=R;if(!I[w])throw new Error(`${w} is not defined in pageTheme.`);return{palette:D,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{fontFamily:ne,h5:{fontWeight:700},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:I[w],getPageTheme:({themeId:B})=>{var O;return(O=I[B])!=null?O:I[w]}}}function d(R){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:R.typography.fontFamily},body:{height:"100%",fontFamily:R.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:R.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:R.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:R.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:R.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:R.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,t.darken)(R.palette.link,.3),background:(0,t.lighten)(R.palette.link,.95)},[R.breakpoints.up("md")]:{minWidth:120,fontSize:R.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:R.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:R.spacing(1),marginBottom:R.spacing(1),color:R.palette.grey[900]},outlined:{color:R.palette.text.primary},label:{lineHeight:`${R.spacing(2.5)}px`,fontWeight:R.typography.fontWeightMedium,fontSize:`${R.spacing(1.75)}px`},labelSmall:{fontSize:`${R.spacing(1.5)}px`},deleteIcon:{color:R.palette.grey[500],width:`${R.spacing(3)}px`,height:`${R.spacing(3)}px`,margin:`0 ${R.spacing(.75)}px 0 -${R.spacing(.75)}px`},deleteIconSmall:{width:`${R.spacing(2)}px`,height:`${R.spacing(2)}px`,margin:`0 ${R.spacing(.5)}px 0 -${R.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function y(R){const D=s(R),ne=(0,r.Z)(D),w=d(ne);return{...ne,overrides:w}}var u=e(34505);const A=y({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:u.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:m}),T=y({palette:{type:"dark",background:{default:"#333333"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:u.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:m})},76241:function(_,i,e){"use strict";e.d(i,{CT:function(){return m},EI:function(){return d},uW:function(){return h},Vt:function(){return a}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),l=y=>`__@backstage/${y}__`;function h(y,u){const A=l(y);let T=t[A];return T||(T=u(),t[A]=T,T)}var v=e(2784);function m(y){return h(y,()=>(0,v.createContext)(void 0))}function a(y){return(0,v.useContext)(m(y))}function s(y){return{set(u){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(u))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function d(y){return Object.freeze(y),{atVersion(u){return y[u]}}}},53479:function(_,i,e){"use strict";e.d(i,{AsyncEntityProvider:function(){return M},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return I},EntityKindFilter:function(){return ie},EntityLifecyclePicker:function(){return it},EntityListProvider:function(){return Dt},EntityOwnerPicker:function(){return p},EntityRefLink:function(){return ae},EntityRefLinks:function(){return j},EntityTable:function(){return Xe},EntityTagPicker:function(){return Wn},EntityTypePicker:function(){return Hn},FavoriteEntity:function(){return eo},InspectEntityDialog:function(){return pt},UnregisterEntityDialog:function(){return rn},UserListPicker:function(){return Zn},catalogApiRef:function(){return l},entityRouteRef:function(){return Wt},getEntityRelations:function(){return Ue},getEntitySourceLocation:function(){return je},humanizeEntityRef:function(){return $t},starredEntitiesApiRef:function(){return h},useAsyncEntity:function(){return Se},useEntity:function(){return ee},useEntityList:function(){return ct},useEntityOwnership:function(){return H},useEntityPermission:function(){return se},useRelatedEntities:function(){return gt},useStarredEntities:function(){return lt}});var r=e(30001),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.catalog.service"}),h=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var v=e(82394);class m{constructor(){q(this,"starredEntities",new Set);q(this,"subscribers",new Set);q(this,"observable",new ObservableImpl(b=>(b.next(new Set(this.starredEntities)),this.subscribers.add(b),()=>{this.subscribers.delete(b)})))}async toggleStarred(b){this.starredEntities.delete(b)||this.starredEntities.add(b);for(const Z of this.subscribers)Z.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var a=e(2784),s=e(41156),d=e(60364),y=e(77277),u=e(4190),A=e(95544),T=e(90436),R=e(60905),D=e(36444);const ne=C=>{const b=(0,s.Z)(J=>J.breakpoints.down("md")),Z=(0,d.Z)(),[K,X]=(0,a.useState)(!1);return b?a.createElement(a.Fragment,null,a.createElement(y.Z,{style:{marginTop:Z.spacing(1),marginLeft:Z.spacing(1)},onClick:()=>X(!0),startIcon:a.createElement(D.Z,null)},"Filters"),a.createElement(u.ZP,{open:K,onClose:()=>X(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},a.createElement(A.Z,{m:2},a.createElement(T.Z,{variant:"h6",component:"h2",style:{marginBottom:Z.spacing(1)}},"Filters"),C.children))):a.createElement(R.Z,{item:!0,lg:2},C.children)},w=C=>a.createElement(R.Z,{item:!0,xs:12,lg:10},C.children),I=C=>a.createElement(R.Z,{container:!0,style:{position:"relative"}},C.children);I.Filters=ne,I.Content=w;var B=e(76241);const O=(0,B.CT)("entity-context"),M=({children:C,entity:b,loading:Z,error:K,refresh:X})=>{const J={entity:b,loading:Z,error:K,refresh:X};return a.createElement(O.Provider,{value:(0,B.EI)({1:J})},C)},k=C=>React.createElement(M,{entity:C.entity,loading:!Boolean(C.entity),error:void 0,refresh:void 0,children:C.children});function ee(){const C=(0,B.Vt)("entity-context");if(!C)throw new Error("Entity context is not available");const b=C.atVersion(1);if(!b)throw new Error("EntityContext v1 not available");if(!b.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:b.entity}}function Se(){const C=(0,B.Vt)("entity-context");if(!C)throw new Error("Entity context is not available");const b=C.atVersion(1);if(!b)throw new Error("EntityContext v1 not available");const{entity:Z,loading:K,error:X,refresh:J}=b;return{entity:Z,loading:K,error:X,refresh:J}}var Ke=e(76635),We=e(19126),fe=e.n(We),ye=e(10289),Le=e(69294),He=e(48760),ke=e(90736);function et(C){return C.reduce((b,Z)=>({...b,...Z.getCatalogFilters?Z.getCatalogFilters():{}}),{})}function tt(C){return b=>C.every(Z=>!Z.filterEntity||Z.filterEntity(b))}var Te=e(48023);function Ue(C,b,Z){var X;let K=((X=C==null?void 0:C.relations)==null?void 0:X.filter(J=>J.type===b).map(J=>(0,Te.of)(J.targetRef)))||[];return Z!=null&&Z.kind&&(K=K.filter(J=>J.kind.toLocaleLowerCase("en-US")===Z.kind.toLocaleLowerCase("en-US"))),K}function je(C,b){var K;const Z=(K=C.metadata.annotations)==null?void 0:K[Te.M6];if(!!Z)try{const X=(0,Te.Ou)(Z),J=b.byUrl(X.target);return{locationTargetUrl:X.target,integrationType:J==null?void 0:J.type}}catch{return}}function Je(C,b){const Z=new Set([...getEntityRelations(C,RELATION_MEMBER_OF,{kind:"group"}),...C?[getCompoundEntityRef(C)]:[]].map(stringifyEntityRef)),K=getEntityRelations(b,RELATION_OWNED_BY).map(stringifyEntityRef);for(const X of K)if(Z.has(X))return!0;return!1}const vt=(0,a.createContext)(void 0),Dt=({children:C})=>{const b=(0,ke.default)(),Z=(0,t.useApi)(l),[K,X]=(0,a.useState)({}),J=(0,ye.TH)(),he=(0,a.useMemo)(()=>{var _e;return(_e=fe().parse(J.search,{ignoreQueryPrefix:!0}).filters)!=null?_e:{}},[J]),[Ie,Ne]=(0,a.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:De,error:Fe},Me]=(0,Le.default)(async()=>{var un;const _e=(0,Ke.compact)(Object.values(K)),ze=tt(_e),Bt=et(_e),jt=et((0,Ke.compact)(Object.values(Ie.appliedFilters))),Dn=Object.keys(K).reduce((Qt,on)=>{const An=K[on];return An!=null&&An.toQueryValue&&(Qt[on]=An.toQueryValue()),Qt},{});if((0,Ke.isEqual)(jt,Bt))Ne({appliedFilters:K,backendEntities:Ie.backendEntities,entities:Ie.backendEntities.filter(ze)});else{const Qt=await Z.getEntities({filter:Bt});Ne({appliedFilters:K,backendEntities:Qt.items,entities:Qt.items.filter(ze)})}if(b()){const Qt=fe().parse(J.search,{ignoreQueryPrefix:!0}),on=fe().stringify({...Qt,filters:Dn},{addQueryPrefix:!0,arrayFormat:"repeat"}),An=`${window.location.pathname}${on}`;(un=window.history)==null||un.replaceState(null,document.title,An)}},[Z,he,K,Ie],{loading:!0});(0,He.Z)(Me,10,[K]);const Ge=(0,a.useCallback)(_e=>{X(ze=>{const Bt=typeof _e=="function"?_e(ze):_e;return{...ze,...Bt}})},[]),yt=(0,a.useMemo)(()=>({filters:Ie.appliedFilters,entities:Ie.entities,backendEntities:Ie.backendEntities,updateFilters:Ge,queryParameters:he,loading:De,error:Fe}),[Ie,Ge,he,De,Fe]);return a.createElement(vt.Provider,{value:yt},C)};function ct(){const C=(0,a.useContext)(vt);if(!C)throw new Error("useEntityList must be used within EntityListProvider");return C}var Pt=e(64279),Ft=e(18149),It=e.n(Ft),Nt=e(829),wt=e.n(Nt);const Wt=(0,B.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function tn(C){var b,Z;return{kind:C.kind.toLocaleLowerCase("en-US"),namespace:(Z=(b=C.metadata.namespace)==null?void 0:b.toLocaleLowerCase("en-US"))!=null?Z:DEFAULT_NAMESPACE,name:C.metadata.name}}function $t(C,b){const Z=b==null?void 0:b.defaultKind;let K,X,J;return"metadata"in C?(K=C.kind,X=C.metadata.namespace,J=C.metadata.name):(K=C.kind,X=C.namespace,J=C.name),X===Te.zG&&(X=void 0),K=K.toLocaleLowerCase("en-US"),K=Z&&Z.toLocaleLowerCase("en-US")===K?void 0:K,`${K?`${K}:`:""}${X?`${X}/`:""}${J}`}var mt=e(9118),nn=e(80030);const ae=(0,a.forwardRef)((C,b)=>{var _e;const{entityRef:Z,defaultKind:K,title:X,children:J,...he}=C,Ie=(0,t.useRouteRef)(Wt);let Ne,De,Fe;if(typeof Z=="string"){const ze=(0,Te.of)(Z);Ne=ze.kind,De=ze.namespace,Fe=ze.name}else"metadata"in Z?(Ne=Z.kind,De=Z.metadata.namespace,Fe=Z.metadata.name):(Ne=Z.kind,De=Z.namespace,Fe=Z.name);Ne=Ne.toLocaleLowerCase("en-US"),De=(_e=De==null?void 0:De.toLocaleLowerCase("en-US"))!=null?_e:Te.zG;const Me={kind:Ne,namespace:De,name:Fe},Ge=$t({kind:Ne,namespace:De,name:Fe},{defaultKind:K}),yt=a.createElement(mt.Link,{...he,ref:b,to:Ie(Me)},J,!J&&(X!=null?X:Ge));return X?a.createElement(nn.ZP,{title:Ge},yt):yt});function j(C){const{entityRefs:b,defaultKind:Z,...K}=C;return a.createElement(a.Fragment,null,b.map((X,J)=>a.createElement(a.Fragment,{key:J},J>0&&", ",a.createElement(ae,{...K,entityRef:X,defaultKind:Z}))))}class ie{constructor(b){this.value=b}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ce{constructor(b){this.value=b}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class pe{constructor(b){this.values=b}filterEntity(b){return this.values.every(Z=>{var K;return((K=b.metadata.tags)!=null?K:[]).includes(Z)})}toQueryValue(){return this.values}}class Oe{constructor(b){this.value=b}filterEntity(b){var K;const Z=this.value.toLocaleUpperCase("en-US");return b.metadata.name.toLocaleUpperCase("en-US").includes(Z)||`${b.metadata.title}`.toLocaleUpperCase("en-US").includes(Z)||((K=b.metadata.tags)==null?void 0:K.join("").toLocaleUpperCase("en-US").indexOf(Z))!==-1}}class Ze{constructor(b){this.values=b}filterEntity(b){return this.values.some(Z=>Ue(b,Te.S4).some(K=>$t(K,{defaultKind:"group"})===Z))}toQueryValue(){return this.values}}class Ae{constructor(b){this.values=b}filterEntity(b){return this.values.some(Z=>{var K;return((K=b.spec)==null?void 0:K.lifecycle)===Z})}toQueryValue(){return this.values}}class Ve{constructor(b,Z,K){this.value=b,this.isOwnedEntity=Z,this.isStarredEntity=K}filterEntity(b){switch(this.value){case"owned":return this.isOwnedEntity(b);case"starred":return this.isStarredEntity(b);default:return!0}}toQueryValue(){return this.value}}function dt(){var ze;const C=(0,t.useApi)(l),{filters:{kind:b,type:Z},queryParameters:{type:K},updateFilters:X}=ct(),J=(0,a.useMemo)(()=>[K].flat().filter(Boolean),[K]),[he,Ie]=(0,a.useState)(J.length?J:(ze=Z==null?void 0:Z.getTypes())!=null?ze:[]);(0,a.useEffect)(()=>{J.length&&Ie(J)},[J]);const[Ne,De]=(0,a.useState)([]),Fe=(0,a.useMemo)(()=>b==null?void 0:b.value,[b]),{error:Me,loading:Ge,value:yt}=(0,Pt.default)(async()=>Fe?await C.getEntityFacets({filter:{kind:Fe},facets:["spec.type"]}).then(jt=>jt.facets["spec.type"]||[]):[],[Fe,C]),_e=(0,a.useRef)(yt);return(0,a.useEffect)(()=>{const Bt=_e.current;if(_e.current=yt,Ge||!Fe||Bt===yt||!yt)return;const jt=wt()(yt,un=>-un.count).map(un=>un.value);De(jt);const Dn=he.filter(un=>jt.includes(un));It()(he,Dn)||Ie(Dn)},[Ge,Fe,he,Ie,yt]),(0,a.useEffect)(()=>{X({type:he.length?new ce(he):void 0})},[he,X]),{loading:Ge,error:Me,availableTypes:Ne,selectedTypes:he,setSelectedTypes:Ie}}const At=20;function gt(C,b){var Ne,De;const Z=(Ne=b==null?void 0:b.type)==null?void 0:Ne.toLocaleLowerCase("en-US"),K=(De=b==null?void 0:b.kind)==null?void 0:De.toLocaleLowerCase("en-US"),X=(0,t.useApi)(l),{loading:J,value:he,error:Ie}=(0,Pt.default)(async()=>{var _e;const Fe=(_e=C.relations)==null?void 0:_e.map(ze=>({type:ze.type,target:(0,Te.of)(ze.targetRef)})).filter(ze=>(!Z||ze.type.toLocaleLowerCase("en-US")===Z)&&(!K||ze.target.kind===K));if(!Fe)return[];const Me=Object.values((0,Ke.groupBy)(Fe,({target:ze})=>`${ze.kind}:${ze.namespace}`.toLocaleLowerCase("en-US"))),Ge=[];for(const ze of Me)Ge.push({kind:ze[0].target.kind,namespace:ze[0].target.namespace,nameBatches:(0,Ke.chunk)(ze.map(Bt=>Bt.target.name),At)});return(await Promise.all(Ge.flatMap(ze=>ze.nameBatches.map(Bt=>X.getEntities({filter:{kind:ze.kind,"metadata.namespace":ze.namespace,"metadata.name":Bt}}))))).flatMap(ze=>ze.items)},[C,Z,K]);return{entities:he,loading:J,error:Ie}}var rt=e(72164);function xt(C){return typeof C=="string"?C:(0,Te.eE)(C)}function lt(){const C=(0,t.useApi)(h),b=(0,rt.Z)(C.starredEntitie$(),new Set),Z=(0,a.useCallback)(X=>b.has(xt(X)),[b]),K=(0,a.useCallback)(X=>C.toggleStarred(xt(X)).then(),[C]);return{starredEntities:b,toggleStarredEntity:K,isStarredEntity:Z}}function ge(C){return typeof C=="string"?C:(0,Te.eE)(C)}function S(C){const b=(0,t.useApi)(h),[Z,K]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const J=b.starredEntitie$().subscribe({next(he){K(he.has(ge(C)))}});return()=>{J.unsubscribe()}},[C,b]),{toggleStarredEntity:(0,a.useCallback)(()=>b.toggleStarred(ge(C)).then(),[C,b]),isStarredEntity:Z}}function H(){const C=(0,t.useApi)(t.identityApiRef),{loading:b,value:Z}=(0,Pt.default)(async()=>{const{ownershipEntityRefs:X}=await C.getBackstageIdentity();return X},[]),K=(0,a.useMemo)(()=>{const X=new Set(Z!=null?Z:[]);return J=>{const he=Ue(J,Te.S4).map(Te.eE);for(const Ie of he)if(X.has(Ie))return!0;return!1}},[Z]);return(0,a.useMemo)(()=>({loading:b,isOwnedEntity:K}),[b,K])}var F=e(68099);function se(C){const{entity:b,loading:Z,error:K}=Se(),{allowed:X,loading:J,error:he}=(0,F.gI)({permission:C,resourceRef:b?(0,Te.eE)(b):void 0});return Z||J?{loading:!0,allowed:!1}:K?{loading:!1,allowed:!1,error:K}:{loading:!1,allowed:X,error:he}}const de=C=>{var he;const{initialFilter:b,hidden:Z}=C,{updateFilters:K,queryParameters:{kind:X}}=useEntityList(),[J]=useState((he=[X].flat()[0])!=null?he:b);return useEffect(()=>{K({kind:J?new EntityKindFilter(J):void 0})},[J,K]),Z?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var U=e(79692),P=e(5806),Q=e(21324),le=e(86619),ue=e(19996),Ce=e(25505),xe=e(38016),we=e(88013);const ut=(0,U.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),Et=a.createElement(Ce.Z,{fontSize:"small"}),nt=a.createElement(ue.Z,{fontSize:"small"}),it=()=>{var De,Fe;const C=ut(),{updateFilters:b,backendEntities:Z,filters:K,queryParameters:{lifecycles:X}}=ct(),J=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,Ie]=(0,a.useState)(J.length?J:(Fe=(De=K.lifecycles)==null?void 0:De.values)!=null?Fe:[]);(0,a.useEffect)(()=>{J.length&&Ie(J)},[J]),(0,a.useEffect)(()=>{b({lifecycles:he.length?new Ae(he):void 0})},[he,b]);const Ne=(0,a.useMemo)(()=>[...new Set(Z.map(Me=>{var Ge;return(Ge=Me.spec)==null?void 0:Ge.lifecycle}).filter(Boolean))].sort(),[Z]);return Ne.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(T.Z,{variant:"button"},"Lifecycle"),a.createElement(we.ZP,{"aria-label":"Lifecycle",multiple:!0,options:Ne,value:he,onChange:(Me,Ge)=>Ie(Ge),renderOption:(Me,{selected:Ge})=>a.createElement(P.Z,{control:a.createElement(Q.Z,{icon:Et,checkedIcon:nt,checked:Ge}),label:Me}),size:"small",popupIcon:a.createElement(xe.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:Me=>a.createElement(le.Z,{...Me,className:C.input,variant:"outlined"})})):null},Ct=(0,U.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),Ye=a.createElement(Ce.Z,{fontSize:"small"}),V=a.createElement(ue.Z,{fontSize:"small"}),p=()=>{var De,Fe;const C=Ct(),{updateFilters:b,backendEntities:Z,filters:K,queryParameters:{owners:X}}=ct(),J=(0,a.useMemo)(()=>[X].flat().filter(Boolean),[X]),[he,Ie]=(0,a.useState)(J.length?J:(Fe=(De=K.owners)==null?void 0:De.values)!=null?Fe:[]);(0,a.useEffect)(()=>{J.length&&Ie(J)},[J]),(0,a.useEffect)(()=>{b({owners:he.length?new Ze(he):void 0})},[he,b]);const Ne=(0,a.useMemo)(()=>[...new Set(Z.flatMap(Me=>Ue(Me,Te.S4).map(Ge=>$t(Ge,{defaultKind:"group"}))).filter(Boolean))].sort(),[Z]);return Ne.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(T.Z,{variant:"button"},"Owner"),a.createElement(we.ZP,{multiple:!0,"aria-label":"Owner",options:Ne,value:he,onChange:(Me,Ge)=>Ie(Ge),renderOption:(Me,{selected:Ge})=>a.createElement(P.Z,{control:a.createElement(Q.Z,{icon:Ye,checkedIcon:V,checked:Ge}),label:Me}),size:"small",popupIcon:a.createElement(xe.Z,{"data-testid":"owner-picker-expand"}),renderInput:Me=>a.createElement(le.Z,{...Me,className:C.input,variant:"outlined"})})):null},x=(0,U.Z)(C=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),N=()=>{var J,he;const C=x(),{filters:b,updateFilters:Z}=useEntityList(),[K,X]=useState((he=(J=b.text)==null?void 0:J.value)!=null?he:"");return useDebounce(()=>{Z({text:K.length?new EntityTextFilter(K):void 0})},250,[K,Z]),React.createElement(Toolbar,{className:C.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:C.input,placeholder:"Search",autoComplete:"off",onChange:Ie=>X(Ie.target.value),value:K,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>X(""),edge:"end",disabled:K.length===0},React.createElement(Clear,null)))})))},G=Object.freeze({createEntityRefColumn(C){const{defaultKind:b}=C;function Z(K){var X;return((X=K.metadata)==null?void 0:X.title)||$t(K,{defaultKind:b})}return{title:"Name",highlight:!0,customFilterAndSearch(K,X){return Z(X).includes(K)},customSort(K,X){return Z(K).localeCompare(Z(X))},render:K=>{var X;return a.createElement(ae,{entityRef:K,defaultKind:b,title:(X=K.metadata)==null?void 0:X.title})}}},createEntityRelationColumn({title:C,relation:b,defaultKind:Z,filter:K}){function X(he){return Ue(he,b,K)}function J(he){return X(he).map(Ie=>$t(Ie,{defaultKind:Z})).join(", ")}return{title:C,customFilterAndSearch(he,Ie){return J(Ie).includes(he)},customSort(he,Ie){return J(he).localeCompare(J(Ie))},render:he=>a.createElement(j,{entityRefs:X(he),defaultKind:Z})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Te.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Te.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Te.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:C=>a.createElement(mt.OverflowTooltip,{text:C.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Pe=[G.createEntityRefColumn({defaultKind:"system"}),G.createDomainColumn(),G.createOwnerColumn(),G.createMetadataDescriptionColumn()],Ee=[G.createEntityRefColumn({defaultKind:"component"}),G.createSystemColumn(),G.createOwnerColumn(),G.createSpecTypeColumn(),G.createSpecLifecycleColumn(),G.createMetadataDescriptionColumn()],$e=(0,U.Z)(C=>({empty:{padding:C.spacing(2),display:"flex",justifyContent:"center"}})),Xe=C=>{const{entities:b,title:Z,emptyContent:K,variant:X="gridItem",columns:J}=C,he=$e(),Ie={minWidth:"0",width:"100%"};return X==="gridItem"&&(Ie.height="calc(100% - 10px)"),a.createElement(mt.Table,{columns:J,title:Z,style:Ie,emptyContent:K&&a.createElement("div",{className:he.empty},K),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense"},data:b})};Xe.columns=G,Xe.systemEntityColumns=Pe,Xe.componentEntityColumns=Ee;const Rt=(0,U.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),_t=a.createElement(Ce.Z,{fontSize:"small"}),sn=a.createElement(ue.Z,{fontSize:"small"}),Wn=()=>{var De,Fe;const C=Rt(),{updateFilters:b,filters:Z,queryParameters:{tags:K}}=ct(),X=(0,t.useApi)(l),{value:J}=(0,Pt.default)(async()=>{var yt;const Me="metadata.tags",{facets:Ge}=await X.getEntityFacets({facets:[Me],filter:(yt=Z.kind)==null?void 0:yt.getCatalogFilters()});return Ge[Me].map(({value:_e})=>_e)},[Z.kind]),he=(0,a.useMemo)(()=>[K].flat().filter(Boolean),[K]),[Ie,Ne]=(0,a.useState)(he.length?he:(Fe=(De=Z.tags)==null?void 0:De.values)!=null?Fe:[]);return(0,a.useEffect)(()=>{he.length&&Ne(he)},[he]),(0,a.useEffect)(()=>{b({tags:Ie.length?new pe(Ie):void 0})},[Ie,b]),J!=null&&J.length?a.createElement(A.Z,{pb:1,pt:1},a.createElement(T.Z,{variant:"button"},"Tags"),a.createElement(we.ZP,{multiple:!0,"aria-label":"Tags",options:J,value:Ie,onChange:(Me,Ge)=>Ne(Ge),renderOption:(Me,{selected:Ge})=>a.createElement(P.Z,{control:a.createElement(Q.Z,{icon:_t,checkedIcon:sn,checked:Ge}),label:Me}),size:"small",popupIcon:a.createElement(xe.Z,{"data-testid":"tag-picker-expand"}),renderInput:Me=>a.createElement(le.Z,{...Me,className:C.input,variant:"outlined"})})):null};var bn=e(82108),cn=e.n(bn);const Hn=C=>{var De;const{hidden:b,initialFilter:Z}=C,K=(0,t.useApi)(t.alertApiRef),{error:X,availableTypes:J,selectedTypes:he,setSelectedTypes:Ie}=dt();if((0,a.useEffect)(()=>{X&&K.post({message:"Failed to load entity types",severity:"error"}),Z&&Ie([Z])},[X,K,Z,Ie]),J.length===0||X)return null;const Ne=[{value:"all",label:"All"},...J.map(Fe=>({value:Fe,label:cn()(Fe)}))];return b?null:a.createElement(A.Z,{pb:1,pt:1},a.createElement(mt.Select,{label:"Type",items:Ne,selected:(De=Ne.length>1?he[0]:void 0)!=null?De:"all",onChange:Fe=>Ie(Fe==="all"?[]:[String(Fe)])}))};var hr=e(15459),$r=e(61837),Nr=e(11640),Zr=e(28347);const Jt=(0,hr.Z)({root:{color:"#f3ba37"}})(Nr.Z),eo=C=>{const{toggleStarredEntity:b,isStarredEntity:Z}=S(C.entity);return a.createElement($r.Z,{"aria-label":"favorite",color:"inherit",...C,onClick:()=>b()},a.createElement(nn.ZP,{title:Z?"Remove from favorites":"Add to favorites"},Z?a.createElement(Jt,null):a.createElement(Zr.Z,null)))};var gr=e(8629),jn=e(79249),pr=e(38724),Ur=e(99152),Vn=e(6487),yr=e(49429),Zt=e(55999),zr=e(72779),rr=e.n(zr),Wr=e(39412);const Er=Wr.Z;function or(C,b){if(C)return C.toLocaleLowerCase("en-US");if(b)try{return(0,Te.of)(b).kind.toLocaleLowerCase("en-US")}catch{return}}function ar(C,b){const Z=(0,t.useApp)(),K=or(C,b);return K&&Z.getSystemIcon(`kind:${K}`)||Er}function Gn(C){const{kind:b,entityRef:Z,...K}=C,X=ar(b,Z);return a.createElement(X,{...K})}const Kn=(0,U.Z)(C=>({node:{fill:C.palette.grey[300],stroke:C.palette.grey[300],"&.primary":{fill:C.palette.primary.light,stroke:C.palette.primary.light},"&.secondary":{fill:C.palette.secondary.light,stroke:C.palette.secondary.light}},text:{fill:C.palette.getContrastText(C.palette.grey[300]),"&.primary":{fill:C.palette.primary.contrastText},"&.secondary":{fill:C.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function vr(C){const b=(0,t.useApi)(l),Z=(0,Te.eE)(C),{loading:K,error:X,value:J}=(0,Pt.default)(async()=>{const he=await b.getEntityAncestors({entityRef:Z}),Ie=new Array,Ne=new Array;for(const De of he.items){const Fe=(0,Te.eE)(De.entity),Me=Fe===he.rootEntityRef;Ie.push({id:Fe,root:Me,...De.entity});for(const Ge of De.parentEntityRefs)Ne.push({from:Fe,to:Ge})}return{nodes:Ie,edges:Ne}},[Z]);return{loading:K,error:X,nodes:(J==null?void 0:J.nodes)||[],edges:(J==null?void 0:J.edges)||[]}}function Ar({node:C}){const b=Kn(),Z=(0,ye.s0)(),K=(0,t.useRouteRef)(Wt),[X,J]=(0,a.useState)(0),[he,Ie]=(0,a.useState)(0),Ne=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{if(Ne.current){let{height:Bt,width:jt}=Ne.current.getBBox();Bt=Math.round(Bt),jt=Math.round(jt),(Bt!==he||jt!==X)&&(J(jt),Ie(Bt))}},[X,he]);const De=10,Fe=he,Me=Fe+De,Ge=Me+X+De*2,yt=he+De*2,_e=C.metadata.title||(C.kind&&C.metadata.name&&C.metadata.namespace?$t({kind:C.kind,name:C.metadata.name,namespace:C.metadata.namespace||""}):C.id),ze=()=>{Z(K({kind:C.kind,namespace:C.metadata.namespace||Te.zG,name:C.metadata.name}))};return a.createElement("g",{onClick:ze,className:b.clickable},a.createElement("rect",{className:rr()(b.node,C.root?"secondary":"primary"),width:Ge,height:yt,rx:10}),a.createElement(Gn,{kind:C.kind,y:De,x:De,width:Fe,height:Fe,className:rr()(b.text,C.root?"secondary":"primary")}),a.createElement("text",{ref:Ne,className:rr()(b.text,C.root?"secondary":"primary"),y:yt/2,x:Me+(X+De*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},_e))}function Rr(C){const{loading:b,error:Z,nodes:K,edges:X}=vr(C.entity);return b?a.createElement(mt.Progress,null):Z?a.createElement(mt.ResponseErrorPanel,{error:Z}):a.createElement(a.Fragment,null,a.createElement(Zt.Z,{variant:"h2"},"Ancestry"),a.createElement(Zt.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(mt.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),a.createElement(A.Z,{mt:4},a.createElement(mt.DependencyGraph,{nodes:K,edges:X,renderNode:Ar,direction:mt.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var On=e(11776),ln=e(38402),wn=e(86136),$n=e(99688),Sr=e(49378),Cr=e(54506),Yn=e(94339),to=e(24579),Tr=e(27685);const Jn=(0,U.Z)(C=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:C.spacing(2)},helpIcon:{marginLeft:C.spacing(1),color:C.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function pn(C){const b=Jn();return a.createElement(Sr.Z,{...C,primaryTypographyProps:{className:b.monospace},secondaryTypographyProps:{className:b.monospace}})}function kn(C){const b=Jn();return a.createElement(Cr.Z,{className:b.monospace},C.children)}function Nn(C){return a.createElement(A.Z,{mt:2},a.createElement(Yn.Z,{variant:"outlined"},a.createElement(to.Z,null,a.createElement(T.Z,{variant:"h6",gutterBottom:!0},C.title,C.helpLink&&a.createElement(sr,{to:C.helpLink})),C.children)))}function ir(C){const[b,Z]=C.entry;return a.createElement(ln.Z,null,C.indent&&a.createElement(wn.Z,null),a.createElement(pn,{primary:b,secondary:Z.match(/^url:https?:\/\//)?a.createElement(a.Fragment,null,Z.substring(0,4),a.createElement(mt.Link,{to:Z.substring(4)},Z.substring(4))):Z}))}function sr(C){const b=Jn();return a.createElement(mt.Link,{to:C.to,className:b.helpIcon},a.createElement(Tr.Z,{fontSize:"inherit"}))}const br=(0,U.Z)({root:{display:"flex",flexDirection:"column"}});function yn(C){var Ne,De;const b=(0,t.useApi)(l),Z=(0,Te.eE)(C),K=(Ne=C.metadata.annotations)==null?void 0:Ne[Te.P1],X=(De=C.metadata.annotations)==null?void 0:De[Te.q1],{loading:J,error:he,value:Ie}=(0,Pt.default)(async()=>!K&&!X?[]:(await b.getEntities({filter:[...K?[{[`metadata.annotations.${Te.P1}`]:K}]:[],...X?[{[`metadata.annotations.${Te.q1}`]:X}]:[]]})).items,[K,X]);return{loading:J,error:he,location:K,originLocation:X,colocatedEntities:Ie==null?void 0:Ie.filter(Fe=>(0,Te.eE)(Fe)!==Z)}}function Qn(C){return a.createElement(On.Z,{dense:!0},C.header&&a.createElement(ir,{key:"header",entry:C.header}),C.entities.map(b=>a.createElement(ln.Z,{key:(0,Te.eE)(b)},a.createElement(wn.Z,null,a.createElement(Gn,{kind:b.kind})),a.createElement(pn,{primary:a.createElement(ae,{entityRef:b})}))))}function Pr(C){const{entity:b}=C,{loading:Z,error:K,location:X,originLocation:J,colocatedEntities:he}=yn(b);if(Z)return a.createElement(mt.Progress,null);if(K)return a.createElement(mt.ResponseErrorPanel,{error:K});if(!X&&!J)return a.createElement($n.Z,{severity:"warning"},"Entity had no location information.");if(!(he!=null&&he.length))return a.createElement($n.Z,{severity:"info"},"There were no other entities on this location.");if(X===J)return a.createElement(Qn,{entities:he});const Ie=he.filter(De=>{var Fe;return((Fe=De.metadata.annotations)==null?void 0:Fe[Te.P1])===X}),Ne=he.filter(De=>{var Fe;return((Fe=De.metadata.annotations)==null?void 0:Fe[Te.q1])===J});return a.createElement(a.Fragment,null,Ie.length>0&&a.createElement(Qn,{entities:Ie,header:["At the same location",X]}),Ne.length>0&&a.createElement(Qn,{entities:Ne,header:["At the same origin",J]}))}function Ir(C){const b=br();return a.createElement(a.Fragment,null,a.createElement(Zt.Z,{variant:"h2"},"Colocated"),a.createElement(Zt.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:b.root},a.createElement(Pr,{entity:C.entity})))}function Xn(C){return Object.fromEntries([...Object.entries(C)].sort((b,Z)=>b[0]<Z[0]?-1:1))}function Lr(C){return a.createElement(a.Fragment,null,a.createElement(Zt.Z,{variant:"h2"},"Entity as JSON"),a.createElement(Zt.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),a.createElement(Zt.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(mt.CodeSnippet,{text:JSON.stringify(Xn(C.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var cr=e(3440),Or=e.n(cr);const lr=(0,U.Z)({root:{display:"flex",flexDirection:"column"}});function kt(C){var De,Fe;const b=lr(),{apiVersion:Z,kind:K,metadata:X,spec:J,relations:he=[],status:Ie={}}=C.entity,Ne=Or()(wt()(he,Me=>Me.targetRef),"type");return a.createElement(a.Fragment,null,a.createElement(Zt.Z,{variant:"h2"},"Overview"),a.createElement("div",{className:b.root},a.createElement(Nn,{title:"Identity"},a.createElement(On.Z,{dense:!0},a.createElement(ln.Z,null,a.createElement(pn,{primary:"apiVersion",secondary:Z})),a.createElement(ln.Z,null,a.createElement(pn,{primary:"kind",secondary:K})),(J==null?void 0:J.type)&&a.createElement(ln.Z,null,a.createElement(pn,{primary:"spec.type",secondary:J.type})),X.uid&&a.createElement(ln.Z,null,a.createElement(pn,{primary:"uid",secondary:X.uid})),X.etag&&a.createElement(ln.Z,null,a.createElement(pn,{primary:"etag",secondary:X.etag})))),a.createElement(Nn,{title:"Metadata"},!!Object.keys(X.annotations||{}).length&&a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,"Annotations",a.createElement(sr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(X.annotations).map(Me=>a.createElement(ir,{key:Me[0],indent:!0,entry:Me}))),!!Object.keys(X.labels||{}).length&&a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,"Labels")},Object.entries(X.labels).map(Me=>a.createElement(ir,{key:Me[0],indent:!0,entry:Me}))),!!((De=X.tags)!=null&&De.length)&&a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,"Tags")},X.tags.map((Me,Ge)=>a.createElement(ln.Z,{key:`${Me}-${Ge}`},a.createElement(wn.Z,null),a.createElement(pn,{primary:Me}))))),!!he.length&&a.createElement(Nn,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ne).map(([Me,Ge],yt)=>a.createElement("div",{key:yt},a.createElement(On.Z,{dense:!0,subheader:a.createElement(kn,null,Me)},Ge.map(_e=>a.createElement(ln.Z,{key:_e.targetRef},a.createElement(wn.Z,null,a.createElement(Gn,{entityRef:_e.targetRef})),a.createElement(pn,{primary:a.createElement(ae,{entityRef:_e.targetRef})}))))))),!!((Fe=Ie.items)!=null&&Fe.length)&&a.createElement(Nn,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Ie.items.map((Me,Ge)=>a.createElement("div",{key:Ge},a.createElement(T.Z,null,Me.level,": ",Me.type),a.createElement(A.Z,{ml:2},Me.message))))))}var En=e(60155),z=e.n(En);function re(C){return a.createElement(a.Fragment,null,a.createElement(Zt.Z,{variant:"h2"},"Entity as YAML"),a.createElement(Zt.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),a.createElement(Zt.Z,null,a.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},a.createElement(mt.CodeSnippet,{text:z().stringify(Xn(C.entity)),language:"yaml",showCopyCodeButton:!0}))))}const me=(0,U.Z)(C=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:C.palette.background.paper},tabs:{borderRight:`1px solid ${C.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function Be(C){const{children:b,value:Z,index:K,...X}=C,J=me();return a.createElement("div",{role:"tabpanel",hidden:Z!==K,id:`vertical-tabpanel-${K}`,"aria-labelledby":`vertical-tab-${K}`,className:J.tabContents,...X},Z===K&&a.createElement(A.Z,{pl:3,pr:3},b))}function qe(C){return{id:`vertical-tab-${C}`,"aria-controls":`vertical-tabpanel-${C}`}}function pt(C){const b=me(),[Z,K]=a.useState(0);return(0,a.useEffect)(()=>{K(0)},[C.open]),C.entity?a.createElement(gr.Z,{fullWidth:!0,maxWidth:"xl",open:C.open,onClose:C.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:b.fullHeightDialog}},a.createElement(jn.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),a.createElement(pr.Z,{dividers:!0},a.createElement("div",{className:b.root},a.createElement(Ur.Z,{orientation:"vertical",variant:"scrollable",value:Z,onChange:(X,J)=>K(J),"aria-label":"Inspector options",className:b.tabs},a.createElement(Vn.Z,{label:"Overview",...qe(0)}),a.createElement(Vn.Z,{label:"Ancestry",...qe(1)}),a.createElement(Vn.Z,{label:"Colocated",...qe(2)}),a.createElement(Vn.Z,{label:"Raw JSON",...qe(3)}),a.createElement(Vn.Z,{label:"Raw YAML",...qe(4)})),a.createElement(Be,{value:Z,index:0},a.createElement(kt,{entity:C.entity})),a.createElement(Be,{value:Z,index:1},a.createElement(Rr,{entity:C.entity})),a.createElement(Be,{value:Z,index:2},a.createElement(Ir,{entity:C.entity})),a.createElement(Be,{value:Z,index:3},a.createElement(Lr,{entity:C.entity})),a.createElement(Be,{value:Z,index:4},a.createElement(re,{entity:C.entity})))),a.createElement(yr.Z,null,a.createElement(y.Z,{onClick:C.onClose,color:"primary"},"Close"))):null}var ht=e(85256);function st(C){var yt;const b=(0,t.useApi)(l),Z=(yt=C.metadata.annotations)==null?void 0:yt[Te.q1],K=C.metadata.uid,X=Z==="bootstrap:bootstrap",J=(0,Pt.default)(async()=>{const _e=b.getLocationByRef(Z);let ze;if(!Z)ze=Promise.resolve([]);else{const Bt=`metadata.annotations.${Te.q1}`;ze=b.getEntities({filter:{[Bt]:Z},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(jt=>jt.items)}return Promise.all([_e,ze]).then(([Bt,jt])=>({location:Bt,colocatedEntities:jt}))},[b,C]),he=(0,a.useCallback)(async function(){const{location:ze}=J.value;await b.removeLocationById(ze.id)},[b,J]),Ie=(0,a.useCallback)(async function(){await b.removeEntityByUid(K)},[b,K]);if(X)return{type:"bootstrap",location:Z,deleteEntity:Ie};const{loading:Ne,error:De,value:Fe}=J;if(Ne)return{type:"loading"};if(De)return{type:"error",error:De};const{location:Me,colocatedEntities:Ge}=Fe;return Me?{type:"unregister",location:Z,colocatedEntities:Ge.map(Te.iB),unregisterLocation:he,deleteEntity:Ie}:{type:"only-delete",deleteEntity:Ie}}var ft=e(10179);const Lt=(0,U.Z)({advancedButton:{fontSize:"0.7em"}}),Mt=({entity:C,onConfirm:b})=>{var yt;const Z=(0,t.useApi)(t.alertApiRef),K=(0,t.useApi)(t.configApiRef),X=Lt(),J=st(C),[he,Ie]=(0,a.useState)(!1),[Ne,De]=(0,a.useState)(!1),Fe=(yt=K.getOptionalString("app.title"))!=null?yt:"Backstage",Me=(0,a.useCallback)(async function(){if("unregisterLocation"in J){De(!0);try{await J.unregisterLocation(),b()}catch(ze){(0,ft.BD)(ze),Z.post({message:ze.message})}finally{De(!1)}}},[Z,b,J]),Ge=(0,a.useCallback)(async function(){if("deleteEntity"in J){De(!0);try{await J.deleteEntity(),b()}catch(ze){(0,ft.BD)(ze),Z.post({message:ze.message})}finally{De(!1)}}},[Z,b,J]);return J.type==="loading"?a.createElement(mt.Progress,null):J.type==="error"?a.createElement(mt.ResponseErrorPanel,{error:J.error}):J.type==="bootstrap"?a.createElement(a.Fragment,null,a.createElement($n.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',J.location,'"). If you believe this is in error, please contact the ',Fe," ","integrator."),a.createElement(A.Z,{marginTop:2},!he&&a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Ie(!0)},"Advanced Options"),he&&a.createElement(a.Fragment,null,a.createElement(Zt.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:Ne,onClick:Ge},"Delete Entity")))):J.type==="only-delete"?a.createElement(a.Fragment,null,a.createElement(Zt.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:Ne,onClick:Ge},"Delete Entity")):J.type==="unregister"?a.createElement(a.Fragment,null,a.createElement(Zt.Z,null,"This action will unregister the following entities:"),a.createElement(Zt.Z,{component:"ul"},J.colocatedEntities.map(_e=>a.createElement("li",{key:`${_e.kind}:${_e.namespace}/${_e.name}`},a.createElement(ae,{entityRef:_e})))),a.createElement(Zt.Z,null,"Located at the following location:"),a.createElement(Zt.Z,{component:"ul"},a.createElement("li",null,J.location)),a.createElement(Zt.Z,null,"To undo, just re-register the entity in ",Fe,"."),a.createElement(A.Z,{marginTop:2},a.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ne,onClick:Me},"Unregister Location"),!he&&a.createElement(A.Z,{component:"span",marginLeft:2},a.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:X.advancedButton,onClick:()=>Ie(!0)},"Advanced Options"))),he&&a.createElement(a.Fragment,null,a.createElement(A.Z,{paddingTop:4,paddingBottom:4},a.createElement(ht.Z,null)),a.createElement(Zt.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:Ne,onClick:Ge},"Delete Entity"))):a.createElement($n.Z,{severity:"error"},"Internal error: Unknown state")},rn=C=>{const{open:b,onConfirm:Z,onClose:K,entity:X}=C;return a.createElement(gr.Z,{open:b,onClose:K},a.createElement(jn.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),a.createElement(pr.Z,null,a.createElement(Mt,{entity:X,onConfirm:Z})),a.createElement(yr.Z,null,a.createElement(y.Z,{onClick:K,color:"primary"},"Cancel")))};var en=e(12231),qn=e(9520),vn=e(47603);const _n=(0,U.Z)(C=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:C.spacing(1,0,1,0)},title:{margin:C.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:C.palette.text.primary},menuItem:{minHeight:C.spacing(6)},groupWrapper:{margin:C.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function Hr(C){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:vn.Z},{id:"starred",label:"Starred",icon:Nr.Z}]},{name:C!=null?C:"Company",items:[{id:"all",label:"All"}]}]}const Zn=C=>{var Fn;const{initialFilter:b,availableFilters:Z}=C,K=_n(),J=(Fn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Fn:"Company",{filters:he,updateFilters:Ie,backendEntities:Ne,queryParameters:{kind:De,user:Fe},loading:Me}=ct(),Ge=["starred","all"],yt=Hr(J).map(dn=>({...dn,items:dn.items.filter(({id:fn})=>["group","user"].some(Dr=>Dr===De)?Ge.includes(fn):!Z||Z.includes(fn))})).filter(({items:dn})=>!!dn.length),{isStarredEntity:_e}=lt(),{isOwnedEntity:ze,loading:Bt}=H(),jt=Me||Bt,Dn=(0,a.useMemo)(()=>new Ve("owned",ze,_e),[ze,_e]),un=(0,a.useMemo)(()=>new Ve("starred",ze,_e),[ze,_e]),Qt=(0,a.useMemo)(()=>[Fe].flat()[0],[Fe]),[on,An]=(0,a.useState)(Qt!=null?Qt:b),ur=(0,a.useMemo)(()=>Ne.filter(tt((0,Ke.compact)(Object.values({...he,user:void 0})))),[he,Ne]),xr=(0,a.useMemo)(()=>({all:ur.length,starred:ur.filter(dn=>un.filterEntity(dn)).length,owned:ur.filter(dn=>Dn.filterEntity(dn)).length}),[ur,un,Dn]);return(0,a.useEffect)(()=>{Qt&&An(Qt)},[Qt]),(0,a.useEffect)(()=>{!jt&&!!on&&on!=="all"&&xr[on]===0&&An("all")},[jt,xr,on,An]),(0,a.useEffect)(()=>{Ie({user:on?new Ve(on,ze,_e):void 0})},[on,ze,_e,Ie]),a.createElement(Yn.Z,{className:K.root},yt.map(dn=>a.createElement(a.Fragment,{key:dn.name},a.createElement(T.Z,{variant:"subtitle2",className:K.title},dn.name),a.createElement(Yn.Z,{className:K.groupWrapper},a.createElement(On.Z,{disablePadding:!0,dense:!0},dn.items.map(fn=>{var Dr,no;return a.createElement(en.Z,{key:fn.id,button:!0,divider:!0,onClick:()=>An(fn.id),selected:fn.id===((Dr=he.user)==null?void 0:Dr.value),className:K.menuItem,disabled:xr[fn.id]===0,"data-testid":`user-picker-${fn.id}`},fn.icon&&a.createElement(wn.Z,{className:K.listIcon},a.createElement(fn.icon,{fontSize:"small"})),a.createElement(Sr.Z,null,a.createElement(T.Z,{variant:"body1"},fn.label)),a.createElement(qn.Z,null,(no=xr[fn.id])!=null?no:"-"))}))))))},jr=({children:C,value:b})=>{var Ie;const[Z,K]=useState((Ie=b==null?void 0:b.filters)!=null?Ie:{}),X=useCallback(Ne=>{K(De=>{const Fe=typeof Ne=="function"?Ne(De):Ne;return{...De,...Fe}})},[]),J=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),he=useMemo(()=>{var Ne,De,Fe,Me,Ge;return{entities:(Ne=b==null?void 0:b.entities)!=null?Ne:J.entities,backendEntities:(De=b==null?void 0:b.backendEntities)!=null?De:J.backendEntities,updateFilters:(Fe=b==null?void 0:b.updateFilters)!=null?Fe:X,filters:Z,loading:(Me=b==null?void 0:b.loading)!=null?Me:!1,queryParameters:(Ge=b==null?void 0:b.queryParameters)!=null?Ge:J.queryParameters,error:b==null?void 0:b.error}},[b,J,Z,X]);return React.createElement(EntityListContext.Provider,{value:he},C)}},39398:function(_,i,e){"use strict";e.r(i),e.d(i,{AboutCard:function(){return Ke},AboutContent:function(){return ee},AboutField:function(){return M}});var r=e(48023),t=e(9118),l=e(36964),h=e(36356),v=e(53479),m=e(79692),a=e(94339),s=e(32552),d=e(61837),y=e(85256),u=e(24579),A=e(52866),T=e(30254),R=e(27604),D=e(2784),ne=e(47851),w=e(60905),I=e(90436),B=e(7089);const O=(0,m.Z)(We=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:We.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function M(We){const{label:fe,value:ye,gridSizes:Le,children:He}=We,ke=O(),et=(0,l.useElementFilter)(He,Te=>Te.getElements()),tt=et.length>0?et:D.createElement(I.Z,{variant:"body2",className:ke.value},ye||"unknown");return D.createElement(w.Z,{item:!0,...Le},D.createElement(I.Z,{variant:"subtitle2",className:ke.label},fe),tt)}const k=(0,m.Z)({description:{wordBreak:"break-word"}});function ee(We){var ct,Pt,Ft,It,Nt,wt;const{entity:fe}=We,ye=k(),Le=fe.kind.toLocaleLowerCase("en-US")==="system",He=fe.kind.toLocaleLowerCase("en-US")==="resource",ke=fe.kind.toLocaleLowerCase("en-US")==="component",et=fe.kind.toLocaleLowerCase("en-US")==="api",tt=fe.kind.toLocaleLowerCase("en-US")==="template",Te=fe.kind.toLocaleLowerCase("en-US")==="location",Ue=fe.kind.toLocaleLowerCase("en-US")==="group",je=(0,v.getEntityRelations)(fe,r.cz,{kind:"system"}),Je=(0,v.getEntityRelations)(fe,r.cz,{kind:"component"}),vt=(0,v.getEntityRelations)(fe,r.cz,{kind:"domain"}),Dt=(0,v.getEntityRelations)(fe,r.S4);return D.createElement(w.Z,{container:!0},D.createElement(M,{label:"Description",gridSizes:{xs:12}},D.createElement(I.Z,{variant:"body2",paragraph:!0,className:ye.description},((ct=fe==null?void 0:fe.metadata)==null?void 0:ct.description)||"No description")),D.createElement(M,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},Dt.length>0&&D.createElement(v.EntityRefLinks,{entityRefs:Dt,defaultKind:"group"})),(Le||vt.length>0)&&D.createElement(M,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},vt.length>0&&D.createElement(v.EntityRefLinks,{entityRefs:vt,defaultKind:"domain"})),(et||ke||He||je.length>0)&&D.createElement(M,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},je.length>0&&D.createElement(v.EntityRefLinks,{entityRefs:je,defaultKind:"system"})),ke&&Je.length>0&&D.createElement(M,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},D.createElement(v.EntityRefLinks,{entityRefs:Je,defaultKind:"component"})),(et||ke||He||tt||Ue||Te||typeof((Pt=fe==null?void 0:fe.spec)==null?void 0:Pt.type)=="string")&&D.createElement(M,{label:"Type",value:(Ft=fe==null?void 0:fe.spec)==null?void 0:Ft.type,gridSizes:{xs:12,sm:6,lg:4}}),(et||ke||typeof((It=fe==null?void 0:fe.spec)==null?void 0:It.lifecycle)=="string")&&D.createElement(M,{label:"Lifecycle",value:(Nt=fe==null?void 0:fe.spec)==null?void 0:Nt.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),D.createElement(M,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((wt=fe==null?void 0:fe.metadata)==null?void 0:wt.tags)||[]).map(Wt=>D.createElement(B.Z,{key:Wt,size:"small",label:Wt}))))}const Se=(0,m.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Ke(We){var It,Nt,wt;const{variant:fe}=We,ye=Se(),{entity:Le}=(0,v.useEntity)(),He=(0,l.useApi)(h.q3),ke=(0,l.useApi)(v.catalogApiRef),et=(0,l.useApi)(l.alertApiRef),tt=(0,l.useRouteRef)(ne.jU),Te=(0,v.getEntitySourceLocation)(Le,He),Ue=(It=Le.metadata.annotations)==null?void 0:It[r.Tf],je={label:"View Source",disabled:!Te,icon:D.createElement(h.nW,{type:Te==null?void 0:Te.integrationType}),href:Te==null?void 0:Te.locationTargetUrl},Je={label:"View TechDocs",disabled:!((Nt=Le.metadata.annotations)!=null&&Nt["backstage.io/techdocs-ref"])||!tt,icon:D.createElement(T.Z,null),href:tt&&tt({namespace:Le.metadata.namespace||r.zG,kind:Le.kind,name:Le.metadata.name})};let vt="";fe==="gridItem"?vt=ye.gridItemCard:fe==="fullHeight"&&(vt=ye.fullHeightCard);let Dt="";fe==="gridItem"?Dt=ye.gridItemCardContent:fe==="fullHeight"&&(Dt=ye.fullHeightCardContent);const ct=(wt=Le.metadata.annotations)==null?void 0:wt[r.P1],Pt=(ct==null?void 0:ct.startsWith("url:"))||(ct==null?void 0:ct.startsWith("file:")),Ft=(0,D.useCallback)(async()=>{await ke.refreshEntity((0,r.eE)(Le)),et.post({message:"Refresh scheduled",severity:"info"})},[ke,et,Le]);return D.createElement(a.Z,{className:vt},D.createElement(s.Z,{title:"About",action:D.createElement(D.Fragment,null,Pt&&D.createElement(d.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:Ft},D.createElement(A.Z,null)),D.createElement(d.Z,{component:t.Link,"aria-label":"Edit",disabled:!Ue,title:"Edit Metadata",to:Ue!=null?Ue:"#"},D.createElement(R.Z,null))),subheader:D.createElement(t.HeaderIconLinkRow,{links:[je,Je]})}),D.createElement(y.Z,null),D.createElement(u.Z,{className:Dt},D.createElement(ee,{entity:Le})))}},49782:function(_,i,e){"use strict";e.d(i,{K:function(){return A}});var r=e(2784),t=e(79692),l=e(12420),h=e(97580),v=e(73698),m=e(74603),a=e(12231),s=e(53479),d=e(64279),y=e(36964);const u=(0,t.Z)(T=>(0,l.Z)({root:{...T.typography.h4}}));function A(T){var We;const{initialFilter:R="component",allowedKinds:D}=T,ne=u(),w=(0,y.useApi)(s.catalogApiRef),{value:I}=(0,d.default)(async()=>await w.getEntityFacets({facets:["kind"]}).then(fe=>{var ye;return((ye=fe.facets.kind)==null?void 0:ye.map(Le=>Le.value).sort())||[]})),{updateFilters:B,queryParameters:{kind:O}}=(0,s.useEntityList)(),M=(0,r.useMemo)(()=>{var fe;return(fe=[O].flat()[0])==null?void 0:fe.toLocaleLowerCase("en-US")},[O]),[k,ee]=(0,r.useState)(M!=null?M:R);(0,r.useEffect)(()=>{B({kind:k?new s.EntityKindFilter(k):void 0})},[k,B]),(0,r.useEffect)(()=>{M&&ee(M)},[M]);const Ke=[(0,h.Z)(k)].concat((We=I==null?void 0:I.filter(fe=>D?D.some(ye=>ye.toLocaleLowerCase("en-US")===fe.toLocaleLowerCase("en-US")):!0))!=null?We:[]).sort().reduce((fe,ye)=>(fe[ye.toLocaleLowerCase("en-US")]=ye,fe),{});return r.createElement(v.Z,{input:r.createElement(m.Z,{value:k}),value:k,onChange:fe=>ee(fe.target.value),classes:ne},Object.keys(Ke).map(fe=>r.createElement(a.Z,{value:fe,key:fe},`${Ke[fe]}s`)))}},30097:function(_,i,e){"use strict";e.d(i,{E:function(){return R}});var r=e(48023),t=e(53479),l=e(27604),h=e(2997),v=e(76635),m=e(2784),a=e(7089),s=e(9118);const d=Object.freeze({createNameColumn(D){function ne(w){var I;return((I=w.metadata)==null?void 0:I.title)||(0,t.humanizeEntityRef)(w,{defaultKind:D==null?void 0:D.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:w},{entity:I}){return ne(w).localeCompare(ne(I))},render:({entity:w})=>{var I;return m.createElement(t.EntityRefLink,{entityRef:w,defaultKind:(D==null?void 0:D.defaultKind)||"Component",title:(I=w.metadata)==null?void 0:I.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:D})=>m.createElement(t.EntityRefLinks,{entityRefs:D.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:D})=>m.createElement(t.EntityRefLinks,{entityRefs:D.ownedByRelations,defaultKind:"group"})}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:D})=>m.createElement(s.OverflowTooltip,{text:D.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:D})=>m.createElement(m.Fragment,null,D.metadata.tags&&D.metadata.tags.map(ne=>m.createElement(a.Z,{key:ne,label:ne,size:"small",variant:"outlined",style:{marginBottom:"0px"}})))}}});var y=e(28347),u=e(15459),A=e(11640);const T=(0,u.Z)({root:{color:"#f3ba37"}})(A.Z),R=D=>{var et,tt,Te;const{columns:ne,actions:w,tableOptions:I}=D,{isStarredEntity:B,toggleStarredEntity:O}=(0,t.useStarredEntities)(),{loading:M,error:k,entities:ee,filters:Se}=(0,t.useEntityList)(),Ke=(0,m.useMemo)(()=>{var je;return[d.createNameColumn({defaultKind:(je=Se.kind)==null?void 0:je.value}),...Ue(),d.createMetadataDescriptionColumn(),d.createTagsColumn()];function Ue(){var Je;switch((Je=Se.kind)==null?void 0:Je.value){case"user":return[];case"domain":case"system":return[d.createOwnerColumn()];case"group":case"location":case"template":return[d.createSpecTypeColumn()];default:return[d.createSystemColumn(),d.createOwnerColumn(),d.createSpecTypeColumn(),d.createSpecLifecycleColumn()]}}},[(et=Se.kind)==null?void 0:et.value]),We=Se.type===void 0,fe=(0,v.capitalize)((Te=(tt=Se.user)==null?void 0:tt.value)!=null?Te:"all");if(k)return m.createElement("div",null,m.createElement(s.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},m.createElement(s.CodeSnippet,{language:"text",text:k.toString()})));const ye=[({entity:Ue})=>{var Je;const je=(Je=Ue.metadata.annotations)==null?void 0:Je[r.l2];return{icon:()=>m.createElement(h.Z,{"aria-label":"View",fontSize:"small"}),tooltip:"View",disabled:!je,onClick:()=>{!je||window.open(je,"_blank")}}},({entity:Ue})=>{var Je;const je=(Je=Ue.metadata.annotations)==null?void 0:Je[r.Tf];return{icon:()=>m.createElement(l.Z,{"aria-label":"Edit",fontSize:"small"}),tooltip:"Edit",disabled:!je,onClick:()=>{!je||window.open(je,"_blank")}}},({entity:Ue})=>{const je=B(Ue);return{cellStyle:{paddingLeft:"1em"},icon:()=>je?m.createElement(T,null):m.createElement(y.Z,null),tooltip:je?"Remove from favorites":"Add to favorites",onClick:()=>O(Ue)}}],Le=ee.map(Ue=>{const je=(0,t.getEntityRelations)(Ue,r.cz,{kind:"system"}),Je=(0,t.getEntityRelations)(Ue,r.S4);return{entity:Ue,resolved:{name:(0,t.humanizeEntityRef)(Ue,{defaultKind:"Component"}),ownedByRelationsTitle:Je.map(vt=>(0,t.humanizeEntityRef)(vt,{defaultKind:"group"})).join(", "),ownedByRelations:Je,partOfSystemRelationTitle:je.map(vt=>(0,t.humanizeEntityRef)(vt,{defaultKind:"system"})).join(", "),partOfSystemRelations:je}}}),He=(ne||Ke).find(Ue=>Ue.title==="Type");He&&(He.hidden=!We);const ke=Le.length>20;return m.createElement(s.Table,{isLoading:M,columns:ne||Ke,options:{paging:ke,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!M,padding:"dense",pageSizeOptions:[20,50,100],...I},title:`${fe} (${ee.length})`,data:Le,actions:w||ye})};R.columns=d},47851:function(_,i,e){"use strict";e.d(i,{_Z:function(){return h},jU:function(){return l},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),l=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"catalog"})},40749:function(_,i,e){"use strict";e.d(i,{rG:function(){return r},Y2:function(){return B},J$:function(){return d},g2:function(){return l}});var r;(function(O){const M="DENY";O.DENY=M;const k="ALLOW";O.ALLOW=k;const ee="CONDITIONAL";O.CONDITIONAL=ee})(r||(r={}));function t(O,M){return O.name===M.name}function l(O,M){return"resourceType"in O?!M||O.resourceType===M:!1}function h(O){return O.attributes.action==="create"}function v(O){return O.attributes.action==="read"}function m(O){return O.attributes.action==="update"}function a(O){return O.attributes.action==="delete"}function s(O){return{authorize:async(M,k)=>await O.authorize(M,k),authorizeConditional(M,k){const ee=M;return O.authorize(ee,k)}}}function d({name:O,attributes:M,resourceType:k}){return k?{type:"resource",name:O,attributes:M,resourceType:k}:{type:"basic",name:O,attributes:M}}var y=e(10179),u=e(96279),A=e.n(u),T=e(9571),R=e(30195);const D=R.z.lazy(()=>R.z.object({rule:R.z.string(),resourceType:R.z.string(),params:R.z.array(R.z.unknown())}).or(R.z.object({anyOf:R.z.array(D).nonempty()})).or(R.z.object({allOf:R.z.array(D).nonempty()})).or(R.z.object({not:D}))),ne=R.z.object({result:R.z.literal(r.ALLOW).or(R.z.literal(r.DENY))}),w=R.z.union([R.z.object({result:R.z.literal(r.ALLOW).or(R.z.literal(r.DENY))}),R.z.object({result:R.z.literal(r.CONDITIONAL),pluginId:R.z.string(),resourceType:R.z.string(),conditions:D})]),I=(O,M)=>R.z.object({items:R.z.array(R.z.intersection(R.z.object({id:R.z.string()}),O)).refine(k=>k.length===M.size&&k.every(({id:ee})=>M.has(ee)),{message:"Items in response do not match request"})});class B{constructor(M){q(this,"enabled");q(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,ne,k)}async authorizeConditional(M,k){return this.makeRequest(M,w,k)}async makeRequest(M,k,ee){if(!this.enabled)return M.map(He=>({result:r.ALLOW}));const Se={items:M.map(He=>({id:T.Z(),...He}))},Ke=await this.discovery.getBaseUrl("permission"),We=await A()(`${Ke}/authorize`,{method:"POST",body:JSON.stringify(Se),headers:{...this.getAuthorizationHeader(ee==null?void 0:ee.token),"content-type":"application/json"}});if(!We.ok)throw await y.VL.fromResponse(We);const fe=await We.json(),Le=I(k,new Set(Se.items.map(({id:He})=>He))).parse(fe).items.reduce((He,ke)=>(He[ke.id]=ke,He),{});return Se.items.map(He=>Le[He.id])}getAuthorizationHeader(M){return M?{Authorization:`Bearer ${M}`}:{}}}},68099:function(_,i,e){"use strict";e.d(i,{iM:function(){return v},RV:function(){return l},gI:function(){return a}});var r=e(2784),t=e(36964);const l=(0,t.createApiRef)({id:"plugin.permission.api"});var h=e(40749);class v{constructor(y,u){this.permissionClient=y,this.identityApi=u}static create(y){const{config:u,discovery:A,identity:T}=y,R=new h.Y2({discovery:A,config:u});return new v(R,T)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var m=e(49857);function a(d){const y=(0,t.useApi)(l),{data:u,error:A}=(0,m.ZP)(d,async T=>{if((0,h.g2)(T.permission)&&!T.resourceRef)return h.rG.DENY;const{result:R}=await y.authorize(T);return R});return A?{error:A,loading:!1,allowed:!1}:u===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:u===h.rG.ALLOW}}const s=d=>{const{permission:y,resourceRef:u,errorComponent:A,...T}=d,R=usePermission(isResourcePermission(y)?{permission:y,resourceRef:u}:{permission:y}),D=useApp(),{NotFoundErrorPage:ne}=D.getComponents();let w=A===void 0?React.createElement(ne,null):A;return R.loading?w=null:R.allowed&&(w=d.element),React.createElement(Route,{...T,element:w})}},47955:function(_,i,e){"use strict";e.d(i,{Zz:function(){return v},oZ:function(){return fe},DR:function(){return m},ZS:function(){return O},KY:function(){return s},$L:function(){return A},x1:function(){return M}});var r=e(2784),t=e(10289),l=e(36964);const h="techdocs.addons.addon.v1",v="techdocs.addons.wrapper.v1",m=()=>null;(0,l.attachComponentData)(m,v,!0);const a=ye=>`${h}.${ye.toLocaleLowerCase("en-US")}`;function s(ye){const{name:Le,component:He}=ye;return(0,l.createReactExtension)({name:Le,component:{sync:ke=>r.createElement(He,{...ke})},data:{[h]:ye,[a(Le)]:!0}})}const d=(ye,Le)=>ye.selectByComponentData({key:Le}).getElements()[0],y=ye=>ye.selectByComponentData({key:v}).selectByComponentData({key:h}),u=ye=>ye.selectByComponentData({key:v}).findComponentData({key:h}),A=()=>{const ye=(0,t.pC)(),Le=(0,l.useElementFilter)(ye,y),He=(0,l.useElementFilter)(ye,u),ke=(0,r.useCallback)(Te=>{var je;if(!Le||!Te)return null;const Ue=a(Te.name);return(je=d(Le,Ue))!=null?je:null},[Le]),et=(0,r.useCallback)(Te=>{const Ue=He.find(je=>je.name===Te);return Ue?ke(Ue):null},[He,ke]),tt=(0,r.useCallback)(Te=>{const Ue=He.filter(je=>je.location===Te);return Ue.length?Ue.map(ke):null},[He,ke]);return{renderComponentByName:et,renderComponentsByLocation:tt}},T=(0,l.createApiRef)({id:"plugin.techdocs.service"});var R=e(64279),D=e(48023),ne=e(76241);const w=(ye,Le)=>(0,D.eE)(ye)===(0,D.eE)(Le),I={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},B=(0,ne.CT)("techdocs-reader-page-context"),O=(0,r.memo)(({entityRef:ye,children:Le})=>{const He=(0,l.useApi)(T),ke=(0,R.default)(async()=>He.getTechDocsMetadata(ye),[ye]),et=(0,R.default)(async()=>He.getEntityMetadata(ye),[ye]),[tt,Te]=(0,r.useState)(I.title),[Ue,je]=(0,r.useState)(I.subtitle),[Je,vt]=(0,r.useState)(I.shadowRoot),Dt={metadata:ke,entityRef:ye,entityMetadata:et,shadowRoot:Je,setShadowRoot:vt,title:tt,setTitle:Te,subtitle:Ue,setSubtitle:je},ct=(0,ne.EI)({1:Dt});return r.createElement(B.Provider,{value:ct},Le instanceof Function?Le(Dt):Le)},(ye,Le)=>w(ye.entityRef,Le.entityRef)),M=()=>{const ye=(0,r.useContext)(B);if(ye===void 0)return I;const Le=ye.atVersion(1);if(Le===void 0)throw new Error("No context found for version 1.");return Le};var k=e(54073);const ee=()=>{const{shadowRoot:ye}=useTechDocsReaderPage();return ye},Se=ye=>{const Le=ee();return Le?ye.map(He=>Le==null?void 0:Le.querySelectorAll(He)).filter(He=>He.length).map(He=>Array.from(He)).flat():[]},Ke=ye=>ye.toString()&&ye.rangeCount&&ye.getRangeAt(0).getBoundingClientRect().top,We=(ye=0)=>{const Le=ee(),[He,ke]=useState(null),et=useMemo(()=>debounce(()=>{const tt=Le,Te=tt.getSelection?tt.getSelection():document.getSelection();Te&&Ke(Te)?ke(Te):ke(null)},ye),[Le,ke,ye]);return useEffect(()=>(window.document.addEventListener("selectionchange",et),()=>window.document.removeEventListener("selectionchange",et)),[et]),He},fe=Object.freeze({Header:"Header",Subheader:"Subheader",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"})},94067:function(_,i,e){"use strict";e.r(i),e.d(i,{EmbeddedDocsRouter:function(){return ne},Router:function(){return D},isTechDocsAvailable:function(){return R}});var r=e(2784),t=e(10289),l=e(49208),h=e(53479),v=e(9118),m=e(48023),a=e(20961),s=e(16172),d=e(28626);const y=({entity:w})=>{const I=(0,m.iB)(w);return r.createElement(a.I6,{entityRef:I},r.createElement(s.b,null),r.createElement(d.Fq,{withSearch:!1}))};var u=e(50021),A=e(26220);const T="backstage.io/techdocs-ref",R=w=>{var I,B;return Boolean((B=(I=w==null?void 0:w.metadata)==null?void 0:I.annotations)==null?void 0:B[T])},D=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(u.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(A.TechDocsReaderPage,null)})),ne=w=>{var M;const{children:I}=w,{entity:B}=(0,h.useEntity)();return((M=B.metadata.annotations)==null?void 0:M[T])?r.createElement(l.FlatRoutes,null,r.createElement(t.AW,{path:"/*",element:r.createElement(y,{entity:B})},I)):r.createElement(v.MissingAnnotationEmptyState,{annotation:T})}},3337:function(_,i,e){"use strict";e.d(i,{D:function(){return t},g:function(){return l}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),l=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(_,i,e){"use strict";e.d(i,{k:function(){return v},p:function(){return h}});var r=e(10179),t=e(76372),l=e.n(t);class h{constructor(a){q(this,"configApi");q(this,"discoveryApi");q(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(a){const{kind:s,namespace:d,name:y}=a,A=`${await this.getApiOrigin()}/metadata/techdocs/${d}/${s}/${y}`,T=await this.fetchApi.fetch(`${A}`);if(!T.ok)throw await r.VL.fromResponse(T);return await T.json()}async getEntityMetadata(a){const{kind:s,namespace:d,name:y}=a,A=`${await this.getApiOrigin()}/metadata/entity/${d}/${s}/${y}`,T=await this.fetchApi.fetch(`${A}`);if(!T.ok)throw await r.VL.fromResponse(T);return await T.json()}}class v{constructor(a){q(this,"configApi");q(this,"discoveryApi");q(this,"identityApi");q(this,"fetchApi");this.configApi=a.configApi,this.discoveryApi=a.discoveryApi,this.identityApi=a.identityApi,this.fetchApi=a.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var a;return(a=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?a:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(a,s){const{kind:d,namespace:y,name:u}=a,T=`${await this.getStorageUrl()}/${y}/${d}/${u}/${s}`,R=await this.fetchApi.fetch(`${T.endsWith("/")?T:`${T}/`}index.html`);let D="";switch(R.status){case 404:throw D="Page not found. ",s||(D+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(D);case 500:throw D="Could not generate documentation or an error in the TechDocs backend. ",new Error(D);default:break}return R.text()}async syncEntityDocs(a,s=()=>{}){const{kind:d,namespace:y,name:u}=a,T=`${await this.getApiOrigin()}/sync/${y}/${d}/${u}`,{token:R}=await this.identityApi.getCredentials();return new Promise((D,ne)=>{const w=new t.EventSourcePolyfill(T,{withCredentials:!0,headers:R?{Authorization:`Bearer ${R}`}:{}});w.addEventListener("log",I=>{I.data&&s(JSON.parse(I.data))}),w.addEventListener("finish",I=>{let B=!1;I.data&&({updated:B}=JSON.parse(I.data)),D(B?"updated":"cached")}),w.onerror=I=>{switch(w.close(),I.status){case 404:ne(new r.dR(I.message));return;default:ne(new Error(I.data));return}}})}async getBaseUrl(a,s,d){const{kind:y,namespace:u,name:A}=s,R=`${await this.getApiOrigin()}/static/docs/${u}/${y}/${A}/${d}`;return new URL(a,R.endsWith("/")?R:`${R}/`).toString()}}},97589:function(_,i,e){"use strict";e.d(i,{D:function(){return r}});function r(t,l){return l.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(_,i,e){"use strict";e.d(i,{u:function(){return a}});var r=e(2784),t=e(9118),l=e(53479),h=e(1114),v=e(70335),m=e(21956);const a=s=>{const{initialFilter:d="all",columns:y,actions:u}=s;return r.createElement(h.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(l.EntityListProvider,null,r.createElement(l.CatalogFilterLayout,null,r.createElement(l.CatalogFilterLayout.Filters,null,r.createElement(v.f,null),r.createElement(l.UserListPicker,{initialFilter:d}),r.createElement(l.EntityOwnerPicker,null),r.createElement(l.EntityTagPicker,null)),r.createElement(l.CatalogFilterLayout.Content,null,r.createElement(m.EntityListDocsTable,{actions:u,columns:y}))))))}},51016:function(_,i,e){"use strict";e.d(i,{f:function(){return y}});var r=e(68725),t=e(97589),l=e(36964),h=e(9118),v=e(94339),m=e(16111),a=e(24579),s=e(14503),d=e(2784);const y=T=>{const{entities:R}=T,D=(0,l.useRouteRef)(r.Fw),ne=(0,l.useApi)(l.configApiRef);return R?d.createElement(h.ItemCardGrid,{"data-testid":"docs-explore"},R!=null&&R.length?R.map((w,I)=>{var B,O;return d.createElement(v.Z,{key:I},d.createElement(m.Z,null,d.createElement(h.ItemCardHeader,{title:(B=w.metadata.title)!=null?B:w.metadata.name})),d.createElement(a.Z,null,w.metadata.description),d.createElement(s.Z,null,d.createElement(h.Button,{to:D({namespace:(0,t.D)((O=w.metadata.namespace)!=null?O:"default",ne),kind:(0,t.D)(w.kind,ne),name:(0,t.D)(w.metadata.name,ne)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var u=e(53479);const A=()=>{const{loading:T,error:R,entities:D}=useEntityList();return R?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:R.toString()})):T||!D?React.createElement(Progress,null):(D.sort((ne,w)=>{var I,B;return((I=ne.metadata.title)!=null?I:ne.metadata.name).localeCompare((B=w.metadata.title)!=null?B:w.metadata.name)}),React.createElement(DocsCardGrid,{entities:D}))}},38634:function(_,i,e){"use strict";e.d(i,{H:function(){return u}});var r=e(2784),t=e(95074),l=e(36964),h=e(48023),v=e(53479),m=e(68725),a=e(9118),s=e(98095),d=e(3792),y=e(97589);const u=A=>{const{entities:T,title:R,loading:D,columns:ne,actions:w}=A,[,I]=(0,t.Z)(),B=(0,l.useRouteRef)(m.Fw),O=(0,l.useApi)(l.configApiRef);if(!T)return null;const M=T.map(Se=>{var We;const Ke=(0,v.getEntityRelations)(Se,h.S4);return{entity:Se,resolved:{docsUrl:B({namespace:(0,y.D)((We=Se.metadata.namespace)!=null?We:"default",O),kind:(0,y.D)(Se.kind,O),name:(0,y.D)(Se.metadata.name,O)}),ownedByRelations:Ke,ownedByRelationsTitle:Ke.map(fe=>(0,v.humanizeEntityRef)(fe,{defaultKind:"group"})).join(", ")}}}),k=[d.N.createNameColumn(),d.N.createOwnerColumn(),d.N.createTypeColumn()],ee=[s.n.createCopyDocsUrlAction(I)];return r.createElement(r.Fragment,null,D||M&&M.length>0?r.createElement(a.Table,{isLoading:D,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:M,columns:ne||k,actions:w||ee,title:R?`${R} (${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")}))};u.columns=d.N,u.actions=s.n},12481:function(_,i,e){"use strict";e.d(i,{n:function(){return y}});var r=e(2784),t=e(95074),l=e(76635),h=e.n(l),v=e(9118),m=e(53479),a=e(38634),s=e(98095),d=e(3792);const y=u=>{var ee,Se;const{columns:A,actions:T}=u,{loading:R,error:D,entities:ne,filters:w}=(0,m.useEntityList)(),{isStarredEntity:I,toggleStarredEntity:B}=(0,m.useStarredEntities)(),[,O]=(0,t.Z)(),M=(0,l.capitalize)((Se=(ee=w.user)==null?void 0:ee.value)!=null?Se:"all"),k=[s.n.createCopyDocsUrlAction(O),s.n.createStarEntityAction(I,B)];return D?r.createElement(v.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(v.CodeSnippet,{language:"text",text:D.toString()})):r.createElement(a.H,{title:M,entities:ne,loading:R,actions:T||k,columns:A})};y.columns=d.N,y.actions=s.n},98095:function(_,i,e){"use strict";e.d(i,{n:function(){return a}});var r=e(2784),t=e(39981),l=e(2337),h=e(11640),v=e(28347);const m=(0,l.Z)({root:{color:"#f3ba37"}})(h.Z),a={createCopyDocsUrlAction(s){return d=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>s(`${window.location.origin}${d.resolved.docsUrl}`)})},createStarEntityAction(s,d){return({entity:y})=>{const u=s(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>u?r.createElement(m,null):r.createElement(v.Z,null),tooltip:u?"Remove from favorites":"Add to favorites",onClick:()=>d(y)}}}}},3792:function(_,i,e){"use strict";e.d(i,{N:function(){return v}});var r=e(2784),t=e(9118),l=e(53479);function h(m){return m.metadata.title||m.metadata.name}const v={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:m=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:m.resolved.docsUrl},h(m.entity)),subvalue:m.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:m})=>r.createElement(l.EntityRefLinks,{entityRefs:m.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(_,i,e){"use strict";e.d(i,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),l=e(72580),h=e.n(l);e.o(l,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return l.DefaultTechDocsHome}})},72580:function(){},50021:function(_,i,e){"use strict";e.r(i),e.d(i,{TechDocsIndexPage:function(){return h}});var r=e(2784),t=e(10289),l=e(2546);const h=()=>(0,t.pC)()||r.createElement(l.u,null)},1114:function(_,i,e){"use strict";e.d(i,{j:function(){return h}});var r=e(2784),t=e(9118),l=e(36964);const h=v=>{var d;const{children:m}=v,s=`Documentation available in ${(d=(0,l.useApi)(l.configApiRef).getOptionalString("organization.name"))!=null?d:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:s,themeId:"documentation"},m)}},70335:function(_,i,e){"use strict";e.d(i,{f:function(){return h}});var r=e(2784),t=e(53479);class l{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const h=()=>{const{updateFilters:v}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{v({techdocs:new l})},[v]),null}},19192:function(_,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return l.u}});var r=e(51016),t=e(21956),l=e(2546),h=e(1114),v=e(70335)},82250:function(_,i,e){"use strict";e.d(i,{DefaultTechDocsHome:function(){return a.DefaultTechDocsHome},TechDocsIndexPage:function(){return s.Jl},TechDocsReaderPage:function(){return s.I6},TechDocsReaderPageContent:function(){return v.Fq},TechDocsReaderPageHeader:function(){return v.SE},plugin:function(){return s.s4},techdocsApiRef:function(){return l.g},techdocsPlugin:function(){return s.s4},techdocsStorageApiRef:function(){return l.D}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(i,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(i,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(i,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}}),e.o(r,"techdocsApiRef")&&e.d(i,{techdocsApiRef:function(){return r.techdocsApiRef}}),e.o(r,"techdocsStorageApiRef")&&e.d(i,{techdocsStorageApiRef:function(){return r.techdocsStorageApiRef}});var l=e(3337),h=e(42723),v=e(96393),m=e(10459),a=e(19192),s=e(20961),d=e(94067)},20961:function(_,i,e){"use strict";e.d(i,{I6:function(){return y},Jl:function(){return d},s4:function(){return v}});var r=e(3337),t=e(42723),l=e(68725),h=e(36964);const v=(0,h.createPlugin)({id:"techdocs",apis:[(0,h.createApiFactory)({api:r.D,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,identityApi:h.identityApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,identityApi:T,fetchApi:R})=>new t.k({configApi:u,discoveryApi:A,identityApi:T,fetchApi:R})}),(0,h.createApiFactory)({api:r.g,deps:{configApi:h.configApiRef,discoveryApi:h.discoveryApiRef,fetchApi:h.fetchApiRef},factory:({configApi:u,discoveryApi:A,fetchApi:T})=>new t.p({configApi:u,discoveryApi:A,fetchApi:T})})],routes:{root:l._Z,docRoot:l.Fw,entityContent:l.pd}}),m=v.provide((0,h.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.Router),mountPoint:l._Z})),a=v.provide((0,h.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(u=>u.EmbeddedDocsRouter),mountPoint:l.pd})),s=v.provide((0,h.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(u=>u.TechDocsCustomHome),mountPoint:l._Z})),d=v.provide((0,h.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(u=>u.TechDocsIndexPage),mountPoint:l._Z})),y=v.provide((0,h.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(u=>u.TechDocsReaderPage),mountPoint:l.Fw}))},26220:function(_,i,e){"use strict";e.r(i),e.d(i,{TechDocsReaderLayout:function(){return s},TechDocsReaderPage:function(){return d}});var r=e(2784),t=e(10289),l=e(9118),h=e(47955),v=e(28626),m=e(99954),a=e(16172);const s=({withSearch:y,withHeader:u=!0})=>r.createElement(l.Page,{themeId:"documentation"},u&&r.createElement(m.S,null),r.createElement(a.b,null),r.createElement(v.Fq,{withSearch:y})),d=y=>{const{kind:u,name:A,namespace:T}=(0,t.UO)(),{children:R,entityRef:D={kind:u,name:A,namespace:T}}=y,ne=(0,t.pC)();if(!R){const I=(ne?r.Children.toArray(ne.props.children):[]).find(B=>{var M,k;const{type:O}=B;return!((k=(M=O==null?void 0:O.__backstage_data)==null?void 0:M.map)!=null&&k.get(h.Zz))});return r.createElement(h.ZS,{entityRef:D},I||r.createElement(s,null))}return r.createElement(h.ZS,{entityRef:D},({metadata:w,entityMetadata:I,onReady:B})=>r.createElement(l.Page,{themeId:"documentation"},R instanceof Function?R({entityRef:D,techdocsMetadataValue:w.value,entityMetadataValue:I.value,onReady:B}):R))}},28626:function(_,i,e){"use strict";e.d(i,{Fq:function(){return lt},DK:function(){return Se}});var r=e(2784),t=e(36617),l=e(79692),h=e(60905),v=e(8560),m=e(50236),a=e(19219),s=e(47955),d=e(9118),y=e(10459),u=e(23738),A=e(10289),T=e(60364),R=e(41128),D=e(36964),ne=e(36356),w=e(3337),I=e(64279),B=e(77446);function O({contentLoading:S,content:H,activeSyncState:F}){return S||F==="BUILD_READY_RELOAD"||!H&&F==="CHECKING"?"CHECKING":!H&&F==="BUILDING"?"INITIAL_BUILD":H?F==="BUILDING"?"CONTENT_STALE_REFRESHING":F==="BUILD_READY"?"CONTENT_STALE_READY":F==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function M(S,H){const F={...S};switch(H.type){case"sync":H.state==="CHECKING"&&(F.buildLog=[]),F.activeSyncState=H.state,F.syncError=H.syncError;break;case"contentLoading":F.contentLoading=!0,F.contentError=void 0;break;case"content":typeof H.path=="string"&&(F.path=H.path),F.contentLoading=!1,F.content=H.content,F.contentError=H.contentError;break;case"buildLog":F.buildLog=F.buildLog.concat(H.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(F.activeSyncState)&&["contentLoading","content"].includes(H.type)&&(F.activeSyncState="UP_TO_DATE",F.buildLog=[]),F}function k(S,H,F,se){var Ce,xe;const[de,U]=(0,r.useReducer)(M,{activeSyncState:"CHECKING",path:se,contentLoading:!0,buildLog:[]}),P=(0,D.useApi)(w.D),{retry:Q}=(0,B.Z)(async()=>{U({type:"contentLoading"});try{const we=await P.getEntityDocs({kind:S,namespace:H,name:F},se);return U({type:"content",content:we,path:se}),we}catch(we){U({type:"content",contentError:we,path:se})}},[P,S,H,F,se]),le=(0,r.useRef)({content:void 0,reload:()=>{}});return le.current={content:de.content,reload:Q},(0,I.default)(async()=>{U({type:"sync",state:"CHECKING"});const we=setTimeout(()=>{U({type:"sync",state:"BUILDING"})},1e3);try{switch(await P.syncEntityDocs({kind:S,namespace:H,name:F},Et=>{U({type:"buildLog",log:Et})})){case"updated":le.current.content?U({type:"sync",state:"BUILD_READY"}):(le.current.reload(),U({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":U({type:"sync",state:"UP_TO_DATE"});break;default:U({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(ut){U({type:"sync",state:"ERROR",syncError:ut})}finally{clearTimeout(we)}},[S,F,H,P,U,le]),{state:(0,r.useMemo)(()=>O({activeSyncState:de.activeSyncState,contentLoading:de.contentLoading,content:de.content}),[de.activeSyncState,de.content,de.contentLoading]),contentReload:Q,path:de.path,content:de.content,contentErrorMessage:(Ce=de.contentError)==null?void 0:Ce.toString(),syncErrorMessage:(xe=de.syncError)==null?void 0:xe.toString(),buildLog:de.buildLog}}const ee=(0,r.createContext)({}),Se=()=>(0,r.useContext)(ee),Ke=({children:S})=>{const{"*":H=""}=(0,A.UO)(),{entityRef:F}=(0,s.x1)(),{kind:se,namespace:de,name:U}=F,P=k(se,de,U,H);return r.createElement(ee.Provider,{value:P},S instanceof Function?S(P):S)},We=S=>H=>r.createElement(Ke,null,r.createElement(S,{...H})),fe=(S,H,F)=>{const se=S==="src"&&H.endsWith(".svg"),de=!H.match(/^([a-z]*:)?\/\//i),U=H.startsWith(F);return se&&(de||U)},ye=({techdocsStorageApi:S,entityId:H,path:F})=>async se=>{const de=await S.getApiOrigin(),U=async(P,Q)=>{for(const le of P)if(le.hasAttribute(Q)){const ue=le.getAttribute(Q);if(!ue)return;const Ce=await S.getBaseUrl(ue,H,F);if(fe(Q,ue,de))try{const we=await(await fetch(Ce,{credentials:"include"})).text();le.setAttribute(Q,`data:image/svg+xml;base64,${btoa(we)}`)}catch{le.setAttribute("alt",`Error: ${ue}`)}else le.setAttribute(Q,Ce)}};return await Promise.all([U(se.querySelectorAll("img"),"src"),U(se.querySelectorAll("script"),"src"),U(se.querySelectorAll("source"),"src"),U(se.querySelectorAll("link"),"href"),U(se.querySelectorAll("a[download]"),"href")]),se};var Le=e(86574),He=e(67097),ke=e(47093),et=e(82717),tt=e.n(et);const Te=S=>H=>{const F=H.querySelector('[title="Edit this page"]');if(!F||!F.href)return H;const se=new URL(F.href),de=S.byUrl(se);if((de==null?void 0:de.type)!=="github"&&(de==null?void 0:de.type)!=="gitlab")return H;const U=H.querySelector("article>h1").childNodes[0].textContent,P=encodeURIComponent(`Documentation Feedback: ${U}`),Q=encodeURIComponent(`Page source:
32
- ${F.href}
33
-
34
- Feedback:`),le=(de==null?void 0:de.type)==="github"?(0,Le.Pb)(se.href,"blob"):se.href,ue=tt()(le),Ce=`/${ue.organization}/${ue.name}`,xe=F.cloneNode();switch(de==null?void 0:de.type){case"gitlab":xe.href=`${se.origin}${Ce}/issues/new?issue[title]=${P}&issue[description]=${Q}`;break;case"github":xe.href=`${se.origin}${Ce}/issues/new?title=${P}&body=${Q}`;break;default:return H}return ke.render(r.createElement(He.Z),xe),xe.style.paddingLeft="5px",xe.title="Leave feedback for this page",xe.id="git-feedback-link",F==null||F.insertAdjacentElement("beforebegin",xe),H};var Ue=e(44882);const je=()=>S=>{const H=S.querySelector('.md-header label[for="__drawer"]'),F=S.querySelector("article");if(!H||!F)return S;const se=H.cloneNode();return ke.render(r.createElement(Ue.Z),se),se.id="toggle-sidebar",se.title="Toggle Sidebar",se.classList.add("md-content__button"),se.style.setProperty("padding","0 0 0 5px"),se.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),F==null||F.prepend(se),S},Je=()=>S=>(((F,se)=>{Array.from(F).filter(de=>de.hasAttribute(se)).forEach(de=>{const U=de.getAttribute(se);if(U){U.match(/^https?:\/\//i)&&de.setAttribute("target","_blank");try{const P=vt(window.location.href);de.setAttribute(se,new URL(U,P).toString())}catch{de.replaceWith(de.textContent||U)}}})})(Array.from(S.getElementsByTagName("a")),"href"),S);function vt(S){const H=new URL(S);return!H.pathname.endsWith("/")&&!H.pathname.endsWith(".html")&&(H.pathname+="/"),H.toString()}const Dt=({baseUrl:S,onClick:H})=>F=>(Array.from(F.getElementsByTagName("a")).forEach(se=>{se.addEventListener("click",de=>{const P=se.getAttribute("href");!P||P.startsWith(S)&&!se.hasAttribute("download")&&(de.preventDefault(),H(de,P))})}),F);var ct=e(15459),Pt=e(80030),Ft=e(72379),It=e(41547);const Nt=(0,ct.Z)(S=>({tooltip:{fontSize:"inherit",color:S.palette.text.primary,margin:0,padding:S.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Pt.ZP),wt=()=>r.createElement(Ft.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"})),Wt=({text:S})=>{const[H,F]=(0,r.useState)(!1),se=(0,r.useCallback)(()=>{navigator.clipboard.writeText(S),F(!0)},[S]),de=(0,r.useCallback)(()=>{F(!1)},[F]);return r.createElement(Nt,{title:"Copied to clipboard",placement:"left",open:H,onClose:de,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:se},r.createElement(wt,null)))},tn=S=>H=>{var se;const F=H.querySelectorAll("pre > code");for(const de of F){const U=de.textContent||"",P=document.createElement("div");(se=de==null?void 0:de.parentElement)==null||se.prepend(P),ke.render(r.createElement(It.Z,{theme:S},r.createElement(Wt,{text:U})),P)}return H},$t=()=>S=>{var H;return(H=S.querySelector(".md-header"))==null||H.remove(),S},mt=()=>S=>{var H,F;return(H=S.querySelector(".md-footer .md-copyright"))==null||H.remove(),(F=S.querySelector(".md-footer-copyright"))==null||F.remove(),S},nn=({docStorageUrl:S,onLoading:H,onLoaded:F})=>se=>{const de=Array.from(se.querySelectorAll('head > link[rel="stylesheet"]')).filter(P=>{var Q;return(Q=P.getAttribute("href"))==null?void 0:Q.startsWith(S)});let U=de.length;return U>0&&H(se),de.forEach(P=>P.addEventListener("load",()=>{U-=1,U===0&&F(se)})),se};var ae=e(35368),j=e.n(ae);const ie=/main\.[A-Fa-f0-9]{8}\.min\.css$/,ce=/^https:\/\/fonts\.googleapis\.com/,pe=/^https:\/\/fonts\.gstatic\.com/,Oe=S=>{if(S.nodeName&&S.nodeName==="LINK"){const H=S.getAttribute("href")||"";H.match(ie)&&S.setAttribute("rel","stylesheet"),H.match(ce)&&S.setAttribute("rel","stylesheet"),H.match(pe)&&S.setAttribute("rel","preconnect")}return S},Ze=S=>H=>{if(H.nodeName==="IFRAME"){const F=H.getAttribute("src");if(!F)return H.remove(),H;try{const se=new URL(F);S.some(U=>se.host===U)||H.remove()}catch(se){console.warn(`Invalid iframe src, ${se}`),H.remove()}}return H},Ae=S=>{const H=(S==null?void 0:S.getOptionalStringArray("allowedIframeHosts"))||[];return F=>{j().addHook("afterSanitizeAttributes",Oe);const se=["link"];return H.length>0&&(j().addHook("beforeSanitizeElements",Ze(H)),se.push("iframe")),j().sanitize(F.innerHTML,{ADD_TAGS:se,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})}},Ve=({css:S})=>H=>(H.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${S}</style>`),H),dt=()=>S=>(setTimeout(()=>{var H;if(window.location.hash){const F=window.location.hash.slice(1);(H=S==null?void 0:S.querySelector(`[id="${F}"]`))==null||H.scrollIntoView()}},200),S),At=async(S,H)=>{let F;if(typeof S=="string")F=new DOMParser().parseFromString(S,"text/html").documentElement;else if(S instanceof Element)F=S;else throw new Error("dom is not a recognized type");for(const se of H)F=await se(F);return F},gt=["h1","h2","h3","h4","h5","h6"],rt=S=>{const H=(0,A.s0)(),F=(0,T.Z)(),se=(0,D.useApi)(w.D),de=(0,D.useApi)(ne.q3),U=(0,D.useApi)(D.configApiRef),{namespace:P,kind:Q,name:le}=S,{state:ue,path:Ce,content:xe}=Se(),we=F.palette.type==="dark",[ut,Et]=(0,r.useState)(),[nt,it]=(0,r.useState)(null),{isPinned:Ct}=(0,r.useContext)(d.SidebarPinStateContext),Ye=(0,r.useCallback)(()=>{if(!nt||!ut)return;const N=nt.querySelector(".md-container > .md-tabs"),G=window.matchMedia("screen and (max-width: 76.1875em)").matches,Pe=Math.max(nt.getBoundingClientRect().top,0);ut.forEach(Ee=>{G?Ee.style.top="0px":N?Ee.style.top=`${Pe+N.getBoundingClientRect().height}px`:Ee.style.top=`${Pe}px`})},[nt,ut]);(0,r.useEffect)(()=>(Ye(),window.addEventListener("scroll",Ye,!0),window.addEventListener("resize",Ye),()=>{window.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",Ye)}),[Ye,ue]);const V=(0,r.useCallback)(()=>{if(!nt)return;const N=nt.querySelector(".md-footer");N&&(N.style.width=`${nt.getBoundingClientRect().width}px`)},[nt]);(0,r.useEffect)(()=>(V(),window.addEventListener("resize",V),()=>{window.removeEventListener("resize",V)}));const p=(0,r.useCallback)((N,G)=>At(N,[Ae(U.getOptionalConfig("techdocs.sanitizer")),ye({techdocsStorageApi:se,entityId:{kind:Q,name:le,namespace:P},path:G}),Je(),je(),$t(),mt(),Te(de),Ve({css:`
35
- /*
36
- As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
37
- As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
38
- */
39
- :host {
40
- /* FONT */
41
- --md-default-fg-color: ${F.palette.text.primary};
42
- --md-default-fg-color--light: ${F.palette.text.secondary};
43
- --md-default-fg-color--lighter: ${(0,R.$n)(F.palette.text.secondary,.7)};
44
- --md-default-fg-color--lightest: ${(0,R.$n)(F.palette.text.secondary,.3)};
45
-
46
- /* BACKGROUND */
47
- --md-default-bg-color:${F.palette.background.default};
48
- --md-default-bg-color--light: ${F.palette.background.paper};
49
- --md-default-bg-color--lighter: ${(0,R.$n)(F.palette.background.paper,.7)};
50
- --md-default-bg-color--lightest: ${(0,R.$n)(F.palette.background.paper,.3)};
51
-
52
- /* PRIMARY */
53
- --md-primary-fg-color: ${F.palette.primary.main};
54
- --md-primary-fg-color--light: ${F.palette.primary.light};
55
- --md-primary-fg-color--dark: ${F.palette.primary.dark};
56
- --md-primary-bg-color: ${F.palette.primary.contrastText};
57
- --md-primary-bg-color--light: ${(0,R.$n)(F.palette.primary.contrastText,.7)};
58
-
59
- /* ACCENT */
60
- --md-accent-fg-color: var(--md-primary-fg-color);
61
-
62
- /* SHADOW */
63
- --md-shadow-z1: ${F.shadows[1]};
64
- --md-shadow-z2: ${F.shadows[2]};
65
- --md-shadow-z3: ${F.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: ${F.palette.text.primary};
102
- --md-code-bg-color: ${F.palette.background.paper};
103
- --md-code-hl-color: ${(0,R.Fq)(F.palette.warning.main,.5)};
104
- --md-code-hl-keyword-color: ${we?F.palette.primary.light:F.palette.primary.dark};
105
- --md-code-hl-function-color: ${we?F.palette.secondary.light:F.palette.secondary.dark};
106
- --md-code-hl-string-color: ${we?F.palette.success.light:F.palette.success.dark};
107
- --md-code-hl-number-color: ${we?F.palette.error.light:F.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: ${F.palette.text.primary};
122
- --md-typeset-del-color: ${we?(0,R.Fq)(F.palette.error.dark,.5):(0,R.Fq)(F.palette.error.light,.5)};
123
- --md-typeset-ins-color: ${we?(0,R.Fq)(F.palette.success.dark,.5):(0,R.Fq)(F.palette.success.light,.5)};
124
- --md-typeset-mark-color: ${we?(0,R.Fq)(F.palette.warning.dark,.5):(0,R.Fq)(F.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
- `}),Ve({css:`
141
- body {
142
- --md-text-color: var(--md-default-fg-color);
143
- --md-text-link-color: var(--md-accent-fg-color);
144
- --md-text-font-family: ${F.typography.fontFamily};
145
- font-family: var(--md-text-font-family);
146
- background-color: unset;
147
- }
148
- `}),Ve({css:`
149
- .md-grid {
150
- max-width: 100%;
151
- margin: 0;
152
- }
153
-
154
- .md-nav {
155
- font-size: calc(var(--md-typeset-font-size) * 0.9);
156
- }
157
- .md-nav__link {
158
- display: flex;
159
- align-items: center;
160
- justify-content: space-between;
161
- }
162
- .md-nav__icon {
163
- height: 20px !important;
164
- width: 20px !important;
165
- margin-left:${F.spacing(1)}px;
166
- }
167
- .md-nav__icon svg {
168
- margin: 0;
169
- width: 20px !important;
170
- height: 20px !important;
171
- }
172
- .md-nav__icon:after {
173
- width: 20px !important;
174
- height: 20px !important;
175
- }
176
-
177
- .md-main__inner {
178
- margin-top: 0;
179
- }
180
-
181
- .md-sidebar {
182
- bottom: 75px;
183
- position: fixed;
184
- width: 16rem;
185
- overflow-y: auto;
186
- overflow-x: hidden;
187
- scrollbar-color: rgb(193, 193, 193) #eee;
188
- scrollbar-width: thin;
189
- }
190
- .md-sidebar .md-sidebar__scrollwrap {
191
- width: calc(16rem - 10px);
192
- }
193
- .md-sidebar--secondary {
194
- right: ${F.spacing(3)}px;
195
- }
196
- .md-sidebar::-webkit-scrollbar {
197
- width: 5px;
198
- }
199
- .md-sidebar::-webkit-scrollbar-button {
200
- width: 5px;
201
- height: 5px;
202
- }
203
- .md-sidebar::-webkit-scrollbar-track {
204
- background: #eee;
205
- border: 1 px solid rgb(250, 250, 250);
206
- box-shadow: 0px 0px 3px #dfdfdf inset;
207
- border-radius: 3px;
208
- }
209
- .md-sidebar::-webkit-scrollbar-thumb {
210
- width: 5px;
211
- background: rgb(193, 193, 193);
212
- border: transparent;
213
- border-radius: 3px;
214
- }
215
- .md-sidebar::-webkit-scrollbar-thumb:hover {
216
- background: rgb(125, 125, 125);
217
- }
218
-
219
- .md-content {
220
- max-width: calc(100% - 16rem * 2);
221
- margin-left: 16rem;
222
- margin-bottom: 50px;
223
- }
224
-
225
- .md-footer {
226
- position: fixed;
227
- bottom: 0px;
228
- }
229
- .md-footer__title {
230
- background-color: unset;
231
- }
232
- .md-footer-nav__link {
233
- width: 16rem;
234
- }
235
-
236
- .md-dialog {
237
- background-color: unset;
238
- }
239
-
240
- @media screen and (min-width: 76.25em) {
241
- .md-sidebar {
242
- height: auto;
243
- }
244
- }
245
-
246
- @media screen and (max-width: 76.1875em) {
247
- .md-nav {
248
- transition: none !important;
249
- background-color: var(--md-default-bg-color)
250
- }
251
- .md-nav--primary .md-nav__title {
252
- cursor: auto;
253
- color: var(--md-default-fg-color);
254
- font-weight: 700;
255
- white-space: normal;
256
- line-height: 1rem;
257
- height: auto;
258
- display: flex;
259
- flex-flow: column;
260
- row-gap: 1.6rem;
261
- padding: 1.2rem .8rem .8rem;
262
- background-color: var(--md-default-bg-color);
263
- }
264
- .md-nav--primary .md-nav__title~.md-nav__list {
265
- box-shadow: none;
266
- }
267
- .md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
268
- border-top: none;
269
- }
270
- .md-nav--primary .md-nav__title .md-nav__button {
271
- display: none;
272
- }
273
- .md-nav--primary .md-nav__title .md-nav__icon {
274
- color: var(--md-default-fg-color);
275
- position: static;
276
- height: auto;
277
- margin: 0 0 0 -0.2rem;
278
- }
279
- .md-nav--primary > .md-nav__title [for="none"] {
280
- padding-top: 0;
281
- }
282
- .md-nav--primary .md-nav__item {
283
- border-top: none;
284
- }
285
- .md-nav--primary :is(.md-nav__title,.md-nav__item) {
286
- font-size : var(--md-typeset-font-size);
287
- }
288
- .md-nav .md-source {
289
- display: none;
290
- }
291
-
292
- .md-sidebar {
293
- height: 100%;
294
- }
295
- .md-sidebar--primary {
296
- width: 12.1rem !important;
297
- z-index: 200;
298
- left: ${Ct?"calc(-12.1rem + 242px)":"calc(-12.1rem + 72px)"} !important;
299
- }
300
- .md-sidebar--secondary:not([hidden]) {
301
- display: none;
302
- }
303
-
304
- .md-content {
305
- max-width: 100%;
306
- margin-left: 0;
307
- }
308
-
309
- .md-header__button {
310
- margin: 0.4rem 0;
311
- margin-left: 0.4rem;
312
- padding: 0;
313
- }
314
-
315
- .md-overlay {
316
- left: 0;
317
- }
318
-
319
- .md-footer {
320
- position: static;
321
- padding-left: 0;
322
- }
323
- .md-footer-nav__link {
324
- /* footer links begin to overlap at small sizes without setting width */
325
- width: 50%;
326
- }
327
- }
328
-
329
- @media screen and (max-width: 600px) {
330
- .md-sidebar--primary {
331
- left: -12.1rem !important;
332
- width: 12.1rem;
333
- }
334
- }
335
- `}),Ve({css:`
336
- .md-typeset {
337
- font-size: var(--md-typeset-font-size);
338
- }
339
-
340
- ${gt.reduce((Pe,Ee)=>{const $e=F.typography[Ee],{lineHeight:Xe,fontFamily:Rt,fontWeight:_t,fontSize:sn}=$e,Wn=bn=>{let cn=1;return typeof bn=="number"&&(cn=bn/16*.6),typeof bn=="string"&&(cn=bn.replace("rem","")),`calc(${cn} * var(--md-typeset-font-size))`};return Pe.concat(`
341
- .md-typeset ${Ee} {
342
- color: var(--md-default-fg-color);
343
- line-height: ${Xe};
344
- font-family: ${Rt};
345
- font-weight: ${_t};
346
- font-size: ${Wn(sn)};
347
- }
348
- `)},"")}
349
-
350
- .md-typeset .md-content__button {
351
- color: var(--md-default-fg-color);
352
- }
353
-
354
- .md-typeset hr {
355
- border-bottom: 0.05rem dotted ${F.palette.divider};
356
- }
357
-
358
- .md-typeset details {
359
- font-size: var(--md-typeset-font-size) !important;
360
- }
361
- .md-typeset details summary {
362
- padding-left: 2.5rem !important;
363
- }
364
- .md-typeset details summary:before,
365
- .md-typeset details summary:after {
366
- top: 50% !important;
367
- width: 20px !important;
368
- height: 20px !important;
369
- transform: rotate(0deg) translateY(-50%) !important;
370
- }
371
- .md-typeset details[open] > summary:after {
372
- transform: rotate(90deg) translateX(-50%) !important;
373
- }
374
-
375
- .md-typeset blockquote {
376
- color: var(--md-default-fg-color--light);
377
- border-left: 0.2rem solid var(--md-default-fg-color--light);
378
- }
379
-
380
- .md-typeset table:not([class]) {
381
- font-size: var(--md-typeset-font-size);
382
- border: 1px solid var(--md-default-fg-color);
383
- border-bottom: none;
384
- border-collapse: collapse;
385
- }
386
- .md-typeset table:not([class]) th {
387
- font-weight: bold;
388
- }
389
- .md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
390
- border-bottom: 1px solid var(--md-default-fg-color);
391
- }
392
-
393
- .md-typeset pre > code::-webkit-scrollbar-thumb {
394
- background-color: hsla(0, 0%, 0%, 0.32);
395
- }
396
- .md-typeset pre > code::-webkit-scrollbar-thumb:hover {
397
- background-color: hsla(0, 0%, 0%, 0.87);
398
- }
399
- `}),Ve({css:`
400
- /*
401
- Disable CSS animations on link colors as they lead to issues in dark mode.
402
- The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
403
- */
404
- .md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
405
- transition: none;
406
- }
407
- `}),Ve({css:`
408
- /* HIGHLIGHT */
409
- .highlight .md-clipboard:after {
410
- content: unset;
411
- }
412
-
413
- .highlight .nx {
414
- color: ${we?"#ff53a3":"#ec407a"};
415
- }
416
-
417
- /* CODE HILITE */
418
- .codehilite .gd {
419
- background-color: ${we?"rgba(248,81,73,0.65)":"#fdd"};
420
- }
421
-
422
- .codehilite .gi {
423
- background-color: ${we?"rgba(46,160,67,0.65)":"#dfd"};
424
- }
425
-
426
- /* TABBED */
427
- .tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
428
- .tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
429
- .tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
430
- .tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
431
- .tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
432
- .tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
433
- .tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
434
- .tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
435
- .tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
436
- .tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
437
- .tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
438
- .tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
439
- .tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
440
- .tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
441
- .tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
442
- .tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
443
- .tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
444
- .tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
445
- .tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
446
- .tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
447
- color: var(--md-accent-fg-color);
448
- border-color: var(--md-accent-fg-color);
449
- }
450
-
451
- /* TASK-LIST */
452
- .task-list-control .task-list-indicator::before {
453
- background-color: ${F.palette.action.disabledBackground};
454
- }
455
- .task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
456
- background-color: ${F.palette.success.main};
457
- }
458
-
459
- /* ADMONITION */
460
- .admonition {
461
- font-size: var(--md-typeset-font-size) !important;
462
- }
463
- .admonition .admonition-title {
464
- padding-left: 2.5rem !important;
465
- }
466
-
467
- .admonition .admonition-title:before {
468
- top: 50% !important;
469
- width: 20px !important;
470
- height: 20px !important;
471
- transform: translateY(-50%) !important;
472
- }
473
- `})]),[Q,le,P,de,U,se,F,we,Ct]),x=(0,r.useCallback)(async N=>At(N,[dt(),tn(F),Dt({baseUrl:window.location.origin,onClick:(G,Pe)=>{var Xe;const Ee=G.ctrlKey||G.metaKey,$e=new URL(Pe);$e.hash?Ee?window.open(`${$e.pathname}${$e.hash}`,"_blank"):(H(`${$e.pathname}${$e.hash}`),(Xe=N==null?void 0:N.querySelector(`#${$e.hash.slice(1)}`))==null||Xe.scrollIntoView()):Ee?window.open($e.pathname,"_blank"):H($e.pathname)}}),nn({docStorageUrl:await se.getApiOrigin(),onLoading:G=>{G.style.setProperty("opacity","0")},onLoaded:G=>{var Pe;G.style.removeProperty("opacity"),(Pe=G.querySelector(".md-nav__title"))==null||Pe.removeAttribute("for"),Et(Array.from(G.querySelectorAll(".md-sidebar")))}})]),[F,H,se]);return(0,r.useEffect)(()=>{if(!xe)return()=>{};let N=!0;return p(xe,Ce).then(async G=>{if(!(G!=null&&G.innerHTML)||!N)return;window.scroll({top:0});const Pe=await x(G);it(Pe)}),()=>{N=!1}},[xe,Ce,p,x]),nt},xt=(0,l.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),lt=We(S=>{const{withSearch:H=!0,onReady:F}=S,se=xt(),de=(0,s.$L)(),{entityRef:U,shadowRoot:P,setShadowRoot:Q}=(0,s.x1)(),le=rt(U),[ue,Ce]=(0,r.useState)((0,t.Ue)({...(0,m.Z)(),insertionPoint:void 0})),xe=(0,r.useCallback)(Ct=>{var V;if(!le||!Ct)return;Ce((0,t.Ue)({...(0,m.Z)(),insertionPoint:le.querySelector("head")||void 0}));const Ye=(V=Ct.shadowRoot)!=null?V:Ct.attachShadow({mode:"open"});Ye.innerHTML="",Ye.appendChild(le),Q(Ye),F instanceof Function&&F()},[le,Q,F]),we=P==null?void 0:P.querySelector('[data-md-component="content"]'),ut=P==null?void 0:P.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]'),Et=P==null?void 0:P.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]'),nt=document.createElement("div");ut==null||ut.prepend(nt);const it=document.createElement("div");return Et==null||Et.prepend(it),le?r.createElement(d.Content,null,r.createElement(h.Z,{container:!0},r.createElement(h.Z,{xs:12,item:!0},r.createElement(u.N,null)),H&&r.createElement(h.Z,{className:se.search,xs:"auto",item:!0},r.createElement(y.S,{entityId:U})),r.createElement(h.Z,{xs:12,item:!0},r.createElement(a.ZP,{jss:ue,sheetsManager:new Map},r.createElement("div",{ref:xe,"data-testid":"techdocs-native-shadowroot"}),r.createElement(v.Z,{container:nt},de.renderComponentsByLocation(s.oZ.PrimarySidebar)),r.createElement(v.Z,{container:we},de.renderComponentsByLocation(s.oZ.Content)),r.createElement(v.Z,{container:it},de.renderComponentsByLocation(s.oZ.SecondarySidebar)))))):r.createElement(d.Content,null,r.createElement(d.Progress,null))}),ge=null},99954:function(_,i,e){"use strict";e.d(i,{S:function(){return A}});var r=e(2784),t=e(18671),l=e(98069),h=e(73250),v=e(47955),m=e(53479),a=e(48023),s=e(9118),d=e(36964),y=e(68725);const u=r.createElement(l.Z,{animation:"wave",variant:"text",height:40}),A=T=>{const{children:R}=T,D=(0,v.$L)(),ne=(0,d.useApi)(d.configApiRef),{title:w,setTitle:I,subtitle:B,setSubtitle:O,entityRef:M,metadata:{value:k},entityMetadata:{value:ee}}=(0,v.x1)();(0,r.useEffect)(()=>{!k||(I(et=>{const{site_name:tt}=k;return et||tt}),O(et=>{let{site_description:tt}=k;return(!tt||tt==="None")&&(tt="Home"),et||tt}))},[k,I,O]);const Se=ne.getOptional("app.title")||"Backstage",Ke=[B,w,Se].filter(Boolean).join(" | "),{locationMetadata:We,spec:fe}=ee||{},ye=fe==null?void 0:fe.lifecycle,Le=ee?(0,m.getEntityRelations)(ee,a.S4):[],He=(0,d.useRouteRef)(y._Z)(),ke=r.createElement(r.Fragment,null,r.createElement(s.HeaderLabel,{label:"Component",value:r.createElement(m.EntityRefLink,{color:"inherit",entityRef:M,defaultKind:"Component"})}),Le.length>0&&r.createElement(s.HeaderLabel,{label:"Owner",value:r.createElement(m.EntityRefLinks,{color:"inherit",entityRefs:Le,defaultKind:"group"})}),ye?r.createElement(s.HeaderLabel,{label:"Lifecycle",value:ye}):null,We&&We.type!=="dir"&&We.type!=="file"?r.createElement(s.HeaderLabel,{label:"",value:r.createElement("a",{href:We.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(h.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return r.createElement(s.Header,{type:"Documentation",typeLink:He,title:w||u,subtitle:B||u},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,Ke)),ke,R,D.renderComponentsByLocation(v.oZ.Header))}},16172:function(_,i,e){"use strict";e.d(i,{b:function(){return a}});var r=e(2784),t=e(79692),l=e(15223),h=e(95544),v=e(47955);const m=(0,t.Z)(s=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:s.spacing(3,3,0)}})),a=({toolbarProps:s})=>{const d=m(),u=(0,v.$L)().renderComponentsByLocation(v.oZ.Subheader);return u?r.createElement(l.Z,{classes:d,...s},u&&r.createElement(h.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},u)):null}},23738:function(_,i,e){"use strict";e.d(i,{N:function(){return O}});var r=e(2784),t=e(9118),l=e(79692),h=e(4614),v=e(77277),m=e(99688),a=e(12420),s=e(60905),d=e(90436),y=e(61837),u=e(4190),A=e(87685);const T=(0,l.Z)(M=>(0,a.Z)({paper:{width:"100%",[M.breakpoints.up("sm")]:{width:"75%"},[M.breakpoints.up("md")]:{width:"50%"},padding:M.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:M.palette.background.default}})),R=({buildLog:M,onClose:k})=>{const ee=T(),Se=M.length===0?"Waiting for logs...":M.join(`
474
- `);return r.createElement(s.Z,{container:!0,direction:"column",className:ee.root,spacing:0,wrap:"nowrap"},r.createElement(s.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(d.Z,{variant:"h5"},"Build Details"),r.createElement(y.Z,{key:"dismiss",title:"Close the drawer",onClick:k,color:"inherit"},r.createElement(A.Z,null))),r.createElement(t.LogViewer,{text:Se,classes:{root:ee.logs}}))},D=({buildLog:M})=>{const k=T(),[ee,Se]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(v.Z,{color:"inherit",onClick:()=>Se(!0)},"Show Build Logs"),r.createElement(u.ZP,{classes:{paper:k.paper},anchor:"right",open:ee,onClose:()=>Se(!1)},r.createElement(R,{buildLog:M,onClose:()=>Se(!1)})))};var ne=e(36964);const w=({errorMessage:M})=>{const k=(0,ne.useApi)(ne.configApiRef).getOptionalString("techdocs.builder");let ee="";return k!=="local"&&(ee="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(t.ErrorPage,{status:"404",statusMessage:M||"Documentation not found",additionalInfo:ee})};var I=e(28626);const B=(0,l.Z)(M=>({root:{marginBottom:M.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),O=()=>{let M=null;const k=B(),{state:ee,contentReload:Se,contentErrorMessage:Ke,syncErrorMessage:We,buildLog:fe}=(0,I.DK)(),ye=ee==="CHECKING"?r.createElement(t.Progress,null):null;return ee==="INITIAL_BUILD"&&(M=r.createElement(m.Z,{classes:{root:k.root},variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(D,{buildLog:fe})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),ee==="CONTENT_STALE_REFRESHING"&&(M=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(h.Z,{size:"24px"}),action:r.createElement(D,{buildLog:fe}),classes:{root:k.root}},"A newer version of this documentation is being prepared and will be available shortly.")),ee==="CONTENT_STALE_READY"&&(M=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(v.Z,{color:"inherit",onClick:()=>Se()},"Refresh"),classes:{root:k.root}},"A newer version of this documentation is now available, please refresh to view.")),ee==="CONTENT_STALE_ERROR"&&(M=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(D,{buildLog:fe}),classes:{root:k.root,message:k.message}},"Building a newer version of this documentation failed."," ",We)),ee==="CONTENT_NOT_FOUND"&&(M=r.createElement(r.Fragment,null,We&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(D,{buildLog:fe}),classes:{root:k.root,message:k.message}},"Building a newer version of this documentation failed."," ",We),r.createElement(w,{errorMessage:Ke}))),r.createElement(r.Fragment,null,ye,M)}},96393:function(_,i,e){"use strict";e.d(i,{Fq:function(){return l.Fq},SE:function(){return t.S}});var r=e(26220),t=e(99954),l=e(28626),h=e(16172),v=e(23738)},68725:function(_,i,e){"use strict";e.d(i,{Fw:function(){return l},_Z:function(){return t},pd:function(){return h}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),l=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),h=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},10459:function(_,i,e){"use strict";e.d(i,{S:function(){return lt}});var r=e(2784),t=e(79692),l=e(49378),h=e(38402),v=e(85256),m=e(9118),a=e(15277),s=e.n(a);const d=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),y=ge=>{const{result:S,lineClamp:H=5,asListItem:F=!0,asLink:se=!0,title:de}=ge,U=d(),P=()=>{var ue;return r.createElement(l.Z,{className:U.itemText,primaryTypographyProps:{variant:"h6"},primary:de||`${S.title} | ${(ue=S.entityTitle)!=null?ue:S.name} docs`,secondary:r.createElement(s(),{line:H,truncateText:"\u2026",text:S.text,element:"span"})})},Q=({children:ue})=>se?r.createElement(m.Link,{to:S.location},ue):r.createElement(r.Fragment,null,ue),le=({children:ue})=>F?r.createElement(r.Fragment,null,r.createElement(h.Z,{alignItems:"flex-start",className:U.flexContainer},ue),r.createElement(v.Z,{component:"li"})):r.createElement(r.Fragment,null,ue);return r.createElement(Q,null,r.createElement(le,null,r.createElement(P,null)))};var u=e(36964);const A=(0,u.createApiRef)({id:"plugin.search.queryservice"});var T=e(76241),R=e(64279),D=e(1849);const ne=(0,T.CT)("search-context"),w=()=>{const ge=(0,r.useContext)(ne);if(!ge)throw new Error("useSearch must be used within a SearchContextProvider");const S=ge.atVersion(1);if(!S)throw new Error("No SearchContext v1 found");return S},I={term:"",pageCursor:void 0,filters:{},types:[]},B=ge=>{var V,p,x,N;const{initialState:S=I,children:H}=ge,F=(0,u.useApi)(A),[se,de]=(0,r.useState)(S.pageCursor),[U,P]=(0,r.useState)(S.filters),[Q,le]=(0,r.useState)(S.term),[ue,Ce]=(0,r.useState)(S.types),xe=(0,D.Z)(Q),we=(0,R.default)(()=>F.query({term:Q,filters:U,pageCursor:se,types:ue}),[Q,U,ue,se]),ut=!we.loading&&!we.error&&((V=we.value)==null?void 0:V.nextPageCursor),Et=!we.loading&&!we.error&&((p=we.value)==null?void 0:p.previousPageCursor),nt=(0,r.useCallback)(()=>{var G;de((G=we.value)==null?void 0:G.nextPageCursor)},[(x=we.value)==null?void 0:x.nextPageCursor]),it=(0,r.useCallback)(()=>{var G;de((G=we.value)==null?void 0:G.previousPageCursor)},[(N=we.value)==null?void 0:N.previousPageCursor]);(0,r.useEffect)(()=>{Q&&xe&&Q!==xe&&de(void 0)},[Q,xe,S.pageCursor]);const Ct={result:we,filters:U,setFilters:P,term:Q,setTerm:le,types:ue,setTypes:Ce,pageCursor:se,setPageCursor:de,fetchNextPage:ut?nt:void 0,fetchPreviousPage:Et?it:void 0},Ye=(0,T.EI)({1:Ct});return r.createElement(u.AnalyticsContext,{attributes:{searchTypes:ue.sort().join(",")}},r.createElement(ne.Provider,{value:Ye,children:H}))};var O=e(49208),M=e(62159);class k{constructor(S){q(this,"config");this.config=new ConfigReader(S)}has(S){return this.config.has(S)}keys(){return this.config.keys()}get(S){return this.config.get(S)}getOptional(S){return this.config.getOptional(S)}getConfig(S){return this.config.getConfig(S)}getOptionalConfig(S){return this.config.getOptionalConfig(S)}getConfigArray(S){return this.config.getConfigArray(S)}getOptionalConfigArray(S){return this.config.getOptionalConfigArray(S)}getNumber(S){return this.config.getNumber(S)}getOptionalNumber(S){return this.config.getOptionalNumber(S)}getBoolean(S){return this.config.getBoolean(S)}getOptionalBoolean(S){return this.config.getOptionalBoolean(S)}getString(S){return this.config.getString(S)}getOptionalString(S){return this.config.getOptionalString(S)}getStringArray(S){return this.config.getStringArray(S)}getOptionalStringArray(S){return this.config.getOptionalStringArray(S)}}const ee={subscribe:()=>({unsubscribe:()=>{},closed:!0}),[Symbol.observable](){return this}};class Se{constructor(S={}){q(this,"errors",new Array);q(this,"waiters",new Set);this.options=S}post(S,H){if(this.options.collect){this.errors.push({error:S,context:H});for(const F of this.waiters)F.pattern.test(S.message)&&(this.waiters.delete(F),F.resolve({error:S,context:H}));return}throw new Error(`MockErrorApi received unexpected error, ${S}`)}error$(){return ee}getErrors(){return this.errors}waitForError(S,H=2e3){return new Promise((F,se)=>{setTimeout(()=>{se(new Error("Timed out waiting for error"))},H),this.waiters.add({resolve:F,pattern:S})})}}var Ke=e(96279);class We{constructor(S){q(this,"implementation");this.implementation=fe(S)}get fetch(){return this.implementation.fetch}}function fe(ge){return createFetchApi({baseImplementation:ye(ge),middleware:[Le(ge),He(ge)].filter(S=>Boolean(S))})}function ye(ge){const S=ge==null?void 0:ge.baseImplementation;if(S){if(S==="none")return()=>Promise.resolve(new Response)}else return crossFetch;return S}function Le(ge){const S=ge==null?void 0:ge.resolvePluginProtocol;if(!!S)return FetchMiddlewares.resolvePluginProtocol({discoveryApi:S.discoveryApi})}function He(ge){const S=ge==null?void 0:ge.injectIdentityAuth;if(!S)return;const H="token"in S?{getCredentials:async()=>({token:S.token})}:S.identityApi;return FetchMiddlewares.injectIdentityAuth({identityApi:H,allowUrl:()=>!0})}var ke=e(40749);class et{constructor(S=()=>AuthorizeResult.ALLOW){this.requestHandler=S}async authorize(S){return{result:this.requestHandler(S)}}}var tt=e(82394),Te=e.n(tt);class Ue{constructor(S,H,F){q(this,"namespace");q(this,"data");q(this,"bucketStorageApis");q(this,"subscribers",new Set);q(this,"observable",new(Te())(S=>(this.subscribers.add(S),()=>{this.subscribers.delete(S)})));this.namespace=S,this.bucketStorageApis=H,this.data={...F}}static create(S){return new Ue("",new Map,S)}forBucket(S){return this.bucketStorageApis.has(S)||this.bucketStorageApis.set(S,new Ue(`${this.namespace}/${S}`,this.bucketStorageApis,this.data)),this.bucketStorageApis.get(S)}snapshot(S){if(this.data.hasOwnProperty(this.getKeyName(S))){const H=this.data[this.getKeyName(S)];return{key:S,presence:"present",value:H}}return{key:S,presence:"absent",value:void 0}}async set(S,H){const F=JSON.parse(JSON.stringify(H),(se,de)=>(typeof de=="object"&&de!==null&&Object.freeze(de),de));this.data[this.getKeyName(S)]=F,this.notifyChanges({key:S,presence:"present",value:F})}async remove(S){delete this.data[this.getKeyName(S)],this.notifyChanges({key:S,presence:"absent",value:void 0})}observe$(S){return this.observable.filter(({key:H})=>H===S)}getKeyName(S){return`${this.namespace}/${encodeURIComponent(S)}`}notifyChanges(S){for(const H of this.subscribers)H.next(S)}}var je=e(28981),Je=e(83677),vt=e(63751);async function Dt(ge){let S;return await act(async()=>{S=render(ge)}),S}const ct=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:ge})=>O.UrlPatternDiscovery.compile(`${ge.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)(u.alertApiRef,new O.AlertApiForwarder),(0,u.createApiFactory)(u.analyticsApiRef,new O.NoOpAnalyticsApi),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:ge})=>{const S=new O.ErrorAlerter(ge,new O.ErrorApiForwarder);return O.UnhandledErrorForwarder.forward(S,{hidden:!1}),S}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:ge})=>O.WebStorage.create({errorApi:ge})}),(0,u.createApiFactory)(u.oauthRequestApiRef,new O.OAuthRequestManager),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.GoogleAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:H.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.MicrosoftAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:H.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.GithubAuth.create({discoveryApi:ge,oauthRequestApi:S,defaultScopes:["read:user"],environment:H.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.OktaAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:H.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.GitlabAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:H.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.OneLoginAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:H.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.BitbucketAuth.create({discoveryApi:ge,oauthRequestApi:S,defaultScopes:["team"],environment:H.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:ge,oauthRequestApi:S,configApi:H})=>O.AtlassianAuth.create({discoveryApi:ge,oauthRequestApi:S,environment:H.getOptionalString("auth.environment")})})],Pt=[(0,u.createApiFactory)(u.errorApiRef,new Se),(0,u.createApiFactory)(u.storageApiRef,Ue.create())],Ft={"kind:api":Je.Z,"kind:component":Je.Z,"kind:domain":Je.Z,"kind:group":Je.Z,"kind:location":Je.Z,"kind:system":Je.Z,"kind:user":Je.Z,brokenImage:Je.Z,catalog:Je.Z,scaffolder:Je.Z,techdocs:Je.Z,search:Je.Z,chat:Je.Z,dashboard:Je.Z,docs:Je.Z,email:Je.Z,github:Je.Z,group:Je.Z,help:Je.Z,user:Je.Z,warning:Je.Z},It=({error:ge})=>{throw new Error(`Reached ErrorBoundaryFallback Page with error, ${ge}`)},Nt=()=>{throw new Error("Reached NotFound Page")},wt=({step:ge,error:S})=>{throw new Error(`Reached BootError Page at step ${ge} with error ${S}`)},Wt=()=>React.createElement("div",{"data-testid":"progress"}),tn=ge=>null;function $t(ge){return String(ge).includes("{type=external,")}function mt(ge,S={}){var le;const{routeEntries:H=["/"]}=S,F=new Map,se=createSpecializedApp({apis:mockApis,defaultApis,configLoader:!1,components:{Progress:Wt,BootErrorPage:wt,NotFoundErrorPage:Nt,ErrorBoundaryFallback:It,Router:({children:ue})=>React.createElement(MemoryRouter,{initialEntries:H,children:ue})},icons:Ft,plugins:[],themes:[{id:"light",title:"Test App Theme",variant:"light",Provider:({children:ue})=>React.createElement(ThemeProvider,{theme:lightTheme},React.createElement(CssBaseline,null,ue))}],bindRoutes:({bind:ue})=>{for(const[Ce,xe]of F)ue({ref:Ce},{ref:xe})}});let de;ge instanceof Function?de=React.createElement(ge,null):de=ge;const U=Object.entries((le=S.mountedRoutes)!=null?le:{}).map(([ue,Ce])=>{const xe=()=>React.createElement("div",null,"Mounted at ",ue);if($t(Ce)){const we=createRouteRef({id:"id"});F.set(Ce,we),attachComponentData(xe,"core.mountPoint",we)}else attachComponentData(xe,"core.mountPoint",Ce);return React.createElement(Route,{key:ue,path:ue,element:React.createElement(xe,null)})}),P=se.getProvider(),Q=se.getRouter();return React.createElement(P,null,React.createElement(Q,null,React.createElement(tn,null,U),React.createElement(Routes,null,React.createElement(Route,{path:"/*",element:de}))))}async function nn(ge,S={}){return renderWithEffects(mt(ge,S))}class ae{static from(...S){return new ae(new Map(S.map(([H,F])=>[H.id,F])))}constructor(S){this.apis=S}get(S){return this.apis.get(S.id)}}const j=ge=>React.createElement(ApiProvider,{apis:ae.from(...ge.apis),children:ge.children});function ie(ge){const{mockedResults:S,children:H}=ge,F=()=>Promise.resolve(S||{}),se=TestApiRegistry.from([searchApiRef,{query:F}]);return React.createElement(ApiProvider,{apis:se,children:H})}const ce=ge=>React.createElement(ie,{...ge},React.createElement(SearchContextProvider,{children:ge.children}));var pe=e(86619),Oe=e(50581),Ze=e(61837),Ae=e(4614),Ve=e(21853),dt=e(88013),At=e(10289),gt=e(48760);const rt=(0,t.Z)({root:{width:"100%"}}),xt=ge=>{const{entityId:S,debounceTime:H=150}=ge,[F,se]=(0,r.useState)(!1),de=(0,At.s0)(),{term:U,setTerm:P,setFilters:Q,result:{loading:le,value:ue}}=w(),Ce=rt(),[xe,we]=(0,r.useState)([]);(0,r.useEffect)(()=>{let p=!0;if(p&&ue){const x=ue.results.slice(0,10);we(x)}return()=>{p=!1}},[le,ue]);const[ut,Et]=(0,r.useState)(U);(0,gt.Z)(()=>P(ut),H,[ut]);const{kind:nt,name:it,namespace:Ct}=S;(0,r.useEffect)(()=>{Q(p=>({...p,kind:nt,namespace:Ct,name:it}))},[nt,Ct,it,Q]);const Ye=p=>{F||se(!0),Et(p.target.value)},V=(p,x)=>{if(x!=null&&x.document){const{location:N}=x.document;de(N)}};return r.createElement(dt.ZP,{classes:{root:Ce.root},"data-testid":"techdocs-search-bar",size:"small",open:F,getOptionLabel:()=>"",filterOptions:p=>p,onClose:()=>{se(!1)},onFocus:()=>{se(!0)},onChange:V,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:xe,renderOption:({document:p})=>r.createElement(y,{result:p,lineClamp:3,asListItem:!1,asLink:!1,title:p.title}),loading:le,renderInput:p=>r.createElement(pe.Z,{...p,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${S.name} docs`,value:ut,onChange:Ye,InputProps:{...p.InputProps,startAdornment:r.createElement(Oe.Z,{position:"start"},r.createElement(Ze.Z,{"aria-label":"Query",disabled:!0},r.createElement(Ve.Z,null))),endAdornment:r.createElement(r.Fragment,null,le?r.createElement(Ae.Z,{color:"inherit",size:20}):null,p.InputProps.endAdornment)}})})},lt=ge=>{const S={term:"",types:["techdocs"],pageCursor:"",filters:ge.entityId};return r.createElement(B,{initialState:S},r.createElement(xt,{...ge}))}},98157:function(){},19133:function(_,i,e){"use strict";_.exports=e.p+"static/createComponent.975d1e1e..svg"},86284:function(_,i,e){"use strict";_.exports=e.p+"static/missingAnnotation.67f79e98..svg"},3871:function(_,i,e){"use strict";_.exports=e.p+"static/noBuild.1715fa71..svg"},96465:function(_,i,e){"use strict";_.exports=e.p+"static/noInformation.4b426325..svg"},29788:function(_,i,e){"use strict";_.exports=e.p+"static/mic-drop.fe3ef4d0..svg"},53260:function(){}},function(_){var i=function(r){return _(_.s=r)};_.O(0,[2370,6202,2158,9284,2126,7012,4361,9035,4983,3222,5218,4736],function(){return i(88649),i(30294)});var e=_.O()}]);})();
475
-
476
- //# sourceMappingURL=main.fa40c390.js.map