@techdocs/cli 1.1.4-next.1 → 1.2.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/{mkdocs-1961b6ea.cjs.js → mkdocs-1501e940.cjs.js} +3 -2
- package/dist/cjs/{mkdocs-1961b6ea.cjs.js.map → mkdocs-1501e940.cjs.js.map} +1 -1
- package/dist/cjs/{mkdocsServer-f7081578.cjs.js → mkdocsServer-99ec8af2.cjs.js} +2 -1
- package/dist/cjs/mkdocsServer-99ec8af2.cjs.js.map +1 -0
- package/dist/cjs/{serve-0818dbae.cjs.js → serve-176119a3.cjs.js} +3 -2
- package/dist/cjs/{serve-0818dbae.cjs.js.map → serve-176119a3.cjs.js.map} +1 -1
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/main.1f269f7a.js +492 -0
- package/dist/embedded-app/static/main.1f269f7a.js.map +1 -0
- package/dist/embedded-app/static/module-zod.206c7997.js +3 -0
- package/dist/embedded-app/static/module-zod.206c7997.js.map +1 -0
- package/dist/embedded-app/static/{runtime.1edda37a.js → runtime.1f269f7a.js} +1 -1
- package/dist/embedded-app/static/{runtime.1edda37a.js.map → runtime.1f269f7a.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.1edda37a.js → vendor.1f269f7a.js} +3 -3
- package/dist/embedded-app/static/vendor.1f269f7a.js.map +1 -0
- package/dist/index.cjs.js +9 -3
- package/dist/index.cjs.js.map +1 -1
- package/package.json +5 -5
- package/dist/cjs/mkdocsServer-f7081578.cjs.js.map +0 -1
- package/dist/embedded-app/static/main.1edda37a.js +0 -492
- package/dist/embedded-app/static/main.1edda37a.js.map +0 -1
- package/dist/embedded-app/static/module-zod.fe17cc67.js +0 -3
- package/dist/embedded-app/static/module-zod.fe17cc67.js.map +0 -1
- package/dist/embedded-app/static/vendor.1edda37a.js.map +0 -1
|
@@ -1,492 +0,0 @@
|
|
|
1
|
-
(()=>{var nl=Object.defineProperty;var rl=(ne,s,e)=>s in ne?nl(ne,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):ne[s]=e;var X=(ne,s,e)=>(rl(ne,typeof s!="symbol"?s+"":s,e),e),Ao=(ne,s,e)=>{if(!s.has(ne))throw TypeError("Cannot "+e)};var ot=(ne,s,e)=>(Ao(ne,s,"read from private field"),e?e.call(ne):s.get(ne)),Bn=(ne,s,e)=>{if(s.has(ne))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(ne):s.set(ne,e)},Zn=(ne,s,e,r)=>(Ao(ne,s,"write to private field"),r?r.call(ne,e):s.set(ne,e),e);(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[179],{30001:function(ne,s,e){"use strict";e.d(s,{n3:function(){return R},MS:function(){return f}});var r=e(48023),t=e(10179),c=e(96279),i=e.n(c);const R=Symbol.for("CATALOG_FILTER_EXISTS_0e15b590c0b343a2bae3e787e84c2111");class f{constructor(u){X(this,"discoveryApi");X(this,"fetchApi");this.discoveryApi=u.discoveryApi,this.fetchApi=u.fetchApi||{fetch:i()}}async getEntityAncestors(u,m){const{kind:y,namespace:h,name:E}=(0,r.of)(u.entityRef);return await this.requestRequired("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(h)}/${encodeURIComponent(E)}/ancestry`,m)}async getLocationById(u,m){return await this.requestOptional("GET",`/locations/${encodeURIComponent(u)}`,m)}async getEntities(u,m){const{filter:y=[],fields:h=[],offset:E,limit:S,after:b}=u!=null?u:{},L=[];for(const x of[y].flat()){const O=[];for(const[w,K]of Object.entries(x))for(const re of[K].flat())re===R?O.push(encodeURIComponent(w)):typeof re=="string"&&O.push(`${encodeURIComponent(w)}=${encodeURIComponent(re)}`);O.length&&L.push(`filter=${O.join(",")}`)}h.length&&L.push(`fields=${h.map(encodeURIComponent).join(",")}`),E!==void 0&&L.push(`offset=${E}`),S!==void 0&&L.push(`limit=${S}`),b!==void 0&&L.push(`after=${encodeURIComponent(b)}`);const $=L.length?`?${L.join("&")}`:"",F=await this.requestRequired("GET",`/entities${$}`,m),D=(x,O)=>{var re,ce;if(((re=x.metadata)==null?void 0:re.name)===void 0||x.kind===void 0||((ce=O.metadata)==null?void 0:ce.name)===void 0||O.kind===void 0)return 0;const w=(0,r.eE)(x),K=(0,r.eE)(O);return w<K?-1:w>K?1:0};return{items:F.sort(D)}}async getEntityByRef(u,m){const{kind:y,namespace:h,name:E}=(0,r.of)(u);return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(h)}/${encodeURIComponent(E)}`,m)}async getEntityByName(u,m){const{kind:y,namespace:h="default",name:E}=u;return this.requestOptional("GET",`/entities/by-name/${encodeURIComponent(y)}/${encodeURIComponent(h)}/${encodeURIComponent(E)}`,m)}async refreshEntity(u,m){const y=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/refresh`,{headers:{"Content-Type":"application/json",...(m==null?void 0:m.token)&&{Authorization:`Bearer ${m==null?void 0:m.token}`}},method:"POST",body:JSON.stringify({entityRef:u})});if(y.status!==200)throw new Error(await y.text())}async getEntityFacets(u,m){const{filter:y=[],facets:h}=u,E=[];for(const b of[y].flat()){const L=[];for(const[$,F]of Object.entries(b))for(const D of[F].flat())D===R?L.push(encodeURIComponent($)):typeof D=="string"&&L.push(`${encodeURIComponent($)}=${encodeURIComponent(D)}`);L.length&&E.push(`filter=${L.join(",")}`)}for(const b of h)E.push(`facet=${encodeURIComponent(b)}`);const S=E.length?`?${E.join("&")}`:"";return await this.requestOptional("GET",`/entity-facets${S}`,m)}async addLocation({type:u="url",target:m,dryRun:y},h){const E=await this.fetchApi.fetch(`${await this.discoveryApi.getBaseUrl("catalog")}/locations${y?"?dryRun=true":""}`,{headers:{"Content-Type":"application/json",...(h==null?void 0:h.token)&&{Authorization:`Bearer ${h==null?void 0:h.token}`}},method:"POST",body:JSON.stringify({type:u,target:m})});if(E.status!==201)throw new Error(await E.text());const{location:S,entities:b,exists:L}=await E.json();if(!S)throw new Error(`Location wasn't added: ${m}`);return{location:S,entities:b,exists:L}}async getLocationByRef(u,m){return(await this.requestRequired("GET","/locations",m)).map(h=>h.data).find(h=>u===(0,r.NZ)(h))}async removeLocationById(u,m){await this.requestIgnored("DELETE",`/locations/${encodeURIComponent(u)}`,m)}async removeEntityByUid(u,m){await this.requestIgnored("DELETE",`/entities/by-uid/${encodeURIComponent(u)}`,m)}async requestIgnored(u,m,y){const h=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(h,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S)}async requestRequired(u,m,y){const h=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(h,{method:u,headers:E});if(!S.ok)throw await t.VL.fromResponse(S);return await S.json()}async requestOptional(u,m,y){const h=`${await this.discoveryApi.getBaseUrl("catalog")}${m}`,E=y!=null&&y.token?{Authorization:`Bearer ${y.token}`}:{},S=await this.fetchApi.fetch(h,{method:u,headers:E});if(!S.ok){if(S.status===404)return;throw await t.VL.fromResponse(S)}return await S.json()}}},48023:function(ne,s,e){"use strict";e.d(s,{Tf:function(){return c},P1:function(){return Ht},q1:function(){return dn},M6:function(){return In},l2:function(){return t},zG:function(){return r},w$:function(){return Pe},nP:function(){return fe},aS:function(){return St},S4:function(){return we},cz:function(){return pt},iB:function(){return Tt},CV:function(){return Xe},of:function(){return At},Ou:function(){return Yt},eE:function(){return Ie},NZ:function(){return Nt}});const r="default",t="backstage.io/view-url",c="backstage.io/edit-url",i="kubernetes.io/api-server",R="kubernetes.io/api-server-certificate-authority",f="kubernetes.io/auth-provider";var o=e(76635),u=e.n(o);class m{constructor(j=DEFAULT_NAMESPACE){X(this,"namespace");this.namespace=j}async enforce(j){return j.metadata.namespace?j:lodash.merge({metadata:{namespace:this.namespace}},j)}}class y{static isValidPrefixAndOrSuffix(j,ye,je,_e){if(typeof j!="string")return!1;const st=j.split(ye);return st.length===1?_e(st[0]):st.length===2?je(st[0])&&_e(st[1]):!1}static isJsonSafe(j){try{return u().isEqual(j,JSON.parse(JSON.stringify(j)))}catch{return!1}}static isValidDnsSubdomain(j){return typeof j=="string"&&j.length>=1&&j.length<=253&&j.split(".").every(y.isValidDnsLabel)}static isValidDnsLabel(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9]+(\-[a-z0-9]+)*$/.test(j)}static isValidTag(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-z0-9+#]+(\-[a-z0-9+#]+)*$/.test(j)}static isValidUrl(j){if(typeof j!="string")return!1;try{return new URL(j),!0}catch{return!1}}static isValidString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}static isNonEmptyString(j){var ye;return typeof j=="string"&&((ye=j==null?void 0:j.trim())==null?void 0:ye.length)>=1}}var h=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),E=e(48231),S=e.n(E),b=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),L=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),$=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","target"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference"},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}');const F=new Map,D=[h,b,L,$];function x(de){if(!(de!=null&&de.length))throw new TypeError("Unknown error");const j=de[0];throw new TypeError(`${j.instancePath||"<root>"} ${j.message}${j.params?` - ${Object.entries(j.params).map(([ye,je])=>`${ye}: ${je}`).join(", ")}`:""}`)}function O(de,j={}){var qt;const ye=(qt=j==null?void 0:j.disableCache)!=null?qt:!1,je=ye?"":JSON.stringify(de);if(!ye){const en=F.get(je);if(en)return en}const _e=w(de),st=new(S())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});_e.length&&st.addSchema(_e,void 0,void 0,!0);const Rt=st.compile(de);return ye||F.set(je,Rt),Rt}function w(de){if(typeof de!="object")return[];const j=new Set;de.$id&&j.add(de.$id);const ye=new Array,je=[de];for(;je.length;){const _e=je.pop();for(const st of K(_e))if(!j.has(st)){j.add(st);const Rt=D.find(qt=>qt.$id===st);Rt&&(ye.push(Rt),je.push(Rt))}}return ye}function*K(de){const j=[de];for(;j.length;){const ye=j.pop();if(typeof ye=="object"&&ye)for(const[je,_e]of Object.entries(ye))je==="$ref"&&typeof _e=="string"?yield _e.split("#")[0]:j.push(_e)}}function re(de){const j=compileAjvSchema(de||entityEnvelopeSchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}function ce(de){const j=O(de);return ye=>{var st;if(j(ye)===!0)return ye;const _e=(st=j.errors)==null?void 0:st.filter(Rt=>["/kind","/apiVersion"].includes(Rt.instancePath));if((_e==null?void 0:_e.length)&&_e.every(Rt=>Rt.keyword==="enum"))return!1;throw x(j.errors)}}function Se(de){const j=compileAjvSchema(de||entitySchema);return ye=>{if(j(ye)===!0)return ye;throw throwAjvError(j.errors)}}class De{static isValidApiVersion(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,ye=>ye.length>=1&&ye.length<=63&&/^[a-z0-9A-Z]+$/.test(ye))}static isValidKind(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^[a-zA-Z][a-z0-9A-Z]*$/.test(j)}static isValidObjectName(j){return typeof j=="string"&&j.length>=1&&j.length<=63&&/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$/.test(j)}static isValidNamespace(j){return y.isValidDnsLabel(j)}static isValidLabelKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,De.isValidObjectName)}static isValidLabelValue(j){return j===""||De.isValidObjectName(j)}static isValidAnnotationKey(j){return y.isValidPrefixAndOrSuffix(j,"/",y.isValidDnsSubdomain,De.isValidObjectName)}static isValidAnnotationValue(j){return typeof j=="string"}}const Fe={isValidApiVersion:De.isValidApiVersion,isValidKind:De.isValidKind,isValidEntityName:De.isValidObjectName,isValidNamespace:De.isValidNamespace,isValidLabelKey:De.isValidLabelKey,isValidLabelValue:De.isValidLabelValue,isValidAnnotationKey:De.isValidAnnotationKey,isValidAnnotationValue:De.isValidAnnotationValue,isValidTag:de=>typeof de=="string"&&de.length>=1&&de.length<=63&&/^[a-z0-9:+#]+(\-[a-z0-9:+#]+)*$/.test(de)};function He(de={}){return{...Fe,...de}}class Ae{constructor(j=makeValidator()){X(this,"validators");this.validators=j}async enforce(j){var Rt,qt,en,tn,gn,U,oe;function ye(te,Ee,$e){if(Ee==null)throw new Error(`${te} must have a value`);let dt;try{dt=$e(Ee)}catch(Ne){throw new Error(`${te} could not be validated, ${Ne}`)}if(!dt){let Ne;switch($e.name){case"isValidLabelValue":case"isValidObjectName":Ne="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":Ne="a valid prefix and/or suffix";break;case"isValidNamespace":case"isValidDnsLabel":Ne="a string that is sequences of [a-z0-9] separated by [-], at most 63 characters in total";break;case"isValidTag":Ne="a string that is sequences of [a-z0-9+#] separated by [-], at most 63 characters in total";break;case"isValidAnnotationValue":Ne="a string";break;case"isValidKind":Ne="a string that is a sequence of [a-zA-Z][a-z0-9A-Z], at most 63 characters in total";break;case"isValidUrl":Ne="a string that is a valid url";break;case"isValidString":case"isNonEmptyString":Ne="a non empty string";break;default:Ne=void 0;break}const Vt=Ne?` expected ${Ne} but found "${Ee}".`:"";throw new Error(`"${te}" is not valid;${Vt} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`)}}function je(te,Ee,$e){return Ee===void 0||ye(te,Ee,$e)}ye("apiVersion",j.apiVersion,this.validators.isValidApiVersion),ye("kind",j.kind,this.validators.isValidKind),ye("metadata.name",j.metadata.name,this.validators.isValidEntityName),je("metadata.namespace",j.metadata.namespace,this.validators.isValidNamespace);for(const[te,Ee]of Object.entries((Rt=j.metadata.labels)!=null?Rt:[]))ye(`labels.${te}`,te,this.validators.isValidLabelKey),ye(`labels.${te}`,Ee,this.validators.isValidLabelValue);for(const[te,Ee]of Object.entries((qt=j.metadata.annotations)!=null?qt:[]))ye(`annotations.${te}`,te,this.validators.isValidAnnotationKey),ye(`annotations.${te}`,Ee,this.validators.isValidAnnotationValue);const _e=(en=j.metadata.tags)!=null?en:[];for(let te=0;te<_e.length;++te)ye(`tags.${te}`,_e[te],this.validators.isValidTag);const st=(tn=j.metadata.links)!=null?tn:[];for(let te=0;te<st.length;++te)ye(`links.${te}.url`,(gn=st[te])==null?void 0:gn.url,CommonValidatorFunctions.isValidUrl),je(`links.${te}.title`,(U=st[te])==null?void 0:U.title,CommonValidatorFunctions.isNonEmptyString),je(`links.${te}.icon`,(oe=st[te])==null?void 0:oe.icon,KubernetesValidatorFunctions.isValidObjectName);return j}}class Je{constructor(){X(this,"validate")}async enforce(j){if(!this.validate){const _e=new Ajv({allowUnionTypes:!0});this.validate=_e.addSchema([commonSchema,entityMetaSchema],void 0,void 0,!0).compile(entitySchema)}if(this.validate(j)===!0)return j;const[je]=this.validate.errors||[];throw je?new Error(`Malformed envelope, ${je.instancePath||"<root>"} ${je.message}`):new Error("Malformed envelope, Unknown error")}}function tt(de){let j=de.indexOf(":");const ye=de.indexOf("/");ye!==-1&&ye<j&&(j=-1);const je=j===-1?void 0:de.slice(0,j),_e=ye===-1?void 0:de.slice(j+1,ye),st=de.slice(Math.max(j+1,ye+1));if(je===""||_e===""||st==="")throw new TypeError(`Entity reference "${de}" was not on the form [<kind>:][<namespace>/]<name>`);return{kind:je,namespace:_e,name:st}}function Tt(de){return{kind:de.kind,namespace:de.metadata.namespace||r,name:de.metadata.name}}function At(de,j){var qt,en,tn,gn;if(!de)throw new Error("Entity reference must not be empty");const ye=j==null?void 0:j.defaultKind,je=(j==null?void 0:j.defaultNamespace)||r;let _e,st,Rt;if(typeof de=="string"){const U=tt(de);_e=(qt=U.kind)!=null?qt:ye,st=(en=U.namespace)!=null?en:je,Rt=U.name}else _e=(tn=de.kind)!=null?tn:ye,st=(gn=de.namespace)!=null?gn:je,Rt=de.name;if(_e)if(st){if(!Rt){const U=JSON.stringify(de);throw new Error(`Entity reference ${U} had missing or empty name`)}}else{const U=JSON.stringify(de);throw new Error(`Entity reference ${U} had missing or empty namespace`)}else{const U=JSON.stringify(de);throw new Error(`Entity reference ${U} had missing or empty kind (e.g. did not start with "component:" or similar)`)}return{kind:_e,namespace:st,name:Rt}}function Ie(de){var _e,st;let j,ye,je;return"metadata"in de?(j=de.kind,ye=(_e=de.metadata.namespace)!=null?_e:r,je=de.metadata.name):(j=de.kind,ye=(st=de.namespace)!=null?st:r,je=de.name),`${j.toLocaleLowerCase("en-US")}:${ye.toLocaleLowerCase("en-US")}/${je.toLocaleLowerCase("en-US")}`}class ht{constructor(j){this.policies=j}async enforce(j){let ye=j;for(const je of this.policies){const _e=await je.enforce(ye);if(!_e)throw new Error(`Policy ${je.constructor.name} did not return a result`);ye=_e}return ye}}class gt{constructor(j){this.policies=j}async enforce(j){for(const ye of this.policies){const je=await ye.enforce(j);if(je)return je}throw new Error("The entity did not match any known policy")}}const lt={allOf(de){return new ht(de)},oneOf(de){return new gt(de)}};var _=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ApiV1alpha1","description":"An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"API","metadata":{"name":"artist-api","description":"Retrieve artist details","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"openapi","lifecycle":"production","owner":"artist-relations-team","system":"artist-engagement-portal","definition":"openapi: \\"3.0.0\\"\\ninfo:..."}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["API"]},"spec":{"type":"object","required":["type","lifecycle","owner","definition"],"properties":{"type":{"type":"string","description":"The type of the API definition.","examples":["openapi","asyncapi","graphql","grpc"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the API.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the API.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the API belongs to.","minLength":1},"definition":{"type":"string","description":"The definition of the API, based on the format defined by the type.","minLength":1}}}}}]}');function pe(de){const j=ce(de);return{async check(ye){return j(ye)===ye}}}const be=pe(_);var We=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"ComponentV1alpha1","description":"A Component describes a software component. It is typically intimately linked to the source code that constitutes the component, and should be what a developer may regard a \\"unit of software\\", usually with a distinct deployable or linkable artifact.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Component"]},"spec":{"type":"object","required":["type","lifecycle","owner"],"properties":{"type":{"type":"string","description":"The type of component.","examples":["service","website","library"],"minLength":1},"lifecycle":{"type":"string","description":"The lifecycle state of the component.","examples":["experimental","production","deprecated"],"minLength":1},"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1},"system":{"type":"string","description":"An entity reference to the system that the component belongs to.","minLength":1},"subcomponentOf":{"type":"string","description":"An entity reference to another component of which the component is a part.","minLength":1},"providesApis":{"type":"array","description":"An array of entity references to the APIs that are provided by the component.","items":{"type":"string","minLength":1}},"consumesApis":{"type":"array","description":"An array of entity references to the APIs that are consumed by the component.","items":{"type":"string","minLength":1}},"dependsOn":{"type":"array","description":"An array of references to other entities that the component depends on to function.","items":{"type":"string","minLength":1}}}}}}]}');const et=pe(We);var at=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"DomainV1alpha1","description":"A Domain groups a collection of systems that share terminology, domain models, business purpose, or documentation, i.e. form a bounded context.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Domain","metadata":{"name":"artists","description":"Everything about artists"},"spec":{"owner":"artist-relations-team"}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Domain"]},"spec":{"type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"An entity reference to the owner of the component.","examples":["artist-relations-team","user:john.johnson"],"minLength":1}}}}}]}');const yt=pe(at);var ie=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 ae=pe(ie);var Ye=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"LocationV1alpha1","description":"A location is a marker that references other places to look for catalog data.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Location","metadata":{"name":"org-data"},"spec":{"type":"url","targets":["http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml"]}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["backstage.io/v1alpha1","backstage.io/v1beta1"]},"kind":{"enum":["Location"]},"spec":{"type":"object","required":[],"properties":{"type":{"type":"string","description":"The single location type, that's common to the targets specified in the spec. If it is left out, it is inherited from the location type that originally read the entity data.","examples":["url"],"minLength":1},"target":{"type":"string","description":"A single target as a string. Can be either an absolute path/URL (depending on the type), or a relative path such as ./details/catalog-info.yaml which is resolved relative to the location of this Location entity itself.","examples":["./details/catalog-info.yaml"],"minLength":1},"targets":{"type":"array","description":"A list of targets as strings. They can all be either absolute paths/URLs (depending on the type), or relative paths such as ./details/catalog-info.yaml which are resolved relative to the location of this Location entity itself.","items":{"type":"string","examples":["./details/catalog-info.yaml","http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml"],"minLength":1}},"presence":{"type":"string","description":"Whether the presence of the location target is required and it should be considered an error if it can not be found","default":"required","examples":["required"],"enum":["required","optional"]}}}}}]}`);const Ge=pe(Ye),we="ownedBy",nt="ownerOf",J="consumesApi",z="apiConsumedBy",q="providesApi",ue="apiProvidedBy",fe="dependsOn",Pe="dependencyOf",Oe="parentOf",Ce="childOf",Qe="memberOf",Ke="hasMember",pt="partOf",St="hasPart";var ut=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 xt=pe(ut);var Lt=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 bt=pe(Lt);var Pt=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 Wt=pe(Pt),Ht="backstage.io/managed-by-location",dn="backstage.io/managed-by-origin-location",In="backstage.io/source-location";function Yt(de){if(typeof de!="string")throw new TypeError(`Unable to parse location ref '${de}', unexpected argument ${typeof de}`);const j=de.indexOf(":");if(j<0)throw new TypeError(`Unable to parse location ref '${de}', expected '<type>:<target>', e.g. 'url:https://host/path'`);const ye=de.substring(0,j).trim(),je=de.substring(j+1).trim();if(!ye||!je)throw new TypeError(`Unable to parse location ref '${de}', expected '<type>:<target>', e.g. 'url:https://host/path'`);if(ye==="http"||ye==="https")throw new TypeError(`Invalid location ref '${de}', please prefix it with 'url:', e.g. 'url:${de}'`);return{type:ye,target:je}}function Nt(de){const{type:j,target:ye}=de;if(j){if(!ye)throw new TypeError("Unable to stringify location ref, empty target")}else throw new TypeError("Unable to stringify location ref, empty type");return`${j}:${ye}`}function Xe(de){var ye,je,_e,st,Rt;const j=(Rt=(je=(ye=de.metadata)==null?void 0:ye.annotations)==null?void 0:je[In])!=null?Rt:(st=(_e=de.metadata)==null?void 0:_e.annotations)==null?void 0:st[Ht];if(!j)throw new Error(`Entity '${Ie(de)}' is missing location`);return Yt(j)}},23235:function(ne,s,e){"use strict";e.d(s,{C:function(){return t}});var r=e(98005);class t{constructor(){X(this,"subject",new r.J)}post(i){this.subject.next(i)}alert$(){return this.subject}}},47150:function(ne,s,e){"use strict";e.d(s,{g:function(){return r}});class r{captureEvent(c){}}},58652:function(ne,s,e){"use strict";e.d(s,{C:function(){return c}});var r=e(98005);const t="theme";class c{constructor(R){X(this,"activeThemeId");X(this,"subject",new r.X(void 0));this.themes=R}static createWithStorage(R){var u;const f=new c(R);if(!window.localStorage)return f;const o=(u=window.localStorage.getItem(t))!=null?u:void 0;return f.setActiveThemeId(o),f.activeThemeId$().subscribe(m=>{m?window.localStorage.setItem(t,m):window.localStorage.removeItem(t)}),window.addEventListener("storage",m=>{var y;if(m.key===t){const h=(y=localStorage.getItem(t))!=null?y:void 0;f.setActiveThemeId(h)}}),f}getInstalledThemes(){return this.themes.slice()}activeThemeId$(){return this.subject}getActiveThemeId(){return this.activeThemeId}setActiveThemeId(R){this.activeThemeId=R,this.subject.next(R)}}},14721:function(ne,s,e){"use strict";e.d(s,{m:function(){return m}});var r=e(9850),t=e.n(r),c=e(12782),i=e.n(c);const R=/^[a-z][a-z0-9]*(?:[-_][a-z][a-z0-9]*)*$/i;function f(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function o(y){if(y===null)return"null";if(Array.isArray(y))return"array";const h=typeof y;return h==="number"&&isNaN(y)?"nan":h==="string"&&y===""?"empty-string":h}const u={type(y,h,E,S){return`Invalid type in config for key '${y}' in '${h}', got ${E}, wanted ${S}`},missing(y){return`Missing required config value at '${y}'`},convert(y,h,E){return`Unable to convert config value for key '${y}' in '${h}' to a ${E}`}};class m{constructor(h,E="mock-config",S,b=""){X(this,"filteredKeys");X(this,"notifiedFilteredKeys",new Set);this.data=h,this.context=E,this.fallback=S,this.prefix=b}static fromConfigs(h){return h.length===0?new m(void 0):h.reduce((E,{data:S,context:b,filteredKeys:L,deprecatedKeys:$})=>{const F=new m(S,b,E);if(F.filteredKeys=L,$)for(const{key:D,description:x}of $)console.warn(`The configuration key '${D}' of ${b} is deprecated and may be removed soon. ${x||""}`);return F},void 0)}has(h){var S,b;return this.readValue(h)!==void 0?!0:(b=(S=this.fallback)==null?void 0:S.has(h))!=null?b:!1}keys(){var S,b;const h=this.data?Object.keys(this.data):[],E=(b=(S=this.fallback)==null?void 0:S.keys())!=null?b:[];return[...new Set([...h,...E])]}get(h){const E=this.getOptional(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h!=null?h:"")));return E}getOptional(h){var b;const E=t()(this.readValue(h)),S=(b=this.fallback)==null?void 0:b.getOptional(h);return E===void 0?S:S===void 0?E:i()({},{value:S},{value:E},(L,$)=>!f($)||!f(L)?$:void 0).value}getConfig(h){const E=this.getOptionalConfig(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalConfig(h){var b;const E=this.readValue(h),S=(b=this.fallback)==null?void 0:b.getOptionalConfig(h);if(f(E))return this.copy(E,h,S);if(E!==void 0)throw new TypeError(u.type(this.fullKey(h),this.context,o(E),"object"));return S}getConfigArray(h){const E=this.getOptionalConfigArray(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalConfigArray(h){const E=this.readConfigValue(h,S=>{if(!Array.isArray(S))return{expected:"object-array"};for(const[b,L]of S.entries())if(!f(L))return{expected:"object-array",value:L,key:`${h}[${b}]`};return!0});if(!!E)return E.map((S,b)=>this.copy(S,`${h}[${b}]`))}getNumber(h){const E=this.getOptionalNumber(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalNumber(h){const E=this.readConfigValue(h,b=>typeof b=="number"||typeof b=="string"||{expected:"number"});if(typeof E=="number"||E===void 0)return E;const S=Number(E);if(!Number.isFinite(S))throw new Error(u.convert(this.fullKey(h),this.context,"number"));return S}getBoolean(h){const E=this.getOptionalBoolean(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalBoolean(h){return this.readConfigValue(h,E=>typeof E=="boolean"||{expected:"boolean"})}getString(h){const E=this.getOptionalString(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalString(h){return this.readConfigValue(h,E=>typeof E=="string"&&E!==""||{expected:"string"})}getStringArray(h){const E=this.getOptionalStringArray(h);if(E===void 0)throw new Error(u.missing(this.fullKey(h)));return E}getOptionalStringArray(h){return this.readConfigValue(h,E=>{if(!Array.isArray(E))return{expected:"string-array"};for(const[S,b]of E.entries())if(typeof b!="string"||b==="")return{expected:"string-array",value:b,key:`${h}[${S}]`};return!0})}fullKey(h){return`${this.prefix}${this.prefix?".":""}${h}`}copy(h,E,S){const b=new m(h,this.context,S,this.fullKey(E));return b.filteredKeys=this.filteredKeys,b}readConfigValue(h,E){var L;const S=this.readValue(h);if(S===void 0)return(L=this.fallback)==null?void 0:L.readConfigValue(h,E);const b=E(S);if(b!==!0){const{key:$=h,value:F=S,expected:D}=b;throw new TypeError(u.type(this.fullKey($),this.context,o(F),D))}return S}readValue(h){const E=h?h.split("."):[];for(const b of E)if(!R.test(b))throw new TypeError(`Invalid config key '${h}'`);if(this.data===void 0)return;let S=this.data;for(const[b,L]of E.entries())if(f(S))S=S[L];else if(S!==void 0){const $=this.fullKey(E.slice(0,b).join("."));throw new TypeError(u.type($,this.context,o(S),"object"))}return S}}},4333:function(ne,s,e){"use strict";e.d(s,{p:function(){return t}});const r="Invalid discovery URL pattern,";class t{static compile(i){const R=i.split(/\{\{\s*pluginId\s*\}\}/),f=R.join("pluginId");let o;try{o=new URL(f)}catch{throw new Error(`${r} URL '${f}' is invalid`)}if(o.hash)throw new Error(`${r} URL must not have a hash`);if(o.search)throw new Error(`${r} URL must not have a query`);if(f.endsWith("/"))throw new Error(`${r} URL must not end with a slash`);return new t(R)}constructor(i){this.parts=i}async getBaseUrl(i){return this.parts.join(i)}}},89536:function(ne,s,e){"use strict";e.d(s,{KN:function(){return r},gr:function(){return c},Jv:function(){return i}});class r{constructor(f,o){this.alertApi=f,this.errorApi=o}post(f,o){return o!=null&&o.hidden||this.alertApi.post({message:f.message,severity:"error"}),this.errorApi.post(f,o)}error$(){return this.errorApi.error$()}}var t=e(98005);class c{constructor(){X(this,"subject",new t.J)}post(f,o){this.subject.next({error:f,context:o})}error$(){return this.subject}}class i{static forward(f,o){window.addEventListener("unhandledrejection",u=>{f.post(u.reason,o)})}}},14884:function(ne,s,e){"use strict";e.d(s,{b:function(){return c}});var r=e(36964);function t(i){if(i.length<3)throw new Error(`The '${i}' feature flag must have a minimum length of three characters.`);if(i.length>150)throw new Error(`The '${i}' feature flag must not exceed 150 characters.`);if(!i.match(/^[a-z]+[a-z0-9-]+$/))throw new Error(`The '${i}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. Examples: feature-flag-one, alpha, release-2020`)}class c{constructor(){X(this,"registeredFeatureFlags",[]);X(this,"flags")}registerFlag(R){t(R.name),this.registeredFeatureFlags.push(R)}getRegisteredFlags(){return this.registeredFeatureFlags.slice()}isActive(R){return this.flags||(this.flags=this.load()),this.flags.get(R)===r.FeatureFlagState.Active}save(R){this.flags||(this.flags=this.load()),R.merge||this.flags.clear();for(const[o,u]of Object.entries(R.states))this.flags.set(o,u);const f=Array.from(this.flags.entries()).filter(([,o])=>o===r.FeatureFlagState.Active);window.localStorage.setItem("featureFlags",JSON.stringify(Object.fromEntries(f)))}load(){try{const R=window.localStorage.getItem("featureFlags");if(!R)return new Map;const f=JSON.parse(R);if(typeof f!="object"||f===null||Array.isArray(f))return new Map;const o=Object.entries(f).filter(([u,m])=>(t(u),m===r.FeatureFlagState.Active));return new Map(o)}catch{return new Map}}}},50160:function(ne,s,e){"use strict";e.d(s,{I:function(){return u},j:function(){return r}});function r(m){var E;let y=m.baseImplementation||e.g.fetch;const h=[(E=m.middleware)!=null?E:[]].flat().reverse();for(const S of h)y=S.apply(y);return{fetch:y}}class t{static create(y){var b,L;const h=c(y),E=((b=y.header)==null?void 0:b.name)||"authorization",S=((L=y.header)==null?void 0:L.value)||($=>`Bearer ${$}`);return new t(y.identityApi,h,E,S)}constructor(y,h,E,S){this.identityApi=y,this.allowUrl=h,this.headerName=E,this.headerValue=S}apply(y){return async(h,E)=>{const S=new Request(h,E),{token:b}=await this.identityApi.getCredentials();return S.headers.get(this.headerName)||typeof b!="string"||!b||!this.allowUrl(S.url)?y(h,E):(S.headers.set(this.headerName,this.headerValue(b)),y(S))}}}function c(m){return m.allowUrl?m.allowUrl:m.urlPrefixAllowlist?i(m.urlPrefixAllowlist):m.config?i([m.config.getString("backend.baseUrl")]):()=>!1}function i(m){const y=m.map(h=>h.replace(/\/$/,""));return h=>y.some(E=>h===E||h.startsWith(`${E}/`))}function R(m,y){return!y||y==="/"?m:`${m.replace(/\/$/,"")}/${y.replace(/^\//,"")}`}class f{constructor(y){this.discoveryApi=y}apply(y){return async(h,E)=>{const S=new Request(h,E),b="plugin://";if(!S.url.startsWith(b))return y(h,E);const{hostname:L,pathname:$,search:F,hash:D,username:x,password:O}=new URL(`http://${S.url.substring(b.length)}`);let w=await this.discoveryApi.getBaseUrl(L);if(x||O){const re=new URL(w),ce=`${x}${O?`:${O}`:""}@`;w=`${re.protocol}//${ce}${re.host}${re.pathname}`}const K=`${R(w,$)}${F}${D}`;return y(K,typeof h=="string"||o(h)?E:h)}}}function o(m){return typeof m=="object"&&(m==null?void 0:m.constructor)===URL}class u{static resolvePluginProtocol(y){return new f(y.discoveryApi)}static injectIdentityAuth(y){return t.create(y)}constructor(){}}},11358:function(ne,s,e){"use strict";e.d(s,{Y:function(){return R}});var r=e(98005);function t(f,o){for(const u of o)if(!f.has(u))return!1;return!0}function c(f,...o){const u=new Set(f);for(const m of o)for(const y of m)u.add(y);return u}class i{constructor(){X(this,"requests",[]);X(this,"subject",new r.X(this.getCurrentPending()))}request(o){return new Promise((u,m)=>{this.requests.push({scopes:o,resolve:u,reject:m}),this.subject.next(this.getCurrentPending())})}resolve(o,u){this.requests=this.requests.filter(m=>t(o,m.scopes)?(m.resolve(u),!1):!0),this.subject.next(this.getCurrentPending())}reject(o){this.requests.forEach(u=>u.reject(o)),this.requests=[],this.subject.next(this.getCurrentPending())}pending(){return this.subject}getCurrentPending(){const o=this.requests.length===0?void 0:this.requests.slice(1).reduce((u,m)=>c(u,m.scopes),this.requests[0].scopes);return{scopes:o,resolve:u=>{o&&this.resolve(o,u)},reject:u=>{o&&this.reject(u)}}}}class R{constructor(){X(this,"subject",new r.X([]));X(this,"currentRequests",[]);X(this,"handlerCount",0)}createAuthRequester(o){const u=new i,m=this.handlerCount;return this.handlerCount++,u.pending().subscribe({next:y=>{const h=this.currentRequests.slice(),E=this.makeAuthRequest(y,o);E?h[m]=E:delete h[m],this.currentRequests=h,this.subject.next(h.filter(Boolean))}}),y=>u.request(y)}makeAuthRequest(o,u){const{scopes:m}=o;if(!!m)return{provider:u.provider,trigger:async()=>{const y=await u.onAuthRequest(m);o.resolve(y)},reject:()=>{const y=new Error("Login failed, rejected by user");y.name="RejectedError",o.reject(y)}}}authRequest$(){return this.subject}}},56054:function(ne,s,e){"use strict";e.d(s,{C:function(){return i}});var r=e(82394),t=e.n(r);const c=new Map;class i{constructor(f,o){X(this,"subscribers",new Set);X(this,"observable",new(t())(f=>(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));this.namespace=f,this.errorApi=o}static create(f){var o;return new i((o=f.namespace)!=null?o:"",f.errorApi)}get(f){return this.snapshot(f).value}snapshot(f){let o,u="absent";try{const m=localStorage.getItem(this.getKeyName(f));m&&(o=JSON.parse(m,(y,h)=>(typeof h=="object"&&h!==null&&Object.freeze(h),h)),u="present")}catch{this.errorApi.post(new Error(`Error when parsing JSON config from storage for: ${f}`))}return{key:f,value:o,presence:u}}forBucket(f){const o=`${this.namespace}/${f}`;return c.has(o)||c.set(o,new i(o,this.errorApi)),c.get(o)}async set(f,o){localStorage.setItem(this.getKeyName(f),JSON.stringify(o)),this.notifyChanges(f)}async remove(f){localStorage.removeItem(this.getKeyName(f)),this.notifyChanges(f)}observe$(f){return this.observable.filter(({key:o})=>o===f)}getKeyName(f){return`${this.namespace}/${encodeURIComponent(f)}`}notifyChanges(f){const o=this.snapshot(f);for(const u of this.subscribers)u.next(o)}}},59589:function(ne,s,e){"use strict";e.d(s,{u:function(){return c}});var r=e(91205);const t={id:"atlassian",title:"Atlassian",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o})}}},6098:function(ne,s,e){"use strict";e.d(s,{Z:function(){return c}});var r=e(91205);const t={id:"bitbucket",title:"Bitbucket",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["team"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},44431:function(ne,s,e){"use strict";e.d(s,{BitbucketAuth:function(){return c.Z}});var r=e(19347),t=e.n(r);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var c=e(6098)},19347:function(){},44474:function(ne,s,e){"use strict";e.d(s,{T:function(){return c}});var r=e(91205);const t={id:"github",title:"GitHub",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read:user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},2922:function(ne,s,e){"use strict";e.d(s,{a:function(){return c}});var r=e(91205);const t={id:"gitlab",title:"GitLab",icon:()=>null};class c{static create(R){const{discoveryApi:f,environment:o="development",provider:u=t,oauthRequestApi:m,defaultScopes:y=["read_user"]}=R;return r.OAuth2.create({discoveryApi:f,oauthRequestApi:m,provider:u,environment:o,defaultScopes:y})}}},59938:function(ne,s,e){"use strict";e.d(s,{e:function(){return i}});var r=e(91205);const t={id:"google",title:"Google",icon:()=>null},c="https://www.googleapis.com/auth/";class i{static create(f){const{discoveryApi:o,oauthRequestApi:u,environment:m="development",provider:y=t,defaultScopes:h=["openid",`${c}userinfo.email`,`${c}userinfo.profile`]}=f;return r.OAuth2.create({discoveryApi:o,oauthRequestApi:u,provider:y,environment:m,defaultScopes:h,scopeTransform(E){return E.map(S=>S==="openid"?S:S==="profile"||S==="email"?`${c}userinfo.${S}`:S.startsWith(c)?S:`${c}${S}`)}})}}},91668:function(ne,s,e){"use strict";e.d(s,{AtlassianAuth:function(){return y.u},BitbucketAuth:function(){return m.BitbucketAuth},GithubAuth:function(){return r.T},GitlabAuth:function(){return t.a},GoogleAuth:function(){return c.e},MicrosoftAuth:function(){return o._},OktaAuth:function(){return R.s},OneLoginAuth:function(){return u.$}});var r=e(44474),t=e(2922),c=e(59938),i=e(91205);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}});var R=e(26079),f=e(67604),o=e(38482),u=e(58381),m=e(44431);e.o(m,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return m.AlertApiForwarder}}),e.o(m,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return m.AppThemeSelector}}),e.o(m,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return m.AtlassianAuth}}),e.o(m,"ConfigReader")&&e.d(s,{ConfigReader:function(){return m.ConfigReader}}),e.o(m,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return m.ErrorAlerter}}),e.o(m,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return m.ErrorApiForwarder}}),e.o(m,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return m.FetchMiddlewares}}),e.o(m,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return m.FlatRoutes}}),e.o(m,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return m.LocalStorageFeatureFlags}}),e.o(m,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return m.NoOpAnalyticsApi}}),e.o(m,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return m.OAuthRequestManager}}),e.o(m,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return m.UnhandledErrorForwarder}}),e.o(m,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return m.UrlPatternDiscovery}}),e.o(m,"WebStorage")&&e.d(s,{WebStorage:function(){return m.WebStorage}}),e.o(m,"createFetchApi")&&e.d(s,{createFetchApi:function(){return m.createFetchApi}}),e.o(m,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return m.createSpecializedApp}}),e.o(m,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return m.defaultConfigLoader}});var y=e(59589)},38482:function(ne,s,e){"use strict";e.d(s,{_:function(){return c}});var r=e(91205);const t={id:"microsoft",title:"Microsoft",icon:()=>null};class c{static create(R){const{environment:f="development",provider:o=t,oauthRequestApi:u,discoveryApi:m,defaultScopes:y=["openid","offline_access","profile","email","User.Read"]}=R;return r.OAuth2.create({discoveryApi:m,oauthRequestApi:u,provider:o,environment:f,defaultScopes:y})}}},73124:function(ne,s,e){"use strict";e.d(s,{Z:function(){return f}});function r(o){return new Promise((u,m)=>{const y=o.width||500,h=o.height||700,E=window.screen.width/2-y/2,S=window.screen.height/2-h/2,b=window.open(o.url,o.name,`menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${y},height=${h},top=${S},left=${E}`);let L="";if(!b||typeof b.closed=="undefined"||b.closed){const x=new Error("Failed to open auth popup.");x.name="PopupRejectedError",m(x);return}const $=x=>{if(x.source!==b||x.origin!==o.origin)return;const{data:O}=x;if(O.type==="config_info"){L=O.targetOrigin;return}if(O.type!=="authorization_response")return;const w=O;if("error"in w){const K=new Error(w.error.message);K.name=w.error.name,m(K)}else u(w.response);D()},F=setInterval(()=>{if(b.closed){const x=`Login failed, ${L&&L!==window.location.origin?`Incorrect app origin, expected ${L}`:"popup was closed"}`,O=new Error(x);O.name="PopupClosedError",m(O),D()}},100);function D(){window.removeEventListener("message",$),clearInterval(F)}window.addEventListener("message",$)})}function t(o){return[...o].join(" ")}class c{constructor(u){X(this,"discoveryApi");X(this,"environment");X(this,"provider");X(this,"joinScopesFunc");X(this,"authRequester");X(this,"sessionTransform");const{discoveryApi:m,environment:y,provider:h,joinScopes:E=t,oauthRequestApi:S,sessionTransform:b=L=>L}=u;this.authRequester=S.createAuthRequester({provider:h,onAuthRequest:L=>this.showPopup(L)}),this.discoveryApi=m,this.environment=y,this.provider=h,this.joinScopesFunc=E,this.sessionTransform=b}async createSession(u){return u.instantPopup?this.showPopup(u.scopes):this.authRequester(u.scopes)}async refreshSession(){const u=await fetch(await this.buildUrl("/refresh",{optional:!0}),{headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(y=>{throw new Error(`Auth refresh request failed, ${y}`)});if(!u.ok){const y=new Error(`Auth refresh request failed, ${u.statusText}`);throw y.status=u.status,y}const m=await u.json();if(m.error){const y=new Error(m.error.message);throw m.error.name&&(y.name=m.error.name),y}return await this.sessionTransform(m)}async removeSession(){const u=await fetch(await this.buildUrl("/logout"),{method:"POST",headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"}).catch(m=>{throw new Error(`Logout request failed, ${m}`)});if(!u.ok){const m=new Error(`Logout request failed, ${u.statusText}`);throw m.status=u.status,m}}async showPopup(u){const m=this.joinScopesFunc(u),y=await this.buildUrl("/start",{scope:m,origin:location.origin}),h=await r({url:y,name:`${this.provider.title} Login`,origin:new URL(y).origin,width:450,height:730});return await this.sessionTransform(h)}async buildUrl(u,m){const y=await this.discoveryApi.getBaseUrl("auth"),h=this.buildQueryString({...m,env:this.environment});return`${y}/${this.provider.id}${u}${h}`}buildQueryString(u){if(!u)return"";const m=Object.entries(u).map(([y,h])=>{if(typeof h=="string")return`${encodeURIComponent(y)}=${encodeURIComponent(h)}`;if(h)return encodeURIComponent(y)}).filter(Boolean).join("&");return m?`?${m}`:""}}var i=e(57018);const R={id:"oauth2",title:"Your Identity Provider",icon:()=>null};class f{constructor(u){X(this,"sessionManager");X(this,"scopeTransform");this.sessionManager=u.sessionManager,this.scopeTransform=u.scopeTransform}static create(u){const{discoveryApi:m,environment:y="development",provider:h=R,oauthRequestApi:E,defaultScopes:S=[],scopeTransform:b=F=>F}=u,L=new c({discoveryApi:m,environment:y,provider:h,oauthRequestApi:E,sessionTransform(F){return{...F,providerInfo:{idToken:F.providerInfo.idToken,accessToken:F.providerInfo.accessToken,scopes:f.normalizeScopes(b,F.providerInfo.scope),expiresAt:new Date(Date.now()+F.providerInfo.expiresInSeconds*1e3)}}}}),$=new i.RefreshingAuthSessionManager({connector:L,defaultScopes:new Set(S),sessionScopes:F=>F.providerInfo.scopes,sessionShouldRefresh:F=>(F.providerInfo.expiresAt.getTime()-Date.now())/1e3<60*5});return new f({sessionManager:$,scopeTransform:b})}async signIn(){await this.getAccessToken()}async signOut(){await this.sessionManager.removeSession()}sessionState$(){return this.sessionManager.sessionState$()}async getAccessToken(u,m){var E;const y=f.normalizeScopes(this.scopeTransform,u),h=await this.sessionManager.getSession({...m,scopes:y});return(E=h==null?void 0:h.providerInfo.accessToken)!=null?E:""}async getIdToken(u={}){var y;const m=await this.sessionManager.getSession(u);return(y=m==null?void 0:m.providerInfo.idToken)!=null?y:""}async getBackstageIdentity(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.backstageIdentity}async getProfile(u={}){const m=await this.sessionManager.getSession(u);return m==null?void 0:m.profile}static normalizeScopes(u,m){if(!m)return new Set;const y=Array.isArray(m)?m:m.split(/[\s|,]/).filter(Boolean);return new Set(u(y))}}},91205:function(ne,s,e){"use strict";e.d(s,{OAuth2:function(){return r.Z}});var r=e(73124),t=e(5973),c=e.n(t);e.o(t,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder}}),e.o(t,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return t.AppThemeSelector}}),e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"ConfigReader")&&e.d(s,{ConfigReader:function(){return t.ConfigReader}}),e.o(t,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return t.ErrorAlerter}}),e.o(t,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return t.ErrorApiForwarder}}),e.o(t,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return t.FetchMiddlewares}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi}}),e.o(t,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return t.OAuthRequestManager}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder}}),e.o(t,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return t.UrlPatternDiscovery}}),e.o(t,"WebStorage")&&e.d(s,{WebStorage:function(){return t.WebStorage}}),e.o(t,"createFetchApi")&&e.d(s,{createFetchApi:function(){return t.createFetchApi}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},5973:function(){},26079:function(ne,s,e){"use strict";e.d(s,{s:function(){return R}});var r=e(91205);const t={id:"okta",title:"Okta",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="okta.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:h,defaultScopes:E=["openid","email","profile","offline_access"]}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:h,provider:y,environment:m,defaultScopes:E,scopeTransform(S){return S.map(b=>c.has(b)||b.startsWith(i)?b:`${i}${b}`)}})}}},58381:function(ne,s,e){"use strict";e.d(s,{$:function(){return R}});var r=e(91205);const t={id:"onelogin",title:"onelogin",icon:()=>null},c=new Set(["openid","profile","email","phone","address","groups","offline_access"]),i="onelogin.";class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=t,oauthRequestApi:h}=o;return r.OAuth2.create({discoveryApi:u,oauthRequestApi:h,provider:y,environment:m,defaultScopes:["openid","email","profile","offline_access"],scopeTransform(E){return E.map(S=>c.has(S)||S.startsWith(i)?S:`${i}${S}`)}})}}},67604:function(ne,s,e){"use strict";var r=e(57018),t=e(30195);const c=t.z.object({profile:t.z.object({email:t.z.string().optional(),displayName:t.z.string().optional(),picture:t.z.string().optional()}),backstageIdentity:t.z.object({token:t.z.string(),identity:t.z.object({type:t.z.literal("user"),userEntityRef:t.z.string(),ownershipEntityRefs:t.z.array(t.z.string())})})}),i={id:"saml",title:"SAML",icon:()=>null};class R{static create(o){const{discoveryApi:u,environment:m="development",provider:y=i}=o,h=new DirectAuthConnector({discoveryApi:u,environment:m,provider:y}),E=new StaticAuthSessionManager({connector:h}),S=new AuthSessionStore({manager:E,storageKey:`${y.id}Session`,schema:samlSessionSchema});return new R(S)}sessionState$(){return this.sessionManager.sessionState$()}constructor(o){this.sessionManager=o}async signIn(){await this.getBackstageIdentity({})}async signOut(){await this.sessionManager.removeSession()}async getBackstageIdentity(o={}){const u=await this.sessionManager.getSession(o);return u==null?void 0:u.backstageIdentity}async getProfile(o={}){const u=await this.sessionManager.getSession(o);return u==null?void 0:u.profile}}},91631:function(ne,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.C},AppThemeSelector:function(){return i.C},AtlassianAuth:function(){return r.AtlassianAuth},ConfigReader:function(){return R.m},ErrorAlerter:function(){return o.KN},ErrorApiForwarder:function(){return o.gr},FetchMiddlewares:function(){return m.I},GithubAuth:function(){return r.GithubAuth},GitlabAuth:function(){return r.GitlabAuth},GoogleAuth:function(){return r.GoogleAuth},LocalStorageFeatureFlags:function(){return u.b},MicrosoftAuth:function(){return r.MicrosoftAuth},NoOpAnalyticsApi:function(){return c.g},OAuthRequestManager:function(){return y.Y},OktaAuth:function(){return r.OktaAuth},OneLoginAuth:function(){return r.OneLoginAuth},UnhandledErrorForwarder:function(){return o.Jv},UrlPatternDiscovery:function(){return f.p},WebStorage:function(){return h.C},createFetchApi:function(){return m.j}});var r=e(91668);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(23235),c=e(47150),i=e(58652),R=e(14721),f=e(4333),o=e(89536),u=e(14884),m=e(50160),y=e(11358),h=e(56054)},56494:function(ne,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return t.AlertApiForwarder},ApiProvider:function(){return r.ApiProvider},AppThemeSelector:function(){return t.AppThemeSelector},ConfigReader:function(){return t.ConfigReader},ErrorAlerter:function(){return t.ErrorAlerter},ErrorApiForwarder:function(){return t.ErrorApiForwarder},FetchMiddlewares:function(){return t.FetchMiddlewares},LocalStorageFeatureFlags:function(){return t.LocalStorageFeatureFlags},NoOpAnalyticsApi:function(){return t.NoOpAnalyticsApi},OAuthRequestManager:function(){return t.OAuthRequestManager},UnhandledErrorForwarder:function(){return t.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return t.UrlPatternDiscovery},WebStorage:function(){return t.WebStorage},createFetchApi:function(){return t.createFetchApi}});var r=e(76105);e.o(r,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder}}),e.o(r,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return r.AppThemeSelector}}),e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"ConfigReader")&&e.d(s,{ConfigReader:function(){return r.ConfigReader}}),e.o(r,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return r.ErrorAlerter}}),e.o(r,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return r.ErrorApiForwarder}}),e.o(r,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return r.FetchMiddlewares}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return r.LocalStorageFeatureFlags}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi}}),e.o(r,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return r.OAuthRequestManager}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder}}),e.o(r,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return r.UrlPatternDiscovery}}),e.o(r,"WebStorage")&&e.d(s,{WebStorage:function(){return r.WebStorage}}),e.o(r,"createFetchApi")&&e.d(s,{createFetchApi:function(){return r.createFetchApi}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(91631);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}}),e.o(t,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return t.createSpecializedApp}}),e.o(t,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return t.defaultConfigLoader}})},80396:function(ne,s,e){"use strict";e.d(s,{p:function(){return t}});var r;(function(c){c[c.default=10]="default";const i=50;c[c.app=i]="app",c[c.static=100]="static"})(r||(r={}));class t{constructor(){X(this,"factories",new Map)}register(i,R){const f=r[i],o=this.factories.get(R.api.id);return o&&o.priority>=f?!1:(this.factories.set(R.api.id,{priority:f,factory:R}),!0)}get(i){const R=this.factories.get(i.id);if(!!R)return R.factory}getAllApis(){const i=new Set;for(const{factory:R}of this.factories.values())i.add(R.api);return i}}},14406:function(ne,s,e){"use strict";e.d(s,{g:function(){return o}});var r=e(2784),t=e(13980),c=e.n(t);class i{constructor(...m){X(this,"holders");this.holders=m}get(m){for(const y of this.holders){const h=y.get(m);if(h)return h}}}var R=e(76241);const f=(0,R.CT)("api-context"),o=u=>{var S;const{apis:m,children:y}=u,h=(S=(0,r.useContext)(f))==null?void 0:S.atVersion(1),E=h?new i(m,h):m;return r.createElement(f.Provider,{value:(0,R.EI)({1:E}),children:y})};o.propTypes={apis:c().shape({get:c().func.isRequired}).isRequired,children:c().node}},12132:function(ne,s,e){"use strict";e.d(s,{M:function(){return r}});class r{constructor(c){X(this,"apis",new Map);this.factories=c}static validateFactories(c,i){for(const R of i){const f=[R],o=new Set;for(;f.length;){const u=f.shift(),m=c.get(u);if(!!m)for(const y of Object.values(m.deps)){if(y.id===R.id)throw new Error(`Circular dependency of api factory for ${R}`);o.has(y)||(o.add(y),f.push(y))}}}}get(c){return this.load(c)}load(c,i=[]){const R=this.apis.get(c.id);if(R)return R;const f=this.factories.get(c);if(!f)return;if(i.includes(f.api))throw new Error(`Circular dependency of api factory for ${f.api}`);const o=this.loadDeps(c,f.deps,[...i,f.api]),u=f.factory(o);return this.apis.set(c.id,u),u}loadDeps(c,i,R){const f={};for(const o in i)if(i.hasOwnProperty(o)){const u=i[o],m=this.load(u,R);if(!m)throw new Error(`No API factory available for dependency ${u} of dependent ${c}`);f[o]=m}return f}}},76105:function(ne,s,e){"use strict";e.d(s,{ApiFactoryRegistry:function(){return c.p},ApiProvider:function(){return r.g},ApiResolver:function(){return t.M}});var r=e(14406),t=e(12132),c=e(80396),i=e(82488),R=e.n(i);e.o(i,"AlertApiForwarder")&&e.d(s,{AlertApiForwarder:function(){return i.AlertApiForwarder}}),e.o(i,"AppThemeSelector")&&e.d(s,{AppThemeSelector:function(){return i.AppThemeSelector}}),e.o(i,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return i.AtlassianAuth}}),e.o(i,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return i.BitbucketAuth}}),e.o(i,"ConfigReader")&&e.d(s,{ConfigReader:function(){return i.ConfigReader}}),e.o(i,"ErrorAlerter")&&e.d(s,{ErrorAlerter:function(){return i.ErrorAlerter}}),e.o(i,"ErrorApiForwarder")&&e.d(s,{ErrorApiForwarder:function(){return i.ErrorApiForwarder}}),e.o(i,"FetchMiddlewares")&&e.d(s,{FetchMiddlewares:function(){return i.FetchMiddlewares}}),e.o(i,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return i.FlatRoutes}}),e.o(i,"GithubAuth")&&e.d(s,{GithubAuth:function(){return i.GithubAuth}}),e.o(i,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return i.GitlabAuth}}),e.o(i,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return i.GoogleAuth}}),e.o(i,"LocalStorageFeatureFlags")&&e.d(s,{LocalStorageFeatureFlags:function(){return i.LocalStorageFeatureFlags}}),e.o(i,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return i.MicrosoftAuth}}),e.o(i,"NoOpAnalyticsApi")&&e.d(s,{NoOpAnalyticsApi:function(){return i.NoOpAnalyticsApi}}),e.o(i,"OAuthRequestManager")&&e.d(s,{OAuthRequestManager:function(){return i.OAuthRequestManager}}),e.o(i,"OktaAuth")&&e.d(s,{OktaAuth:function(){return i.OktaAuth}}),e.o(i,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return i.OneLoginAuth}}),e.o(i,"UnhandledErrorForwarder")&&e.d(s,{UnhandledErrorForwarder:function(){return i.UnhandledErrorForwarder}}),e.o(i,"UrlPatternDiscovery")&&e.d(s,{UrlPatternDiscovery:function(){return i.UrlPatternDiscovery}}),e.o(i,"WebStorage")&&e.d(s,{WebStorage:function(){return i.WebStorage}}),e.o(i,"createFetchApi")&&e.d(s,{createFetchApi:function(){return i.createFetchApi}}),e.o(i,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return i.createSpecializedApp}}),e.o(i,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return i.defaultConfigLoader}})},82488:function(){},82370:function(ne,s,e){"use strict";e.d(s,{b:function(){return nt}});var r=e(2784),t=e(10289),c=e(64279),i=e(56494),R=e(36964),f=e(76105);function o(J){const z={};for(const ue in J.collectors)J.collectors.hasOwnProperty(ue)&&(z[ue]=J.collectors[ue]());const q=[{node:r.Children.toArray(J.root),parent:void 0,contexts:{}}];for(;q.length!==0;){const{node:ue,parent:fe,contexts:Pe}=q.shift();r.Children.forEach(ue,Oe=>{if(!(0,r.isValidElement)(Oe))return;const Ce={};for(const Qe in z)if(z.hasOwnProperty(Qe)){const Ke=z[Qe];Ce[Qe]=Ke.visit(Ke.accumulator,Oe,fe,Pe[Qe])}for(const Qe of J.discoverers){const Ke=Qe(Oe);Ke&&q.push({node:Ke,parent:Oe,contexts:Ce})}})}return Object.fromEntries(Object.entries(z).map(([ue,fe])=>[ue,fe.accumulator]))}function u(J,z){return()=>({accumulator:J(),visit:z})}function m(J){var z;return(z=J.props)==null?void 0:z.children}function y(J){var z,q,ue;if(((z=J.props)==null?void 0:z.path)&&((q=J.props)==null?void 0:q.element))return(ue=J.props)==null?void 0:ue.element}const h=u(()=>new Set,(J,z)=>{const q=(0,R.getComponentData)(z,"core.plugin");q&&J.add(q)});var E=e(88934);const S={caseSensitive:!1,path:"/*",element:"match-all",routeRefs:new Set},b=u(()=>({paths:new Map,parents:new Map,objects:new Array}),(J,z,q,ue)=>{var Lt,bt,Pt,Wt,Ht;if((q==null?void 0:q.props.element)===z)return ue;let fe=ue==null?void 0:ue.obj,Pe=ue==null?void 0:ue.routeRef,Oe=ue==null?void 0:ue.sticky;const Ce=(Lt=z.props)==null?void 0:Lt.path,Qe=(bt=fe==null?void 0:fe.children)!=null?bt:J.objects,Ke=Boolean((Pt=z.props)==null?void 0:Pt.caseSensitive);let pt=ue==null?void 0:ue.path;if((0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");pt=Ce}const St=(Wt=z.props)==null?void 0:Wt.element;let ut=(0,R.getComponentData)(z,"core.mountPoint");if(!ut&&(0,r.isValidElement)(St)&&(ut=(0,R.getComponentData)(St,"core.mountPoint")),ut){let dn=Ce;if(pt&&(dn?pt=void 0:dn=pt),!dn)throw new Error("Mounted routable extension must have a path");J.paths.set(ut,dn),Pe&&Oe?(J.parents.set(ut,Pe),Ce&&(Pe=ut,Oe=!1)):(J.parents.set(ut,Pe),Pe=ut),Ce?(fe={caseSensitive:Ke,path:Ce,element:"mounted",routeRefs:new Set([ut]),children:[S],plugin:(0,R.getComponentData)(z.props.element,"core.plugin")},Qe.push(fe)):fe==null||fe.routeRefs.add(ut)}if((0,R.getComponentData)(z,"core.gatherMountPoints")&&(Oe=!0),(0,R.getComponentData)(z,"core.gatherMountPoints")){if(!Ce)throw new Error("Mount point gatherer must have a path");ut||(fe={caseSensitive:Ke,path:Ce,element:"gathered",routeRefs:new Set,children:[S],plugin:(Ht=ue==null?void 0:ue.obj)==null?void 0:Ht.plugin},Qe.push(fe))}return{obj:fe,path:pt,routeRef:Pe,sticky:Oe}}),L=u(()=>new Set,(J,z)=>{if(z.type===E.L){const q=z.props;J.add("with"in q?q.with:q.without)}});var $=e(76241);const F=(0,$.uW)("route-ref-type",()=>Symbol("route-ref-type"));function D(J){return J[F]==="absolute"}function x(J){return J[F]==="sub"}function O(J){return J[F]==="external"}function w(...J){const z=J.join("/").replace(/\/\/+/g,"/");return z!=="/"&&z.endsWith("/")?z.slice(0,-1):z}function K(J,z,q){let ue,fe="";if(D(J))ue=J;else if(x(J))ue=J.parent,fe=J.path;else if(O(J)){const Ce=q.get(J);if(!Ce)return[void 0,""];if(D(Ce))ue=Ce;else if(x(Ce))ue=Ce.parent,fe=Ce.path;else throw new Error(`ExternalRouteRef was bound to invalid target, ${Ce}`)}else throw J[F]?new Error(`Unknown or invalid route ref type, ${J[F]}`):new Error(`Unknown object passed to useRouteRef, got ${J}`);if(!ue)return[void 0,""];const Pe=z.get(ue);if(!Pe)return[void 0,""];const Oe=w(Pe,fe);return[ue,Oe]}function re(J,z,q,ue,fe){var pt;const Pe=(pt=(0,t.fp)(fe,z))!=null?pt:[],Oe=Array();let Ce=-1;for(let St=J;St&&(Ce=Pe.findIndex(ut=>ut.route.routeRefs.has(St)),Ce===-1);St=ue.get(St))Oe.unshift(St);Oe.length===0&&(Ce-=1);const Qe=Ce===-1?"":Pe[Ce].pathname,Ke=w(...Oe.slice(0,-1).map(St=>{const ut=q.get(St);if(!ut)throw new Error(`No path for ${St}`);if(ut.includes(":"))throw new Error(`Cannot route to ${J} with parent ${St} as it has parameters`);return ut}));return Qe+Ke}class ce{constructor(z,q,ue,fe,Pe){this.routePaths=z,this.routeParents=q,this.routeObjects=ue,this.routeBindings=fe,this.appBasePath=Pe}resolve(z,q){const[ue,fe]=K(z,this.routePaths,this.routeBindings);if(!ue)return;let Pe;typeof q=="string"?Pe=this.trimPath(q):q.pathname?Pe={...q,pathname:this.trimPath(q.pathname)}:Pe=q;const Oe=this.appBasePath+re(ue,Pe,this.routePaths,this.routeParents,this.routeObjects);return(...[Qe])=>Oe+(0,t.Gn)(fe,Qe)}trimPath(z){return z&&(z.startsWith(this.appBasePath)?z.slice(this.appBasePath.length):z)}}const Se=(0,$.CT)("routing-context"),De=({routePaths:J,routeParents:z,routeObjects:q,routeBindings:ue,basePath:fe="",children:Pe})=>{const Oe=new ce(J,z,q,ue,fe),Ce=(0,$.EI)({1:Oe});return r.createElement(Se.Provider,{value:Ce},Pe)},Fe=(J,z)=>{var q,ue;try{const fe=(0,t.fp)(z,{pathname:J}),Pe=(q=fe==null?void 0:fe.filter(Ce=>{var Qe;return((Qe=Ce==null?void 0:Ce.route.routeRefs)==null?void 0:Qe.size)>0}).pop())==null?void 0:q.route;if(!Pe)return{};let Oe;return Pe.routeRefs.size===1&&(Oe=Pe.routeRefs.values().next().value),{extension:"App",pluginId:((ue=Pe.plugin)==null?void 0:ue.getId())||"root",...Oe?{routeRef:Oe.id}:{}}}catch{return{}}},He=({pathname:J,search:z,hash:q})=>{const ue=(0,R.useAnalytics)();return(0,r.useEffect)(()=>{ue.captureEvent("navigate",`${J}${z}${q}`)},[ue,J,z,q]),null},Ae=({routeObjects:J})=>{const{pathname:z,search:q,hash:ue}=(0,t.TH)();return r.createElement(R.AnalyticsContext,{attributes:Fe(z,J)},r.createElement(He,{pathname:z,search:q,hash:ue}))};function Je(J,z){const q=new Set(z.values());q.delete(void 0);for(const ue of z.keys()){if(q.has(ue))continue;let fe=ue,Pe="";for(;fe;){const Ce=J.get(fe);if(!Ce)throw new Error(`No path for ${fe}`);Pe=`${Ce}${Pe}`,fe=z.get(fe)}const Oe=Pe.match(/:(\w+)/g);if(Oe){for(let Ce=0;Ce<Oe.length;Ce++)for(let Qe=Ce+1;Qe<Oe.length;Qe++)if(Oe[Qe]===Oe[Ce])throw new Error(`Parameter ${Oe[Qe]} is duplicated in path ${Pe}`)}}}function tt(J,z){for(const q of z)if(!!q.externalRoutes){for(const[ue,fe]of Object.entries(q.externalRoutes))if(!fe.optional&&!J.has(fe))throw new Error(`External route '${ue}' of the '${q.getId()}' plugin must be bound to a target route. See https://backstage.io/link?bind-routes for details.`)}}const Tt=(0,$.CT)("app-context"),At=({appContext:J,children:z})=>{const q=(0,$.EI)({1:J});return r.createElement(Tt.Provider,{value:q,children:z})};function Ie(J){return new Error(`Tried to access IdentityApi ${J} before app was loaded`)}function ht(J){console.warn(`WARNING: Call to ${J} is deprecated and will break in the future`)}class gt{constructor(){X(this,"target");X(this,"waitForTarget");X(this,"resolveTarget",()=>{});X(this,"signOutTargetUrl","/");this.waitForTarget=new Promise(z=>{this.resolveTarget=z})}setTarget(z,q){this.target=z,this.signOutTargetUrl=q.signOutTargetUrl,this.resolveTarget(z)}getUserId(){if(!this.target)throw Ie("getUserId");if(!this.target.getUserId)throw new Error("IdentityApi does not implement getUserId");return ht("getUserId"),this.target.getUserId()}getProfile(){if(!this.target)throw Ie("getProfile");if(!this.target.getProfile)throw new Error("IdentityApi does not implement getProfile");return ht("getProfile"),this.target.getProfile()}async getProfileInfo(){return this.waitForTarget.then(z=>z.getProfileInfo())}async getBackstageIdentity(){const z=await this.waitForTarget.then(q=>q.getBackstageIdentity());return z.userEntityRef.match(/^.*:.*\/.*$/)||console.warn(`WARNING: The App IdentityApi provided an invalid userEntityRef, '${z.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`),z}async getCredentials(){return this.waitForTarget.then(z=>z.getCredentials())}async getIdToken(){return this.waitForTarget.then(z=>{if(!z.getIdToken)throw new Error("IdentityApi does not implement getIdToken");return ht("getIdToken"),z.getIdToken()})}async signOut(){await this.waitForTarget.then(z=>z.signOut()),location.href=this.signOutTargetUrl}}var lt=e(72164);function _(J,z,q){if(J!==void 0){const fe=q.find(Pe=>Pe.id===J);if(fe)return fe}if(z){const fe=q.find(Pe=>Pe.variant==="dark");if(fe)return fe}const ue=q.find(fe=>fe.variant==="light");return ue||q[0]}const pe=()=>{const J=(0,r.useMemo)(()=>window.matchMedia("(prefers-color-scheme: dark)"),[]),[z,q]=(0,r.useState)(J.matches);return(0,r.useEffect)(()=>{const ue=fe=>{q(fe.matches)};return J.addListener(ue),()=>{J.removeListener(ue)}},[J]),z};function be({children:J}){const z=(0,R.useApi)(R.appThemeApiRef),q=(0,lt.Z)(z.activeThemeId$(),z.getActiveThemeId()),ue=Boolean(window.matchMedia)?pe():!1,fe=_(q,ue,z.getInstalledThemes());if(!fe)throw new Error("App has no themes");return r.createElement(fe.Provider,{children:J})}var We=e(46611);class et{constructor(){X(this,"apis",[])}add(z,q){return this.apis.push([z.id,q]),q}build(){return new at(new Map(this.apis))}}class at{static builder(){return new et}static from(z){return new at(new Map(z.map(([q,ue])=>[q.id,ue])))}static with(z,q){return new at(new Map([[z.id,q]]))}constructor(z){this.apis=z}with(z,q){return new at(new Map([...this.apis,[z.id,q]]))}get(z){return this.apis.get(z.id)}}function yt(J){const z=new Map;return J&&J({bind:(ue,fe)=>{for(const[Pe,Oe]of Object.entries(fe)){const Ce=ue[Pe];if(!Ce)throw new Error(`Key ${Pe} is not an existing external route`);if(!Oe&&!Ce.optional)throw new Error(`External route ${Pe} is required but was undefined`);Oe&&z.set(Ce,Oe)}}}),z}const ie=(0,r.createContext)({routeObjects:[]});function ae(J){var q;let{pathname:z}=new URL((q=J.getOptionalString("app.baseUrl"))!=null?q:"/","http://dummy.dev");return z=z.replace(/\/*$/,""),z}function Ye(J,z,q){var Qe;const ue=Boolean(J),fe=(0,c.default)(J||(()=>Promise.resolve([])));let Pe;if(ue&&fe.loading){const{Progress:Ke}=z;Pe=r.createElement(Ke,null)}else if(fe.error){const{BootErrorPage:Ke}=z;Pe=r.createElement(Ke,{step:"load-config",error:fe.error})}const{ThemeProvider:Oe=be}=z;return Pe?{node:r.createElement(i.ApiProvider,{apis:at.with(R.appThemeApiRef,q)},r.createElement(Oe,null,Pe))}:{api:i.ConfigReader.fromConfigs((Qe=fe.value)!=null?Qe:[])}}class Ge{constructor(z){this.app=z}getPlugins(){return this.app.getPlugins()}getSystemIcon(z){return this.app.getSystemIcon(z)}getComponents(){return this.app.getComponents()}}class we{constructor(z){X(this,"apiHolder");X(this,"configApi");X(this,"apis");X(this,"icons");X(this,"plugins");X(this,"components");X(this,"themes");X(this,"configLoader");X(this,"defaultApis");X(this,"bindRoutes");X(this,"appIdentityProxy",new gt);X(this,"apiFactoryRegistry");var q,ue,fe,Pe;this.apis=(q=z.apis)!=null?q:[],this.icons=z.icons,this.plugins=new Set((ue=z.plugins)!=null?ue:[]),this.components=z.components,this.themes=z.themes,this.configLoader=(fe=z.configLoader)!=null?fe:We.t,this.defaultApis=(Pe=z.defaultApis)!=null?Pe:[],this.bindRoutes=z.bindRoutes,this.apiFactoryRegistry=new f.ApiFactoryRegistry}getPlugins(){return Array.from(this.plugins)}getSystemIcon(z){return this.icons[z]}getComponents(){return this.components}getProvider(){const z=new Ge(this);let q=!1;return({children:fe})=>{const Pe=(0,r.useMemo)(()=>i.AppThemeSelector.createWithStorage(this.themes),[]),{routing:Oe,featureFlags:Ce,routeBindings:Qe}=(0,r.useMemo)(()=>{const ut=o({root:fe,discoverers:[m,y],collectors:{routing:b,collectedPlugins:h,featureFlags:L}});return ut.collectedPlugins.forEach(xt=>this.plugins.add(xt)),this.verifyPlugins(this.plugins),this.getApiHolder(),{...ut,routeBindings:yt(this.bindRoutes)}},[fe]);q||(q=!0,Je(Oe.paths,Oe.parents),tt(Qe,this.plugins));const Ke=Ye(this.configLoader,this.components,Pe),pt="api"in Ke;if(pt){const{api:ut}=Ke;this.configApi=ut}if((0,r.useEffect)(()=>{if(pt){const ut=this.getApiHolder().get(R.featureFlagsApiRef);for(const xt of this.plugins.values())if("getFeatureFlags"in xt)for(const Lt of xt.getFeatureFlags())ut.registerFlag({name:Lt.name,pluginId:xt.getId()});else for(const Lt of xt.output())Lt.type==="feature-flag"&&ut.registerFlag({name:Lt.name,pluginId:xt.getId()});for(const xt of Ce)ut.registerFlag({name:xt,pluginId:""})}},[pt,Ke,Ce]),"node"in Ke)return Ke.node;const{ThemeProvider:St=be}=this.components;return r.createElement(i.ApiProvider,{apis:this.getApiHolder()},r.createElement(At,{appContext:z},r.createElement(St,null,r.createElement(De,{routePaths:Oe.paths,routeParents:Oe.parents,routeObjects:Oe.objects,routeBindings:Qe,basePath:ae(Ke.api)},r.createElement(ie.Provider,{value:{routeObjects:Oe.objects}},fe)))))}}getRouter(){const{Router:z,SignInPage:q}=this.components,ue=({component:Pe,children:Oe})=>{const[Ce,Qe]=(0,r.useState)(),Ke=(0,R.useApi)(R.configApiRef),pt=ae(Ke);return Ce?(this.appIdentityProxy.setTarget(Ce,{signOutTargetUrl:pt||"/"}),Oe):r.createElement(Pe,{onSignInSuccess:Qe})};return({children:Pe})=>{const Oe=(0,R.useApi)(R.configApiRef),Ce=ae(Oe),Qe=`${Ce}/*`,{routeObjects:Ke}=(0,r.useContext)(ie);return q?r.createElement(z,null,r.createElement(Ae,{routeObjects:Ke}),r.createElement(ue,{component:q},r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)})))):(this.appIdentityProxy.setTarget({getUserId:()=>"guest",getIdToken:async()=>{},getProfile:()=>({email:"guest@example.com",displayName:"Guest"}),getProfileInfo:async()=>({email:"guest@example.com",displayName:"Guest"}),getBackstageIdentity:async()=>({type:"user",userEntityRef:"user:default/guest",ownershipEntityRefs:["user:default/guest"]}),getCredentials:async()=>({}),signOut:async()=>{}},{signOutTargetUrl:Ce||"/"}),r.createElement(z,null,r.createElement(Ae,{routeObjects:Ke}),r.createElement(t.Z5,null,r.createElement(t.AW,{path:Qe,element:r.createElement(r.Fragment,null,Pe)}))))}}getApiHolder(){if(this.apiHolder){for(const z of this.plugins)for(const q of z.getApis())this.apiFactoryRegistry.get(q.api)||this.apiFactoryRegistry.register("default",q);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder}this.apiFactoryRegistry.register("static",{api:R.appThemeApiRef,deps:{},factory:()=>i.AppThemeSelector.createWithStorage(this.themes)}),this.apiFactoryRegistry.register("static",{api:R.configApiRef,deps:{},factory:()=>{if(!this.configApi)throw new Error("Tried to access config API before config was loaded");return this.configApi}}),this.apiFactoryRegistry.register("static",{api:R.identityApiRef,deps:{},factory:()=>this.appIdentityProxy}),this.apiFactoryRegistry.register("default",{api:R.featureFlagsApiRef,deps:{},factory:()=>new i.LocalStorageFeatureFlags});for(const z of this.defaultApis)this.apiFactoryRegistry.register("default",z);for(const z of this.plugins)for(const q of z.getApis())if(!this.apiFactoryRegistry.register("default",q))throw new Error(`Plugin ${z.getId()} tried to register duplicate or forbidden API factory for ${q.api}`);for(const z of this.apis)if(!this.apiFactoryRegistry.register("app",z))throw new Error(`Duplicate or forbidden API factory for ${z.api} in app`);return f.ApiResolver.validateFactories(this.apiFactoryRegistry,this.apiFactoryRegistry.getAllApis()),this.apiHolder=new f.ApiResolver(this.apiFactoryRegistry),this.apiHolder}verifyPlugins(z){const q=new Set;for(const ue of z){const fe=ue.getId();if(q.has(fe))throw new Error(`Duplicate plugin found '${fe}'`);q.add(fe)}}}function nt(J){return new we(J)}},46611:function(ne,s,e){"use strict";e.d(s,{t:function(){return r}});const r=async(t="__APP_INJECTED_RUNTIME_CONFIG__")=>{const c=[{context:"app-config.yaml",data:{app:{title:"Techdocs Preview App",baseUrl:"http://localhost:3000"},backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}}}];if(!c)throw new Error("No static configuration provided");if(!Array.isArray(c))throw new Error("Static configuration has invalid format");const i=c.slice();if(t!=="__app_injected_runtime_config__".toLocaleUpperCase("en-US"))try{const f=JSON.parse(t);Array.isArray(f)?i.push(...f):i.push({data:f,context:"env"})}catch(f){throw new Error(`Failed to load runtime configuration, ${f}`)}const R=window.__APP_CONFIG__;return R&&i.push({context:"window",data:R}),i}},44056:function(ne,s,e){"use strict";e.d(s,{createSpecializedApp:function(){return r.b},defaultConfigLoader:function(){return t.t}});var r=e(82370),t=e(46611),c=e(73495),i=e.n(c);e.o(c,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return c.AtlassianAuth}}),e.o(c,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return c.BitbucketAuth}}),e.o(c,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return c.FlatRoutes}}),e.o(c,"GithubAuth")&&e.d(s,{GithubAuth:function(){return c.GithubAuth}}),e.o(c,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return c.GitlabAuth}}),e.o(c,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return c.GoogleAuth}}),e.o(c,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return c.MicrosoftAuth}}),e.o(c,"OktaAuth")&&e.d(s,{OktaAuth:function(){return c.OktaAuth}}),e.o(c,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return c.OneLoginAuth}})},73495:function(){},49208:function(ne,s,e){"use strict";e.d(s,{AlertApiForwarder:function(){return r.AlertApiForwarder},ErrorAlerter:function(){return r.ErrorAlerter},ErrorApiForwarder:function(){return r.ErrorApiForwarder},FetchMiddlewares:function(){return r.FetchMiddlewares},FlatRoutes:function(){return c.w},NoOpAnalyticsApi:function(){return r.NoOpAnalyticsApi},OAuthRequestManager:function(){return r.OAuthRequestManager},UnhandledErrorForwarder:function(){return r.UnhandledErrorForwarder},UrlPatternDiscovery:function(){return r.UrlPatternDiscovery},WebStorage:function(){return r.WebStorage},createFetchApi:function(){return r.createFetchApi},createSpecializedApp:function(){return t.createSpecializedApp},defaultConfigLoader:function(){return t.defaultConfigLoader}});var r=e(56494);e.o(r,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return r.AtlassianAuth}}),e.o(r,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return r.BitbucketAuth}}),e.o(r,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return r.FlatRoutes}}),e.o(r,"GithubAuth")&&e.d(s,{GithubAuth:function(){return r.GithubAuth}}),e.o(r,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return r.GitlabAuth}}),e.o(r,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return r.GoogleAuth}}),e.o(r,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return r.MicrosoftAuth}}),e.o(r,"OktaAuth")&&e.d(s,{OktaAuth:function(){return r.OktaAuth}}),e.o(r,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return r.OneLoginAuth}}),e.o(r,"createSpecializedApp")&&e.d(s,{createSpecializedApp:function(){return r.createSpecializedApp}}),e.o(r,"defaultConfigLoader")&&e.d(s,{defaultConfigLoader:function(){return r.defaultConfigLoader}});var t=e(44056);e.o(t,"AtlassianAuth")&&e.d(s,{AtlassianAuth:function(){return t.AtlassianAuth}}),e.o(t,"BitbucketAuth")&&e.d(s,{BitbucketAuth:function(){return t.BitbucketAuth}}),e.o(t,"FlatRoutes")&&e.d(s,{FlatRoutes:function(){return t.FlatRoutes}}),e.o(t,"GithubAuth")&&e.d(s,{GithubAuth:function(){return t.GithubAuth}}),e.o(t,"GitlabAuth")&&e.d(s,{GitlabAuth:function(){return t.GitlabAuth}}),e.o(t,"GoogleAuth")&&e.d(s,{GoogleAuth:function(){return t.GoogleAuth}}),e.o(t,"MicrosoftAuth")&&e.d(s,{MicrosoftAuth:function(){return t.MicrosoftAuth}}),e.o(t,"OktaAuth")&&e.d(s,{OktaAuth:function(){return t.OktaAuth}}),e.o(t,"OneLoginAuth")&&e.d(s,{OneLoginAuth:function(){return t.OneLoginAuth}});var c=e(63938)},57018:function(ne,s,e){"use strict";e.d(s,{RefreshingAuthSessionManager:function(){return f}});function r(u,m){for(const y of m)if(!u.has(y))return!1;return!0}class t{constructor(m){this.options=m}sessionExistsAndHasScope(m,y){if(!m)return!1;if(!y||this.options.sessionScopes===void 0)return!0;const h=this.options.sessionScopes(m);return r(h,y)}getExtendedScope(m,y){const h=new Set(this.options.defaultScopes);if(m&&this.options.sessionScopes!==void 0){const E=this.options.sessionScopes(m);for(const S of E)h.add(S)}if(y)for(const E of y)h.add(E);return h}}var c=e(98005),i=e(36964);class R{constructor(){X(this,"subject",new c.X(i.SessionState.SignedOut));X(this,"signedIn",!1)}setIsSignedIn(m){this.signedIn!==m&&(this.signedIn=m,this.subject.next(this.signedIn?i.SessionState.SignedIn:i.SessionState.SignedOut))}sessionState$(){return this.subject}}class f{constructor(m){X(this,"connector");X(this,"helper");X(this,"sessionScopesFunc");X(this,"sessionShouldRefreshFunc");X(this,"stateTracker",new R);X(this,"refreshPromise");X(this,"currentSession");const{connector:y,defaultScopes:h=new Set,sessionScopes:E,sessionShouldRefresh:S}=m;this.connector=y,this.sessionScopesFunc=E,this.sessionShouldRefreshFunc=S,this.helper=new t({sessionScopes:E,defaultScopes:h})}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes)){if(!this.sessionShouldRefreshFunc(this.currentSession))return this.currentSession;try{const h=await this.collapsedSessionRefresh(),E=this.sessionScopesFunc(this.currentSession),S=this.sessionScopesFunc(h);return r(S,E)&&(this.currentSession=h),h}catch(h){if(m.optional)return;throw h}}if(!this.currentSession&&!m.instantPopup)try{const y=await this.collapsedSessionRefresh();return this.currentSession=y,this.getSession(m)}catch{}if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,await this.connector.removeSession(),this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}async collapsedSessionRefresh(){if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.connector.refreshSession();try{const m=await this.refreshPromise;return this.stateTracker.setIsSignedIn(!0),m}finally{delete this.refreshPromise}}}class o{constructor(m){X(this,"connector");X(this,"helper");X(this,"stateTracker",new SessionStateTracker);X(this,"currentSession");const{connector:y,defaultScopes:h=new Set,sessionScopes:E}=m;this.connector=y,this.helper=new SessionScopeHelper({sessionScopes:E,defaultScopes:h})}setSession(m){this.currentSession=m,this.stateTracker.setIsSignedIn(Boolean(m))}async getSession(m){if(this.helper.sessionExistsAndHasScope(this.currentSession,m.scopes))return this.currentSession;if(!m.optional)return this.currentSession=await this.connector.createSession({...m,scopes:this.helper.getExtendedScope(this.currentSession,m.scopes)}),this.stateTracker.setIsSignedIn(!0),this.currentSession}async removeSession(){this.currentSession=void 0,this.stateTracker.setIsSignedIn(!1)}sessionState$(){return this.stateTracker.sessionState$()}}},98005:function(ne,s,e){"use strict";e.d(s,{J:function(){return c},X:function(){return i}});var r=e(82394),t=e.n(r);class c{constructor(){X(this,"isClosed",!1);X(this,"terminatingError");X(this,"observable",new(t())(f=>this.isClosed?(this.terminatingError?f.error(this.terminatingError):f.complete(),()=>{}):(this.subscribers.add(f),()=>{this.subscribers.delete(f)})));X(this,"subscribers",new Set)}[Symbol.observable](){return this}get closed(){return this.isClosed}next(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.subscribers.forEach(o=>o.next(f))}error(f){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(o=>o.error(f))}complete(){if(this.isClosed)throw new Error("PublishSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,o,u){const m=typeof f=="function"?{next:f,error:o,complete:u}:f;return this.observable.subscribe(m)}}class i{constructor(f){X(this,"isClosed");X(this,"currentValue");X(this,"terminatingError");X(this,"observable");X(this,"subscribers",new Set);this.isClosed=!1,this.currentValue=f,this.terminatingError=void 0,this.observable=new(t())(o=>this.isClosed?(this.terminatingError?o.error(this.terminatingError):o.complete(),()=>{}):(o.next(this.currentValue),this.subscribers.add(o),()=>{this.subscribers.delete(o)}))}[Symbol.observable](){return this}get closed(){return this.isClosed}next(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.currentValue=f,this.subscribers.forEach(o=>o.next(f))}error(f){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.terminatingError=f,this.subscribers.forEach(o=>o.error(f))}complete(){if(this.isClosed)throw new Error("BehaviorSubject is closed");this.isClosed=!0,this.subscribers.forEach(f=>f.complete())}subscribe(f,o,u){const m=typeof f=="function"?{next:f,error:o,complete:u}:f;return this.observable.subscribe(m)}}},88934:function(ne,s,e){"use strict";e.d(s,{L:function(){return c}});var r=e(36964),t=e(2784);const c=i=>{const{children:R}=i,f=(0,r.useApi)(r.featureFlagsApiRef),o="with"in i?f.isActive(i.with):!f.isActive(i.without);return t.createElement(t.Fragment,null,o?R:null)};(0,r.attachComponentData)(c,"core.featureFlagged",!0)},63938:function(ne,s,e){"use strict";e.d(s,{w:function(){return i}});var r=e(2784),t=e(10289),c=e(36964);const i=f=>{const o=(0,c.useApp)(),{NotFoundErrorPage:u}=o.getComponents(),m=(0,c.useElementFilter)(f.children,y=>y.getElements().flatMap(h=>{var S;let E=h.props.path;return E===""?[]:(E=(S=E==null?void 0:E.replace(/\/\*$/,""))!=null?S:"/",[{path:E,element:h,children:h.props.children?[{path:E==="/"?"/":"/*",element:h.props.children}]:void 0}])}).sort((h,E)=>E.path.localeCompare(h.path)).map(h=>(h.path=h.path==="/"?"/":`${h.path}/*`,h)));return m.push({element:r.createElement(u,null),path:"/*"}),(0,t.V$)(m)};var R=e(88934)},82339:function(ne,s,e){"use strict";e.d(s,{Button:function(){return ce},CodeSnippet:function(){return Ie},Content:function(){return to},ContentHeader:function(){return mi},CreateButton:function(){return lt},DependencyGraph:function(){return dn},DependencyGraphTypes:function(){return r},EmptyState:function(){return qt},ErrorPage:function(){return Ei},ErrorPanel:function(){return Bt},Header:function(){return uo},HeaderIconLinkRow:function(){return sr},HeaderLabel:function(){return Li},HeaderTabs:function(){return no},InfoCard:function(){return tr},ItemCardGrid:function(){return wi},ItemCardHeader:function(){return Fi},Link:function(){return K},LogViewer:function(){return fr},MissingAnnotationEmptyState:function(){return gn},OverflowTooltip:function(){return Fr},Page:function(){return mo},PageWithHeader:function(){return Ni},Progress:function(){return Mr},ResponseErrorPanel:function(){return ln},RoutedTabs:function(){return ro},Select:function(){return rt},Sidebar:function(){return ls},SidebarDivider:function(){return Cs},SidebarItem:function(){return _a},SidebarPage:function(){return Jo},SubvalueCell:function(){return $s},SupportButton:function(){return Vo},Table:function(){return ai},WarningPanel:function(){return mn},sidebarConfig:function(){return Jn},useSidebarOpenState:function(){return fa},useSidebarPinState:function(){return jr}});var r={};e.r(r),e.d(r,{Nm:function(){return _},ht:function(){return We},LJ:function(){return be}});var t=e(2784),c=e(36964),i=e(19928);function R(n){const[a,l]=useState([]),d=useApi(alertApiRef),{anchorOrigin:p={vertical:"top",horizontal:"center"}}=n;if(useEffect(()=>{const Z=d.alert$().subscribe(G=>l(H=>H.concat(G)));return()=>{Z.unsubscribe()}},[d]),a.length===0)return null;const[v]=a,P=()=>{l(Z=>Z.filter(G=>G!==v))};return React.createElement(Snackbar,{open:!0,anchorOrigin:p},React.createElement(Alert,{action:React.createElement(IconButton,{color:"inherit",size:"small",onClick:P,"data-testid":"error-button-close"},React.createElement(CloseIcon,null)),severity:v.severity},React.createElement("span",null,v.message.toString(),a.length>1&&React.createElement("em",null,` (${a.length-1} older ${pluralize("message",a.length-1)})`))))}var f=e(79692),o=e(12420);const u=(0,f.Z)(n=>(0,o.Z)({avatar:{width:"4rem",height:"4rem",color:"#fff",fontWeight:n.typography.fontWeightBold,letterSpacing:"1px",textTransform:"uppercase"}}),{name:"BackstageAvatar"});function m(n){const{displayName:a,picture:l,customStyles:d}=n,p=u();let v={...d};return l||(v={backgroundColor:stringToColor(a||""),...d}),React.createElement(MaterialAvatar,{alt:a,src:l,className:p.avatar,style:v},a&&extractInitials(a))}var y=e(77277),h=e(72779),E=e.n(h),S=e(86689),b=e(62833),L=e(76635);const $=(0,f.Z)({visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",height:1,width:1},externalLink:{position:"relative"}},{name:"Link"}),F=n=>/^([a-z+.-]+):/.test(n),D=()=>{try{return(0,c.useApi)(c.configApiRef).getOptionalString("app.baseUrl")}catch{return}},x=()=>{var d;const n="http://dummy.dev",a=(d=D())!=null?d:"/",{pathname:l}=new URL(a,n);return(0,L.trimEnd)(l,"/")},O=n=>{let a=String(n);const l=x(),d=F(a),p=a.startsWith(l);return!d&&!p&&(a=l.concat(a)),a},w=n=>{var a;return n instanceof Array?n.map(w).join(" ").trim():typeof n=="object"&&n?w((a=n==null?void 0:n.props)==null?void 0:a.children):["string","number"].includes(typeof n)?String(n):""},K=t.forwardRef(({onClick:n,noTrack:a,...l},d)=>{const p=$(),v=(0,c.useAnalytics)(),P=O(l.to),Z=w(l.children)||P,G=F(P),H=G&&!!/^https?:/.exec(P),le=ee=>{n==null||n(ee),a||v.captureEvent("click",Z,{attributes:{to:P}})};return G?t.createElement(S.Z,{...H?{target:"_blank",rel:"noopener"}:{},...l,ref:d,href:P,onClick:le,className:E()(p.externalLink,l.className)},l.children,t.createElement("span",{className:p.visuallyHidden},", Opens in a new window")):t.createElement(S.Z,{...l,ref:d,component:b.rU,to:P,onClick:le})}),re=t.forwardRef((n,a)=>t.createElement(K,{ref:a,...n,color:"initial"})),ce=t.forwardRef((n,a)=>t.createElement(y.Z,{ref:a,component:re,...n}));var Se=e(60364),De=e(61837),Fe=e(80030),He=e(19353),Ae=e(95074);function Je(n){const{text:a,tooltipDelay:l=1e3,tooltipText:d="Text copied to clipboard","aria-label":p="Copy text"}=n,v=(0,c.useApi)(c.errorApiRef),[P,Z]=(0,t.useState)(!1),[{error:G},H]=(0,Ae.Z)();(0,t.useEffect)(()=>{G&&v.post(G)},[G,v]);const le=ee=>{ee.stopPropagation(),Z(!0),H(a)};return t.createElement(t.Fragment,null,t.createElement(Fe.ZP,{id:"copy-test-tooltip",title:d,placement:"top",leaveDelay:l,onClose:()=>Z(!1),open:P},t.createElement(De.Z,{onClick:le,"aria-label":p},t.createElement(He.Z,null))))}var tt=e(83229),Tt=e(26639),At=e(39595);function Ie(n){const{text:a,language:l,showLineNumbers:d=!1,highlightedNumbers:p,customStyle:v,showCopyCodeButton:P=!1}=n,Z=(0,Se.Z)(),G=Z.palette.type==="dark"?Tt.Z:At.Z,H=Z.palette.type==="dark"?"#256bf3":"#e6ffed";return t.createElement("div",{style:{position:"relative"}},t.createElement(tt.Z,{customStyle:v,language:l,style:G,showLineNumbers:d,wrapLines:!0,lineNumberStyle:{color:Z.palette.textVerySubtle},lineProps:le=>p!=null&&p.includes(le)?{style:{backgroundColor:H}}:{}},a),P&&t.createElement("div",{style:{position:"absolute",top:0,right:0}},t.createElement(Je,{text:a})))}var ht=e(41156),gt=e(88188);function lt(n){const{title:a,to:l}=n,d=(0,ht.Z)(p=>p.breakpoints.down("xs"));return l?d?t.createElement(De.Z,{component:b.rU,color:"primary",title:a,size:"small",to:l},t.createElement(gt.Z,null)):t.createElement(y.Z,{component:b.rU,variant:"contained",color:"primary",to:l},a):null}var _;(function(n){const a="TB";n.TOP_BOTTOM=a;const l="BT";n.BOTTOM_TOP=l;const d="LR";n.LEFT_RIGHT=d;const p="RL";n.RIGHT_LEFT=p})(_||(_={}));var pe;(function(n){const a="UL";n.UP_LEFT=a;const l="UR";n.UP_RIGHT=l;const d="DL";n.DOWN_LEFT=d;const p="DR";n.DOWN_RIGHT=p})(pe||(pe={}));var be;(function(n){const a="network-simplex";n.NETWORK_SIMPLEX=a;const l="tight-tree";n.TIGHT_TREE=l;const d="longest-path";n.LONGEST_PATH=d})(be||(be={}));var We;(function(n){const a="l";n.LEFT=a;const l="r";n.RIGHT=l;const d="c";n.CENTER=d})(We||(We={}));var et=e(84945),at=e(11105),yt=e(97963),ie=e(46506),ae=e.n(ie),Ye=e(54073),Ge=e.n(Ye),we=e(10368);const nt=(0,f.Z)(n=>({node:{fill:n.palette.primary.light,stroke:n.palette.primary.light},text:{fill:n.palette.primary.contrastText}}),{name:"BackstageDependencyGraphDefaultNode"});function J({node:{id:n}}){const a=nt(),[l,d]=t.useState(0),[p,v]=t.useState(0),P=t.useRef(null);t.useLayoutEffect(()=>{if(P.current){let{height:le,width:ee}=P.current.getBBox();le=Math.round(le),ee=Math.round(ee),(le!==p||ee!==l)&&(d(ee),v(le))}},[l,p]);const Z=10,G=l+Z*2,H=p+Z*2;return t.createElement("g",null,t.createElement("rect",{className:a.node,width:G,height:H,rx:10}),t.createElement("text",{ref:P,className:a.text,y:H/2,x:G/2,textAnchor:"middle",alignmentBaseline:"middle"},n))}const z="arrow-marker",q="node",ue="edge",fe="label",Pe=(0,we.Z)(n=>({node:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphNode"}),Oe=n=>t.createElement(J,{...n});function Ce({render:n=Oe,setNode:a,node:l}){const{width:d,height:p,x:v=0,y:P=0}=l,Z=l,G=Pe(),H=t.useRef(null);return t.useLayoutEffect(()=>{if(H.current){let{height:le,width:ee}=H.current.getBBox();le=Math.round(le),ee=Math.round(ee),(le!==p||ee!==d)&&a(l.id,{...l,height:le,width:ee})}},[l,d,p,a]),t.createElement("g",{ref:H,"data-testid":q,className:G.node,transform:`translate(${v-d/2},${P-p/2})`},n({node:Z}))}var Qe=e(55876),Ke=e(66481),pt=e(19574),St=e.n(pt);const ut=(0,we.Z)(n=>({text:{fill:n.palette.textContrast}}),{name:"BackstageDependencyGraphDefaultLabel"});function xt({edge:{label:n}}){const a=ut();return t.createElement("text",{className:a.text,textAnchor:"middle"},n)}const Lt=(0,we.Z)(n=>({path:{strokeWidth:2,stroke:n.palette.textSubtle,fill:"none",transition:`${n.transitions.duration.shortest}ms`},label:{transition:`${n.transitions.duration.shortest}ms`}}),{name:"BackstageDependencyGraphEdge"}),bt=n=>t.createElement(xt,{...n}),Pt=Qe.Z().x(n=>n.x).y(n=>n.y).curve(Ke.Z);function Wt({render:n=bt,setEdge:a,id:l,edge:d}){const{x:p=0,y:v=0,width:P,height:Z,points:G}=d,H=d,le=Lt(),ee=t.useRef(null);t.useLayoutEffect(()=>{if(ee.current){let{height:Te,width:Me}=ee.current.getBBox();Te=Math.round(Te),Me=Math.round(Me),(Te!==Z||Me!==P)&&a(l,{...d,height:Te,width:Me})}},[d,Z,P,a,l]);let ve="";if(G){const Te=G.filter(Me=>St()(Me.x)&&St()(Me.y));ve=Pt(Te)||""}return t.createElement(t.Fragment,null,ve&&t.createElement("path",{"data-testid":ue,className:le.path,markerEnd:`url(#${z})`,d:ve}),H.label?t.createElement("g",{ref:ee,"data-testid":fe,className:le.label,transform:`translate(${p},${v})`},n({edge:H})):null)}const Ht="workspace";function dn(n){var ar,br;const{edges:a,nodes:l,renderNode:d,direction:p=_.TOP_BOTTOM,align:v,nodeMargin:P=50,edgeMargin:Z=10,rankMargin:G=50,paddingX:H=0,paddingY:le=0,acyclicer:ee,ranker:ve=be.NETWORK_SIMPLEX,labelPosition:Te=We.RIGHT,labelOffset:Me=10,edgeRanks:ct=1,edgeWeight:Mt=1,renderLabel:kt,defs:_t,zoom:jt="enabled",...Ct}=n,rn=(0,yt.Z)(),[Ut,nr]=t.useState(100),[Gn,Qn]=t.useState(100),wt=t.useRef(new(ae()).graphlib.Graph),[Sr,Gr]=t.useState(((ar=wt.current.graph())==null?void 0:ar.width)||0),[Cr,ra]=t.useState(((br=wt.current.graph())==null?void 0:br.height)||0),[va,aa]=t.useState([]),[oa,Aa]=t.useState([]),cn=Math.max(Sr,Ut),bn=Math.max(Cr,Gn),lr=t.useMemo(()=>Ge()(un=>{if(!un)return;const En=at.Z(un),sn=at.Z(un.getElementById(Ht));function Wn(){En.call(et.sP().scaleExtent([1,10]).on("zoom",Xn=>{Xn.transform.x=Math.min(0,Math.max(Xn.transform.x,cn-cn*Xn.transform.k)),Xn.transform.y=Math.min(0,Math.max(Xn.transform.y,bn-bn*Xn.transform.k)),sn.attr("transform",Xn.transform)}))}jt==="enabled"?Wn():jt==="enable-on-click"&&En.on("click",()=>Wn());const{width:Hn,height:sa}=un.getBoundingClientRect();Ut!==Hn&&nr(Hn),Gn!==sa&&Qn(sa)},100),[Gn,Ut,cn,bn,jt]),rr=t.useCallback(()=>{const un=wt.current.nodes(),En=wt.current.edges();un.forEach(sn=>{l.some(Hn=>Hn.id===sn)||wt.current.removeNode(sn)}),En.forEach(sn=>{a.some(Hn=>Hn.from===sn.v&&Hn.to===sn.w)||wt.current.removeEdge(sn.v,sn.w)}),l.forEach(sn=>{const Wn=wt.current.nodes().find(Hn=>sn.id===Hn);if(Wn&&wt.current.node(Wn)){const{width:Hn,height:sa,x:Xn,y:tl}=wt.current.node(Wn);wt.current.setNode(Wn,{...sn,width:Hn,height:sa,x:Xn,y:tl})}else wt.current.setNode(sn.id,{...sn,width:0,height:0})}),a.forEach(sn=>{wt.current.setEdge(sn.from,sn.to,{...sn,label:sn.label,width:0,height:0,labelpos:Te,labeloffset:Me,weight:Mt,minlen:ct})})},[a,l,Te,Me,Mt,ct]),on=t.useMemo(()=>Ge()(()=>{ae().layout(wt.current);const{height:un,width:En}=wt.current.graph(),sn=Math.max(0,un||0),Wn=Math.max(0,En||0);Gr(Wn),ra(sn),aa(wt.current.nodes()),Aa(wt.current.edges())},250,{leading:!0}),[]);t.useEffect(()=>(wt.current.setGraph({rankdir:p,align:v,nodesep:P,edgesep:Z,ranksep:G,marginx:H,marginy:le,acyclicer:ee,ranker:ve}),rr(),on(),on.cancel),[ee,v,p,Z,H,le,P,G,ve,rr,on]);function Pn(un,En){return wt.current.setNode(un,En),on(),wt.current}function Tr(un,En){return wt.current.setEdge(un,En),on(),wt.current}return t.createElement("svg",{ref:lr,...Ct,width:"100%",height:bn,viewBox:`0 0 ${cn} ${bn}`},t.createElement("defs",null,t.createElement("marker",{id:z,viewBox:"0 0 24 24",markerWidth:"14",markerHeight:"14",refX:"16",refY:"12",orient:"auto",markerUnits:"strokeWidth"},t.createElement("path",{fill:rn.palette.textSubtle,d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),_t),t.createElement("g",{id:Ht},t.createElement("svg",{width:Sr,height:Cr,y:bn/2-Cr/2,x:cn/2-Sr/2,viewBox:`0 0 ${Sr} ${Cr}`},oa.map(un=>{const En=wt.current.edge(un);return En?t.createElement(Wt,{key:`${un.v}-${un.w}`,id:un,setEdge:Tr,render:kt,edge:En}):null}),va.map(un=>{const En=wt.current.node(un);return En?t.createElement(Ce,{key:un,setNode:Pn,render:d,node:En}):null}))))}const In=(0,f.Z)(n=>{var a;return{root:{padding:n.spacing(0),marginBottom:n.spacing(0),marginTop:n.spacing(0),display:"flex",flexFlow:"row nowrap"},topPosition:{position:"relative",marginBottom:n.spacing(6),marginTop:-n.spacing(3),zIndex:"unset"},icon:{fontSize:20},content:{width:"100%",maxWidth:"inherit",flexWrap:"nowrap"},message:{display:"flex",alignItems:"center",color:n.palette.banner.text,"& a":{color:n.palette.banner.link}},info:{backgroundColor:n.palette.banner.info},error:{backgroundColor:n.palette.banner.error},warning:{backgroundColor:(a=n.palette.banner.warning)!=null?a:n.palette.banner.error}}},{name:"BackstageDismissableBanner"}),Yt=n=>{var Te;const{variant:a,message:l,id:d,fixed:p=!1}=n,v=In(),Z=useApi(storageApiRef).forBucket("notifications"),G=(Te=Z.snapshot("dismissedBanners").value)!=null?Te:[],[H,le]=useState(new Set(G)),ee=useObservable(Z.observe$("dismissedBanners"));useEffect(()=>{var Me;if(ee!=null&&ee.value){const ct=(Me=ee==null?void 0:ee.value)!=null?Me:[];le(new Set(ct))}},[ee==null?void 0:ee.value]);const ve=()=>{Z.set("dismissedBanners",[...H,d])};return React.createElement(Snackbar,{anchorOrigin:p?{vertical:"bottom",horizontal:"center"}:{vertical:"top",horizontal:"center"},open:!H.has(d),classes:{root:classNames(v.root,!p&&v.topPosition)}},React.createElement(SnackbarContent,{classes:{root:classNames(v.content,v[a]),message:v.message},message:l,action:[React.createElement(IconButton,{key:"dismiss",title:"Permanently dismiss this message",color:"inherit",onClick:ve},React.createElement(Close,{className:v.icon}))]}))};var Nt=e(60905),Xe=e(90436),de=e.p+"static/missingAnnotation.67f79e98..svg",j=e.p+"static/noInformation.4b426325..svg",ye=e.p+"static/createComponent.975d1e1e..svg",je=e.p+"static/noBuild.1715fa71..svg";const _e=(0,f.Z)({generalImg:{width:"95%",zIndex:2,position:"relative",left:"50%",top:"50%",transform:"translate(-50%, 15%)"}},{name:"BackstageEmptyStateImage"}),st=({missing:n})=>{const a=_e();switch(n){case"field":return t.createElement("img",{src:de,className:a.generalImg,alt:"annotation is missing"});case"info":return t.createElement("img",{src:j,alt:"no Information",className:a.generalImg});case"content":return t.createElement("img",{src:ye,alt:"create Component",className:a.generalImg});case"data":return t.createElement("img",{src:je,alt:"no Build",className:a.generalImg});default:return null}},Rt=(0,f.Z)(n=>({root:{backgroundColor:n.palette.background.default,padding:n.spacing(2,0,0,0)},action:{marginTop:n.spacing(2)},imageContainer:{position:"relative"}}),{name:"BackstageEmptyState"});function qt(n){const{title:a,description:l,missing:d,action:p}=n,v=Rt();return t.createElement(Nt.Z,{container:!0,direction:"row",justifyContent:"space-around",alignItems:"flex-start",className:v.root,spacing:2},t.createElement(Nt.Z,{item:!0,xs:12,md:6},t.createElement(Nt.Z,{container:!0,direction:"column"},t.createElement(Nt.Z,{item:!0,xs:!0},t.createElement(Xe.Z,{variant:"h5"},a)),t.createElement(Nt.Z,{item:!0,xs:!0},t.createElement(Xe.Z,{variant:"body1"},l)),t.createElement(Nt.Z,{item:!0,xs:!0,className:v.action},p))),t.createElement(Nt.Z,{item:!0,xs:12,md:6,className:v.imageContainer},t.createElement(st,{missing:d})))}const en=`apiVersion: backstage.io/v1alpha1
|
|
2
|
-
kind: Component
|
|
3
|
-
metadata:
|
|
4
|
-
name: example
|
|
5
|
-
description: example.com
|
|
6
|
-
annotations:
|
|
7
|
-
ANNOTATION: value
|
|
8
|
-
spec:
|
|
9
|
-
type: website
|
|
10
|
-
lifecycle: production
|
|
11
|
-
owner: user:guest`,tn=(0,f.Z)(n=>({code:{borderRadius:6,margin:`${n.spacing(2)}px 0px`,background:n.palette.type==="dark"?"#444":"#fff"}}),{name:"BackstageMissingAnnotationEmptyState"});function gn(n){const{annotation:a,readMoreUrl:l}=n,d=l||"https://backstage.io/docs/features/software-catalog/well-known-annotations",p=tn(),v=t.createElement(t.Fragment,null,"The ",t.createElement("code",null,a)," annotation is missing. You need to add the annotation to your component if you want to enable this tool.");return t.createElement(qt,{missing:"field",title:"Missing Annotation",description:v,action:t.createElement(t.Fragment,null,t.createElement(Xe.Z,{variant:"body1"},"Add the annotation to your component YAML as shown in the highlighted example below:"),t.createElement("div",{className:p.code},t.createElement(Ie,{text:en.replace("ANNOTATION",a),language:"yaml",showLineNumbers:!0,highlightedNumbers:[6,7],customStyle:{background:"inherit",fontSize:"115%"}})),t.createElement(y.Z,{color:"primary",component:K,to:d},"Read more"))})}var U=e(11776),oe=e(38402),te=e(49378),Ee=e(41128),$e=e(27616),dt=e(8284),Ne=e(70660),Vt=e(91750),Jt=e(38016);const Zt=(n,a)=>(a.palette.type==="light"?Ee._j:Ee.$n)(a.palette[n].light,.6),Dt=(n,a)=>(a.palette.type==="light"?Ee.$n:Ee._j)(a.palette[n].light,.9),it=(0,f.Z)(n=>({root:{marginRight:n.spacing(1),fill:({severity:a})=>Zt(a,n)}})),$t=({severity:n})=>{const a=it({severity:n});return t.createElement(Vt.Z,{classes:a})},nn=({severity:n})=>{const a=it({severity:n});return t.createElement(Jt.Z,{classes:a})},Gt=(0,f.Z)(n=>({panel:{backgroundColor:({severity:a})=>Dt(a,n),color:({severity:a})=>Zt(a,n),verticalAlign:"middle"},summary:{display:"flex",flexDirection:"row"},summaryText:{color:({severity:a})=>Zt(a,n),fontWeight:"bold"},message:{width:"100%",display:"block",color:({severity:a})=>Zt(a,n),backgroundColor:({severity:a})=>Dt(a,n)},details:{width:"100%",display:"block",color:n.palette.textContrast,backgroundColor:n.palette.background.default,border:`1px solid ${n.palette.border}`,padding:n.spacing(2),fontFamily:"sans-serif"}}),{name:"BackstageWarningPanel"}),Kt=n=>n.charAt(0).toLocaleUpperCase("en-US")+n.slice(1);function mn(n){const{severity:a="warning",title:l,message:d,children:p,defaultExpanded:v}=n,P=Gt({severity:a}),Z=Kt(a)+(l?`: ${l}`:"");return t.createElement($e.Z,{defaultExpanded:v!=null?v:!1,className:P.panel,role:"alert"},t.createElement(dt.Z,{expandIcon:t.createElement(nn,{severity:a}),className:P.summary},t.createElement($t,{severity:a}),t.createElement(Xe.Z,{className:P.summaryText,variant:"subtitle1"},Z)),(d||p)&&t.createElement(Ne.Z,null,t.createElement(Nt.Z,{container:!0},d&&t.createElement(Nt.Z,{item:!0,xs:12},t.createElement(Xe.Z,{className:P.message,variant:"body1"},d)),p&&t.createElement(Nt.Z,{item:!0,xs:12,className:P.details},p))))}const Mn=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageErrorPanel"}),Qt=({error:n,message:a,stack:l,children:d})=>{const p=Mn();return t.createElement(U.Z,{dense:!0},t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Error",secondary:n}),t.createElement(Je,{text:n})),t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Message",secondary:a}),t.createElement(Je,{text:a})),l&&t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Stack Trace",secondary:l}),t.createElement(Je,{text:l})),d)};function Bt(n){const{title:a,error:l,defaultExpanded:d,children:p}=n;return t.createElement(mn,{severity:"error",title:a!=null?a:l.message,defaultExpanded:d},t.createElement(Qt,{error:l.name,message:l.message,stack:l.stack,children:p}))}var Xt=e(85256);const Rn=(0,f.Z)(n=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:n.spacing(2)},divider:{margin:n.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function ln(n){var Me;const{title:a,error:l,defaultExpanded:d}=n,p=Rn();if(l.name!=="ResponseError")return t.createElement(Bt,{title:a!=null?a:l.message,defaultExpanded:d,error:l});const{body:v,cause:P}=l,{request:Z,response:G}=v,H=`${G.statusCode}: ${P.name}`,le=Z&&`${Z.method} ${Z.url}`,ee=P.message.replace(/\\n/g,`
|
|
12
|
-
`),ve=(Me=P.stack)==null?void 0:Me.replace(/\\n/g,`
|
|
13
|
-
`),Te=JSON.stringify(v,void 0,2);return t.createElement(Bt,{title:a!=null?a:l.message,defaultExpanded:d,error:{name:H,message:ee,stack:ve}},le&&t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Request",secondary:Z?`${le}`:void 0}),t.createElement(Je,{text:le})),t.createElement(t.Fragment,null,t.createElement(Xt.Z,{component:"li",className:p.divider}),t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(te.Z,{classes:{secondary:p.text},primary:"Full Error as JSON"})),t.createElement(Ie,{language:"json",text:Te,showCopyCodeButton:!0})))}var vn=e(47093);function Ln(n){const a=document.createElement("div");return a.setAttribute("id",n),a}function M(n){document.body.insertBefore(n,document.body.lastElementChild.nextElementSibling)}function g(n){const a=useRef(null);useEffect(function(){const p=document.querySelector(`#${n}`),v=p||Ln(n);return p||M(v),v.appendChild(a.current),function(){a.current.remove(),v.childNodes.length===-1&&v.remove()}},[n]);function l(){return a.current||(a.current=document.createElement("div")),a.current}return l()}var T=null;const B="core.calloutSeen";function V(){const[n,a]=useState(()=>{const d=localStorage.getItem(B);return d?JSON.parse(d):{}}),l=useCallback((d,p)=>{const v=localStorage.getItem(B),Z={...v?JSON.parse(v):{},[d]:p};a(Z),localStorage.setItem(B,JSON.stringify(Z))},[]);return{states:n,setState:l}}function se(n){const{states:a,setState:l}=V(),d=useCallback(()=>{l(n,!0)},[l,n]);return{seen:a[n]===!0,markSeen:d}}function he(n){const{seen:a,markSeen:l}=se(n);return{show:a===!1,hide:l}}const Le=(0,f.Z)({"@keyframes pulsateSlightly":{"0%":{transform:"scale(1.0)"},"100%":{transform:"scale(1.1)"}},"@keyframes pulsateAndFade":{"0%":{transform:"scale(1.0)",opacity:.9},"100%":{transform:"scale(1.5)",opacity:0}},featureWrapper:{position:"relative"},backdrop:{zIndex:2e3,position:"fixed",overflow:"hidden",left:0,right:0,top:0,bottom:0},dot:{position:"absolute",backgroundColor:"transparent",borderRadius:"100%",border:"1px solid rgba(103, 146, 180, 0.98)",boxShadow:"0px 0px 0px 20000px rgba(0, 0, 0, 0.5)",zIndex:2001,transformOrigin:"center center",animation:"$pulsateSlightly 1744ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) alternate infinite"},pulseCircle:{width:"100%",height:"100%",backgroundColor:"transparent",borderRadius:"100%",border:"2px solid white",zIndex:2001,transformOrigin:"center center",animation:"$pulsateAndFade 872ms 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite"},text:{position:"absolute",color:"white",zIndex:2003}},{name:"BackstageFeatureCalloutCircular"});function Et(n){const{featureId:a,title:l,description:d,children:p}=n,{show:v,hide:P}=useShowCallout(a),Z=usePortal("core.callout"),G=useRef(null),[H,le]=useState(),ee=Le(),ve=useCallback(()=>{if(G.current){const Te=G.current.getBoundingClientRect(),Me=Math.max(Te.width,Te.height),ct=800,Mt=Te.x-(Me-Te.width)/2-ct,kt=Te.y-(Me-Te.height)/2-ct,_t=Me+2*ct,jt=450,Ct=Te.x+Te.width/2-jt,rn=Te.y-(Me-Te.height)/2+Me+20;le({dotLeft:Mt,dotTop:kt,dotSize:_t,borderWidth:ct,textTop:rn,textLeft:Ct,textWidth:jt})}},[]);return useEffect(()=>(window.addEventListener("resize",ve),window.addEventListener("scroll",ve),()=>{window.removeEventListener("resize",ve),window.removeEventListener("scroll",ve)}),[ve]),useLayoutEffect(ve,[G.current,ve]),v?React.createElement(React.Fragment,null,React.createElement("div",{className:ee.featureWrapper,ref:G},p),createPortal(React.createElement("div",{className:ee.backdrop},React.createElement(ClickAwayListener,{onClickAway:P},React.createElement(React.Fragment,null,React.createElement("div",{className:ee.dot,"data-testid":"dot",style:{left:H==null?void 0:H.dotLeft,top:H==null?void 0:H.dotTop,width:H==null?void 0:H.dotSize,height:H==null?void 0:H.dotSize,borderWidth:H==null?void 0:H.borderWidth},onClick:P,onKeyDown:P,role:"button",tabIndex:0},React.createElement("div",{className:ee.pulseCircle})),React.createElement("div",{className:ee.text,"data-testid":"text",style:{left:H==null?void 0:H.textLeft,top:H==null?void 0:H.textTop,width:H==null?void 0:H.textWidth}},React.createElement(Typography,{variant:"h2",paragraph:!0},l),React.createElement(Typography,null,d))))),Z)):React.createElement(React.Fragment,null,p)}var zt=e(35292);const An=(0,f.Z)(n=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:n.palette.text.secondary,cursor:"default"},primary:{color:n.palette.primary.main},secondary:{color:n.palette.secondary.main},label:{fontSize:"0.7rem",textTransform:"uppercase",fontWeight:600,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function an({color:n="primary",disabled:a=!1,href:l="#",icon:d=t.createElement(zt.Z,null),label:p,onClick:v,title:P}){const Z=An();return a?t.createElement(S.Z,{title:P,className:E()(Z.link,Z.disabled),underline:"none"},d,t.createElement("span",{className:Z.label},p)):t.createElement(S.Z,{title:P,className:E()(Z.link,Z[n]),to:l,component:K,onClick:v},d,t.createElement("span",{className:Z.label},p))}const or=(0,f.Z)(n=>({links:{margin:n.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:n.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function sr(n){const{links:a}=n,l=or();return t.createElement("nav",{className:l.links},a.map((d,p)=>t.createElement(an,{key:p+1,...d})))}const Pr=n=>{const a=n==="dark"?"16%":"97%";return`
|
|
14
|
-
hsl(0, 0%, ${a}) 0%,
|
|
15
|
-
hsla(0, 0%, ${a}, 0.987) 8.1%,
|
|
16
|
-
hsla(0, 0%, ${a}, 0.951) 15.5%,
|
|
17
|
-
hsla(0, 0%, ${a}, 0.896) 22.5%,
|
|
18
|
-
hsla(0, 0%, ${a}, 0.825) 29%,
|
|
19
|
-
hsla(0, 0%, ${a}, 0.741) 35.3%,
|
|
20
|
-
hsla(0, 0%, ${a}, 0.648) 41.2%,
|
|
21
|
-
hsla(0, 0%, ${a}, 0.55) 47.1%,
|
|
22
|
-
hsla(0, 0%, ${a}, 0.45) 52.9%,
|
|
23
|
-
hsla(0, 0%, ${a}, 0.352) 58.8%,
|
|
24
|
-
hsla(0, 0%, ${a}, 0.259) 64.7%,
|
|
25
|
-
hsla(0, 0%, ${a}, 0.175) 71%,
|
|
26
|
-
hsla(0, 0%, ${a}, 0.104) 77.5%,
|
|
27
|
-
hsla(0, 0%, ${a}, 0.049) 84.5%,
|
|
28
|
-
hsla(0, 0%, ${a}, 0.013) 91.9%,
|
|
29
|
-
hsla(0, 0%, ${a}, 0) 100%
|
|
30
|
-
`},Kr=100,cr=10,jn=(0,f.Z)(n=>({root:{position:"relative",display:"flex",flexFlow:"row nowrap",alignItems:"center"},container:{overflow:"auto",scrollbarWidth:0,"&::-webkit-scrollbar":{display:"none"}},fade:{position:"absolute",width:Kr,height:`calc(100% + ${cr}px)`,transition:"opacity 300ms",pointerEvents:"none"},fadeLeft:{left:-cr,background:`linear-gradient(90deg, ${Pr(n.palette.type)})`},fadeRight:{right:-cr,background:`linear-gradient(270deg, ${Pr(n.palette.type)})`},fadeHidden:{opacity:0},button:{position:"absolute"},buttonLeft:{left:-n.spacing(2)},buttonRight:{right:-n.spacing(2)}}),{name:"BackstageHorizontalScrollGrid"});function wn(n){const[[a,l],d]=React.useState([0,0]);return React.useLayoutEffect(()=>{const p=n.current;if(!p){d([0,0]);return}const v=()=>{const P=p.scrollLeft,Z=p.scrollWidth-p.offsetWidth-p.scrollLeft;d([P,Z])};return v(),p.addEventListener("scroll",v),window.addEventListener("resize",v),()=>{p.removeEventListener("scroll",v),window.removeEventListener("resize",v)}},[n]),[a,l]}function qn(n,a,l){const[d,p]=React.useState(0);return React.useLayoutEffect(()=>{if(d===0)return;const v=performance.now(),P=requestAnimationFrame(Z=>{if(!n.current)return;const G=Z-v,H=Math.abs(d)*G/a,ee=Math.max(l,H)*Math.sign(d);n.current.scrollBy({left:ee});const ve=d-ee;Math.sign(d)!==Math.sign(ve)?p(0):p(ve)});return()=>cancelAnimationFrame(P)},[n,d,a,l]),p}function ur(n){const{scrollStep:a=100,scrollSpeed:l=50,minScrollDistance:d=5,children:p,...v}=n,P=jn(n),Z=React.useRef(),[G,H]=wn(Z),le=qn(Z,l,d),ee=ve=>{!Z.current||le(ve?a:-a)};return React.createElement("div",{...v,className:P.root},React.createElement(Grid,{container:!0,direction:"row",wrap:"nowrap",className:P.container,ref:Z},p),React.createElement("div",{className:classNames(P.fade,P.fadeLeft,{[P.fadeHidden]:G===0})}),React.createElement("div",{className:classNames(P.fade,P.fadeRight,{[P.fadeHidden]:H===0})}),G>0&&React.createElement(IconButton,{title:"Scroll Left",onClick:()=>ee(!1),className:classNames(P.button,P.buttonLeft,{})},React.createElement(ChevronLeftIcon,null)),H>0&&React.createElement(IconButton,{title:"Scroll Right",onClick:()=>ee(!0),className:classNames(P.button,P.buttonRight,{})},React.createElement(ChevronRightIcon,null)))}const Ir=(0,f.Z)({alpha:{color:"#ffffff",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"},beta:{color:"#4d65cc",fontFamily:"serif",fontWeight:"normal",fontStyle:"italic"}},{name:"BackstageLifecycle"});function ia(n){const a=Ir(n),{shorthand:l,alpha:d}=n;return l?React.createElement("span",{className:a[d?"alpha":"beta"],style:{fontSize:"120%"}},d?React.createElement(React.Fragment,null,"\u03B1"):React.createElement(React.Fragment,null,"\u03B2")):React.createElement("span",{className:a[d?"alpha":"beta"]},d?"Alpha":"Beta")}const dr=(0,t.lazy)(()=>Promise.all([e.e(4949),e.e(8718)]).then(e.bind(e,98718)).then(n=>({default:n.RealLogViewer})));function fr(n){const{Progress:a}=(0,c.useApp)().getComponents();return t.createElement(t.Suspense,{fallback:t.createElement(a,null)},t.createElement(dr,{...n}))}const Lr=(0,f.Z)(n=>({markdown:{"& table":{borderCollapse:"collapse",border:`1px solid ${n.palette.border}`},"& th, & td":{border:`1px solid ${n.palette.border}`,padding:n.spacing(1)},"& td":{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:n.spacing(3,2,3,2.5),borderBottom:0},"& th":{backgroundColor:n.palette.background.paper},"& tr":{backgroundColor:n.palette.background.paper},"& tr:nth-child(odd)":{backgroundColor:n.palette.background.default},"& a":{color:n.palette.link},"& img":{maxWidth:"100%"}}}),{name:"BackstageMarkdownContent"}),ir={code:({inline:n,className:a,children:l,...d})=>{const p=String(l).replace(/\n+$/,""),v=/language-(\w+)/.exec(a||"");return!n&&v?t.createElement(Ie,{language:v[1],text:p}):t.createElement("code",{className:a,...d},l)}};function $n(n){const{content:a,dialect:l="gfm",linkTarget:d,transformLinkUri:p,transformImageUri:v,className:P}=n,Z=Lr();return React.createElement(ReactMarkdown,{remarkPlugins:l==="gfm"?[gfm]:[],className:`${Z.markdown} ${P}`,children:a,components:ir,linkTarget:d,transformLinkUri:p,transformImageUri:v})}var _n=e(10179);const er=(0,f.Z)(n=>({root:{paddingLeft:n.spacing(3)}}),{name:"BackstageLoginRequestListItem"}),kr=({request:n,busy:a,setBusy:l})=>{const d=er(),[p,v]=useState(),P=async()=>{l(!0);try{await n.trigger()}catch(G){v(isError(G)?G.message:"An unspecified error occurred")}finally{l(!1)}},Z=n.provider.icon;return React.createElement(ListItem,{disabled:a,classes:{root:d.root}},React.createElement(ListItemAvatar,null,React.createElement(Z,{fontSize:"large"})),React.createElement(ListItemText,{primary:n.provider.title,secondary:p&&React.createElement(Typography,{color:"error"},p)}),React.createElement(Button,{color:"primary",variant:"contained",onClick:P},"Log in"))};var mr=null;const hr=(0,f.Z)(n=>({dialog:{paddingTop:n.spacing(1)},title:{minWidth:0},titleHeading:{fontSize:n.typography.h6.fontSize},contentList:{padding:0},actionButtons:{padding:n.spacing(2,0)}}),{name:"OAuthRequestDialog"});function Yr(n){const a=hr(),[l,d]=useState(!1),p=useApi(oauthRequestApiRef),v=useObservable(useMemo(()=>p.authRequest$(),[p]),[]),P=()=>{v.forEach(Z=>Z.reject())};return React.createElement(Dialog,{open:Boolean(v.length),fullWidth:!0,maxWidth:"xs",classes:{paper:a.dialog},"aria-labelledby":"oauth-req-dialog-title"},React.createElement("main",null,React.createElement(DialogTitle,{classes:{root:a.title},id:"oauth-req-dialog-title"},React.createElement(Typography,{className:a.titleHeading,variant:"h1"},"Login Required")),React.createElement(DialogContent,{dividers:!0,classes:{root:a.contentList}},React.createElement(List,null,v.map(Z=>React.createElement(LoginRequestListItem,{key:Z.provider.title,request:Z,busy:l,setBusy:d}))))),React.createElement(DialogActions,{classes:{root:a.actionButtons}},React.createElement(Button,{onClick:P},"Reject All")))}var Or=e(15277),gr=e.n(Or),xr=e(29862);const Dr=(0,f.Z)({container:{overflow:"visible !important"}},{name:"BackstageOverflowTooltip"});function Fr(n){var P;const[a,l]=(0,t.useState)(!1),d=(0,xr.t)(),p=Dr(),v=Z=>{d()&&l(Z)};return t.createElement(Fe.ZP,{title:(P=n.title)!=null?P:n.text||"",placement:n.placement,disableHoverListener:!a},t.createElement(gr(),{text:n.text,line:n.line,onToggled:v,containerClassName:p.container}))}var Br=e(67358);function Mr(n){const[a,l]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[]),a?t.createElement(Br.Z,{...n,"data-testid":"progress"}):t.createElement("div",{style:{display:"none"}})}var wr=e(94339),pr=e(14503),$r=e(24579),yr=e(32552),hn=e(15459),On=e(95544),pn=e(27597);const Kn=(0,f.Z)(n=>({root:{maxWidth:"fit-content",padding:n.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:n.palette.textSubtle},arrow:{color:n.palette.textSubtle}}),{name:"BackstageBottomLink"});function Ur(n){const{link:a,title:l,onClick:d}=n,p=Kn();return t.createElement("div",null,t.createElement(Xt.Z,null),t.createElement(K,{to:a,onClick:d,underline:"none"},t.createElement(On.Z,{display:"flex",alignItems:"center",className:p.root},t.createElement(On.Z,{className:p.boxTitle,fontWeight:"fontWeightBold",m:1},t.createElement(Xe.Z,null,t.createElement("strong",null,l))),t.createElement(pn.Z,{className:p.arrow}))))}const Nr=n=>{const{slackChannel:a}=n;if(a){if(typeof a=="string")return t.createElement(t.Fragment,null,"Please contact ",a," for help.");if(!a.href)return t.createElement(t.Fragment,null,"Please contact ",a.name," for help.")}else return null;return t.createElement(ce,{to:a.href,variant:"contained"},a.name)},Er=class extends t.Component{constructor(a){super(a),this.state={error:void 0,errorInfo:void 0}}componentDidCatch(a,l){console.error(`ErrorBoundary, error: ${a}, info: ${l}`),this.setState({error:a,errorInfo:l})}render(){const{slackChannel:a,children:l}=this.props,{error:d}=this.state;return d?t.createElement(Bt,{title:"Something Went Wrong",error:d},t.createElement(Nr,{slackChannel:a})):l}},vr=(0,f.Z)(n=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},header:{padding:n.spacing(2,2,2,2.5)},headerTitle:{fontWeight:700},headerSubheader:{paddingTop:n.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),Zr=(0,hn.Z)(n=>({root:{display:"inline-block",padding:n.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(pr.Z),Ar={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 tr(n){const{title:a,subheader:l,divider:d=!0,deepLink:p,slackChannel:v,errorBoundaryProps:P,variant:Z,children:G,headerStyle:H,headerProps:le,icon:ee,action:ve,actionsClassName:Te,actions:Me,cardClassName:ct,actionsTopRight:Mt,className:kt,noPadding:_t,titleTypographyProps:jt}=n,Ct=vr();let rn={},Ut={};Z&&Z.split(/[\s]+/g).forEach(wt=>{rn={...rn,...Ar.card[wt]},Ut={...Ut,...Ar.cardContent[wt]}});const nr=()=>t.createElement("div",{className:Ct.headerSubheader},l&&t.createElement("div",{className:Ct.subheader},l),ee),Gn=P||(v?{slackChannel:v}:{});return t.createElement(wr.Z,{style:rn,className:kt},t.createElement(Er,{...Gn},a&&t.createElement(yr.Z,{classes:{root:Ct.header,title:Ct.headerTitle,subheader:Ct.headerSubheader,avatar:Ct.headerAvatar,action:Ct.headerAction,content:Ct.headerContent},title:a,subheader:nr(),action:ve,style:{...H},titleTypographyProps:jt,...le}),Mt&&t.createElement(Zr,null,Mt),d&&t.createElement(Xt.Z,null),t.createElement($r.Z,{className:E()(ct,{[Ct.noPadding]:_t}),style:Ut},G),Me&&t.createElement(pr.Z,{className:Te},Me),p&&t.createElement(Ur,{...p})))}var la=e(39307);const zr=(0,f.Z)(n=>({root:{position:"relative",lineHeight:0},overlay:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -60%)",fontSize:45,fontWeight:"bold",color:n.palette.textContrast},description:{fontSize:"100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",position:"absolute",wordBreak:"break-all",display:"inline-block"},circle:{width:"80%",transform:"translate(10%, 0)"},colorUnknown:{}}),{name:"BackstageGauge"}),I={fractional:!0,inverse:!1,unit:"%",max:100},k=({palette:n,value:a,inverse:l,max:d})=>{if(isNaN(a))return"#ddd";const p=d||I.max,v=l?p-a:a;return v<p/3?n.status.error:v<p*(2/3)?n.status.warning:n.status.ok};function me(n){const[a,l]=useState(null),{getColor:d=k}=n,p=zr(n),{palette:v}=useTheme(),{value:P,fractional:Z,inverse:G,unit:H,max:le,description:ee}={...I,...n},ve=Z?Math.round(P*le):P,Te=le!==100?Math.round(P):ve,[Me,ct]=useState(!1);return useEffect(()=>{const Mt=a,kt=()=>ct(!0),_t=()=>ct(!1);return Mt&&ee?(Mt.addEventListener("mouseenter",kt),Mt.addEventListener("mouseleave",_t),()=>{Mt.removeEventListener("mouseenter",kt),Mt.removeEventListener("mouseleave",_t)}):()=>{ct(!1)}},[ee,a]),React.createElement("div",{ref:l,className:p.root},React.createElement(Circle,{strokeLinecap:"butt",percent:ve,strokeWidth:12,trailWidth:12,strokeColor:d({palette:v,value:Te,inverse:G,max:le}),className:p.circle}),ee&&Me?React.createElement("div",{className:p.description},ee):React.createElement("div",{className:p.overlay},isNaN(P)?"N/A":`${Te}${H}`))}const Be=(0,f.Z)({root:{height:"100%",width:250}},{name:"BackstageGaugeCard"});function qe(n){const a=Be(n),{title:l,subheader:d,progress:p,inverse:v,deepLink:P,description:Z,icon:G,variant:H,getColor:le}=n,ee={inverse:v,description:Z,getColor:le,value:p};return React.createElement("div",{className:a.root},React.createElement(InfoCard,{title:l,subheader:d,deepLink:P,variant:H,icon:G},React.createElement(Gauge,{...ee})))}function mt(n){const{value:a,getColor:l=getProgressColor}=n,{palette:d}=useTheme();if(isNaN(a))return null;let p=Math.round(a*100*100)/100;p>100&&(p=100);const v=l({palette:d,value:p,inverse:!1,max:100});return React.createElement(Tooltip,{title:`${p}%`},React.createElement("span",null,React.createElement(Line,{percent:p,strokeWidth:4,trailWidth:4,strokeColor:v})))}var vt=e(21324),Ot=e(7089),ft=e(1292),A=e(42494),C=e(74603),N=e(56939),W=e(12231),Y=e(73698),Q=e(72379);const ge=(0,f.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageClosedDropdown"});var Ue=()=>{const n=ge();return t.createElement(Q.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M7.5 8L6 9.5L12.0703 15.5703L18.1406 9.5L16.6406 8L12.0703 12.5703L7.5 8Z",fill:"#616161"}))};const xe=(0,f.Z)(()=>(0,o.Z)({icon:{position:"absolute",right:"4px",pointerEvents:"none"}}),{name:"BackstageOpenedDropdown"});var ze=()=>{const n=xe();return t.createElement(Q.Z,{className:n.icon,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M16.5 16L18 14.5L11.9297 8.42969L5.85938 14.5L7.35938 16L11.9297 11.4297L16.5 16Z",fill:"#616161"}))};const ke=(0,hn.Z)(n=>(0,o.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"})(C.Z),It=(0,f.Z)(n=>(0,o.Z)({formControl:{margin:`${n.spacing(1)} 0px`,maxWidth:300},label:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},formLabel:{transform:"initial",fontWeight:"bold",fontSize:14,fontFamily:n.typography.fontFamily,color:n.palette.text.primary,"&.Mui-focused":{color:n.palette.text.primary}},chips:{display:"flex",flexWrap:"wrap"},chip:{margin:2},checkbox:{},root:{display:"flex",flexDirection:"column"}}),{name:"BackstageSelect"});function rt(n){const{multiple:a,items:l,label:d,placeholder:p,selected:v,onChange:P,triggerReset:Z,native:G=!1,disabled:H=!1,margin:le}=n,ee=It(),[ve,Te]=(0,t.useState)(v||(a?[]:"")),[Me,ct]=(0,t.useState)(!1);(0,t.useEffect)(()=>{Te(a?[]:"")},[Z,a]),(0,t.useEffect)(()=>{v!==void 0&&Te(v)},[v]);const Mt=Ct=>{Te(Ct.target.value),P(Ct.target.value)},kt=Ct=>{if(H){Ct.preventDefault();return}ct(rn=>a&&!(Ct.target instanceof HTMLElement)?!0:!rn)},_t=()=>{ct(!1)},jt=Ct=>()=>{const rn=ve.filter(Ut=>Ut!==Ct);Te(rn),P(rn)};return t.createElement("div",{className:ee.root},t.createElement(ft.Z,{onClickAway:_t},t.createElement(A.Z,{className:ee.formControl},t.createElement(N.Z,{className:ee.formLabel},d),t.createElement(Y.Z,{"aria-label":d,value:ve,native:G,disabled:H,"data-testid":"select",displayEmpty:!0,multiple:a,margin:le,onChange:Mt,onClick:kt,open:Me,input:t.createElement(ke,null),label:d,tabIndex:0,renderValue:Ct=>{var rn;return a&&ve.length!==0?t.createElement("div",{className:ee.chips},Ct.map(Ut=>{var nr,Gn;return t.createElement(Ot.Z,{key:(nr=l.find(Qn=>Qn.value===Ut))==null?void 0:nr.value,label:(Gn=l.find(Qn=>Qn.value===Ut))==null?void 0:Gn.label,clickable:!0,onDelete:jt(Ut),className:ee.chip})})):t.createElement(Xe.Z,null,ve.length===0?p||"":(rn=l.find(Ut=>Ut.value===Ct))==null?void 0:rn.label)},IconComponent:()=>Me?t.createElement(ze,null):t.createElement(Ue,null),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},getContentAnchorEl:null}},p&&!a&&t.createElement(W.Z,{value:[]},p),G?l&&l.map(Ct=>t.createElement("option",{value:Ct.value,key:Ct.value},Ct.label)):l&&l.map(Ct=>t.createElement(W.Z,{key:Ct.value,value:Ct.value},a&&t.createElement(vt.Z,{color:"primary",checked:ve.includes(Ct.value)||!1,className:ee.checkbox}),Ct.label))))))}const Ve=()=>{},Ft=t.createContext({stepperLength:0,stepIndex:0,setStepIndex:Ve,stepHistory:[],setStepHistory:Ve,onStepChange:Ve});function fn(n){const{children:a,elevated:l,onStepChange:d,activeStep:p=0}=n,[v,P]=useState(p),[Z,G]=useState([0]);useEffect(()=>{P(p)},[p]);const H=[];let le;return Children.forEach(a,ee=>{isValidElement(ee)&&(ee.props.end?le=ee:H.push(ee))}),React.createElement(React.Fragment,null,React.createElement(Ft.Provider,{value:{stepIndex:v,setStepIndex:P,stepHistory:Z,setStepHistory:G,onStepChange:d,stepperLength:Children.count(a)}},React.createElement(MuiStepper,{activeStep:v,orientation:"vertical",elevation:l?2:0},H)),v>=Children.count(a)-1&&le)}const kn=(0,f.Z)(n=>({root:{marginTop:n.spacing(3),"& button":{marginRight:n.spacing(1)}}}),{name:"BackstageSimpleStepperFooter"}),xn=({text:n,handleClick:a})=>React.createElement(Button,{onClick:a},n||"Reset"),yn=({text:n,handleClick:a,disabled:l,last:d,stepIndex:p})=>React.createElement(Button,{variant:"contained",color:"primary",disabled:l,"data-testid":`nextButton-${p}`,onClick:a},n||(d?"Finish":"Next")),Sn=({text:n,handleClick:a,disabled:l,stepIndex:d})=>React.createElement(Button,{onClick:a,"data-testid":`backButton-${d}`,disabled:l},n||"Back"),Un=({actions:n={},children:a})=>{const l=kn(),{stepperLength:d,stepIndex:p,setStepIndex:v,stepHistory:P,setStepHistory:Z,onStepChange:G}=useContext(VerticalStepperContext),H=(Te,Me)=>{Me&&Me(),G&&G(p,Te),v(Te)},le=()=>{const Te=n.nextStep?n.nextStep(p,d-1):p+1;H(Te,n.onNext),Z([...P,Te])},ee=()=>{P.pop(),H(P[P.length-1],n.onBack),Z([...P])},ve=()=>{H(0,n.onRestart),Z([0])};return React.createElement("div",{className:l.root},[void 0,!0].includes(n.showBack)&&p!==0&&React.createElement(Sn,{text:n.backText,handleClick:ee,disabled:p===0,stepIndex:p}),[void 0,!0].includes(n.showNext)&&React.createElement(yn,{text:n.nextText,handleClick:le,disabled:!!d&&p>=d||!!n.canNext&&!n.canNext(),stepIndex:p}),n.showRestart&&p!==0&&React.createElement(xn,{text:n.restartText,handleClick:ve,stepIndex:p}),a)},Rr=(0,f.Z)(n=>({end:{padding:n.spacing(3)}}),{name:"SimpleStepperStep"});function Wr(n){const{title:a,children:l,end:d,actions:p,...v}=n,P=Rr();return d?React.createElement("div",{className:P.end},React.createElement(Typography,{variant:"h6"},a),l,React.createElement(SimpleStepperFooter,{actions:{...p||{},showNext:!1}})):React.createElement(MuiStep,{...v},React.createElement(StepLabel,null,React.createElement(Typography,{variant:"h6"},a)),React.createElement(StepContent,null,l,React.createElement(SimpleStepperFooter,{actions:p})))}const Yn=(0,f.Z)(n=>({status:{fontWeight:500,"&::before":{width:"0.7em",height:"0.7em",display:"inline-block",marginRight:8,borderRadius:"50%",content:'""'}},ok:{"&::before":{backgroundColor:n.palette.status.ok}},warning:{"&::before":{backgroundColor:n.palette.status.warning}},error:{"&::before":{backgroundColor:n.palette.status.error}},pending:{"&::before":{backgroundColor:n.palette.status.pending}},running:{"&::before":{backgroundColor:n.palette.status.running}},aborted:{"&::before":{backgroundColor:n.palette.status.aborted}}}),{name:"BackstageStatus"});function Cn(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.ok),"aria-label":"Status ok","aria-hidden":"true",...n})}function Dn(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.warning),"aria-label":"Status warning","aria-hidden":"true",...n})}function Hr(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.error),"aria-label":"Status error","aria-hidden":"true",...n})}function ca(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.pending),"aria-label":"Status pending","aria-hidden":"true",...n})}function al(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.running),"aria-label":"Status running","aria-hidden":"true",...n})}function ol(n){const a=Yn(n);return React.createElement("span",{className:classNames(a.status,a.aborted),"aria-label":"Status aborted","aria-hidden":"true",...n})}var sl=e(74600),Ra=e(15584);const Ro=n=>(0,o.Z)({root:{fontWeight:"bolder",whiteSpace:"nowrap",paddingRight:n.spacing(4),border:"0",verticalAlign:"top"}}),So={root:{border:"0",verticalAlign:"top"}},Co=n=>(0,o.Z)({root:{listStyle:"none",margin:n.spacing(0,0,-1,0),padding:"0"}}),To=n=>(0,o.Z)({root:{padding:n.spacing(0,0,1,0)},random:{}}),bo=(0,hn.Z)(Ro,{name:"BackstageMetadataTableTitleCell"})(Ra.Z),Po=(0,hn.Z)(So,{name:"BackstageMetadataTableCell"})(Ra.Z),il=({dense:n,children:a})=>React.createElement(Table,{size:n?"small":"medium"},React.createElement(TableBody,null,a)),ll=({title:n,children:a,...l})=>React.createElement(TableRow,null,n&&React.createElement(bo,null,n),React.createElement(Po,{colSpan:n?1:2,...l},a)),Sa=(0,hn.Z)(Co,{name:"BackstageMetadataTableList"})(({classes:n,children:a})=>t.createElement("ul",{className:n.root},a)),cl=(0,hn.Z)(To,{name:"BackstageMetadataTableListItem"})(({classes:n,children:a})=>t.createElement("li",{className:n.root},a)),Ca=(0,o.Z)({root:{margin:"0 0",listStyleType:"none"}}),Io=n=>(0,o.Z)({root:{...Ca.root,paddingLeft:n.spacing(1)}}),Ta=(0,hn.Z)(Ca,{name:"BackstageStructuredMetadataTableList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a)),ba=(0,hn.Z)(Io,{name:"BackstageStructuredMetadataTableNestedList"})(({classes:n,children:a})=>t.createElement(Sa,{classes:n},a));function Lo(n,a){const l=n.map((d,p)=>React.createElement(MetadataListItem,{key:p},ua(d)));return a?React.createElement(ba,null,l):React.createElement(Ta,null,l)}function Oo(n,a,l){const d=Object.keys(n).map(p=>{const v=ua(n[p],!0),P=l&&l.titleFormat?l.titleFormat(p):startCase(p);return React.createElement(MetadataListItem,{key:p},`${P}: `,v)});return a?React.createElement(ba,null,d):React.createElement(Ta,null,d)}function ua(n,a,l){return React.isValidElement(n)?React.createElement(Fragment,null,n):typeof n=="object"&&!Array.isArray(n)?Oo(n,a,l):Array.isArray(n)?Lo(n,l):typeof n=="boolean"?React.createElement(Fragment,null,n?"\u2705":"\u274C"):React.createElement(Fragment,null,n)}const xo=({value:n,options:a})=>React.createElement(Fragment,null,ua(n,a)),Do=({title:n,value:a,options:l})=>React.createElement(MetadataTableItem,{title:l&&l.titleFormat?l.titleFormat(n):startCase(n)},React.createElement(xo,{value:a,options:l}));function Fo(n,a){return Object.keys(n).map(l=>React.createElement(Do,{key:l,title:l,value:n[l],options:a}))}function ul(n){const{metadata:a,dense:l=!0,options:d}=n,p=Fo(a,d||{});return React.createElement(MetadataTable,{dense:l},p)}var Bo=e(49429),Mo=e(86136),Pa=e(79784),wo=e(19126),Ia=e.n(wo);function $o(n){return qs.stringify(n,{strictNullHandling:!0})}function La(n){return qs.parse(n,{ignoreQueryPrefix:!0,strictNullHandling:!0})}function Oa(n,a){return La(n)[a]}function Uo(n,a,l){const d={...La(n),[a]:l};return $o(d)}function dl(n,a=250){const[l,d]=useSearchParams(),p=l.toString(),[v,P]=useState(Oa(p,n));return useEffect(()=>{const Z=Oa(p,n);P(G=>isEqual(Z,G)?G:Z)},[p,P,n]),useDebouncedEffect(()=>{const Z=Uo(p,n,v);p!==Z&&d(Z,{replace:!0})},[d,v,p,n],a),[v,P]}const No={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 xa(){const a=(0,c.useApiHolder)().get(c.configApiRef),l=a==null?void 0:a.getOptionalConfig("app.support");return l?{url:l.getString("url"),items:l.getConfigArray("items").flatMap(d=>{var p;return{title:d.getString("title"),icon:d.getOptionalString("icon"),links:((p=d.getOptionalConfigArray("links"))!=null?p:[]).flatMap(v=>({url:v.getString("url"),title:v.getString("title")}))}})}:No}var Zo=e(80079);function zn(n,a){const d=(0,c.useApp)().getSystemIcon(n);return d?t.createElement(d,{...a}):t.createElement(Zo.Z,{...a})}function fl(n){return zn("brokenImage",n)}function ml(n){return zn("catalog",n)}function hl(n){return zn("chat",n)}function gl(n){return zn("dashboard",n)}function pl(n){return zn("docs",n)}function yl(n){return zn("email",n)}function El(n){return zn("github",n)}function vl(n){return zn("group",n)}function Jr(n){return zn("help",n)}function Al(n){return zn("user",n)}function Rl(n){return zn("warning",n)}const zo=(0,f.Z)({popoverList:{minWidth:260,maxWidth:400}},{name:"BackstageSupportButton"}),Wo=({icon:n})=>{var d;const a=(0,c.useApp)(),l=n&&(d=a.getSystemIcon(n))!=null?d:Jr;return t.createElement(l,null)},Ho=({link:n})=>{var a;return t.createElement(K,{to:n.url},(a=n.title)!=null?a:n.url)},jo=({item:n})=>{var a;return t.createElement(oe.Z,null,t.createElement(Mo.Z,null,t.createElement(Wo,{icon:n.icon})),t.createElement(te.Z,{primary:n.title,secondary:(a=n.links)==null?void 0:a.reduce((l,d,p)=>[...l,p>0&&t.createElement("br",{key:p}),t.createElement(Ho,{link:d,key:d.url})],[])}))};function Vo(n){const{title:a,children:l}=n,{items:d}=xa(),[p,v]=(0,t.useState)(!1),[P,Z]=(0,t.useState)(null),G=zo(),H=(0,ht.Z)(ve=>ve.breakpoints.down("sm")),le=ve=>{Z(ve.currentTarget),v(!0)},ee=()=>{v(!1)};return t.createElement(t.Fragment,null,t.createElement(On.Z,{display:"flex",ml:1},H?t.createElement(De.Z,{color:"primary",size:"small",onClick:le,"data-testid":"support-button"},t.createElement(Jr,null)):t.createElement(y.Z,{"data-testid":"support-button","aria-label":"support",color:"primary",onClick:le,startIcon:t.createElement(Jr,null)},"Support")),t.createElement(Pa.ZP,{"data-testid":"support-button-popover",open:p,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:ee},t.createElement(U.Z,{className:G.popoverList},a&&t.createElement(oe.Z,{alignItems:"flex-start"},t.createElement(Xe.Z,{variant:"subtitle1"},a)),t.Children.map(l,(ve,Te)=>t.createElement(oe.Z,{alignItems:"flex-start",key:`child-${Te}`},ve)),d&&d.map((ve,Te)=>t.createElement(jo,{item:ve,key:`item-${Te}`}))),t.createElement(Bo.Z,null,t.createElement(y.Z,{color:"primary",onClick:ee},"Close"))))}var da=e(18671),Nn=e(10289);const Qr=72,Da=24,Fa=18,Jn={drawerWidthClosed:Qr,drawerWidthOpen:224,defaultOpenDelayMs:100,defaultCloseDelayMs:0,defaultFadeDuration:200,logoHeight:32,iconContainerWidth:Qr,iconSize:Qr-Da*2,iconPadding:Da,selectedIndicatorWidth:3,userBadgePadding:Fa,userBadgeDiameter:Qr-Fa*2,mobileSidebarHeight:56},Go=n=>({...Jn,...n,iconContainerWidth:Jn.drawerWidthClosed,iconSize:Jn.drawerWidthClosed-Jn.iconPadding*2,userBadgeDiameter:Jn.drawerWidthClosed-Jn.userBadgePadding*2}),Ba={drawerWidthClosed:0,drawerWidthOpen:202,defaultOpenDelayMs:Jn.defaultOpenDelayMs+200},Ko=n=>({...Ba,...n}),Sl="@backstage/core/sidebar-intro-dismissed",Vn=(0,t.createContext)({sidebarConfig:Jn,submenuConfig:Ba}),Ma=(0,t.createContext)({isHoveredOn:!1,setIsHoveredOn:()=>{}});var Xr;(function(n){const a="sidebarPinState";n.SIDEBAR_PIN_STATE=a})(Xr||(Xr={}));const wa={getSidebarPinState(){let n;try{n=JSON.parse(window.localStorage.getItem(Xr.SIDEBAR_PIN_STATE)||"true")}catch{return!0}return!!n},setSidebarPinState(n){return window.localStorage.setItem(Xr.SIDEBAR_PIN_STATE,JSON.stringify(n))}};var qr=e(76241);const $a={isPinned:!0,toggleSidebarPinState:()=>{},isMobile:!1},Ua=(0,t.createContext)($a),Na=(0,qr.CT)("sidebar-pin-state-context"),ko=({children:n,value:a})=>t.createElement(Ua.Provider,{value:a},t.createElement(Na.Provider,{value:(0,qr.EI)({1:a})},n)),jr=()=>{const n=(0,t.useContext)(Na),a=(0,t.useContext)(Ua);if(n===void 0)return a||$a;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l},Yo=(0,f.Z)(n=>({root:{width:"100%",transition:"padding-left 0.1s ease-out",isolation:"isolate",[n.breakpoints.up("sm")]:{paddingLeft:a=>a.isPinned?a.sidebarConfig.drawerWidthOpen:a.sidebarConfig.drawerWidthClosed},[n.breakpoints.down("xs")]:{paddingBottom:a=>a.sidebarConfig.mobileSidebarHeight}},content:{zIndex:0,isolation:"isolate","&:focus":{outline:0}}}),{name:"BackstageSidebarPage"}),Za=(0,t.createContext)({content:{contentRef:void 0}});function Jo(n){const[a,l]=(0,t.useState)(()=>wa.getSidebarPinState()),{sidebarConfig:d}=(0,t.useContext)(Vn),p=(0,t.useRef)(null),v=(0,t.useMemo)(()=>({content:{contentRef:p}}),[p]);(0,t.useEffect)(()=>{wa.setSidebarPinState(a)},[a]);const P=(0,ht.Z)(H=>H.breakpoints.down("xs"),{noSsr:!0}),Z=()=>l(!a),G=Yo({isPinned:a,sidebarConfig:d});return t.createElement(ko,{value:{isPinned:a,toggleSidebarPinState:Z,isMobile:P}},t.createElement(Za.Provider,{value:v},t.createElement("div",{className:G.root},n.children)))}function za(){const{content:n}=(0,t.useContext)(Za);return{focusContent:(0,t.useCallback)(()=>{var l,d;(d=(l=n==null?void 0:n.contentRef)==null?void 0:l.current)==null||d.focus()},[n]),contentRef:n==null?void 0:n.contentRef}}const Wa={isOpen:!1,setOpen:()=>{}},Ha=(0,t.createContext)(Wa),ja=(0,qr.CT)("sidebar-open-state-context"),Va=({children:n,value:a})=>t.createElement(Ha.Provider,{value:a},t.createElement(ja.Provider,{value:(0,qr.EI)({1:a})},n)),fa=()=>{const n=(0,t.useContext)(ja),a=(0,t.useContext)(Ha);if(n===void 0)return a||Wa;const l=n.atVersion(1);if(l===void 0)throw new Error("No context found for version 1.");return l};var Qo=e(50023),Xo=e(4190),qo=e(87685),_o=e(44882),es=e(57998);const ts=(0,f.Z)(n=>({root:{flexGrow:0,margin:n.spacing(0,2),color:n.palette.navigation.color},selected:a=>({color:`${n.palette.navigation.selectedColor}!important`,borderTop:`solid ${a.sidebarConfig.selectedIndicatorWidth}px ${n.palette.navigation.indicator}`,marginTop:"-1px"}),label:{display:"none"}})),ns=n=>{const{to:a,label:l,icon:d,value:p}=n,{sidebarConfig:v}=(0,t.useContext)(Vn),P=ts({sidebarConfig:v}),Z=(0,Nn.TH)(),{selectedMenuItemIndex:G,setSelectedMenuItemIndex:H}=(0,t.useContext)(ka),le=(ve,Te)=>{H(Te===G?-1:Te)},ee=p===G&&G>=0||p!==G&&!(G>=0)&&a===Z.pathname;return t.createElement(es.Z,{label:l,icon:d,component:K,to:a||Z.pathname,onChange:le,value:p,selected:ee,classes:P})},Ga=n=>{const{children:a,to:l,label:d,icon:p,value:v}=n,{isMobile:P}=jr();return P?t.createElement(ns,{to:l,label:d,icon:p,value:v}):t.createElement(t.Fragment,null,a)},Ka=(0,f.Z)(n=>({root:{position:"fixed",backgroundColor:n.palette.navigation.background,color:n.palette.navigation.color,bottom:0,left:0,right:0,zIndex:n.zIndex.snackbar,borderTop:"1px solid #383838"},overlay:a=>({background:n.palette.navigation.background,width:"100%",bottom:`${a.sidebarConfig.mobileSidebarHeight}px`,height:`calc(100% - ${a.sidebarConfig.mobileSidebarHeight}px)`,flex:"0 1 auto",overflow:"auto"}),overlayHeader:{display:"flex",color:n.palette.text.primary,alignItems:"center",justifyContent:"space-between",padding:n.spacing(2,3)},overlayHeaderClose:{color:n.palette.text.primary},marginMobileSidebar:a=>({marginBottom:`${a.sidebarConfig.mobileSidebarHeight}px`})})),rs=n=>(0,L.orderBy)(n,({props:{priority:a}})=>Number.isInteger(a)?a:-1,"desc"),as=t.createElement(Ga).type,os=({children:n,label:a="Menu",open:l,onClose:d})=>{const{sidebarConfig:p}=(0,t.useContext)(Vn),v=Ka({sidebarConfig:p});return t.createElement(Xo.ZP,{anchor:"bottom",open:l,onClose:d,ModalProps:{BackdropProps:{classes:{root:v.marginMobileSidebar}}},classes:{root:v.marginMobileSidebar,paperAnchorBottom:v.overlay}},t.createElement(On.Z,{className:v.overlayHeader},t.createElement(Xe.Z,{variant:"h3"},a),t.createElement(De.Z,{onClick:d,classes:{root:v.overlayHeaderClose}},t.createElement(qo.Z,null))),t.createElement(On.Z,{component:"nav"},n))},ka=(0,t.createContext)({selectedMenuItemIndex:-1,setSelectedMenuItemIndex:()=>{}}),ss=n=>{const{sidebarConfig:a}=(0,t.useContext)(Vn),{children:l}=n,d=Ka({sidebarConfig:a}),p=(0,Nn.TH)(),[v,P]=(0,t.useState)(-1);(0,t.useEffect)(()=>{P(-1)},[p.pathname]);let Z=(0,c.useElementFilter)(l,H=>H.getElements().filter(le=>le.type===as));if(l)Z.length?Z=rs(Z):Z.push(t.createElement(Ga,{key:"default_menu",icon:t.createElement(_o.Z,null)},l));else return null;const G=v>=0&&!Z[v].props.to;return t.createElement(Va,{value:{isOpen:!0,setOpen:()=>{}}},t.createElement(ka.Provider,{value:{selectedMenuItemIndex:v,setSelectedMenuItemIndex:P}},t.createElement(os,{label:Z[v]&&Z[v].props.label,open:G,onClose:()=>P(-1)},Z[v]&&Z[v].props.children),t.createElement(Qo.Z,{className:d.root,"data-testid":"mobile-sidebar-root",component:"nav"},Z)))},Ya=(0,f.Z)(n=>({drawer:a=>({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:a.sidebarConfig.drawerWidthClosed,transition:n.transitions.create("width",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest}),"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}),drawerOpen:a=>({width:a.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 Fn;(function(n){n[n.Closed=0]="Closed";const l=0+1;n[n.Idle=l]="Idle";const d=l+1;n[n.Open=d]="Open"})(Fn||(Fn={}));const is=n=>{const{sidebarConfig:a}=(0,t.useContext)(Vn),{openDelayMs:l=a.defaultOpenDelayMs,closeDelayMs:d=a.defaultCloseDelayMs,disableExpandOnHover:p,children:v}=n,P=Ya({sidebarConfig:a}),Z=(0,ht.Z)(kt=>kt.breakpoints.down("md"),{noSsr:!0}),[G,H]=(0,t.useState)(Fn.Closed),le=(0,t.useRef)(),{isPinned:ee,toggleSidebarPinState:ve}=jr(),Te=()=>{ee||p||(le.current&&(clearTimeout(le.current),le.current=void 0),G!==Fn.Open&&!Z&&(le.current=window.setTimeout(()=>{le.current=void 0,H(Fn.Open)},l),H(Fn.Idle)))},Me=()=>{ee||p||(le.current&&(clearTimeout(le.current),le.current=void 0),G===Fn.Idle?H(Fn.Closed):G===Fn.Open&&(le.current=window.setTimeout(()=>{le.current=void 0,H(Fn.Closed)},d)))},ct=G===Fn.Open&&!Z||ee,Mt=kt=>{kt?(H(Fn.Open),ve()):(H(Fn.Closed),ve())};return t.createElement("nav",{style:{},"aria-label":"sidebar nav"},t.createElement(cs,null),t.createElement(Va,{value:{isOpen:ct,setOpen:Mt}},t.createElement("div",{className:P.root,"data-testid":"sidebar-root",onMouseEnter:p?()=>{}:Te,onFocus:p?()=>{}:Te,onMouseLeave:p?()=>{}:Me,onBlur:p?()=>{}:Me},t.createElement("div",{className:E()(P.drawer,{[P.drawerOpen]:ct})},v))))},ls=n=>{var G,H;const a=Go((G=n.sidebarOptions)!=null?G:{}),l=Ko((H=n.submenuOptions)!=null?H:{}),{children:d,disableExpandOnHover:p,openDelayMs:v,closeDelayMs:P}=n,{isMobile:Z}=jr();return Z?t.createElement(ss,null,d):t.createElement(Vn.Provider,{value:{sidebarConfig:a,submenuConfig:l}},t.createElement(is,{openDelayMs:v,closeDelayMs:P,disableExpandOnHover:p},d))};function cs(){const{sidebarConfig:n}=(0,t.useContext)(Vn),{focusContent:a,contentRef:l}=za(),d=Ya({sidebarConfig:n});return l!=null&&l.current?t.createElement(y.Z,{onClick:a,variant:"contained",className:E()(d.visuallyHidden)},"Skip to content"):null}function Ja(n,a){const l=new URLSearchParams(a.search).toString(),d=Ia().parse(l),p=new URLSearchParams(n.search).toString(),v=Ia().parse(p);return(0,L.isEqual)(a.pathname,n.pathname)&&(0,L.isMatch)(v,d)}const us=(0,f.Z)(n=>({item:{height:48,width:"100%","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor},display:"flex",alignItems:"center",color:n.palette.navigation.color,padding:20,cursor:"pointer",position:"relative",background:"none",border:"none"},itemContainer:{width:"100%"},selected:{background:"#6f6f6f",color:"#FFF"},label:{margin:14,marginLeft:7,fontSize:14,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis",lineHeight:1},subtitle:{fontSize:10,whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"},dropdownArrow:{position:"absolute",right:21},dropdown:{display:"flex",flexDirection:"column",alignItems:"end"},dropdownItem:{width:"100%",padding:"10px 0 10px 0","&:hover":{background:"#6f6f6f",color:n.palette.navigation.selectedColor}},textContent:{color:n.palette.navigation.color,paddingLeft:n.spacing(4),paddingRight:n.spacing(1),fontSize:"14px",whiteSpace:"nowrap",overflow:"hidden","text-overflow":"ellipsis"}}),{name:"BackstageSidebarSubmenuItem"}),Cl=n=>{const{title:a,subtitle:l,to:d,icon:p,dropdownItems:v}=n,P=us(),{setIsHoveredOn:Z}=useContext(SidebarItemWithSubmenuContext),G=()=>{Z(!1)},H=useResolvedPath(d!=null?d:""),le=useLocation();let ee=isLocationMatch(le,H);const[ve,Te]=useState(!1),Me=()=>{Te(!ve)};return v!==void 0?(v.some(ct=>{const Mt=resolvePath(ct.to);return ee=isLocationMatch(le,Mt),ee}),React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement("button",{onClick:Me,onTouchStart:ct=>ct.stopPropagation(),className:classnames(P.item,ee?P.selected:void 0)},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)),ve?React.createElement(ArrowDropUpIcon,{className:P.dropdownArrow}):React.createElement(ArrowDropDownIcon,{className:P.dropdownArrow}))),v&&ve&&React.createElement("div",{className:P.dropdown},v.map((ct,Mt)=>React.createElement(Tooltip,{key:Mt,title:ct.title,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:ct.to,underline:"none",className:P.dropdownItem,onClick:G,onTouchStart:kt=>kt.stopPropagation()},React.createElement(Typography,{className:P.textContent},ct.title))))))):React.createElement("div",{className:P.itemContainer},React.createElement(Tooltip,{title:a,enterDelay:500,enterNextDelay:500},React.createElement(Link,{to:d,underline:"none",className:classnames(P.item,ee?P.selected:void 0),onClick:G,onTouchStart:ct=>ct.stopPropagation()},p&&React.createElement(p,{fontSize:"small"}),React.createElement(Typography,{variant:"subtitle1",className:P.label},a,React.createElement("br",null),l&&React.createElement(Typography,{variant:"caption",className:P.subtitle},l)))))},ds=(0,f.Z)(n=>({root:{zIndex:1e3,position:"relative",overflow:"visible",width:n.spacing(7)+1},drawer:a=>{var l,d;return{display:"flex",flexFlow:"column nowrap",alignItems:"flex-start",position:"fixed",[n.breakpoints.up("sm")]:{marginLeft:a.left,transition:n.transitions.create("margin-left",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})},top:0,bottom:0,padding:0,background:(d=(l=n.palette.navigation.submenu)==null?void 0:l.background)!=null?d:"#404040",overflowX:"hidden",msOverflowStyle:"none",scrollbarWidth:"none",cursor:"default",width:a.submenuConfig.drawerWidthClosed,transitionDelay:`${a.submenuConfig.defaultOpenDelayMs}ms`,"& > *":{flexShrink:0},"&::-webkit-scrollbar":{display:"none"}}},drawerOpen:a=>({width:a.submenuConfig.drawerWidthOpen,[n.breakpoints.down("xs")]:{width:"100%",position:"relative",paddingLeft:n.spacing(3),left:0,top:0}}),title:{fontSize:24,fontWeight:500,color:"#FFF",padding:20,[n.breakpoints.down("xs")]:{display:"none"}}}),{name:"BackstageSidebarSubmenu"}),fs=n=>{const{isOpen:a}=fa(),{sidebarConfig:l,submenuConfig:d}=(0,t.useContext)(Vn),p=a?l.drawerWidthOpen:l.drawerWidthClosed,v=ds({left:p,submenuConfig:d}),{isHoveredOn:P}=(0,t.useContext)(Ma),[Z,G]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{G(P)},[P]),t.createElement("div",{className:E()(v.drawer,{[v.drawerOpen]:Z})},t.createElement(Xe.Z,{variant:"h5",className:v.title},n.title),n.children)};var _r=e(76600),ms=e(26739),Qa=e(98989),hs=e(59797),gs=e(83543);const ps=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Tl=()=>{const n=ps();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowBackIosIcon,{style:{fontSize:"12px"}})))};var bl=null;const ys=(0,f.Z)({iconContainer:{display:"flex",position:"relative",width:"100%"},arrow1:{right:"6px",position:"absolute"}}),Pl=()=>{const n=ys();return React.createElement("div",{className:n.iconContainer},React.createElement("div",{className:n.arrow1},React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})),React.createElement("div",null,React.createElement(ArrowForwardIosIcon,{style:{fontSize:"12px"}})))};var Il=null;const Es=n=>(0,f.Z)(a=>{var l,d,p,v;return{root:{color:a.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:{[a.breakpoints.up("sm")]:{width:n.drawerWidthOpen}},highlightable:{"&:hover":{background:(d=(l=a.palette.navigation.navItem)==null?void 0:l.hoverBackground)!=null?d:"#404040"}},highlighted:{background:(v=(p=a.palette.navigation.navItem)==null?void 0:p.hoverBackground)!=null?v:"#404040"},label:{fontWeight:"bold",whiteSpace:"nowrap",lineHeight:"auto",flex:"3 1 auto",width:"110px",overflow:"hidden","text-overflow":"ellipsis"},iconContainer:{boxSizing:"border-box",height:"100%",width:n.iconContainerWidth,marginRight:-a.spacing(2),display:"flex",alignItems:"center",justifyContent:"center"},searchRoot:{marginBottom:12},searchField:{color:"#b5b5b5",fontWeight:"bold",fontSize:a.typography.fontSize},searchFieldHTMLInput:{padding:a.spacing(2,0,2)},searchContainer:{width:n.drawerWidthOpen-n.iconContainerWidth},secondaryAction:{width:a.spacing(6),textAlign:"center",marginRight:a.spacing(1)},closedItemIcon:{width:"100%",justifyContent:"center"},submenuArrow:{display:"flex"},expandButton:{background:"none",border:"none",color:a.palette.navigation.color,width:"100%",cursor:"pointer",position:"relative",height:48},arrows:{position:"absolute",right:10},selected:{"&$root":{borderLeft:`solid ${n.selectedIndicatorWidth}px ${a.palette.navigation.indicator}`,color:a.palette.navigation.selectedColor},"&$closed":{width:n.drawerWidthClosed},"& $closedItemIcon":{paddingRight:n.selectedIndicatorWidth},"& $iconContainer":{marginLeft:-n.selectedIndicatorWidth}}}},{name:"BackstageSidebarItem"});function ea(n){return(0,t.useMemo)(()=>Es(n),[n])()}const vs=(n,a)=>(0,c.useElementFilter)(n.props.children,l=>{let d=!1;return l.getElements().forEach(({props:{to:p,dropdownItems:v}})=>{if(!d){if(v!=null&&v.length){v.forEach(({to:P})=>d=d||Ja(a,(0,Nn.i3)(P)));return}p&&(d=Ja(a,(0,Nn.i3)(p)))}}),d},[a.pathname]);function Xa(n){return n.to===void 0}const As=t.createElement(fs).type,Rs=t.forwardRef(function({to:a,end:l,style:d,className:p,activeStyle:v,caseSensitive:P,activeClassName:Z="active","aria-current":G="page",...H},le){let{pathname:ee}=(0,Nn.TH)(),{pathname:ve}=(0,Nn.WU)(a);P||(ee=ee.toLocaleLowerCase("en-US"),ve=ve.toLocaleLowerCase("en-US"));let Te=ee===ve;!Te&&!l&&(Te=ee.startsWith(`${ve}/`));const Me=Te?G:void 0;return t.createElement(b.rU,{...H,to:a,ref:le,"aria-current":Me,style:{...d,...Te?v:void 0},className:E()([p,Te?Z:void 0])})}),qa=(0,t.forwardRef)((n,a)=>{const{icon:l,text:d,hasNotifications:p=!1,hasSubmenu:v=!1,disableHighlight:P=!1,onClick:Z,children:G,className:H,...le}=n,{sidebarConfig:ee}=(0,t.useContext)(Vn),ve=ea(ee),{isOpen:Te}=fa(),Me=!Te&&v?{display:"flex",marginLeft:"24px"}:{},ct=t.createElement("div",{style:Me},t.createElement(l,{fontSize:"small"}),!Te&&v?t.createElement(Qa.Z,null):t.createElement(t.Fragment,null)),Mt=t.createElement(ms.Z,{color:"secondary",variant:"dot",overlap:"circular",invisible:!p,className:E()({[ve.closedItemIcon]:!Te})},ct),kt=t.createElement(t.Fragment,null,t.createElement("div",{"data-testid":"login-button",className:ve.iconContainer},Mt),d&&t.createElement(Xe.Z,{variant:"subtitle2",className:ve.label},d),t.createElement("div",{className:ve.secondaryAction},G)),_t=Te?kt:Mt,jt={onClick:Z,className:E()(H,ve.root,Te?ve.open:ve.closed,Xa(n)&&ve.buttonItem,{[ve.highlightable]:!P})};return Xa(n)?t.createElement("button",{"aria-label":d,...jt,ref:a},_t):t.createElement(Rs,{...jt,activeClassName:ve.selected,to:n.to?n.to:"",ref:a,"aria-label":d||n.to,...le},_t)}),Ss=({children:n,...a})=>{const{sidebarConfig:l}=(0,t.useContext)(Vn),d=ea(l),[p,v]=(0,t.useState)(!1),P=(0,Nn.TH)(),Z=vs(n,P),G=(0,ht.Z)(ve=>ve.breakpoints.down("sm")),H=()=>{v(!0)},le=()=>{v(!1)},ee=()=>G?p?t.createElement(hs.Z,{fontSize:"small",className:d.submenuArrow}):t.createElement(gs.Z,{fontSize:"small",className:d.submenuArrow}):!p&&t.createElement(Qa.Z,{fontSize:"small",className:d.submenuArrow});return t.createElement(Ma.Provider,{value:{isHoveredOn:p,setIsHoveredOn:v}},t.createElement("div",{"data-testid":"item-with-submenu",onMouseLeave:le,onTouchStart:p?le:H,onMouseEnter:H,className:E()(p&&d.highlighted)},t.createElement(qa,{hasSubmenu:!0,className:Z?d.selected:"",...a},ee()),p&&n))},_a=(0,t.forwardRef)((n,a)=>{const[l]=(0,c.useElementFilter)(n.children,d=>d.getElements().filter(p=>p.type===As));return l?t.createElement(Ss,{...n},l):t.createElement(qa,{...n,ref:a})});function Ll(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),[l,d]=useState(""),p=ea(a),v=n.icon?n.icon:SearchIcon,P=()=>{n.onSearch(l),d("")},Z=ee=>{ee.key==="Enter"&&(ee.preventDefault(),P())},G=ee=>{d(ee.target.value)},H=ee=>{ee.preventDefault(),ee.stopPropagation()},le=ee=>{P(),ee.preventDefault()};return React.createElement("div",{className:p.searchRoot},React.createElement(_a,{icon:v,to:n.to,onClick:le,disableHighlight:!0},React.createElement(TextField,{placeholder:"Search",value:l,onClick:H,onChange:G,onKeyDown:Z,className:p.searchContainer,InputProps:{disableUnderline:!0,className:p.searchField},inputProps:{className:p.searchFieldHTMLInput}})))}const Ol=(0,_r.Z)("div")({flex:1},{name:"BackstageSidebarSpace"}),xl=(0,_r.Z)("div")({height:8},{name:"BackstageSidebarSpacer"}),Cs=(0,_r.Z)("hr")({height:1,width:"100%",background:"#383838",border:"none",margin:"12px 0px"},{name:"BackstageSidebarDivider"}),Ts=n=>({overflowY:"auto","&::-webkit-scrollbar":{backgroundColor:n.palette.background.default,width:"5px",borderRadius:"5px"},"&::-webkit-scrollbar-thumb":{backgroundColor:n.palette.text.hint,borderRadius:"5px"}}),Dl=(0,_r.Z)("div")(({theme:n})=>{const a=Ts(n);return{flex:"0 1 auto",overflowX:"hidden",width:"calc(100% - 5px)",minHeight:"48px",overflowY:"hidden","@media (hover: none)":a,"&:hover":a}}),Fl=()=>{const{sidebarConfig:n}=useContext(SidebarConfigContext),a=ea(n),{isOpen:l,setOpen:d}=useSidebarOpenState();if(useMediaQuery(P=>P.breakpoints.down("md"),{noSsr:!0}))return null;const v=()=>{d(!l)};return React.createElement("button",{onClick:v,className:a.expandButton,"aria-label":"Expand Sidebar","data-testid":"sidebar-expand-button"},React.createElement("div",{className:a.arrows},l?React.createElement(DoubleArrowLeft,null):React.createElement(DoubleArrowRight,null)))},bs=(0,f.Z)(n=>({introCard:a=>({color:"#b5b5b5",fontSize:12,width:a.sidebarConfig.drawerWidthOpen,marginTop:18,marginBottom:12,paddingLeft:a.sidebarConfig.iconPadding,paddingRight:a.sidebarConfig.iconPadding}),introDismiss:{display:"flex",justifyContent:"flex-end",alignItems:"center",marginTop:12},introDismissLink:{color:"#dddddd",display:"flex",alignItems:"center",marginBottom:4,"&:hover":{color:n.palette.linkHover,transition:n.transitions.create("color",{easing:n.transitions.easing.sharp,duration:n.transitions.duration.shortest})}},introDismissText:{fontSize:"0.7rem",fontWeight:"bold",textTransform:"uppercase",letterSpacing:1},introDismissIcon:{width:18,height:18,marginRight:12}}),{name:"BackstageSidebarIntro"});function Ps(n){const{sidebarConfig:a}=useContext(SidebarConfigContext),l=bs({sidebarConfig:a}),{text:d,onClose:p}=n,v=()=>p();return React.createElement("div",{className:l.introCard},React.createElement(Typography,{variant:"subtitle2"},d),React.createElement("div",{className:l.introDismiss},React.createElement(Link,{component:"button",onClick:v,underline:"none",className:l.introDismissLink},React.createElement(CloseIcon,{className:l.introDismissIcon}),React.createElement(Typography,{component:"span",className:l.introDismissText},"Dismiss"))))}const eo=n=>{const{text:a,onDismiss:l}=n,[d,p]=useState(!1),v=()=>{p(!0)};return React.createElement(Collapse,{in:!d,onExited:l},React.createElement(Ps,{text:a,onClose:v}))},Is=null,Ls="And your recently viewed plugins will pop up here!";function Bl(n){const{isOpen:a}=useSidebarOpenState(),l={starredItemsDismissed:!1,recentlyViewedItemsDismissed:!1},[d,p]=useLocalStorageValue(SIDEBAR_INTRO_LOCAL_STORAGE),{starredItemsDismissed:v,recentlyViewedItemsDismissed:P}=d!=null?d:{},Z=()=>{p(H=>({...l,...H,starredItemsDismissed:!0}))},G=()=>{p(H=>({...l,...H,recentlyViewedItemsDismissed:!0}))};return a?React.createElement(React.Fragment,null,!v&&React.createElement(React.Fragment,null,React.createElement(eo,{text:Is,onDismiss:Z}),React.createElement(SidebarDivider,null)),!P&&React.createElement(eo,{text:Ls,onDismiss:G})):null}const Os=(0,f.Z)(n=>({root:{gridArea:"pageContent",minWidth:0,paddingTop:n.spacing(3),paddingBottom:n.spacing(3),paddingLeft:n.spacing(2),paddingRight:n.spacing(2),[n.breakpoints.up("sm")]:{paddingLeft:n.spacing(3),paddingRight:n.spacing(3)}},stretch:{display:"flex",flexDirection:"column",flexGrow:1},noPadding:{padding:0}}),{name:"BackstageContent"});function to(n){const{className:a,stretch:l,noPadding:d,children:p,...v}=n,{contentRef:P}=za(),Z=Os();return t.createElement("article",{ref:P,tabIndex:-1,...v,className:E()(Z.root,a,{[Z.stretch]:l,[Z.noPadding]:d})},p)}var xs=e(6487),Ds=e(99152);const Fs=(0,f.Z)(n=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:n.palette.background.paper,paddingLeft:n.spacing(3),minWidth:0},defaultTab:{padding:n.spacing(3,3),...n.typography.caption,textTransform:"uppercase",fontWeight:"bold",color:n.palette.text.secondary},selected:{color:n.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:n.palette.background.default,color:n.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function no(n){const{tabs:a,onChange:l,selectedIndex:d}=n,[p,v]=(0,t.useState)(d!=null?d:0),P=Fs(),Z=(0,t.useCallback)((G,H)=>{d===void 0&&v(H),l&&d!==H&&l(H)},[d,l]);return(0,t.useEffect)(()=>{d!==void 0&&v(d)},[d]),t.createElement("div",{className:P.tabsWrapper},t.createElement(Ds.Z,{selectionFollowsFocus:!0,indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"scrollable auto tabs example",onChange:Z,value:p},a.map((G,H)=>t.createElement(xs.Z,{...G.tabProps,"data-testid":`header-tab-${H}`,label:G.label,key:G.id,value:H,className:P.defaultTab,classes:{selected:P.selected,root:P.tabRoot}}))))}function Bs(n){var Z,G,H;const a=(0,Nn.UO)(),d=n.map(({path:le,children:ee})=>({caseSensitive:!1,path:`${le}/*`,element:ee})).sort((le,ee)=>ee.path.replace(/\/\*$/,"").localeCompare(le.path.replace(/\/\*$/,""))),p=(Z=(0,Nn.V$)(d))!=null?Z:n[0].children,[v]=(G=(0,Nn.fp)(d,`/${a["*"]}`))!=null?G:[],P=v?n.findIndex(le=>`${le.path}/*`===v.route.path):0;return{index:P===-1?0:P,element:p,route:(H=n[P])!=null?H:n[0]}}function ro(n){const{routes:a}=n,l=(0,Nn.s0)(),{index:d,route:p,element:v}=Bs(a),P=(0,t.useMemo)(()=>a.map(G=>({id:G.path,label:G.title,tabProps:G.tabProps})),[a]),Z=G=>l(a[G].path.replace(/\/\*$/,"").replace(/^\//,""));return t.createElement(t.Fragment,null,t.createElement(no,{tabs:P,selectedIndex:d,onChange:Z}),t.createElement(to,null,t.createElement(da.q,{title:p.title}),v))}const ma=()=>null;(0,c.attachComponentData)(ma,"core.gatherMountPoints",!0);function ao(n){const a=t.createElement(ma,{path:"",title:""},t.createElement("div",null)).type;return t.Children.toArray(n).flatMap(l=>{if(!(0,t.isValidElement)(l))return[];if(l.type===t.Fragment)return ao(l.props.children);if(l.type!==a)throw new Error("Child of TabbedLayout must be an TabbedLayout.Route");const{path:d,title:p,children:v,tabProps:P}=l.props;return[{path:d,title:p,children:v,tabProps:P}]})}function Ms(n){const a=ao(n.children);return t.createElement(ro,{routes:a})}Ms.Route=ma;const ws=(0,f.Z)(n=>({value:{marginBottom:"6px"},subvalue:{color:n.palette.textSubtle,fontWeight:"normal"}}),{name:"BackstageSubvalueCell"});function $s(n){const{value:a,subvalue:l}=n,d=ws();return t.createElement(t.Fragment,null,t.createElement("div",{className:d.value},a),t.createElement("div",{className:d.subvalue},l))}var Us=e(21070),Ns=e(90324),Zs=e(98281),zs=e(48049),oo=e(51209),so=e(33375),Ws=e(44233),Hs=e(27604),ha=e(36444),js=e(37971),Vs=e(59709),Gs=e(17373),Ks=e(3702),ks=e(93111),ta=e(67222);const Ys=(0,f.Z)(n=>({root:{height:"100%",width:"315px",display:"flex",flexDirection:"column",marginRight:n.spacing(3)},value:{fontWeight:"bold",fontSize:18},header:{display:"flex",alignItems:"center",height:"60px",justifyContent:"space-between",borderBottom:`1px solid ${n.palette.grey[500]}`},filters:{display:"flex",flexDirection:"column","& > *":{marginTop:n.spacing(2)}}}),{name:"BackstageTableFilters"}),Js=n=>{var G;const a=Ys(),{onChangeFilters:l}=n,[d,p]=(0,t.useState)({...n.selectedFilters}),[v,P]=(0,t.useState)(!1),Z=()=>{p({}),P(H=>!H)};return(0,t.useEffect)(()=>{l(d)},[d,l]),t.createElement("div",{className:a.root},t.createElement("div",{className:a.header},t.createElement("div",{className:a.value},"Filters"),t.createElement(y.Z,{color:"primary",onClick:Z},"Clear all")),t.createElement("div",{className:a.filters},((G=n.filters)==null?void 0:G.length)&&n.filters.map(H=>t.createElement(rt,{triggerReset:v,key:H.element.label,...H.element,selected:d[H.element.label],onChange:le=>p({...d,[H.element.label]:le})}))))},Qs={Add:(0,t.forwardRef)((n,a)=>t.createElement(Us.Z,{...n,ref:a})),Check:(0,t.forwardRef)((n,a)=>t.createElement(Zs.Z,{...n,ref:a})),Clear:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Delete:(0,t.forwardRef)((n,a)=>t.createElement(Ws.Z,{...n,ref:a})),DetailPanel:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),Edit:(0,t.forwardRef)((n,a)=>t.createElement(Hs.Z,{...n,ref:a})),Export:(0,t.forwardRef)((n,a)=>t.createElement(Ks.Z,{...n,ref:a})),Filter:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),FirstPage:(0,t.forwardRef)((n,a)=>t.createElement(js.Z,{...n,ref:a})),LastPage:(0,t.forwardRef)((n,a)=>t.createElement(Vs.Z,{...n,ref:a})),NextPage:(0,t.forwardRef)((n,a)=>t.createElement(oo.Z,{...n,ref:a})),PreviousPage:(0,t.forwardRef)((n,a)=>t.createElement(zs.Z,{...n,ref:a})),ResetSearch:(0,t.forwardRef)((n,a)=>t.createElement(so.Z,{...n,ref:a})),Search:(0,t.forwardRef)((n,a)=>t.createElement(ha.Z,{...n,ref:a})),SortArrow:(0,t.forwardRef)((n,a)=>t.createElement(Ns.Z,{...n,ref:a})),ThirdStateCheck:(0,t.forwardRef)((n,a)=>t.createElement(Gs.Z,{...n,ref:a})),ViewColumn:(0,t.forwardRef)((n,a)=>t.createElement(ks.Z,{...n,ref:a}))};function io(n,a){const l=a.split(".");let d=n[l[0]];for(let p=1;p<l.length;++p){if(d===void 0)return d;const v=l[p];d=d[v]}return d}const Xs=(0,hn.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"})(ta.W$),lo=(0,hn.Z)(n=>({root:{padding:n.spacing(3,0,2.5,2.5)},title:{"& > h6":{fontWeight:"bold"}},searchField:{paddingRight:n.spacing(2)}}),{name:"BackstageTableToolbar"})(ta.UW),_s=(0,f.Z)(()=>({root:{display:"flex",alignItems:"center",justifyContent:"space-between"},title:{fontWeight:"bold",fontSize:18,whiteSpace:"nowrap"}}),{name:"BackstageTableFiltersContainer"}),ei=(0,f.Z)(()=>({root:{display:"flex",alignItems:"start"}}),{name:"BackstageTable"});function ti(n,a){return n.map(l=>{const d={};let p=l.cellStyle||{};if(l.highlight)if(d.color=a.palette.textContrast,typeof p=="object")p.fontWeight=a.typography.fontWeightBold;else{const v=p;p=(P,Z,G)=>({...v(P,Z,G),fontWeight:a.typography.fontWeightBold})}return{...l,headerStyle:d,cellStyle:p}})}function ni(n,a){return(0,L.transform)(n,(l,d,p)=>{(0,L.isEqual)(d,a[p])||(l[p]=d)})}const co={search:"",filtersOpen:!1,filters:{}};function ri(n){const{toolbarRef:a,setSearch:l,hasFilters:d,selectedFiltersLength:p,toggleFilters:v}=n,P=_s(),Z=(0,t.useCallback)(G=>{n.onSearchChanged(G),l(G)},[n,l]);return d?t.createElement("div",{className:P.root},t.createElement("div",{className:P.root},t.createElement(De.Z,{onClick:v,"aria-label":"filter list"},t.createElement(ha.Z,null)),t.createElement(Xe.Z,{className:P.title},"Filters (",p,")")),t.createElement(lo,{...n,ref:a,onSearchChanged:Z})):t.createElement(lo,{...n,ref:a,onSearchChanged:Z})}function ai(n){const{data:a,columns:l,options:d,title:p,subtitle:v,filters:P,initialState:Z,emptyContent:G,onStateChange:H,components:le,...ee}=n,ve=ei(),Te=(0,Se.Z)(),Me={...co,...Z},[ct,Mt]=(0,t.useState)(Me.filtersOpen),kt=(0,t.useCallback)(()=>Mt(cn=>!cn),[Mt]),[_t,jt]=(0,t.useState)(0),[Ct,rn]=(0,t.useState)(a),[Ut,nr]=(0,t.useState)(Me.filters),Gn=ti(l,Te),[Qn,wt]=(0,t.useState)(Me.search);(0,t.useEffect)(()=>{if(H){const cn=ni({search:Qn,filtersOpen:ct,filters:Ut},co);H(cn)}},[Qn,ct,Ut,H]);const Sr={headerStyle:{textTransform:"uppercase"}},Gr=(0,t.useCallback)(cn=>{var bn;return(bn=l.find(lr=>lr.title===cn))==null?void 0:bn.field},[l]);(0,t.useEffect)(()=>{if(typeof a=="function")return;if(!Ut){rn(a);return}const cn=Object.values(Ut);if(a&&cn.flat().length){const bn=a.filter(lr=>!!Object.entries(Ut).filter(([,rr])=>!!rr.length).every(([rr,on])=>{const Pn=io(lr,Gr(rr));return Array.isArray(Pn)&&Array.isArray(on)?Pn.some(Tr=>on.includes(Tr)):Array.isArray(Pn)?Pn.includes(on):Array.isArray(on)?on.includes(Pn):Pn===on}));rn(bn)}else rn(a);jt(cn.flat().length)},[a,Ut,Gr]);const Cr=(cn,bn)=>{const lr=on=>{const Pn=new Set,Tr=ar=>{ar!=null&&Pn.add(ar)};return bn&&bn.forEach(ar=>{const br=io(ar,Gr(on));Array.isArray(br)?br.forEach(Tr):Tr(br)}),Pn},rr=on=>({placeholder:"All results",label:on.column,multiple:on.type==="multiple-select",items:[...lr(on.column)].sort().map(Pn=>({label:Pn,value:Pn}))});return cn.map(on=>({type:on.type,element:rr(on)}))},ra=!!(P!=null&&P.length),va=(0,t.useCallback)(cn=>t.createElement(ri,{setSearch:wt,hasFilters:ra,selectedFiltersLength:_t,toggleFilters:kt,...cn}),[kt,ra,_t,wt]),aa=typeof a!="function"&&a.length===0,oa=l.length,Aa=(0,t.useCallback)(cn=>G&&aa?t.createElement("tbody",null,t.createElement("tr",null,t.createElement("td",{colSpan:oa},G))):t.createElement(ta.os,{...cn}),[aa,G,oa]);return t.createElement("div",{className:ve.root},ct&&a&&typeof a!="function"&&(P==null?void 0:P.length)&&t.createElement(Js,{filters:Cr(P,a),selectedFilters:Ut,onChangeFilters:nr}),t.createElement(ta.ZP,{components:{Header:Xs,Toolbar:va,Body:Aa,...le},options:{...Sr,...d},columns:Gn,icons:Qs,title:t.createElement(t.Fragment,null,t.createElement(Xe.Z,{variant:"h5",component:"h2"},p),v&&t.createElement(Xe.Z,{color:"textSecondary",variant:"body1"},v)),data:typeof a=="function"?a:Ct,style:{width:"100%"},localization:{toolbar:{searchPlaceholder:"Filter"}},...ee}))}const Ml=n=>{const{children:a,value:l,index:d,...p}=n;return React.createElement("div",{role:"tabpanel",hidden:l!==d,"aria-labelledby":`scrollable-auto-tab-${d}`,...p},l===d&&React.createElement(Box,{p:3},a))},oi=(0,f.Z)(()=>({root:{color:"#6E6E6E",overflow:"visible",fontSize:"1.5rem",textAlign:"center",borderRadius:"50%",backgroundColor:"#E6E6E6",marginLeft:n=>n.isNext?"auto":"0",marginRight:n=>n.isNext?"0":"10px","&:hover":{backgroundColor:"#E6E6E6",opacity:"1"}}}),{name:"BackstageTabIcon"}),wl=n=>{const a=oi(n),{ariaLabel:l,onClick:d}=n;return React.createElement(IconButton,{onClick:d,className:a.root,size:"small",disableRipple:!0,disableFocusRipple:!0,"aria-label":l},n.children)},si=(n,a)=>a?n?"20px":"0":"40px",ii=(0,f.Z)(n=>({root:{textTransform:"none",height:"64px",fontWeight:n.typography.fontWeightBold,fontSize:n.typography.pxToRem(13),color:n.palette.textSubtle,marginLeft:a=>si(a.isFirstNav,a.isFirstIndex),width:"130px",minWidth:"130px","&:hover":{outline:"none",backgroundColor:"transparent",color:n.palette.textSubtle}}}),{name:"BackstageTab"}),$l=n=>{const a=ii(n),{isFirstNav:l,isFirstIndex:d,...p}=n;return React.createElement(Tab,{classes:a,disableRipple:!0,...p})},li=(0,f.Z)(n=>({indicator:{display:"flex",justifyContent:"center",backgroundColor:n.palette.tabbar.indicator,height:"4px"},flexContainer:{alignItems:"center"},root:{"&:last-child":{marginLeft:"auto"}}}),{name:"BackstageTabBar"}),Ul=n=>{const a=li(n);return React.createElement(Tabs,{classes:a,...n,TabIndicatorProps:{children:React.createElement("span",null)}})},ci=(0,f.Z)(n=>({root:{flexGrow:1,width:"100%"},styledTabs:{backgroundColor:n.palette.background.paper},appbar:{boxShadow:"none",backgroundColor:n.palette.background.paper,paddingLeft:"10px",paddingRight:"10px"}}),{name:"BackstageTabs"});function Nl(n){const{tabs:a}=n,l=ci(),[d,p]=useState([0,0]),[v,P]=useState(0),[Z,G]=useState(0),[H,le]=useState([[]]),ee=useRef(),{width:ve}=useWindowSize(),Te=(_t,jt)=>{p([v,jt])},Me=()=>{P(v-1)},ct=()=>{P(v+1)},Mt=()=>v+1<H.length;useEffect(()=>{const jt=v===0?1:2,Ct=ee.current.offsetWidth-20-jt*30,rn=d[0]*Z+d[1],Ut=Math.floor(Ct/170);G(Ut),le(chunkArray(a,Ut)),p([Math.floor(rn/Ut),rn%Ut])},[ve,a]);const kt=v===d[0]?d[1]:!1;return React.createElement("div",{className:l.root},React.createElement(AppBar,{ref:ee,className:l.appbar,position:"static"},React.createElement("div",null,React.createElement(StyledTabs,{value:kt,onChange:Te,selectionFollowsFocus:!0},v!==0&&React.createElement(StyledIcon,{onClick:Me,ariaLabel:"navigate-before"},React.createElement(NavigateBeforeIcon,null)),H[v].map((_t,jt)=>React.createElement(StyledTab,{value:jt,isFirstIndex:jt===0,isFirstNav:v===0,key:jt,icon:_t.icon||void 0,label:_t.label||void 0})),Mt()&&React.createElement(StyledIcon,{isNext:!0,onClick:ct,ariaLabel:"navigate-next"},React.createElement(NavigateNextIcon,null))))),kt!==!1?H[v].map((_t,jt)=>React.createElement(TabPanel,{key:jt,value:jt,index:kt},_t.content)):React.createElement(TabPanel,{key:"panel_outside_chunked_array",value:d[1],index:d[1]},H[d[0]][d[1]].content))}var Zl=e(44311);function ui(n,a){const l=n[n.length-1];if(!!l)return l>=.9?a.palette.status.ok:l>=.5?a.palette.status.warning:a.palette.status.error}function zl(n){var l;const a=useTheme();return n.data?React.createElement(Sparklines,{width:120,height:30,min:0,max:1,...n},n.title&&React.createElement("title",null,n.title),React.createElement(SparklinesLine,{color:(l=n.color)!=null?l:ui(n.data,a)})):null}const di=n=>(0,f.Z)(a=>({container:{width:"100%",display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-end",alignItems:"center",marginBottom:a.spacing(2),textAlign:n.textAlign},leftItemsBox:{flex:"1 1 auto",minWidth:0,overflow:"visible"},rightItemsBox:{flex:"0 1 auto",display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginLeft:a.spacing(1),minWidth:0,overflow:"visible"},description:{},title:{display:"inline-flex",marginBottom:0}}),{name:"BackstageContentHeader"}),fi=({title:n="Unknown page",className:a})=>t.createElement(Xe.Z,{variant:"h4",component:"h2",className:a,"data-testid":"header-title"},n);function mi(n){const{description:a,title:l,titleComponent:d=void 0,children:p,textAlign:v="left"}=n,P=di({textAlign:v})(),Z=d||t.createElement(fi,{title:l,className:P.title});return t.createElement(t.Fragment,null,t.createElement(da.q,{title:l}),t.createElement("div",{className:P.container},t.createElement("div",{className:P.leftItemsBox},Z,a&&t.createElement(Xe.Z,{className:P.description,variant:"body2"},a)),t.createElement("div",{className:P.rightItemsBox},p)))}var hi=e.p+"static/mic-drop.fe3ef4d0..svg";const gi=(0,f.Z)(n=>({micDrop:{maxWidth:"60%",position:"absolute",bottom:n.spacing(2),right:n.spacing(2),[n.breakpoints.down("xs")]:{maxWidth:"96%",position:"relative",bottom:"unset",right:"unset",margin:`${n.spacing(10)}px auto ${n.spacing(4)}px`}}}),{name:"BackstageErrorPageMicDrop"}),pi=()=>{const n=gi();return t.createElement("img",{src:hi,className:n.micDrop,alt:"Girl dropping mic from her hands"})},yi=(0,f.Z)(n=>({container:{padding:n.spacing(8),[n.breakpoints.down("xs")]:{padding:n.spacing(2)}},title:{paddingBottom:n.spacing(5),[n.breakpoints.down("xs")]:{paddingBottom:n.spacing(4),fontSize:32}},subtitle:{color:n.palette.textSubtle}}),{name:"BackstageErrorPage"});function Ei(n){const{status:a,statusMessage:l,additionalInfo:d,supportUrl:p}=n,v=yi(),P=(0,Nn.s0)(),Z=xa();return t.createElement(Nt.Z,{container:!0,spacing:0,className:v.container},t.createElement(pi,null),t.createElement(Nt.Z,{item:!0,xs:12,sm:8,md:4},t.createElement(Xe.Z,{"data-testid":"error",variant:"body1",className:v.subtitle},"ERROR ",a,": ",l),t.createElement(Xe.Z,{variant:"body1",className:v.subtitle},d),t.createElement(Xe.Z,{variant:"h2",className:v.title},"Looks like someone dropped the mic!"),t.createElement(Xe.Z,{variant:"h6"},t.createElement(K,{to:"#","data-testid":"go-back-link",onClick:()=>P(-1)},"Go back"),"... or please"," ",t.createElement(K,{to:p||Z.url},"contact support")," if you think this is a bug.")))}var vi=e(16173);const Ai=(0,hn.Z)({root:{textDecoration:"underline",cursor:"pointer"}},{name:"BackstageBreadcrumbsClickableText"})(Xe.Z),ga=(0,hn.Z)({root:{textDecoration:"underline",color:"inherit"}},{name:"BackstageBreadcrumbsStyledBox"})(On.Z);function Ri(n){const{children:a,...l}=n,[d,p]=t.useState(null),v=t.Children.toArray(a),[P,Z,...G]=v,H=G.length?G.pop():v[v.length-1],le=v.length>3,ee=Me=>{p(Me.currentTarget)},ve=()=>{p(null)},Te=Boolean(d);return t.createElement(t.Fragment,null,t.createElement(vi.Z,{"aria-label":"breadcrumb",...l},v.length>1&&t.createElement(ga,{clone:!0},P),v.length>2&&t.createElement(ga,{clone:!0},Z),le&&t.createElement(Ai,{onClick:ee},"..."),t.createElement(On.Z,{style:{fontStyle:"italic"}},H)),t.createElement(Pa.ZP,{open:Te,anchorEl:d,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},t.createElement(U.Z,null,G.map((Me,ct)=>t.createElement(oe.Z,{key:ct,button:!0},t.createElement(ga,{clone:!0},Me))))))}const Si=(0,f.Z)(n=>({header:{gridArea:"pageHeader",padding:n.spacing(3),width:"100%",boxShadow:n.shadows[4],position:"relative",zIndex:100,display:"flex",flexDirection:"row",alignItems:"center",backgroundImage:n.page.backgroundImage,backgroundPosition:"center",backgroundSize:"cover",[n.breakpoints.down("sm")]:{flexWrap:"wrap"}},leftItemsBox:{maxWidth:"100%",flexGrow:1},rightItemsBox:{width:"auto",alignItems:"center"},title:{color:n.page.fontColor,wordBreak:"break-word",fontSize:n.typography.h3.fontSize,marginBottom:0},subtitle:{color:n.page.fontColor,opacity:.8,display:"inline-block",marginTop:n.spacing(1),maxWidth:"75ch"},type:{textTransform:"uppercase",fontSize:11,opacity:.8,marginBottom:n.spacing(1),color:n.page.fontColor},breadcrumb:{color:n.page.fontColor},breadcrumbType:{fontSize:"inherit",opacity:.7,marginRight:-n.spacing(.3),marginBottom:n.spacing(.3)},breadcrumbTitle:{fontSize:"inherit",marginLeft:-n.spacing(.3),marginBottom:n.spacing(.3)}}),{name:"BackstageHeader"}),Ci=({type:n,typeLink:a,classes:l,pageTitle:d})=>n?a?t.createElement(Ri,{className:l.breadcrumb},t.createElement(K,{to:a},n),t.createElement(Xe.Z,null,d)):t.createElement(Xe.Z,{className:l.type},n):null,Ti=({pageTitle:n,classes:a,tooltip:l})=>{const d=t.createElement(Xe.Z,{className:a.title,variant:"h1"},n);return l?t.createElement(Fe.ZP,{title:l,placement:"top-start"},d):d},bi=({classes:n,subtitle:a})=>a?typeof a!="string"?t.createElement(t.Fragment,null,a):t.createElement(Xe.Z,{className:n.subtitle,variant:"subtitle2",component:"span"},a):null;function uo(n){const{children:a,pageTitleOverride:l,style:d,subtitle:p,title:v,tooltip:P,type:Z,typeLink:G}=n,H=Si(),ee=(0,c.useApi)(c.configApiRef).getOptionalString("app.title")||"Backstage",ve=l||v,Te=v||l,Me=`${ve} | %s | ${ee}`,ct=`${ve} | ${ee}`;return t.createElement(t.Fragment,null,t.createElement(da.q,{titleTemplate:Me,defaultTitle:ct}),t.createElement("header",{style:d,className:H.header},t.createElement(On.Z,{className:H.leftItemsBox},t.createElement(Ci,{classes:H,type:Z,typeLink:G,pageTitle:Te}),t.createElement(Ti,{classes:H,pageTitle:Te,tooltip:P}),t.createElement(bi,{classes:H,subtitle:p})),t.createElement(Nt.Z,{container:!0,className:H.rightItemsBox,spacing:4},a)))}const Pi=(0,f.Z)(n=>({root:{textAlign:"left"},label:{color:n.palette.common.white,fontWeight:"bold",letterSpacing:0,fontSize:n.typography.fontSize,marginBottom:n.spacing(1)/2,lineHeight:1},value:{color:"rgba(255, 255, 255, 0.8)",fontSize:n.typography.fontSize,lineHeight:1}}),{name:"BackstageHeaderLabel"}),Ii=({value:n,className:a})=>t.createElement(Xe.Z,{className:a},n);function Li(n){const{label:a,value:l,url:d}=n,p=Pi(),v=t.createElement(Ii,{className:p.value,value:l||"<Unknown>"});return t.createElement(Nt.Z,{item:!0},t.createElement("span",{className:p.root},t.createElement(Xe.Z,{className:p.label},a),d?t.createElement(K,{to:d},v):v))}const Oi={hour:"2-digit",minute:"2-digit"};function fo(n){const a=new Date,l=window.navigator.language,d=[];if(!n.has("homepage.clocks"))return d;const p=n.getConfigArray("homepage.clocks");for(const v of p)if(v.has("label")&&v.has("timezone")){let P=v.getString("label");const Z={timeZone:v.getString("timezone"),...Oi};try{new Date().toLocaleString(l,Z)}catch{console.warn(`The timezone ${Z.timeZone} is invalid. Defaulting to GMT`),Z.timeZone="GMT",P="GMT"}const G=a.toLocaleTimeString(l,Z);d.push({time:G,label:P})}return d}function Wl(n){const a=useApi(configApiRef),l=[],[d,p]=React.useState(l);return React.useEffect(()=>{p(fo(a));const v=setInterval(()=>{p(fo(a))},1e3);return()=>{clearInterval(v)}},[a]),d.length!==0?React.createElement(React.Fragment,null,d.map(v=>React.createElement(HeaderLabel,{label:v.label,value:v.time,key:v.label}))):null}const xi=n=>(0,o.Z)({root:{color:n.palette.common.white,padding:n.spacing(2,2,3),backgroundImage:n.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),Di=(0,f.Z)(xi,{name:"BackstageItemCardHeader"});function Fi(n){const{title:a,subtitle:l,children:d}=n,p=Di(n);return t.createElement("div",{className:p.root},l&&t.createElement(Xe.Z,{variant:"subtitle2",component:"h3"},l),a&&t.createElement(Xe.Z,{variant:"h6",component:"h4"},a),d)}function Hl(n){const{description:a,tags:l,title:d,type:p,subtitle:v,label:P,onClick:Z,href:G}=n;return React.createElement(Card,null,React.createElement(CardMedia,null,React.createElement(ItemCardHeader,{title:d,subtitle:v||p})),React.createElement(CardContent,null,l!=null&&l.length?React.createElement(Box,null,l.map((H,le)=>React.createElement(Chip,{size:"small",label:H,key:le}))):null,a),React.createElement(CardActions,null,!G&&React.createElement(Button,{to:"#",onClick:Z,color:"primary"},P),G&&React.createElement(Button,{to:G,color:"primary"},P)))}const Bi=n=>(0,o.Z)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:n.spacing(2)}}),Mi=(0,f.Z)(Bi,{name:"BackstageItemCardGrid"});function wi(n){const{children:a,...l}=n,d=Mi(l);return t.createElement("div",{className:d.root,...l},a)}var $i=e(41547);const Ui=(0,f.Z)(()=>({root:({isMobile:n})=>({display:"grid",gridTemplateAreas:"'pageHeader pageHeader pageHeader' 'pageSubheader pageSubheader pageSubheader' 'pageNav pageContent pageSidebar'",gridTemplateRows:"max-content auto 1fr",gridTemplateColumns:"auto 1fr auto",height:n?"100%":"100vh",overflowY:"auto"})}),{name:"BackstagePage"});function mo(n){const{themeId:a,children:l}=n,{isMobile:d}=jr(),p=Ui({isMobile:d});return t.createElement($i.Z,{theme:v=>({...v,page:v.getPageTheme({themeId:a})})},t.createElement("main",{className:p.root},l))}function Ni(n){const{themeId:a,children:l,...d}=n;return t.createElement(mo,{themeId:a},t.createElement(uo,{...d}),l)}var Tn=e(30195);const jl=Tn.z.object({providerInfo:Tn.z.object({}).catchall(Tn.z.unknown()).optional(),profile:Tn.z.object({email:Tn.z.string().optional(),displayName:Tn.z.string().optional(),picture:Tn.z.string().optional()}),backstageIdentity:Tn.z.object({token:Tn.z.string(),identity:Tn.z.object({type:Tn.z.literal("user"),userEntityRef:Tn.z.string(),ownershipEntityRefs:Tn.z.array(Tn.z.string())})})}),ho={defaultTokenExpiryMillis:5*60*1e3,tokenExpiryMarginMillis:5*60*1e3};function Zi(n){const a=new Date(Date.now()+ho.defaultTokenExpiryMillis);if(!n)return a;const[l,d,p]=n.split("."),v=JSON.parse(atob(d));return typeof v.exp!="number"?a:new Date(v.exp*1e3-ho.tokenExpiryMarginMillis)}class Vl{constructor(a){X(this,"options");X(this,"abortController");X(this,"state");this.options=a,this.abortController=new AbortController,this.state={type:"empty"}}async start(){await this.getSessionAsync()}getUserId(){const{backstageIdentity:a}=this.getSessionSync(),l=a.identity.userEntityRef,d=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(l);if(!d)throw new TypeError(`Invalid user entity reference "${l}"`);return d[3]}async getIdToken(){return(await this.getSessionAsync()).backstageIdentity.token}getProfile(){return this.getSessionSync().profile}async getProfileInfo(){return(await this.getSessionAsync()).profile}async getBackstageIdentity(){return(await this.getSessionAsync()).backstageIdentity.identity}async getCredentials(){return{token:(await this.getSessionAsync()).backstageIdentity.token}}async signOut(){this.abortController.abort()}getSessionSync(){if(this.state.type==="active")return this.state.session;if(this.state.type==="fetching"&&this.state.previous)return this.state.previous;throw new Error("No session available. Try reloading your browser page.")}async getSessionAsync(){if(this.state.type==="fetching")return this.state.promise;if(this.state.type==="active"&&new Date<this.state.expiresAt)return this.state.session;const a=this.state.type==="active"?this.state.session:void 0,l=this.fetchSession().then(d=>(this.state={type:"active",session:d,expiresAt:Zi(d.backstageIdentity.token)},d),d=>{throw this.state={type:"failed",error:d},d});return this.state={type:"fetching",promise:l,previous:a},l}async fetchSession(){const a=await this.options.discoveryApi.getBaseUrl("auth"),l=await fetch(`${a}/${this.options.provider}/refresh`,{signal:this.abortController.signal,headers:{"x-requested-with":"XMLHttpRequest"},credentials:"include"});if(!l.ok)throw await ResponseError.fromResponse(l);return proxiedSessionSchema.parse(await l.json())}}const Gl=n=>{const a=useApi(discoveryApiRef),[{status:l,error:d},{execute:p}]=useAsync(async()=>{const v=new ProxiedSignInIdentity({provider:n.provider,discoveryApi:a});await v.start(),n.onSignInSuccess(v)});return useMountEffect(p),l==="loading"?React.createElement(Progress,null):d?React.createElement(ErrorPanel,{title:"You do not appear to be signed in. Please try reloading the browser page.",error:d}):null},zi=(0,f.Z)({container:{padding:0,listStyle:"none"},item:{display:"flex",flexDirection:"column",width:"100%",maxWidth:"400px",margin:0,padding:0}},{name:"BackstageSignInPage"}),pa=({children:n})=>{const a=zi();return t.createElement(Nt.Z,{component:"li",item:!0,classes:a},n)};class ya{getUserId(){return"guest"}async getIdToken(){}getProfile(){return{email:"guest@example.com",displayName:"Guest"}}async getProfileInfo(){return{email:"guest@example.com",displayName:"Guest"}}async getBackstageIdentity(){const a="user:default/guest";return{type:"user",userEntityRef:a,ownershipEntityRefs:[a]}}async getCredentials(){return{}}async signOut(){}}function Wi(n){const[a,l,d]=n.split(".");return JSON.parse(atob(l))}class Ea{constructor(a){this.result=a}getUserId(){return this.result.userId}static fromResult(a){return new Ea(a)}async getIdToken(){var a,l;return(l=(a=this.result).getIdToken)==null?void 0:l.call(a)}getProfile(){return this.result.profile}async getProfileInfo(){return this.result.profile}async getBackstageIdentity(){const a=await this.getIdToken();if(!a){const p=`user:default/${this.getUserId()}`;return{type:"user",userEntityRef:p,ownershipEntityRefs:[p]}}const{sub:l,ent:d}=Wi(a);return{type:"user",userEntityRef:l,ownershipEntityRefs:d!=null?d:[]}}async getCredentials(){var l,d;return{token:await((d=(l=this.result).getIdToken)==null?void 0:d.call(l))}}async signOut(){var a,l;return(l=(a=this.result).signOut)==null?void 0:l.call(a)}}class Vr{constructor(a,l,d){X(this,"profilePromise");this.identity=a,this.authApi=l,this.profile=d}static createGuest(){return new ya}static fromLegacy(a){return Ea.fromResult(a)}static create(a){return new Vr(a.identity,a.authApi,a.profile)}getUserId(){const a=this.identity.userEntityRef,l=/^([^:/]+:)?([^:/]+\/)?([^:/]+)$/.exec(a);if(!l)throw new TypeError(`Invalid user entity reference "${a}"`);return l[3]}async getIdToken(){return(await this.authApi.getBackstageIdentity()).token}getProfile(){if(!this.profile)throw new Error("The identity API does not implement synchronous profile fetching, use getProfileInfo() instead");return this.profile}async getProfileInfo(){if(this.profilePromise)return await this.profilePromise;try{return this.profilePromise=this.authApi.getProfile(),await this.profilePromise}catch(a){throw this.profilePromise=void 0,a}}async getBackstageIdentity(){return this.identity}async getCredentials(){return{token:(await this.authApi.getBackstageIdentity()).token}}async signOut(){return this.authApi.signOut()}}const Hi={Component:({config:n,onSignInSuccess:a})=>{const{apiRef:l,title:d,message:p}=n,v=(0,c.useApi)(l),P=(0,c.useApi)(c.errorApiRef),Z=async()=>{try{const G=await v.getBackstageIdentity({instantPopup:!0});if(!G)throw new Error(`The ${d} provider is not configured to support sign-in`);const H=await v.getProfile();a(Vr.create({identity:G.identity,profile:H,authApi:v}))}catch(G){P.post(new _n.SP("Login failed",G))}};return t.createElement(pa,null,t.createElement(tr,{variant:"fullHeight",title:d,actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:Z},"Sign In")},t.createElement(Xe.Z,{variant:"body1"},p)))},loader:async(n,a)=>{const l=n.get(a),d=await l.getBackstageIdentity({optional:!0});if(!d)return;const p=await l.getProfile();return Vr.create({identity:d.identity,profile:p,authApi:l})}},ji={Component:({onSignInSuccess:n})=>t.createElement(pa,null,t.createElement(tr,{title:"Guest",variant:"fullHeight",actions:t.createElement(y.Z,{color:"primary",variant:"outlined",onClick:()=>n(new ya)},"Enter")},t.createElement(Xe.Z,{variant:"body1"},"Enter as a Guest User.",t.createElement("br",null),"You will not have a verified identity,",t.createElement("br",null),"meaning some features might be unavailable."))),loader:async()=>new ya};var Vi=e(63955),go=e(86619),po=e(74828),Gi=e(45455),Ki=e.n(Gi);const ki=/^[a-z0-9_\-]+\.[a-z0-9_\-]+\.[a-z0-9_\-]+$/i,Yi=(0,f.Z)(n=>({form:{display:"flex",flexFlow:"column nowrap"},button:{alignSelf:"center",marginTop:n.spacing(2)}}),{name:"BackstageCustomProvider"}),yo=n=>{const{ref:a,...l}=n;return{inputRef:a,...l}},Ji={Component:({onSignInSuccess:n})=>{const a=Yi(),{register:l,handleSubmit:d,formState:p}=(0,Vi.cI)({mode:"onChange"}),{errors:v}=p,P=({userId:Z})=>{n(Vr.fromLegacy({userId:Z,profile:{email:`${Z}@example.com`}}))};return t.createElement(pa,null,t.createElement(tr,{title:"Custom User",variant:"fullHeight"},t.createElement(Xe.Z,{variant:"body1"},"Enter your own User ID and credentials.",t.createElement("br",null),"This selection will not be stored."),t.createElement("form",{className:a.form,onSubmit:d(P)},t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("userId",{required:!0})),label:"User ID",margin:"normal",error:Boolean(v.userId)}),v.userId&&t.createElement(po.Z,{error:!0},v.userId.message)),t.createElement(A.Z,null,t.createElement(go.Z,{...yo(l("idToken",{required:!1,validate:Z=>!Z||ki.test(Z)||"Token is not a valid OpenID Connect JWT Token"})),label:"ID Token (optional)",margin:"normal",autoComplete:"off",error:Boolean(v.idToken)}),v.idToken&&t.createElement(po.Z,{error:!0},v.idToken.message)),t.createElement(y.Z,{type:"submit",color:"primary",variant:"outlined",className:a.button,disabled:!(p!=null&&p.isDirty)||!Ki()(v)},"Continue"))))},loader:async()=>{}},na="@backstage/core:SignInPage:provider",Eo={guest:ji,custom:Ji,common:Hi};function vo(n,a){if(n in a)throw new Error(`"${n}" ID is duplicated. IDs of identity providers have to be unique.`)}function ql(n){return n.reduce((l,d)=>{if(typeof d=="string")return vo(d,l),l[d]={components:Eo[d],id:d},l;const{id:p}=d;return vo(p,l),l[p]={components:Eo.common,id:p,config:d},l},{})}const _l=(n,a)=>{const l=useApi(errorApiRef),d=useApiHolder(),[p,v]=useState(!0),P=useCallback(G=>{a(IdentityApiSignOutProxy.from({identityApi:G,signOut:async()=>{var H;localStorage.removeItem(na),await((H=G.signOut)==null?void 0:H.call(G))}}))},[a]);useLayoutEffect(()=>{var ee;if(!p)return;const G=localStorage.getItem(na);if(G===null){v(!1);return}const H=n[G];if(!H){v(!1);return}let le=!1;return H.components.loader(d,(ee=H.config)==null?void 0:ee.apiRef).then(ve=>{le||(ve?P(ve):v(!1))}).catch(ve=>{le||(localStorage.removeItem(na),l.post(ve),v(!1))}),()=>{le=!0}},[p,l,a,d,n,P]);const Z=useMemo(()=>Object.keys(n).map(G=>{const H=n[G],{Component:le}=H.components,ee=ve=>{localStorage.setItem(na,H.id),P(ve)};return React.createElement(le,{key:H.id,config:H.config,onSignInSuccess:ee})}),[n,P]);return[p,Z]},Qi=({onSignInSuccess:n,providers:a=[],title:l,align:d="left"})=>{const p=useApi(configApiRef),v=useStyles(),P=getSignInProviders(a),[Z,G]=useSignInProviders(P,n);return Z?React.createElement(Progress,null):React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:p.getString("app.title")}),React.createElement(Content,null,l&&React.createElement(ContentHeader,{title:l,textAlign:d}),React.createElement(Grid,{container:!0,justifyContent:d==="center"?d:"flex-start",spacing:2,component:"ul",classes:v},G)))},Xi=({provider:n,auto:a,onSignInSuccess:l})=>{const d=useStyles(),p=useApi(n.apiRef),v=useApi(configApiRef),[P,Z]=useState(),[G,H]=useState(!1),le=async({checkExisting:ee,showPopup:ve})=>{try{let Te;if(ee&&(Te=await p.getBackstageIdentity({optional:!0})),!Te&&(ve||a)&&(H(!0),Te=await p.getBackstageIdentity({instantPopup:!0}),!Te))throw new Error(`The ${n.title} provider is not configured to support sign-in`);if(!Te){H(!0);return}const Me=await p.getProfile();l(UserIdentity.create({identity:Te.identity,authApi:p,profile:Me}))}catch(Te){Z(Te),H(!0)}};return useMountEffect(()=>le({checkExisting:!0})),G?React.createElement(Page,{themeId:"home"},React.createElement(Header,{title:v.getString("app.title")}),React.createElement(Content,null,React.createElement(Grid,{container:!0,justifyContent:"center",spacing:2,component:"ul",classes:d},React.createElement(GridItem,null,React.createElement(InfoCard,{variant:"fullHeight",title:n.title,actions:React.createElement(Button,{color:"primary",variant:"outlined",onClick:()=>{le({showPopup:!0})}},"Sign In")},React.createElement(Typography,{variant:"body1"},n.message),P&&P.name!=="PopupRejectedError"&&React.createElement(Typography,{variant:"body1",color:"error"},P.message)))))):React.createElement(Progress,null)};function ec(n){return"provider"in n?React.createElement(Xi,{...n}):React.createElement(Qi,{...n})}const qi=(0,f.Z)(n=>({root:{padding:n.spacing(0,2,0,2.5),minHeight:n.spacing(3)},indicator:{backgroundColor:n.palette.info.main,height:n.spacing(.3)}}),{name:"BackstageTabbedCard"}),_i=(0,hn.Z)(n=>({root:{padding:n.spacing(2,2,2,2.5),display:"inline-block"},title:{fontWeight:700},subheader:{paddingTop:n.spacing(1)}}),{name:"BackstageTabbedCardBoldHeader"})(yr.Z);function tc(n){const{slackChannel:a,errorBoundaryProps:l,children:d,title:p,deepLink:v,value:P,onChange:Z}=n,G=qi(),[H,le]=useState(0),ee=Z||((Me,ct)=>le(ct));let ve;P?React.Children.map(d,Me=>{React.isValidElement(Me)&&(Me==null?void 0:Me.props.value)===P&&(ve=Me==null?void 0:Me.props.children)}):React.Children.map(d,(Me,ct)=>{React.isValidElement(Me)&&ct===H&&(ve=Me==null?void 0:Me.props.children)});const Te=l||(a?{slackChannel:a}:{});return React.createElement(Card,null,React.createElement(ErrorBoundary,{...Te},p&&React.createElement(_i,{title:p}),React.createElement(Tabs,{selectionFollowsFocus:!0,classes:G,value:P||H,onChange:ee},d),React.createElement(Divider,null),React.createElement(CardContent,null,ve),v&&React.createElement(BottomLink,{...v})))}const el=(0,f.Z)(n=>({root:{minWidth:n.spacing(6),minHeight:n.spacing(3),margin:n.spacing(0,2,0,0),padding:n.spacing(.5,0,.5,0),textTransform:"none","&:hover":{opacity:1,backgroundColor:"transparent",color:n.palette.text.primary}},selected:{fontWeight:"bold"}}),{name:"BackstageCardTab"});function nc(n){const{children:a,...l}=n,d=el();return React.createElement(Tab,{disableRipple:!0,classes:d,...l})}},24877:function(ne,s,e){"use strict";e.d(s,{f:function(){return R},z:function(){return y}});var r=e(76241),t=e(2784);const c=(0,r.CT)("analytics-context"),i=()=>{const h=(0,t.useContext)(c);if(h===void 0)return{routeRef:"unknown",pluginId:"root",extension:"App"};const E=h.atVersion(1);if(E===void 0)throw new Error("No context found for version 1.");return E},R=h=>{const{attributes:E,children:S}=h,L={...i(),...E},$=(0,r.EI)({1:L});return t.createElement(c.Provider,{value:$},S)};function f(h,E){const S=b=>React.createElement(R,{attributes:E},React.createElement(h,{...b}));return S.displayName=`WithAnalyticsContext(${h.displayName||h.name||"Component"})`,S}var o=e(27399);class u{constructor(E,S={routeRef:"unknown",pluginId:"root",extension:"App"}){this.analyticsApi=E,this.context=S}setContext(E){this.context=E}captureEvent(E,S,{value:b,attributes:L}={}){try{this.analyticsApi.captureEvent({action:E,subject:S,value:b,attributes:L,context:this.context})}catch($){console.warn("Error during analytics event capture. %o",$)}}}function m(){try{return(0,o.useApi)(o.analyticsApiRef)}catch{return{captureEvent:()=>{}}}}function y(){const h=(0,t.useRef)(null),E=i(),S=m();function b(){return h.current===null&&(h.current=new u(S)),h.current}const L=b();return L.setContext(E),L}},39135:function(ne,s,e){"use strict";e.d(s,{CL:function(){return F},sM:function(){return t},$v:function(){return h},v_:function(){return E},hg:function(){return S},uB:function(){return y},bq:function(){return m},Ds:function(){return b},NW:function(){return L},VE:function(){return $},W0:function(){return D},gP:function(){return x},F4:function(){return i},ux:function(){return f},Kp:function(){return c},$4:function(){return O},p_:function(){return o},ZM:function(){return w},D:function(){return R},gW:function(){return u},E6:function(){return K}});var r=e(86833),t;(function(re){const ce="SignedIn";re.SignedIn=ce;const Se="SignedOut";re.SignedOut=Se})(t||(t={}));const c=(0,r.createApiRef)({id:"core.auth.google"}),i=(0,r.createApiRef)({id:"core.auth.github"}),R=(0,r.createApiRef)({id:"core.auth.okta"}),f=(0,r.createApiRef)({id:"core.auth.gitlab"}),o=(0,r.createApiRef)({id:"core.auth.microsoft"}),u=(0,r.createApiRef)({id:"core.auth.onelogin"}),m=(0,r.createApiRef)({id:"core.auth.bitbucket"}),y=(0,r.createApiRef)({id:"core.auth.atlassian"}),h=(0,r.createApiRef)({id:"core.alert"}),E=(0,r.createApiRef)({id:"core.analytics"}),S=(0,r.createApiRef)({id:"core.apptheme"}),b=(0,r.createApiRef)({id:"core.config"}),L=(0,r.createApiRef)({id:"core.discovery"}),$=(0,r.createApiRef)({id:"core.error"});var F;(function(re){re[re.None=0]="None";const Se=1;re[re.Active=Se]="Active"})(F||(F={}));const D=(0,r.createApiRef)({id:"core.featureflags"}),x=(0,r.createApiRef)({id:"core.fetch"}),O=(0,r.createApiRef)({id:"core.identity"}),w=(0,r.createApiRef)({id:"core.oauthrequest"}),K=(0,r.createApiRef)({id:"core.storage"})},27399:function(ne,s,e){"use strict";e.d(s,{FeatureFlagState:function(){return t.CL},SessionState:function(){return t.sM},alertApiRef:function(){return t.$v},analyticsApiRef:function(){return t.v_},appThemeApiRef:function(){return t.hg},atlassianAuthApiRef:function(){return t.uB},bitbucketAuthApiRef:function(){return t.bq},configApiRef:function(){return t.Ds},createApiFactory:function(){return r.createApiFactory},createApiRef:function(){return r.createApiRef},discoveryApiRef:function(){return t.NW},errorApiRef:function(){return t.VE},featureFlagsApiRef:function(){return t.W0},fetchApiRef:function(){return t.gP},githubAuthApiRef:function(){return t.F4},gitlabAuthApiRef:function(){return t.ux},googleAuthApiRef:function(){return t.Kp},identityApiRef:function(){return t.$4},microsoftAuthApiRef:function(){return t.p_},oauthRequestApiRef:function(){return t.ZM},oktaAuthApiRef:function(){return t.D},oneloginAuthApiRef:function(){return t.gW},storageApiRef:function(){return t.E6},useApi:function(){return r.useApi},useApiHolder:function(){return r.useApiHolder}});var r=e(86833);e.o(r,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return r.FeatureFlagState}}),e.o(r,"SessionState")&&e.d(s,{SessionState:function(){return r.SessionState}}),e.o(r,"alertApiRef")&&e.d(s,{alertApiRef:function(){return r.alertApiRef}}),e.o(r,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return r.analyticsApiRef}}),e.o(r,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return r.appThemeApiRef}}),e.o(r,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return r.atlassianAuthApiRef}}),e.o(r,"attachComponentData")&&e.d(s,{attachComponentData:function(){return r.attachComponentData}}),e.o(r,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return r.bitbucketAuthApiRef}}),e.o(r,"configApiRef")&&e.d(s,{configApiRef:function(){return r.configApiRef}}),e.o(r,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return r.createComponentExtension}}),e.o(r,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return r.createExternalRouteRef}}),e.o(r,"createPlugin")&&e.d(s,{createPlugin:function(){return r.createPlugin}}),e.o(r,"createReactExtension")&&e.d(s,{createReactExtension:function(){return r.createReactExtension}}),e.o(r,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return r.createRoutableExtension}}),e.o(r,"createRouteRef")&&e.d(s,{createRouteRef:function(){return r.createRouteRef}}),e.o(r,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return r.discoveryApiRef}}),e.o(r,"errorApiRef")&&e.d(s,{errorApiRef:function(){return r.errorApiRef}}),e.o(r,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return r.featureFlagsApiRef}}),e.o(r,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return r.fetchApiRef}}),e.o(r,"getComponentData")&&e.d(s,{getComponentData:function(){return r.getComponentData}}),e.o(r,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return r.githubAuthApiRef}}),e.o(r,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return r.gitlabAuthApiRef}}),e.o(r,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return r.googleAuthApiRef}}),e.o(r,"identityApiRef")&&e.d(s,{identityApiRef:function(){return r.identityApiRef}}),e.o(r,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return r.microsoftAuthApiRef}}),e.o(r,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return r.oauthRequestApiRef}}),e.o(r,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return r.oktaAuthApiRef}}),e.o(r,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return r.oneloginAuthApiRef}}),e.o(r,"storageApiRef")&&e.d(s,{storageApiRef:function(){return r.storageApiRef}}),e.o(r,"useApp")&&e.d(s,{useApp:function(){return r.useApp}}),e.o(r,"useElementFilter")&&e.d(s,{useElementFilter:function(){return r.useElementFilter}}),e.o(r,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return r.usePluginOptions}}),e.o(r,"useRouteRef")&&e.d(s,{useRouteRef:function(){return r.useRouteRef}}),e.o(r,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return r.useRouteRefParams}});var t=e(39135)},90515:function(ne,s,e){"use strict";e.d(s,{T:function(){return t}});class r{constructor(i){if(this.config=i,!i.id.split(".").flatMap(f=>f.split("-")).every(f=>f.match(/^[a-z][a-z0-9]*$/)))throw new Error(`API id must only contain period separated lowercase alphanum tokens with dashes, got '${i.id}'`)}get id(){return this.config.id}get T(){throw new Error(`tried to read ApiRef.T of ${this}`)}toString(){return`apiRef{${this.config.id}}`}}function t(c){return new r(c)}},25182:function(ne,s,e){"use strict";e.d(s,{n:function(){return r}});function r(t,c){return"id"in t?{api:t,deps:{},factory:()=>c}:t}},86833:function(ne,s,e){"use strict";e.d(s,{createApiFactory:function(){return R.n},createApiRef:function(){return t.T},useApi:function(){return r.h_},useApiHolder:function(){return r.I_}});var r=e(5761),t=e(90515),c=e(16362),i=e.n(c);e.o(c,"FeatureFlagState")&&e.d(s,{FeatureFlagState:function(){return c.FeatureFlagState}}),e.o(c,"SessionState")&&e.d(s,{SessionState:function(){return c.SessionState}}),e.o(c,"alertApiRef")&&e.d(s,{alertApiRef:function(){return c.alertApiRef}}),e.o(c,"analyticsApiRef")&&e.d(s,{analyticsApiRef:function(){return c.analyticsApiRef}}),e.o(c,"appThemeApiRef")&&e.d(s,{appThemeApiRef:function(){return c.appThemeApiRef}}),e.o(c,"atlassianAuthApiRef")&&e.d(s,{atlassianAuthApiRef:function(){return c.atlassianAuthApiRef}}),e.o(c,"attachComponentData")&&e.d(s,{attachComponentData:function(){return c.attachComponentData}}),e.o(c,"bitbucketAuthApiRef")&&e.d(s,{bitbucketAuthApiRef:function(){return c.bitbucketAuthApiRef}}),e.o(c,"configApiRef")&&e.d(s,{configApiRef:function(){return c.configApiRef}}),e.o(c,"createApiFactory")&&e.d(s,{createApiFactory:function(){return c.createApiFactory}}),e.o(c,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return c.createComponentExtension}}),e.o(c,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return c.createExternalRouteRef}}),e.o(c,"createPlugin")&&e.d(s,{createPlugin:function(){return c.createPlugin}}),e.o(c,"createReactExtension")&&e.d(s,{createReactExtension:function(){return c.createReactExtension}}),e.o(c,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return c.createRoutableExtension}}),e.o(c,"createRouteRef")&&e.d(s,{createRouteRef:function(){return c.createRouteRef}}),e.o(c,"discoveryApiRef")&&e.d(s,{discoveryApiRef:function(){return c.discoveryApiRef}}),e.o(c,"errorApiRef")&&e.d(s,{errorApiRef:function(){return c.errorApiRef}}),e.o(c,"featureFlagsApiRef")&&e.d(s,{featureFlagsApiRef:function(){return c.featureFlagsApiRef}}),e.o(c,"fetchApiRef")&&e.d(s,{fetchApiRef:function(){return c.fetchApiRef}}),e.o(c,"getComponentData")&&e.d(s,{getComponentData:function(){return c.getComponentData}}),e.o(c,"githubAuthApiRef")&&e.d(s,{githubAuthApiRef:function(){return c.githubAuthApiRef}}),e.o(c,"gitlabAuthApiRef")&&e.d(s,{gitlabAuthApiRef:function(){return c.gitlabAuthApiRef}}),e.o(c,"googleAuthApiRef")&&e.d(s,{googleAuthApiRef:function(){return c.googleAuthApiRef}}),e.o(c,"identityApiRef")&&e.d(s,{identityApiRef:function(){return c.identityApiRef}}),e.o(c,"microsoftAuthApiRef")&&e.d(s,{microsoftAuthApiRef:function(){return c.microsoftAuthApiRef}}),e.o(c,"oauthRequestApiRef")&&e.d(s,{oauthRequestApiRef:function(){return c.oauthRequestApiRef}}),e.o(c,"oktaAuthApiRef")&&e.d(s,{oktaAuthApiRef:function(){return c.oktaAuthApiRef}}),e.o(c,"oneloginAuthApiRef")&&e.d(s,{oneloginAuthApiRef:function(){return c.oneloginAuthApiRef}}),e.o(c,"storageApiRef")&&e.d(s,{storageApiRef:function(){return c.storageApiRef}}),e.o(c,"useApp")&&e.d(s,{useApp:function(){return c.useApp}}),e.o(c,"useElementFilter")&&e.d(s,{useElementFilter:function(){return c.useElementFilter}}),e.o(c,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return c.usePluginOptions}}),e.o(c,"useRouteRef")&&e.d(s,{useRouteRef:function(){return c.useRouteRef}}),e.o(c,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return c.useRouteRefParams}});var R=e(25182)},16362:function(){},5761:function(ne,s,e){"use strict";e.d(s,{I_:function(){return c},h_:function(){return i}});var r=e(2784),t=e(76241);function c(){const f=(0,t.Vt)("api-context");if(!f)throw new Error("API context is not available");const o=f.atVersion(1);if(!o)throw new Error("ApiContext v1 not available");return o}function i(f){const u=c().get(f);if(!u)throw new Error(`No implementation available for ${f}`);return u}function R(f){return function(u){const m=h=>{const E=c(),S={};for(const b in f)if(f.hasOwnProperty(b)){const L=f[b],$=E.get(L);if(!$)throw new Error(`No implementation available for ${L}`);S[b]=$}return React.createElement(u,{...h,...S})},y=u.displayName||u.name||"Component";return m.displayName=`withApis(${y})`,m}}},31311:function(ne,s,e){"use strict";e.d(s,{useApp:function(){return r.q}});var r=e(32483),t=e(67229),c=e.n(t);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}})},67229:function(){},32483:function(ne,s,e){"use strict";e.d(s,{q:function(){return t}});var r=e(76241);const t=()=>{const c=(0,r.Vt)("app-context");if(!c)throw new Error("App context is not available");const i=c.atVersion(1);if(!i)throw new Error("AppContext v1 not available");return i}},74181:function(ne,s,e){"use strict";e.d(s,{R5:function(){return i},CO:function(){return S},YO:function(){return b},P4:function(){return E},IY:function(){return R},vJ:function(){return D}});var r=e(76241);const t=(0,r.uW)("component-data-store",()=>new WeakMap),c="__backstage_data";function i(x,O,w){var ce;const K=x;let re=(ce=K[c])!=null?ce:t.get(x);if(re||(re={map:new Map},Object.defineProperty(K,c,{enumerable:!1,configurable:!0,writable:!1,value:re}),t.set(x,re)),re.map.has(O)){const Se=x.displayName||x.name;throw new Error(`Attempted to attach duplicate data "${O}" to component "${Se}"`)}re.map.set(O,w)}function R(x,O){var re;if(!x)return;const w=x.type;if(!w)return;const K=(re=w[c])!=null?re:t.get(w);if(!!K)return K.map.get(O)}var f=e(2784),o=e(24877),u=e(31311),m=e(82772);class y extends f.Component{constructor(){super(...arguments);X(this,"state",{error:void 0});X(this,"handleErrorReset",()=>{this.setState({error:void 0})})}static getDerivedStateFromError(w){return{error:w}}render(){const{error:w}=this.state,{app:K,plugin:re}=this.props,{ErrorBoundaryFallback:ce}=K.getComponents();return w?f.createElement(ce,{error:w,resetError:this.handleErrorReset,plugin:re}):this.props.children}}var h=e(40338);function E(x){const{component:O,mountPoint:w,name:K}=x;return b({component:{lazy:()=>O().then(re=>{const ce=De=>{try{(0,m.tg)(w)}catch(Fe){if(typeof Fe=="object"&&Fe!==null){const{message:He}=Fe;if(typeof He=="string"&&He.startsWith("No path for "))throw new Error(`Routable extension component with mount point ${w} was not discovered in the app element tree. Routable extension components may not be rendered by other components and must be directly available as an element within the App provider component.`)}throw Fe}return f.createElement(re,{...De})},Se=K||re.displayName||re.name||"LazyComponent";return ce.displayName=`RoutableExtension(${Se})`,ce},re=>Se=>{const De=(0,u.useApp)(),{BootErrorPage:Fe}=De.getComponents();return f.createElement(Fe,{step:"load-chunk",error:re})})},data:{"core.mountPoint":w},name:K})}function S(x){const{component:O,name:w}=x;return b({component:O,name:w})}function b(x){const{data:O={},name:w}=x;w||console.warn("Declaring extensions without name is DEPRECATED. Make sure that all usages of createReactExtension, createComponentExtension and createRoutableExtension provide a name.");let K;if("lazy"in x.component){const ce=x.component.lazy;K=(0,f.lazy)(()=>ce().then(Se=>({default:Se})))}else K=x.component.sync;const re=w||K.displayName||K.name||"Component";return{expose(ce){const Se=De=>{const Fe=(0,u.useApp)(),{Progress:He}=Fe.getComponents(),Ae=O==null?void 0:O["core.mountPoint"];return f.createElement(f.Suspense,{fallback:f.createElement(He,null)},f.createElement(y,{app:Fe,plugin:ce},f.createElement(o.f,{attributes:{pluginId:ce.getId(),...w&&{extension:w},...Ae&&{routeRef:Ae.id}}},f.createElement(h.o,{plugin:ce},f.createElement(K,{...De})))))};i(Se,"core.plugin",ce);for(const[De,Fe]of Object.entries(O))i(Se,De,Fe);return Se.displayName=`Extension(${re})`,Se}}}var L=e(27399);function $(x,O,w,K){return f.Children.toArray(x).flatMap(re=>{if(!(0,f.isValidElement)(re))return[];if(re.type===f.Fragment)return $(re.props.children,O,w,K);if(R(re,"core.featureFlagged")){const ce=re.props;return("with"in ce?O.isActive(ce.with):!O.isActive(ce.without))?$(re.props.children,O,w,K):[]}if(w===void 0||w(re))return[re];if(K)throw new Error(K);return $(re.props.children,O,w,K)})}class F{constructor(O,w){this.node=O,this.featureFlagsApi=w}selectByComponentData(O){const w=$(this.node,this.featureFlagsApi,K=>R(K,O.key)!==void 0,O.withStrictError);return new F(w,this.featureFlagsApi)}findComponentData(O){return $(this.node,this.featureFlagsApi,K=>R(K,O.key)!==void 0).map(K=>R(K,O.key)).filter(K=>K!==void 0)}getElements(){return $(this.node,this.featureFlagsApi)}}function D(x,O,w=[]){const K=(0,L.useApi)(L.featureFlagsApiRef),re=new F(x,K);return(0,f.useMemo)(()=>O(re),[x,...w])}},80274:function(){},36964:function(ne,s,e){"use strict";e.d(s,{AnalyticsContext:function(){return r.f},FeatureFlagState:function(){return t.FeatureFlagState},SessionState:function(){return t.SessionState},alertApiRef:function(){return t.alertApiRef},analyticsApiRef:function(){return t.analyticsApiRef},appThemeApiRef:function(){return t.appThemeApiRef},atlassianAuthApiRef:function(){return t.atlassianAuthApiRef},attachComponentData:function(){return R.R5},bitbucketAuthApiRef:function(){return t.bitbucketAuthApiRef},configApiRef:function(){return t.configApiRef},createComponentExtension:function(){return R.CO},createExternalRouteRef:function(){return m.x8},createPlugin:function(){return u.r},createReactExtension:function(){return R.YO},createRoutableExtension:function(){return R.P4},createRouteRef:function(){return m.NT},discoveryApiRef:function(){return t.discoveryApiRef},errorApiRef:function(){return t.errorApiRef},featureFlagsApiRef:function(){return t.featureFlagsApiRef},fetchApiRef:function(){return t.fetchApiRef},getComponentData:function(){return R.IY},githubAuthApiRef:function(){return t.githubAuthApiRef},gitlabAuthApiRef:function(){return t.gitlabAuthApiRef},googleAuthApiRef:function(){return t.googleAuthApiRef},identityApiRef:function(){return t.identityApiRef},microsoftAuthApiRef:function(){return t.microsoftAuthApiRef},oauthRequestApiRef:function(){return t.oauthRequestApiRef},oktaAuthApiRef:function(){return t.oktaAuthApiRef},oneloginAuthApiRef:function(){return t.oneloginAuthApiRef},storageApiRef:function(){return t.storageApiRef},useAnalytics:function(){return r.z},useApp:function(){return i.useApp},useElementFilter:function(){return R.vJ},usePluginOptions:function(){return c.y},useRouteRef:function(){return m.tg},useRouteRefParams:function(){return m.Oi}});var r=e(24877),t=e(27399);e.o(t,"attachComponentData")&&e.d(s,{attachComponentData:function(){return t.attachComponentData}}),e.o(t,"createApiFactory")&&e.d(s,{createApiFactory:function(){return t.createApiFactory}}),e.o(t,"createApiRef")&&e.d(s,{createApiRef:function(){return t.createApiRef}}),e.o(t,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return t.createComponentExtension}}),e.o(t,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return t.createExternalRouteRef}}),e.o(t,"createPlugin")&&e.d(s,{createPlugin:function(){return t.createPlugin}}),e.o(t,"createReactExtension")&&e.d(s,{createReactExtension:function(){return t.createReactExtension}}),e.o(t,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return t.createRoutableExtension}}),e.o(t,"createRouteRef")&&e.d(s,{createRouteRef:function(){return t.createRouteRef}}),e.o(t,"getComponentData")&&e.d(s,{getComponentData:function(){return t.getComponentData}}),e.o(t,"useApi")&&e.d(s,{useApi:function(){return t.useApi}}),e.o(t,"useApiHolder")&&e.d(s,{useApiHolder:function(){return t.useApiHolder}}),e.o(t,"useApp")&&e.d(s,{useApp:function(){return t.useApp}}),e.o(t,"useElementFilter")&&e.d(s,{useElementFilter:function(){return t.useElementFilter}}),e.o(t,"usePluginOptions")&&e.d(s,{usePluginOptions:function(){return t.usePluginOptions}}),e.o(t,"useRouteRef")&&e.d(s,{useRouteRef:function(){return t.useRouteRef}}),e.o(t,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return t.useRouteRefParams}});var c=e(40338),i=e(31311);e.o(i,"attachComponentData")&&e.d(s,{attachComponentData:function(){return i.attachComponentData}}),e.o(i,"createApiFactory")&&e.d(s,{createApiFactory:function(){return i.createApiFactory}}),e.o(i,"createApiRef")&&e.d(s,{createApiRef:function(){return i.createApiRef}}),e.o(i,"createComponentExtension")&&e.d(s,{createComponentExtension:function(){return i.createComponentExtension}}),e.o(i,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return i.createExternalRouteRef}}),e.o(i,"createPlugin")&&e.d(s,{createPlugin:function(){return i.createPlugin}}),e.o(i,"createReactExtension")&&e.d(s,{createReactExtension:function(){return i.createReactExtension}}),e.o(i,"createRoutableExtension")&&e.d(s,{createRoutableExtension:function(){return i.createRoutableExtension}}),e.o(i,"createRouteRef")&&e.d(s,{createRouteRef:function(){return i.createRouteRef}}),e.o(i,"getComponentData")&&e.d(s,{getComponentData:function(){return i.getComponentData}}),e.o(i,"useApi")&&e.d(s,{useApi:function(){return i.useApi}}),e.o(i,"useApiHolder")&&e.d(s,{useApiHolder:function(){return i.useApiHolder}}),e.o(i,"useElementFilter")&&e.d(s,{useElementFilter:function(){return i.useElementFilter}}),e.o(i,"useRouteRef")&&e.d(s,{useRouteRef:function(){return i.useRouteRef}}),e.o(i,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return i.useRouteRefParams}});var R=e(74181),f=e(80274),o=e.n(f);e.o(f,"createApiFactory")&&e.d(s,{createApiFactory:function(){return f.createApiFactory}}),e.o(f,"createApiRef")&&e.d(s,{createApiRef:function(){return f.createApiRef}}),e.o(f,"createExternalRouteRef")&&e.d(s,{createExternalRouteRef:function(){return f.createExternalRouteRef}}),e.o(f,"createPlugin")&&e.d(s,{createPlugin:function(){return f.createPlugin}}),e.o(f,"createRouteRef")&&e.d(s,{createRouteRef:function(){return f.createRouteRef}}),e.o(f,"useApi")&&e.d(s,{useApi:function(){return f.useApi}}),e.o(f,"useApiHolder")&&e.d(s,{useApiHolder:function(){return f.useApiHolder}}),e.o(f,"useRouteRef")&&e.d(s,{useRouteRef:function(){return f.useRouteRef}}),e.o(f,"useRouteRefParams")&&e.d(s,{useRouteRefParams:function(){return f.useRouteRefParams}});var u=e(96896),m=e(82772)},40338:function(ne,s,e){"use strict";e.d(s,{o:function(){return i},y:function(){return R}});var r=e(76241),t=e(2784);const c="plugin-context",i=({children:f,plugin:o})=>{const{Provider:u}=(0,r.CT)(c);return t.createElement(u,{value:(0,r.EI)({1:{plugin:o}})},f)};function R(){const f=(0,r.Vt)(c);if(!f)throw new Error("Plugin Options context is not available");const o=f.atVersion(1);if(!o)throw new Error("Plugin Options v1 is not available");return o.plugin.getPluginOptions()}},96896:function(ne,s,e){"use strict";e.d(s,{r:function(){return t}});class r{constructor(i){X(this,"options");this.config=i}getId(){return this.config.id}getApis(){var i;return(i=this.config.apis)!=null?i:[]}getFeatureFlags(){var i,R;return(R=(i=this.config.featureFlags)==null?void 0:i.slice())!=null?R:[]}get routes(){var i;return(i=this.config.routes)!=null?i:{}}get externalRoutes(){var i;return(i=this.config.externalRoutes)!=null?i:{}}provide(i){return i.expose(this)}__experimentalReconfigure(i){this.config.__experimentalConfigure&&(this.options=this.config.__experimentalConfigure(i))}getPluginOptions(){var i;return this.config.__experimentalConfigure&&!this.options&&(this.options=this.config.__experimentalConfigure()),(i=this.options)!=null?i:{}}toString(){return`plugin{${this.config.id}}`}}function t(c){return new r(c)}},82772:function(ne,s,e){var b,L,$;"use strict";e.d(s,{x8:function(){return m},NT:function(){return i},tg:function(){return E},Oi:function(){return S}});var r=e(76241);const t=(0,r.uW)("route-ref-type",()=>Symbol("route-ref-type"));class c{constructor(D,x){X(this,b,"absolute");this.id=D,this.params=x}get title(){return this.id}toString(){return`routeRef{type=absolute,id=${this.id}}`}}b=t;function i(F){var D;return new c(F.id,(D=F.params)!=null?D:[])}const R=/^\w+$/;class f{constructor(D,x,O,w){X(this,L,"sub");this.id=D,this.path=x,this.parent=O,this.params=w}toString(){return`routeRef{type=sub,id=${this.id}}`}}L=t;function o(F){const{id:D,path:x,parent:O}=F,w=x.split("/").filter(ce=>ce.startsWith(":")).map(ce=>ce.substring(1)),K=[...O.params,...w];if(O.params.some(ce=>w.includes(ce)))throw new Error("SubRouteRef may not have params that overlap with its parent");if(!x.startsWith("/"))throw new Error(`SubRouteRef path must start with '/', got '${x}'`);if(x.endsWith("/"))throw new Error(`SubRouteRef path must not end with '/', got '${x}'`);for(const ce of w)if(!R.test(ce))throw new Error(`SubRouteRef path has invalid param, got '${ce}'`);return new f(D,x,O,K)}class u{constructor(D,x,O){X(this,$,"external");this.id=D,this.params=x,this.optional=O}toString(){return`routeRef{type=external,id=${this.id}}`}}$=t;function m(F){var D;return new u(F.id,(D=F.params)!=null?D:[],Boolean(F.optional))}var y=e(2784),h=e(10289);function E(F){const D=(0,h.TH)(),x=(0,r.Vt)("routing-context");if(!x)throw new Error("Routing context is not available");const O=x.atVersion(1),w=(0,y.useMemo)(()=>O&&O.resolve(F,D),[O,F,D]);if(!x)throw new Error("useRouteRef used outside of routing context");if(!O)throw new Error("RoutingContext v1 not available");const K="optional"in F&&F.optional;if(!w&&!K)throw new Error(`No path for ${F}`);return w}function S(F){return(0,h.UO)()}},10179:function(ne,s,e){"use strict";e.d(s,{SP:function(){return b},dR:function(){return h},VL:function(){return $},BD:function(){return t}});function r(F){if(typeof F!="object"||F===null||Array.isArray(F))return!1;const D=F;return!(typeof D.name!="string"||D.name===""||typeof D.message!="string")}function t(F){if(typeof F!="object"||F===null||Array.isArray(F))throw new Error(`Encountered invalid error, not an object, got '${F}'`);const D=F;if(typeof D.name!="string"||D.name==="")throw new Error(`Encountered error object without a name, got '${F}'`);if(typeof D.message!="string")throw new Error(`Encountered error object without a message, got '${F}'`)}var c=e(24852);function i(F,D){const x=serializeErrorInternal(F),O={name:"Unknown",message:"<no reason given>",...x};return D!=null&&D.includeStack||delete O.stack,O}function R(F){const D=(0,c.deserializeError)(F);return F.stack||(D.stack=void 0),D}function f(F){if(r(F)){const D=String(F);return D!=="[object Object]"?D:`${F.name}: ${F.message}`}return`unknown error '${F}'`}class o extends Error{constructor(x,O){var K;let w=x;if(O!==void 0){const re=f(O);w?w+=`; caused by ${re}`:w=`caused by ${re}`}super(w);X(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 u extends null{}class m extends null{}class y extends null{}class h extends o{}class E extends null{}class S extends null{}class b extends o{constructor(D,x){super(D,x),this.name=r(x)?x.name:"Error"}}async function L(F){var D;try{const x=await F.text();if(x){if((D=F.headers.get("content-type"))!=null&&D.startsWith("application/json"))try{const O=JSON.parse(x);if(O.error&&O.response)return O}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}, ${x}`},response:{statusCode:F.status}}}}catch{}return{error:{name:"Error",message:`Request failed with status ${F.status} ${F.statusText}`},response:{statusCode:F.status}}}class $ extends Error{constructor(x){super(x.message);X(this,"response");X(this,"body");X(this,"cause");this.name="ResponseError",this.response=x.response,this.body=x.data,this.cause=x.cause}static async fromResponse(x){const O=await L(x),w=O.response.statusCode||x.status,K=O.error.name||x.statusText,re=`Request failed with ${w} ${K}`,ce=R(O.error);return new $({message:re,response:x,data:O,cause:ce})}}},36356:function(ne,s,e){var h,E,S,b,L;"use strict";e.d(s,{nW:function(){return y},ae:function(){return f},q3:function(){return o}});var r=e(36964);const t=(0,r.createApiRef)({id:"core.scmauth"});class c{constructor(D){Bn(this,h,void 0);Zn(this,h,D)}async getCredentials(D){const x=new URL(D.url),O=ot(this,h).find(w=>w.isUrlSupported(x));if(!O)throw new Error(`No auth provider available for '${D.url}', see https://backstage.io/link?scm-auth`);return O.getCredentials(D)}}h=new WeakMap;const $=class{constructor(D,x,O,w){Bn(this,E,void 0);Bn(this,S,void 0);Bn(this,b,void 0);Bn(this,L,void 0);Zn(this,E,x),Zn(this,S,O),Zn(this,b,w),Zn(this,L,D)}static createDefaultApiFactory(){return createApiFactory({api:scmAuthApiRef,deps:{github:githubAuthApiRef,gitlab:gitlabAuthApiRef,azure:microsoftAuthApiRef,bitbucket:bitbucketAuthApiRef},factory:({github:D,gitlab:x,azure:O,bitbucket:w})=>$.merge($.forGithub(D),$.forGitlab(x),$.forAzure(O),$.forBitbucket(w))})}static forAuthApi(D,x){return new $("generic",D,x.host,x.scopeMapping)}static forGithub(D,x){var w;const O=(w=x==null?void 0:x.host)!=null?w:"github.com";return new $("github",D,O,{default:["repo","read:org","read:user"],repoWrite:["gist"]})}static forGitlab(D,x){var w;const O=(w=x==null?void 0:x.host)!=null?w:"gitlab.com";return new $("gitlab",D,O,{default:["read_user","read_api","read_repository"],repoWrite:["write_repository","api"]})}static forAzure(D,x){var w;const O=(w=x==null?void 0:x.host)!=null?w:"dev.azure.com";return new $("azure",D,O,{default:["vso.build","vso.code","vso.graph","vso.project","vso.profile"],repoWrite:["vso.code_manage"]})}static forBitbucket(D,x){var w;const O=(w=x==null?void 0:x.host)!=null?w:"bitbucket.org";return new $("bitbucket",D,O,{default:["account","team","pullrequest","snippet","issue"],repoWrite:["pullrequest:write","snippet:write","issue:write"]})}static merge(...D){return new c(D)}isUrlSupported(D){return D.host===ot(this,S)}getAdditionalScopesForProvider(D){var x,O;return!(D!=null&&D.customScopes)||ot(this,L)==="generic"?[]:(O=(x=D.customScopes)==null?void 0:x[ot(this,L)])!=null?O:[]}async getCredentials(D){const{url:x,additionalScope:O,...w}=D,K=ot(this,b).default.slice();O!=null&&O.repoWrite&&K.push(...ot(this,b).repoWrite);const re=this.getAdditionalScopesForProvider(O);re.length&&K.push(...re);const ce=[...new Set(K)],Se=await ot(this,E).getAccessToken(ce,w);return{token:Se,headers:{Authorization:`Bearer ${Se}`}}}};let i=$;E=new WeakMap,S=new WeakMap,b=new WeakMap,L=new WeakMap;var R=e(68370);class f{static fromConfig(D){return R.Lx.fromConfig(D)}}const o=(0,r.createApiRef)({id:"integration.scmintegrations"});var u=e(73250),m=e(2784);const y=F=>{var K;const{type:D}=F,x=(0,r.useApp)(),O=u.Z,w=D&&(K=x.getSystemIcon(D))!=null?K:O;return m.createElement(w,null)}},68370:function(ne,s,e){var Dt,it,$t,nn,Gt,Kt,mn;"use strict";e.d(s,{Lx:function(){return Jt},Pb:function(){return qt}});var r=e(82717),t=e.n(r),c=e(76635);function i(M){const g=new URL("http://example.com");return g.host=M,g.host===M}function R(M){try{return new URL(M),!0}catch{return!1}}function f(M,g){return{list(){return M},byUrl(T){try{const B=typeof T=="string"?new URL(T):T;return M.find(V=>g(V)===B.host)}catch{return}},byHost(T){return M.find(B=>g(B)===T)}}}function o(M){const{url:g,base:T,lineNumber:B}=M;try{return new URL(g),g}catch{}let V;if(g.startsWith("/")){const{filepath:se}=t()(T);V=new URL(T);const he=(0,c.trimEnd)(V.pathname.substring(0,V.pathname.length-se.length),"/");V.pathname=`${he}${g}`}else V=new URL(g,T);return V.search=new URL(T).search,B&&(V.hash=`L${B}`),V.toString()}const u="amazonaws.com";function m(M){var zt;const g=M.getOptionalString("endpoint"),T=(zt=M.getOptionalBoolean("s3ForcePathStyle"))!=null?zt:!1;let B,V;if(g){try{const An=new URL(g);B=An.host,V=An.pathname}catch{throw new Error(`invalid awsS3 integration config, endpoint '${g}' is not a valid URL`)}if(V!=="/")throw new Error(`invalid awsS3 integration config, endpoints cannot contain path, got '${g}'`)}else B=u;const se=M.getOptionalString("accessKeyId"),he=M.getOptionalString("secretAccessKey"),Le=M.getOptionalString("roleArn"),Et=M.getOptionalString("externalId");return{host:B,endpoint:g,s3ForcePathStyle:T,accessKeyId:se,secretAccessKey:he,roleArn:Le,externalId:Et}}function y(M){const g=M.map(m);return g.some(T=>T.host===u)||g.push({host:u}),g}const Zt=class{get type(){return"awsS3"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}constructor(g){this.integrationConfig=g}resolveUrl(g){return o(g)}resolveEditUrl(g){return g}};let h=Zt;X(h,"factory",({config:g})=>{var B;const T=y((B=g.getOptionalConfigArray("integrations.awsS3"))!=null?B:[]);return f(T.map(V=>new Zt(V)),V=>V.config.host)});const E="GB",Mn=class{constructor(g,T,B,V,se,he){Bn(this,Dt,void 0);Bn(this,it,void 0);Bn(this,$t,void 0);Bn(this,nn,void 0);Bn(this,Gt,void 0);Bn(this,Kt,void 0);Bn(this,mn,(...g)=>{const T=new URL(ot(this,Dt));return T.pathname=g.map(B=>encodeURIComponent(B)).join("/"),T});Zn(this,Dt,g),Zn(this,it,T),Zn(this,$t,B),Zn(this,nn,V),Zn(this,Gt,se),Zn(this,Kt,he)}static fromRepoUrl(g){var An;const T=new URL(g);let B,V,se;const he=T.pathname.split("/").map(an=>decodeURIComponent(an));if(he[2]==="_git"?(B=he[1],V=se=he[3]):he[3]==="_git"?(B=he[1],V=he[2],se=he[4]):he[4]==="_git"&&(B=`${he[1]}/${he[2]}`,V=he[3],se=he[5]),!B||!V||!se)throw new Error("Azure URL must point to a git repository");const Le=(An=T.searchParams.get("path"))!=null?An:void 0;let Et;const zt=T.searchParams.get("version");if(zt){if(zt.slice(0,2)!=="GB")throw new Error("Azure URL version must point to a git branch");Et=zt.slice(2)}return new Mn(T.origin,B,V,se,Le,Et)}toRepoUrl(){let g;return ot(this,$t)===ot(this,nn)?g=ot(this,mn).call(this,ot(this,it),"_git",ot(this,nn)):g=ot(this,mn).call(this,ot(this,it),ot(this,$t),"_git",ot(this,nn)),ot(this,Gt)&&g.searchParams.set("path",ot(this,Gt)),ot(this,Kt)&&g.searchParams.set("version",E+ot(this,Kt)),g.toString()}toFileUrl(){if(!ot(this,Gt))throw new Error("Azure URL must point to a specific path to be able to download a file");const g=ot(this,mn).call(this,ot(this,it),ot(this,$t),"_apis","git","repositories",ot(this,nn),"items");return g.searchParams.set("api-version","6.0"),g.searchParams.set("path",ot(this,Gt)),ot(this,Kt)&&g.searchParams.set("version",ot(this,Kt)),g.toString()}toArchiveUrl(){const g=ot(this,mn).call(this,ot(this,it),ot(this,$t),"_apis","git","repositories",ot(this,nn),"items");return g.searchParams.set("recursionLevel","full"),g.searchParams.set("download","true"),g.searchParams.set("api-version","6.0"),ot(this,Gt)&&g.searchParams.set("scopePath",ot(this,Gt)),ot(this,Kt)&&g.searchParams.set("version",ot(this,Kt)),g.toString()}toCommitsUrl(){const g=ot(this,mn).call(this,ot(this,it),ot(this,$t),"_apis","git","repositories",ot(this,nn),"commits");return g.searchParams.set("api-version","6.0"),ot(this,Kt)&&g.searchParams.set("searchCriteria.itemVersion.version",ot(this,Kt)),g.toString()}getOwner(){return ot(this,it)}getProject(){return ot(this,$t)}getRepo(){return ot(this,nn)}getPath(){return ot(this,Gt)}getRef(){return ot(this,Kt)}};let S=Mn;Dt=new WeakMap,it=new WeakMap,$t=new WeakMap,nn=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,mn=new WeakMap;const b="dev.azure.com";function L(M){var B;const g=(B=M.getOptionalString("host"))!=null?B:b,T=M.getOptionalString("token");if(!i(g))throw new Error(`Invalid Azure integration config, '${g}' is not a valid host`);return{host:g,token:T}}function $(M){const g=M.map(L);return g.some(T=>T.host===b)||g.push({host:b}),g}const Qt=class{constructor(g){this.integrationConfig=g}get type(){return"azure"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){var V;const{url:T,base:B}=g;if(R(T))return T;try{const se=S.fromRepoUrl(B),he=new URL(B),Le=new URL(`https://a.com${(V=se.getPath())!=null?V:""}`),Et=new URL(T,Le).pathname;return he.searchParams.set("path",Et),g.lineNumber&&(he.searchParams.set("line",String(g.lineNumber)),he.searchParams.set("lineEnd",String(g.lineNumber+1)),he.searchParams.set("lineStartColumn","1"),he.searchParams.set("lineEndColumn","1")),he.toString()}catch{return new URL(T,B).toString()}}resolveEditUrl(g){return g}};let F=Qt;X(F,"factory",({config:g})=>{var B;const T=$((B=g.getOptionalConfigArray("integrations.azure"))!=null?B:[]);return f(T.map(V=>new Qt(V)),V=>V.config.host)});var D=e(48834).lW;function x(M){return AzureUrl.fromRepoUrl(M).toFileUrl()}function O(M){return AzureUrl.fromRepoUrl(M).toArchiveUrl()}function w(M){return AzureUrl.fromRepoUrl(M).toCommitsUrl()}function K(M,g){const T=g?{...g}:{};if(M.token){const B=D.from(`:${M.token}`,"utf8");T.Authorization=`Basic ${B.toString("base64")}`}return{headers:T}}const re="bitbucket.org",ce="https://api.bitbucket.org/2.0";function Se(M){var he;const g=(he=M.getOptionalString("host"))!=null?he:re;let T=M.getOptionalString("apiBaseUrl");const B=M.getOptionalString("token"),V=M.getOptionalString("username"),se=M.getOptionalString("appPassword");if(!i(g))throw new Error(`Invalid Bitbucket integration config, '${g}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):g===re?T=ce:T=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:T,token:B,username:V,appPassword:se}}function De(M){const g=M.map(Se);return g.some(T=>T.host===re)||g.push({host:re,apiBaseUrl:ce}),g}const Bt=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucket"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const T=o(g);if(!g.lineNumber)return T;const B=new URL(T);return this.integrationConfig.host==="bitbucket.org"?B.hash=`lines-${g.lineNumber}`:B.hash=`${g.lineNumber}`,B.toString()}resolveEditUrl(g){const T=t()(g),B=new URL(g);return B.searchParams.set("mode","edit"),B.searchParams.set("spa","0"),B.searchParams.set("at",T.ref),B.toString()}};let Fe=Bt;X(Fe,"factory",({config:g})=>{var B,V,se;const T=De((se=g.getOptionalConfigArray("integrations.bitbucket"))!=null?se:[...(B=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?B:[],...(V=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?V:[]]);return f(T.map(he=>new Bt(he)),he=>he.config.host)});var He=e(96279),Ae=e(48834).lW;async function Je(M,g){const{name:T,owner:B,resource:V}=parseGitUrl(M),se=V==="bitbucket.org";let he=se?`${g.apiBaseUrl}/repositories/${B}/${T}`:`${g.apiBaseUrl}/projects/${B}/repos/${T}/default-branch`,Le=await fetch(he,At(g));if(Le.status===404&&!se&&(he=`${g.apiBaseUrl}/projects/${B}/repos/${T}/branches/default`,Le=await fetch(he,At(g))),!Le.ok){const zt=`Failed to retrieve default branch from ${he}, ${Le.status} ${Le.statusText}`;throw new Error(zt)}let Et;if(se)Et=(await Le.json()).mainbranch.name;else{const{displayId:zt}=await Le.json();Et=zt}if(!Et)throw new Error(`Failed to read default branch from ${he}. Response ${Le.status} ${Le.json()}`);return Et}async function tt(M,g){const{name:T,owner:B,ref:V,protocol:se,resource:he,filepath:Le}=parseGitUrl(M),Et=he==="bitbucket.org";let zt=V;zt||(zt=await Je(M,g));const An=Le?`&path=${encodeURIComponent(decodeURIComponent(Le))}`:"";return Et?`${se}://${he}/${B}/${T}/get/${zt}.tar.gz`:`${g.apiBaseUrl}/projects/${B}/repos/${T}/archive?format=tgz&at=${zt}&prefix=${B}-${T}${An}`}function Tt(M,g){try{const{owner:T,name:B,ref:V,filepathtype:se,filepath:he}=parseGitUrl(M);if(!T||!B||se!=="browse"&&se!=="raw"&&se!=="src")throw new Error("Invalid Bitbucket URL or file path");const Le=he.replace(/^\//,"");if(g.host==="bitbucket.org"){if(!V)throw new Error("Invalid Bitbucket URL or file path");return`${g.apiBaseUrl}/repositories/${T}/${B}/src/${V}/${Le}`}return`${g.apiBaseUrl}/projects/${T}/repos/${B}/raw/${Le}?at=${V}`}catch(T){throw new Error(`Incorrect URL: ${M}, ${T}`)}}function At(M){const g={};if(M.token)g.Authorization=`Bearer ${M.token}`;else if(M.username&&M.appPassword){const T=Ae.from(`${M.username}:${M.appPassword}`,"utf8");g.Authorization=`Basic ${T.toString("base64")}`}return{headers:g}}const Ie="bitbucket.org",ht="https://api.bitbucket.org/2.0";function gt(M){const g=Ie,T=ht,B=M.getString("username"),V=M.getString("appPassword");return{host:g,apiBaseUrl:T,username:B,appPassword:V}}function lt(M){const g=M.map(gt);return g.length===0&&g.push({host:Ie,apiBaseUrl:ht}),g}const Xt=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketCloud"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const T=o(g);if(g.lineNumber){const B=new URL(T);return B.hash=`lines-${g.lineNumber}`,B.toString()}return T}resolveEditUrl(g){const T=t()(g),B=new URL(g);return B.searchParams.set("mode","edit"),B.searchParams.set("at",T.ref),B.toString()}};let _=Xt;X(_,"factory",({config:g})=>{var B;const T=lt((B=g.getOptionalConfigArray("integrations.bitbucketCloud"))!=null?B:[]);return f(T.map(V=>new Xt(V)),V=>V.config.host)});var pe=e(48834).lW;async function be(M,g){const{name:T,owner:B}=parseGitUrl(M),V=`${g.apiBaseUrl}/repositories/${B}/${T}`,se=await fetch(V,at(g));if(!se.ok){const Et=`Failed to retrieve default branch from ${V}, ${se.status} ${se.statusText}`;throw new Error(Et)}const Le=(await se.json()).mainbranch.name;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${se.status} ${se.json()}`);return Le}async function We(M,g){const{name:T,owner:B,ref:V,protocol:se,resource:he}=parseGitUrl(M);let Le=V;return Le||(Le=await be(M,g)),`${se}://${he}/${B}/${T}/get/${Le}.tar.gz`}function et(M,g){try{const{owner:T,name:B,ref:V,filepathtype:se,filepath:he}=parseGitUrl(M);if(!T||!B||se!=="src"&&se!=="raw")throw new Error("Invalid Bitbucket Cloud URL or file path");const Le=he.replace(/^\//,"");if(!V)throw new Error("Invalid Bitbucket Cloud URL or file path");return`${g.apiBaseUrl}/repositories/${T}/${B}/src/${V}/${Le}`}catch(T){throw new Error(`Incorrect URL: ${M}, ${T}`)}}function at(M){const g={};if(M.username&&M.appPassword){const T=pe.from(`${M.username}:${M.appPassword}`,"utf8");g.Authorization=`Basic ${T.toString("base64")}`}return{headers:g}}function yt(M){const g=M.getString("host");let T=M.getOptionalString("apiBaseUrl");const B=M.getOptionalString("token"),V=M.getOptionalString("username"),se=M.getOptionalString("password");if(!i(g))throw new Error(`Invalid Bitbucket Server integration config, '${g}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):T=`https://${g}/rest/api/1.0`,{host:g,apiBaseUrl:T,token:B,username:V,password:se}}function ie(M){return M.map(yt)}const Rn=class{constructor(g){this.integrationConfig=g}get type(){return"bitbucketServer"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const T=o(g);if(g.lineNumber){const B=new URL(T);return B.hash=g.lineNumber.toString(),B.toString()}return T}resolveEditUrl(g){return g.includes("?")?g.substring(0,g.indexOf("?")):g}};let ae=Rn;X(ae,"factory",({config:g})=>{var B;const T=ie((B=g.getOptionalConfigArray("integrations.bitbucketServer"))!=null?B:[]);return f(T.map(V=>new Rn(V)),V=>V.config.host)});var Ye=e(48834).lW;async function Ge(M,g){const{name:T,owner:B}=parseGitUrl(M);let V=`${g.apiBaseUrl}/projects/${B}/repos/${T}/default-branch`,se=await fetch(V,J(g));if(se.status===404&&(V=`${g.apiBaseUrl}/projects/${B}/repos/${T}/branches/default`,se=await fetch(V,J(g))),!se.ok){const Et=`Failed to retrieve default branch from ${V}, ${se.status} ${se.statusText}`;throw new Error(Et)}const{displayId:he}=await se.json(),Le=he;if(!Le)throw new Error(`Failed to read default branch from ${V}. Response ${se.status} ${se.json()}`);return Le}async function we(M,g){const{name:T,owner:B,ref:V,filepath:se}=parseGitUrl(M);let he=V;he||(he=await Ge(M,g));const Le=se?`&path=${encodeURIComponent(decodeURIComponent(se))}`:"";return`${g.apiBaseUrl}/projects/${B}/repos/${T}/archive?format=tgz&at=${he}&prefix=${B}-${T}${Le}`}function nt(M,g){try{const{owner:T,name:B,ref:V,filepathtype:se,filepath:he}=parseGitUrl(M);if(!T||!B||se!=="browse"&&se!=="raw"&&se!=="src")throw new Error("Invalid Bitbucket Server URL or file path");const Le=he.replace(/^\//,"");return`${g.apiBaseUrl}/projects/${T}/repos/${B}/raw/${Le}?at=${V}`}catch(T){throw new Error(`Incorrect URL: ${M}, ${T}`)}}function J(M){const g={};if(M.token&&(g.Authorization=`Bearer ${M.token}`),M.username&&M.password){const T=Ye.from(`${M.username}:${M.password}`,"utf8");g.Authorization=`Basic ${T.toString("base64")}`}return{headers:g}}function z(M){const g=M.getString("host");let T=M.getOptionalString("baseUrl"),B=M.getOptionalString("cloneUrl"),V=M.getOptionalString("gitilesBaseUrl");const se=M.getOptionalString("username"),he=M.getOptionalString("password");if(i(g)){if(T&&!R(T))throw new Error(`Invalid Gerrit integration config, '${T}' is not a valid baseUrl`);if(B&&!R(B))throw new Error(`Invalid Gerrit integration config, '${B}' is not a valid cloneUrl`);if(V&&!R(V))throw new Error(`Invalid Gerrit integration config, '${V}' is not a valid gitilesBaseUrl`)}else throw new Error(`Invalid Gerrit integration config, '${g}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):T=`https://${g}`,V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,B?B=(0,c.trimEnd)(B,"/"):B=T,{host:g,baseUrl:T,cloneUrl:B,gitilesBaseUrl:V,username:se,password:he}}function q(M){return M.map(z)}var ue=e(48834).lW;const fe=")]}'";function Pe(M,g){const B=g.replace(M.gitilesBaseUrl,"").split("/").filter(zt=>!!zt),V=B.indexOf("+");if(V<=0)throw new Error(`Unable to parse project from url: ${g}`);const se=(0,c.trimStart)(B.slice(0,V).join("/"),"/"),he=B.indexOf("heads");if(he<=0)throw new Error(`Unable to parse branch from url: ${g}`);const Le=B[he+1],Et=B.slice(he+2).join("/");return{branch:Le,filePath:Et===""?"/":Et,project:se}}function Oe(M,g,T,B){return`${M.gitilesBaseUrl}/${g}/+/refs/heads/${T}/${(0,c.trimStart)(B,"/")}`}function Ce(M){return M.password?"/a/":"/"}function Qe(M,g){const{branch:T,project:B}=Pe(M,g);return`${M.baseUrl}${Ce(M)}projects/${encodeURIComponent(B)}/branches/${T}`}function Ke(M,g){const{project:T}=Pe(M,g);return`${M.cloneUrl}${Ce(M)}${T}`}function pt(M,g){const{branch:T,filePath:B,project:V}=Pe(M,g);return`${M.baseUrl}${Ce(M)}projects/${encodeURIComponent(V)}/branches/${T}/files/${encodeURIComponent(B)}/content`}function St(M){return`${M.baseUrl}${Ce(M)}projects/`}function ut(M){const g={};if(!M.password)return g;const T=ue.from(`${M.username}:${M.password}`,"utf8");return g.Authorization=`Basic ${T.toString("base64")}`,{headers:g}}async function xt(M){const g=await M.text();if(g.startsWith(fe))try{return JSON.parse(g.slice(fe.length))}catch(T){throw new Error(`Invalid response from Gerrit: ${g.slice(0,10)} - ${T}`)}throw new Error(`Gerrit JSON body prefix missing. Found: ${g.slice(0,10)}`)}const ln=class{constructor(g){this.integrationConfig=g}get type(){return"gerrit"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){const{url:T,base:B,lineNumber:V}=g;let se;if(T.startsWith("/")){const{branch:he,project:Le}=Pe(this.config,B);return Oe(this.config,Le,he,T)}return T?se=new URL(T,B):se=new URL(B),V&&(se.hash=V.toString()),se.toString()}resolveEditUrl(g){return g}};let Lt=ln;X(Lt,"factory",({config:g})=>{var B;const T=q((B=g.getOptionalConfigArray("integrations.gerrit"))!=null?B:[]);return f(T.map(V=>new ln(V)),V=>V.config.host)});const bt="github.com",Pt="https://api.github.com",Wt="https://raw.githubusercontent.com";function Ht(M){var he,Le;const g=(he=M.getOptionalString("host"))!=null?he:bt;let T=M.getOptionalString("apiBaseUrl"),B=M.getOptionalString("rawBaseUrl");const V=M.getOptionalString("token"),se=(Le=M.getOptionalConfigArray("apps"))==null?void 0:Le.map(Et=>({appId:Et.getNumber("appId"),clientId:Et.getString("clientId"),clientSecret:Et.getString("clientSecret"),webhookSecret:Et.getString("webhookSecret"),privateKey:Et.getString("privateKey"),allowedInstallationOwners:Et.getOptionalStringArray("allowedInstallationOwners")}));if(!i(g))throw new Error(`Invalid GitHub integration config, '${g}' is not a valid host`);return T?T=(0,c.trimEnd)(T,"/"):g===bt&&(T=Pt),B?B=(0,c.trimEnd)(B,"/"):g===bt&&(B=Wt),{host:g,apiBaseUrl:T,rawBaseUrl:B,token:V,apps:se}}function dn(M){const g=M.map(Ht);return g.some(T=>T.host===bt)||g.push({host:bt,apiBaseUrl:Pt,rawBaseUrl:Wt}),g}function In(M,g,T){try{const{owner:B,name:V,ref:se,filepathtype:he,filepath:Le}=parseGitUrl(M);if(!B||!V||!se||he!=="blob"&&he!=="raw"&&he!=="tree")throw new Error("Invalid GitHub URL or file path");const Et=Le.replace(/^\//,"");return Nt(g,T)==="api"?`${g.apiBaseUrl}/repos/${B}/${V}/contents/${Et}?ref=${se}`:`${g.rawBaseUrl}/${B}/${V}/${se}/${Et}`}catch(B){throw new Error(`Incorrect URL: ${M}, ${B}`)}}function Yt(M,g){const T={};return Nt(M,g)==="api"&&(T.Accept="application/vnd.github.v3.raw"),g.token&&(T.Authorization=`token ${g.token}`),{headers:T}}function Nt(M,g){return M.apiBaseUrl&&(g.token||!M.rawBaseUrl)?"api":"raw"}var Xe=e(55912);class de{constructor(){X(this,"tokenCache",new Map);X(this,"isNotExpired",g=>g.diff(DateTime.local(),"minutes").minutes>50)}async getOrCreateToken(g,T){const B=this.tokenCache.get(g);if(B&&this.isNotExpired(B.expiresAt))return{accessToken:B.token};const V=await T();return this.tokenCache.set(g,V),{accessToken:V.token}}}const j={Accept:"application/vnd.github.machine-man-preview+json"};class ye{constructor(g,T){X(this,"appClient");X(this,"baseUrl");X(this,"baseAuthConfig");X(this,"cache",new de);X(this,"allowedInstallationOwners");this.allowedInstallationOwners=g.allowedInstallationOwners,this.baseUrl=T,this.baseAuthConfig={appId:g.appId,privateKey:g.privateKey.replace(/\\n/gm,`
|
|
31
|
-
`)},this.appClient=new Octokit({baseUrl:T,headers:j,authStrategy:createAppAuth,auth:this.baseAuthConfig})}async getInstallationCredentials(g,T){var he;const{installationId:B,suspended:V}=await this.getInstallationData(g);if(this.allowedInstallationOwners&&!((he=this.allowedInstallationOwners)!=null&&he.includes(g)))return{accessToken:void 0};if(V)throw new Error(`The GitHub application for ${g} is suspended`);const se=T?`${g}/${T}`:g;return this.cache.getOrCreateToken(se,async()=>{var Et;const Le=await this.appClient.apps.createInstallationAccessToken({installation_id:B,headers:j});if(T&&Le.data.repository_selection==="selected"){const zt=new Octokit({baseUrl:this.baseUrl,auth:Le.data.token}),An=await zt.paginate(zt.apps.listReposAccessibleToInstallation);if(!((Et=An.repositories)!=null?Et:An).some(sr=>sr.name===T))throw new Error(`The Backstage GitHub application used in the ${g} organization does not have access to a repository with the name ${T}`)}return{token:Le.data.token,expiresAt:DateTime.fromISO(Le.data.expires_at)}})}getInstallations(){return this.appClient.paginate(this.appClient.apps.listInstallations)}async getInstallationData(g){const B=(await this.getInstallations()).find(se=>{var he,Le;return((Le=(he=se.account)==null?void 0:he.login)==null?void 0:Le.toLocaleLowerCase("en-US"))===g.toLocaleLowerCase("en-US")});if(B)return{installationId:B.id,suspended:Boolean(B.suspended_by)};const V=new Error(`No app installation found for ${g} in ${this.baseAuthConfig.appId}`);throw V.name="NotFoundError",V}}class je{constructor(g){X(this,"apps");var T,B;this.apps=(B=(T=g.apps)==null?void 0:T.map(V=>new ye(V,g.apiBaseUrl)))!=null?B:[]}async getAllInstallations(){return this.apps.length?(await Promise.all(this.apps.map(T=>T.getInstallations()))).flat():[]}async getAppToken(g,T){if(this.apps.length===0)return;const B=await Promise.all(this.apps.map(Le=>Le.getInstallationCredentials(g,T).then(Et=>({credentials:Et,error:void 0}),Et=>({credentials:void 0,error:Et})))),V=B.find(Le=>Le.credentials);if(V)return V.credentials.accessToken;const he=B.map(Le=>Le.error).find(Le=>Le.name!=="NotFoundError");if(he)throw he}}class _e{constructor(g,T){this.githubAppCredentialsMux=g,this.token=T}async getCredentials(g){const T=parseGitUrl(g.url),B=T.owner||T.name,V=T.owner?T.name:void 0;let se="app",he=await this.githubAppCredentialsMux.getAppToken(B,V);return he||(se="token",he=this.token),{headers:he?{Authorization:`Bearer ${he}`}:void 0,token:he,type:se}}}X(_e,"create",null);class st{static fromIntegrations(g){const T=new Map;return g.github.list().forEach(B=>{const V=SingleInstanceGithubCredentialsProvider.create(B.config);T.set(B.config.host,V)}),new st(T)}constructor(g){this.providers=g}async getCredentials(g){const T=new URL(g.url),B=this.providers.get(T.host);if(!B)throw new Error(`There is no GitHub integration that matches ${g.url}. Please add a configuration for an integration.`);return B.getCredentials(g)}}const vn=class{constructor(g){this.integrationConfig=g}get type(){return"github"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return qt(o(g),"tree")}resolveEditUrl(g){return qt(g,"edit")}};let Rt=vn;X(Rt,"factory",({config:g})=>{var B;const T=dn((B=g.getOptionalConfigArray("integrations.github"))!=null?B:[]);return f(T.map(V=>new vn(V)),V=>V.config.host)});function qt(M,g){return M.replace(/\/\/([^/]+)\/([^/]+)\/([^/]+)\/(blob|tree|edit)\//,(T,B,V,se)=>`//${B}/${V}/${se}/${g}/`)}const en="gitlab.com",tn="https://gitlab.com/api/v4";function gn(M){const g=M.getString("host");let T=M.getOptionalString("apiBaseUrl");const B=M.getOptionalString("token");let V=M.getOptionalString("baseUrl");if(T?T=(0,c.trimEnd)(T,"/"):g===en&&(T=tn),V?V=(0,c.trimEnd)(V,"/"):V=`https://${g}`,i(g)){if(!T||!R(T))throw new Error(`Invalid GitLab integration config, '${T}' is not a valid apiBaseUrl`);if(!R(V))throw new Error(`Invalid GitLab integration config, '${V}' is not a valid baseUrl`)}else throw new Error(`Invalid GitLab integration config, '${g}' is not a valid host`);return{host:g,token:B,apiBaseUrl:T,baseUrl:V}}function U(M){const g=M.map(gn);return g.some(T=>T.host===en)||g.push({host:en,apiBaseUrl:tn,baseUrl:`https://${en}`}),g}function oe(M){let g="";return M.host!==en&&(g=new URL(M.baseUrl).pathname),trimEnd(g,"/")}async function te(M,g){const T=await dt(M,g);return $e(M,T,g).toString()}function Ee(M){const{token:g=""}=M;return{headers:{"PRIVATE-TOKEN":g}}}function $e(M,g,T){try{const B=new URL(M),V=B.pathname.split("/blob/").slice(1).join("/blob/"),[se,...he]=V.split("/"),Le=getGitLabIntegrationRelativePath(T);return B.pathname=[...Le?[Le]:[],"api/v4/projects",g,"repository/files",encodeURIComponent(decodeURIComponent(he.join("/"))),"raw"].join("/"),B.search=`?ref=${se}`,B}catch(B){throw new Error(`Incorrect url: ${M}, ${B}`)}}async function dt(M,g){const T=new URL(M);if(!T.pathname.includes("/blob/"))throw new Error("Please provide full path to yaml file from GitLab");try{let B=T.pathname.split("/-/blob/")[0].split("/blob/")[0];const V=getGitLabIntegrationRelativePath(g);V&&(B=B.replace(V,""));const se=new URL(`${T.origin}${V}/api/v4/projects/${encodeURIComponent(B.replace(/^\//,""))}`),he=await fetch(se.toString(),Ee(g)),Le=await he.json();if(!he.ok)throw new Error(`GitLab Error '${Le.error}', ${Le.error_description}`);return Number(Le.id)}catch(B){throw new Error(`Could not get GitLab project ID for: ${M}, ${B}`)}}const Ln=class{constructor(g){this.integrationConfig=g}get type(){return"gitlab"}get title(){return this.integrationConfig.host}get config(){return this.integrationConfig}resolveUrl(g){return o(g)}resolveEditUrl(g){return Vt(g,"edit")}};let Ne=Ln;X(Ne,"factory",({config:g})=>{var B;const T=U((B=g.getOptionalConfigArray("integrations.gitlab"))!=null?B:[]);return f(T.map(V=>new Ln(V)),V=>V.config.host)});function Vt(M,g){return M.replace(/\/\-\/(blob|tree|edit)\//,`/-/${g}/`)}class Jt{constructor(g){X(this,"byType");this.byType=g}static fromConfig(g){return new Jt({awsS3:h.factory({config:g}),azure:F.factory({config:g}),bitbucket:Fe.factory({config:g}),bitbucketCloud:_.factory({config:g}),bitbucketServer:ae.factory({config:g}),gerrit:Lt.factory({config:g}),github:Rt.factory({config:g}),gitlab:Ne.factory({config:g})})}get awsS3(){return this.byType.awsS3}get azure(){return this.byType.azure}get bitbucket(){return this.byType.bitbucket}get bitbucketCloud(){return this.byType.bitbucketCloud}get bitbucketServer(){return this.byType.bitbucketServer}get gerrit(){return this.byType.gerrit}get github(){return this.byType.github}get gitlab(){return this.byType.gitlab}list(){return Object.values(this.byType).flatMap(g=>g.list())}byUrl(g){let T=Object.values(this.byType).map(B=>B.byUrl(g)).filter(Boolean);if(T.length>1){const B=T.filter(V=>!(V instanceof Fe));B.length!==0&&(T=B)}return T[0]}byHost(g){return Object.values(this.byType).map(T=>T.byHost(g)).find(Boolean)}resolveUrl(g){const T=this.byUrl(g.base);return T?T.resolveUrl(g):o(g)}resolveEditUrl(g){const T=this.byUrl(g);return T?T.resolveEditUrl(g):g}}},90775:function(ne,s,e){"use strict";var r={};e.r(r),e.d(r,{TechDocsPlugin:function(){return R.plugin}});var t=e(2784),c=e(47093),i=e(10289),R=e(82250),f=e(56338),o=e(49208),u=e(36964),m=e(68099);const y=[(0,u.createApiFactory)({api:u.discoveryApiRef,deps:{configApi:u.configApiRef},factory:({configApi:I})=>o.UrlPatternDiscovery.compile(`${I.getString("backend.baseUrl")}/api/{{ pluginId }}`)}),(0,u.createApiFactory)({api:u.alertApiRef,deps:{},factory:()=>new o.AlertApiForwarder}),(0,u.createApiFactory)({api:u.analyticsApiRef,deps:{},factory:()=>new o.NoOpAnalyticsApi}),(0,u.createApiFactory)({api:u.errorApiRef,deps:{alertApi:u.alertApiRef},factory:({alertApi:I})=>{const k=new o.ErrorAlerter(I,new o.ErrorApiForwarder);return o.UnhandledErrorForwarder.forward(k,{hidden:!1}),k}}),(0,u.createApiFactory)({api:u.storageApiRef,deps:{errorApi:u.errorApiRef},factory:({errorApi:I})=>o.WebStorage.create({errorApi:I})}),(0,u.createApiFactory)({api:u.fetchApiRef,deps:{configApi:u.configApiRef,identityApi:u.identityApiRef,discoveryApi:u.discoveryApiRef},factory:({configApi:I,identityApi:k,discoveryApi:me})=>(0,o.createFetchApi)({middleware:[o.FetchMiddlewares.resolvePluginProtocol({discoveryApi:me}),o.FetchMiddlewares.injectIdentityAuth({identityApi:k,config:I})]})}),(0,u.createApiFactory)({api:u.oauthRequestApiRef,deps:{},factory:()=>new o.OAuthRequestManager}),(0,u.createApiFactory)({api:u.googleAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.GoogleAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.microsoftAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.MicrosoftAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.githubAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.GithubAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["read:user"],environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oktaAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.OktaAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.gitlabAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.GitlabAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.oneloginAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.OneLoginAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.bitbucketAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.BitbucketAuth.create({discoveryApi:I,oauthRequestApi:k,defaultScopes:["team"],environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:u.atlassianAuthApiRef,deps:{discoveryApi:u.discoveryApiRef,oauthRequestApi:u.oauthRequestApiRef,configApi:u.configApiRef},factory:({discoveryApi:I,oauthRequestApi:k,configApi:me})=>o.AtlassianAuth.create({discoveryApi:I,oauthRequestApi:k,environment:me.getOptionalString("auth.environment")})}),(0,u.createApiFactory)({api:m.RV,deps:{discovery:u.discoveryApiRef,identity:u.identityApiRef,config:u.configApiRef},factory:({config:I,discovery:k,identity:me})=>m.iM.create({config:I,discovery:k,identity:me})})];var h=e(77277),E=e(82339),S=e(62833);function b({children:I}){return(0,i.GV)()?t.createElement(t.Fragment,null,I):t.createElement(i.VA,null,I)}const L=()=>t.createElement(E.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}),$=({step:I,error:k})=>{let me="";return I==="load-config"?me=`The configuration failed to load, someone should have a look at this error: ${k.message}`:I==="load-chunk"&&(me=`Lazy loaded chunk failed to load, try to reload the page: ${k.message}`),t.createElement(b,null,t.createElement(E.ErrorPage,{status:"501",statusMessage:me}))},F=({error:I,resetError:k,plugin:me})=>t.createElement(E.ErrorPanel,{title:`Error in ${me==null?void 0:me.getId()}`,defaultExpanded:!0,error:I},t.createElement(h.Z,{variant:"outlined",onClick:k},"Retry")),D={Progress:E.Progress,Router:S.VK,NotFoundErrorPage:L,BootErrorPage:$,ErrorBoundaryFallback:F};var x=e(43642),O=e(80079),w=e(90941),K=e(32915),re=e(40562),ce=e(21853),Se=e(60744),De=e(66569),Fe=e(30254),He=e(13384),Ae=e(15933),Je=e(58838),tt=e(86737),Tt=e(4989),At=e(44407),Ie=e(18628),ht=e(84219),gt=e(98685),lt=e(39781);const _={brokenImage:O.Z,catalog:Ie.Z,scaffolder:K.Z,techdocs:re.Z,search:ce.Z,chat:Se.Z,dashboard:De.Z,docs:Fe.Z,email:He.Z,github:Je.Z,group:ht.Z,help:tt.Z,"kind:api":Ae.Z,"kind:component":At.Z,"kind:domain":x.Z,"kind:group":ht.Z,"kind:location":Tt.Z,"kind:system":w.Z,"kind:user":gt.Z,user:gt.Z,warning:lt.Z};var pe=e(73689),be=e(48032);const We={wave:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,wave2:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1764' height='479' x='-229' y='-6' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M0 400h1350C1321 336 525 33 179-2c-345-34-395 236-408 402H0z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1378 177v223H0V217s219 75 327 52C436 246 717-35 965 45s254 144 413 132z'/%3e%3cpath fill='url(%23paint2_linear)' d='M26 400l-78-16c-170 205-44-6-137-30l-4-1 4 1 137 30c37-45 89-110 159-201 399-514-45 238 1176-50 275-65 354-39 91 267H26z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='431' x2='397.3' y1='-599' y2='372.8' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='236.5' x2='446.6' y1='-586' y2='381.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='851.8' x2='640.4' y1='-867.2' y2='363.7' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`,round:`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='2269' height='1408' x='-610' y='-509' maskUnits='userSpaceOnUse'%3e%3ccircle cx='1212.8' cy='74.8' r='317.5' fill='url(%23paint0_linear)' transform='rotate(-52 1213 75)'/%3e%3ccircle cx='737.8' cy='445.8' r='317.5' fill='url(%23paint1_linear)' transform='rotate(-116 738 446)'/%3e%3ccircle cx='601.8' cy='52.8' r='418.6' fill='url(%23paint2_linear)' transform='rotate(-117 602 53)'/%3e%3ccircle cx='999.8' cy='364' r='389.1' fill='url(%23paint3_linear)' transform='rotate(31 1000 364)'/%3e%3cellipse cx='-109.2' cy='263.5' fill='url(%23paint4_linear)' rx='429.2' ry='465.8' transform='rotate(-85 -109 264)'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M0 0h1368v400H0z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='1301.2' x2='161.4' y1='-1879.7' y2='-969.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='826.2' x2='-313.6' y1='-1508.7' y2='-598.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='718.4' x2='-784.3' y1='-2524' y2='-1324.2' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='1108.2' x2='-288.6' y1='-2031.1' y2='-915.9' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear' x1='10.4' x2='-1626.5' y1='-2603.8' y2='-1399.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")`},et={darkGrey:["#171717","#383838"],marineBlue:["#006D8F","#0049A1"],veryBlue:["#0027AF","#270094"],rubyRed:["#98002B","#8D1134"],toastyOrange:["#BE2200","#A41D00"],purpleSky:["#8912CA","#3E00EA"],eveningSea:["#00FFF2","#035355"],teal:["#005B4B"],pinkSea:["#C8077A","#C2297D"],greens:["#4BB8A5","#187656"]};function at(I){var ft;const{colors:k,shape:me,options:Be}=I,mt=`linear-gradient(90deg, ${(k.length===1?[k[0],k[0]]:k).join(", ")})`,vt=`${me}, ${mt}`,Ot=(ft=Be==null?void 0:Be.fontColor)!=null?ft:"#FFFFFF";return{colors:k,shape:me,backgroundImage:vt,fontColor:Ot}}const yt={home:at({colors:et.teal,shape:We.wave}),documentation:at({colors:et.pinkSea,shape:We.wave2}),tool:at({colors:et.purpleSky,shape:We.round}),service:at({colors:et.marineBlue,shape:We.wave}),website:at({colors:et.veryBlue,shape:We.wave}),library:at({colors:et.rubyRed,shape:We.wave}),other:at({colors:et.darkGrey,shape:We.wave}),app:at({colors:et.toastyOrange,shape:We.wave}),apis:at({colors:et.teal,shape:We.wave2}),card:at({colors:et.greens,shape:We.wave})},ie=16,ae='"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif';function Ye(I){const{palette:k,htmlFontSize:me=ie,fontFamily:Be=ae,defaultPageTheme:qe,pageTheme:mt=yt}=I;if(!mt[qe])throw new Error(`${qe} is not defined in pageTheme.`);return{palette:k,props:{MuiGrid:{spacing:2},MuiSwitch:{color:"primary"}},typography:{htmlFontSize:me,fontFamily:Be,h6:{fontWeight:700,fontSize:20,marginBottom:2},h5:{fontWeight:700,fontSize:24,marginBottom:4},h4:{fontWeight:700,fontSize:28,marginBottom:6},h3:{fontSize:32,fontWeight:700,marginBottom:6},h2:{fontSize:40,fontWeight:700,marginBottom:8},h1:{fontSize:54,fontWeight:700,marginBottom:10}},page:mt[qe],getPageTheme:({themeId:vt})=>{var Ot;return(Ot=mt[vt])!=null?Ot:mt[qe]}}}function Ge(I){return{MuiCssBaseline:{"@global":{html:{height:"100%",fontFamily:I.typography.fontFamily},body:{height:"100%",fontFamily:I.typography.fontFamily,"overscroll-behavior-y":"none"},a:{color:"inherit",textDecoration:"none"}}},MuiTableRow:{root:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.default}},hover:{"&:hover":{cursor:"pointer"}},head:{"&:nth-of-type(odd)":{backgroundColor:I.palette.background.paper}}},MuiTableCell:{root:{wordBreak:"break-word",overflow:"hidden",verticalAlign:"middle",lineHeight:"1",margin:0,padding:I.spacing(3,2,3,2.5),borderBottom:0},sizeSmall:{padding:I.spacing(1.5,2,1.5,2.5)},head:{wordBreak:"break-word",overflow:"hidden",color:"rgb(179, 179, 179)",fontWeight:"normal",lineHeight:"1"}},MuiTabs:{root:{minHeight:24}},MuiTab:{root:{color:I.palette.link,minHeight:24,textTransform:"initial",letterSpacing:"0.07em","&:hover":{color:(0,be.darken)(I.palette.link,.3),background:(0,be.lighten)(I.palette.link,.95)},[I.breakpoints.up("md")]:{minWidth:120,fontSize:I.typography.pxToRem(14),fontWeight:500}},textColorPrimary:{color:I.palette.link}},MuiTableSortLabel:{root:{color:"inherit","&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},active:{fontWeight:"bold",color:"inherit"}},MuiListItemText:{dense:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},MuiButton:{text:{padding:void 0}},MuiChip:{root:{backgroundColor:"#D9D9D9",marginRight:I.spacing(1),marginBottom:I.spacing(1),color:I.palette.grey[900]},outlined:{color:I.palette.text.primary},label:{lineHeight:`${I.spacing(2.5)}px`,fontWeight:I.typography.fontWeightMedium,fontSize:`${I.spacing(1.75)}px`},labelSmall:{fontSize:`${I.spacing(1.5)}px`},deleteIcon:{color:I.palette.grey[500],width:`${I.spacing(3)}px`,height:`${I.spacing(3)}px`,margin:`0 ${I.spacing(.75)}px 0 -${I.spacing(.75)}px`},deleteIconSmall:{width:`${I.spacing(2)}px`,height:`${I.spacing(2)}px`,margin:`0 ${I.spacing(.5)}px 0 -${I.spacing(.5)}px`}},MuiCard:{root:{display:"flex",flexDirection:"column"}},MuiCardHeader:{root:{paddingBottom:0}},MuiCardContent:{root:{flexGrow:1,"&:last-child":{paddingBottom:void 0}}},MuiCardActions:{root:{justifyContent:"flex-end"}}}}function we(I){const k=Ye(I),me=(0,pe.Z)(k),Be=Ge(me);return{...me,overrides:Be}}var nt=e(34505);const J=we({palette:{type:"light",background:{default:"#F8F8F8"},status:{ok:"#1DB954",warning:"#FF9800",error:"#E22134",running:"#2E77D0",pending:"#FFED51",aborted:"#757575"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#2E77D0"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#000000",textVerySubtle:"#DDD",textSubtle:"#6E6E6E",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#2196F3",link:"#0A6EBE",gold:nt.Z.A700,navigation:{background:"#171717",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#181818",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:yt}),z=we({palette:{type:"dark",background:{default:"#333333"},status:{ok:"#71CF88",warning:"#FFB84D",error:"#F84C55",running:"#3488E3",pending:"#FEF071",aborted:"#9E9E9E"},bursts:{fontColor:"#FEFEFE",slackChannelText:"#ddd",backgroundColor:{default:"#7C3699"},gradient:{linear:"linear-gradient(-137deg, #4BB8A5 0%, #187656 100%)"}},primary:{main:"#9CC9FF",dark:"#82BAFD"},secondary:{main:"#FF88B2"},banner:{info:"#2E77D0",error:"#E22134",text:"#FFFFFF",link:"#000000",warning:"#FF9800"},border:"#E6E6E6",textContrast:"#FFFFFF",textVerySubtle:"#727272",textSubtle:"#CCCCCC",highlight:"#FFFBCC",errorBackground:"#FFEBEE",warningBackground:"#F59B23",infoBackground:"#ebf5ff",errorText:"#CA001B",infoText:"#004e8a",warningText:"#000000",linkHover:"#82BAFD",link:"#9CC9FF",gold:nt.Z.A700,navigation:{background:"#424242",indicator:"#9BF0E1",color:"#b5b5b5",selectedColor:"#FFF",navItem:{hoverBackground:"#404040"},submenu:{background:"#404040"}},pinSidebarButton:{icon:"#404040",background:"#BDBDBD"},tabbar:{indicator:"#9BF0E1"}},defaultPageTheme:"home",pageTheme:yt});var q=e(98192),ue=e(15222),fe=e(41547),Pe=e(87561);const Oe=[{id:"light",title:"Light Theme",variant:"light",icon:t.createElement(ue.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:J},t.createElement(Pe.ZP,null,I))},{id:"dark",title:"Dark Theme",variant:"dark",icon:t.createElement(q.Z,null),Provider:({children:I})=>t.createElement(fe.Z,{theme:z},t.createElement(Pe.ZP,null,I))}];function Ce(I){var k,me,Be;return(0,o.createSpecializedApp)({...I,apis:(k=I==null?void 0:I.apis)!=null?k:[],bindRoutes:I==null?void 0:I.bindRoutes,components:{...D,...I==null?void 0:I.components},configLoader:I==null?void 0:I.configLoader,defaultApis:y,icons:{..._,...I==null?void 0:I.icons},plugins:(me=I==null?void 0:I.plugins)!=null?me:[],themes:(Be=I==null?void 0:I.themes)!=null?Be:Oe})}var Qe=e(82394),Ke=e.n(Qe),pt=e(48023),St=e(76635);async function ut({storageApi:I}){var mt;const k=I.forBucket("settings"),me=I.forBucket("starredEntities"),Be=k.snapshot("starredEntities").value;if(!(0,St.isArray)(Be))return;const qe=new Set((mt=me.snapshot("entityRefs").value)!=null?mt:[]);Be.filter(St.isString).map(vt=>vt.split(":")).filter(vt=>vt.length===4&&vt[0]==="entity").map(([vt,Ot,ft,A])=>(0,pt.eE)({kind:Ot,namespace:ft,name:A})).forEach(vt=>qe.add(vt)),await me.set("entityRefs",Array.from(qe)),await k.remove("starredEntities")}class xt{constructor(k){X(this,"settingsStore");X(this,"starredEntities");X(this,"subscribers",new Set);X(this,"observable",new(Ke())(k=>(k.next(new Set(this.starredEntities)),this.subscribers.add(k),()=>{this.subscribers.delete(k)})));var me;ut(k).then(),this.settingsStore=k.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(k){this.starredEntities.has(k)?this.starredEntities.delete(k):this.starredEntities.add(k),await this.settingsStore.set("entityRefs",Array.from(this.starredEntities))}starredEntitie$(){return this.observable}notifyChanges(){for(const k of this.subscribers)k.next(new Set(this.starredEntities))}}var Lt=e(39398),bt=e(49782),Pt=e(79692),Wt=e(74450);const Ht=(0,Pt.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",wordBreak:"break-all",marginBottom:"1rem"}});function dn(I){var mt,vt;const k=I.result,me=Ht(),Be=useAnalytics(),qe=()=>{Be.captureEvent("discover",k.title,{attributes:{to:k.location},value:I.rank})};return React.createElement(Link,{noTrack:!0,to:k.location,onClick:qe},React.createElement(ListItem,{alignItems:"flex-start"},I.icon&&React.createElement(ListItemIcon,null,I.icon),React.createElement("div",{className:me.flexContainer},React.createElement(ListItemText,{className:me.itemText,primaryTypographyProps:{variant:"h6"},primary:(mt=I.highlight)!=null&&mt.fields.title?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.title,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.title,secondary:(vt=I.highlight)!=null&&vt.fields.text?React.createElement(HighlightedSearchResultText,{text:I.highlight.fields.text,preTag:I.highlight.preTag,postTag:I.highlight.postTag}):k.text}),React.createElement(Box,null,k.kind&&React.createElement(Chip,{label:`Kind: ${k.kind}`,size:"small"}),k.lifecycle&&React.createElement(Chip,{label:`Lifecycle: ${k.lifecycle}`,size:"small"})))),React.createElement(Divider,{component:"li"}))}var In=e(30097),Yt=e(17429),Nt=e(95544),Xe=e(99688),de=e(12231),j=e(86136),ye=e(49378),je=e(85256),_e=e(61837),st=e(79784),Rt=e(50758),qt=e(31654),en=e(43054),tn=e(40749);const gn="catalog-entity",U=(0,tn.J$)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:gn}),oe=(0,tn.J$)({name:"catalog.entity.create",attributes:{action:"create"}}),te=(0,tn.J$)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:gn}),Ee=(0,tn.J$)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:gn}),$e=(0,tn.J$)({name:"catalog.location.read",attributes:{action:"read"}}),dt=(0,tn.J$)({name:"catalog.location.create",attributes:{action:"create"}}),Ne=(0,tn.J$)({name:"catalog.location.delete",attributes:{action:"delete"}}),Vt=[U,oe,te,Ee,$e,dt,Ne];var Jt=e(49166);function Zt(I){var ft;const{unregisterEntityOptions:k,isUnregisterAllowed:me,onUnregisterEntity:Be,onClose:qe}=I,mt=typeof(k==null?void 0:k.disableUnregister)=="boolean",vt=(ft=!me||(mt?!!(k!=null&&k.disableUnregister):(k==null?void 0:k.disableUnregister)==="disable"))!=null?ft:!1;let Ot=t.createElement(t.Fragment,null);return(k==null?void 0:k.disableUnregister)!=="hidden"&&(Ot=t.createElement(de.Z,{onClick:()=>{qe(),Be()},disabled:vt},t.createElement(j.Z,null,t.createElement(Jt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Unregister entity"}))),t.createElement(t.Fragment,null,Ot)}const Dt=(0,Pt.Z)(I=>({button:{color:I.page.fontColor}}),{name:"PluginCatalogEntityContextMenu"});function it(I){const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:Be,onInspectEntity:qe}=I,[mt,vt]=(0,t.useState)(),Ot=Dt(),A=(0,Yt.useEntityPermission)(te).allowed,C=Y=>{vt(Y.currentTarget)},N=()=>{vt(void 0)},W=k&&[...k.map(Y=>t.createElement(de.Z,{key:Y.title,onClick:()=>{N(),Y.onClick()}},t.createElement(j.Z,null,t.createElement(Y.Icon,{fontSize:"small"})),t.createElement(ye.Z,{primary:Y.title}))),t.createElement(je.Z,{key:"the divider is here!"})];return t.createElement(t.Fragment,null,t.createElement(_e.Z,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true","aria-expanded":!!mt,role:"button",onClick:C,"data-testid":"menu-button",className:Ot.button,id:"long-menu"},t.createElement(en.Z,null)),t.createElement(st.ZP,{open:Boolean(mt),onClose:N,anchorEl:mt,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},"aria-labelledby":"long-menu"},t.createElement(Rt.Z,null,W,t.createElement(Zt,{unregisterEntityOptions:me,isUnregisterAllowed:A,onUnregisterEntity:Be,onClose:N}),t.createElement(de.Z,{onClick:()=>{N(),qe()}},t.createElement(j.Z,null,t.createElement(qt.Z,{fontSize:"small"})),t.createElement(ye.Z,{primary:"Inspect entity"})))))}const $t="plugin.catalog.entityLayoutRoute",nn=()=>null;(0,u.attachComponentData)(nn,$t,!0),(0,u.attachComponentData)(nn,"core.gatherMountPoints",!0);function Gt(I){const{entity:k,title:me}=I;return t.createElement(Nt.Z,{display:"inline-flex",alignItems:"center",height:"1em",maxWidth:"100%"},t.createElement(Nt.Z,{component:"span",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},me),k&&t.createElement(Yt.FavoriteEntity,{entity:k}))}function Kt(I,k,me,Be){var Ot,ft,A,C,N;const qe=(Ot=I!=null?I:Be==null?void 0:Be.kind)!=null?Ot:"",mt=(ft=k!=null?k:Be==null?void 0:Be.metadata.namespace)!=null?ft:"";return{headerTitle:`${(N=(C=(A=Be==null?void 0:Be.metadata.title)!=null?A:me)!=null?C:Be==null?void 0:Be.metadata.name)!=null?N:""}${mt&&mt!==pt.zG?` in ${mt}`:""}`,headerType:(()=>{let W=qe.toLocaleLowerCase("en-US");return Be&&Be.spec&&"type"in Be.spec&&(W+=" \u2014 ",W+=Be.spec.type.toLocaleLowerCase("en-US")),W})()}}function mn(I){var Be;const{entity:k}=I,me=(0,Yt.getEntityRelations)(k,pt.S4);return t.createElement(t.Fragment,null,me.length>0&&t.createElement(E.HeaderLabel,{label:"Owner",value:t.createElement(Yt.EntityRefLinks,{entityRefs:me,defaultKind:"Group",color:"inherit"})}),((Be=k.spec)==null?void 0:Be.lifecycle)&&t.createElement(E.HeaderLabel,{label:"Lifecycle",value:k.spec.lifecycle}))}const Mn=I=>{var ke,It,rt;const{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:me,children:Be,NotFoundComponent:qe}=I,{kind:mt,namespace:vt,name:Ot}=(0,u.useRouteRefParams)(Yt.entityRouteRef),{entity:ft,loading:A,error:C}=(0,Yt.useAsyncEntity)(),N=(0,i.TH)(),W=(0,u.useElementFilter)(Be,Ve=>Ve.selectByComponentData({key:$t,withStrictError:"Child of EntityLayout must be an EntityLayout.Route"}).getElements().flatMap(({props:Ft})=>{if(ft){if(Ft.if&&!Ft.if(ft))return[]}else return[];return[{path:Ft.path,title:Ft.title,children:Ft.children,tabProps:Ft.tabProps}]}),[ft]),{headerTitle:Y,headerType:Q}=Kt(mt,vt,Ot,ft),[ge,Re]=(0,t.useState)(!1),[Ue,xe]=(0,t.useState)(!1),Ze=(0,i.s0)(),ze=async()=>{Re(!1),xe(!1),Ze("/")};return(0,t.useEffect)(()=>{Re(!1),xe(!1)},[N.pathname]),t.createElement(E.Page,{themeId:(rt=(It=(ke=ft==null?void 0:ft.spec)==null?void 0:ke.type)==null?void 0:It.toString())!=null?rt:"home"},t.createElement(E.Header,{title:t.createElement(Gt,{title:Y,entity:ft}),pageTitleOverride:Y,type:Q},ft&&t.createElement(t.Fragment,null,t.createElement(mn,{entity:ft}),t.createElement(it,{UNSTABLE_extraContextMenuItems:k,UNSTABLE_contextMenuOptions:me,onUnregisterEntity:()=>Re(!0),onInspectEntity:()=>xe(!0)}))),A&&t.createElement(E.Progress,null),ft&&t.createElement(E.RoutedTabs,{routes:W}),C&&t.createElement(E.Content,null,t.createElement(Xe.Z,{severity:"error"},C.toString())),!A&&!C&&!ft&&t.createElement(E.Content,null,qe||t.createElement(E.WarningPanel,{title:"Entity not found"},"There is no ",mt," with the requested"," ",t.createElement(E.Link,{to:"https://backstage.io/docs/features/software-catalog/references"},"kind, namespace, and name"),".")),t.createElement(Yt.UnregisterEntityDialog,{open:ge,entity:ft,onConfirm:ze,onClose:()=>Re(!1)}),t.createElement(Yt.InspectEntityDialog,{open:Ue,entity:ft,onClose:()=>xe(!1)}))};Mn.Route=nn;var Qt=e(10179);function Bt(I){const{open:k,onClose:me,onConfirm:Be,entity:qe}=I,[mt,vt]=useState(!1),Ot=useApi(catalogApiRef),ft=useApi(alertApiRef),A=async()=>{vt(!0);try{const C=qe.metadata.uid;await Ot.removeEntityByUid(C),Be()}catch(C){assertError(C),ft.post({message:C.message})}finally{vt(!1)}};return React.createElement(Dialog,{open:k,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:mt,onClick:A},"Delete"),React.createElement(Button,{onClick:me,color:"primary"},"Cancel")))}var Xt=e(47851);function Rn(I){var k,me;return((me=(k=I==null?void 0:I.metadata)==null?void 0:k.annotations)==null?void 0:me["backstage.io/orphan"])==="true"}function ln(){const I=useNavigate(),k=useRouteRef(rootRouteRef),[me,Be]=useState(!1),{entity:qe}=useEntity(),mt=async()=>{Be(!1),I(k())};return React.createElement(React.Fragment,null,React.createElement(Alert,{severity:"warning",onClick:()=>Be(!0)},"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."),React.createElement(DeleteEntityDialog,{open:me,entity:qe,onConfirm:mt,onClose:()=>Be(!1)}))}var vn=e(30001);const Ln=I=>I.error&&I.level==="error"&&I.type===ENTITY_STATUS_CATALOG_PROCESSING_TYPE;async function M(I,k){return{items:(await k.getEntityAncestors({entityRef:I})).items.map(qe=>{var Ot,ft;return{errors:((ft=(Ot=qe.entity.status)==null?void 0:Ot.items)!=null?ft:[]).filter(Ln).map(A=>A.error).filter(A=>Boolean(A)),entity:qe.entity}}).filter(qe=>qe.errors.length>0)}}async function g(I,k){const me=k.apis.get(catalogApiRef);if(!me)throw new Error(`No implementation available for ${catalogApiRef}`);return(await M(stringifyEntityRef(I),me)).items.length>0}function T(){const{entity:I}=useEntity(),k=stringifyEntityRef(I),me=useApi(catalogApiRef),{loading:Be,error:qe,value:mt}=useAsync(async()=>M(k,me),[k,me]);return qe?React.createElement(Box,{mb:1},React.createElement(ResponseErrorPanel,{error:qe})):Be||!mt?null:React.createElement(React.Fragment,null,mt.items.map((vt,Ot)=>React.createElement(Box,{key:Ot,mb:1},stringifyEntityRef(I)!==stringifyEntityRef(vt.entity)&&React.createElement(Box,{p:1},"The error below originates from"," ",React.createElement(EntityRefLink,{entityRef:vt.entity})),vt.errors.map((ft,A)=>React.createElement(ResponseErrorPanel,{key:A,error:ft})))))}var B=e(64279);const V="core.backstage.entitySwitch",se=I=>null;(0,u.attachComponentData)(se,V,!0);const he=I=>{var vt,Ot;const{entity:k,loading:me}=(0,Yt.useAsyncEntity)(),Be=(0,u.useApiHolder)(),qe=(0,u.useElementFilter)(I.children,ft=>ft.selectByComponentData({key:V,withStrictError:"Child of EntitySwitch is not an EntitySwitch.Case"}).getElements().flatMap(A=>{var W;if(me)return[];const{if:C,children:N}=A.props;return k?[{if:(W=C==null?void 0:C(k,{apis:Be}))!=null?W:!0,children:N}]:[{if:C===void 0,children:N}]}),[Be,k,me]);return qe.some(ft=>typeof ft.if=="object"&&"then"in ft.if)?t.createElement(Le,{results:qe}):(Ot=(vt=qe.find(ft=>ft.if))==null?void 0:vt.children)!=null?Ot:null};function Le({results:I}){const{loading:k,value:me}=(0,B.default)(async()=>{var qe;const Be=I.map(async({if:mt,children:vt})=>{try{if(await mt)return vt}catch{}return null});return(qe=(await Promise.all(Be)).find(Boolean))!=null?qe:null},[I]);return k||!me?null:me}he.Case=se;const Et=null,zt=Yt.CatalogFilterLayout.Filters,An=Yt.CatalogFilterLayout.Content,an=(0,u.createPlugin)({id:"catalog",apis:[(0,u.createApiFactory)({api:Yt.catalogApiRef,deps:{discoveryApi:u.discoveryApiRef,fetchApi:u.fetchApiRef},factory:({discoveryApi:I,fetchApi:k})=>new vn.MS({discoveryApi:I,fetchApi:k})}),(0,u.createApiFactory)({api:Yt.starredEntitiesApiRef,deps:{storageApi:u.storageApiRef},factory:({storageApi:I})=>new xt({storageApi:I})})],routes:{catalogIndex:Xt._Z,catalogEntity:Yt.entityRouteRef},externalRoutes:{createComponent:Xt.yw,viewTechDoc:Xt.jU},__experimentalConfigure(I){return{...{createButtonTitle:"Create"},...I}}}),or=an.provide((0,u.createRoutableExtension)({name:"CatalogIndexPage",component:()=>e.e(5162).then(e.bind(e,74036)).then(I=>I.CatalogPage),mountPoint:Xt._Z})),sr=an.provide((0,u.createRoutableExtension)({name:"CatalogEntityPage",component:()=>e.e(6583).then(e.bind(e,96583)).then(I=>I.CatalogEntityPage),mountPoint:Yt.entityRouteRef})),Pr=an.provide((0,u.createComponentExtension)({name:"EntityAboutCard",component:{lazy:()=>Promise.resolve().then(e.bind(e,39398)).then(I=>I.AboutCard)}})),Kr=an.provide((0,u.createComponentExtension)({name:"EntityLinksCard",component:{lazy:()=>e.e(3555).then(e.bind(e,73555)).then(I=>I.EntityLinksCard)}})),cr=an.provide((0,u.createComponentExtension)({name:"EntityHasSystemsCard",component:{lazy:()=>e.e(390).then(e.bind(e,60390)).then(I=>I.HasSystemsCard)}})),jn=an.provide((0,u.createComponentExtension)({name:"EntityHasComponentsCard",component:{lazy:()=>e.e(4022).then(e.bind(e,4022)).then(I=>I.HasComponentsCard)}})),wn=an.provide((0,u.createComponentExtension)({name:"EntityHasSubcomponentsCard",component:{lazy:()=>e.e(8792).then(e.bind(e,38792)).then(I=>I.HasSubcomponentsCard)}})),qn=an.provide((0,u.createComponentExtension)({name:"EntityHasResourcesCard",component:{lazy:()=>e.e(1553).then(e.bind(e,11553)).then(I=>I.HasResourcesCard)}})),ur=an.provide((0,u.createComponentExtension)({name:"EntityDependsOnComponentsCard",component:{lazy:()=>e.e(8061).then(e.bind(e,48061)).then(I=>I.DependsOnComponentsCard)}})),Ir=an.provide((0,u.createComponentExtension)({name:"EntityDependencyOfComponentsCard",component:{lazy:()=>e.e(6235).then(e.bind(e,56235)).then(I=>I.DependencyOfComponentsCard)}})),ia=an.provide((0,u.createComponentExtension)({name:"EntityDependsOnResourcesCard",component:{lazy:()=>e.e(9028).then(e.bind(e,59028)).then(I=>I.DependsOnResourcesCard)}})),dr=an.provide((0,u.createComponentExtension)({name:"RelatedEntitiesCard",component:{lazy:()=>e.e(2426).then(e.bind(e,62426)).then(I=>I.RelatedEntitiesCard)}}));var fr=e(36356);class Lr{constructor({configApi:k,discoveryApi:me,identityApi:Be}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=k,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(k,me){const qe=`${await this.getApiOrigin()}/${me}`,mt=await fetch(`${qe.endsWith("/")?qe:`${qe}/`}index.html`);if(mt.status===404)throw new Error("Page not found");return mt.text()}async syncEntityDocs(k){return"cached"}async getBaseUrl(k,me,Be){const qe=await this.getApiOrigin();return new URL(k,`${qe}/${Be}`).toString()}}class ir{constructor({configApi:k,discoveryApi:me,identityApi:Be}){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");this.configApi=k,this.discoveryApi=me,this.identityApi=Be}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getEntityMetadata(k){return{apiVersion:"backstage.io/v1alpha1",kind:"Component",metadata:{name:"local"},spec:{owner:"test",lifecycle:"experimental"}}}async getTechDocsMetadata(k){return{site_name:"Live preview environment",site_description:""}}}const $n=[(0,u.createApiFactory)({api:f.Dl,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:me})=>new Lr({configApi:I,discoveryApi:k,identityApi:me})}),(0,u.createApiFactory)({api:f.gT,deps:{configApi:u.configApiRef,discoveryApi:u.discoveryApiRef,identityApi:u.identityApiRef},factory:({configApi:I,discoveryApi:k,identityApi:me})=>new ir({configApi:I,discoveryApi:k,identityApi:me})}),(0,u.createApiFactory)({api:fr.q3,deps:{configApi:u.configApiRef},factory:({configApi:I})=>fr.ae.fromConfig(I)})],_n={backend:{baseUrl:"http://localhost:3000"},techdocs:{builder:"external"}},er={backend:{baseUrl:"http://localhost:7007"},techdocs:{builder:"external"}};async function kr(){const I=await fetch("/.detect");return I.ok?(await I.text()).trim()==="techdocs-cli-server":!1}async function mr(){const I=await(0,o.defaultConfigLoader)(),k=await kr();return[...I,{context:"detected",data:k?_n:er}]}var hr=e(86689),Yr=e(58845);const Or=(0,Pt.Z)({svg:{width:"auto",height:30},path:{fill:"#7df3e1"}});var xr=()=>{const I=Or();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2079.95 456.05"},t.createElement("path",{className:I.path,d:"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z"}))};const Dr=(0,Pt.Z)({svg:{width:"auto",height:28},path:{fill:"#7df3e1"}});var Br=()=>{const I=Dr();return t.createElement("svg",{className:I.svg,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 337.46 428.5"},t.createElement("path",{className:I.path,d:"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z"}))};const Mr=(0,Pt.Z)({root:{width:E.sidebarConfig.drawerWidthClosed,height:3*E.sidebarConfig.logoHeight,display:"flex",flexFlow:"row nowrap",alignItems:"center",marginBottom:-14},link:{width:E.sidebarConfig.drawerWidthClosed,marginLeft:24}}),wr=()=>{const I=Mr(),{isOpen:k}=(0,E.useSidebarOpenState)();return t.createElement("div",{className:I.root},t.createElement(hr.Z,{component:S.OL,to:"/docs/default/component/local/",underline:"none",className:I.link},k?t.createElement(xr,null):t.createElement(Br,null)))},pr=({children:I})=>t.createElement(E.SidebarPage,null,t.createElement(E.Sidebar,null,t.createElement(wr,null),t.createElement(E.SidebarDivider,null),t.createElement(E.SidebarItem,{icon:Yr.Z,to:"/docs/default/component/local",text:"Docs Preview"})),I);var $r=e(80030),yr=e(32388),hn=e(4142);const On=(0,Pt.Z)(I=>({headerIcon:{color:I.palette.common.white,width:"32px",height:"32px"},content:{backgroundColor:I.palette.background.default},contentToolbar:{display:"flex",justifyContent:"flex-end",padding:0}}));var pn;(function(I){const k="light";I.LIGHT=k;const me="dark";I.DARK=me})(pn||(pn={}));const Kn=()=>{const I=(0,u.useApi)(u.appThemeApiRef),k=On(),[me,Be]=(0,t.useState)(I.getActiveThemeId()||pn.LIGHT),qe={[pn.LIGHT]:{icon:hn.Z,title:"Dark theme"},[pn.DARK]:{icon:yr.Z,title:"Light theme"}},{title:mt,icon:vt}=qe[me],Ot=()=>{Be(ft=>{const A=ft===pn.LIGHT?pn.DARK:pn.LIGHT;return I.setActiveThemeId(A),A})};return t.createElement(Nt.Z,{display:"flex",alignItems:"center",mr:2},t.createElement($r.ZP,{title:mt,arrow:!0},t.createElement(_e.Z,{size:"small",onClick:Ot},t.createElement(vt,{className:k.headerIcon}))))},Ur=()=>t.createElement(R.TechDocsReaderPage,null,t.createElement(R.TechDocsReaderPageHeader,null),t.createElement(R.TechDocsReaderPageContent,{withSearch:!1})),Nr=t.createElement(Ur,null),Er=Ce({apis:$n,configLoader:mr,plugins:Object.values(r)}),vr=Er.getProvider(),Zr=Er.getRouter(),Ar=R.techdocsPlugin.provide((0,f.KY)({name:"ThemeToggleAddon",component:Kn,location:f.oZ.Header})),tr=t.createElement(o.FlatRoutes,null,t.createElement(i.Fg,{key:"/",to:"/docs/default/component/local/"}),t.createElement(i.AW,{path:"/catalog/:namespace/:kind/:name",element:t.createElement(sr,null)}),t.createElement(i.AW,{path:"/docs",element:t.createElement(R.TechDocsIndexPage,null)},t.createElement(R.DefaultTechDocsHome,null)),t.createElement(i.AW,{path:"/docs/:namespace/:kind/:name/*",element:t.createElement(R.TechDocsReaderPage,null)},Nr,t.createElement(f.DR,null,t.createElement(Ar,null))));var zr=()=>t.createElement(vr,null,t.createElement(Zr,null,t.createElement(pr,null,tr)));c.render(t.createElement(zr,null),document.getElementById("root"))},76241:function(ne,s,e){"use strict";e.d(s,{CT:function(){return f},EI:function(){return m},uW:function(){return i},Vt:function(){return o}});function r(){return typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")()}const t=r(),c=y=>`__@backstage/${y}__`;function i(y,h){const E=c(y);let S=t[E];return S||(S=h(),t[E]=S,S)}var R=e(2784);function f(y){return i(y,()=>(0,R.createContext)(void 0))}function o(y){return(0,R.useContext)(f(y))}function u(y){return{set(h){globalThis[`__@backstage/${y}__`]=createContext(createVersionedValueMap(h))},reset(){delete globalThis[`__@backstage/${y}__`]}}}function m(y){return Object.freeze(y),{atVersion(h){return y[h]}}}},17429:function(ne,s,e){"use strict";e.d(s,{AsyncEntityProvider:function(){return w},CATALOG_FILTER_EXISTS:function(){return r.n3},CatalogFilterLayout:function(){return D},EntityKindFilter:function(){return q},EntityLifecyclePicker:function(){return gn},EntityListProvider:function(){return pe},EntityOwnerPicker:function(){return Ee},EntityProcessingStatusPicker:function(){return Ot},EntityRefLink:function(){return J},EntityRefLinks:function(){return z},EntityTable:function(){return Dt},EntityTagPicker:function(){return Gt},EntityTypePicker:function(){return Mn},FavoriteEntity:function(){return vn},InspectEntityDialog:function(){return Ur},UnregisterEntityDialog:function(){return tr},UserListPicker:function(){return Be},catalogApiRef:function(){return c},entityRouteRef:function(){return ae},getEntityRelations:function(){return ht},getEntitySourceLocation:function(){return gt},humanizeEntityRef:function(){return Ge},starredEntitiesApiRef:function(){return i},useAsyncEntity:function(){return ce},useEntity:function(){return re},useEntityList:function(){return be},useEntityOwnership:function(){return dn},useEntityPermission:function(){return Yt},useRelatedEntities:function(){return xt},useStarredEntities:function(){return Pt}});var r=e(30001),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.catalog.service"}),i=(0,t.createApiRef)({id:"catalog-react.starred-entities"});var R=e(82394);class f{constructor(){X(this,"starredEntities",new Set);X(this,"subscribers",new Set);X(this,"observable",new ObservableImpl(C=>(C.next(new Set(this.starredEntities)),this.subscribers.add(C),()=>{this.subscribers.delete(C)})))}async toggleStarred(C){this.starredEntities.delete(C)||this.starredEntities.add(C);for(const N of this.subscribers)N.next(new Set(this.starredEntities))}starredEntitie$(){return this.observable}}var o=e(2784),u=e(41156),m=e(60364),y=e(77277),h=e(4190),E=e(95544),S=e(90436),b=e(60905),L=e(36444);const $=A=>{const C=(0,u.Z)(Q=>Q.breakpoints.down("md")),N=(0,m.Z)(),[W,Y]=(0,o.useState)(!1);return C?o.createElement(o.Fragment,null,o.createElement(y.Z,{style:{marginTop:N.spacing(1),marginLeft:N.spacing(1)},onClick:()=>Y(!0),startIcon:o.createElement(L.Z,null)},"Filters"),o.createElement(h.ZP,{open:W,onClose:()=>Y(!1),anchor:"left",disableAutoFocus:!0,keepMounted:!0,variant:"temporary"},o.createElement(E.Z,{m:2},o.createElement(S.Z,{variant:"h6",component:"h2",style:{marginBottom:N.spacing(1)}},"Filters"),A.children))):o.createElement(b.Z,{item:!0,lg:2},A.children)},F=A=>o.createElement(b.Z,{item:!0,xs:12,lg:10},A.children),D=A=>o.createElement(b.Z,{container:!0,style:{position:"relative"}},A.children);D.Filters=$,D.Content=F;var x=e(76241);const O=(0,x.CT)("entity-context"),w=({children:A,entity:C,loading:N,error:W,refresh:Y})=>{const Q={entity:C,loading:N,error:W,refresh:Y};return o.createElement(O.Provider,{value:(0,x.EI)({1:Q})},A)},K=A=>React.createElement(w,{entity:A.entity,loading:!Boolean(A.entity),error:void 0,refresh:void 0,children:A.children});function re(){const A=(0,x.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const C=A.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");if(!C.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:C.entity}}function ce(){const A=(0,x.Vt)("entity-context");if(!A)throw new Error("Entity context is not available");const C=A.atVersion(1);if(!C)throw new Error("EntityContext v1 not available");const{entity:N,loading:W,error:Y,refresh:Q}=C;return{entity:N,loading:W,error:Y,refresh:Q}}var Se=e(76635),De=e(19126),Fe=e.n(De),He=e(10289),Ae=e(69294),Je=e(48760),tt=e(90736);function Tt(A){return A.reduce((C,N)=>({...C,...N.getCatalogFilters?N.getCatalogFilters():{}}),{})}function At(A){return C=>A.every(N=>!N.filterEntity||N.filterEntity(C))}var Ie=e(48023);function ht(A,C,N){var Y;let W=((Y=A==null?void 0:A.relations)==null?void 0:Y.filter(Q=>Q.type===C).map(Q=>(0,Ie.of)(Q.targetRef)))||[];return N!=null&&N.kind&&(W=W.filter(Q=>Q.kind.toLocaleLowerCase("en-US")===N.kind.toLocaleLowerCase("en-US"))),W}function gt(A,C){var W;const N=(W=A.metadata.annotations)==null?void 0:W[Ie.M6];if(!!N)try{const Y=(0,Ie.Ou)(N),Q=C.byUrl(Y.target);return{locationTargetUrl:Y.target,integrationType:Q==null?void 0:Q.type}}catch{return}}function lt(A,C){const N=new Set([...getEntityRelations(A,RELATION_MEMBER_OF,{kind:"group"}),...A?[getCompoundEntityRef(A)]:[]].map(stringifyEntityRef)),W=getEntityRelations(C,RELATION_OWNED_BY).map(stringifyEntityRef);for(const Y of W)if(N.has(Y))return!0;return!1}const _=(0,o.createContext)(void 0),pe=({children:A})=>{const C=(0,tt.default)(),N=(0,t.useApi)(c),[W,Y]=(0,o.useState)({}),Q=(0,He.TH)(),ge=(0,o.useMemo)(()=>{var rt;return(rt=Fe().parse(Q.search,{ignoreQueryPrefix:!0}).filters)!=null?rt:{}},[Q]),[Re,Ue]=(0,o.useState)(()=>({appliedFilters:{},entities:[],backendEntities:[]})),[{loading:xe,error:Ze},ze]=(0,Ae.default)(async()=>{var xn;const rt=(0,Se.compact)(Object.values(W)),Ve=At(rt),Ft=Tt(rt),fn=Tt((0,Se.compact)(Object.values(Re.appliedFilters))),kn=Object.keys(W).reduce((yn,Sn)=>{const Un=W[Sn];return Un!=null&&Un.toQueryValue&&(yn[Sn]=Un.toQueryValue()),yn},{});if((0,Se.isEqual)(fn,Ft))Ue({appliedFilters:W,backendEntities:Re.backendEntities,entities:Re.backendEntities.filter(Ve)});else{const yn=await N.getEntities({filter:Ft});Ue({appliedFilters:W,backendEntities:yn.items,entities:yn.items.filter(Ve)})}if(C()){const yn=Fe().parse(Q.search,{ignoreQueryPrefix:!0}),Sn=Fe().stringify({...yn,filters:kn},{addQueryPrefix:!0,arrayFormat:"repeat"}),Un=`${window.location.pathname}${Sn}`;(xn=window.history)==null||xn.replaceState(null,document.title,Un)}},[N,ge,W,Re],{loading:!0});(0,Je.Z)(ze,10,[W]);const ke=(0,o.useCallback)(rt=>{Y(Ve=>{const Ft=typeof rt=="function"?rt(Ve):rt;return{...Ve,...Ft}})},[]),It=(0,o.useMemo)(()=>({filters:Re.appliedFilters,entities:Re.entities,backendEntities:Re.backendEntities,updateFilters:ke,queryParameters:ge,loading:xe,error:Ze}),[Re,ke,ge,xe,Ze]);return o.createElement(_.Provider,{value:It},A)};function be(){const A=(0,o.useContext)(_);if(!A)throw new Error("useEntityList must be used within EntityListProvider");return A}var We=e(64279),et=e(18149),at=e.n(et),yt=e(829),ie=e.n(yt);const ae=(0,x.uW)("catalog:entity-route-ref",()=>(0,t.createRouteRef)({id:"catalog:entity",params:["namespace","kind","name"]}));function Ye(A){var C,N;return{kind:A.kind.toLocaleLowerCase("en-US"),namespace:(N=(C=A.metadata.namespace)==null?void 0:C.toLocaleLowerCase("en-US"))!=null?N:DEFAULT_NAMESPACE,name:A.metadata.name}}function Ge(A,C){const N=C==null?void 0:C.defaultKind;let W,Y,Q;return"metadata"in A?(W=A.kind,Y=A.metadata.namespace,Q=A.metadata.name):(W=A.kind,Y=A.namespace,Q=A.name),Y===Ie.zG&&(Y=void 0),W=W.toLocaleLowerCase("en-US"),W=N&&N.toLocaleLowerCase("en-US")===W?void 0:W,`${W?`${W}:`:""}${Y?`${Y}/`:""}${Q}`}var we=e(82339),nt=e(80030);const J=(0,o.forwardRef)((A,C)=>{var rt;const{entityRef:N,defaultKind:W,title:Y,children:Q,...ge}=A,Re=(0,t.useRouteRef)(ae);let Ue,xe,Ze;if(typeof N=="string"){const Ve=(0,Ie.of)(N);Ue=Ve.kind,xe=Ve.namespace,Ze=Ve.name}else"metadata"in N?(Ue=N.kind,xe=N.metadata.namespace,Ze=N.metadata.name):(Ue=N.kind,xe=N.namespace,Ze=N.name);Ue=Ue.toLocaleLowerCase("en-US"),xe=(rt=xe==null?void 0:xe.toLocaleLowerCase("en-US"))!=null?rt:Ie.zG;const ze={kind:Ue,namespace:xe,name:Ze},ke=Ge({kind:Ue,namespace:xe,name:Ze},{defaultKind:W}),It=o.createElement(we.Link,{...ge,ref:C,to:Re(ze)},Q,!Q&&(Y!=null?Y:ke));return Y?o.createElement(nt.ZP,{title:ke},It):It});function z(A){const{entityRefs:C,defaultKind:N,...W}=A;return o.createElement(o.Fragment,null,C.map((Y,Q)=>o.createElement(o.Fragment,{key:Q},Q>0&&", ",o.createElement(J,{...W,entityRef:Y,defaultKind:N}))))}class q{constructor(C){this.value=C}getCatalogFilters(){return{kind:this.value}}toQueryValue(){return this.value}}class ue{constructor(C){this.value=C}getTypes(){return Array.isArray(this.value)?this.value:[this.value]}getCatalogFilters(){return{"spec.type":this.getTypes()}}toQueryValue(){return this.getTypes()}}class fe{constructor(C){this.values=C}filterEntity(C){return this.values.every(N=>{var W;return((W=C.metadata.tags)!=null?W:[]).includes(N)})}toQueryValue(){return this.values}}class Pe{constructor(C){this.value=C}filterEntity(C){var W;const N=this.value.toLocaleUpperCase("en-US");return C.metadata.name.toLocaleUpperCase("en-US").includes(N)||`${C.metadata.title}`.toLocaleUpperCase("en-US").includes(N)||((W=C.metadata.tags)==null?void 0:W.join("").toLocaleUpperCase("en-US").indexOf(N))!==-1}}class Oe{constructor(C){this.values=C}filterEntity(C){return this.values.some(N=>ht(C,Ie.S4).some(W=>Ge(W,{defaultKind:"group"})===N))}toQueryValue(){return this.values}}class Ce{constructor(C){this.values=C}filterEntity(C){return this.values.some(N=>{var W;return((W=C.spec)==null?void 0:W.lifecycle)===N})}toQueryValue(){return this.values}}class Qe{constructor(C,N,W){this.value=C,this.isOwnedEntity=N,this.isStarredEntity=W}filterEntity(C){switch(this.value){case"owned":return this.isOwnedEntity(C);case"starred":return this.isStarredEntity(C);default:return!0}}toQueryValue(){return this.value}}class Ke{constructor(C){this.value=C}filterEntity(C){var W;const N=(W=C.metadata.annotations)==null?void 0:W["backstage.io/orphan"];return N!==void 0&&this.value.toString()===N}}class pt{constructor(C){this.value=C}filterEntity(C){var W,Y;const N=((Y=(W=C==null?void 0:C.status)==null?void 0:W.items)==null?void 0:Y.length)>0;return N!==void 0&&this.value===N}}function St(){var Ve;const A=(0,t.useApi)(c),{filters:{kind:C,type:N},queryParameters:{type:W},updateFilters:Y}=be(),Q=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[ge,Re]=(0,o.useState)(Q.length?Q:(Ve=N==null?void 0:N.getTypes())!=null?Ve:[]);(0,o.useEffect)(()=>{Q.length&&Re(Q)},[Q]);const[Ue,xe]=(0,o.useState)([]),Ze=(0,o.useMemo)(()=>C==null?void 0:C.value,[C]),{error:ze,loading:ke,value:It}=(0,We.default)(async()=>Ze?await A.getEntityFacets({filter:{kind:Ze},facets:["spec.type"]}).then(fn=>fn.facets["spec.type"]||[]):[],[Ze,A]),rt=(0,o.useRef)(It);return(0,o.useEffect)(()=>{const Ft=rt.current;if(rt.current=It,ke||!Ze||Ft===It||!It)return;const fn=[...new Set(ie()(It,xn=>-xn.count).map(xn=>xn.value.toLocaleLowerCase("en-US")))];xe(fn);const kn=ge.filter(xn=>fn.includes(xn));at()(ge,kn)||Re(kn)},[ke,Ze,ge,Re,It]),(0,o.useEffect)(()=>{Y({type:ge.length?new ue(ge):void 0})},[ge,Y]),{loading:ke,error:ze,availableTypes:Ue,selectedTypes:ge,setSelectedTypes:Re}}const ut=20;function xt(A,C){var Ue,xe;const N=(Ue=C==null?void 0:C.type)==null?void 0:Ue.toLocaleLowerCase("en-US"),W=(xe=C==null?void 0:C.kind)==null?void 0:xe.toLocaleLowerCase("en-US"),Y=(0,t.useApi)(c),{loading:Q,value:ge,error:Re}=(0,We.default)(async()=>{var rt;const Ze=(rt=A.relations)==null?void 0:rt.map(Ve=>({type:Ve.type,target:(0,Ie.of)(Ve.targetRef)})).filter(Ve=>(!N||Ve.type.toLocaleLowerCase("en-US")===N)&&(!W||Ve.target.kind===W));if(!Ze)return[];const ze=Object.values((0,Se.groupBy)(Ze,({target:Ve})=>`${Ve.kind}:${Ve.namespace}`.toLocaleLowerCase("en-US"))),ke=[];for(const Ve of ze)ke.push({kind:Ve[0].target.kind,namespace:Ve[0].target.namespace,nameBatches:(0,Se.chunk)(Ve.map(Ft=>Ft.target.name),ut)});return(await Promise.all(ke.flatMap(Ve=>Ve.nameBatches.map(Ft=>Y.getEntities({filter:{kind:Ve.kind,"metadata.namespace":Ve.namespace,"metadata.name":Ft}}))))).flatMap(Ve=>Ve.items)},[A,N,W]);return{entities:ge,loading:Q,error:Re}}var Lt=e(72164);function bt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function Pt(){const A=(0,t.useApi)(i),C=(0,Lt.Z)(A.starredEntitie$(),new Set),N=(0,o.useCallback)(Y=>C.has(bt(Y)),[C]),W=(0,o.useCallback)(Y=>A.toggleStarred(bt(Y)).then(),[A]);return{starredEntities:C,toggleStarredEntity:W,isStarredEntity:N}}function Wt(A){return typeof A=="string"?A:(0,Ie.eE)(A)}function Ht(A){const C=(0,t.useApi)(i),[N,W]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const Q=C.starredEntitie$().subscribe({next(ge){W(ge.has(Wt(A)))}});return()=>{Q.unsubscribe()}},[A,C]),{toggleStarredEntity:(0,o.useCallback)(()=>C.toggleStarred(Wt(A)).then(),[A,C]),isStarredEntity:N}}function dn(){const A=(0,t.useApi)(t.identityApiRef),{loading:C,value:N}=(0,We.default)(async()=>{const{ownershipEntityRefs:Y}=await A.getBackstageIdentity();return Y},[]),W=(0,o.useMemo)(()=>{const Y=new Set(N!=null?N:[]);return Q=>{const ge=ht(Q,Ie.S4).map(Ie.eE);for(const Re of ge)if(Y.has(Re))return!0;return!1}},[N]);return(0,o.useMemo)(()=>({loading:C,isOwnedEntity:W}),[C,W])}var In=e(68099);function Yt(A){const{entity:C,loading:N,error:W}=ce(),{allowed:Y,loading:Q,error:ge}=(0,In.gI)({permission:A,resourceRef:C?(0,Ie.eE)(C):void 0});return N||Q?{loading:!0,allowed:!1}:W?{loading:!1,allowed:!1,error:W}:{loading:!1,allowed:Y,error:ge}}const Nt=A=>{var ge;const{initialFilter:C,hidden:N}=A,{updateFilters:W,queryParameters:{kind:Y}}=useEntityList(),[Q]=useState((ge=[Y].flat()[0])!=null?ge:C);return useEffect(()=>{W({kind:Q?new EntityKindFilter(Q):void 0})},[Q,W]),N?null:React.createElement(Alert,{severity:"warning"},"Kind filter not yet available")};var Xe=e(79692),de=e(5806),j=e(21324),ye=e(86619),je=e(19996),_e=e(25505),st=e(38016),Rt=e(88013);const qt=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityLifecyclePicker"}),en=o.createElement(_e.Z,{fontSize:"small"}),tn=o.createElement(je.Z,{fontSize:"small"}),gn=()=>{var xe,Ze;const A=qt(),{updateFilters:C,backendEntities:N,filters:W,queryParameters:{lifecycles:Y}}=be(),Q=(0,o.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[ge,Re]=(0,o.useState)(Q.length?Q:(Ze=(xe=W.lifecycles)==null?void 0:xe.values)!=null?Ze:[]);(0,o.useEffect)(()=>{Q.length&&Re(Q)},[Q]),(0,o.useEffect)(()=>{C({lifecycles:ge.length?new Ce(ge):void 0})},[ge,C]);const Ue=(0,o.useMemo)(()=>[...new Set(N.map(ze=>{var ke;return(ke=ze.spec)==null?void 0:ke.lifecycle}).filter(Boolean))].sort(),[N]);return Ue.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Lifecycle",o.createElement(Rt.ZP,{multiple:!0,options:Ue,value:ge,onChange:(ze,ke)=>Re(ke),renderOption:(ze,{selected:ke})=>o.createElement(de.Z,{control:o.createElement(j.Z,{icon:en,checkedIcon:tn,checked:ke}),label:ze}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"lifecycle-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},U=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityOwnerPicker"}),oe=o.createElement(_e.Z,{fontSize:"small"}),te=o.createElement(je.Z,{fontSize:"small"}),Ee=()=>{var xe,Ze;const A=U(),{updateFilters:C,backendEntities:N,filters:W,queryParameters:{owners:Y}}=be(),Q=(0,o.useMemo)(()=>[Y].flat().filter(Boolean),[Y]),[ge,Re]=(0,o.useState)(Q.length?Q:(Ze=(xe=W.owners)==null?void 0:xe.values)!=null?Ze:[]);(0,o.useEffect)(()=>{Q.length&&Re(Q)},[Q]),(0,o.useEffect)(()=>{C({owners:ge.length?new Oe(ge):void 0})},[ge,C]);const Ue=(0,o.useMemo)(()=>[...new Set(N.flatMap(ze=>ht(ze,Ie.S4).map(ke=>Ge(ke,{defaultKind:"group"}))).filter(Boolean))].sort(),[N]);return Ue.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Owner",o.createElement(Rt.ZP,{multiple:!0,options:Ue,value:ge,onChange:(ze,ke)=>Re(ke),renderOption:(ze,{selected:ke})=>o.createElement(de.Z,{control:o.createElement(j.Z,{icon:oe,checkedIcon:te,checked:ke}),label:ze}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"owner-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null},$e=(0,Xe.Z)(A=>({searchToolbar:{paddingLeft:0,paddingRight:0},input:{}}),{name:"CatalogReactEntitySearchBar"}),dt=()=>{var Q,ge;const A=$e(),{filters:C,updateFilters:N}=useEntityList(),[W,Y]=useState((ge=(Q=C.text)==null?void 0:Q.value)!=null?ge:"");return useDebounce(()=>{N({text:W.length?new EntityTextFilter(W):void 0})},250,[W,N]),React.createElement(Toolbar,{className:A.searchToolbar},React.createElement(FormControl,null,React.createElement(Input,{"aria-label":"search",id:"input-with-icon-adornment",className:A.input,placeholder:"Search",autoComplete:"off",onChange:Re=>Y(Re.target.value),value:W,startAdornment:React.createElement(InputAdornment,{position:"start"},React.createElement(Search,null)),endAdornment:React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"clear search",onClick:()=>Y(""),edge:"end",disabled:W.length===0},React.createElement(Clear,null)))})))},Ne=Object.freeze({createEntityRefColumn(A){const{defaultKind:C}=A;function N(W){var Y;return((Y=W.metadata)==null?void 0:Y.title)||Ge(W,{defaultKind:C})}return{title:"Name",highlight:!0,customFilterAndSearch(W,Y){return N(Y).includes(W)},customSort(W,Y){return N(W).localeCompare(N(Y))},render:W=>{var Y;return o.createElement(J,{entityRef:W,defaultKind:C,title:(Y=W.metadata)==null?void 0:Y.title})}}},createEntityRelationColumn({title:A,relation:C,defaultKind:N,filter:W}){function Y(ge){return ht(ge,C,W)}function Q(ge){return Y(ge).map(Re=>Ge(Re,{defaultKind:N})).join(", ")}return{title:A,customFilterAndSearch(ge,Re){return Q(Re).includes(ge)},customSort(ge,Re){return Q(ge).localeCompare(Q(Re))},render:ge=>o.createElement(z,{entityRefs:Y(ge),defaultKind:N})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:Ie.S4,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:Ie.cz,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:Ie.cz,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:A=>o.createElement(we.OverflowTooltip,{text:A.metadata.description,placement:"bottom-start",line:2}),width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),Vt=[Ne.createEntityRefColumn({defaultKind:"system"}),Ne.createDomainColumn(),Ne.createOwnerColumn(),Ne.createMetadataDescriptionColumn()],Jt=[Ne.createEntityRefColumn({defaultKind:"component"}),Ne.createSystemColumn(),Ne.createOwnerColumn(),Ne.createSpecTypeColumn(),Ne.createSpecLifecycleColumn(),Ne.createMetadataDescriptionColumn()],Zt=(0,Xe.Z)(A=>({empty:{padding:A.spacing(2),display:"flex",justifyContent:"center"}})),Dt=A=>{const{entities:C,title:N,emptyContent:W,variant:Y="gridItem",columns:Q}=A,ge=Zt(),Re={minWidth:"0",width:"100%"};return Y==="gridItem"&&(Re.height="calc(100% - 10px)"),o.createElement(we.Table,{columns:Q,title:N,style:Re,emptyContent:W&&o.createElement("div",{className:ge.empty},W),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1},data:C})};Dt.columns=Ne,Dt.systemEntityColumns=Vt,Dt.componentEntityColumns=Jt;const it=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityTagPicker"}),$t=o.createElement(_e.Z,{fontSize:"small"}),nn=o.createElement(je.Z,{fontSize:"small"}),Gt=()=>{var xe,Ze;const A=it(),{updateFilters:C,filters:N,queryParameters:{tags:W}}=be(),Y=(0,t.useApi)(c),{value:Q}=(0,We.default)(async()=>{var It;const ze="metadata.tags",{facets:ke}=await Y.getEntityFacets({facets:[ze],filter:(It=N.kind)==null?void 0:It.getCatalogFilters()});return ke[ze].map(({value:rt})=>rt)},[N.kind]),ge=(0,o.useMemo)(()=>[W].flat().filter(Boolean),[W]),[Re,Ue]=(0,o.useState)(ge.length?ge:(Ze=(xe=N.tags)==null?void 0:xe.values)!=null?Ze:[]);return(0,o.useEffect)(()=>{ge.length&&Ue(ge)},[ge]),(0,o.useEffect)(()=>{C({tags:Re.length?new fe(Re):void 0})},[Re,C]),Q!=null&&Q.length?o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Tags",o.createElement(Rt.ZP,{multiple:!0,options:Q,value:Re,onChange:(ze,ke)=>Ue(ke),renderOption:(ze,{selected:ke})=>o.createElement(de.Z,{control:o.createElement(j.Z,{icon:$t,checkedIcon:nn,checked:ke}),label:ze}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"tag-picker-expand"}),renderInput:ze=>o.createElement(ye.Z,{...ze,className:A.input,variant:"outlined"})}))):null};var Kt=e(82108),mn=e.n(Kt);const Mn=A=>{var xe;const{hidden:C,initialFilter:N}=A,W=(0,t.useApi)(t.alertApiRef),{error:Y,availableTypes:Q,selectedTypes:ge,setSelectedTypes:Re}=St();if((0,o.useEffect)(()=>{Y&&W.post({message:"Failed to load entity types",severity:"error"}),N&&Re([N])},[Y,W,N,Re]),Q.length===0||Y)return null;const Ue=[{value:"all",label:"All"},...Q.map(Ze=>({value:Ze,label:mn()(Ze)}))];return C?null:o.createElement(E.Z,{pb:1,pt:1},o.createElement(we.Select,{label:"Type",items:Ue,selected:(xe=Ue.length>1?ge[0]:void 0)!=null?xe:"all",onChange:Ze=>Re(Ze==="all"?[]:[String(Ze)])}))};var Qt=e(15459),Bt=e(61837),Xt=e(11640),Rn=e(28347);const ln=(0,Qt.Z)({root:{color:"#f3ba37"}})(Xt.Z),vn=A=>{const{toggleStarredEntity:C,isStarredEntity:N}=Ht(A.entity);return o.createElement(Bt.Z,{"aria-label":"favorite",color:"inherit",...A,onClick:()=>C()},o.createElement(nt.ZP,{title:N?"Remove from favorites":"Add to favorites"},N?o.createElement(ln,null):o.createElement(Rn.Z,null)))};var Ln=e(8629),M=e(79249),g=e(38724),T=e(99152),B=e(6487),V=e(49429),se=e(55999),he=e(72779),Le=e.n(he),Et=e(39412);const zt=Et.Z;function An(A,C){if(A)return A.toLocaleLowerCase("en-US");if(C)try{return(0,Ie.of)(C).kind.toLocaleLowerCase("en-US")}catch{return}}function an(A,C){const N=(0,t.useApp)(),W=An(A,C);return W&&N.getSystemIcon(`kind:${W}`)||zt}function or(A){const{kind:C,entityRef:N,...W}=A,Y=an(C,N);return o.createElement(Y,{...W})}const sr=(0,Xe.Z)(A=>({node:{fill:A.palette.grey[300],stroke:A.palette.grey[300],"&.primary":{fill:A.palette.primary.light,stroke:A.palette.primary.light},"&.secondary":{fill:A.palette.secondary.light,stroke:A.palette.secondary.light}},text:{fill:A.palette.getContrastText(A.palette.grey[300]),"&.primary":{fill:A.palette.primary.contrastText},"&.secondary":{fill:A.palette.secondary.contrastText},"&.focused":{fontWeight:"bold"}},clickable:{cursor:"pointer"}}));function Pr(A){const C=(0,t.useApi)(c),N=(0,Ie.eE)(A),{loading:W,error:Y,value:Q}=(0,We.default)(async()=>{const ge=await C.getEntityAncestors({entityRef:N}),Re=new Array,Ue=new Array;for(const xe of ge.items){const Ze=(0,Ie.eE)(xe.entity),ze=Ze===ge.rootEntityRef;Re.push({id:Ze,root:ze,...xe.entity});for(const ke of xe.parentEntityRefs)Ue.push({from:Ze,to:ke})}return{nodes:Re,edges:Ue}},[N]);return{loading:W,error:Y,nodes:(Q==null?void 0:Q.nodes)||[],edges:(Q==null?void 0:Q.edges)||[]}}function Kr({node:A}){const C=sr(),N=(0,He.s0)(),W=(0,t.useRouteRef)(ae),[Y,Q]=(0,o.useState)(0),[ge,Re]=(0,o.useState)(0),Ue=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(Ue.current){let{height:Ft,width:fn}=Ue.current.getBBox();Ft=Math.round(Ft),fn=Math.round(fn),(Ft!==ge||fn!==Y)&&(Q(fn),Re(Ft))}},[Y,ge]);const xe=10,Ze=ge,ze=Ze+xe,ke=ze+Y+xe*2,It=ge+xe*2,rt=A.metadata.title||(A.kind&&A.metadata.name&&A.metadata.namespace?Ge({kind:A.kind,name:A.metadata.name,namespace:A.metadata.namespace||""}):A.id),Ve=()=>{N(W({kind:A.kind,namespace:A.metadata.namespace||Ie.zG,name:A.metadata.name}))};return o.createElement("g",{onClick:Ve,className:C.clickable},o.createElement("rect",{className:Le()(C.node,A.root?"secondary":"primary"),width:ke,height:It,rx:10}),o.createElement(or,{kind:A.kind,y:xe,x:xe,width:Ze,height:Ze,className:Le()(C.text,A.root?"secondary":"primary")}),o.createElement("text",{ref:Ue,className:Le()(C.text,A.root?"secondary":"primary"),y:It/2,x:ze+(Y+xe*2)/2,textAnchor:"middle",alignmentBaseline:"middle"},rt))}function cr(A){const{loading:C,error:N,nodes:W,edges:Y}=Pr(A.entity);return C?o.createElement(we.Progress,null):N?o.createElement(we.ResponseErrorPanel,{error:N}):o.createElement(o.Fragment,null,o.createElement(se.Z,{variant:"h2"},"Ancestry"),o.createElement(se.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"," ",o.createElement(we.Link,{to:"https://backstage.io/docs/features/software-catalog/life-of-an-entity"},"processors emitted")," ","child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations."),o.createElement(E.Z,{mt:4},o.createElement(we.DependencyGraph,{nodes:W,edges:Y,renderNode:Kr,direction:we.DependencyGraphTypes.Nm.BOTTOM_TOP,zoom:"enable-on-click"})))}var jn=e(11776),wn=e(38402),qn=e(86136),ur=e(99688),Ir=e(49378),ia=e(54506),dr=e(94339),fr=e(24579),Lr=e(27685);const ir=(0,Xe.Z)(A=>({root:{display:"flex",flexDirection:"column"},marginTop:{marginTop:A.spacing(2)},helpIcon:{marginLeft:A.spacing(1),color:A.palette.text.disabled},monospace:{fontFamily:"monospace"}}));function $n(A){const C=ir();return o.createElement(Ir.Z,{...A,primaryTypographyProps:{className:C.monospace},secondaryTypographyProps:{className:C.monospace}})}function _n(A){const C=ir();return o.createElement(ia.Z,{className:C.monospace},A.children)}function er(A){return o.createElement(E.Z,{mt:2},o.createElement(dr.Z,{variant:"outlined"},o.createElement(fr.Z,null,o.createElement(S.Z,{variant:"h6",gutterBottom:!0},A.title,A.helpLink&&o.createElement(hr,{to:A.helpLink})),A.children)))}function kr(A){if(A.match(/^url:https?:\/\//))return A.slice(4);if(A.match(/^https?:\/\//))return A}function mr(A){const[C,N]=A.entry,W=kr(N);return o.createElement(wn.Z,null,A.indent&&o.createElement(qn.Z,null),o.createElement($n,{primary:C,secondary:W?o.createElement(we.Link,{to:W},N):N}))}function hr(A){const C=ir();return o.createElement(we.Link,{to:A.to,className:C.helpIcon},o.createElement(Lr.Z,{fontSize:"inherit"}))}const Yr=(0,Xe.Z)({root:{display:"flex",flexDirection:"column"}});function Or(A){var Ue,xe;const C=(0,t.useApi)(c),N=(0,Ie.eE)(A),W=(Ue=A.metadata.annotations)==null?void 0:Ue[Ie.P1],Y=(xe=A.metadata.annotations)==null?void 0:xe[Ie.q1],{loading:Q,error:ge,value:Re}=(0,We.default)(async()=>!W&&!Y?[]:(await C.getEntities({filter:[...W?[{[`metadata.annotations.${Ie.P1}`]:W}]:[],...Y?[{[`metadata.annotations.${Ie.q1}`]:Y}]:[]]})).items,[W,Y]);return{loading:Q,error:ge,location:W,originLocation:Y,colocatedEntities:Re==null?void 0:Re.filter(Ze=>(0,Ie.eE)(Ze)!==N)}}function gr(A){return o.createElement(jn.Z,{dense:!0},A.header&&o.createElement(mr,{key:"header",entry:A.header}),A.entities.map(C=>o.createElement(wn.Z,{key:(0,Ie.eE)(C)},o.createElement(qn.Z,null,o.createElement(or,{kind:C.kind})),o.createElement($n,{primary:o.createElement(J,{entityRef:C})}))))}function xr(A){const{entity:C}=A,{loading:N,error:W,location:Y,originLocation:Q,colocatedEntities:ge}=Or(C);if(N)return o.createElement(we.Progress,null);if(W)return o.createElement(we.ResponseErrorPanel,{error:W});if(!Y&&!Q)return o.createElement(ur.Z,{severity:"warning"},"Entity had no location information.");if(!(ge!=null&&ge.length))return o.createElement(ur.Z,{severity:"info"},"There were no other entities on this location.");if(Y===Q)return o.createElement(gr,{entities:ge});const Re=ge.filter(xe=>{var Ze;return((Ze=xe.metadata.annotations)==null?void 0:Ze[Ie.P1])===Y}),Ue=ge.filter(xe=>{var Ze;return((Ze=xe.metadata.annotations)==null?void 0:Ze[Ie.q1])===Q});return o.createElement(o.Fragment,null,Re.length>0&&o.createElement(gr,{entities:Re,header:["At the same location",Y]}),Ue.length>0&&o.createElement(gr,{entities:Ue,header:["At the same origin",Q]}))}function Dr(A){const C=Yr();return o.createElement(o.Fragment,null,o.createElement(se.Z,{variant:"h2"},"Colocated"),o.createElement(se.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)."),o.createElement("div",{className:C.root},o.createElement(xr,{entity:A.entity})))}function Fr(A){return Object.fromEntries([...Object.entries(A)].sort((C,N)=>C[0]<N[0]?-1:1))}function Br(A){return o.createElement(o.Fragment,null,o.createElement(se.Z,{variant:"h2"},"Entity as JSON"),o.createElement(se.Z,null,"This is the raw entity data as received from the catalog, on JSON form."),o.createElement(se.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(we.CodeSnippet,{text:JSON.stringify(Fr(A.entity),void 0,2),language:"json",showCopyCodeButton:!0}))))}var Mr=e(3440),wr=e.n(Mr);const pr=(0,Xe.Z)({root:{display:"flex",flexDirection:"column"}});function $r(A){var xe,Ze;const C=pr(),{apiVersion:N,kind:W,metadata:Y,spec:Q,relations:ge=[],status:Re={}}=A.entity,Ue=wr()(ie()(ge,ze=>ze.targetRef),"type");return o.createElement(o.Fragment,null,o.createElement(se.Z,{variant:"h2"},"Overview"),o.createElement("div",{className:C.root},o.createElement(er,{title:"Identity"},o.createElement(jn.Z,{dense:!0},o.createElement(wn.Z,null,o.createElement($n,{primary:"apiVersion",secondary:N})),o.createElement(wn.Z,null,o.createElement($n,{primary:"kind",secondary:W})),(Q==null?void 0:Q.type)&&o.createElement(wn.Z,null,o.createElement($n,{primary:"spec.type",secondary:Q.type})),Y.uid&&o.createElement(wn.Z,null,o.createElement($n,{primary:"uid",secondary:Y.uid})),Y.etag&&o.createElement(wn.Z,null,o.createElement($n,{primary:"etag",secondary:Y.etag})))),o.createElement(er,{title:"Metadata"},!!Object.keys(Y.annotations||{}).length&&o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,"Annotations",o.createElement(hr,{to:"https://backstage.io/docs/features/software-catalog/well-known-annotations"}))},Object.entries(Y.annotations).map(ze=>o.createElement(mr,{key:ze[0],indent:!0,entry:ze}))),!!Object.keys(Y.labels||{}).length&&o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,"Labels")},Object.entries(Y.labels).map(ze=>o.createElement(mr,{key:ze[0],indent:!0,entry:ze}))),!!((xe=Y.tags)!=null&&xe.length)&&o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,"Tags")},Y.tags.map((ze,ke)=>o.createElement(wn.Z,{key:`${ze}-${ke}`},o.createElement(qn.Z,null),o.createElement($n,{primary:ze}))))),!!ge.length&&o.createElement(er,{title:"Relations",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-relations"},Object.entries(Ue).map(([ze,ke],It)=>o.createElement("div",{key:It},o.createElement(jn.Z,{dense:!0,subheader:o.createElement(_n,null,ze)},ke.map(rt=>o.createElement(wn.Z,{key:rt.targetRef},o.createElement(qn.Z,null,o.createElement(or,{entityRef:rt.targetRef})),o.createElement($n,{primary:o.createElement(J,{entityRef:rt.targetRef})}))))))),!!((Ze=Re.items)!=null&&Ze.length)&&o.createElement(er,{title:"Status",helpLink:"https://backstage.io/docs/features/software-catalog/well-known-statuses"},Re.items.map((ze,ke)=>o.createElement("div",{key:ke},o.createElement(S.Z,null,ze.level,": ",ze.type),o.createElement(E.Z,{ml:2},ze.message))))))}var yr=e(72847);function hn(A){return o.createElement(o.Fragment,null,o.createElement(se.Z,{variant:"h2"},"Entity as YAML"),o.createElement(se.Z,null,"This is the raw entity data as received from the catalog, on YAML form."),o.createElement(se.Z,null,o.createElement("div",{style:{fontSize:"75%"},"data-testid":"code-snippet"},o.createElement(we.CodeSnippet,{text:yr.ZP.stringify(Fr(A.entity)),language:"yaml",showCopyCodeButton:!0}))))}const On=(0,Xe.Z)(A=>({fullHeightDialog:{height:"calc(100% - 64px)"},root:{display:"flex",flexGrow:1,width:"100%",backgroundColor:A.palette.background.paper},tabs:{borderRight:`1px solid ${A.palette.divider}`,flexShrink:0},tabContents:{flexGrow:1,overflowX:"auto"}}));function pn(A){const{children:C,value:N,index:W,...Y}=A,Q=On();return o.createElement("div",{role:"tabpanel",hidden:N!==W,id:`vertical-tabpanel-${W}`,"aria-labelledby":`vertical-tab-${W}`,className:Q.tabContents,...Y},N===W&&o.createElement(E.Z,{pl:3,pr:3},C))}function Kn(A){return{id:`vertical-tab-${A}`,"aria-controls":`vertical-tabpanel-${A}`}}function Ur(A){const C=On(),[N,W]=o.useState(0);return(0,o.useEffect)(()=>{W(0)},[A.open]),A.entity?o.createElement(Ln.Z,{fullWidth:!0,maxWidth:"xl",open:A.open,onClose:A.onClose,"aria-labelledby":"entity-inspector-dialog-title",PaperProps:{className:C.fullHeightDialog}},o.createElement(M.Z,{id:"entity-inspector-dialog-title"},"Entity Inspector"),o.createElement(g.Z,{dividers:!0},o.createElement("div",{className:C.root},o.createElement(T.Z,{orientation:"vertical",variant:"scrollable",value:N,onChange:(Y,Q)=>W(Q),"aria-label":"Inspector options",className:C.tabs},o.createElement(B.Z,{label:"Overview",...Kn(0)}),o.createElement(B.Z,{label:"Ancestry",...Kn(1)}),o.createElement(B.Z,{label:"Colocated",...Kn(2)}),o.createElement(B.Z,{label:"Raw JSON",...Kn(3)}),o.createElement(B.Z,{label:"Raw YAML",...Kn(4)})),o.createElement(pn,{value:N,index:0},o.createElement($r,{entity:A.entity})),o.createElement(pn,{value:N,index:1},o.createElement(cr,{entity:A.entity})),o.createElement(pn,{value:N,index:2},o.createElement(Dr,{entity:A.entity})),o.createElement(pn,{value:N,index:3},o.createElement(Br,{entity:A.entity})),o.createElement(pn,{value:N,index:4},o.createElement(hn,{entity:A.entity})))),o.createElement(V.Z,null,o.createElement(y.Z,{onClick:A.onClose,color:"primary"},"Close"))):null}var Nr=e(85256);function Er(A){var It;const C=(0,t.useApi)(c),N=(It=A.metadata.annotations)==null?void 0:It[Ie.q1],W=A.metadata.uid,Y=N==="bootstrap:bootstrap",Q=(0,We.default)(async()=>{const rt=C.getLocationByRef(N);let Ve;if(!N)Ve=Promise.resolve([]);else{const Ft=`metadata.annotations.${Ie.q1}`;Ve=C.getEntities({filter:{[Ft]:N},fields:["kind","metadata.uid","metadata.name","metadata.namespace"]}).then(fn=>fn.items)}return Promise.all([rt,Ve]).then(([Ft,fn])=>({location:Ft,colocatedEntities:fn}))},[C,A]),ge=(0,o.useCallback)(async function(){const{location:Ve}=Q.value;await C.removeLocationById(Ve.id)},[C,Q]),Re=(0,o.useCallback)(async function(){await C.removeEntityByUid(W)},[C,W]);if(Y)return{type:"bootstrap",location:N,deleteEntity:Re};const{loading:Ue,error:xe,value:Ze}=Q;if(Ue)return{type:"loading"};if(xe)return{type:"error",error:xe};const{location:ze,colocatedEntities:ke}=Ze;return ze?{type:"unregister",location:N,colocatedEntities:ke.map(Ie.iB),unregisterLocation:ge,deleteEntity:Re}:{type:"only-delete",deleteEntity:Re}}var vr=e(10179);const Zr=(0,Xe.Z)({advancedButton:{fontSize:"0.7em"}}),Ar=({entity:A,onConfirm:C})=>{var It;const N=(0,t.useApi)(t.alertApiRef),W=(0,t.useApi)(t.configApiRef),Y=Zr(),Q=Er(A),[ge,Re]=(0,o.useState)(!1),[Ue,xe]=(0,o.useState)(!1),Ze=(It=W.getOptionalString("app.title"))!=null?It:"Backstage",ze=(0,o.useCallback)(async function(){if("unregisterLocation"in Q){xe(!0);try{await Q.unregisterLocation(),C()}catch(Ve){(0,vr.BD)(Ve),N.post({message:Ve.message})}finally{xe(!1)}}},[N,C,Q]),ke=(0,o.useCallback)(async function(){if("deleteEntity"in Q){xe(!0);try{await Q.deleteEntity(),C()}catch(Ve){(0,vr.BD)(Ve),N.post({message:Ve.message})}finally{xe(!1)}}},[N,C,Q]);return Q.type==="loading"?o.createElement(we.Progress,null):Q.type==="error"?o.createElement(we.ResponseErrorPanel,{error:Q.error}):Q.type==="bootstrap"?o.createElement(o.Fragment,null,o.createElement(ur.Z,{severity:"info"},'You cannot unregister this entity, since it originates from a protected Backstage configuration (location "',Q.location,'"). If you believe this is in error, please contact the ',Ze," ","integrator."),o.createElement(E.Z,{marginTop:2},!ge&&o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Re(!0)},"Advanced Options"),ge&&o.createElement(o.Fragment,null,o.createElement(se.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."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ke},"Delete Entity")))):Q.type==="only-delete"?o.createElement(o.Fragment,null,o.createElement(se.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."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ke},"Delete Entity")):Q.type==="unregister"?o.createElement(o.Fragment,null,o.createElement(se.Z,null,"This action will unregister the following entities:"),o.createElement(se.Z,{component:"ul"},Q.colocatedEntities.map(rt=>o.createElement("li",{key:`${rt.kind}:${rt.namespace}/${rt.name}`},o.createElement(J,{entityRef:rt})))),o.createElement(se.Z,null,"Located at the following location:"),o.createElement(se.Z,{component:"ul"},o.createElement("li",null,Q.location)),o.createElement(se.Z,null,"To undo, just re-register the entity in ",Ze,"."),o.createElement(E.Z,{marginTop:2},o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ze},"Unregister Location"),!ge&&o.createElement(E.Z,{component:"span",marginLeft:2},o.createElement(y.Z,{variant:"text",size:"small",color:"primary",className:Y.advancedButton,onClick:()=>Re(!0)},"Advanced Options"))),ge&&o.createElement(o.Fragment,null,o.createElement(E.Z,{paddingTop:4,paddingBottom:4},o.createElement(Nr.Z,null)),o.createElement(se.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."),o.createElement(y.Z,{variant:"contained",color:"secondary",disabled:Ue,onClick:ke},"Delete Entity"))):o.createElement(ur.Z,{severity:"error"},"Internal error: Unknown state")},tr=A=>{const{open:C,onConfirm:N,onClose:W,entity:Y}=A;return o.createElement(Ln.Z,{open:C,onClose:W},o.createElement(M.Z,{id:"responsive-dialog-title"},"Are you sure you want to unregister this entity?"),o.createElement(g.Z,null,o.createElement(Ar,{entity:Y,onConfirm:N})),o.createElement(V.Z,null,o.createElement(y.Z,{onClick:W,color:"primary"},"Cancel")))};var la=e(12231),zr=e(9520),I=e(47603);const k=(0,Xe.Z)(A=>({root:{backgroundColor:"rgba(0, 0, 0, .11)",boxShadow:"none",margin:A.spacing(1,0,1,0)},title:{margin:A.spacing(1,0,0,1),textTransform:"uppercase",fontSize:12,fontWeight:"bold"},listIcon:{minWidth:30,color:A.palette.text.primary},menuItem:{minHeight:A.spacing(6)},groupWrapper:{margin:A.spacing(1,1,2,1)}}),{name:"CatalogReactUserListPicker"});function me(A){return[{name:"Personal",items:[{id:"owned",label:"Owned",icon:I.Z},{id:"starred",label:"Starred",icon:Xt.Z}]},{name:A!=null?A:"Company",items:[{id:"all",label:"All"}]}]}const Be=A=>{var Yn;const{initialFilter:C,availableFilters:N}=A,W=k(),Q=(Yn=(0,t.useApi)(t.configApiRef).getOptionalString("organization.name"))!=null?Yn:"Company",{filters:ge,updateFilters:Re,backendEntities:Ue,queryParameters:{kind:xe,user:Ze},loading:ze}=be(),ke=["starred","all"],It=me(Q).map(Cn=>({...Cn,items:Cn.items.filter(({id:Dn})=>["group","user"].some(Hr=>Hr===xe)?ke.includes(Dn):!N||N.includes(Dn))})).filter(({items:Cn})=>!!Cn.length),{isStarredEntity:rt}=Pt(),{isOwnedEntity:Ve,loading:Ft}=dn(),fn=ze||Ft,kn=(0,o.useMemo)(()=>new Qe("owned",Ve,rt),[Ve,rt]),xn=(0,o.useMemo)(()=>new Qe("starred",Ve,rt),[Ve,rt]),yn=(0,o.useMemo)(()=>[Ze].flat()[0],[Ze]),[Sn,Un]=(0,o.useState)(yn!=null?yn:C),Rr=(0,o.useMemo)(()=>Ue.filter(At((0,Se.compact)(Object.values({...ge,user:void 0})))),[ge,Ue]),Wr=(0,o.useMemo)(()=>({all:Rr.length,starred:Rr.filter(Cn=>xn.filterEntity(Cn)).length,owned:Rr.filter(Cn=>kn.filterEntity(Cn)).length}),[Rr,xn,kn]);return(0,o.useEffect)(()=>{yn&&Un(yn)},[yn]),(0,o.useEffect)(()=>{!fn&&!!Sn&&Sn!=="all"&&Wr[Sn]===0&&Un("all")},[fn,Wr,Sn,Un]),(0,o.useEffect)(()=>{Re({user:Sn?new Qe(Sn,Ve,rt):void 0})},[Sn,Ve,rt,Re]),o.createElement(dr.Z,{className:W.root},It.map(Cn=>o.createElement(o.Fragment,{key:Cn.name},o.createElement(S.Z,{variant:"subtitle2",component:"span",className:W.title},Cn.name),o.createElement(dr.Z,{className:W.groupWrapper},o.createElement(jn.Z,{disablePadding:!0,dense:!0,role:"menu","aria-label":Cn.name},Cn.items.map(Dn=>{var Hr,ca;return o.createElement(la.Z,{role:"none presentation",key:Dn.id,button:!0,divider:!0,onClick:()=>Un(Dn.id),selected:Dn.id===((Hr=ge.user)==null?void 0:Hr.value),className:W.menuItem,disabled:Wr[Dn.id]===0,"data-testid":`user-picker-${Dn.id}`,tabIndex:0,ContainerProps:{role:"menuitem"}},Dn.icon&&o.createElement(qn.Z,{className:W.listIcon},o.createElement(Dn.icon,{fontSize:"small"})),o.createElement(Ir.Z,null,o.createElement(S.Z,{variant:"body1"},Dn.label," ")),o.createElement(zr.Z,null,(ca=Wr[Dn.id])!=null?ca:"-"))}))))))},qe=(0,Xe.Z)({input:{}},{name:"CatalogReactEntityProcessingStatusPickerPicker"}),mt=o.createElement(_e.Z,{fontSize:"small"}),vt=o.createElement(je.Z,{fontSize:"small"}),Ot=()=>{const A=qe(),{updateFilters:C}=be(),[N,W]=(0,o.useState)([]);function Y(Re){C({orphan:Re?new Ke(Re):void 0})}function Q(Re){C({error:Re?new pt(Re):void 0})}const ge=["Is Orphan","Has Error"];return o.createElement(E.Z,{pb:1,pt:1},o.createElement(S.Z,{variant:"button",component:"label"},"Processing Status",o.createElement(Rt.ZP,{multiple:!0,options:ge,value:N,onChange:(Re,Ue)=>{W(Ue),Y(Ue.includes("Is Orphan")),Q(Ue.includes("Has Error"))},renderOption:(Re,{selected:Ue})=>o.createElement(de.Z,{control:o.createElement(j.Z,{icon:mt,checkedIcon:vt,checked:Ue}),label:Re}),size:"small",popupIcon:o.createElement(st.Z,{"data-testid":"processing-status-picker-expand"}),renderInput:Re=>o.createElement(ye.Z,{...Re,className:A.input,variant:"outlined"})})))},ft=({children:A,value:C})=>{var Re;const[N,W]=useState((Re=C==null?void 0:C.filters)!=null?Re:{}),Y=useCallback(Ue=>{W(xe=>{const Ze=typeof Ue=="function"?Ue(xe):Ue;return{...xe,...Ze}})},[]),Q=useMemo(()=>({entities:[],backendEntities:[],queryParameters:{}}),[]),ge=useMemo(()=>{var Ue,xe,Ze,ze,ke;return{entities:(Ue=C==null?void 0:C.entities)!=null?Ue:Q.entities,backendEntities:(xe=C==null?void 0:C.backendEntities)!=null?xe:Q.backendEntities,updateFilters:(Ze=C==null?void 0:C.updateFilters)!=null?Ze:Y,filters:N,loading:(ze=C==null?void 0:C.loading)!=null?ze:!1,queryParameters:(ke=C==null?void 0:C.queryParameters)!=null?ke:Q.queryParameters,error:C==null?void 0:C.error}},[C,Q,N,Y]);return React.createElement(EntityListContext.Provider,{value:ge},A)}},39398:function(ne,s,e){"use strict";e.r(s),e.d(s,{AboutCard:function(){return Fe},AboutContent:function(){return Se},AboutField:function(){return w}});var r=e(48023),t=e(82339),c=e(36964),i=e(36356),R=e(17429),f=e(79692),o=e(94339),u=e(32552),m=e(61837),y=e(85256),h=e(24579),E=e(52866),S=e(30254),b=e(27604),L=e(2784),$=e(47851),F=e(60905),D=e(90436),x=e(7089);const O=(0,f.Z)(He=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:He.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function w(He){const{label:Ae,value:Je,gridSizes:tt,children:Tt}=He,At=O(),Ie=(0,c.useElementFilter)(Tt,gt=>gt.getElements()),ht=Ie.length>0?Ie:L.createElement(D.Z,{variant:"body2",className:At.value},Je||"unknown");return L.createElement(F.Z,{item:!0,...tt},L.createElement(D.Z,{variant:"h2",className:At.label},Ae),ht)}var K=e(45915);const re=(0,f.Z)({description:{wordBreak:"break-word"}});function ce(He,Ae,Je){if(Ae==="url"||He.includes("://"))return He;const tt=Je.type==="file"?`file://${Je.target}`:Je.target;return Ae==="file"||Je.type==="file"?new URL(He,tt).href:tt}function Se(He){var at,yt,ie,ae,Ye,Ge,we,nt;const{entity:Ae}=He,Je=re(),tt=Ae.kind.toLocaleLowerCase("en-US")==="system",Tt=Ae.kind.toLocaleLowerCase("en-US")==="resource",At=Ae.kind.toLocaleLowerCase("en-US")==="component",Ie=Ae.kind.toLocaleLowerCase("en-US")==="api",ht=Ae.kind.toLocaleLowerCase("en-US")==="template",gt=Ae.kind.toLocaleLowerCase("en-US")==="location",lt=Ae.kind.toLocaleLowerCase("en-US")==="group",_=(0,R.getEntityRelations)(Ae,r.cz,{kind:"system"}),pe=(0,R.getEntityRelations)(Ae,r.cz,{kind:"component"}),be=(0,R.getEntityRelations)(Ae,r.cz,{kind:"domain"}),We=(0,R.getEntityRelations)(Ae,r.S4);let et;try{et=(0,r.CV)(Ae)}catch{et=void 0}return L.createElement(F.Z,{container:!0},L.createElement(w,{label:"Description",gridSizes:{xs:12}},L.createElement(D.Z,{variant:"body2",paragraph:!0,className:Je.description},((at=Ae==null?void 0:Ae.metadata)==null?void 0:at.description)||"No description")),L.createElement(w,{label:"Owner",value:"No Owner",gridSizes:{xs:12,sm:6,lg:4}},We.length>0&&L.createElement(R.EntityRefLinks,{entityRefs:We,defaultKind:"group"})),(tt||be.length>0)&&L.createElement(w,{label:"Domain",value:"No Domain",gridSizes:{xs:12,sm:6,lg:4}},be.length>0&&L.createElement(R.EntityRefLinks,{entityRefs:be,defaultKind:"domain"})),(Ie||At||Tt||_.length>0)&&L.createElement(w,{label:"System",value:"No System",gridSizes:{xs:12,sm:6,lg:4}},_.length>0&&L.createElement(R.EntityRefLinks,{entityRefs:_,defaultKind:"system"})),At&&pe.length>0&&L.createElement(w,{label:"Parent Component",value:"No Parent Component",gridSizes:{xs:12,sm:6,lg:4}},L.createElement(R.EntityRefLinks,{entityRefs:pe,defaultKind:"component"})),(Ie||At||Tt||ht||lt||gt||typeof((yt=Ae==null?void 0:Ae.spec)==null?void 0:yt.type)=="string")&&L.createElement(w,{label:"Type",value:(ie=Ae==null?void 0:Ae.spec)==null?void 0:ie.type,gridSizes:{xs:12,sm:6,lg:4}}),(Ie||At||typeof((ae=Ae==null?void 0:Ae.spec)==null?void 0:ae.lifecycle)=="string")&&L.createElement(w,{label:"Lifecycle",value:(Ye=Ae==null?void 0:Ae.spec)==null?void 0:Ye.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),L.createElement(w,{label:"Tags",value:"No Tags",gridSizes:{xs:12,sm:6,lg:4}},(((Ge=Ae==null?void 0:Ae.metadata)==null?void 0:Ge.tags)||[]).map(J=>L.createElement(x.Z,{key:J,size:"small",label:J}))),gt&&(((we=Ae==null?void 0:Ae.spec)==null?void 0:we.targets)||((nt=Ae==null?void 0:Ae.spec)==null?void 0:nt.target))&&L.createElement(w,{label:"Targets",gridSizes:{xs:12}},L.createElement(K.s,{cols:1,items:(Ae.spec.targets||[Ae.spec.target]).map(J=>J).map(J=>{var z;return{text:J,href:ce(J,((z=Ae==null?void 0:Ae.spec)==null?void 0:z.type)||"unknown",et)}})})))}const De=(0,f.Z)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function Fe(He){var ie,ae,Ye;const{variant:Ae}=He,Je=De(),{entity:tt}=(0,R.useEntity)(),Tt=(0,c.useApi)(i.q3),At=(0,c.useApi)(R.catalogApiRef),Ie=(0,c.useApi)(c.alertApiRef),ht=(0,c.useRouteRef)($.jU),gt=(0,R.getEntitySourceLocation)(tt,Tt),lt=(ie=tt.metadata.annotations)==null?void 0:ie[r.Tf],_={label:"View Source",disabled:!gt,icon:L.createElement(i.nW,{type:gt==null?void 0:gt.integrationType}),href:gt==null?void 0:gt.locationTargetUrl},pe={label:"View TechDocs",disabled:!((ae=tt.metadata.annotations)!=null&&ae["backstage.io/techdocs-ref"])||!ht,icon:L.createElement(S.Z,null),href:ht&&ht({namespace:tt.metadata.namespace||r.zG,kind:tt.kind,name:tt.metadata.name})};let be="";Ae==="gridItem"?be=Je.gridItemCard:Ae==="fullHeight"&&(be=Je.fullHeightCard);let We="";Ae==="gridItem"?We=Je.gridItemCardContent:Ae==="fullHeight"&&(We=Je.fullHeightCardContent);const et=(Ye=tt.metadata.annotations)==null?void 0:Ye[r.P1],at=(et==null?void 0:et.startsWith("url:"))||(et==null?void 0:et.startsWith("file:")),yt=(0,L.useCallback)(async()=>{await At.refreshEntity((0,r.eE)(tt)),Ie.post({message:"Refresh scheduled",severity:"info"})},[At,Ie,tt]);return L.createElement(o.Z,{className:be},L.createElement(u.Z,{title:"About",action:L.createElement(L.Fragment,null,at&&L.createElement(m.Z,{"aria-label":"Refresh",title:"Schedule entity refresh",onClick:yt},L.createElement(E.Z,null)),L.createElement(m.Z,{component:t.Link,"aria-label":"Edit",disabled:!lt,title:"Edit Metadata",to:lt!=null?lt:"#"},L.createElement(b.Z,null))),subheader:L.createElement(t.HeaderIconLinkRow,{links:[_,pe]})}),L.createElement(y.Z,null),L.createElement(h.Z,{className:We},L.createElement(Se,{entity:tt})))}},49782:function(ne,s,e){"use strict";e.d(s,{K:function(){return E}});var r=e(2784),t=e(79692),c=e(12420),i=e(97580),R=e(73698),f=e(74603),o=e(12231),u=e(17429),m=e(64279),y=e(36964);const h=(0,t.Z)(S=>(0,c.Z)({root:{...S.typography.h4}}));function E(S){var De;const{initialFilter:b="component",allowedKinds:L}=S,$=h(),F=(0,y.useApi)(u.catalogApiRef),{value:D}=(0,m.default)(async()=>await F.getEntityFacets({facets:["kind"]}).then(Fe=>{var He;return((He=Fe.facets.kind)==null?void 0:He.map(Ae=>Ae.value).sort())||[]})),{updateFilters:x,queryParameters:{kind:O}}=(0,u.useEntityList)(),w=(0,r.useMemo)(()=>{var Fe;return(Fe=[O].flat()[0])==null?void 0:Fe.toLocaleLowerCase("en-US")},[O]),[K,re]=(0,r.useState)(w!=null?w:b);(0,r.useEffect)(()=>{x({kind:K?new u.EntityKindFilter(K):void 0})},[K,x]),(0,r.useEffect)(()=>{w&&re(w)},[w]);const Se=[(0,i.Z)(K)].concat((De=D==null?void 0:D.filter(Fe=>L?L.some(He=>He.toLocaleLowerCase("en-US")===Fe.toLocaleLowerCase("en-US")):!0))!=null?De:[]).sort().reduce((Fe,He)=>(Fe[He.toLocaleLowerCase("en-US")]=He,Fe),{});return r.createElement(R.Z,{input:r.createElement(f.Z,{value:K}),value:K,onChange:Fe=>re(Fe.target.value),classes:$},Object.keys(Se).map(Fe=>r.createElement(o.Z,{value:Fe,key:Fe},`${Se[Fe]}s`)))}},30097:function(ne,s,e){"use strict";e.d(s,{E:function(){return L}});var r=e(48023),t=e(82339),c=e(17429),i=e(90436),R=e(15459),f=e(27604),o=e(2997),u=e(11640),m=e(28347),y=e(76635),h=e(2784),E=e(7089);const S=Object.freeze({createNameColumn($){function F(D){var x;return((x=D.metadata)==null?void 0:x.title)||(0,c.humanizeEntityRef)(D,{defaultKind:$==null?void 0:$.defaultKind})}return{title:"Name",field:"resolved.name",highlight:!0,customSort({entity:D},{entity:x}){return F(D).localeCompare(F(x))},render:({entity:D})=>{var x;return h.createElement(c.EntityRefLink,{entityRef:D,defaultKind:($==null?void 0:$.defaultKind)||"Component",title:(x=D.metadata)==null?void 0:x.title})}}},createSystemColumn(){return{title:"System",field:"resolved.partOfSystemRelationTitle",render:({resolved:$})=>h.createElement(c.EntityRefLinks,{entityRefs:$.partOfSystemRelations,defaultKind:"system"})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:$})=>h.createElement(c.EntityRefLinks,{entityRefs:$.ownedByRelations,defaultKind:"group"})}},createSpecTargetsColumn(){return{title:"Targets",field:"entity.spec.targets",render:({entity:$})=>{var F,D;return h.createElement(h.Fragment,null,(((F=$==null?void 0:$.spec)==null?void 0:F.targets)||((D=$==null?void 0:$.spec)==null?void 0:D.target))&&h.createElement(t.OverflowTooltip,{text:($.spec.targets||[$.spec.target]).join(", "),placement:"bottom-start"}))}}},createSpecTypeColumn(){return{title:"Type",field:"entity.spec.type",hidden:!0,width:"auto"}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"entity.spec.lifecycle"}},createMetadataDescriptionColumn(){return{title:"Description",field:"entity.metadata.description",render:({entity:$})=>h.createElement(t.OverflowTooltip,{text:$.metadata.description,placement:"bottom-start"}),width:"auto"}},createTagsColumn(){return{title:"Tags",field:"entity.metadata.tags",cellStyle:{padding:"0px 16px 0px 20px"},render:({entity:$})=>h.createElement(h.Fragment,null,$.metadata.tags&&$.metadata.tags.map(F=>h.createElement(E.Z,{key:F,label:F,size:"small",variant:"outlined",style:{marginBottom:"0px"}}))),width:"auto"}},createTitleColumn($){return{title:"Title",field:"entity.metadata.title",hidden:$==null?void 0:$.hidden,searchable:!0}}}),b=(0,R.Z)({root:{color:"#f3ba37"}})(u.Z),L=$=>{var Ie,ht,gt;const{columns:F,actions:D,tableOptions:x,subtitle:O}=$,{isStarredEntity:w,toggleStarredEntity:K}=(0,c.useStarredEntities)(),{loading:re,error:ce,entities:Se,filters:De}=(0,c.useEntityList)(),Fe=(0,h.useMemo)(()=>{var _;return[S.createTitleColumn({hidden:!0}),S.createNameColumn({defaultKind:(_=De.kind)==null?void 0:_.value}),...lt(),S.createMetadataDescriptionColumn(),S.createTagsColumn()];function lt(){var pe;switch((pe=De.kind)==null?void 0:pe.value){case"user":return[];case"domain":case"system":return[S.createOwnerColumn()];case"group":case"template":return[S.createSpecTypeColumn()];case"location":return[S.createSpecTypeColumn(),S.createSpecTargetsColumn()];default:return[S.createSystemColumn(),S.createOwnerColumn(),S.createSpecTypeColumn(),S.createSpecLifecycleColumn()]}}},[(Ie=De.kind)==null?void 0:Ie.value]),He=De.type===void 0,Ae=(0,y.capitalize)((gt=(ht=De.user)==null?void 0:ht.value)!=null?gt:"all");if(ce)return h.createElement("div",null,h.createElement(t.WarningPanel,{severity:"error",title:"Could not fetch catalog entities."},h.createElement(t.CodeSnippet,{language:"text",text:ce.toString()})));const Je=[({entity:lt})=>{var be;const _=(be=lt.metadata.annotations)==null?void 0:be[r.l2],pe="View";return{icon:()=>h.createElement(h.Fragment,null,h.createElement(i.Z,{variant:"srOnly"},pe),h.createElement(o.Z,{fontSize:"small"})),tooltip:pe,disabled:!_,onClick:()=>{!_||window.open(_,"_blank")}}},({entity:lt})=>{var be;const _=(be=lt.metadata.annotations)==null?void 0:be[r.Tf],pe="Edit";return{icon:()=>h.createElement(h.Fragment,null,h.createElement(i.Z,{variant:"srOnly"},pe),h.createElement(f.Z,{fontSize:"small"})),tooltip:pe,disabled:!_,onClick:()=>{!_||window.open(_,"_blank")}}},({entity:lt})=>{const _=w(lt),pe=_?"Remove from favorites":"Add to favorites";return{cellStyle:{paddingLeft:"1em"},icon:()=>h.createElement(h.Fragment,null,h.createElement(i.Z,{variant:"srOnly"},pe),_?h.createElement(b,null):h.createElement(m.Z,null)),tooltip:pe,onClick:()=>K(lt)}}],tt=Se.map(lt=>{const _=(0,c.getEntityRelations)(lt,r.cz,{kind:"system"}),pe=(0,c.getEntityRelations)(lt,r.S4);return{entity:lt,resolved:{name:(0,c.humanizeEntityRef)(lt,{defaultKind:"Component"}),ownedByRelationsTitle:pe.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"group"})).join(", "),ownedByRelations:pe,partOfSystemRelationTitle:_.map(be=>(0,c.humanizeEntityRef)(be,{defaultKind:"system"})).join(", "),partOfSystemRelations:_}}}),Tt=(F||Fe).find(lt=>lt.title==="Type");Tt&&(Tt.hidden=!He);const At=tt.length>20;return h.createElement(t.Table,{isLoading:re,columns:F||Fe,options:{paging:At,pageSize:20,actionsColumnIndex:-1,loadingType:"linear",showEmptyDataSourceMessage:!re,padding:"dense",pageSizeOptions:[20,50,100],...x},title:`${Ae} (${Se.length})`,data:tt,actions:D||Je,subtitle:O})};L.columns=S},45915:function(ne,s,e){"use strict";e.d(s,{s:function(){return b}});var r=e(90348),t=e(11861),c=e(2784),i=e(79692),R=e(95544),f=e(90436),o=e(52160),u=e(82339);const m=(0,i.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function y(L){const{href:$,text:F,Icon:D}=L,x=m();return c.createElement(R.Z,{display:"flex"},c.createElement(R.Z,{mr:1,className:x.svgIcon},c.createElement(f.Z,{component:"div"},D?c.createElement(D,null):c.createElement(o.Z,null))),c.createElement(R.Z,{flexGrow:"1"},c.createElement(u.Link,{to:$,target:"_blank",rel:"noopener"},F||$)))}var h=e(41156);const E={xs:1,sm:1,md:1,lg:2,xl:3};function S(L){var D,x;const $=[(0,h.Z)(O=>O.breakpoints.up("xl"))?"xl":null,(0,h.Z)(O=>O.breakpoints.up("lg"))?"lg":null,(0,h.Z)(O=>O.breakpoints.up("md"))?"md":null,(0,h.Z)(O=>O.breakpoints.up("sm"))?"sm":null,(0,h.Z)(O=>O.breakpoints.up("xs"))?"xs":null];let F=1;if(typeof L=="number")F=L;else{const O=(D=$.find(w=>w!==null))!=null?D:"xs";F=(x=L==null?void 0:L[O])!=null?x:E[O]}return F}function b(L){const{items:$,cols:F=void 0}=L,D=S(F);return c.createElement(r.Z,{rowHeight:"auto",cols:D},$.map(({text:x,href:O,Icon:w},K)=>c.createElement(t.Z,{key:K},c.createElement(y,{href:O,text:x!=null?x:O,Icon:w}))))}},47851:function(ne,s,e){"use strict";e.d(s,{_Z:function(){return i},jU:function(){return c},yw:function(){return t}});var r=e(36964);const t=(0,r.createExternalRouteRef)({id:"create-component",optional:!0}),c=(0,r.createExternalRouteRef)({id:"view-techdoc",optional:!0,params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"catalog"})},40749:function(ne,s,e){"use strict";e.d(s,{rG:function(){return r},Y2:function(){return x},J$:function(){return m},g2:function(){return c}});var r;(function(O){const w="DENY";O.DENY=w;const K="ALLOW";O.ALLOW=K;const re="CONDITIONAL";O.CONDITIONAL=re})(r||(r={}));function t(O,w){return O.name===w.name}function c(O,w){return"resourceType"in O?!w||O.resourceType===w:!1}function i(O){return O.attributes.action==="create"}function R(O){return O.attributes.action==="read"}function f(O){return O.attributes.action==="update"}function o(O){return O.attributes.action==="delete"}function u(O){return{authorize:async(w,K)=>await O.authorize(w,K),authorizeConditional(w,K){const re=w;return O.authorize(re,K)}}}function m({name:O,attributes:w,resourceType:K}){return K?{type:"resource",name:O,attributes:w,resourceType:K}:{type:"basic",name:O,attributes:w}}var y=e(10179),h=e(96279),E=e.n(h),S=e(9571),b=e(30195);const L=b.z.lazy(()=>b.z.object({rule:b.z.string(),resourceType:b.z.string(),params:b.z.array(b.z.unknown())}).or(b.z.object({anyOf:b.z.array(L).nonempty()})).or(b.z.object({allOf:b.z.array(L).nonempty()})).or(b.z.object({not:L}))),$=b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),F=b.z.union([b.z.object({result:b.z.literal(r.ALLOW).or(b.z.literal(r.DENY))}),b.z.object({result:b.z.literal(r.CONDITIONAL),pluginId:b.z.string(),resourceType:b.z.string(),conditions:L})]),D=(O,w)=>b.z.object({items:b.z.array(b.z.intersection(b.z.object({id:b.z.string()}),O)).refine(K=>K.length===w.size&&K.every(({id:re})=>w.has(re)),{message:"Items in response do not match request"})});class x{constructor(w){X(this,"enabled");X(this,"discovery");var K;this.discovery=w.discovery,this.enabled=(K=w.config.getOptionalBoolean("permission.enabled"))!=null?K:!1}async authorize(w,K){return this.makeRequest(w,$,K)}async authorizeConditional(w,K){return this.makeRequest(w,F,K)}async makeRequest(w,K,re){if(!this.enabled)return w.map(Je=>({result:r.ALLOW}));const ce={items:w.map(Je=>({id:S.Z(),...Je}))},Se=await this.discovery.getBaseUrl("permission"),De=await E()(`${Se}/authorize`,{method:"POST",body:JSON.stringify(ce),headers:{...this.getAuthorizationHeader(re==null?void 0:re.token),"content-type":"application/json"}});if(!De.ok)throw await y.VL.fromResponse(De);const Fe=await De.json(),Ae=D(K,new Set(ce.items.map(({id:Je})=>Je))).parse(Fe).items.reduce((Je,tt)=>(Je[tt.id]=tt,Je),{});return ce.items.map(Je=>Ae[Je.id])}getAuthorizationHeader(w){return w?{Authorization:`Bearer ${w}`}:{}}}},68099:function(ne,s,e){"use strict";e.d(s,{iM:function(){return R},RV:function(){return c},gI:function(){return o}});var r=e(2784),t=e(36964);const c=(0,t.createApiRef)({id:"plugin.permission.api"});var i=e(40749);class R{constructor(y,h){this.permissionClient=y,this.identityApi=h}static create(y){const{config:h,discovery:E,identity:S}=y,b=new i.Y2({discovery:E,config:h});return new R(b,S)}async authorize(y){return(await this.permissionClient.authorize([y],await this.identityApi.getCredentials()))[0]}}var f=e(49857);function o(m){const y=(0,t.useApi)(c),{data:h,error:E}=(0,f.ZP)(m,async S=>{if((0,i.g2)(S.permission)&&!S.resourceRef)return i.rG.DENY;const{result:b}=await y.authorize(S);return b});return E?{error:E,loading:!1,allowed:!1}:h===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:h===i.rG.ALLOW}}const u=m=>{const{permission:y,resourceRef:h,errorComponent:E,...S}=m,b=usePermission(isResourcePermission(y)?{permission:y,resourceRef:h}:{permission:y}),L=useApp(),{NotFoundErrorPage:$}=L.getComponents();let F=E===void 0?React.createElement($,null):E;return b.loading?F=null:b.allowed&&(F=m.element),React.createElement(Route,{...S,element:F})}},74450:function(ne,s,e){"use strict";e.d(s,{FA:function(){return o},Nd:function(){return K},Rx:function(){return x}});var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.search.queryservice"});class c{constructor(ae){this.mockedResults=ae}query(){return Promise.resolve(this.mockedResults||{results:[]})}}var i=e(2784),R=e(79692);const f=(0,R.Z)(()=>({highlight:{}}),{name:"BackstageHighlightedSearchResultText"}),o=({text:ie,preTag:ae,postTag:Ye})=>{const Ge=f(),we=(0,i.useMemo)(()=>ie.split(new RegExp(`(${ae}.+?${Ye})`)),[Ye,ae,ie]);return i.createElement(i.Fragment,null,we.map((nt,J)=>nt.includes(ae)?i.createElement("mark",{className:Ge.highlight,key:J},nt.replace(new RegExp(`${ae}|${Ye}`,"g"),"")):nt))};var u=e(42494),m=e(84899),y=e(5806),h=e(21324),E=e(56939),S=e(73698),b=e(12231),L=e(76241),$=e(64279),F=e(1849);const D=(0,L.CT)("search-context"),x=()=>{const ie=(0,i.useContext)(D);if(!ie)throw new Error("useSearch must be used within a SearchContextProvider");const ae=ie.atVersion(1);if(!ae)throw new Error("No SearchContext v1 found");return ae},O=()=>useContext(D)!==void 0,w={term:"",pageCursor:void 0,filters:{},types:[]},K=ie=>{var Lt,bt,Pt,Wt;const{initialState:ae=w,children:Ye}=ie,Ge=(0,r.useApi)(t),[we,nt]=(0,i.useState)(ae.pageCursor),[J,z]=(0,i.useState)(ae.filters),[q,ue]=(0,i.useState)(ae.term),[fe,Pe]=(0,i.useState)(ae.types),Oe=(0,F.Z)(q),Ce=(0,$.default)(()=>Ge.query({term:q,filters:J,pageCursor:we,types:fe}),[q,J,fe,we]),Qe=!Ce.loading&&!Ce.error&&((Lt=Ce.value)==null?void 0:Lt.nextPageCursor),Ke=!Ce.loading&&!Ce.error&&((bt=Ce.value)==null?void 0:bt.previousPageCursor),pt=(0,i.useCallback)(()=>{var Ht;nt((Ht=Ce.value)==null?void 0:Ht.nextPageCursor)},[(Pt=Ce.value)==null?void 0:Pt.nextPageCursor]),St=(0,i.useCallback)(()=>{var Ht;nt((Ht=Ce.value)==null?void 0:Ht.previousPageCursor)},[(Wt=Ce.value)==null?void 0:Wt.previousPageCursor]);(0,i.useEffect)(()=>{Oe!==void 0&&q!==Oe&&nt(void 0)},[q,Oe,nt]);const ut={result:Ce,filters:J,setFilters:z,term:q,setTerm:ue,types:fe,setTypes:Pe,pageCursor:we,setPageCursor:nt,fetchNextPage:Qe?pt:void 0,fetchPreviousPage:Ke?St:void 0},xt=(0,L.EI)({1:ut});return i.createElement(r.AnalyticsContext,{attributes:{searchTypes:fe.sort().join(",")}},i.createElement(D.Provider,{value:xt,children:Ye}))};var re=e(86619),ce=e(7089),Se=e(88013),De=e(69294),Fe=e(48760);const He=(ie,ae,Ye=[],Ge=250)=>{const we=(0,i.useRef)({}),nt=ie||(()=>Promise.resolve([])),[J,z]=(0,De.default)(nt,[ae],{loading:!0});if((0,Fe.Z)(()=>{we.current[ae]===void 0&&(we.current[ae]=z(ae).then(ue=>(we.current[ae]=ue,ue)))},Ge,[z,ae]),Ye.length)return{loading:!1,value:Ye};const q=we.current[ae];return Array.isArray(q)?{loading:!1,value:q}:J},Ae=(ie,ae)=>{const{setFilters:Ye}=x();(0,i.useEffect)(()=>{ae&&[ae].flat().length>0&&Ye(Ge=>({...Ge,[ie]:ae}))},[])},Je=ie=>{const{className:ae,defaultValue:Ye,name:Ge,values:we,valuesDebounceMs:nt,label:J,filterSelectedOptions:z,limitTags:q,multiple:ue}=ie,[fe,Pe]=(0,i.useState)("");Ae(Ge,Ye);const Oe=typeof we=="function"?we:void 0,Ce=typeof we=="function"?void 0:we,{value:Qe,loading:Ke}=He(Oe,fe,Ce,nt),{filters:pt,setFilters:St}=x(),ut=pt[Ge]||(ue?[]:null),xt=(Pt,Wt)=>{St(Ht=>{const{[Ge]:dn,...In}=Ht;return Wt?{...In,[Ge]:Wt}:{...In}})},Lt=Pt=>i.createElement(re.Z,{...Pt,name:"search",variant:"outlined",label:J,fullWidth:!0}),bt=(Pt,Wt)=>Pt.map((Ht,dn)=>i.createElement(ce.Z,{label:Ht,color:"primary",...Wt({index:dn})}));return i.createElement(Se.ZP,{filterSelectedOptions:z,limitTags:q,multiple:ue,className:ae,id:`${ue?"multi-":""}select-filter-${Ge}--select`,options:Qe||[],loading:Ke,value:ut,onChange:xt,onInputChange:(Pt,Wt)=>Pe(Wt),renderInput:Lt,renderTags:bt})},tt=(0,R.Z)({label:{textTransform:"capitalize"}}),Tt=ie=>{const{className:ae,defaultValue:Ye,label:Ge,name:we,values:nt=[],valuesDebounceMs:J}=ie,z=tt(),{filters:q,setFilters:ue}=x();Ae(we,Ye);const fe=typeof nt=="function"?nt:void 0,Pe=typeof nt=="function"?void 0:nt,{value:Oe=[],loading:Ce}=He(fe,"",Pe,J),Qe=Ke=>{const{target:{value:pt,checked:St}}=Ke;ue(ut=>{const{[we]:xt,...Lt}=ut,bt=(xt||[]).filter(Wt=>Wt!==pt),Pt=St?[...bt,pt]:bt;return Pt.length?{...Lt,[we]:Pt}:Lt})};return i.createElement(u.Z,{className:ae,disabled:Ce,fullWidth:!0,"data-testid":"search-checkboxfilter-next"},Ge?i.createElement(m.Z,{className:z.label},Ge):null,Oe.map(Ke=>{var pt;return i.createElement(y.Z,{key:Ke,control:i.createElement(h.Z,{color:"primary",tabIndex:-1,inputProps:{"aria-labelledby":Ke},value:Ke,name:Ke,onChange:Qe,checked:((pt=q[we])!=null?pt:[]).includes(Ke)}),label:Ke})}))},At=ie=>{const{className:ae,defaultValue:Ye,label:Ge,name:we,values:nt,valuesDebounceMs:J}=ie,z=tt();Ae(we,Ye);const q=typeof nt=="function"?nt:void 0,ue=typeof nt=="function"?void 0:nt,{value:fe=[],loading:Pe}=He(q,"",ue,J),{filters:Oe,setFilters:Ce}=x(),Qe=Ke=>{const{target:{value:pt}}=Ke;Ce(St=>{const{[we]:ut,...xt}=St;return pt?{...xt,[we]:pt}:xt})};return i.createElement(u.Z,{disabled:Pe,className:ae,variant:"filled",fullWidth:!0,"data-testid":"search-selectfilter-next"},Ge?i.createElement(E.Z,{className:z.label,margin:"dense"},Ge):null,i.createElement(S.Z,{variant:"outlined",value:Oe[we]||"",onChange:Qe},i.createElement(b.Z,{value:""},i.createElement("em",null,"All")),fe.map(Ke=>i.createElement(b.Z,{key:Ke,value:Ke},Ke))))},Ie=({component:ie,...ae})=>i.createElement(ie,{...ae});Ie.Checkbox=ie=>i.createElement(Ie,{...ie,component:Tt}),Ie.Select=ie=>i.createElement(Ie,{...ie,component:At}),Ie.Autocomplete=ie=>i.createElement(Ie,{...ie,component:Je});var ht=e(82339);const gt=({children:ie})=>{const{result:{loading:ae,error:Ye,value:Ge}}=useSearch();return ae?React.createElement(Progress,null):Ye?React.createElement(ResponseErrorPanel,{title:"Error encountered while fetching search results",error:Ye}):Ge!=null&&Ge.results.length?React.createElement(React.Fragment,null,ie({results:Ge.results})):React.createElement(EmptyState,{missing:"data",title:"Sorry, no results were found"})},lt=ie=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchResult"}},React.createElement(gt,{...ie})),_=(0,R.Z)(ie=>({root:{display:"flex",justifyContent:"space-between",gap:ie.spacing(2),margin:ie.spacing(2,0)}})),pe=()=>{const{fetchNextPage:ie,fetchPreviousPage:ae}=useSearch(),Ye=_();return!ie&&!ae?React.createElement(React.Fragment,null):React.createElement("nav",{"arial-label":"pagination navigation",className:Ye.root},React.createElement(Button,{"aria-label":"previous page",disabled:!ae,onClick:ae,startIcon:React.createElement(ArrowBackIosIcon,null)},"Previous"),React.createElement(Button,{"aria-label":"next page",disabled:!ie,onClick:ie,endIcon:React.createElement(ArrowForwardIosIcon,null)},"Next"))},be=({children:ie})=>{const ae=useAnalytics(),{term:Ye}=useSearch();return useEffect(()=>{Ye&&ae.captureEvent("search",Ye)},[ae,Ye]),React.createElement(React.Fragment,null,ie)},We=({onChange:ie,onKeyDown:ae,onSubmit:Ye,debounceTime:Ge=200,clearButton:we=!0,fullWidth:nt=!0,value:J,inputProps:z={},endAdornment:q,...ue})=>{const fe=useApi(configApiRef),[Pe,Oe]=useState(J),Ce=useSearchContextCheck();useEffect(()=>{Oe(bt=>bt!==J?J:bt)},[J]),useDebounce(()=>ie(Pe),Ge,[Pe]);const Qe=useCallback(bt=>{Oe(bt.target.value)},[Oe]),Ke=useCallback(bt=>{ae&&ae(bt),Ye&&bt.key==="Enter"&&Ye()},[ae,Ye]),pt=useCallback(()=>{ie("")},[ie]),St=`Search in ${fe.getOptionalString("app.title")||"Backstage"}`,ut=React.createElement(InputAdornment,{position:"start"},React.createElement(IconButton,{"aria-label":"Query",disabled:!0},React.createElement(SearchIcon,null))),xt=React.createElement(InputAdornment,{position:"end"},React.createElement(IconButton,{"aria-label":"Clear",onClick:pt},React.createElement(ClearButton,null))),Lt=React.createElement(TrackSearch,null,React.createElement(InputBase,{"data-testid":"search-bar-next",value:Pe,placeholder:St,startAdornment:ut,endAdornment:we?xt:q,inputProps:{"aria-label":"Search",...z},fullWidth:nt,onChange:Qe,onKeyDown:Ke,...ue}));return Ce?Lt:React.createElement(SearchContextProvider,null,Lt)},et=({onChange:ie,...ae})=>{const{term:Ye,setTerm:Ge}=useSearch(),we=useCallback(nt=>{ie?ie(nt):Ge(nt)},[ie,Ge]);return React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"SearchBar"}},React.createElement(We,{value:Ye,onChange:we,...ae}))},at=({result:ie,highlight:ae,rank:Ye,icon:Ge,secondaryAction:we,lineClamp:nt=5})=>{const J=useAnalytics(),z=()=>{J.captureEvent("discover",ie.title,{attributes:{to:ie.location},value:Ye})};return React.createElement(Link,{noTrack:!0,to:ie.location,onClick:z},React.createElement(ListItem,{alignItems:"center"},Ge&&React.createElement(ListItemIcon,null,Ge),React.createElement(ListItemText,{primaryTypographyProps:{variant:"h6"},primary:ae!=null&&ae.fields.title?React.createElement(HighlightedSearchResultText,{text:ae.fields.title,preTag:ae.preTag,postTag:ae.postTag}):ie.title,secondary:React.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:nt,overflow:"hidden"}},ae!=null&&ae.fields.text?React.createElement(HighlightedSearchResultText,{text:ae.fields.text,preTag:ae.preTag,postTag:ae.postTag}):ie.text)}),we&&React.createElement(Box,{alignItems:"flex-end"},we)),React.createElement(Divider,null))},yt=ie=>React.createElement(AnalyticsContext,{attributes:{pluginId:"search",extension:"DefaultResultListItem"}},React.createElement(at,{...ie}))},56338:function(ne,s,e){"use strict";e.d(s,{Ox:function(){return Ae},Zz:function(){return R},oZ:function(){return ce},DR:function(){return f},ZS:function(){return K},VA:function(){return Tt},KY:function(){return u},gT:function(){return S},Dl:function(){return b},ux:function(){return tt},$L:function(){return E},x1:function(){return re}});var r=e(2784),t=e(10289),c=e(36964);const i="techdocs.addons.addon.v1",R="techdocs.addons.wrapper.v1",f=()=>null;(0,c.attachComponentData)(f,R,!0);const o=_=>`${i}.${_.toLocaleLowerCase("en-US")}`;function u(_){const{name:pe,component:be}=_;return(0,c.createReactExtension)({name:pe,component:{sync:We=>r.createElement(be,{...We})},data:{[i]:_,[o(pe)]:!0}})}const m=(_,pe)=>_.selectByComponentData({key:pe}).getElements()[0],y=_=>_.selectByComponentData({key:R}).selectByComponentData({key:i}),h=_=>_.selectByComponentData({key:R}).findComponentData({key:i}),E=()=>{const _=(0,t.pC)(),pe=(0,c.useElementFilter)(_,y),be=(0,c.useElementFilter)(_,h),We=(0,r.useCallback)(yt=>{var ae;if(!pe||!yt)return null;const ie=o(yt.name);return(ae=m(pe,ie))!=null?ae:null},[pe]),et=(0,r.useCallback)(yt=>{const ie=be.find(ae=>ae.name===yt);return ie?We(ie):null},[be,We]),at=(0,r.useCallback)(yt=>{const ie=be.filter(ae=>ae.location===yt);return ie.length?ie.map(We):null},[be,We]);return{renderComponentByName:et,renderComponentsByLocation:at}},S=(0,c.createApiRef)({id:"plugin.techdocs.service"}),b=(0,c.createApiRef)({id:"plugin.techdocs.storageservice"});var L=e(64279),$=e(48023),F=e(76241);function D(_,pe){return pe.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")||(_.kind=_.kind.toLocaleLowerCase(),_.name=_.name.toLocaleLowerCase(),_.namespace=_.namespace.toLocaleLowerCase()),_}const x=(_,pe)=>(0,$.eE)(_)===(0,$.eE)(pe),O={title:"",subtitle:"",setTitle:()=>{},setSubtitle:()=>{},setShadowRoot:()=>{},metadata:{loading:!0},entityMetadata:{loading:!0},entityRef:{kind:"",name:"",namespace:""}},w=(0,F.CT)("techdocs-reader-page-context"),K=(0,r.memo)(({entityRef:_,children:pe})=>{const be=(0,c.useApi)(S),We=(0,c.useApi)(c.configApiRef),et=(0,L.default)(async()=>be.getTechDocsMetadata(_),[_]),at=(0,L.default)(async()=>be.getEntityMetadata(_),[_]),[yt,ie]=(0,r.useState)(O.title),[ae,Ye]=(0,r.useState)(O.subtitle),[Ge,we]=(0,r.useState)(O.shadowRoot),nt={metadata:et,entityRef:D(_,We),entityMetadata:at,shadowRoot:Ge,setShadowRoot:we,title:yt,setTitle:ie,subtitle:ae,setSubtitle:Ye},J=(0,F.EI)({1:nt});return r.createElement(w.Provider,{value:J},pe instanceof Function?pe(nt):pe)},(_,pe)=>x(_.entityRef,pe.entityRef)),re=()=>{const _=(0,r.useContext)(w);if(_===void 0)return O;const pe=_.atVersion(1);if(pe===void 0)throw new Error("No context found for version 1.");return pe},ce=Object.freeze({Header:"Header",Subheader:"Subheader",Settings:"Settings",PrimarySidebar:"PrimarySidebar",SecondarySidebar:"SecondarySidebar",Content:"Content"});var Se=e(6553),De=e(50236),Fe=e(19219),He=e(82339);const Ae="TECH_DOCS_SHADOW_DOM_STYLE_LOAD",Je=_=>{(0,r.useEffect)(()=>{var at;if(!_)return()=>{};const pe=_.querySelectorAll('head > link[rel="stylesheet"]');let be=(at=pe==null?void 0:pe.length)!=null?at:0;const We=new CustomEvent(Ae);if(!be)return _.dispatchEvent(We),()=>{};const et=()=>{--be===0&&_.dispatchEvent(We)};return pe==null||pe.forEach(yt=>{yt.addEventListener("load",et)}),()=>{pe==null||pe.forEach(yt=>{yt.removeEventListener("load",et)})}},[_])},tt=_=>{const[pe,be]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!_)return()=>{};be(!0);const We=_.style;We.setProperty("opacity","0");const et=()=>{be(!1),We.setProperty("opacity","1")};return _.addEventListener(Ae,et),()=>{_.removeEventListener(Ae,et)}},[_]),pe},Tt=({element:_,onAppend:pe,children:be})=>{const[We,et]=(0,r.useState)((0,Se.Ue)({...(0,De.Z)(),insertionPoint:void 0}));Je(_);const at=tt(_),yt=(0,r.useCallback)(ie=>{if(!_||!ie)return;et((0,Se.Ue)({...(0,De.Z)(),insertionPoint:_.querySelector("head")||void 0}));let ae=ie.shadowRoot;ae||(ae=ie.attachShadow({mode:"open"})),ae.replaceChildren(_),typeof pe=="function"&&pe(ae)},[_,pe]);return r.createElement(r.Fragment,null,at&&r.createElement(He.Progress,null),r.createElement(Fe.ZP,{jss:We,sheetsManager:new Map},r.createElement("div",{ref:yt,"data-testid":"techdocs-native-shadowroot"}),be))};var At=e(54073);const Ie=()=>{const{shadowRoot:_}=useTechDocsReaderPage();return _},ht=_=>{const pe=Ie();return pe?_.map(be=>pe==null?void 0:pe.querySelectorAll(be)).filter(be=>be.length).map(be=>Array.from(be)).flat():[]},gt=_=>_.toString()&&_.rangeCount&&_.getRangeAt(0).getBoundingClientRect().top,lt=(_=0)=>{const pe=Ie(),[be,We]=useState(null),et=useMemo(()=>debounce(()=>{const at=pe,yt=at.getSelection?at.getSelection():document.getSelection();yt&>(yt)?We(yt):We(null)},_),[pe,We,_]);return useEffect(()=>(window.document.addEventListener("selectionchange",et),()=>window.document.removeEventListener("selectionchange",et)),[et]),be}},94067:function(ne,s,e){"use strict";e.r(s),e.d(s,{EmbeddedDocsRouter:function(){return L},Router:function(){return b},isTechDocsAvailable:function(){return S}});var r=e(2784),t=e(10289),c=e(17429),i=e(82339),R=e(48023),f=e(20961),o=e(16172),u=e(63126);const m=({entity:$})=>{const F=(0,R.iB)($);return r.createElement(f.I6,{entityRef:F},r.createElement(o.b,null),r.createElement(u.F,{withSearch:!1}))};var y=e(50021),h=e(26220);const E="backstage.io/techdocs-ref",S=$=>{var F,D;return Boolean((D=(F=$==null?void 0:$.metadata)==null?void 0:F.annotations)==null?void 0:D[E])},b=()=>r.createElement(t.Z5,null,r.createElement(t.AW,{path:"/",element:r.createElement(y.TechDocsIndexPage,null)}),r.createElement(t.AW,{path:"/:namespace/:kind/:name/*",element:r.createElement(h.TechDocsReaderPage,null)})),L=$=>{var w;const{children:F}=$,{entity:D}=(0,c.useEntity)(),x=(0,t.V$)([{path:"/*",element:r.createElement(m,{entity:D}),children:[{path:"/*",element:F}]}]);return((w=D.metadata.annotations)==null?void 0:w[E])?x:r.createElement(i.MissingAnnotationEmptyState,{annotation:E})}},3337:function(ne,s,e){"use strict";var r=e(36964);const t=(0,r.createApiRef)({id:"plugin.techdocs.storageservice"}),c=(0,r.createApiRef)({id:"plugin.techdocs.service"})},42723:function(ne,s,e){"use strict";e.d(s,{k:function(){return R},p:function(){return i}});var r=e(10179),t=e(76372),c=e.n(t);class i{constructor(o){X(this,"configApi");X(this,"discoveryApi");X(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getTechDocsMetadata(o){const{kind:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/techdocs/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}async getEntityMetadata(o){const{kind:u,namespace:m,name:y}=o,E=`${await this.getApiOrigin()}/metadata/entity/${m}/${u}/${y}`,S=await this.fetchApi.fetch(`${E}`);if(!S.ok)throw await r.VL.fromResponse(S);return await S.json()}}class R{constructor(o){X(this,"configApi");X(this,"discoveryApi");X(this,"identityApi");X(this,"fetchApi");this.configApi=o.configApi,this.discoveryApi=o.discoveryApi,this.identityApi=o.identityApi,this.fetchApi=o.fetchApi}async getApiOrigin(){return await this.discoveryApi.getBaseUrl("techdocs")}async getStorageUrl(){var o;return(o=this.configApi.getOptionalString("techdocs.storageUrl"))!=null?o:`${await this.discoveryApi.getBaseUrl("techdocs")}/static/docs`}async getBuilder(){return this.configApi.getString("techdocs.builder")}async getEntityDocs(o,u){const{kind:m,namespace:y,name:h}=o,S=`${await this.getStorageUrl()}/${y}/${m}/${h}/${u}`,b=await this.fetchApi.fetch(`${S.endsWith("/")?S:`${S}/`}index.html`);let L="";switch(b.status){case 404:throw L="Page not found. ",u||(L+="This could be because there is no index.md file in the root of the docs directory of this repository."),new r.dR(L);case 500:throw L="Could not generate documentation or an error in the TechDocs backend. ",new Error(L);default:break}return b.text()}async syncEntityDocs(o,u=()=>{}){const{kind:m,namespace:y,name:h}=o,S=`${await this.getApiOrigin()}/sync/${y}/${m}/${h}`,{token:b}=await this.identityApi.getCredentials();return new Promise((L,$)=>{const F=new t.EventSourcePolyfill(S,{withCredentials:!0,headers:b?{Authorization:`Bearer ${b}`}:{}});F.addEventListener("log",D=>{D.data&&u(JSON.parse(D.data))}),F.addEventListener("finish",D=>{let x=!1;D.data&&({updated:x}=JSON.parse(D.data)),L(x?"updated":"cached")}),F.onerror=D=>{switch(F.close(),D.status){case 404:$(new r.dR(D.message));return;default:$(new Error(D.data));return}}})}async getBaseUrl(o,u,m){const{kind:y,namespace:h,name:E}=u,b=`${await this.getApiOrigin()}/static/docs/${h}/${y}/${E}/${m}`;return new URL(o,b.endsWith("/")?b:`${b}/`).toString()}}},97589:function(ne,s,e){"use strict";e.d(s,{D:function(){return r}});function r(t,c){return c.getOptionalBoolean("techdocs.legacyUseCaseSensitiveTripletPaths")?t:t.toLocaleLowerCase("en-US")}},2546:function(ne,s,e){"use strict";e.d(s,{u:function(){return o}});var r=e(2784),t=e(82339),c=e(17429),i=e(1114),R=e(70335),f=e(21956);const o=u=>{const{initialFilter:m="owned",columns:y,actions:h}=u;return r.createElement(i.j,null,r.createElement(t.Content,null,r.createElement(t.ContentHeader,{title:""},r.createElement(t.SupportButton,null,"Discover documentation in your ecosystem.")),r.createElement(c.EntityListProvider,null,r.createElement(c.CatalogFilterLayout,null,r.createElement(c.CatalogFilterLayout.Filters,null,r.createElement(R.f,null),r.createElement(c.UserListPicker,{initialFilter:m}),r.createElement(c.EntityOwnerPicker,null),r.createElement(c.EntityTagPicker,null)),r.createElement(c.CatalogFilterLayout.Content,null,r.createElement(f.EntityListDocsTable,{actions:h,columns:y}))))))}},51016:function(ne,s,e){"use strict";e.d(s,{f:function(){return y}});var r=e(68725),t=e(97589),c=e(36964),i=e(82339),R=e(94339),f=e(16111),o=e(24579),u=e(14503),m=e(2784);const y=S=>{const{entities:b}=S,L=(0,c.useRouteRef)(r.Fw),$=(0,c.useApi)(c.configApiRef);return b?m.createElement(i.ItemCardGrid,{"data-testid":"docs-explore"},b!=null&&b.length?b.map((F,D)=>{var x,O;return m.createElement(R.Z,{key:D},m.createElement(f.Z,null,m.createElement(i.ItemCardHeader,{title:(x=F.metadata.title)!=null?x:F.metadata.name})),m.createElement(o.Z,null,F.metadata.description),m.createElement(u.Z,null,m.createElement(i.Button,{to:L({namespace:(0,t.D)((O=F.metadata.namespace)!=null?O:"default",$),kind:(0,t.D)(F.kind,$),name:(0,t.D)(F.metadata.name,$)}),color:"primary","data-testid":"read_docs"},"Read Docs")))}):null):null};var h=e(17429);const E=()=>{const{loading:S,error:b,entities:L}=useEntityList();return b?React.createElement(WarningPanel,{severity:"error",title:"Could not load available documentation."},React.createElement(CodeSnippet,{language:"text",text:b.toString()})):S||!L?React.createElement(Progress,null):(L.sort(($,F)=>{var D,x;return((D=$.metadata.title)!=null?D:$.metadata.name).localeCompare((x=F.metadata.title)!=null?x:F.metadata.name)}),React.createElement(DocsCardGrid,{entities:L}))}},38634:function(ne,s,e){"use strict";e.d(s,{H:function(){return h}});var r=e(2784),t=e(95074),c=e(36964),i=e(48023),R=e(17429),f=e(68725),o=e(82339),u=e(98095),m=e(3792),y=e(97589);const h=E=>{const{entities:S,title:b,loading:L,columns:$,actions:F}=E,[,D]=(0,t.Z)(),x=(0,c.useRouteRef)(f.Fw),O=(0,c.useApi)(c.configApiRef);if(!S)return null;const w=S.map(ce=>{var De;const Se=(0,R.getEntityRelations)(ce,i.S4);return{entity:ce,resolved:{docsUrl:x({namespace:(0,y.D)((De=ce.metadata.namespace)!=null?De:"default",O),kind:(0,y.D)(ce.kind,O),name:(0,y.D)(ce.metadata.name,O)}),ownedByRelations:Se,ownedByRelationsTitle:Se.map(Fe=>(0,R.humanizeEntityRef)(Fe,{defaultKind:"group"})).join(", ")}}}),K=[m.N.createNameColumn(),m.N.createOwnerColumn(),m.N.createTypeColumn()],re=[u.n.createCopyDocsUrlAction(D)];return r.createElement(r.Fragment,null,L||w&&w.length>0?r.createElement(o.Table,{isLoading:L,options:{paging:!0,pageSize:20,search:!0,actionsColumnIndex:-1},data:w,columns:$||K,actions:F||re,title:b?`${b} (${w.length})`:`All (${w.length})`}):r.createElement(o.EmptyState,{missing:"data",title:"No documents to show",description:"Create your own document. Check out our Getting Started Information",action:r.createElement(o.Button,{color:"primary",to:"https://backstage.io/docs/features/techdocs/getting-started",variant:"contained"},"DOCS")}))};h.columns=m.N,h.actions=u.n},12481:function(ne,s,e){"use strict";e.d(s,{n:function(){return y}});var r=e(2784),t=e(95074),c=e(76635),i=e.n(c),R=e(82339),f=e(17429),o=e(38634),u=e(98095),m=e(3792);const y=h=>{var re,ce;const{columns:E,actions:S}=h,{loading:b,error:L,entities:$,filters:F}=(0,f.useEntityList)(),{isStarredEntity:D,toggleStarredEntity:x}=(0,f.useStarredEntities)(),[,O]=(0,t.Z)(),w=(0,c.capitalize)((ce=(re=F.user)==null?void 0:re.value)!=null?ce:"all"),K=[u.n.createCopyDocsUrlAction(O),u.n.createStarEntityAction(D,x)];return L?r.createElement(R.WarningPanel,{severity:"error",title:"Could not load available documentation."},r.createElement(R.CodeSnippet,{language:"text",text:L.toString()})):r.createElement(o.H,{title:w,entities:$,loading:b,actions:S||K,columns:E})};y.columns=m.N,y.actions=u.n},98095:function(ne,s,e){"use strict";e.d(s,{n:function(){return o}});var r=e(2784),t=e(39981),c=e(2337),i=e(11640),R=e(28347);const f=(0,c.Z)({root:{color:"#f3ba37"}})(i.Z),o={createCopyDocsUrlAction(u){return m=>({icon:()=>r.createElement(t.Z,{fontSize:"small"}),tooltip:"Click to copy documentation link to clipboard",onClick:()=>u(`${window.location.origin}${m.resolved.docsUrl}`)})},createStarEntityAction(u,m){return({entity:y})=>{const h=u(y);return{cellStyle:{paddingLeft:"1em"},icon:()=>h?r.createElement(f,null):r.createElement(R.Z,null),tooltip:h?"Remove from favorites":"Add to favorites",onClick:()=>m(y)}}}}},3792:function(ne,s,e){"use strict";e.d(s,{N:function(){return R}});var r=e(2784),t=e(82339),c=e(17429);function i(f){return f.metadata.title||f.metadata.name}const R={createNameColumn(){return{title:"Document",field:"entity.metadata.name",highlight:!0,render:f=>r.createElement(t.SubvalueCell,{value:r.createElement(t.Link,{to:f.resolved.docsUrl},i(f.entity)),subvalue:f.entity.metadata.description})}},createOwnerColumn(){return{title:"Owner",field:"resolved.ownedByRelationsTitle",render:({resolved:f})=>r.createElement(c.EntityRefLinks,{entityRefs:f.ownedByRelations,defaultKind:"group"})}},createTypeColumn(){return{title:"Type",field:"entity.spec.type"}}}},21956:function(ne,s,e){"use strict";e.d(s,{DocsTable:function(){return t.H},EntityListDocsTable:function(){return r.n}});var r=e(12481),t=e(38634),c=e(72580),i=e.n(c);e.o(c,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return c.DefaultTechDocsHome}})},72580:function(){},50021:function(ne,s,e){"use strict";e.r(s),e.d(s,{TechDocsIndexPage:function(){return i}});var r=e(2784),t=e(10289),c=e(2546);const i=R=>(0,t.pC)()||r.createElement(c.u,{...R})},1114:function(ne,s,e){"use strict";e.d(s,{j:function(){return i}});var r=e(2784),t=e(82339),c=e(36964);const i=R=>{var m;const{children:f}=R,u=`Documentation available in ${(m=(0,c.useApi)(c.configApiRef).getOptionalString("organization.name"))!=null?m:"Backstage"}`;return r.createElement(t.PageWithHeader,{title:"Documentation",subtitle:u,themeId:"documentation"},f)}},70335:function(ne,s,e){"use strict";e.d(s,{f:function(){return i}});var r=e(2784),t=e(17429);class c{getCatalogFilters(){return{"metadata.annotations.backstage.io/techdocs-ref":t.CATALOG_FILTER_EXISTS}}}const i=()=>{const{updateFilters:R}=(0,t.useEntityList)();return(0,r.useEffect)(()=>{R({techdocs:new c})},[R]),null}},19192:function(ne,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return c.u}});var r=e(51016),t=e(21956),c=e(2546),i=e(1114),R=e(70335)},82250:function(ne,s,e){"use strict";e.d(s,{DefaultTechDocsHome:function(){return o.DefaultTechDocsHome},TechDocsIndexPage:function(){return u.Jl},TechDocsReaderPage:function(){return u.I6},TechDocsReaderPageContent:function(){return R.Fq},TechDocsReaderPageHeader:function(){return R.SE},plugin:function(){return u.s4},techdocsPlugin:function(){return u.s4}});var r=e(98157),t=e.n(r);e.o(r,"DefaultTechDocsHome")&&e.d(s,{DefaultTechDocsHome:function(){return r.DefaultTechDocsHome}}),e.o(r,"TechDocsReaderPageContent")&&e.d(s,{TechDocsReaderPageContent:function(){return r.TechDocsReaderPageContent}}),e.o(r,"TechDocsReaderPageHeader")&&e.d(s,{TechDocsReaderPageHeader:function(){return r.TechDocsReaderPageHeader}});var c=e(3337),i=e(42723),R=e(96393),f=e(47861),o=e(19192),u=e(20961),m=e(94067)},20961:function(ne,s,e){"use strict";e.d(s,{I6:function(){return y},Jl:function(){return m},s4:function(){return R}});var r=e(56338),t=e(42723),c=e(68725),i=e(36964);const R=(0,i.createPlugin)({id:"techdocs",apis:[(0,i.createApiFactory)({api:r.Dl,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,identityApi:i.identityApiRef,fetchApi:i.fetchApiRef},factory:({configApi:h,discoveryApi:E,identityApi:S,fetchApi:b})=>new t.k({configApi:h,discoveryApi:E,identityApi:S,fetchApi:b})}),(0,i.createApiFactory)({api:r.gT,deps:{configApi:i.configApiRef,discoveryApi:i.discoveryApiRef,fetchApi:i.fetchApiRef},factory:({configApi:h,discoveryApi:E,fetchApi:S})=>new t.p({configApi:h,discoveryApi:E,fetchApi:S})})],routes:{root:c._Z,docRoot:c.Fw,entityContent:c.pd}}),f=R.provide((0,i.createRoutableExtension)({name:"TechdocsPage",component:()=>Promise.resolve().then(e.bind(e,94067)).then(h=>h.Router),mountPoint:c._Z})),o=R.provide((0,i.createRoutableExtension)({name:"EntityTechdocsContent",component:()=>Promise.resolve().then(e.bind(e,94067)).then(h=>h.EmbeddedDocsRouter),mountPoint:c.pd})),u=R.provide((0,i.createRoutableExtension)({name:"TechDocsCustomHome",component:()=>e.e(7110).then(e.bind(e,57110)).then(h=>h.TechDocsCustomHome),mountPoint:c._Z})),m=R.provide((0,i.createRoutableExtension)({name:"TechDocsIndexPage",component:()=>Promise.resolve().then(e.bind(e,50021)).then(h=>h.TechDocsIndexPage),mountPoint:c._Z})),y=R.provide((0,i.createRoutableExtension)({name:"TechDocsReaderPage",component:()=>Promise.resolve().then(e.bind(e,26220)).then(h=>h.TechDocsReaderPage),mountPoint:c.Fw}))},26220:function(ne,s,e){"use strict";e.r(s),e.d(s,{TechDocsReaderLayout:function(){return u},TechDocsReaderPage:function(){return m}});var r=e(2784),t=e(10289),c=e(82339),i=e(56338),R=e(63126),f=e(99954),o=e(16172);const u=({withSearch:y,withHeader:h=!0})=>r.createElement(c.Page,{themeId:"documentation"},h&&r.createElement(f.S,null),r.createElement(o.b,null),r.createElement(R.F,{withSearch:y})),m=y=>{const{kind:h,name:E,namespace:S}=(0,t.UO)(),{children:b,entityRef:L={kind:h,name:E,namespace:S}}=y,$=(0,t.pC)();if(!b){const D=($?r.Children.toArray($.props.children):[]).find(x=>{var w,K;const{type:O}=x;return!((K=(w=O==null?void 0:O.__backstage_data)==null?void 0:w.map)!=null&&K.get(i.Zz))});return r.createElement(i.ZS,{entityRef:L},D||r.createElement(u,null))}return r.createElement(i.ZS,{entityRef:L},({metadata:F,entityMetadata:D,onReady:x})=>r.createElement("div",{className:"techdocs-reader-page"},r.createElement(c.Page,{themeId:"documentation"},b instanceof Function?b({entityRef:L,techdocsMetadataValue:F.value,entityMetadataValue:D.value,onReady:x}):b)))}},63126:function(ne,s,e){"use strict";e.d(s,{F:function(){return tn}});var r=e(2784),t=e(79692),c=e(60905),i=e(56338),R=e(82339),f=e(47861),o=e(4614),u=e(77277),m=e(99688),y=e(12420),h=e(90436),E=e(61837),S=e(4190),b=e(87685);const L=(0,t.Z)(U=>(0,y.Z)({paper:{width:"100%",[U.breakpoints.up("sm")]:{width:"75%"},[U.breakpoints.up("md")]:{width:"50%"},padding:U.spacing(2.5)},root:{height:"100%",overflow:"hidden"},logs:{background:U.palette.background.default}})),$=({buildLog:U,onClose:oe})=>{const te=L(),Ee=U.length===0?"Waiting for logs...":U.join(`
|
|
32
|
-
`);return r.createElement(c.Z,{container:!0,direction:"column",className:te.root,spacing:0,wrap:"nowrap"},r.createElement(c.Z,{item:!0,container:!0,justifyContent:"space-between",alignItems:"center",spacing:0,wrap:"nowrap"},r.createElement(h.Z,{variant:"h5"},"Build Details"),r.createElement(E.Z,{key:"dismiss",title:"Close the drawer",onClick:oe,color:"inherit"},r.createElement(b.Z,null))),r.createElement(R.LogViewer,{text:Ee,classes:{root:te.logs}}))},F=({buildLog:U})=>{const oe=L(),[te,Ee]=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement(u.Z,{color:"inherit",onClick:()=>Ee(!0)},"Show Build Logs"),r.createElement(S.ZP,{classes:{paper:oe.paper},anchor:"right",open:te,onClose:()=>Ee(!1)},r.createElement($,{buildLog:U,onClose:()=>Ee(!1)})))};var D=e(36964);const x=({errorMessage:U})=>{const oe=(0,D.useApi)(D.configApiRef).getOptionalString("techdocs.builder");let te="";return oe!=="local"&&(te="Note that techdocs.builder is not set to 'local' in your config, which means this Backstage app will not generate docs if they are not found. Make sure the project's docs are generated and published by some external process (e.g. CI/CD pipeline). Or change techdocs.builder to 'local' to generate docs from this Backstage instance."),r.createElement(R.ErrorPage,{status:"404",statusMessage:U||"Documentation not found",additionalInfo:te})};var O=e(2263);const w=(0,t.Z)(U=>({root:{marginBottom:U.spacing(2)},message:{wordBreak:"break-word",overflowWrap:"anywhere"}})),K=()=>{let U=null;const oe=w(),{state:te,contentReload:Ee,contentErrorMessage:$e,syncErrorMessage:dt,buildLog:Ne}=(0,O.DK)();return te==="INITIAL_BUILD"&&(U=r.createElement(m.Z,{classes:{root:oe.root},variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(F,{buildLog:Ne})},"Documentation is accessed for the first time and is being prepared. The subsequent loads are much faster.")),te==="CONTENT_STALE_REFRESHING"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"info",icon:r.createElement(o.Z,{size:"24px"}),action:r.createElement(F,{buildLog:Ne}),classes:{root:oe.root}},"A newer version of this documentation is being prepared and will be available shortly.")),te==="CONTENT_STALE_READY"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"success",action:r.createElement(u.Z,{color:"inherit",onClick:()=>Ee()},"Refresh"),classes:{root:oe.root}},"A newer version of this documentation is now available, please refresh to view.")),te==="CONTENT_STALE_ERROR"&&(U=r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(F,{buildLog:Ne}),classes:{root:oe.root,message:oe.message}},"Building a newer version of this documentation failed."," ",dt)),te==="CONTENT_NOT_FOUND"&&(U=r.createElement(r.Fragment,null,dt&&r.createElement(m.Z,{variant:"outlined",severity:"error",action:r.createElement(F,{buildLog:Ne}),classes:{root:oe.root,message:oe.message}},"Building a newer version of this documentation failed."," ",dt),r.createElement(x,{errorMessage:$e}))),U};var re=e(10289),ce=e(60364),Se=e(41156),De=e(36356),Fe=e(35368),He=e.n(Fe);const Ae=/main\.[A-Fa-f0-9]{8}\.min\.css$/,Je=/^https:\/\/fonts\.googleapis\.com/,tt=/^https:\/\/fonts\.gstatic\.com/,Tt=U=>U.nodeName==="LINK",At=U=>{const oe=(U==null?void 0:U.getAttribute("href"))||"",te=oe.match(Ae),Ee=oe.match(Je),$e=oe.match(tt);return te||Ee||$e},Ie=U=>(Tt(U)&&!At(U)&&U.remove(),U),ht=U=>U.nodeName==="IFRAME",gt=(U,oe)=>{const te=U.getAttribute("src")||"";try{const{host:Ee}=new URL(te);return oe.includes(Ee)}catch{return!1}},lt=U=>oe=>(ht(oe)&&!gt(oe,U)&&oe.remove(),oe),_=()=>{const U=(0,D.useApi)(D.configApiRef);return(0,r.useMemo)(()=>U.getOptionalConfig("techdocs.sanitizer"),[U])},pe=()=>{const U=_();return(0,r.useCallback)(async oe=>{const te=U==null?void 0:U.getOptionalStringArray("allowedIframeHosts");He().addHook("beforeSanitizeElements",Ie);const Ee=["link"];return te&&(Ee.push("iframe"),He().addHook("beforeSanitizeElements",lt(te))),He().sanitize(oe.innerHTML,{ADD_TAGS:Ee,FORBID_TAGS:["style"],WHOLE_DOCUMENT:!0,RETURN_DOM:!0})},[U])};var be=e(41128),We=({theme:U})=>`
|
|
33
|
-
/*================== Variables ==================*/
|
|
34
|
-
/*
|
|
35
|
-
As the MkDocs output is rendered in shadow DOM, the CSS variable definitions on the root selector are not applied. Instead, they have to be applied on :host.
|
|
36
|
-
As there is no way to transform the served main*.css yet (for example in the backend), we have to copy from main*.css and modify them.
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
:host {
|
|
40
|
-
/* FONT */
|
|
41
|
-
--md-default-fg-color: ${U.palette.text.primary};
|
|
42
|
-
--md-default-fg-color--light: ${U.palette.text.secondary};
|
|
43
|
-
--md-default-fg-color--lighter: ${(0,be.$n)(U.palette.text.secondary,.7)};
|
|
44
|
-
--md-default-fg-color--lightest: ${(0,be.$n)(U.palette.text.secondary,.3)};
|
|
45
|
-
|
|
46
|
-
/* BACKGROUND */
|
|
47
|
-
--md-default-bg-color:${U.palette.background.default};
|
|
48
|
-
--md-default-bg-color--light: ${U.palette.background.paper};
|
|
49
|
-
--md-default-bg-color--lighter: ${(0,be.$n)(U.palette.background.paper,.7)};
|
|
50
|
-
--md-default-bg-color--lightest: ${(0,be.$n)(U.palette.background.paper,.3)};
|
|
51
|
-
|
|
52
|
-
/* PRIMARY */
|
|
53
|
-
--md-primary-fg-color: ${U.palette.primary.main};
|
|
54
|
-
--md-primary-fg-color--light: ${U.palette.primary.light};
|
|
55
|
-
--md-primary-fg-color--dark: ${U.palette.primary.dark};
|
|
56
|
-
--md-primary-bg-color: ${U.palette.primary.contrastText};
|
|
57
|
-
--md-primary-bg-color--light: ${(0,be.$n)(U.palette.primary.contrastText,.7)};
|
|
58
|
-
|
|
59
|
-
/* ACCENT */
|
|
60
|
-
--md-accent-fg-color: var(--md-primary-fg-color);
|
|
61
|
-
|
|
62
|
-
/* SHADOW */
|
|
63
|
-
--md-shadow-z1: ${U.shadows[1]};
|
|
64
|
-
--md-shadow-z2: ${U.shadows[2]};
|
|
65
|
-
--md-shadow-z3: ${U.shadows[3]};
|
|
66
|
-
|
|
67
|
-
/* EXTENSIONS */
|
|
68
|
-
--md-admonition-fg-color: var(--md-default-fg-color);
|
|
69
|
-
--md-admonition-bg-color: var(--md-default-bg-color);
|
|
70
|
-
/* Admonitions and others are using SVG masks to define icons. These masks are defined as CSS variables. */
|
|
71
|
-
--md-admonition-icon--note: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');
|
|
72
|
-
--md-admonition-icon--abstract: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');
|
|
73
|
-
--md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10A10 10 0 0012 2z"/></svg>');
|
|
74
|
-
--md-admonition-icon--tip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2c-.23-.3-.5-.56-.76-.82-.65-.6-1.4-1.03-2.03-1.66C13.3 7.26 13 4.85 13.91 3c-.91.23-1.75.75-2.45 1.32-2.54 2.08-3.54 5.75-2.34 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.22.1-.46.04-.64-.12a.83.83 0 01-.15-.17c-1.1-1.43-1.28-3.48-.53-5.12C5.89 10 5 12.3 5.14 14.47c.04.5.1 1 .27 1.5.14.6.4 1.2.72 1.73 1.04 1.73 2.87 2.97 4.84 3.22 2.1.27 4.35-.12 5.96-1.6 1.8-1.66 2.45-4.32 1.5-6.6l-.13-.26c-.2-.46-.47-.87-.8-1.25l.05-.01m-3.1 6.3c-.28.24-.73.5-1.08.6-1.1.4-2.2-.16-2.87-.82 1.19-.28 1.89-1.16 2.09-2.05.17-.8-.14-1.46-.27-2.23-.12-.74-.1-1.37.18-2.06.17.38.37.76.6 1.06.76 1 1.95 1.44 2.2 2.8.04.14.06.28.06.43.03.82-.32 1.72-.92 2.27h.01z"/></svg>');
|
|
75
|
-
--md-admonition-icon--success: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
76
|
-
--md-admonition-icon--question: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.07 11.25l-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 00-2-2 2 2 0 00-2 2H8a4 4 0 014-4 4 4 0 014 4 3.2 3.2 0 01-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 002 12a10 10 0 0010 10 10 10 0 0010-10c0-5.53-4.5-10-10-10z"/></svg>');
|
|
77
|
-
--md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2v-4h2m0 8h-2v-2h2M1 21h22L12 2 1 21z"/></svg>');
|
|
78
|
-
--md-admonition-icon--failure: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12 6.47 2 12 2m3.59 5L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41 15.59 7z"/></svg>');
|
|
79
|
-
--md-admonition-icon--danger: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 20l4.86-9.73H13V4l-5 9.73h3.5V20M12 2c2.75 0 5.1 1 7.05 2.95C21 6.9 22 9.25 22 12s-1 5.1-2.95 7.05C17.1 21 14.75 22 12 22s-5.1-1-7.05-2.95C3 17.1 2 14.75 2 12s1-5.1 2.95-7.05C6.9 3 9.25 2 12 2z"/></svg>');
|
|
80
|
-
--md-admonition-icon--bug: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 12h-4v-2h4m0 6h-4v-2h4m6-6h-2.81a5.985 5.985 0 00-1.82-1.96L17 4.41 15.59 3l-2.17 2.17a6.002 6.002 0 00-2.83 0L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8z"/></svg>');
|
|
81
|
-
--md-admonition-icon--example: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13v-2h14v2H7m0 6v-2h14v2H7M7 7V5h14v2H7M3 8V5H2V4h2v4H3m-1 9v-1h3v4H2v-1h2v-.5H3v-1h1V17H2m2.25-7a.75.75 0 01.75.75c0 .2-.08.39-.21.52L3.12 13H5v1H2v-.92L4 11H2v-1h2.25z"/></svg>');
|
|
82
|
-
--md-admonition-icon--quote: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 17h3l2-4V7h-6v6h3M6 17h3l2-4V7H5v6h3l-2 4z"/></svg>');
|
|
83
|
-
--md-footnotes-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.42L5.83 13H21V7h-2z"/></svg>');
|
|
84
|
-
--md-details-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
85
|
-
--md-tasklist-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>');
|
|
86
|
-
--md-tasklist-icon--checked: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>');
|
|
87
|
-
--md-nav-icon--prev: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>');
|
|
88
|
-
--md-nav-icon--next: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>');
|
|
89
|
-
--md-toc-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>');
|
|
90
|
-
--md-clipboard-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1z"/></svg>');
|
|
91
|
-
--md-search-result-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h7c-.41-.25-.8-.56-1.14-.9-.33-.33-.61-.7-.86-1.1H6V4h7v5h5v1.18c.71.16 1.39.43 2 .82V8l-6-6m6.31 16.9c1.33-2.11.69-4.9-1.4-6.22-2.11-1.33-4.91-.68-6.22 1.4-1.34 2.11-.69 4.89 1.4 6.22 1.46.93 3.32.93 4.79.02L22 23.39 23.39 22l-3.08-3.1m-3.81.1a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5z"/></svg>');
|
|
92
|
-
--md-source-forks-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/></svg>');
|
|
93
|
-
--md-source-repositories-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 1 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 0 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 0 1 1-1h8zM5 12.25v3.25a.25.25 0 0 0 .4.2l1.45-1.087a.25.25 0 0 1 .3 0L8.6 15.7a.25.25 0 0 0 .4-.2v-3.25a.25.25 0 0 0-.25-.25h-3.5a.25.25 0 0 0-.25.25z"/></svg>');
|
|
94
|
-
--md-source-stars-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/></svg>');
|
|
95
|
-
--md-source-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 0 1 .25-.25h5.025a.25.25 0 0 1 .177.073l6.25 6.25a.25.25 0 0 1 0 .354l-5.025 5.025a.25.25 0 0 1-.354 0l-6.25-6.25a.25.25 0 0 1-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775zM6 5a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>');
|
|
96
|
-
--md-version-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc.--><path d="m310.6 246.6-127.1 128c-7.1 6.3-15.3 9.4-23.5 9.4s-16.38-3.125-22.63-9.375l-127.1-128C.224 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75s3.12 25.75-6.08 34.85z"/></svg>');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
:host > * {
|
|
100
|
-
/* CODE */
|
|
101
|
-
--md-code-fg-color: ${U.palette.text.primary};
|
|
102
|
-
--md-code-bg-color: ${U.palette.background.paper};
|
|
103
|
-
--md-code-hl-color: ${(0,be.Fq)(U.palette.warning.main,.5)};
|
|
104
|
-
--md-code-hl-keyword-color: ${U.palette.type==="dark"?U.palette.primary.light:U.palette.primary.dark};
|
|
105
|
-
--md-code-hl-function-color: ${U.palette.type==="dark"?U.palette.secondary.light:U.palette.secondary.dark};
|
|
106
|
-
--md-code-hl-string-color: ${U.palette.type==="dark"?U.palette.success.light:U.palette.success.dark};
|
|
107
|
-
--md-code-hl-number-color: ${U.palette.type==="dark"?U.palette.error.light:U.palette.error.dark};
|
|
108
|
-
--md-code-hl-constant-color: var(--md-code-hl-function-color);
|
|
109
|
-
--md-code-hl-special-color: var(--md-code-hl-function-color);
|
|
110
|
-
--md-code-hl-name-color: var(--md-code-fg-color);
|
|
111
|
-
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
|
112
|
-
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
|
113
|
-
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
|
114
|
-
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
|
115
|
-
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
|
116
|
-
|
|
117
|
-
/* TYPESET */
|
|
118
|
-
--md-typeset-font-size: 1rem;
|
|
119
|
-
--md-typeset-color: var(--md-default-fg-color);
|
|
120
|
-
--md-typeset-a-color: var(--md-accent-fg-color);
|
|
121
|
-
--md-typeset-table-color: ${U.palette.text.primary};
|
|
122
|
-
--md-typeset-del-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.error.dark,.5):(0,be.Fq)(U.palette.error.light,.5)};
|
|
123
|
-
--md-typeset-ins-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.success.dark,.5):(0,be.Fq)(U.palette.success.light,.5)};
|
|
124
|
-
--md-typeset-mark-color: ${U.palette.type==="dark"?(0,be.Fq)(U.palette.warning.dark,.5):(0,be.Fq)(U.palette.warning.light,.5)};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@media screen and (max-width: 76.1875em) {
|
|
128
|
-
:host > * {
|
|
129
|
-
/* TYPESET */
|
|
130
|
-
--md-typeset-font-size: .9rem;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@media screen and (max-width: 600px) {
|
|
135
|
-
:host > * {
|
|
136
|
-
/* TYPESET */
|
|
137
|
-
--md-typeset-font-size: .7rem;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`,et=({theme:U})=>`
|
|
141
|
-
/*================== Reset ==================*/
|
|
142
|
-
|
|
143
|
-
body {
|
|
144
|
-
--md-text-color: var(--md-default-fg-color);
|
|
145
|
-
--md-text-link-color: var(--md-accent-fg-color);
|
|
146
|
-
--md-text-font-family: ${U.typography.fontFamily};
|
|
147
|
-
font-family: var(--md-text-font-family);
|
|
148
|
-
background-color: unset;
|
|
149
|
-
}
|
|
150
|
-
`;const at="224px";var yt=({theme:U,sidebar:oe})=>`
|
|
151
|
-
/*================== Layout ==================*/
|
|
152
|
-
|
|
153
|
-
.md-grid {
|
|
154
|
-
max-width: 100%;
|
|
155
|
-
margin: 0;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.md-nav {
|
|
159
|
-
font-size: calc(var(--md-typeset-font-size) * 0.9);
|
|
160
|
-
}
|
|
161
|
-
.md-nav__link {
|
|
162
|
-
display: flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: space-between;
|
|
165
|
-
}
|
|
166
|
-
.md-nav__icon {
|
|
167
|
-
height: 20px !important;
|
|
168
|
-
width: 20px !important;
|
|
169
|
-
margin-left:${U.spacing(1)}px;
|
|
170
|
-
}
|
|
171
|
-
.md-nav__icon svg {
|
|
172
|
-
margin: 0;
|
|
173
|
-
width: 20px !important;
|
|
174
|
-
height: 20px !important;
|
|
175
|
-
}
|
|
176
|
-
.md-nav__icon:after {
|
|
177
|
-
width: 20px !important;
|
|
178
|
-
height: 20px !important;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.md-nav__item--active > .md-nav__link, a.md-nav__link--active {
|
|
182
|
-
text-decoration: underline;
|
|
183
|
-
color: var(--md-typeset-a-color);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.md-main__inner {
|
|
187
|
-
margin-top: 0;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.md-sidebar {
|
|
191
|
-
bottom: 75px;
|
|
192
|
-
position: fixed;
|
|
193
|
-
width: 16rem;
|
|
194
|
-
overflow-y: auto;
|
|
195
|
-
overflow-x: hidden;
|
|
196
|
-
scrollbar-color: rgb(193, 193, 193) #eee;
|
|
197
|
-
scrollbar-width: thin;
|
|
198
|
-
}
|
|
199
|
-
.md-sidebar .md-sidebar__scrollwrap {
|
|
200
|
-
width: calc(12.1rem);
|
|
201
|
-
}
|
|
202
|
-
.md-sidebar--secondary {
|
|
203
|
-
right: ${U.spacing(3)}px;
|
|
204
|
-
}
|
|
205
|
-
.md-sidebar::-webkit-scrollbar {
|
|
206
|
-
width: 5px;
|
|
207
|
-
}
|
|
208
|
-
.md-sidebar::-webkit-scrollbar-button {
|
|
209
|
-
width: 5px;
|
|
210
|
-
height: 5px;
|
|
211
|
-
}
|
|
212
|
-
.md-sidebar::-webkit-scrollbar-track {
|
|
213
|
-
background: #eee;
|
|
214
|
-
border: 1 px solid rgb(250, 250, 250);
|
|
215
|
-
box-shadow: 0px 0px 3px #dfdfdf inset;
|
|
216
|
-
border-radius: 3px;
|
|
217
|
-
}
|
|
218
|
-
.md-sidebar::-webkit-scrollbar-thumb {
|
|
219
|
-
width: 5px;
|
|
220
|
-
background: rgb(193, 193, 193);
|
|
221
|
-
border: transparent;
|
|
222
|
-
border-radius: 3px;
|
|
223
|
-
}
|
|
224
|
-
.md-sidebar::-webkit-scrollbar-thumb:hover {
|
|
225
|
-
background: rgb(125, 125, 125);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.md-content {
|
|
229
|
-
max-width: calc(100% - 16rem * 2);
|
|
230
|
-
margin-left: 16rem;
|
|
231
|
-
margin-bottom: 50px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.md-footer {
|
|
235
|
-
position: fixed;
|
|
236
|
-
bottom: 0px;
|
|
237
|
-
}
|
|
238
|
-
.md-footer__title {
|
|
239
|
-
background-color: unset;
|
|
240
|
-
}
|
|
241
|
-
.md-footer-nav__link {
|
|
242
|
-
width: 16rem;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.md-dialog {
|
|
246
|
-
background-color: unset;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
@media screen and (min-width: 76.25em) {
|
|
250
|
-
.md-sidebar {
|
|
251
|
-
height: auto;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
@media screen and (max-width: 76.1875em) {
|
|
256
|
-
.md-nav {
|
|
257
|
-
transition: none !important;
|
|
258
|
-
background-color: var(--md-default-bg-color)
|
|
259
|
-
}
|
|
260
|
-
.md-nav--primary .md-nav__title {
|
|
261
|
-
cursor: auto;
|
|
262
|
-
color: var(--md-default-fg-color);
|
|
263
|
-
font-weight: 700;
|
|
264
|
-
white-space: normal;
|
|
265
|
-
line-height: 1rem;
|
|
266
|
-
height: auto;
|
|
267
|
-
display: flex;
|
|
268
|
-
flex-flow: column;
|
|
269
|
-
row-gap: 1.6rem;
|
|
270
|
-
padding: 1.2rem .8rem .8rem;
|
|
271
|
-
background-color: var(--md-default-bg-color);
|
|
272
|
-
}
|
|
273
|
-
.md-nav--primary .md-nav__title~.md-nav__list {
|
|
274
|
-
box-shadow: none;
|
|
275
|
-
}
|
|
276
|
-
.md-nav--primary .md-nav__title ~ .md-nav__list > :first-child {
|
|
277
|
-
border-top: none;
|
|
278
|
-
}
|
|
279
|
-
.md-nav--primary .md-nav__title .md-nav__button {
|
|
280
|
-
display: none;
|
|
281
|
-
}
|
|
282
|
-
.md-nav--primary .md-nav__title .md-nav__icon {
|
|
283
|
-
color: var(--md-default-fg-color);
|
|
284
|
-
position: static;
|
|
285
|
-
height: auto;
|
|
286
|
-
margin: 0 0 0 -0.2rem;
|
|
287
|
-
}
|
|
288
|
-
.md-nav--primary > .md-nav__title [for="none"] {
|
|
289
|
-
padding-top: 0;
|
|
290
|
-
}
|
|
291
|
-
.md-nav--primary .md-nav__item {
|
|
292
|
-
border-top: none;
|
|
293
|
-
}
|
|
294
|
-
.md-nav--primary :is(.md-nav__title,.md-nav__item) {
|
|
295
|
-
font-size : var(--md-typeset-font-size);
|
|
296
|
-
}
|
|
297
|
-
.md-nav .md-source {
|
|
298
|
-
display: none;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.md-sidebar {
|
|
302
|
-
height: 100%;
|
|
303
|
-
}
|
|
304
|
-
.md-sidebar--primary {
|
|
305
|
-
width: 12.1rem !important;
|
|
306
|
-
z-index: 200;
|
|
307
|
-
left: ${oe.isPinned?`calc(-12.1rem + ${at})`:"calc(-12.1rem + 72px)"} !important;
|
|
308
|
-
}
|
|
309
|
-
.md-sidebar--secondary:not([hidden]) {
|
|
310
|
-
display: none;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.md-content {
|
|
314
|
-
max-width: 100%;
|
|
315
|
-
margin-left: 0;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.md-header__button {
|
|
319
|
-
margin: 0.4rem 0;
|
|
320
|
-
margin-left: 0.4rem;
|
|
321
|
-
padding: 0;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.md-overlay {
|
|
325
|
-
left: 0;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.md-footer {
|
|
329
|
-
position: static;
|
|
330
|
-
padding-left: 0;
|
|
331
|
-
}
|
|
332
|
-
.md-footer-nav__link {
|
|
333
|
-
/* footer links begin to overlap at small sizes without setting width */
|
|
334
|
-
width: 50%;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
@media screen and (max-width: 600px) {
|
|
339
|
-
.md-sidebar--primary {
|
|
340
|
-
left: -12.1rem !important;
|
|
341
|
-
width: 12.1rem;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
`;const ie=["h1","h2","h3","h4","h5","h6"];var ae=({theme:U})=>`
|
|
345
|
-
/*================== Typeset ==================*/
|
|
346
|
-
|
|
347
|
-
.md-typeset {
|
|
348
|
-
font-size: var(--md-typeset-font-size);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
${ie.reduce((oe,te)=>{var Dt;const Ee=(Dt=U.typography.htmlFontSize)!=null?Dt:16,$e=U.typography[te],{lineHeight:dt,fontFamily:Ne,fontWeight:Vt,fontSize:Jt}=$e,Zt=it=>{let $t=1;return typeof it=="number"&&($t=it/Ee),typeof it=="string"&&($t=it.replace("rem","")),`calc(${$t} * var(--md-typeset-font-size))`};return oe.concat(`
|
|
352
|
-
.md-typeset ${te} {
|
|
353
|
-
color: var(--md-default-fg-color);
|
|
354
|
-
line-height: ${dt};
|
|
355
|
-
font-family: ${Ne};
|
|
356
|
-
font-weight: ${Vt};
|
|
357
|
-
font-size: ${Zt(Jt)};
|
|
358
|
-
}
|
|
359
|
-
`)},"")}
|
|
360
|
-
|
|
361
|
-
.md-typeset .md-content__button {
|
|
362
|
-
color: var(--md-default-fg-color);
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.md-typeset hr {
|
|
366
|
-
border-bottom: 0.05rem dotted ${U.palette.divider};
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.md-typeset details {
|
|
370
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
371
|
-
}
|
|
372
|
-
.md-typeset details summary {
|
|
373
|
-
padding-left: 2.5rem !important;
|
|
374
|
-
}
|
|
375
|
-
.md-typeset details summary:before,
|
|
376
|
-
.md-typeset details summary:after {
|
|
377
|
-
top: 50% !important;
|
|
378
|
-
width: 20px !important;
|
|
379
|
-
height: 20px !important;
|
|
380
|
-
transform: rotate(0deg) translateY(-50%) !important;
|
|
381
|
-
}
|
|
382
|
-
.md-typeset details[open] > summary:after {
|
|
383
|
-
transform: rotate(90deg) translateX(-50%) !important;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.md-typeset blockquote {
|
|
387
|
-
color: var(--md-default-fg-color--light);
|
|
388
|
-
border-left: 0.2rem solid var(--md-default-fg-color--light);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.md-typeset table:not([class]) {
|
|
392
|
-
font-size: var(--md-typeset-font-size);
|
|
393
|
-
border: 1px solid var(--md-default-fg-color);
|
|
394
|
-
border-bottom: none;
|
|
395
|
-
border-collapse: collapse;
|
|
396
|
-
}
|
|
397
|
-
.md-typeset table:not([class]) th {
|
|
398
|
-
font-weight: bold;
|
|
399
|
-
}
|
|
400
|
-
.md-typeset table:not([class]) td, .md-typeset table:not([class]) th {
|
|
401
|
-
border-bottom: 1px solid var(--md-default-fg-color);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb {
|
|
405
|
-
background-color: hsla(0, 0%, 0%, 0.32);
|
|
406
|
-
}
|
|
407
|
-
.md-typeset pre > code::-webkit-scrollbar-thumb:hover {
|
|
408
|
-
background-color: hsla(0, 0%, 0%, 0.87);
|
|
409
|
-
}
|
|
410
|
-
`,Ye=()=>`
|
|
411
|
-
/*================== Animations ==================*/
|
|
412
|
-
/*
|
|
413
|
-
Disable CSS animations on link colors as they lead to issues in dark mode.
|
|
414
|
-
The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages.
|
|
415
|
-
*/
|
|
416
|
-
.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink {
|
|
417
|
-
transition: none;
|
|
418
|
-
}
|
|
419
|
-
`,Ge=({theme:U})=>`
|
|
420
|
-
/*================== Extensions ==================*/
|
|
421
|
-
|
|
422
|
-
/* HIGHLIGHT */
|
|
423
|
-
.highlight .md-clipboard:after {
|
|
424
|
-
content: unset;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.highlight .nx {
|
|
428
|
-
color: ${U.palette.type==="dark"?"#ff53a3":"#ec407a"};
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/* CODE HILITE */
|
|
432
|
-
.codehilite .gd {
|
|
433
|
-
background-color: ${U.palette.type==="dark"?"rgba(248,81,73,0.65)":"#fdd"};
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.codehilite .gi {
|
|
437
|
-
background-color: ${U.palette.type==="dark"?"rgba(46,160,67,0.65)":"#dfd"};
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/* TABBED */
|
|
441
|
-
.tabbed-set>input:nth-child(1):checked~.tabbed-labels>:nth-child(1),
|
|
442
|
-
.tabbed-set>input:nth-child(2):checked~.tabbed-labels>:nth-child(2),
|
|
443
|
-
.tabbed-set>input:nth-child(3):checked~.tabbed-labels>:nth-child(3),
|
|
444
|
-
.tabbed-set>input:nth-child(4):checked~.tabbed-labels>:nth-child(4),
|
|
445
|
-
.tabbed-set>input:nth-child(5):checked~.tabbed-labels>:nth-child(5),
|
|
446
|
-
.tabbed-set>input:nth-child(6):checked~.tabbed-labels>:nth-child(6),
|
|
447
|
-
.tabbed-set>input:nth-child(7):checked~.tabbed-labels>:nth-child(7),
|
|
448
|
-
.tabbed-set>input:nth-child(8):checked~.tabbed-labels>:nth-child(8),
|
|
449
|
-
.tabbed-set>input:nth-child(9):checked~.tabbed-labels>:nth-child(9),
|
|
450
|
-
.tabbed-set>input:nth-child(10):checked~.tabbed-labels>:nth-child(10),
|
|
451
|
-
.tabbed-set>input:nth-child(11):checked~.tabbed-labels>:nth-child(11),
|
|
452
|
-
.tabbed-set>input:nth-child(12):checked~.tabbed-labels>:nth-child(12),
|
|
453
|
-
.tabbed-set>input:nth-child(13):checked~.tabbed-labels>:nth-child(13),
|
|
454
|
-
.tabbed-set>input:nth-child(14):checked~.tabbed-labels>:nth-child(14),
|
|
455
|
-
.tabbed-set>input:nth-child(15):checked~.tabbed-labels>:nth-child(15),
|
|
456
|
-
.tabbed-set>input:nth-child(16):checked~.tabbed-labels>:nth-child(16),
|
|
457
|
-
.tabbed-set>input:nth-child(17):checked~.tabbed-labels>:nth-child(17),
|
|
458
|
-
.tabbed-set>input:nth-child(18):checked~.tabbed-labels>:nth-child(18),
|
|
459
|
-
.tabbed-set>input:nth-child(19):checked~.tabbed-labels>:nth-child(19),
|
|
460
|
-
.tabbed-set>input:nth-child(20):checked~.tabbed-labels>:nth-child(20) {
|
|
461
|
-
color: var(--md-accent-fg-color);
|
|
462
|
-
border-color: var(--md-accent-fg-color);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/* TASK-LIST */
|
|
466
|
-
.task-list-control .task-list-indicator::before {
|
|
467
|
-
background-color: ${U.palette.action.disabledBackground};
|
|
468
|
-
}
|
|
469
|
-
.task-list-control [type="checkbox"]:checked + .task-list-indicator:before {
|
|
470
|
-
background-color: ${U.palette.success.main};
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* ADMONITION */
|
|
474
|
-
.admonition {
|
|
475
|
-
font-size: var(--md-typeset-font-size) !important;
|
|
476
|
-
}
|
|
477
|
-
.admonition .admonition-title {
|
|
478
|
-
padding-left: 2.5rem !important;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.admonition .admonition-title:before {
|
|
482
|
-
top: 50% !important;
|
|
483
|
-
width: 20px !important;
|
|
484
|
-
height: 20px !important;
|
|
485
|
-
transform: translateY(-50%) !important;
|
|
486
|
-
}
|
|
487
|
-
`;const we=[We,et,yt,ae,Ye,Ge],nt=()=>(0,R.useSidebarPinState)(),J=()=>{const U=nt(),oe=(0,ce.Z)();return(0,r.useMemo)(()=>{const te={theme:oe,sidebar:U};return we.reduce((Ee,$e)=>Ee+$e(te),"")},[oe,U])},z=()=>{const U=J();return(0,r.useCallback)(oe=>(oe.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",`<style>${U}</style>`),oe),[U])},q=(U,oe,te)=>{const Ee=U==="src"&&oe.endsWith(".svg"),$e=!oe.match(/^([a-z]*:)?\/\//i),dt=oe.startsWith(te);return Ee&&($e||dt)},ue=({techdocsStorageApi:U,entityId:oe,path:te})=>async Ee=>{const $e=await U.getApiOrigin(),dt=async(Ne,Vt)=>{for(const Jt of Ne)if(Jt.hasAttribute(Vt)){const Zt=Jt.getAttribute(Vt);if(!Zt)return;const Dt=await U.getBaseUrl(Zt,oe,te);if(q(Vt,Zt,$e))try{const $t=await(await fetch(Dt,{credentials:"include"})).text();Jt.setAttribute(Vt,`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent($t)))}`)}catch{Jt.setAttribute("alt",`Error: ${Zt}`)}else Jt.setAttribute(Vt,Dt)}};return await Promise.all([dt(Ee.querySelectorAll("img"),"src"),dt(Ee.querySelectorAll("script"),"src"),dt(Ee.querySelectorAll("source"),"src"),dt(Ee.querySelectorAll("link"),"href"),dt(Ee.querySelectorAll("a[download]"),"href")]),Ee};var fe=e(68370),Pe=e(67097),Oe=e(47093),Ce=e(82717),Qe=e.n(Ce);const Ke=U=>oe=>{var $t;const te=oe.querySelector('[title="Edit this page"]');if(!te||!te.href)return oe;const Ee=new URL(te.href),$e=U.byUrl(Ee);if(($e==null?void 0:$e.type)!=="github"&&($e==null?void 0:$e.type)!=="gitlab")return oe;const dt=(($t=oe.querySelector("article>h1"))==null?void 0:$t.childNodes[0].textContent)||"",Ne=encodeURIComponent(`Documentation Feedback: ${dt}`),Vt=encodeURIComponent(`Page source:
|
|
488
|
-
${te.href}
|
|
489
|
-
|
|
490
|
-
Feedback:`),Jt=($e==null?void 0:$e.type)==="github"?(0,fe.Pb)(Ee.href,"blob"):Ee.href,Zt=Qe()(Jt),Dt=`/${Zt.organization}/${Zt.name}`,it=te.cloneNode();switch($e==null?void 0:$e.type){case"gitlab":it.href=`${Ee.origin}${Dt}/issues/new?issue[title]=${Ne}&issue[description]=${Vt}`;break;case"github":it.href=`${Ee.origin}${Dt}/issues/new?title=${Ne}&body=${Vt}`;break;default:return oe}return Oe.render(r.createElement(Pe.Z),it),it.style.paddingLeft="5px",it.title="Leave feedback for this page",it.id="git-feedback-link",te==null||te.insertAdjacentElement("beforebegin",it),oe};var pt=e(44882);const St=()=>U=>{const oe=U.querySelector('.md-header label[for="__drawer"]'),te=U.querySelector("article");if(!oe||!te)return U;const Ee=oe.cloneNode();return Oe.render(r.createElement(pt.Z),Ee),Ee.id="toggle-sidebar",Ee.title="Toggle Sidebar",Ee.classList.add("md-content__button"),Ee.style.setProperty("padding","0 0 0 5px"),Ee.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),te==null||te.prepend(Ee),U},ut=()=>U=>(((te,Ee)=>{Array.from(te).filter($e=>$e.hasAttribute(Ee)).forEach($e=>{const dt=$e.getAttribute(Ee);if(dt){dt.match(/^https?:\/\//i)&&$e.setAttribute("target","_blank");try{const Ne=xt(window.location.href);$e.setAttribute(Ee,new URL(dt,Ne).toString())}catch{$e.replaceWith($e.textContent||dt)}}})})(Array.from(U.getElementsByTagName("a")),"href"),U);function xt(U){const oe=new URL(U);return!oe.pathname.endsWith("/")&&!oe.pathname.endsWith(".html")&&(oe.pathname+="/"),oe.toString()}const Lt=({baseUrl:U,onClick:oe})=>te=>(Array.from(te.getElementsByTagName("a")).forEach(Ee=>{Ee.addEventListener("click",$e=>{const Ne=Ee.getAttribute("href");!Ne||Ne.startsWith(U)&&!Ee.hasAttribute("download")&&($e.preventDefault(),oe($e,Ne))})}),te);var bt=e(15459),Pt=e(80030),Wt=e(72379),Ht=e(41547);const dn=(0,bt.Z)(U=>({tooltip:{fontSize:"inherit",color:U.palette.text.primary,margin:0,padding:U.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Pt.ZP),In=()=>r.createElement(Wt.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"})),Yt=({text:U})=>{const[oe,te]=(0,r.useState)(!1),Ee=(0,r.useCallback)(()=>{navigator.clipboard.writeText(U),te(!0)},[U]),$e=(0,r.useCallback)(()=>{te(!1)},[te]);return r.createElement(dn,{title:"Copied to clipboard",placement:"left",open:oe,onClose:$e,leaveDelay:1e3},r.createElement("button",{className:"md-clipboard md-icon",onClick:Ee},r.createElement(In,null)))},Nt=U=>oe=>{var Ee;const te=oe.querySelectorAll("pre > code");for(const $e of te){const dt=$e.textContent||"",Ne=document.createElement("div");(Ee=$e==null?void 0:$e.parentElement)==null||Ee.prepend(Ne),Oe.render(r.createElement(Ht.Z,{theme:U},r.createElement(Yt,{text:dt})),Ne)}return oe},Xe=()=>U=>{var oe;return(oe=U.querySelector(".md-header"))==null||oe.remove(),U},de=()=>U=>{var oe,te;return(oe=U.querySelector(".md-footer .md-copyright"))==null||oe.remove(),(te=U.querySelector(".md-footer-copyright"))==null||te.remove(),U},j=({onLoading:U,onLoaded:oe})=>te=>(U(),te.addEventListener(i.Ox,function Ee(){oe(),te.removeEventListener(i.Ox,Ee)}),te),ye=()=>U=>(setTimeout(()=>{var oe;if(window.location.hash){const te=window.location.hash.slice(1);(oe=U==null?void 0:U.querySelector(`[id="${te}"]`))==null||oe.scrollIntoView()}},200),U),je=async(U,oe)=>{let te;if(typeof U=="string")te=new DOMParser().parseFromString(U,"text/html").documentElement;else if(U instanceof Element)te=U;else throw new Error("dom is not a recognized type");for(const Ee of oe)te=await Ee(te);return te},_e="screen and (max-width: 76.1875em)",st=U=>{const oe=(0,re.s0)(),te=(0,ce.Z)(),Ee=(0,Se.Z)(_e),$e=pe(),dt=z(),Ne=(0,D.useApi)(i.Dl),Vt=(0,D.useApi)(De.q3),{state:Jt,path:Zt,content:Dt}=(0,O.DK)(),[it,$t]=(0,r.useState)(null),nn=(0,i.ux)(it),Gt=(0,r.useCallback)(()=>{if(!it)return;it.querySelectorAll(".md-sidebar").forEach(Bt=>{var Xt,Rn,ln;if(Ee)Bt.style.top="0px";else{const vn=document==null?void 0:document.querySelector(".techdocs-reader-page"),Ln=(Xt=vn==null?void 0:vn.getBoundingClientRect().top)!=null?Xt:0;let M=(Rn=it.getBoundingClientRect().top)!=null?Rn:0;const g=it.querySelector(".md-container > .md-tabs"),T=(ln=g==null?void 0:g.getBoundingClientRect().height)!=null?ln:0;M<Ln&&(M=Ln),Bt.style.top=`${Math.max(M,0)+T}px`}Bt.style.setProperty("opacity","1")})},[it,Ee]);(0,r.useEffect)(()=>(window.addEventListener("resize",Gt),window.addEventListener("scroll",Gt,!0),()=>{window.removeEventListener("resize",Gt),window.removeEventListener("scroll",Gt,!0)}),[it,Gt]);const Kt=(0,r.useCallback)(()=>{if(!it)return;const Qt=it.querySelector(".md-footer");Qt&&(Qt.style.width=`${it.getBoundingClientRect().width}px`)},[it]);(0,r.useEffect)(()=>(window.addEventListener("resize",Kt),()=>{window.removeEventListener("resize",Kt)}),[it,Kt]),(0,r.useEffect)(()=>{nn||(Kt(),Gt())},[Jt,nn,Kt,Gt]);const mn=(0,r.useCallback)((Qt,Bt)=>je(Qt,[$e,ue({techdocsStorageApi:Ne,entityId:U,path:Bt}),ut(),St(),Xe(),de(),Ke(Vt),dt]),[U,Vt,Ne,$e,dt]),Mn=(0,r.useCallback)(async Qt=>je(Qt,[ye(),Nt(te),Lt({baseUrl:window.location.origin,onClick:(Bt,Xt)=>{var vn;const Rn=Bt.ctrlKey||Bt.metaKey,ln=new URL(Xt);ln.hash?Rn?window.open(`${ln.pathname}${ln.hash}`,"_blank"):(oe(`${ln.pathname}${ln.hash}`),(vn=Qt==null?void 0:Qt.querySelector(`#${ln.hash.slice(1)}`))==null||vn.scrollIntoView()):Rn?window.open(ln.pathname,"_blank"):oe(ln.pathname)}}),j({onLoading:()=>{},onLoaded:()=>{var Bt;(Bt=Qt.querySelector(".md-nav__title"))==null||Bt.removeAttribute("for")}}),j({onLoading:()=>{Array.from(Qt.querySelectorAll(".md-sidebar")).forEach(Xt=>{Xt.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[te,oe]);return(0,r.useEffect)(()=>{if(!Dt)return()=>{};let Qt=!0;return mn(Dt,Zt).then(async Bt=>{if(!(Bt!=null&&Bt.innerHTML)||!Qt)return;window.scroll({top:0});const Xt=await Mn(Bt);$t(Xt)}),()=>{Qt=!1}},[Dt,Zt,mn,Mn]),it};var Rt=e(8560);const qt=()=>{const U=(0,i.$L)(),{shadowRoot:oe}=(0,i.x1)(),te=oe==null?void 0:oe.querySelector('[data-md-component="content"]'),Ee=oe==null?void 0:oe.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let $e=Ee==null?void 0:Ee.querySelector('[data-techdocs-addons-location="primary sidebar"]');$e||($e=document.createElement("div"),$e.setAttribute("data-techdocs-addons-location","primary sidebar"),Ee==null||Ee.prepend($e));const dt=oe==null?void 0:oe.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Ne=dt==null?void 0:dt.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Ne||(Ne=document.createElement("div"),Ne.setAttribute("data-techdocs-addons-location","secondary sidebar"),dt==null||dt.prepend(Ne)),r.createElement(r.Fragment,null,r.createElement(Rt.Z,{container:$e},U.renderComponentsByLocation(i.oZ.PrimarySidebar)),r.createElement(Rt.Z,{container:te},U.renderComponentsByLocation(i.oZ.Content)),r.createElement(Rt.Z,{container:Ne},U.renderComponentsByLocation(i.oZ.SecondarySidebar)))},en=(0,t.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),tn=(0,O.m1)(U=>{var Dt;const{withSearch:oe=!0,onReady:te}=U,Ee=en(),{entityMetadata:{value:$e,loading:dt},entityRef:Ne,setShadowRoot:Vt}=(0,i.x1)(),Jt=st(Ne),Zt=(0,r.useCallback)(it=>{Vt(it),te instanceof Function&&te()},[Vt,te]);return dt===!1&&!$e?r.createElement(R.ErrorPage,{status:"404",statusMessage:"PAGE NOT FOUND"}):Jt?r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(K,null)),oe&&r.createElement(c.Z,{className:Ee.search,xs:"auto",item:!0},r.createElement(f.S,{entityId:Ne,entityTitle:(Dt=$e==null?void 0:$e.metadata)==null?void 0:Dt.title})),r.createElement(c.Z,{xs:12,item:!0},r.createElement(i.VA,{element:Jt,onAppend:Zt},r.createElement(qt,null))))):r.createElement(R.Content,null,r.createElement(c.Z,{container:!0},r.createElement(c.Z,{xs:12,item:!0},r.createElement(K,null))))}),gn=null},99954:function(ne,s,e){"use strict";e.d(s,{S:function(){return E}});var r=e(2784),t=e(18671),c=e(98069),i=e(73250),R=e(56338),f=e(17429),o=e(48023),u=e(82339),m=e(36964),y=e(68725);const h=r.createElement(c.Z,{animation:"wave",variant:"text",height:40}),E=S=>{const{children:b}=S,L=(0,R.$L)(),$=(0,m.useApi)(m.configApiRef),{title:F,setTitle:D,subtitle:x,setSubtitle:O,entityRef:w,metadata:{value:K,loading:re},entityMetadata:{value:ce,loading:Se}}=(0,R.x1)();(0,r.useEffect)(()=>{!K||(D(gt=>{const{site_name:lt}=K;return gt||lt}),O(gt=>{let{site_description:lt}=K;return(!lt||lt==="None")&&(lt="Home"),gt||lt}))},[K,D,O]);const De=$.getOptional("app.title")||"Backstage",Fe=[F,x,De].filter(Boolean).join(" | "),{locationMetadata:He,spec:Ae}=ce||{},Je=Ae==null?void 0:Ae.lifecycle,tt=ce?(0,f.getEntityRelations)(ce,o.S4):[],Tt=(0,m.useRouteRef)(y._Z)(),At=r.createElement(r.Fragment,null,r.createElement(u.HeaderLabel,{label:"Component",value:r.createElement(f.EntityRefLink,{color:"inherit",entityRef:w,title:ce==null?void 0:ce.metadata.title,defaultKind:"Component"})}),tt.length>0&&r.createElement(u.HeaderLabel,{label:"Owner",value:r.createElement(f.EntityRefLinks,{color:"inherit",entityRefs:tt,defaultKind:"group"})}),Je?r.createElement(u.HeaderLabel,{label:"Lifecycle",value:Je}):null,He&&He.type!=="dir"&&He.type!=="file"?r.createElement(u.HeaderLabel,{label:"",value:r.createElement("a",{href:He.target,target:"_blank",rel:"noopener noreferrer"},r.createElement(i.Z,{style:{marginTop:"-25px",fill:"#fff"}}))}):null);return!Se&&ce===void 0||!re&&K===void 0?null:r.createElement(u.Header,{type:"Documentation",typeLink:Tt,title:F||h,subtitle:x||h},r.createElement(t.Z,{titleTemplate:"%s"},r.createElement("title",null,Fe)),At,b,L.renderComponentsByLocation(R.oZ.Header))}},16172:function(ne,s,e){"use strict";e.d(s,{b:function(){return h}});var r=e(2784),t=e(79692),c=e(15223),i=e(95544),R=e(80030),f=e(61837),o=e(48348),u=e(47603),m=e(56338);const y=(0,t.Z)(E=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:E.spacing(3,3,0)}})),h=({toolbarProps:E})=>{const S=y(),[b,L]=(0,r.useState)(null),$=(0,r.useCallback)(re=>{L(re.currentTarget)},[]),F=(0,r.useCallback)(()=>{L(null)},[]),{entityMetadata:{value:D,loading:x}}=(0,m.x1)(),O=(0,m.$L)(),w=O.renderComponentsByLocation(m.oZ.Subheader),K=O.renderComponentsByLocation(m.oZ.Settings);return!w&&!K||x===!1&&!D?null:r.createElement(c.Z,{classes:S,...E},r.createElement(i.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap"},w,K?r.createElement(r.Fragment,null,r.createElement(R.ZP,{title:"Settings"},r.createElement(f.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:$},r.createElement(u.Z,null))),r.createElement(o.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(b),onClose:F,keepMounted:!0},K)):null))}},2263:function(ne,s,e){"use strict";e.d(s,{DK:function(){return h},m1:function(){return S}});var r=e(2784),t=e(10289),c=e(56338),i=e(36964),R=e(64279),f=e(77446);function o({contentLoading:b,content:L,activeSyncState:$}){return b||$==="BUILD_READY_RELOAD"||!L&&$==="CHECKING"?"CHECKING":!L&&$==="BUILDING"?"INITIAL_BUILD":L?$==="BUILDING"?"CONTENT_STALE_REFRESHING":$==="BUILD_READY"?"CONTENT_STALE_READY":$==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function u(b,L){const $={...b};switch(L.type){case"sync":L.state==="CHECKING"&&($.buildLog=[]),$.activeSyncState=L.state,$.syncError=L.syncError;break;case"contentLoading":$.contentLoading=!0,$.contentError=void 0;break;case"content":typeof L.path=="string"&&($.path=L.path),$.contentLoading=!1,$.content=L.content,$.contentError=L.contentError;break;case"buildLog":$.buildLog=$.buildLog.concat(L.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes($.activeSyncState)&&["contentLoading","content"].includes(L.type)&&($.activeSyncState="UP_TO_DATE",$.buildLog=[]),$}function m(b,L,$,F){var ce,Se;const[D,x]=(0,r.useReducer)(u,{activeSyncState:"CHECKING",path:F,contentLoading:!0,buildLog:[]}),O=(0,i.useApi)(c.Dl),{retry:w}=(0,f.Z)(async()=>{x({type:"contentLoading"});try{const De=await O.getEntityDocs({kind:b,namespace:L,name:$},F);return x({type:"content",content:De,path:F}),De}catch(De){x({type:"content",contentError:De,path:F})}},[O,b,L,$,F]),K=(0,r.useRef)({content:void 0,reload:()=>{}});return K.current={content:D.content,reload:w},(0,R.default)(async()=>{x({type:"sync",state:"CHECKING"});const De=setTimeout(()=>{x({type:"sync",state:"BUILDING"})},1e3);try{switch(await O.syncEntityDocs({kind:b,namespace:L,name:$},He=>{x({type:"buildLog",log:He})})){case"updated":K.current.content?x({type:"sync",state:"BUILD_READY"}):(K.current.reload(),x({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":x({type:"sync",state:"UP_TO_DATE"});break;default:x({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(Fe){x({type:"sync",state:"ERROR",syncError:Fe})}finally{clearTimeout(De)}},[b,$,L,O,x,K]),{state:(0,r.useMemo)(()=>o({activeSyncState:D.activeSyncState,contentLoading:D.contentLoading,content:D.content}),[D.activeSyncState,D.content,D.contentLoading]),contentReload:w,path:D.path,content:D.content,contentErrorMessage:(ce=D.contentError)==null?void 0:ce.toString(),syncErrorMessage:(Se=D.syncError)==null?void 0:Se.toString(),buildLog:D.buildLog}}const y=(0,r.createContext)({}),h=()=>(0,r.useContext)(y),E=({children:b})=>{const{"*":L=""}=(0,t.UO)(),{entityRef:$}=(0,c.x1)(),{kind:F,namespace:D,name:x}=$,O=m(F,D,x,L);return r.createElement(y.Provider,{value:O},b instanceof Function?b(O):b)},S=b=>L=>r.createElement(E,null,r.createElement(b,{...L}))},96393:function(ne,s,e){"use strict";e.d(s,{Fq:function(){return i.F},SE:function(){return c.S}});var r=e(2263),t=e(26220),c=e(99954),i=e(63126),R=e(16172)},68725:function(ne,s,e){"use strict";e.d(s,{Fw:function(){return c},_Z:function(){return t},pd:function(){return i}});var r=e(36964);const t=(0,r.createRouteRef)({id:"techdocs:index-page"}),c=(0,r.createRouteRef)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),i=(0,r.createRouteRef)({id:"techdocs:catalog-reader-view"})},47861:function(ne,s,e){"use strict";e.d(s,{S:function(){return K}});var r=e(2784),t=e(79692),c=e(49378),i=e(38402),R=e(86136),f=e(85256),o=e(82339),u=e(36964),m=e(74450);const y=(0,t.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),h=re=>{const{result:ce,highlight:Se,rank:De,lineClamp:Fe=5,asListItem:He=!0,asLink:Ae=!0,title:Je,icon:tt}=re,Tt=y(),At=(0,u.useAnalytics)(),Ie=()=>{At.captureEvent("discover",ce.title,{attributes:{to:ce.location},value:De})},ht=()=>{const _=Se!=null&&Se.fields.title?r.createElement(m.FA,{text:Se.fields.title,preTag:Se.preTag,postTag:Se.postTag}):ce.title,pe=Se!=null&&Se.fields.entityTitle?r.createElement(m.FA,{text:Se.fields.entityTitle,preTag:Se.preTag,postTag:Se.postTag}):ce.entityTitle,be=Se!=null&&Se.fields.name?r.createElement(m.FA,{text:Se.fields.name,preTag:Se.preTag,postTag:Se.postTag}):ce.name;return r.createElement(c.Z,{className:Tt.itemText,primaryTypographyProps:{variant:"h6"},primary:Je||r.createElement(r.Fragment,null,_," | ",pe!=null?pe:be," docs"),secondary:r.createElement("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Fe,overflow:"hidden"}},Se!=null&&Se.fields.text?r.createElement(m.FA,{text:Se.fields.text,preTag:Se.preTag,postTag:Se.postTag}):ce.text)})},gt=({children:_})=>Ae?r.createElement(o.Link,{noTrack:!0,to:ce.location,onClick:Ie},_):r.createElement(r.Fragment,null,_),lt=({children:_})=>He?r.createElement(r.Fragment,null,r.createElement(i.Z,{alignItems:"flex-start"},tt&&r.createElement(R.Z,null,tt),r.createElement("div",{className:Tt.flexContainer},_)),r.createElement(f.Z,{component:"li"})):r.createElement(r.Fragment,null,_);return r.createElement(gt,null,r.createElement(lt,null,r.createElement(ht,null)))};var E=e(86619),S=e(50581),b=e(61837),L=e(4614),$=e(21853),F=e(88013),D=e(10289),x=e(48760);const O=(0,t.Z)({root:{width:"100%"}}),w=re=>{const{entityId:ce,entityTitle:Se,debounceTime:De=150}=re,[Fe,He]=(0,r.useState)(!1),Ae=(0,D.s0)(),{term:Je,setTerm:tt,setFilters:Tt,result:{loading:At,value:Ie}}=(0,m.Rx)(),ht=O(),[gt,lt]=(0,r.useState)([]);(0,r.useEffect)(()=>{let ie=!0;if(ie&&Ie){const ae=Ie.results.slice(0,10);lt(ae)}return()=>{ie=!1}},[At,Ie]);const[_,pe]=(0,r.useState)(Je);(0,x.Z)(()=>tt(_),De,[_]);const{kind:be,name:We,namespace:et}=ce;(0,r.useEffect)(()=>{Tt(ie=>({...ie,kind:be,namespace:et,name:We}))},[be,et,We,Tt]);const at=ie=>{Fe||He(!0),pe(ie.target.value)},yt=(ie,ae)=>{if(ae!=null&&ae.document){const{location:Ye}=ae.document;Ae(Ye)}};return r.createElement(F.ZP,{classes:{root:ht.root},"data-testid":"techdocs-search-bar",size:"small",open:Fe,getOptionLabel:()=>"",filterOptions:ie=>ie,onClose:()=>{He(!1)},onFocus:()=>{He(!0)},onChange:yt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:gt,renderOption:({document:ie,highlight:ae})=>r.createElement(h,{result:ie,lineClamp:3,asListItem:!1,asLink:!1,title:ie.title,highlight:ae}),loading:At,renderInput:ie=>r.createElement(E.Z,{...ie,"data-testid":"techdocs-search-bar-input",variant:"outlined",fullWidth:!0,placeholder:`Search ${Se||ce.name} docs`,value:_,onChange:at,InputProps:{...ie.InputProps,startAdornment:r.createElement(S.Z,{position:"start"},r.createElement(b.Z,{"aria-label":"Query",disabled:!0},r.createElement($.Z,null))),endAdornment:r.createElement(r.Fragment,null,At?r.createElement(L.Z,{color:"inherit",size:20}):null,ie.InputProps.endAdornment)}})})},K=re=>{const ce={term:"",types:["techdocs"],pageCursor:"",filters:re.entityId};return r.createElement(m.Nd,{initialState:ce},r.createElement(w,{...re}))}},98157:function(){},53260:function(){}},function(ne){var s=function(r){return ne(ne.s=r)};ne.O(0,[2370,6202,9284,9035,2126,7012,2194,4983,3222,6816,5218,4736],function(){return s(88649),s(90775)});var e=ne.O()}]);})();
|
|
491
|
-
|
|
492
|
-
//# sourceMappingURL=main.1edda37a.js.map
|