1import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{x as t}from"./react-CtufjDsZ.js";import{or as n,qn as r,ur as i}from"./components-yGxlKqbr.js";import{c as a}from"./Types-DqrOQaPJ.js";import{t as o}from"./Types-F9AxxZkk.js";import{s}from"./metaData-DNsWwf5S.js";var c=e(t()),l=class extends a{aws;gcp;byocId;byocName;desc;cloud;cloudIds;regions;mode;billingMode;byocOnDemandEnabled;constructor(e){super(e),Object.assign(this,e)}static BYOC_DESCRIBE_URL=`${this.CLOUD_PREFIX}/byoc/describe`;static BYOC_CLOUD_REGION_URL=`${this.CLOUD_PREFIX}/byoc/cloud_regions/list`;static fetchByocInfo(){return super.search({path:this.BYOC_DESCRIBE_URL})}static fetchByocCloudRegionList(){return super.findAll({path:this.BYOC_CLOUD_REGION_URL},`cspList`)}get _arn(){return this.aws?.arn}get _byocId(){return this.byocId}get _byocName(){return this.byocName}get _desc(){return this.desc}get _externalId(){return this.aws?.externalId??``}get _cloud(){return this.cloud}get _cloudIds(){return this.cloudIds}get _awsEnabled(){return this.cloudIds.includes(r.AWS)}get _gcpEnabled(){return this.cloudIds.includes(r.GCP)}get _azureEnabled(){return this.cloudIds.includes(r.AZURE)}get _gcpServiceAccount(){return this.gcp?.serviceAccount}get _regionOptions(){return this.regions}get _mode(){return this.mode}get _isContractBilling(){return this.billingMode===`CONTRACT`}get _isPayAsYouGoBilling(){return this.billingMode===`PAYG`}get _byocOnDemandEnabled(){return this.byocOnDemandEnabled}}
1,u=i({key:`byocRegions`,default:{regionOptionMap:{}}}),d=i({key:`byocLoadingData`,default:!0}),f=i({key:`byocInfo`,default:void 0}),p=i({key:`byocErrorMsgs`,default:void 0}),m=()=>{let[e,t]=n(u),[r,i]=n(f),[a,m]=n(p),[h,g]=n(d),{featureList:_}=s(),v=(0,c.useCallback)(async()=>{try{let e=(await l.fetchByocCloudRegionList()).reduce((e,t)=>(e[t._cloud]=t._regionOptions.map(e=>({id:e.id,label:e.name,value:e.id})),e),{});t(t=>({...t,regionOptionMap:e}))}finally{g(!1)}},[]),y=async()=>{let e=await l.fetchByocInfo();i(e)},{isByocIMode:b,isByocStandard:x}=(0,c.useMemo)(()=>{switch(r?._mode){case o.Standard:return{isByocIMode:!1,isByocStandard:!0};case o.ByocI:case o.ByocI2:return{isByocIMode:!0,isByocStandard:!1};default:return{isByocIMode:!1,isByocStandard:!1}}},[r?._mode]);return{...e,byocDataLoading:h,fetchByocRegionOptions:v,fetchByocInfo:y,byocInfo:r,isByocIMode:b,isByocStandard:x,byocErrorMsgs:a,setByocErrorMsgs:m}};export{m as i,d as n,u as r,f as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.