@zuplo/core 5.1882.0 → 5.1884.0
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/create.index.minified.js +1 -1
- package/index.minified.js +1 -1
- package/package.json +1 -1
package/create.index.minified.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
"use strict";var Ixe=Object.create;var T2=Object.defineProperty;var Pxe=Object.getOwnPropertyDescriptor;var Dxe=Object.getOwnPropertyNames;var kxe=Object.getPrototypeOf;var $xe=Object.prototype.hasOwnProperty;var o=(t,e)=>T2(t,"name",{value:e,configurable:true});var Gr=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var kY=(t,e)=>{for(var r in e)T2(t,r,{get:e[r],enumerable:true})};var $Y=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let i of Dxe(e))if(!$xe.call(t,i)&&i!==r)T2(t,i,{get:()=>e[i],enumerable:!(n=Pxe(e,i))||n.enumerable})}return t};var xf=(t,e,r)=>(r=t!=null?Ixe(kxe(t)):{},$Y(e||!t||!t.__esModule?T2(r,"default",{value:t,enumerable:true}):r,t));var Hm=t=>$Y(T2({},"__esModule",{value:true}),t);var Ca=_(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:true});Cf.EnvironmentalVariableRequiredError=Cf.getRequiredEnvVar=void 0;var eC=class{static{o(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.53.0"}get AUTH_API_URL(){return Yo("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return Yo("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return Yo("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return Yo("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return Yo("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return Yo("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return Yo("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return Yo("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return Yo("METERING_SERVICE_URL","https://meters.zuplo.com")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new A2(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return Yo("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function Yo(t,e){const r=process.env[t];if(r===void 0&&(e===void 0||process.env.NODE_ENV==="production")){throw new A2(t)}return r??e}o(Yo,"getRequiredEnvVar");Cf.getRequiredEnvVar=Yo;var A2=class extends Error{static{o(this,"EnvironmentalVariableRequiredError")}constructor(e){super(`The environmental variable '${e}' is required.'`)}};Cf.EnvironmentalVariableRequiredError=A2;var Lxe=new eC;Cf.default=Lxe});var tC=_(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:true});Nb.HttpStatusCode=void 0;var LY;(function(t){t[t["CONTINUE"]=100]="CONTINUE";t[t["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";t[t["PROCESSING"]=102]="PROCESSING";t[t["OK"]=200]="OK";t[t["CREATED"]=201]="CREATED";t[t["ACCEPTED"]=202]="ACCEPTED";t[t["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";t[t["NO_CONTENT"]=204]="NO_CONTENT";t[t["RESET_CONTENT"]=205]="RESET_CONTENT";t[t["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";t[t["MULTI_STATUS"]=207]="MULTI_STATUS";t[t["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";t[t["IM_USED"]=226]="IM_USED";t[t["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";t[t["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";t[t["FOUND"]=302]="FOUND";t[t["SEE_OTHER"]=303]="SEE_OTHER";t[t["NOT_MODIFIED"]=304]="NOT_MODIFIED";t[t["USE_PROXY"]=305]="USE_PROXY";t[t["SWITCH_PROXY"]=306]="SWITCH_PROXY";t[t["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";t[t["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";t[t["BAD_REQUEST"]=400]="BAD_REQUEST";t[t["UNAUTHORIZED"]=401]="UNAUTHORIZED";t[t["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";t[t["FORBIDDEN"]=403]="FORBIDDEN";t[t["NOT_FOUND"]=404]="NOT_FOUND";t[t["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";t[t["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";t[t["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";t[t["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";t[t["CONFLICT"]=409]="CONFLICT";t[t["GONE"]=410]="GONE";t[t["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";t[t["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";t[t["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";t[t["URI_TOO_LONG"]=414]="URI_TOO_LONG";t[t["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";t[t["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";t[t["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";t[t["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";t[t["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";t[t["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";t[t["LOCKED"]=423]="LOCKED";t[t["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";t[t["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";t[t["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";t[t["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";t[t["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";t[t["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";t[t["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";t[t["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";t[t["BAD_GATEWAY"]=502]="BAD_GATEWAY";t[t["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";t[t["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";t[t["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";t[t["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";t[t["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";t[t["LOOP_DETECTED"]=508]="LOOP_DETECTED";t[t["NOT_EXTENDED"]=510]="NOT_EXTENDED";t[t["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})(LY||(Nb.HttpStatusCode=LY={}))});var qY=_(Ib=>{"use strict";Object.defineProperty(Ib,"__esModule",{value:true});Ib.getSourceControlProviderLabel=void 0;function qxe(t){let e="";switch(t){case"GITLAB":e="GitLab";break;case"GITHUB":e="GitHub";break;case"BITBUCKET":e="BitBucket";break;default:e=t;break}return e}o(qxe,"getSourceControlProviderLabel");Ib.getSourceControlProviderLabel=qxe});var UY=_(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:true});R.DEPLOYMENT_INVALID_MULTI_PART=R.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=R.DEPLOYMENT_FILE_DOES_NOT_EXISTS=R.DEPLOYMENT_NOT_FOUND=R.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=R.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=R.DEPLOYMENT_NO_ACCESS=R.INVALID_SOURCE_REPO_URL=R.INVALID_EMAIL_FORMAT=R.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=R.PROJECT_MUST_HAVE_ONE_MEMBER=R.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=R.PROJECT_MEMBER_ALREADY_EXISTS=R.PROJECT_MEMBER_NOT_FOUND=R.INVALID_TEMPLATE_REPOSITORY=R.INCORRECT_PROJECT_TEMPLATE=R.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=R.PROJECT_NOT_FOUND=R.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=R.PROJECT_SHARING_DISABLED_ON_ACCOUNT=R.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=R.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=R.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=R.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=R.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=R.ACCOUNT_MEMBER_INVITE_INVALID=R.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=R.ACCOUNT_MEMBER_DOES_NOT_EXIST=R.ACCOUNT_MEMBER_INFO_MISSING=R.ACCOUNT_MEMBER_ALREADY_EXISTS=R.ACCOUNT_UPDATE_INFO_MISSING=R.ACCOUNT_INFO_MISSING=R.ACCOUNT_DOES_NOT_EXISTS=R.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=R.ACCOUNT_NAME_USES_RESERVED_KEYWORD=R.ACCOUNT_ALREADY_EXISTS=R.ACCOUNT_NOT_FOUND=R.USER_IS_NOT_SERVICE_ACCOUNT=R.USER_REMOVE_NOT_MEMBER_ACCOUNT=R.USER_HAS_NO_ACCESS_TO_ACCOUNT=R.USER_DETAILS_CANNOT_BE_FOUND=R.USER_ALREADY_EXISTS=R.CLIENT_NOT_FOUND=R.FORBIDDEN=R.UNAUTHORIZED=R.METHOD_NOT_ALLOWED=R.NOT_FOUND=R.CONFLICT=R.BAD_REQUEST=R.INTERNAL_SERVER_ERROR=void 0;R.GITHUB_INTEGRATION_DUPLICATE_REPO=R.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=R.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=R.GITHUB_INTEGRATION_BRANCH_BEHIND=R.GITHUB_INTEGRATION_NOT_FOUND=R.GITHUB_REPOSITORY_NOT_FOUND=R.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=R.GITHUB_INTEGRATION_ALREADY_EXISTS=R.FEATURE_FLAGS_NOT_FOUND=R.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=R.PROJECT_ALREADY_HAS_REPO=R.PROJECT_INVALID_NAME=R.FAILED_TO_REVOKE_GH_TOKEN=R.USER_ACCOUNT_NOT_FS_MIGRATED=R.USER_NO_ACCESS_GITLAB_REPO=R.USER_NO_ACCESS_BITBUCKET_REPO=R.GITHUB_APP_CONFIGURATION_NOT_FOUND=R.GITHUB_APP_NO_USER_ACCESS_=R.GITHUB_APP_NO_NAMESPACE_ACCESS=R.GENERIC_GITHUB_BRANCH_INFO_ERROR=R.GITHUB_USER_NO_READ_ACCESS_REPO=R.USER_NO_PULL_ACCESS_GITHUB_REPO=R.USER_NO_ACCESS_GITHUB_REPO=R.PROJECT_SHARING_REQUIRES_GIT_REPO=R.PROJECT_INVALID_GIT_REPO=R.PROJECT_INVALID_GIT_CLONE=R.USER_IS_PROJECT_MEMBER=R.USER_HAS_NO_ACCESS_TO_PROJECT=R.RUNTIME_FLAG_KEY_NOT_VALID=R.RUNTIME_FLAG_NOT_FOUND=R.RUNTIME_FLAG_ALREADY_EXISTS=R.PROJECT_NO_MEMBERS=R.PROJECT_ALREADY_EXISTS=R.SERVICE_CONFIGURATION_FAILED_DECRYPTION=R.WORKING_COPY_SERVICE_NOT_CREATED=R.WORKING_COPY_SERVICE_NOT_DELETED=R.WORKING_COPY_SERVICE_NOT_FOUND=R.SERVICE_CONFIGURATION_NOT_FOUND=R.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=R.DEPLOYMENT_INCORRECT_STATUS_PAUSE=R.DEPLOYMENT_NOT_WORKING_COPY=R.DEPLOYMENT_LOG_NOT_FOUND=R.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=R.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=R.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=R.DEPLOYMENT_DELETE_ERROR=R.DEPLOYMENT_CANNOT_DELETE_INSTANCE=void 0;R.TARGET_BRANCH_ONLY_FOR_PREVIEW=R.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=R.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=R.DEPLOYMENT_NAME_MISSING=R.NON_EXISTENT_ENVIRONMENT_VARIABLE=R.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=R.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=R.DUPLICATE_ENVIRONMENT_VARIABLE=R.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=R.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=R.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=R.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=R.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=R.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=R.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=R.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=R.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=R.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=R.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=R.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=R.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=R.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=R.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=R.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=R.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=R.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=R.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=R.SOURCE_CONTROL_REPO_OPERATION_ERROR=R.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=R.SOURCE_CONTROL_REPO_NOT_FOUND=R.SOURCE_CONTROL_AUTHENTICATION_FAILED=R.EXTERNAL_SERVICE_GENERIC_ERROR=R.API_USER_NO_ACCESS=R.EXTERNAL_USER_NOT_CONFIGURED=R.EXTERNAL_USER_NO_ACCESS=R.CONSUMER_DOES_NOT_EXIST=R.CONSUMER_NO_ACCESS=R.GITLAB_ACCESS_LEVEL_CHECK_FAIL=R.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=R.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=R.GITLAB_DUPLICATE_REPO=R.GITLAB_FAILED_DURING_REPO_CREATION=R.GITLAB_QUERY_USER_INFO_FAILED=R.BITBUCKET_FAILED_DURING_REPO_CREATION=R.BITBUCKET_WORKSPACE_MISCONFIGURATION=R.BITBUCKET_QUERY_USER_INFO_FAILED=R.GITHUB_INTEGRATION_INVALID_REPO=R.GIT_CREATE_PROJECT_WITH_INVALID_REPO=R.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=R.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=void 0;R.METERING_BUCKET_CREATION_FAILED=R.UNABLE_UPGRADE_PLAN=R.BUCKET_API_KEY_SERVICE_CONFLICT=R.DIRECTORY_DELETE_FAILED=R.FILE_DELETE_FAILED=R.CANNOT_DELETE_SOLE_OPEN_API_FILE=R.CANNOT_DELETE_ESSENTIAL_DIRECTORY=R.CANNOT_DELETE_ESSENTIAL_FILE=R.FILE_WRITE_FAILED=R.FILE_RENAME_FAILED=R.FILE_RENAME_FILE_ALREADY_EXISTS=R.FILE_RENAME_CANNOT_CHANGE_EXTENSION=R.FILE_RENAME_PATHS_MATCH=R.DIRECTORY_CREATION_FAILED=R.DIRECTORY_OR_FILE_DOES_NOT_EXIST=R.DIRECTORY_DOES_NOT_EXIST=R.DIRECTORY_ALREADY_EXISTS=R.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=R.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=R.FAILED_DOWNLOAD_FROM_STORAGE=R.CANNOT_FIND_SRC_DIRECTORY=R.CANNOT_READ_PACKAGE_JSON=R.PACKAGE_JSON_NOT_FOUND=R.RUNTIME_VERSION_INCORRECT_FORMAT=R.MIGRATIONS_ONLY_ON_WORKING_COPY=R.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=R.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=R.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=R.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=R.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=R.NO_GLOBAL_SYMBOLS=R.NO_ZUPLO_PREFIXED_VARIABLES=R.NON_EMPTY_TARGETS_REQUIRED=R.CONFLICTING_TYPES=R.OVERLAPPING_TARGETS=R.INVALID_BRANCH_NAME=void 0;var ae=tC();var jY=qY();var jxe="https://github.com/apps/zuplo/installations/new";R.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:ae.HttpStatusCode.BAD_REQUEST};R.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:ae.HttpStatusCode.CONFLICT};R.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:ae.HttpStatusCode.NOT_FOUND};R.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:ae.HttpStatusCode.METHOD_NOT_ALLOWED};R.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:ae.HttpStatusCode.UNAUTHORIZED};R.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:ae.HttpStatusCode.FORBIDDEN};R.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:ae.HttpStatusCode.NOT_FOUND};R.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:ae.HttpStatusCode.CONFLICT};R.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:ae.HttpStatusCode.NOT_FOUND};R.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:ae.HttpStatusCode.UNAUTHORIZED};R.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:ae.HttpStatusCode.BAD_REQUEST};R.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:ae.HttpStatusCode.CONFLICT};R.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:ae.HttpStatusCode.BAD_REQUEST};R.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:ae.HttpStatusCode.BAD_REQUEST};R.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:ae.HttpStatusCode.BAD_REQUEST};R.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:ae.HttpStatusCode.FORBIDDEN};R.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:ae.HttpStatusCode.NOT_FOUND};R.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:ae.HttpStatusCode.NOT_FOUND};R.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:ae.HttpStatusCode.FORBIDDEN};R.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:ae.HttpStatusCode.BAD_REQUEST};var Uxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${t} is not a valid Zuplo template repository`,status:ae.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");R.INVALID_TEMPLATE_REPOSITORY=Uxe;R.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:ae.HttpStatusCode.NOT_FOUND};R.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:ae.HttpStatusCode.BAD_REQUEST};R.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:ae.HttpStatusCode.BAD_REQUEST};R.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:ae.HttpStatusCode.FORBIDDEN};R.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:ae.HttpStatusCode.BAD_REQUEST};R.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:ae.HttpStatusCode.NOT_FOUND};R.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:ae.HttpStatusCode.NOT_FOUND};R.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:ae.HttpStatusCode.BAD_REQUEST};R.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:ae.HttpStatusCode.BAD_REQUEST};R.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:ae.HttpStatusCode.NOT_FOUND};R.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:ae.HttpStatusCode.BAD_REQUEST};R.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:ae.HttpStatusCode.NOT_FOUND};R.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:ae.HttpStatusCode.BAD_REQUEST};R.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:ae.HttpStatusCode.FORBIDDEN};R.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:ae.HttpStatusCode.BAD_REQUEST};var Fxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");R.USER_NO_ACCESS_GITHUB_REPO=Fxe;var Bxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");R.USER_NO_PULL_ACCESS_GITHUB_REPO=Bxe;var Mxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");R.GITHUB_USER_NO_READ_ACCESS_REPO=Mxe;R.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:ae.HttpStatusCode.BAD_REQUEST};R.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:ae.HttpStatusCode.FORBIDDEN};var Vxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${t}'. Go to '${jxe}' to add the repository.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");R.GITHUB_APP_NO_USER_ACCESS_=Vxe;R.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:ae.HttpStatusCode.NOT_FOUND};var Hxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");R.USER_NO_ACCESS_BITBUCKET_REPO=Hxe;var zxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");R.USER_NO_ACCESS_GITLAB_REPO=zxe;R.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:ae.HttpStatusCode.FORBIDDEN};R.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:ae.HttpStatusCode.BAD_REQUEST};R.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:ae.HttpStatusCode.BAD_REQUEST};R.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:ae.HttpStatusCode.BAD_REQUEST};var Gxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:ae.HttpStatusCode.CONFLICT,detail:`The repository ${t} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");R.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Gxe;var Kxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:ae.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${t} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");R.GITHUB_REPOSITORY_NOT_FOUND=Kxe;R.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:ae.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};R.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};R.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};R.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:ae.HttpStatusCode.FORBIDDEN};var Yxe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${t}' already exists on GitHub org '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");R.GITHUB_INTEGRATION_DUPLICATE_REPO=Yxe;var Wxe=o(({repositoryName:t,details:e})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:e,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");R.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Wxe;var Jxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");R.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Jxe;var Qxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");R.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Qxe;var Xxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${t}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");R.GITHUB_INTEGRATION_INVALID_REPO=Xxe;R.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:ae.HttpStatusCode.FORBIDDEN};R.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:ae.HttpStatusCode.FORBIDDEN};var Zxe=o(({details:t})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");R.BITBUCKET_FAILED_DURING_REPO_CREATION=Zxe;R.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:ae.HttpStatusCode.FORBIDDEN};var eCe=o(({details:t})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");R.GITLAB_FAILED_DURING_REPO_CREATION=eCe;var tCe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${t}' already exists in GitLab team '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");R.GITLAB_DUPLICATE_REPO=tCe;var rCe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");R.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=rCe;var nCe=o(({namespaceLabel:t})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${t}'.`,details:`The user's GitLab access level does not allow the use of namespace '${t}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");R.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=nCe;var iCe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");R.GITLAB_ACCESS_LEVEL_CHECK_FAIL=iCe;R.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:ae.HttpStatusCode.UNAUTHORIZED};R.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:ae.HttpStatusCode.NOT_FOUND};R.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:ae.HttpStatusCode.UNAUTHORIZED};R.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:ae.HttpStatusCode.FORBIDDEN};R.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:ae.HttpStatusCode.FORBIDDEN};R.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};var sCe=o(({sourceControlProvider:t})=>{const e=(0,jY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${e}`,status:ae.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");R.SOURCE_CONTROL_AUTHENTICATION_FAILED=sCe;var aCe=o(({sourceControlProvider:t})=>{const e=(0,jY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${e} repository`,status:ae.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");R.SOURCE_CONTROL_REPO_NOT_FOUND=aCe;R.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:ae.HttpStatusCode.BAD_REQUEST};var oCe=o(({repoURL:t,operation:e})=>{return{type:`https://zup.fail/source-control-repo-${e}-error`,title:`Failed on ${e} operation to repository '${t}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:ae.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");R.SOURCE_CONTROL_REPO_OPERATION_ERROR=oCe;R.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:ae.HttpStatusCode.NOT_FOUND};R.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.NOT_FOUND};R.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:ae.HttpStatusCode.UNAUTHORIZED};R.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};R.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:ae.HttpStatusCode.BAD_REQUEST};R.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};R.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};R.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:ae.HttpStatusCode.NOT_FOUND};R.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:ae.HttpStatusCode.NOT_FOUND};R.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:ae.HttpStatusCode.FAILED_DEPENDENCY};R.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:ae.HttpStatusCode.FAILED_DEPENDENCY};R.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:ae.HttpStatusCode.FAILED_DEPENDENCY};R.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:ae.HttpStatusCode.BAD_REQUEST};R.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:ae.HttpStatusCode.BAD_REQUEST};R.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:ae.HttpStatusCode.BAD_REQUEST};R.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:ae.HttpStatusCode.BAD_REQUEST};R.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:ae.HttpStatusCode.BAD_REQUEST};R.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:ae.HttpStatusCode.BAD_REQUEST};R.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:ae.HttpStatusCode.BAD_REQUEST};R.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:ae.HttpStatusCode.BAD_REQUEST};R.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:ae.HttpStatusCode.BAD_REQUEST};R.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:ae.HttpStatusCode.BAD_REQUEST};R.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:ae.HttpStatusCode.FORBIDDEN};R.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:ae.HttpStatusCode.NOT_FOUND};var uCe=o(({operation:t,path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${t} file ${e} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");R.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=uCe;var lCe=o(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");R.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=lCe;R.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:ae.HttpStatusCode.BAD_REQUEST};R.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:ae.HttpStatusCode.BAD_REQUEST};R.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:ae.HttpStatusCode.NOT_FOUND};R.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:ae.HttpStatusCode.BAD_REQUEST};R.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:ae.HttpStatusCode.BAD_REQUEST};R.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:ae.HttpStatusCode.BAD_REQUEST};var cCe=o(({path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${t} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");R.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=cCe;var dCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${t} is not allowed.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");R.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=dCe;var pCe=o(({path:t})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${t}.`}),"DIRECTORY_ALREADY_EXISTS");R.DIRECTORY_ALREADY_EXISTS=pCe;var fCe=o(({path:t})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${t}`}),"DIRECTORY_DOES_NOT_EXIST");R.DIRECTORY_DOES_NOT_EXIST=fCe;var hCe=o(({path:t})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${t}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");R.DIRECTORY_OR_FILE_DOES_NOT_EXIST=hCe;var mCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${t}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");R.DIRECTORY_CREATION_FAILED=mCe;var gCe=o(({path:t})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${t} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");R.FILE_RENAME_PATHS_MATCH=gCe;var yCe=o(({oldExtension:t,newExtension:e})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${e} must match the old extension ${t}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");R.FILE_RENAME_CANNOT_CHANGE_EXTENSION=yCe;var vCe=o(({path:t})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${t}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");R.FILE_RENAME_FILE_ALREADY_EXISTS=vCe;var _Ce=o(({path:t})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${t}. Please try again or contact support.`}),"FILE_RENAME_FAILED");R.FILE_RENAME_FAILED=_Ce;var ECe=o(({path:t})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${t}. Please try again or contact support.`}),"FILE_WRITE_FAILED");R.FILE_WRITE_FAILED=ECe;var bCe=o(({path:t})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`File '${t}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");R.CANNOT_DELETE_ESSENTIAL_FILE=bCe;var wCe=o(({path:t})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory '${t}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");R.CANNOT_DELETE_ESSENTIAL_DIRECTORY=wCe;var SCe=o(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");R.CANNOT_DELETE_SOLE_OPEN_API_FILE=SCe;var TCe=o(({path:t})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${t}. Please try again or contact support.`}),"FILE_DELETE_FAILED");R.FILE_DELETE_FAILED=TCe;var ACe=o(({path:t})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${t}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");R.DIRECTORY_DELETE_FAILED=ACe;R.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:ae.HttpStatusCode.CONFLICT};R.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:ae.HttpStatusCode.BAD_REQUEST};R.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR}});var BY=_(Js=>{"use strict";var xCe=Js&&Js.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var CCe=Js&&Js.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var RCe=Js&&Js.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null){for(var r in t)if(r!=="default"&&Object.prototype.hasOwnProperty.call(t,r))xCe(e,t,r)}CCe(e,t);return e};Object.defineProperty(Js,"__esModule",{value:true});Js.ApiNotFoundError=Js.ApiError=Js.Problems=void 0;var FY=RCe(UY());Js.Problems=FY;var Pb=class extends Error{static{o(this,"ApiError")}type;status;detail;instance;constructor(e){super(e.title);if(!e.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${e.type}`)}this.name="ApiProblemError";this.type=e.type;this.status=e.status;this.detail=e.detail;this.instance=e.instance}};Js.ApiError=Pb;var rC=class extends Pb{static{o(this,"ApiNotFoundError")}constructor(e={}){super({...e,...FY.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Js.ApiNotFoundError=rC});var Qs=_(rc=>{"use strict";var OCe=rc&&rc.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var NCe=rc&&rc.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))OCe(e,t,r)};Object.defineProperty(rc,"__esModule",{value:true});rc.HttpStatusCode=void 0;NCe(BY(),rc);var ICe=tC();Object.defineProperty(rc,"HttpStatusCode",{enumerable:true,get:function(){return ICe.HttpStatusCode}})});var iC=_(Db=>{"use strict";Object.defineProperty(Db,"__esModule",{value:true});Db.CommonAuth=void 0;var ad=Qs();var PCe=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var nC=class t{static{o(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(e){return PCe.includes(e)}isDeployerServiceAccount(e){return t.DEPLOYER_USER_SUB===e}static isAuthorizedSub(e,r){if(typeof r==="string"){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}try{const n=e.includes(r.sub);if(!n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}catch(n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}};Db.CommonAuth=nC});var MY=_(kb=>{"use strict";Object.defineProperty(kb,"__esModule",{value:true});kb.hasBlockedNotifications=void 0;var DCe=["chocolate_bold_silverfish"];function kCe(t){return DCe.includes(t)}o(kCe,"hasBlockedNotifications");kb.hasBlockedNotifications=kCe});var VY=_(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:true});Xs.BuildIssueError=Xs.WARNING_SEVERITY=Xs.ERROR_SEVERITY=Xs.FAILURE_STATUS=Xs.WARNING_STATUS=Xs.GOOD_STATUS=void 0;Xs.GOOD_STATUS="Good";Xs.WARNING_STATUS="Warnings";Xs.FAILURE_STATUS="Failed";Xs.ERROR_SEVERITY="error";Xs.WARNING_SEVERITY="warning";var sC=class extends Error{static{o(this,"BuildIssueError")}issue;constructor(e){super(e.message);this.issue=e}};Xs.BuildIssueError=sC});var HY=_($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:true});$b.COMPATIBILITY_FLAG_MAPPINGS=void 0;$b.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true,removeAllVendorHeadersExceptListed:true}})});var zY=_((Ljt,$Ce)=>{$Ce.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2024-01-15",enum:["2023-03-14","2024-01-15"]}}}});var GY=_(Lb=>{"use strict";Object.defineProperty(Lb,"__esModule",{value:true});Lb.VALID_COMPATIBILITY_DATES=void 0;Lb.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var KY=_(od=>{"use strict";var LCe=od&&od.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(od,"__esModule",{value:true});od.DEFAULT_COMPATIBILITY_DATE=od.VALID_COMPATIBILITY_DATES=void 0;var qCe=LCe(zY());var jCe=GY();Object.defineProperty(od,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return jCe.VALID_COMPATIBILITY_DATES}});od.DEFAULT_COMPATIBILITY_DATE=qCe.default.properties.compatibilityDate.default});var YY=_(qb=>{"use strict";Object.defineProperty(qb,"__esModule",{value:true});qb.FeatureFlags=void 0;qb.FeatureFlags=Object.freeze({esmWorker:(t,e)=>({flagName:"ZUPLO_ESM_WORKER",defaultValue:false,accountName:t,projectName:e}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var WY=_(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:true});ud.decrypt=ud.encrypt=ud.signString=void 0;var zm=require("crypto");function UCe(t,e){return(0,zm.createHmac)("sha256",e).update(t).digest("hex")}o(UCe,"signString");ud.signString=UCe;var aC={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var FCe=o(()=>(0,zm.randomBytes)(aC.IV_BYTE_LEN),"getIV");function BCe(t,e){if(t===null){return null}const r=(0,zm.createHash)("sha256").update(String(e)).digest("base64").substring(0,32);const n=FCe();const i=(0,zm.createCipheriv)("aes-256-gcm",r,n,{authTagLength:aC.AUTH_TAG_BYTE_LEN});let s=i.update(t);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}o(BCe,"encrypt");ud.encrypt=BCe;function MCe(t,e){if(!t){return null}const r=Buffer.from(e);const n=(0,zm.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(t,"hex");const s=i.slice(-16);const a=i.slice(0,12);const u=i.slice(12,-16);const l=(0,zm.createDecipheriv)("aes-256-gcm",n,a,{authTagLength:aC.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}o(MCe,"decrypt");ud.decrypt=MCe});var JY=_(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:true});jb.getCurrentUtcDateTime=void 0;function VCe(){const t={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const e=new Date().toLocaleString("en-US",t);return e}o(VCe,"getCurrentUtcDateTime");jb.getCurrentUtcDateTime=VCe});var oC=_(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:true});Ub.DeploymentLogState=void 0;var QY;(function(t){t["ERROR"]="ERROR";t["IN_PROGRESS"]="IN_PROGRESS";t["SUCCESS"]="SUCCESS"})(QY||(Ub.DeploymentLogState=QY={}))});var uC=_(XY=>{"use strict";Object.defineProperty(XY,"__esModule",{value:true})});var eW=_(ZY=>{"use strict";Object.defineProperty(ZY,"__esModule",{value:true})});var tW=_(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:true});Fb.MARKDOWN_FRONTMATTER_KEYS=void 0;Fb.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var nW=_(rW=>{"use strict";Object.defineProperty(rW,"__esModule",{value:true})});var iW=_(ju=>{"use strict";var HCe=ju&&ju.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var Bb=ju&&ju.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))HCe(e,t,r)};Object.defineProperty(ju,"__esModule",{value:true});Bb(uC(),ju);Bb(eW(),ju);Bb(tW(),ju);Bb(nW(),ju)});var Mb=_(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:true});Uu.getLoggerContext=Uu.requestIdGenerator=Uu.REQUEST_ID_HEADER=Uu.LEGACY_REQUEST_ID_HEADER=void 0;var zCe=require("crypto");Uu.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Uu.REQUEST_ID_HEADER="zp-rid";var GCe=o(t=>{const e=t.headers["zuplo-request-id"];const r=t.headers["X-GitHub-Delivery"];if(e){const n=e;return`${n}`}else if(r){return`${r}`}return(0,zCe.randomUUID)()},"requestIdGenerator");Uu.requestIdGenerator=GCe;function KCe(t){const e=t.raw.url??"";const r={};try{const n=t.headers["zuplo-user"]??t.user?.sub;if(n){r.userSub=`${n}`}const i=e.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=e.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const a=e.match(/(projects)\/([a-zA-Z-0-9]*)/);if(a&&a!==null&&a.length>=2){r.project=a[2]}}catch(n){}return r}o(KCe,"getLoggerContext");Uu.getLoggerContext=KCe});var lC=_(Gm=>{"use strict";var YCe=Gm&&Gm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Gm,"__esModule",{value:true});Gm.errorHandler=void 0;var Ha=Qs();var WCe=YCe(Ca());var sW=Mb();function JCe(t,e,r){let n=500;let i;if(t instanceof Ha.ApiError){n=t.status;i={type:t.type,title:t.message,status:t.status,detail:t.detail,instance:t.instance}}else if(typeof t==="object"&&"validation"in t&&"validationContext"in t){n=Ha.HttpStatusCode.BAD_REQUEST;i={...Ha.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${t.validationContext}.`,errors:t.validation}}else if(typeof t==="object"&&"code"in t&&t.code==="FST_ERR_NOT_FOUND"){n=404;i=Ha.Problems.NOT_FOUND}else if(typeof t==="object"&&"code"in t&&typeof t.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(t.code)){n=Ha.HttpStatusCode.BAD_REQUEST;i={...Ha.Problems.BAD_REQUEST,detail:t.message}}else{let a;if(!r.statusCode||r.statusCode===200){if(typeof t==="object"&&"statusCode"in t&&typeof t.statusCode==="number"){a=t.statusCode}else if(typeof t==="object"&&"status"in t&&typeof t.status==="number"){a=t.status}n=a&&a>=400?a:500}else{n=r.statusCode}i=QCe(n);if(WCe.default.NODE_ENV!=="production"){if(typeof t==="object"&&"message"in t){i.detail=t.message}else if(typeof t==="string"){i.detail=t}}}i.trace={timestamp:new Date().toJSON(),requestId:e.headers[sW.REQUEST_ID_HEADER]??e.headers[sW.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:t},t&&t.message)}else{r.log.error({req:e,res:r,err:t},t&&t.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}o(JCe,"errorHandler");Gm.errorHandler=JCe;function QCe(t){if(t===401){return Ha.Problems.UNAUTHORIZED}else if(t===403){return Ha.Problems.FORBIDDEN}else if(t===404){return Ha.Problems.NOT_FOUND}else if(t===405){return Ha.Problems.METHOD_NOT_ALLOWED}else if(t<500&&t>=400){return Ha.Problems.BAD_REQUEST}return Ha.Problems.INTERNAL_SERVER_ERROR}o(QCe,"getProblemFromStatus")});var oW=_((eUt,cC)=>{"use strict";var XCe=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var ZCe=/(\w*(\.\w*)*)\..*/;cC.exports=o(function t(e){if(e.name.length>0)return e.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return aW(n.stack)}},"getPluginName");function aW(t){const e=t.match(XCe);return e?e[1].split(/[/\\]/).slice(-1)[0].match(ZCe)[1]:"anonymous"}o(aW,"extractPluginName");cC.exports.extractPluginName=aW});var lW=_((rUt,uW)=>{"use strict";uW.exports=o(function t(e){if(e[0]==="@"){e=e.slice(1).replace("/","-")}const r=e.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var Rf=_((iUt,Vb)=>{"use strict";var eRe=oW();var tRe=lW();var rRe=0;function dC(t,e={}){let r=false;if(typeof t.default!=="undefined"){t=t.default}if(typeof t!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof t}'`)}if(typeof e==="string"){e={fastify:e}}if(typeof e!=="object"||Array.isArray(e)||e===null){throw new TypeError("The options object should be an object")}if(e.fastify!==void 0&&typeof e.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof e.fastify}'`)}if(!e.name){r=true;e.name=eRe(t)+"-auto-"+rRe++}t[Symbol.for("skip-override")]=e.encapsulate!==true;t[Symbol.for("fastify.display-name")]=e.name;t[Symbol.for("plugin-meta")]=e;if(!t.default){t.default=t}const n=tRe(e.name);if(!r&&!t[n]){t[n]=t}return t}o(dC,"plugin");Vb.exports=dC;Vb.exports.default=dC;Vb.exports.fastifyPlugin=dC});var dW=_(Km=>{"use strict";var nRe=Km&&Km.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Km,"__esModule",{value:true});Km.apiKeyAuthPlugin=void 0;var Fu=Qs();var iRe=nRe(Rf());var sRe="https://apikey.zuplo.com";var cW=`Bearer `;Km.apiKeyAuthPlugin=(0,iRe.default)(async(t,e)=>{t.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new Fu.ApiError({...Fu.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(cW)){throw new Fu.ApiError({...Fu.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(cW.length);if(!i||i===""){throw new Fu.ApiError({...Fu.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const a=await fetch(`${sRe}/v1/$validate/${e.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(a.status===401){throw new Fu.ApiError(Fu.Problems.UNAUTHORIZED)}const u=await a.json();if(e.allowedSubs){if(!e.allowedSubs.includes(u.name)){throw new Fu.ApiError(Fu.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var pW=_(Ym=>{"use strict";var aRe=Ym&&Ym.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Ym,"__esModule",{value:true});Ym.ensureZuploAdminPlugin=void 0;var Hb=Qs();var oRe=aRe(Rf());var uRe=iC();Ym.ensureZuploAdminPlugin=(0,oRe.default)(async function(t){const e=new uRe.CommonAuth;t.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new Hb.ApiError(Hb.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&e.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new Hb.ApiError(Hb.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var hW=_(Wm=>{"use strict";var lRe=Wm&&Wm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Wm,"__esModule",{value:true});Wm.ensureZuploUserPlugin=void 0;var fW=Qs();var cRe=lRe(Rf());Wm.ensureZuploUserPlugin=(0,cRe.default)(async t=>{t.decorate("ensureZuploUser",async function(e){const r=e.headers["zuplo-user"];if(!r||typeof r!=="string"){e.log.error("The 'zuplo-user' header is missing");throw new fW.ApiError(fW.Problems.UNAUTHORIZED)}e.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var yW=_(Jm=>{"use strict";var dRe=Jm&&Jm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Jm,"__esModule",{value:true});Jm.featureFlagsPlugin=void 0;var pRe=dRe(Rf());var pC;async function mW(t,e){try{const r=await pC?.variation(e.flagName,{kind:e.kind,key:e.key},e.defaultValue);if(r===void 0){return e.defaultValue}else{return r}}catch(r){t.log.warn(`Failed to query Launch Darkly flag ${e.flagName}`);t.log.error(r)}return e.defaultValue}o(mW,"getFlagValue");function gW(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return Promise.resolve(false)}o(gW,"fallback");Jm.featureFlagsPlugin=(0,pRe.default)(async(t,e)=>{try{if(typeof e.key!=="string"||!e.key||!e.client){t.decorateRequest("getFlagValue",gW);t.decorateRequest("getFlagValueByUser",gW);return}pC=e.client;t.log.info("Launch Darkly SDK successfully initialized!");t.decorate("flags",pC);t.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return mW(this,s)});t.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return mW(this,s)})}catch(r){t.log.warn("Launch Darkly failed to initialize");t.log.error(r)}},{name:"feature-flag-plugin"})});var fC=_(Qm=>{"use strict";var fRe=Qm&&Qm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Qm,"__esModule",{value:true});Qm.getUserSubPlugin=void 0;var vW=Qs();var hRe=fRe(Rf());Qm.getUserSubPlugin=(0,hRe.default)(async t=>{t.decorateRequest("getUserSub",function(){const e=this.user?.sub;if(!e){this.log.error("Could not determine the user sub");throw new vW.ApiError(vW.Problems.UNAUTHORIZED)}return e})},{name:"get-user-sub-plugin"})});var hC=_(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:true});za.getUserSubPlugin=za.featureFlagsPlugin=za.ensureZuploUserPlugin=za.ensureZuploAdminPlugin=za.apiKeyAuthPlugin=void 0;var mRe=dW();Object.defineProperty(za,"apiKeyAuthPlugin",{enumerable:true,get:function(){return mRe.apiKeyAuthPlugin}});var gRe=pW();Object.defineProperty(za,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return gRe.ensureZuploAdminPlugin}});var yRe=hW();Object.defineProperty(za,"ensureZuploUserPlugin",{enumerable:true,get:function(){return yRe.ensureZuploUserPlugin}});var vRe=yW();Object.defineProperty(za,"featureFlagsPlugin",{enumerable:true,get:function(){return vRe.featureFlagsPlugin}});var _Re=fC();Object.defineProperty(za,"getUserSubPlugin",{enumerable:true,get:function(){return _Re.getUserSubPlugin}})});var Kr=_(ji=>{"use strict";var mC=Symbol.for("yaml.alias");var _W=Symbol.for("yaml.document");var zb=Symbol.for("yaml.map");var EW=Symbol.for("yaml.pair");var gC=Symbol.for("yaml.scalar");var Gb=Symbol.for("yaml.seq");var nc=Symbol.for("yaml.node.type");var ERe=o(t=>!!t&&typeof t==="object"&&t[nc]===mC,"isAlias");var bRe=o(t=>!!t&&typeof t==="object"&&t[nc]===_W,"isDocument");var wRe=o(t=>!!t&&typeof t==="object"&&t[nc]===zb,"isMap");var SRe=o(t=>!!t&&typeof t==="object"&&t[nc]===EW,"isPair");var bW=o(t=>!!t&&typeof t==="object"&&t[nc]===gC,"isScalar");var TRe=o(t=>!!t&&typeof t==="object"&&t[nc]===Gb,"isSeq");function wW(t){if(t&&typeof t==="object")switch(t[nc]){case zb:case Gb:return true}return false}o(wW,"isCollection");function ARe(t){if(t&&typeof t==="object")switch(t[nc]){case mC:case zb:case gC:case Gb:return true}return false}o(ARe,"isNode");var xRe=o(t=>(bW(t)||wW(t))&&!!t.anchor,"hasAnchor");ji.ALIAS=mC;ji.DOC=_W;ji.MAP=zb;ji.NODE_TYPE=nc;ji.PAIR=EW;ji.SCALAR=gC;ji.SEQ=Gb;ji.hasAnchor=xRe;ji.isAlias=ERe;ji.isCollection=wW;ji.isDocument=bRe;ji.isMap=wRe;ji.isNode=ARe;ji.isPair=SRe;ji.isScalar=bW;ji.isSeq=TRe});var x2=_(yC=>{"use strict";var gi=Kr();var Zs=Symbol("break visit");var SW=Symbol("skip children");var Bu=Symbol("remove node");function Kb(t,e){const r=TW(e);if(gi.isDocument(t)){const n=Xm(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else Xm(null,t,r,Object.freeze([]))}o(Kb,"visit");Kb.BREAK=Zs;Kb.SKIP=SW;Kb.REMOVE=Bu;function Xm(t,e,r,n){const i=AW(t,e,r,n);if(gi.isNode(i)||gi.isPair(i)){xW(t,n,i);return Xm(t,i,r,n)}if(typeof i!=="symbol"){if(gi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=Xm(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(gi.isPair(e)){n=Object.freeze(n.concat(e));const s=Xm("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=Xm("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(Xm,"visit_");async function Yb(t,e){const r=TW(e);if(gi.isDocument(t)){const n=await Zm(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else await Zm(null,t,r,Object.freeze([]))}o(Yb,"visitAsync");Yb.BREAK=Zs;Yb.SKIP=SW;Yb.REMOVE=Bu;async function Zm(t,e,r,n){const i=await AW(t,e,r,n);if(gi.isNode(i)||gi.isPair(i)){xW(t,n,i);return Zm(t,i,r,n)}if(typeof i!=="symbol"){if(gi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=await Zm(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(gi.isPair(e)){n=Object.freeze(n.concat(e));const s=await Zm("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=await Zm("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(Zm,"visitAsync_");function TW(t){if(typeof t==="object"&&(t.Collection||t.Node||t.Value)){return Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t)}return t}o(TW,"initVisitor");function AW(t,e,r,n){if(typeof r==="function")return r(t,e,n);if(gi.isMap(e))return r.Map?.(t,e,n);if(gi.isSeq(e))return r.Seq?.(t,e,n);if(gi.isPair(e))return r.Pair?.(t,e,n);if(gi.isScalar(e))return r.Scalar?.(t,e,n);if(gi.isAlias(e))return r.Alias?.(t,e,n);return void 0}o(AW,"callVisitor");function xW(t,e,r){const n=e[e.length-1];if(gi.isCollection(n)){n.items[t]=r}else if(gi.isPair(n)){if(t==="key")n.key=r;else n.value=r}else if(gi.isDocument(n)){n.contents=r}else{const i=gi.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(xW,"replaceNode");yC.visit=Kb;yC.visitAsync=Yb});var vC=_(RW=>{"use strict";var CW=Kr();var CRe=x2();var RRe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var ORe=o(t=>t.replace(/[!,[\]{}]/g,e=>RRe[e]),"escapeTagName");var C2=class t{static{o(this,"Directives")}constructor(e,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},t.defaultYaml,e);this.tags=Object.assign({},t.defaultTags,r)}clone(){const e=new t(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){if(this.atNextDocument){this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},t.defaultTags);this.atNextDocument=false}const n=e.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,a]=n;this.tags[s]=a;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const a=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,a);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!"){r(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const a=e.slice(2,-1);if(a==="!"||a==="!!"){r(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")r("Verbatim tags must end with a >");return a}const[,n,i]=e.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${e} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(a){r(String(a));return null}}if(n==="!")return e;r(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[r,n]of Object.entries(this.tags)){if(e.startsWith(n))return r+ORe(e.substring(n.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(e&&n.length>0&&CW.isNode(e.contents)){const s={};CRe.visit(e.contents,(a,u)=>{if(CW.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,a]of n){if(s==="!!"&&a==="tag:yaml.org,2002:")continue;if(!e||i.some(u=>u.startsWith(a)))r.push(`%TAG ${s} ${a}`)}return r.join("\n")}};C2.defaultYaml={explicit:false,version:"1.2"};C2.defaultTags={"!!":"tag:yaml.org,2002:"};RW.Directives=C2});var Wb=_(R2=>{"use strict";var OW=Kr();var NRe=x2();function IRe(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const e=JSON.stringify(t);const r=`Anchor must not contain whitespace or control characters: ${e}`;throw new Error(r)}return true}o(IRe,"anchorIsValid");function NW(t){const e=new Set;NRe.visit(t,{Value(r,n){if(n.anchor)e.add(n.anchor)}});return e}o(NW,"anchorNames");function IW(t,e){for(let r=1;true;++r){const n=`${t}${r}`;if(!e.has(n))return n}}o(IW,"findNewAnchor");function PRe(t,e){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=NW(t);const a=IW(e,i);i.add(a);return a},setAnchors:()=>{for(const s of r){const a=n.get(s);if(typeof a==="object"&&a.anchor&&(OW.isScalar(a.node)||OW.isCollection(a.node))){a.node.anchor=a.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}o(PRe,"createNodeAnchors");R2.anchorIsValid=IRe;R2.anchorNames=NW;R2.createNodeAnchors=PRe;R2.findNewAnchor=IW});var _C=_(PW=>{"use strict";function O2(t,e,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const a=n[i];const u=O2(t,n,String(i),a);if(u===void 0)delete n[i];else if(u!==a)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const a=O2(t,n,i,s);if(a===void 0)n.delete(i);else if(a!==s)n.set(i,a)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=O2(t,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const a=O2(t,n,i,s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}}}return t.call(e,r,n)}o(O2,"applyReviver");PW.applyReviver=O2});var ld=_(kW=>{"use strict";var DRe=Kr();function DW(t,e,r){if(Array.isArray(t))return t.map((n,i)=>DW(n,String(i),r));if(t&&typeof t.toJSON==="function"){if(!r||!DRe.hasAnchor(t))return t.toJSON(e,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=t.toJSON(e,r);if(r.onCreate)r.onCreate(i);return i}if(typeof t==="bigint"&&!r?.keep)return Number(t);return t}o(DW,"toJS");kW.toJS=DW});var Jb=_(LW=>{"use strict";var kRe=_C();var $W=Kr();var $Re=ld();var EC=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,$W.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!$W.isDocument(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=$Re.toJS(this,"",a);if(typeof i==="function")for(const{count:l,res:c}of a.anchors.values())i(c,l);return typeof s==="function"?kRe.applyReviver(s,{"":u},"",u):u}};LW.NodeBase=EC});var N2=_(jW=>{"use strict";var LRe=Wb();var qW=x2();var Qb=Kr();var qRe=Jb();var jRe=ld();var bC=class extends qRe.NodeBase{static{o(this,"Alias")}constructor(e){super(Qb.ALIAS);this.source=e;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let r=void 0;qW.visit(e,{Node:(n,i)=>{if(i===this)return qW.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(e,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const a=this.resolve(i);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(a);if(!u){jRe.toJS(a,null,r);u=n.get(a)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=Xb(i,a,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(e,r,n){const i=`*${this.source}`;if(e){LRe.anchorIsValid(this.source);if(e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function Xb(t,e,r){if(Qb.isAlias(e)){const n=e.resolve(t);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Qb.isCollection(e)){let n=0;for(const i of e.items){const s=Xb(t,i,r);if(s>n)n=s}return n}else if(Qb.isPair(e)){const n=Xb(t,e.key,r);const i=Xb(t,e.value,r);return Math.max(n,i)}return 1}o(Xb,"getAliasCount");jW.Alias=bC});var ai=_(wC=>{"use strict";var URe=Kr();var FRe=Jb();var BRe=ld();var MRe=o(t=>!t||typeof t!=="function"&&typeof t!=="object","isScalarValue");var cd=class extends FRe.NodeBase{static{o(this,"Scalar")}constructor(e){super(URe.SCALAR);this.value=e}toJSON(e,r){return r?.keep?this.value:BRe.toJS(this.value,e,r)}toString(){return String(this.value)}};cd.BLOCK_FOLDED="BLOCK_FOLDED";cd.BLOCK_LITERAL="BLOCK_LITERAL";cd.PLAIN="PLAIN";cd.QUOTE_DOUBLE="QUOTE_DOUBLE";cd.QUOTE_SINGLE="QUOTE_SINGLE";wC.Scalar=cd;wC.isScalarValue=MRe});var I2=_(FW=>{"use strict";var VRe=N2();var Of=Kr();var UW=ai();var HRe="tag:yaml.org,2002:";function zRe(t,e,r){if(e){const n=r.filter(s=>s.tag===e);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}o(zRe,"findTagObject");function GRe(t,e,r){if(Of.isDocument(t))t=t.contents;if(Of.isNode(t))return t;if(Of.isPair(t)){const p=r.schema[Of.MAP].createNode?.(r.schema,null,r);p.items.push(t);return p}if(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt!=="undefined"&&t instanceof BigInt){t=t.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:u}=r;let l=void 0;if(n&&t&&typeof t==="object"){l=u.get(t);if(l){if(!l.anchor)l.anchor=i(t);return new VRe.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(t,l)}}if(e?.startsWith("!!"))e=HRe+e.slice(2);let c=zRe(t,e,a.tags);if(!c){if(t&&typeof t.toJSON==="function"){t=t.toJSON()}if(!t||typeof t!=="object"){const p=new UW.Scalar(t);if(l)l.node=p;return p}c=t instanceof Map?a[Of.MAP]:Symbol.iterator in Object(t)?a[Of.SEQ]:a[Of.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,t,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,t,r):new UW.Scalar(t);if(e)d.tag=e;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}o(GRe,"createNode");FW.createNode=GRe});var P2=_(e3=>{"use strict";var KRe=I2();var Mu=Kr();var YRe=Jb();function SC(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n;n=a}else{n=new Map([[s,n]])}}return KRe.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}o(SC,"collectionFromPath");var BW=o(t=>t==null||typeof t==="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath");var Zb=class extends YRe.NodeBase{static{o(this,"Collection")}constructor(e,r){super(e);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(e){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)r.schema=e;r.items=r.items.map(n=>Mu.isNode(n)||Mu.isPair(n)?n.clone(e):n);if(this.range)r.range=this.range.slice();return r}addIn(e,r){if(BW(e))this.add(r);else{const[n,...i]=e;const s=this.get(n,true);if(Mu.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,SC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[r,...n]=e;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(Mu.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){const[n,...i]=e;const s=this.get(n,true);if(i.length===0)return!r&&Mu.isScalar(s)?s.value:s;else return Mu.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Mu.isPair(r))return false;const n=r.value;return n==null||e&&Mu.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[r,...n]=e;if(n.length===0)return this.has(r);const i=this.get(r,true);return Mu.isCollection(i)?i.hasIn(n):false}setIn(e,r){const[n,...i]=e;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(Mu.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,SC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};Zb.maxFlowStringSingleLineLength=60;e3.Collection=Zb;e3.collectionFromPath=SC;e3.isEmptyPath=BW});var D2=_(t3=>{"use strict";var WRe=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function TC(t,e){if(/^\n+$/.test(t))return t.substring(1);return e?t.replace(/^(?! *$)/gm,e):t}o(TC,"indentComment");var JRe=o((t,e,r)=>t.endsWith("\n")?TC(r,e):r.includes("\n")?"\n"+TC(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");t3.indentComment=TC;t3.lineComment=JRe;t3.stringifyComment=WRe});var VW=_(k2=>{"use strict";var QRe="flow";var AC="block";var r3="quoted";function XRe(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:u}={}){if(!i||i<0)return t;const l=Math.max(1+s,1+i-e.length);if(t.length<=l)return t;const c=[];const d={};let p=i-e.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let h=void 0;let m=false;let g=-1;let y=-1;let v=-1;if(r===AC){g=MW(t,g);if(g!==-1)p=g+l}for(let E;E=t[g+=1];){if(r===r3&&E==="\\"){y=g;switch(t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===AC)g=MW(t,g);p=g+l;f=void 0}else{if(E===" "&&h&&h!==" "&&h!=="\n"&&h!==" "){const b=t[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===r3){while(h===" "||h===" "){h=E;E=t[g+=1];m=true}const b=g>v+1?g-2:y-1;if(d[b])return t;c.push(b);d[b]=true;p=b+l;f=void 0}else{m=true}}}h=E}if(m&&u)u();if(c.length===0)return t;if(a)a();let w=t.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const S=c[E+1]||t.length;if(b===0)w=`
|
|
25
|
+
"use strict";var Ixe=Object.create;var T2=Object.defineProperty;var Pxe=Object.getOwnPropertyDescriptor;var Dxe=Object.getOwnPropertyNames;var kxe=Object.getPrototypeOf;var $xe=Object.prototype.hasOwnProperty;var o=(t,e)=>T2(t,"name",{value:e,configurable:true});var Gr=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var kY=(t,e)=>{for(var r in e)T2(t,r,{get:e[r],enumerable:true})};var $Y=(t,e,r,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let i of Dxe(e))if(!$xe.call(t,i)&&i!==r)T2(t,i,{get:()=>e[i],enumerable:!(n=Pxe(e,i))||n.enumerable})}return t};var xf=(t,e,r)=>(r=t!=null?Ixe(kxe(t)):{},$Y(e||!t||!t.__esModule?T2(r,"default",{value:t,enumerable:true}):r,t));var Hm=t=>$Y(T2({},"__esModule",{value:true}),t);var Ca=_(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:true});Cf.EnvironmentalVariableRequiredError=Cf.getRequiredEnvVar=void 0;var eC=class{static{o(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.53.0"}get AUTH_API_URL(){return Yo("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return Yo("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return Yo("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return Yo("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return Yo("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return Yo("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return Yo("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return Yo("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return Yo("METERING_SERVICE_URL","https://meters.zuplo.com")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new A2(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return Yo("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function Yo(t,e){const r=process.env[t];if(r===void 0&&(e===void 0||process.env.NODE_ENV==="production")){throw new A2(t)}return r??e}o(Yo,"getRequiredEnvVar");Cf.getRequiredEnvVar=Yo;var A2=class extends Error{static{o(this,"EnvironmentalVariableRequiredError")}constructor(e){super(`The environmental variable '${e}' is required.'`)}};Cf.EnvironmentalVariableRequiredError=A2;var Lxe=new eC;Cf.default=Lxe});var tC=_(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:true});Nb.HttpStatusCode=void 0;var LY;(function(t){t[t["CONTINUE"]=100]="CONTINUE";t[t["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";t[t["PROCESSING"]=102]="PROCESSING";t[t["OK"]=200]="OK";t[t["CREATED"]=201]="CREATED";t[t["ACCEPTED"]=202]="ACCEPTED";t[t["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";t[t["NO_CONTENT"]=204]="NO_CONTENT";t[t["RESET_CONTENT"]=205]="RESET_CONTENT";t[t["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";t[t["MULTI_STATUS"]=207]="MULTI_STATUS";t[t["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";t[t["IM_USED"]=226]="IM_USED";t[t["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";t[t["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";t[t["FOUND"]=302]="FOUND";t[t["SEE_OTHER"]=303]="SEE_OTHER";t[t["NOT_MODIFIED"]=304]="NOT_MODIFIED";t[t["USE_PROXY"]=305]="USE_PROXY";t[t["SWITCH_PROXY"]=306]="SWITCH_PROXY";t[t["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";t[t["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";t[t["BAD_REQUEST"]=400]="BAD_REQUEST";t[t["UNAUTHORIZED"]=401]="UNAUTHORIZED";t[t["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";t[t["FORBIDDEN"]=403]="FORBIDDEN";t[t["NOT_FOUND"]=404]="NOT_FOUND";t[t["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";t[t["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";t[t["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";t[t["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";t[t["CONFLICT"]=409]="CONFLICT";t[t["GONE"]=410]="GONE";t[t["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";t[t["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";t[t["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";t[t["URI_TOO_LONG"]=414]="URI_TOO_LONG";t[t["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";t[t["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";t[t["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";t[t["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";t[t["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";t[t["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";t[t["LOCKED"]=423]="LOCKED";t[t["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";t[t["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";t[t["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";t[t["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";t[t["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";t[t["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";t[t["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";t[t["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";t[t["BAD_GATEWAY"]=502]="BAD_GATEWAY";t[t["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";t[t["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";t[t["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";t[t["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";t[t["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";t[t["LOOP_DETECTED"]=508]="LOOP_DETECTED";t[t["NOT_EXTENDED"]=510]="NOT_EXTENDED";t[t["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})(LY||(Nb.HttpStatusCode=LY={}))});var qY=_(Ib=>{"use strict";Object.defineProperty(Ib,"__esModule",{value:true});Ib.getSourceControlProviderLabel=void 0;function qxe(t){let e="";switch(t){case"GITLAB":e="GitLab";break;case"GITHUB":e="GitHub";break;case"BITBUCKET":e="BitBucket";break;default:e=t;break}return e}o(qxe,"getSourceControlProviderLabel");Ib.getSourceControlProviderLabel=qxe});var UY=_(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:true});R.DEPLOYMENT_INVALID_MULTI_PART=R.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=R.DEPLOYMENT_FILE_DOES_NOT_EXISTS=R.DEPLOYMENT_NOT_FOUND=R.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=R.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=R.DEPLOYMENT_NO_ACCESS=R.INVALID_SOURCE_REPO_URL=R.INVALID_EMAIL_FORMAT=R.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=R.PROJECT_MUST_HAVE_ONE_MEMBER=R.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=R.PROJECT_MEMBER_ALREADY_EXISTS=R.PROJECT_MEMBER_NOT_FOUND=R.INVALID_TEMPLATE_REPOSITORY=R.INCORRECT_PROJECT_TEMPLATE=R.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=R.PROJECT_NOT_FOUND=R.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=R.PROJECT_SHARING_DISABLED_ON_ACCOUNT=R.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=R.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=R.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=R.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=R.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=R.ACCOUNT_MEMBER_INVITE_INVALID=R.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=R.ACCOUNT_MEMBER_DOES_NOT_EXIST=R.ACCOUNT_MEMBER_INFO_MISSING=R.ACCOUNT_MEMBER_ALREADY_EXISTS=R.ACCOUNT_UPDATE_INFO_MISSING=R.ACCOUNT_INFO_MISSING=R.ACCOUNT_DOES_NOT_EXISTS=R.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=R.ACCOUNT_NAME_USES_RESERVED_KEYWORD=R.ACCOUNT_ALREADY_EXISTS=R.ACCOUNT_NOT_FOUND=R.USER_IS_NOT_SERVICE_ACCOUNT=R.USER_REMOVE_NOT_MEMBER_ACCOUNT=R.USER_HAS_NO_ACCESS_TO_ACCOUNT=R.USER_DETAILS_CANNOT_BE_FOUND=R.USER_ALREADY_EXISTS=R.CLIENT_NOT_FOUND=R.FORBIDDEN=R.UNAUTHORIZED=R.METHOD_NOT_ALLOWED=R.NOT_FOUND=R.CONFLICT=R.BAD_REQUEST=R.INTERNAL_SERVER_ERROR=void 0;R.GITHUB_INTEGRATION_DUPLICATE_REPO=R.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=R.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=R.GITHUB_INTEGRATION_BRANCH_BEHIND=R.GITHUB_INTEGRATION_NOT_FOUND=R.GITHUB_REPOSITORY_NOT_FOUND=R.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=R.GITHUB_INTEGRATION_ALREADY_EXISTS=R.FEATURE_FLAGS_NOT_FOUND=R.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=R.PROJECT_ALREADY_HAS_REPO=R.PROJECT_INVALID_NAME=R.FAILED_TO_REVOKE_GH_TOKEN=R.USER_ACCOUNT_NOT_FS_MIGRATED=R.USER_NO_ACCESS_GITLAB_REPO=R.USER_NO_ACCESS_BITBUCKET_REPO=R.GITHUB_APP_CONFIGURATION_NOT_FOUND=R.GITHUB_APP_NO_USER_ACCESS_=R.GITHUB_APP_NO_NAMESPACE_ACCESS=R.GENERIC_GITHUB_BRANCH_INFO_ERROR=R.GITHUB_USER_NO_READ_ACCESS_REPO=R.USER_NO_PULL_ACCESS_GITHUB_REPO=R.USER_NO_ACCESS_GITHUB_REPO=R.PROJECT_SHARING_REQUIRES_GIT_REPO=R.PROJECT_INVALID_GIT_REPO=R.PROJECT_INVALID_GIT_CLONE=R.USER_IS_PROJECT_MEMBER=R.USER_HAS_NO_ACCESS_TO_PROJECT=R.RUNTIME_FLAG_KEY_NOT_VALID=R.RUNTIME_FLAG_NOT_FOUND=R.RUNTIME_FLAG_ALREADY_EXISTS=R.PROJECT_NO_MEMBERS=R.PROJECT_ALREADY_EXISTS=R.SERVICE_CONFIGURATION_FAILED_DECRYPTION=R.WORKING_COPY_SERVICE_NOT_CREATED=R.WORKING_COPY_SERVICE_NOT_DELETED=R.WORKING_COPY_SERVICE_NOT_FOUND=R.SERVICE_CONFIGURATION_NOT_FOUND=R.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=R.DEPLOYMENT_INCORRECT_STATUS_PAUSE=R.DEPLOYMENT_NOT_WORKING_COPY=R.DEPLOYMENT_LOG_NOT_FOUND=R.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=R.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=R.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=R.DEPLOYMENT_DELETE_ERROR=R.DEPLOYMENT_CANNOT_DELETE_INSTANCE=void 0;R.TARGET_BRANCH_ONLY_FOR_PREVIEW=R.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=R.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=R.DEPLOYMENT_NAME_MISSING=R.NON_EXISTENT_ENVIRONMENT_VARIABLE=R.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=R.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=R.DUPLICATE_ENVIRONMENT_VARIABLE=R.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=R.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=R.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=R.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=R.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=R.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=R.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=R.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=R.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=R.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=R.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=R.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=R.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=R.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=R.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=R.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=R.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=R.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=R.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=R.SOURCE_CONTROL_REPO_OPERATION_ERROR=R.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=R.SOURCE_CONTROL_REPO_NOT_FOUND=R.SOURCE_CONTROL_AUTHENTICATION_FAILED=R.EXTERNAL_SERVICE_GENERIC_ERROR=R.API_USER_NO_ACCESS=R.EXTERNAL_USER_NOT_CONFIGURED=R.EXTERNAL_USER_NO_ACCESS=R.CONSUMER_DOES_NOT_EXIST=R.CONSUMER_NO_ACCESS=R.GITLAB_ACCESS_LEVEL_CHECK_FAIL=R.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=R.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=R.GITLAB_DUPLICATE_REPO=R.GITLAB_FAILED_DURING_REPO_CREATION=R.GITLAB_QUERY_USER_INFO_FAILED=R.BITBUCKET_FAILED_DURING_REPO_CREATION=R.BITBUCKET_WORKSPACE_MISCONFIGURATION=R.BITBUCKET_QUERY_USER_INFO_FAILED=R.GITHUB_INTEGRATION_INVALID_REPO=R.GIT_CREATE_PROJECT_WITH_INVALID_REPO=R.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=R.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=void 0;R.METERING_BUCKET_CREATION_FAILED=R.UNABLE_UPGRADE_PLAN=R.BUCKET_NOT_FOUND=R.BUCKET_API_KEY_SERVICE_CONFLICT=R.DIRECTORY_DELETE_FAILED=R.FILE_DELETE_FAILED=R.CANNOT_DELETE_SOLE_OPEN_API_FILE=R.CANNOT_DELETE_ESSENTIAL_DIRECTORY=R.CANNOT_DELETE_ESSENTIAL_FILE=R.FILE_WRITE_FAILED=R.FILE_RENAME_FAILED=R.FILE_RENAME_FILE_ALREADY_EXISTS=R.FILE_RENAME_CANNOT_CHANGE_EXTENSION=R.FILE_RENAME_PATHS_MATCH=R.DIRECTORY_CREATION_FAILED=R.DIRECTORY_OR_FILE_DOES_NOT_EXIST=R.DIRECTORY_DOES_NOT_EXIST=R.DIRECTORY_ALREADY_EXISTS=R.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=R.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=R.FAILED_DOWNLOAD_FROM_STORAGE=R.CANNOT_FIND_SRC_DIRECTORY=R.CANNOT_READ_PACKAGE_JSON=R.PACKAGE_JSON_NOT_FOUND=R.RUNTIME_VERSION_INCORRECT_FORMAT=R.MIGRATIONS_ONLY_ON_WORKING_COPY=R.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=R.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=R.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=R.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=R.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=R.NO_GLOBAL_SYMBOLS=R.NO_ZUPLO_PREFIXED_VARIABLES=R.NON_EMPTY_TARGETS_REQUIRED=R.CONFLICTING_TYPES=R.OVERLAPPING_TARGETS=R.INVALID_BRANCH_NAME=void 0;var ae=tC();var jY=qY();var jxe="https://github.com/apps/zuplo/installations/new";R.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:ae.HttpStatusCode.BAD_REQUEST};R.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:ae.HttpStatusCode.CONFLICT};R.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:ae.HttpStatusCode.NOT_FOUND};R.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:ae.HttpStatusCode.METHOD_NOT_ALLOWED};R.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:ae.HttpStatusCode.UNAUTHORIZED};R.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:ae.HttpStatusCode.FORBIDDEN};R.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:ae.HttpStatusCode.NOT_FOUND};R.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:ae.HttpStatusCode.CONFLICT};R.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:ae.HttpStatusCode.NOT_FOUND};R.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:ae.HttpStatusCode.UNAUTHORIZED};R.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:ae.HttpStatusCode.BAD_REQUEST};R.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:ae.HttpStatusCode.CONFLICT};R.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:ae.HttpStatusCode.NOT_FOUND};R.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:ae.HttpStatusCode.BAD_REQUEST};R.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:ae.HttpStatusCode.BAD_REQUEST};R.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:ae.HttpStatusCode.BAD_REQUEST};R.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:ae.HttpStatusCode.FORBIDDEN};R.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:ae.HttpStatusCode.NOT_FOUND};R.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:ae.HttpStatusCode.NOT_FOUND};R.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:ae.HttpStatusCode.FORBIDDEN};R.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:ae.HttpStatusCode.BAD_REQUEST};var Uxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${t} is not a valid Zuplo template repository`,status:ae.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");R.INVALID_TEMPLATE_REPOSITORY=Uxe;R.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:ae.HttpStatusCode.NOT_FOUND};R.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:ae.HttpStatusCode.BAD_REQUEST};R.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:ae.HttpStatusCode.BAD_REQUEST};R.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:ae.HttpStatusCode.FORBIDDEN};R.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:ae.HttpStatusCode.FORBIDDEN};R.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:ae.HttpStatusCode.BAD_REQUEST};R.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:ae.HttpStatusCode.NOT_FOUND};R.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:ae.HttpStatusCode.NOT_FOUND};R.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:ae.HttpStatusCode.BAD_REQUEST};R.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:ae.HttpStatusCode.BAD_REQUEST};R.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:ae.HttpStatusCode.NOT_FOUND};R.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:ae.HttpStatusCode.BAD_REQUEST};R.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:ae.HttpStatusCode.NOT_FOUND};R.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:ae.HttpStatusCode.BAD_REQUEST};R.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:ae.HttpStatusCode.FORBIDDEN};R.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:ae.HttpStatusCode.BAD_REQUEST};var Fxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");R.USER_NO_ACCESS_GITHUB_REPO=Fxe;var Bxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");R.USER_NO_PULL_ACCESS_GITHUB_REPO=Bxe;var Mxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");R.GITHUB_USER_NO_READ_ACCESS_REPO=Mxe;R.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:ae.HttpStatusCode.BAD_REQUEST};R.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:ae.HttpStatusCode.FORBIDDEN};var Vxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${t}'. Go to '${jxe}' to add the repository.`,status:ae.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");R.GITHUB_APP_NO_USER_ACCESS_=Vxe;R.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:ae.HttpStatusCode.NOT_FOUND};var Hxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");R.USER_NO_ACCESS_BITBUCKET_REPO=Hxe;var zxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${t}' to add a new collaborator.`,status:ae.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");R.USER_NO_ACCESS_GITLAB_REPO=zxe;R.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:ae.HttpStatusCode.FORBIDDEN};R.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:ae.HttpStatusCode.BAD_REQUEST};R.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:ae.HttpStatusCode.BAD_REQUEST};R.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:ae.HttpStatusCode.BAD_REQUEST};R.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:ae.HttpStatusCode.BAD_REQUEST};var Gxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:ae.HttpStatusCode.CONFLICT,detail:`The repository ${t} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");R.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Gxe;var Kxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:ae.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${t} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");R.GITHUB_REPOSITORY_NOT_FOUND=Kxe;R.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:ae.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};R.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};R.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};R.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:ae.HttpStatusCode.FORBIDDEN};var Yxe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${t}' already exists on GitHub org '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");R.GITHUB_INTEGRATION_DUPLICATE_REPO=Yxe;var Wxe=o(({repositoryName:t,details:e})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:e,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");R.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Wxe;var Jxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");R.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Jxe;var Qxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${t}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");R.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Qxe;var Xxe=o(({repositoryUrl:t})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${t}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");R.GITHUB_INTEGRATION_INVALID_REPO=Xxe;R.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:ae.HttpStatusCode.FORBIDDEN};R.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:ae.HttpStatusCode.FORBIDDEN};var Zxe=o(({details:t})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");R.BITBUCKET_FAILED_DURING_REPO_CREATION=Zxe;R.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:ae.HttpStatusCode.FORBIDDEN};var eCe=o(({details:t})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");R.GITLAB_FAILED_DURING_REPO_CREATION=eCe;var tCe=o(({repositoryName:t,orgName:e})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${t}' already exists in GitLab team '${e}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");R.GITLAB_DUPLICATE_REPO=tCe;var rCe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");R.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=rCe;var nCe=o(({namespaceLabel:t})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${t}'.`,details:`The user's GitLab access level does not allow the use of namespace '${t}'.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");R.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=nCe;var iCe=o(({orgName:t})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");R.GITLAB_ACCESS_LEVEL_CHECK_FAIL=iCe;R.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:ae.HttpStatusCode.UNAUTHORIZED};R.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:ae.HttpStatusCode.NOT_FOUND};R.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:ae.HttpStatusCode.UNAUTHORIZED};R.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:ae.HttpStatusCode.FORBIDDEN};R.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:ae.HttpStatusCode.FORBIDDEN};R.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};var sCe=o(({sourceControlProvider:t})=>{const e=(0,jY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${e}`,status:ae.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");R.SOURCE_CONTROL_AUTHENTICATION_FAILED=sCe;var aCe=o(({sourceControlProvider:t})=>{const e=(0,jY.getSourceControlProviderLabel)(t);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${e} repository`,status:ae.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");R.SOURCE_CONTROL_REPO_NOT_FOUND=aCe;R.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:ae.HttpStatusCode.BAD_REQUEST};var oCe=o(({repoURL:t,operation:e})=>{return{type:`https://zup.fail/source-control-repo-${e}-error`,title:`Failed on ${e} operation to repository '${t}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:ae.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");R.SOURCE_CONTROL_REPO_OPERATION_ERROR=oCe;R.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:ae.HttpStatusCode.NOT_FOUND};R.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.NOT_FOUND};R.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:ae.HttpStatusCode.UNAUTHORIZED};R.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:ae.HttpStatusCode.FORBIDDEN};R.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:ae.HttpStatusCode.BAD_REQUEST};R.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:ae.HttpStatusCode.BAD_REQUEST};R.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:ae.HttpStatusCode.BAD_REQUEST};R.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:ae.HttpStatusCode.BAD_REQUEST};R.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:ae.HttpStatusCode.FORBIDDEN};R.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:ae.HttpStatusCode.NOT_FOUND};R.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:ae.HttpStatusCode.NOT_FOUND};R.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR};R.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:ae.HttpStatusCode.FAILED_DEPENDENCY};R.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:ae.HttpStatusCode.FAILED_DEPENDENCY};R.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:ae.HttpStatusCode.FAILED_DEPENDENCY};R.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:ae.HttpStatusCode.BAD_REQUEST};R.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:ae.HttpStatusCode.BAD_REQUEST};R.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:ae.HttpStatusCode.BAD_REQUEST};R.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:ae.HttpStatusCode.NOT_FOUND};R.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:ae.HttpStatusCode.BAD_REQUEST};R.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:ae.HttpStatusCode.BAD_REQUEST};R.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:ae.HttpStatusCode.BAD_REQUEST};R.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:ae.HttpStatusCode.BAD_REQUEST};R.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:ae.HttpStatusCode.BAD_REQUEST};R.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:ae.HttpStatusCode.BAD_REQUEST};R.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:ae.HttpStatusCode.BAD_REQUEST};R.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:ae.HttpStatusCode.BAD_REQUEST};R.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:ae.HttpStatusCode.BAD_REQUEST};R.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:ae.HttpStatusCode.FORBIDDEN};R.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:ae.HttpStatusCode.NOT_FOUND};var uCe=o(({operation:t,path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${t} file ${e} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");R.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=uCe;var lCe=o(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");R.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=lCe;R.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:ae.HttpStatusCode.BAD_REQUEST};R.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:ae.HttpStatusCode.BAD_REQUEST};R.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:ae.HttpStatusCode.NOT_FOUND};R.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:ae.HttpStatusCode.BAD_REQUEST};R.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:ae.HttpStatusCode.BAD_REQUEST};R.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:ae.HttpStatusCode.BAD_REQUEST};var cCe=o(({path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${t} for a read-only environment. Read-only environments cannot be edited.`,status:ae.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");R.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=cCe;var dCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${t} is not allowed.`,instance:t,status:ae.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");R.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=dCe;var pCe=o(({path:t})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${t}.`}),"DIRECTORY_ALREADY_EXISTS");R.DIRECTORY_ALREADY_EXISTS=pCe;var fCe=o(({path:t})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${t}`}),"DIRECTORY_DOES_NOT_EXIST");R.DIRECTORY_DOES_NOT_EXIST=fCe;var hCe=o(({path:t})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:ae.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${t}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");R.DIRECTORY_OR_FILE_DOES_NOT_EXIST=hCe;var mCe=o(({path:t})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${t}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");R.DIRECTORY_CREATION_FAILED=mCe;var gCe=o(({path:t})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${t} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");R.FILE_RENAME_PATHS_MATCH=gCe;var yCe=o(({oldExtension:t,newExtension:e})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${e} must match the old extension ${t}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");R.FILE_RENAME_CANNOT_CHANGE_EXTENSION=yCe;var vCe=o(({path:t})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${t}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");R.FILE_RENAME_FILE_ALREADY_EXISTS=vCe;var _Ce=o(({path:t})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${t}. Please try again or contact support.`}),"FILE_RENAME_FAILED");R.FILE_RENAME_FAILED=_Ce;var ECe=o(({path:t})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${t}. Please try again or contact support.`}),"FILE_WRITE_FAILED");R.FILE_WRITE_FAILED=ECe;var bCe=o(({path:t})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`File '${t}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");R.CANNOT_DELETE_ESSENTIAL_FILE=bCe;var wCe=o(({path:t})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Directory '${t}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");R.CANNOT_DELETE_ESSENTIAL_DIRECTORY=wCe;var SCe=o(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:ae.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");R.CANNOT_DELETE_SOLE_OPEN_API_FILE=SCe;var TCe=o(({path:t})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${t}. Please try again or contact support.`}),"FILE_DELETE_FAILED");R.FILE_DELETE_FAILED=TCe;var ACe=o(({path:t})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${t}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");R.DIRECTORY_DELETE_FAILED=ACe;R.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:ae.HttpStatusCode.CONFLICT};R.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:ae.HttpStatusCode.NOT_FOUND};R.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:ae.HttpStatusCode.BAD_REQUEST};R.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:ae.HttpStatusCode.INTERNAL_SERVER_ERROR}});var BY=_(Js=>{"use strict";var xCe=Js&&Js.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var CCe=Js&&Js.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var RCe=Js&&Js.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null){for(var r in t)if(r!=="default"&&Object.prototype.hasOwnProperty.call(t,r))xCe(e,t,r)}CCe(e,t);return e};Object.defineProperty(Js,"__esModule",{value:true});Js.ApiNotFoundError=Js.ApiError=Js.Problems=void 0;var FY=RCe(UY());Js.Problems=FY;var Pb=class extends Error{static{o(this,"ApiError")}type;status;detail;instance;constructor(e){super(e.title);if(!e.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${e.type}`)}this.name="ApiProblemError";this.type=e.type;this.status=e.status;this.detail=e.detail;this.instance=e.instance}};Js.ApiError=Pb;var rC=class extends Pb{static{o(this,"ApiNotFoundError")}constructor(e={}){super({...e,...FY.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Js.ApiNotFoundError=rC});var Qs=_(rc=>{"use strict";var OCe=rc&&rc.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var NCe=rc&&rc.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))OCe(e,t,r)};Object.defineProperty(rc,"__esModule",{value:true});rc.HttpStatusCode=void 0;NCe(BY(),rc);var ICe=tC();Object.defineProperty(rc,"HttpStatusCode",{enumerable:true,get:function(){return ICe.HttpStatusCode}})});var iC=_(Db=>{"use strict";Object.defineProperty(Db,"__esModule",{value:true});Db.CommonAuth=void 0;var ad=Qs();var PCe=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var nC=class t{static{o(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(e){return PCe.includes(e)}isDeployerServiceAccount(e){return t.DEPLOYER_USER_SUB===e}static isAuthorizedSub(e,r){if(typeof r==="string"){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}try{const n=e.includes(r.sub);if(!n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}catch(n){throw new ad.ApiError(ad.Problems.API_USER_NO_ACCESS)}}};Db.CommonAuth=nC});var MY=_(kb=>{"use strict";Object.defineProperty(kb,"__esModule",{value:true});kb.hasBlockedNotifications=void 0;var DCe=["chocolate_bold_silverfish"];function kCe(t){return DCe.includes(t)}o(kCe,"hasBlockedNotifications");kb.hasBlockedNotifications=kCe});var VY=_(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:true});Xs.BuildIssueError=Xs.WARNING_SEVERITY=Xs.ERROR_SEVERITY=Xs.FAILURE_STATUS=Xs.WARNING_STATUS=Xs.GOOD_STATUS=void 0;Xs.GOOD_STATUS="Good";Xs.WARNING_STATUS="Warnings";Xs.FAILURE_STATUS="Failed";Xs.ERROR_SEVERITY="error";Xs.WARNING_SEVERITY="warning";var sC=class extends Error{static{o(this,"BuildIssueError")}issue;constructor(e){super(e.message);this.issue=e}};Xs.BuildIssueError=sC});var HY=_($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:true});$b.COMPATIBILITY_FLAG_MAPPINGS=void 0;$b.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true,removeAllVendorHeadersExceptListed:true}})});var zY=_((Ljt,$Ce)=>{$Ce.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2024-01-15",enum:["2023-03-14","2024-01-15"]}}}});var GY=_(Lb=>{"use strict";Object.defineProperty(Lb,"__esModule",{value:true});Lb.VALID_COMPATIBILITY_DATES=void 0;Lb.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var KY=_(od=>{"use strict";var LCe=od&&od.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(od,"__esModule",{value:true});od.DEFAULT_COMPATIBILITY_DATE=od.VALID_COMPATIBILITY_DATES=void 0;var qCe=LCe(zY());var jCe=GY();Object.defineProperty(od,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return jCe.VALID_COMPATIBILITY_DATES}});od.DEFAULT_COMPATIBILITY_DATE=qCe.default.properties.compatibilityDate.default});var YY=_(qb=>{"use strict";Object.defineProperty(qb,"__esModule",{value:true});qb.FeatureFlags=void 0;qb.FeatureFlags=Object.freeze({esmWorker:(t,e)=>({flagName:"ZUPLO_ESM_WORKER",defaultValue:false,accountName:t,projectName:e}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var WY=_(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:true});ud.decrypt=ud.encrypt=ud.signString=void 0;var zm=require("crypto");function UCe(t,e){return(0,zm.createHmac)("sha256",e).update(t).digest("hex")}o(UCe,"signString");ud.signString=UCe;var aC={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var FCe=o(()=>(0,zm.randomBytes)(aC.IV_BYTE_LEN),"getIV");function BCe(t,e){if(t===null){return null}const r=(0,zm.createHash)("sha256").update(String(e)).digest("base64").substring(0,32);const n=FCe();const i=(0,zm.createCipheriv)("aes-256-gcm",r,n,{authTagLength:aC.AUTH_TAG_BYTE_LEN});let s=i.update(t);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}o(BCe,"encrypt");ud.encrypt=BCe;function MCe(t,e){if(!t){return null}const r=Buffer.from(e);const n=(0,zm.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(t,"hex");const s=i.slice(-16);const a=i.slice(0,12);const u=i.slice(12,-16);const l=(0,zm.createDecipheriv)("aes-256-gcm",n,a,{authTagLength:aC.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}o(MCe,"decrypt");ud.decrypt=MCe});var JY=_(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:true});jb.getCurrentUtcDateTime=void 0;function VCe(){const t={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const e=new Date().toLocaleString("en-US",t);return e}o(VCe,"getCurrentUtcDateTime");jb.getCurrentUtcDateTime=VCe});var oC=_(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:true});Ub.DeploymentLogState=void 0;var QY;(function(t){t["ERROR"]="ERROR";t["IN_PROGRESS"]="IN_PROGRESS";t["SUCCESS"]="SUCCESS"})(QY||(Ub.DeploymentLogState=QY={}))});var uC=_(XY=>{"use strict";Object.defineProperty(XY,"__esModule",{value:true})});var eW=_(ZY=>{"use strict";Object.defineProperty(ZY,"__esModule",{value:true})});var tW=_(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:true});Fb.MARKDOWN_FRONTMATTER_KEYS=void 0;Fb.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var nW=_(rW=>{"use strict";Object.defineProperty(rW,"__esModule",{value:true})});var iW=_(ju=>{"use strict";var HCe=ju&&ju.__createBinding||(Object.create?function(t,e,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(e,r);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[r]}}}Object.defineProperty(t,n,i)}:function(t,e,r,n){if(n===void 0)n=r;t[n]=e[r]});var Bb=ju&&ju.__exportStar||function(t,e){for(var r in t)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r))HCe(e,t,r)};Object.defineProperty(ju,"__esModule",{value:true});Bb(uC(),ju);Bb(eW(),ju);Bb(tW(),ju);Bb(nW(),ju)});var Mb=_(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:true});Uu.getLoggerContext=Uu.requestIdGenerator=Uu.REQUEST_ID_HEADER=Uu.LEGACY_REQUEST_ID_HEADER=void 0;var zCe=require("crypto");Uu.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Uu.REQUEST_ID_HEADER="zp-rid";var GCe=o(t=>{const e=t.headers["zuplo-request-id"];const r=t.headers["X-GitHub-Delivery"];if(e){const n=e;return`${n}`}else if(r){return`${r}`}return(0,zCe.randomUUID)()},"requestIdGenerator");Uu.requestIdGenerator=GCe;function KCe(t){const e=t.raw.url??"";const r={};try{const n=t.headers["zuplo-user"]??t.user?.sub;if(n){r.userSub=`${n}`}const i=e.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=e.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const a=e.match(/(projects)\/([a-zA-Z-0-9]*)/);if(a&&a!==null&&a.length>=2){r.project=a[2]}}catch(n){}return r}o(KCe,"getLoggerContext");Uu.getLoggerContext=KCe});var lC=_(Gm=>{"use strict";var YCe=Gm&&Gm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Gm,"__esModule",{value:true});Gm.errorHandler=void 0;var Ha=Qs();var WCe=YCe(Ca());var sW=Mb();function JCe(t,e,r){let n=500;let i;if(t instanceof Ha.ApiError){n=t.status;i={type:t.type,title:t.message,status:t.status,detail:t.detail,instance:t.instance}}else if(typeof t==="object"&&"validation"in t&&"validationContext"in t){n=Ha.HttpStatusCode.BAD_REQUEST;i={...Ha.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${t.validationContext}.`,errors:t.validation}}else if(typeof t==="object"&&"code"in t&&t.code==="FST_ERR_NOT_FOUND"){n=404;i=Ha.Problems.NOT_FOUND}else if(typeof t==="object"&&"code"in t&&typeof t.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(t.code)){n=Ha.HttpStatusCode.BAD_REQUEST;i={...Ha.Problems.BAD_REQUEST,detail:t.message}}else{let a;if(!r.statusCode||r.statusCode===200){if(typeof t==="object"&&"statusCode"in t&&typeof t.statusCode==="number"){a=t.statusCode}else if(typeof t==="object"&&"status"in t&&typeof t.status==="number"){a=t.status}n=a&&a>=400?a:500}else{n=r.statusCode}i=QCe(n);if(WCe.default.NODE_ENV!=="production"){if(typeof t==="object"&&"message"in t){i.detail=t.message}else if(typeof t==="string"){i.detail=t}}}i.trace={timestamp:new Date().toJSON(),requestId:e.headers[sW.REQUEST_ID_HEADER]??e.headers[sW.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:t},t&&t.message)}else{r.log.error({req:e,res:r,err:t},t&&t.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}o(JCe,"errorHandler");Gm.errorHandler=JCe;function QCe(t){if(t===401){return Ha.Problems.UNAUTHORIZED}else if(t===403){return Ha.Problems.FORBIDDEN}else if(t===404){return Ha.Problems.NOT_FOUND}else if(t===405){return Ha.Problems.METHOD_NOT_ALLOWED}else if(t<500&&t>=400){return Ha.Problems.BAD_REQUEST}return Ha.Problems.INTERNAL_SERVER_ERROR}o(QCe,"getProblemFromStatus")});var oW=_((eUt,cC)=>{"use strict";var XCe=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var ZCe=/(\w*(\.\w*)*)\..*/;cC.exports=o(function t(e){if(e.name.length>0)return e.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return aW(n.stack)}},"getPluginName");function aW(t){const e=t.match(XCe);return e?e[1].split(/[/\\]/).slice(-1)[0].match(ZCe)[1]:"anonymous"}o(aW,"extractPluginName");cC.exports.extractPluginName=aW});var lW=_((rUt,uW)=>{"use strict";uW.exports=o(function t(e){if(e[0]==="@"){e=e.slice(1).replace("/","-")}const r=e.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var Rf=_((iUt,Vb)=>{"use strict";var eRe=oW();var tRe=lW();var rRe=0;function dC(t,e={}){let r=false;if(typeof t.default!=="undefined"){t=t.default}if(typeof t!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof t}'`)}if(typeof e==="string"){e={fastify:e}}if(typeof e!=="object"||Array.isArray(e)||e===null){throw new TypeError("The options object should be an object")}if(e.fastify!==void 0&&typeof e.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof e.fastify}'`)}if(!e.name){r=true;e.name=eRe(t)+"-auto-"+rRe++}t[Symbol.for("skip-override")]=e.encapsulate!==true;t[Symbol.for("fastify.display-name")]=e.name;t[Symbol.for("plugin-meta")]=e;if(!t.default){t.default=t}const n=tRe(e.name);if(!r&&!t[n]){t[n]=t}return t}o(dC,"plugin");Vb.exports=dC;Vb.exports.default=dC;Vb.exports.fastifyPlugin=dC});var dW=_(Km=>{"use strict";var nRe=Km&&Km.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Km,"__esModule",{value:true});Km.apiKeyAuthPlugin=void 0;var Fu=Qs();var iRe=nRe(Rf());var sRe="https://apikey.zuplo.com";var cW=`Bearer `;Km.apiKeyAuthPlugin=(0,iRe.default)(async(t,e)=>{t.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new Fu.ApiError({...Fu.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(cW)){throw new Fu.ApiError({...Fu.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(cW.length);if(!i||i===""){throw new Fu.ApiError({...Fu.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const a=await fetch(`${sRe}/v1/$validate/${e.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(a.status===401){throw new Fu.ApiError(Fu.Problems.UNAUTHORIZED)}const u=await a.json();if(e.allowedSubs){if(!e.allowedSubs.includes(u.name)){throw new Fu.ApiError(Fu.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var pW=_(Ym=>{"use strict";var aRe=Ym&&Ym.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Ym,"__esModule",{value:true});Ym.ensureZuploAdminPlugin=void 0;var Hb=Qs();var oRe=aRe(Rf());var uRe=iC();Ym.ensureZuploAdminPlugin=(0,oRe.default)(async function(t){const e=new uRe.CommonAuth;t.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new Hb.ApiError(Hb.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&e.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new Hb.ApiError(Hb.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var hW=_(Wm=>{"use strict";var lRe=Wm&&Wm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Wm,"__esModule",{value:true});Wm.ensureZuploUserPlugin=void 0;var fW=Qs();var cRe=lRe(Rf());Wm.ensureZuploUserPlugin=(0,cRe.default)(async t=>{t.decorate("ensureZuploUser",async function(e){const r=e.headers["zuplo-user"];if(!r||typeof r!=="string"){e.log.error("The 'zuplo-user' header is missing");throw new fW.ApiError(fW.Problems.UNAUTHORIZED)}e.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var yW=_(Jm=>{"use strict";var dRe=Jm&&Jm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Jm,"__esModule",{value:true});Jm.featureFlagsPlugin=void 0;var pRe=dRe(Rf());var pC;async function mW(t,e){try{const r=await pC?.variation(e.flagName,{kind:e.kind,key:e.key},e.defaultValue);if(r===void 0){return e.defaultValue}else{return r}}catch(r){t.log.warn(`Failed to query Launch Darkly flag ${e.flagName}`);t.log.error(r)}return e.defaultValue}o(mW,"getFlagValue");function gW(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return Promise.resolve(false)}o(gW,"fallback");Jm.featureFlagsPlugin=(0,pRe.default)(async(t,e)=>{try{if(typeof e.key!=="string"||!e.key||!e.client){t.decorateRequest("getFlagValue",gW);t.decorateRequest("getFlagValueByUser",gW);return}pC=e.client;t.log.info("Launch Darkly SDK successfully initialized!");t.decorate("flags",pC);t.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return mW(this,s)});t.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return mW(this,s)})}catch(r){t.log.warn("Launch Darkly failed to initialize");t.log.error(r)}},{name:"feature-flag-plugin"})});var fC=_(Qm=>{"use strict";var fRe=Qm&&Qm.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(Qm,"__esModule",{value:true});Qm.getUserSubPlugin=void 0;var vW=Qs();var hRe=fRe(Rf());Qm.getUserSubPlugin=(0,hRe.default)(async t=>{t.decorateRequest("getUserSub",function(){const e=this.user?.sub;if(!e){this.log.error("Could not determine the user sub");throw new vW.ApiError(vW.Problems.UNAUTHORIZED)}return e})},{name:"get-user-sub-plugin"})});var hC=_(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:true});za.getUserSubPlugin=za.featureFlagsPlugin=za.ensureZuploUserPlugin=za.ensureZuploAdminPlugin=za.apiKeyAuthPlugin=void 0;var mRe=dW();Object.defineProperty(za,"apiKeyAuthPlugin",{enumerable:true,get:function(){return mRe.apiKeyAuthPlugin}});var gRe=pW();Object.defineProperty(za,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return gRe.ensureZuploAdminPlugin}});var yRe=hW();Object.defineProperty(za,"ensureZuploUserPlugin",{enumerable:true,get:function(){return yRe.ensureZuploUserPlugin}});var vRe=yW();Object.defineProperty(za,"featureFlagsPlugin",{enumerable:true,get:function(){return vRe.featureFlagsPlugin}});var _Re=fC();Object.defineProperty(za,"getUserSubPlugin",{enumerable:true,get:function(){return _Re.getUserSubPlugin}})});var Kr=_(ji=>{"use strict";var mC=Symbol.for("yaml.alias");var _W=Symbol.for("yaml.document");var zb=Symbol.for("yaml.map");var EW=Symbol.for("yaml.pair");var gC=Symbol.for("yaml.scalar");var Gb=Symbol.for("yaml.seq");var nc=Symbol.for("yaml.node.type");var ERe=o(t=>!!t&&typeof t==="object"&&t[nc]===mC,"isAlias");var bRe=o(t=>!!t&&typeof t==="object"&&t[nc]===_W,"isDocument");var wRe=o(t=>!!t&&typeof t==="object"&&t[nc]===zb,"isMap");var SRe=o(t=>!!t&&typeof t==="object"&&t[nc]===EW,"isPair");var bW=o(t=>!!t&&typeof t==="object"&&t[nc]===gC,"isScalar");var TRe=o(t=>!!t&&typeof t==="object"&&t[nc]===Gb,"isSeq");function wW(t){if(t&&typeof t==="object")switch(t[nc]){case zb:case Gb:return true}return false}o(wW,"isCollection");function ARe(t){if(t&&typeof t==="object")switch(t[nc]){case mC:case zb:case gC:case Gb:return true}return false}o(ARe,"isNode");var xRe=o(t=>(bW(t)||wW(t))&&!!t.anchor,"hasAnchor");ji.ALIAS=mC;ji.DOC=_W;ji.MAP=zb;ji.NODE_TYPE=nc;ji.PAIR=EW;ji.SCALAR=gC;ji.SEQ=Gb;ji.hasAnchor=xRe;ji.isAlias=ERe;ji.isCollection=wW;ji.isDocument=bRe;ji.isMap=wRe;ji.isNode=ARe;ji.isPair=SRe;ji.isScalar=bW;ji.isSeq=TRe});var x2=_(yC=>{"use strict";var gi=Kr();var Zs=Symbol("break visit");var SW=Symbol("skip children");var Bu=Symbol("remove node");function Kb(t,e){const r=TW(e);if(gi.isDocument(t)){const n=Xm(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else Xm(null,t,r,Object.freeze([]))}o(Kb,"visit");Kb.BREAK=Zs;Kb.SKIP=SW;Kb.REMOVE=Bu;function Xm(t,e,r,n){const i=AW(t,e,r,n);if(gi.isNode(i)||gi.isPair(i)){xW(t,n,i);return Xm(t,i,r,n)}if(typeof i!=="symbol"){if(gi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=Xm(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(gi.isPair(e)){n=Object.freeze(n.concat(e));const s=Xm("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=Xm("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(Xm,"visit_");async function Yb(t,e){const r=TW(e);if(gi.isDocument(t)){const n=await Zm(null,t.contents,r,Object.freeze([t]));if(n===Bu)t.contents=null}else await Zm(null,t,r,Object.freeze([]))}o(Yb,"visitAsync");Yb.BREAK=Zs;Yb.SKIP=SW;Yb.REMOVE=Bu;async function Zm(t,e,r,n){const i=await AW(t,e,r,n);if(gi.isNode(i)||gi.isPair(i)){xW(t,n,i);return Zm(t,i,r,n)}if(typeof i!=="symbol"){if(gi.isCollection(e)){n=Object.freeze(n.concat(e));for(let s=0;s<e.items.length;++s){const a=await Zm(s,e.items[s],r,n);if(typeof a==="number")s=a-1;else if(a===Zs)return Zs;else if(a===Bu){e.items.splice(s,1);s-=1}}}else if(gi.isPair(e)){n=Object.freeze(n.concat(e));const s=await Zm("key",e.key,r,n);if(s===Zs)return Zs;else if(s===Bu)e.key=null;const a=await Zm("value",e.value,r,n);if(a===Zs)return Zs;else if(a===Bu)e.value=null}}return i}o(Zm,"visitAsync_");function TW(t){if(typeof t==="object"&&(t.Collection||t.Node||t.Value)){return Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t)}return t}o(TW,"initVisitor");function AW(t,e,r,n){if(typeof r==="function")return r(t,e,n);if(gi.isMap(e))return r.Map?.(t,e,n);if(gi.isSeq(e))return r.Seq?.(t,e,n);if(gi.isPair(e))return r.Pair?.(t,e,n);if(gi.isScalar(e))return r.Scalar?.(t,e,n);if(gi.isAlias(e))return r.Alias?.(t,e,n);return void 0}o(AW,"callVisitor");function xW(t,e,r){const n=e[e.length-1];if(gi.isCollection(n)){n.items[t]=r}else if(gi.isPair(n)){if(t==="key")n.key=r;else n.value=r}else if(gi.isDocument(n)){n.contents=r}else{const i=gi.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}o(xW,"replaceNode");yC.visit=Kb;yC.visitAsync=Yb});var vC=_(RW=>{"use strict";var CW=Kr();var CRe=x2();var RRe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var ORe=o(t=>t.replace(/[!,[\]{}]/g,e=>RRe[e]),"escapeTagName");var C2=class t{static{o(this,"Directives")}constructor(e,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},t.defaultYaml,e);this.tags=Object.assign({},t.defaultTags,r)}clone(){const e=new t(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){if(this.atNextDocument){this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},t.defaultTags);this.atNextDocument=false}const n=e.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,a]=n;this.tags[s]=a;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const a=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,a);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!"){r(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const a=e.slice(2,-1);if(a==="!"||a==="!!"){r(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")r("Verbatim tags must end with a >");return a}const[,n,i]=e.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${e} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(a){r(String(a));return null}}if(n==="!")return e;r(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[r,n]of Object.entries(this.tags)){if(e.startsWith(n))return r+ORe(e.substring(n.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(e&&n.length>0&&CW.isNode(e.contents)){const s={};CRe.visit(e.contents,(a,u)=>{if(CW.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,a]of n){if(s==="!!"&&a==="tag:yaml.org,2002:")continue;if(!e||i.some(u=>u.startsWith(a)))r.push(`%TAG ${s} ${a}`)}return r.join("\n")}};C2.defaultYaml={explicit:false,version:"1.2"};C2.defaultTags={"!!":"tag:yaml.org,2002:"};RW.Directives=C2});var Wb=_(R2=>{"use strict";var OW=Kr();var NRe=x2();function IRe(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const e=JSON.stringify(t);const r=`Anchor must not contain whitespace or control characters: ${e}`;throw new Error(r)}return true}o(IRe,"anchorIsValid");function NW(t){const e=new Set;NRe.visit(t,{Value(r,n){if(n.anchor)e.add(n.anchor)}});return e}o(NW,"anchorNames");function IW(t,e){for(let r=1;true;++r){const n=`${t}${r}`;if(!e.has(n))return n}}o(IW,"findNewAnchor");function PRe(t,e){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=NW(t);const a=IW(e,i);i.add(a);return a},setAnchors:()=>{for(const s of r){const a=n.get(s);if(typeof a==="object"&&a.anchor&&(OW.isScalar(a.node)||OW.isCollection(a.node))){a.node.anchor=a.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}o(PRe,"createNodeAnchors");R2.anchorIsValid=IRe;R2.anchorNames=NW;R2.createNodeAnchors=PRe;R2.findNewAnchor=IW});var _C=_(PW=>{"use strict";function O2(t,e,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const a=n[i];const u=O2(t,n,String(i),a);if(u===void 0)delete n[i];else if(u!==a)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const a=O2(t,n,i,s);if(a===void 0)n.delete(i);else if(a!==s)n.set(i,a)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=O2(t,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const a=O2(t,n,i,s);if(a===void 0)delete n[i];else if(a!==s)n[i]=a}}}return t.call(e,r,n)}o(O2,"applyReviver");PW.applyReviver=O2});var ld=_(kW=>{"use strict";var DRe=Kr();function DW(t,e,r){if(Array.isArray(t))return t.map((n,i)=>DW(n,String(i),r));if(t&&typeof t.toJSON==="function"){if(!r||!DRe.hasAnchor(t))return t.toJSON(e,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(t,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=t.toJSON(e,r);if(r.onCreate)r.onCreate(i);return i}if(typeof t==="bigint"&&!r?.keep)return Number(t);return t}o(DW,"toJS");kW.toJS=DW});var Jb=_(LW=>{"use strict";var kRe=_C();var $W=Kr();var $Re=ld();var EC=class{static{o(this,"NodeBase")}constructor(e){Object.defineProperty(this,$W.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!$W.isDocument(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=$Re.toJS(this,"",a);if(typeof i==="function")for(const{count:l,res:c}of a.anchors.values())i(c,l);return typeof s==="function"?kRe.applyReviver(s,{"":u},"",u):u}};LW.NodeBase=EC});var N2=_(jW=>{"use strict";var LRe=Wb();var qW=x2();var Qb=Kr();var qRe=Jb();var jRe=ld();var bC=class extends qRe.NodeBase{static{o(this,"Alias")}constructor(e){super(Qb.ALIAS);this.source=e;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let r=void 0;qW.visit(e,{Node:(n,i)=>{if(i===this)return qW.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(e,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const a=this.resolve(i);if(!a){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(a);if(!u){jRe.toJS(a,null,r);u=n.get(a)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=Xb(i,a,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(e,r,n){const i=`*${this.source}`;if(e){LRe.anchorIsValid(this.source);if(e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${i} `}return i}};function Xb(t,e,r){if(Qb.isAlias(e)){const n=e.resolve(t);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(Qb.isCollection(e)){let n=0;for(const i of e.items){const s=Xb(t,i,r);if(s>n)n=s}return n}else if(Qb.isPair(e)){const n=Xb(t,e.key,r);const i=Xb(t,e.value,r);return Math.max(n,i)}return 1}o(Xb,"getAliasCount");jW.Alias=bC});var ai=_(wC=>{"use strict";var URe=Kr();var FRe=Jb();var BRe=ld();var MRe=o(t=>!t||typeof t!=="function"&&typeof t!=="object","isScalarValue");var cd=class extends FRe.NodeBase{static{o(this,"Scalar")}constructor(e){super(URe.SCALAR);this.value=e}toJSON(e,r){return r?.keep?this.value:BRe.toJS(this.value,e,r)}toString(){return String(this.value)}};cd.BLOCK_FOLDED="BLOCK_FOLDED";cd.BLOCK_LITERAL="BLOCK_LITERAL";cd.PLAIN="PLAIN";cd.QUOTE_DOUBLE="QUOTE_DOUBLE";cd.QUOTE_SINGLE="QUOTE_SINGLE";wC.Scalar=cd;wC.isScalarValue=MRe});var I2=_(FW=>{"use strict";var VRe=N2();var Of=Kr();var UW=ai();var HRe="tag:yaml.org,2002:";function zRe(t,e,r){if(e){const n=r.filter(s=>s.tag===e);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return r.find(n=>n.identify?.(t)&&!n.format)}o(zRe,"findTagObject");function GRe(t,e,r){if(Of.isDocument(t))t=t.contents;if(Of.isNode(t))return t;if(Of.isPair(t)){const p=r.schema[Of.MAP].createNode?.(r.schema,null,r);p.items.push(t);return p}if(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt!=="undefined"&&t instanceof BigInt){t=t.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:u}=r;let l=void 0;if(n&&t&&typeof t==="object"){l=u.get(t);if(l){if(!l.anchor)l.anchor=i(t);return new VRe.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(t,l)}}if(e?.startsWith("!!"))e=HRe+e.slice(2);let c=zRe(t,e,a.tags);if(!c){if(t&&typeof t.toJSON==="function"){t=t.toJSON()}if(!t||typeof t!=="object"){const p=new UW.Scalar(t);if(l)l.node=p;return p}c=t instanceof Map?a[Of.MAP]:Symbol.iterator in Object(t)?a[Of.SEQ]:a[Of.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,t,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,t,r):new UW.Scalar(t);if(e)d.tag=e;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}o(GRe,"createNode");FW.createNode=GRe});var P2=_(e3=>{"use strict";var KRe=I2();var Mu=Kr();var YRe=Jb();function SC(t,e,r){let n=r;for(let i=e.length-1;i>=0;--i){const s=e[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=n;n=a}else{n=new Map([[s,n]])}}return KRe.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}o(SC,"collectionFromPath");var BW=o(t=>t==null||typeof t==="object"&&!!t[Symbol.iterator]().next().done,"isEmptyPath");var Zb=class extends YRe.NodeBase{static{o(this,"Collection")}constructor(e,r){super(e);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(e){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)r.schema=e;r.items=r.items.map(n=>Mu.isNode(n)||Mu.isPair(n)?n.clone(e):n);if(this.range)r.range=this.range.slice();return r}addIn(e,r){if(BW(e))this.add(r);else{const[n,...i]=e;const s=this.get(n,true);if(Mu.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,SC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[r,...n]=e;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(Mu.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(e,r){const[n,...i]=e;const s=this.get(n,true);if(i.length===0)return!r&&Mu.isScalar(s)?s.value:s;else return Mu.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Mu.isPair(r))return false;const n=r.value;return n==null||e&&Mu.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[r,...n]=e;if(n.length===0)return this.has(r);const i=this.get(r,true);return Mu.isCollection(i)?i.hasIn(n):false}setIn(e,r){const[n,...i]=e;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(Mu.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,SC(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};Zb.maxFlowStringSingleLineLength=60;e3.Collection=Zb;e3.collectionFromPath=SC;e3.isEmptyPath=BW});var D2=_(t3=>{"use strict";var WRe=o(t=>t.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function TC(t,e){if(/^\n+$/.test(t))return t.substring(1);return e?t.replace(/^(?! *$)/gm,e):t}o(TC,"indentComment");var JRe=o((t,e,r)=>t.endsWith("\n")?TC(r,e):r.includes("\n")?"\n"+TC(r,e):(t.endsWith(" ")?"":" ")+r,"lineComment");t3.indentComment=TC;t3.lineComment=JRe;t3.stringifyComment=WRe});var VW=_(k2=>{"use strict";var QRe="flow";var AC="block";var r3="quoted";function XRe(t,e,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:u}={}){if(!i||i<0)return t;const l=Math.max(1+s,1+i-e.length);if(t.length<=l)return t;const c=[];const d={};let p=i-e.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let h=void 0;let m=false;let g=-1;let y=-1;let v=-1;if(r===AC){g=MW(t,g);if(g!==-1)p=g+l}for(let E;E=t[g+=1];){if(r===r3&&E==="\\"){y=g;switch(t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===AC)g=MW(t,g);p=g+l;f=void 0}else{if(E===" "&&h&&h!==" "&&h!=="\n"&&h!==" "){const b=t[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===r3){while(h===" "||h===" "){h=E;E=t[g+=1];m=true}const b=g>v+1?g-2:y-1;if(d[b])return t;c.push(b);d[b]=true;p=b+l;f=void 0}else{m=true}}}h=E}if(m&&u)u();if(c.length===0)return t;if(a)a();let w=t.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const S=c[E+1]||t.length;if(b===0)w=`
|
|
26
26
|
${e}${t.slice(0,S)}`;else{if(r===r3&&d[b])w+=`${t[b]}\\`;w+=`
|
|
27
27
|
${e}${t.slice(b+1,S)}`}}return w}o(XRe,"foldFlowLines");function MW(t,e){let r=t[e+1];while(r===" "||r===" "){do{r=t[e+=1]}while(r&&r!=="\n");r=t[e+1]}return e}o(MW,"consumeMoreIndentedLines");k2.FOLD_BLOCK=AC;k2.FOLD_FLOW=QRe;k2.FOLD_QUOTED=r3;k2.foldFlowLines=XRe});var L2=_(HW=>{"use strict";var Vu=ai();var dd=VW();var i3=o((t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),"getFoldOptions");var s3=o(t=>/^(%|---|\.\.\.)/m.test(t),"containsDocumentMarker");function ZRe(t,e,r){if(!e||e<0)return false;const n=e-r;const i=t.length;if(i<=n)return false;for(let s=0,a=0;s<i;++s){if(t[s]==="\n"){if(s-a>n)return true;a=s+1;if(i-a<=n)return false}}return true}o(ZRe,"lineLengthOverLimit");function $2(t,e){const r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=e;const i=e.options.doubleQuotedMinMultiLineLength;const s=e.indent||(s3(t)?" ":"");let a="";let u=0;for(let l=0,c=r[l];c;c=r[++l]){if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n"){a+=r.slice(u,l)+"\\ ";l+=1;u=l;c="\\"}if(c==="\\")switch(r[l+1]){case"u":{a+=r.slice(u,l);const d=r.substr(l+2,4);switch(d){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:if(d.substr(0,2)==="00")a+="\\x"+d.substr(2);else a+=r.substr(l,6)}l+=5;u=l+1}break;case"n":if(n||r[l+2]==='"'||r.length<i){l+=1}else{a+=r.slice(u,l)+"\n\n";while(r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"'){a+="\n";l+=2}a+=s;if(r[l+2]===" ")a+="\\";l+=1;u=l+1}break;default:l+=1}}a=u?a+r.slice(u):r;return n?a:dd.foldFlowLines(a,s,dd.FOLD_QUOTED,i3(e,false))}o($2,"doubleQuotedString");function xC(t,e){if(e.options.singleQuote===false||e.implicitKey&&t.includes("\n")||/[ \t]\n|\n[ \t]/.test(t))return $2(t,e);const r=e.indent||(s3(t)?" ":"");const n="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
28
28
|
${r}`)+"'";return e.implicitKey?n:dd.foldFlowLines(n,r,dd.FOLD_FLOW,i3(e,false))}o(xC,"singleQuotedString");function e0(t,e){const{singleQuote:r}=e.options;let n;if(r===false)n=$2;else{const i=t.includes('"');const s=t.includes("'");if(i&&!s)n=xC;else if(s&&!i)n=$2;else n=r?xC:$2}return n(t,e)}o(e0,"quotedString");var CC;try{CC=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{CC=/\n+(?!\n|$)/g}function n3({comment:t,type:e,value:r},n,i,s){const{blockQuote:a,commentString:u,lineWidth:l}=n.options;if(!a||/\n[\t ]+$/.test(r)||/^\s*$/.test(r)){return e0(r,n)}const c=n.indent||(n.forceBlockIndent||s3(r)?" ":"");const d=a==="literal"?true:a==="folded"||e===Vu.Scalar.BLOCK_FOLDED?false:e===Vu.Scalar.BLOCK_LITERAL?true:!ZRe(r,l,c.length);if(!r)return d?"|\n":">\n";let p;let f;for(f=r.length;f>0;--f){const T=r[f-1];if(T!=="\n"&&T!==" "&&T!==" ")break}let h=r.substring(f);const m=h.indexOf("\n");if(m===-1){p="-"}else if(r===h||m!==h.length-1){p="+";if(s)s()}else{p=""}if(h){r=r.slice(0,-h.length);if(h[h.length-1]==="\n")h=h.slice(0,-1);h=h.replace(CC,`$&${c}`)}let g=false;let y;let v=-1;for(y=0;y<r.length;++y){const T=r[y];if(T===" ")g=true;else if(T==="\n")v=y;else break}let w=r.substring(0,v<y?v+1:y);if(w){r=r.substring(w.length);w=w.replace(/\n+/g,`$&${c}`)}const E=c?"2":"1";let b=(d?"|":">")+(g?E:"")+p;if(t){b+=" "+u(t.replace(/ ?[\r\n]+/g," "));if(i)i()}if(d){r=r.replace(/\n+/g,`$&${c}`);return`${b}
|
package/index.minified.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
"use strict";var Ayr=Object.create;var wD=Object.defineProperty;var Cyr=Object.getOwnPropertyDescriptor;var wyr=Object.getOwnPropertyNames;var Tyr=Object.getPrototypeOf;var xyr=Object.prototype.hasOwnProperty;var a=(e,t)=>wD(e,"name",{value:t,configurable:true});var Ii=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var TD=(e,t)=>{for(var r in t)wD(e,r,{get:t[r],enumerable:true})};var xje=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of wyr(t))if(!xyr.call(e,i)&&i!==r)wD(e,i,{get:()=>t[i],enumerable:!(n=Cyr(t,i))||n.enumerable})}return e};var I2=(e,t,r)=>(r=e!=null?Ayr(Tyr(e)):{},xje(t||!e||!e.__esModule?wD(r,"default",{value:e,enumerable:true}):r,e));var Ct=e=>xje(wD({},"__esModule",{value:true}),e);var Rje=y((pas,Ryr)=>{Ryr.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var Pje=y((fas,u$)=>{var Oyr=require("fs");var Oje=require("path");var Pyr=require("os");var Nyr=Rje();var Iyr=Nyr.version;var kyr=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Dyr(e){const t={};let r=e.toString();r=r.replace(/\r\n?/mg,"\n");let n;while((n=kyr.exec(r))!=null){const i=n[1];let s=n[2]||"";s=s.trim();const o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2");if(o==='"'){s=s.replace(/\\n/g,"\n");s=s.replace(/\\r/g,"\r")}t[i]=s}return t}a(Dyr,"parse");function tce(e){console.log(`[dotenv@${Iyr}][DEBUG] ${e}`)}a(tce,"_log");function Lyr(e){return e[0]==="~"?Oje.join(Pyr.homedir(),e.slice(1)):e}a(Lyr,"_resolveHome");function Fyr(e){let t=Oje.resolve(process.cwd(),".env");let r="utf8";const n=Boolean(e&&e.debug);const i=Boolean(e&&e.override);if(e){if(e.path!=null){t=Lyr(e.path)}if(e.encoding!=null){r=e.encoding}}try{const s=o$.parse(Oyr.readFileSync(t,{encoding:r}));Object.keys(s).forEach(function(o){if(!Object.prototype.hasOwnProperty.call(process.env,o)){process.env[o]=s[o]}else{if(i===true){process.env[o]=s[o]}if(n){if(i===true){tce(`"${o}" is already defined in \`process.env\` and WAS overwritten`)}else{tce(`"${o}" is already defined in \`process.env\` and was NOT overwritten`)}}}});return{parsed:s}}catch(s){if(n){tce(`Failed to load ${t} ${s.message}`)}return{error:s}}}a(Fyr,"config");var o$={config:Fyr,parse:Dyr};u$.exports.config=o$.config;u$.exports.parse=o$.parse;u$.exports=o$});var Kd=y(k2=>{"use strict";Object.defineProperty(k2,"__esModule",{value:true});k2.EnvironmentalVariableRequiredError=k2.getRequiredEnvVar=void 0;var rce=class{static{a(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.53.0"}get AUTH_API_URL(){return wm("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return wm("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return wm("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return wm("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return wm("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return wm("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return wm("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return wm("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return wm("METERING_SERVICE_URL","https://meters.zuplo.com")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new xD(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return wm("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function wm(e,t){const r=process.env[e];if(r===void 0&&(t===void 0||process.env.NODE_ENV==="production")){throw new xD(e)}return r??t}a(wm,"getRequiredEnvVar");k2.getRequiredEnvVar=wm;var xD=class extends Error{static{a(this,"EnvironmentalVariableRequiredError")}constructor(t){super(`The environmental variable '${t}' is required.'`)}};k2.EnvironmentalVariableRequiredError=xD;var Byr=new rce;k2.default=Byr});var nce=y(l$=>{"use strict";Object.defineProperty(l$,"__esModule",{value:true});l$.HttpStatusCode=void 0;var Nje;(function(e){e[e["CONTINUE"]=100]="CONTINUE";e[e["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";e[e["PROCESSING"]=102]="PROCESSING";e[e["OK"]=200]="OK";e[e["CREATED"]=201]="CREATED";e[e["ACCEPTED"]=202]="ACCEPTED";e[e["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";e[e["NO_CONTENT"]=204]="NO_CONTENT";e[e["RESET_CONTENT"]=205]="RESET_CONTENT";e[e["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";e[e["MULTI_STATUS"]=207]="MULTI_STATUS";e[e["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";e[e["IM_USED"]=226]="IM_USED";e[e["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";e[e["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";e[e["FOUND"]=302]="FOUND";e[e["SEE_OTHER"]=303]="SEE_OTHER";e[e["NOT_MODIFIED"]=304]="NOT_MODIFIED";e[e["USE_PROXY"]=305]="USE_PROXY";e[e["SWITCH_PROXY"]=306]="SWITCH_PROXY";e[e["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";e[e["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";e[e["BAD_REQUEST"]=400]="BAD_REQUEST";e[e["UNAUTHORIZED"]=401]="UNAUTHORIZED";e[e["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";e[e["FORBIDDEN"]=403]="FORBIDDEN";e[e["NOT_FOUND"]=404]="NOT_FOUND";e[e["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";e[e["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";e[e["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";e[e["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";e[e["CONFLICT"]=409]="CONFLICT";e[e["GONE"]=410]="GONE";e[e["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";e[e["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";e[e["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";e[e["URI_TOO_LONG"]=414]="URI_TOO_LONG";e[e["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";e[e["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";e[e["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";e[e["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";e[e["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";e[e["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";e[e["LOCKED"]=423]="LOCKED";e[e["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";e[e["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";e[e["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";e[e["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";e[e["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";e[e["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";e[e["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";e[e["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";e[e["BAD_GATEWAY"]=502]="BAD_GATEWAY";e[e["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";e[e["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";e[e["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";e[e["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";e[e["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";e[e["LOOP_DETECTED"]=508]="LOOP_DETECTED";e[e["NOT_EXTENDED"]=510]="NOT_EXTENDED";e[e["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})(Nje||(l$.HttpStatusCode=Nje={}))});var Ije=y(c$=>{"use strict";Object.defineProperty(c$,"__esModule",{value:true});c$.getSourceControlProviderLabel=void 0;function Myr(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}a(Myr,"getSourceControlProviderLabel");c$.getSourceControlProviderLabel=Myr});var Dje=y(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:true});V.DEPLOYMENT_INVALID_MULTI_PART=V.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=V.DEPLOYMENT_FILE_DOES_NOT_EXISTS=V.DEPLOYMENT_NOT_FOUND=V.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=V.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=V.DEPLOYMENT_NO_ACCESS=V.INVALID_SOURCE_REPO_URL=V.INVALID_EMAIL_FORMAT=V.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=V.PROJECT_MUST_HAVE_ONE_MEMBER=V.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=V.PROJECT_MEMBER_ALREADY_EXISTS=V.PROJECT_MEMBER_NOT_FOUND=V.INVALID_TEMPLATE_REPOSITORY=V.INCORRECT_PROJECT_TEMPLATE=V.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=V.PROJECT_NOT_FOUND=V.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=V.PROJECT_SHARING_DISABLED_ON_ACCOUNT=V.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=V.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=V.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=V.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=V.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=V.ACCOUNT_MEMBER_INVITE_INVALID=V.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=V.ACCOUNT_MEMBER_DOES_NOT_EXIST=V.ACCOUNT_MEMBER_INFO_MISSING=V.ACCOUNT_MEMBER_ALREADY_EXISTS=V.ACCOUNT_UPDATE_INFO_MISSING=V.ACCOUNT_INFO_MISSING=V.ACCOUNT_DOES_NOT_EXISTS=V.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=V.ACCOUNT_NAME_USES_RESERVED_KEYWORD=V.ACCOUNT_ALREADY_EXISTS=V.ACCOUNT_NOT_FOUND=V.USER_IS_NOT_SERVICE_ACCOUNT=V.USER_REMOVE_NOT_MEMBER_ACCOUNT=V.USER_HAS_NO_ACCESS_TO_ACCOUNT=V.USER_DETAILS_CANNOT_BE_FOUND=V.USER_ALREADY_EXISTS=V.CLIENT_NOT_FOUND=V.FORBIDDEN=V.UNAUTHORIZED=V.METHOD_NOT_ALLOWED=V.NOT_FOUND=V.CONFLICT=V.BAD_REQUEST=V.INTERNAL_SERVER_ERROR=void 0;V.GITHUB_INTEGRATION_DUPLICATE_REPO=V.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=V.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=V.GITHUB_INTEGRATION_BRANCH_BEHIND=V.GITHUB_INTEGRATION_NOT_FOUND=V.GITHUB_REPOSITORY_NOT_FOUND=V.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=V.GITHUB_INTEGRATION_ALREADY_EXISTS=V.FEATURE_FLAGS_NOT_FOUND=V.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=V.PROJECT_ALREADY_HAS_REPO=V.PROJECT_INVALID_NAME=V.FAILED_TO_REVOKE_GH_TOKEN=V.USER_ACCOUNT_NOT_FS_MIGRATED=V.USER_NO_ACCESS_GITLAB_REPO=V.USER_NO_ACCESS_BITBUCKET_REPO=V.GITHUB_APP_CONFIGURATION_NOT_FOUND=V.GITHUB_APP_NO_USER_ACCESS_=V.GITHUB_APP_NO_NAMESPACE_ACCESS=V.GENERIC_GITHUB_BRANCH_INFO_ERROR=V.GITHUB_USER_NO_READ_ACCESS_REPO=V.USER_NO_PULL_ACCESS_GITHUB_REPO=V.USER_NO_ACCESS_GITHUB_REPO=V.PROJECT_SHARING_REQUIRES_GIT_REPO=V.PROJECT_INVALID_GIT_REPO=V.PROJECT_INVALID_GIT_CLONE=V.USER_IS_PROJECT_MEMBER=V.USER_HAS_NO_ACCESS_TO_PROJECT=V.RUNTIME_FLAG_KEY_NOT_VALID=V.RUNTIME_FLAG_NOT_FOUND=V.RUNTIME_FLAG_ALREADY_EXISTS=V.PROJECT_NO_MEMBERS=V.PROJECT_ALREADY_EXISTS=V.SERVICE_CONFIGURATION_FAILED_DECRYPTION=V.WORKING_COPY_SERVICE_NOT_CREATED=V.WORKING_COPY_SERVICE_NOT_DELETED=V.WORKING_COPY_SERVICE_NOT_FOUND=V.SERVICE_CONFIGURATION_NOT_FOUND=V.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=V.DEPLOYMENT_INCORRECT_STATUS_PAUSE=V.DEPLOYMENT_NOT_WORKING_COPY=V.DEPLOYMENT_LOG_NOT_FOUND=V.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=V.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=V.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=V.DEPLOYMENT_DELETE_ERROR=V.DEPLOYMENT_CANNOT_DELETE_INSTANCE=void 0;V.TARGET_BRANCH_ONLY_FOR_PREVIEW=V.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=V.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=V.DEPLOYMENT_NAME_MISSING=V.NON_EXISTENT_ENVIRONMENT_VARIABLE=V.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=V.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=V.DUPLICATE_ENVIRONMENT_VARIABLE=V.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=V.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=V.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=V.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=V.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=V.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=V.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=V.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=V.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=V.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=V.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=V.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=V.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=V.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=V.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=V.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=V.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=V.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=V.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=V.SOURCE_CONTROL_REPO_OPERATION_ERROR=V.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=V.SOURCE_CONTROL_REPO_NOT_FOUND=V.SOURCE_CONTROL_AUTHENTICATION_FAILED=V.EXTERNAL_SERVICE_GENERIC_ERROR=V.API_USER_NO_ACCESS=V.EXTERNAL_USER_NOT_CONFIGURED=V.EXTERNAL_USER_NO_ACCESS=V.CONSUMER_DOES_NOT_EXIST=V.CONSUMER_NO_ACCESS=V.GITLAB_ACCESS_LEVEL_CHECK_FAIL=V.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=V.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=V.GITLAB_DUPLICATE_REPO=V.GITLAB_FAILED_DURING_REPO_CREATION=V.GITLAB_QUERY_USER_INFO_FAILED=V.BITBUCKET_FAILED_DURING_REPO_CREATION=V.BITBUCKET_WORKSPACE_MISCONFIGURATION=V.BITBUCKET_QUERY_USER_INFO_FAILED=V.GITHUB_INTEGRATION_INVALID_REPO=V.GIT_CREATE_PROJECT_WITH_INVALID_REPO=V.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=V.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=void 0;V.METERING_BUCKET_CREATION_FAILED=V.UNABLE_UPGRADE_PLAN=V.BUCKET_API_KEY_SERVICE_CONFLICT=V.DIRECTORY_DELETE_FAILED=V.FILE_DELETE_FAILED=V.CANNOT_DELETE_SOLE_OPEN_API_FILE=V.CANNOT_DELETE_ESSENTIAL_DIRECTORY=V.CANNOT_DELETE_ESSENTIAL_FILE=V.FILE_WRITE_FAILED=V.FILE_RENAME_FAILED=V.FILE_RENAME_FILE_ALREADY_EXISTS=V.FILE_RENAME_CANNOT_CHANGE_EXTENSION=V.FILE_RENAME_PATHS_MATCH=V.DIRECTORY_CREATION_FAILED=V.DIRECTORY_OR_FILE_DOES_NOT_EXIST=V.DIRECTORY_DOES_NOT_EXIST=V.DIRECTORY_ALREADY_EXISTS=V.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=V.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=V.FAILED_DOWNLOAD_FROM_STORAGE=V.CANNOT_FIND_SRC_DIRECTORY=V.CANNOT_READ_PACKAGE_JSON=V.PACKAGE_JSON_NOT_FOUND=V.RUNTIME_VERSION_INCORRECT_FORMAT=V.MIGRATIONS_ONLY_ON_WORKING_COPY=V.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=V.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=V.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=V.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=V.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=V.NO_GLOBAL_SYMBOLS=V.NO_ZUPLO_PREFIXED_VARIABLES=V.NON_EMPTY_TARGETS_REQUIRED=V.CONFLICTING_TYPES=V.OVERLAPPING_TARGETS=V.INVALID_BRANCH_NAME=void 0;var Fe=nce();var kje=Ije();var qyr="https://github.com/apps/zuplo/installations/new";V.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:Fe.HttpStatusCode.BAD_REQUEST};V.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:Fe.HttpStatusCode.CONFLICT};V.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:Fe.HttpStatusCode.NOT_FOUND};V.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED};V.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:Fe.HttpStatusCode.UNAUTHORIZED};V.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:Fe.HttpStatusCode.FORBIDDEN};V.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:Fe.HttpStatusCode.NOT_FOUND};V.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:Fe.HttpStatusCode.CONFLICT};V.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:Fe.HttpStatusCode.NOT_FOUND};V.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:Fe.HttpStatusCode.UNAUTHORIZED};V.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:Fe.HttpStatusCode.BAD_REQUEST};V.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:Fe.HttpStatusCode.CONFLICT};V.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:Fe.HttpStatusCode.BAD_REQUEST};V.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:Fe.HttpStatusCode.BAD_REQUEST};V.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:Fe.HttpStatusCode.BAD_REQUEST};V.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:Fe.HttpStatusCode.FORBIDDEN};V.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:Fe.HttpStatusCode.NOT_FOUND};V.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:Fe.HttpStatusCode.NOT_FOUND};V.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:Fe.HttpStatusCode.FORBIDDEN};V.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:Fe.HttpStatusCode.BAD_REQUEST};var Uyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:Fe.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");V.INVALID_TEMPLATE_REPOSITORY=Uyr;V.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:Fe.HttpStatusCode.NOT_FOUND};V.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:Fe.HttpStatusCode.BAD_REQUEST};V.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:Fe.HttpStatusCode.BAD_REQUEST};V.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:Fe.HttpStatusCode.FORBIDDEN};V.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:Fe.HttpStatusCode.NOT_FOUND};V.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:Fe.HttpStatusCode.NOT_FOUND};V.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:Fe.HttpStatusCode.BAD_REQUEST};V.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:Fe.HttpStatusCode.NOT_FOUND};V.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:Fe.HttpStatusCode.BAD_REQUEST};V.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:Fe.HttpStatusCode.NOT_FOUND};V.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:Fe.HttpStatusCode.BAD_REQUEST};V.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:Fe.HttpStatusCode.FORBIDDEN};V.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:Fe.HttpStatusCode.BAD_REQUEST};var $yr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");V.USER_NO_ACCESS_GITHUB_REPO=$yr;var jyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");V.USER_NO_PULL_ACCESS_GITHUB_REPO=jyr;var Gyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");V.GITHUB_USER_NO_READ_ACCESS_REPO=Gyr;V.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:Fe.HttpStatusCode.BAD_REQUEST};V.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:Fe.HttpStatusCode.FORBIDDEN};var Hyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${qyr}' to add the repository.`,status:Fe.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");V.GITHUB_APP_NO_USER_ACCESS_=Hyr;V.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:Fe.HttpStatusCode.NOT_FOUND};var Vyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");V.USER_NO_ACCESS_BITBUCKET_REPO=Vyr;var zyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");V.USER_NO_ACCESS_GITLAB_REPO=zyr;V.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:Fe.HttpStatusCode.FORBIDDEN};V.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:Fe.HttpStatusCode.BAD_REQUEST};V.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:Fe.HttpStatusCode.BAD_REQUEST};V.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:Fe.HttpStatusCode.BAD_REQUEST};var Kyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:Fe.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");V.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Kyr;var Wyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:Fe.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");V.GITHUB_REPOSITORY_NOT_FOUND=Wyr;V.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:Fe.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};V.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Fe.HttpStatusCode.BAD_REQUEST};V.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:Fe.HttpStatusCode.FORBIDDEN};V.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:Fe.HttpStatusCode.FORBIDDEN};var Yyr=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");V.GITHUB_INTEGRATION_DUPLICATE_REPO=Yyr;var Xyr=a(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");V.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Xyr;var Jyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");V.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Jyr;var Qyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");V.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Qyr;var Zyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");V.GITHUB_INTEGRATION_INVALID_REPO=Zyr;V.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:Fe.HttpStatusCode.FORBIDDEN};V.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:Fe.HttpStatusCode.FORBIDDEN};var e_r=a(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");V.BITBUCKET_FAILED_DURING_REPO_CREATION=e_r;V.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:Fe.HttpStatusCode.FORBIDDEN};var t_r=a(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");V.GITLAB_FAILED_DURING_REPO_CREATION=t_r;var r_r=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");V.GITLAB_DUPLICATE_REPO=r_r;var n_r=a(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");V.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=n_r;var i_r=a(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");V.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=i_r;var s_r=a(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");V.GITLAB_ACCESS_LEVEL_CHECK_FAIL=s_r;V.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:Fe.HttpStatusCode.UNAUTHORIZED};V.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:Fe.HttpStatusCode.NOT_FOUND};V.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:Fe.HttpStatusCode.UNAUTHORIZED};V.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:Fe.HttpStatusCode.FORBIDDEN};V.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:Fe.HttpStatusCode.FORBIDDEN};V.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};var a_r=a(({sourceControlProvider:e})=>{const t=(0,kje.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${t}`,status:Fe.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");V.SOURCE_CONTROL_AUTHENTICATION_FAILED=a_r;var o_r=a(({sourceControlProvider:e})=>{const t=(0,kje.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${t} repository`,status:Fe.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");V.SOURCE_CONTROL_REPO_NOT_FOUND=o_r;V.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:Fe.HttpStatusCode.BAD_REQUEST};var u_r=a(({repoURL:e,operation:t})=>{return{type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:Fe.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");V.SOURCE_CONTROL_REPO_OPERATION_ERROR=u_r;V.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:Fe.HttpStatusCode.NOT_FOUND};V.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:Fe.HttpStatusCode.NOT_FOUND};V.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:Fe.HttpStatusCode.UNAUTHORIZED};V.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:Fe.HttpStatusCode.FORBIDDEN};V.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:Fe.HttpStatusCode.NOT_FOUND};V.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:Fe.HttpStatusCode.NOT_FOUND};V.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:Fe.HttpStatusCode.FAILED_DEPENDENCY};V.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:Fe.HttpStatusCode.FAILED_DEPENDENCY};V.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:Fe.HttpStatusCode.FAILED_DEPENDENCY};V.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:Fe.HttpStatusCode.BAD_REQUEST};V.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:Fe.HttpStatusCode.BAD_REQUEST};V.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:Fe.HttpStatusCode.BAD_REQUEST};V.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:Fe.HttpStatusCode.BAD_REQUEST};V.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:Fe.HttpStatusCode.BAD_REQUEST};V.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:Fe.HttpStatusCode.BAD_REQUEST};V.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:Fe.HttpStatusCode.BAD_REQUEST};V.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:Fe.HttpStatusCode.BAD_REQUEST};V.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:Fe.HttpStatusCode.BAD_REQUEST};V.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:Fe.HttpStatusCode.BAD_REQUEST};V.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:Fe.HttpStatusCode.FORBIDDEN};V.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:Fe.HttpStatusCode.NOT_FOUND};var l_r=a(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");V.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=l_r;var c_r=a(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");V.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=c_r;V.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:Fe.HttpStatusCode.NOT_FOUND};V.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:Fe.HttpStatusCode.BAD_REQUEST};var d_r=a(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");V.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=d_r;var p_r=a(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");V.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=p_r;var f_r=a(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");V.DIRECTORY_ALREADY_EXISTS=f_r;var m_r=a(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");V.DIRECTORY_DOES_NOT_EXIST=m_r;var h_r=a(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");V.DIRECTORY_OR_FILE_DOES_NOT_EXIST=h_r;var g_r=a(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");V.DIRECTORY_CREATION_FAILED=g_r;var y_r=a(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");V.FILE_RENAME_PATHS_MATCH=y_r;var __r=a(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");V.FILE_RENAME_CANNOT_CHANGE_EXTENSION=__r;var v_r=a(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");V.FILE_RENAME_FILE_ALREADY_EXISTS=v_r;var E_r=a(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");V.FILE_RENAME_FAILED=E_r;var b_r=a(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");V.FILE_WRITE_FAILED=b_r;var S_r=a(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");V.CANNOT_DELETE_ESSENTIAL_FILE=S_r;var A_r=a(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");V.CANNOT_DELETE_ESSENTIAL_DIRECTORY=A_r;var C_r=a(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");V.CANNOT_DELETE_SOLE_OPEN_API_FILE=C_r;var w_r=a(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");V.FILE_DELETE_FAILED=w_r;var T_r=a(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");V.DIRECTORY_DELETE_FAILED=T_r;V.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:Fe.HttpStatusCode.CONFLICT};V.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:Fe.HttpStatusCode.BAD_REQUEST};V.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR}});var Fje=y(Uc=>{"use strict";var x_r=Uc&&Uc.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var R_r=Uc&&Uc.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var O_r=Uc&&Uc.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))x_r(t,e,r)}R_r(t,e);return t};Object.defineProperty(Uc,"__esModule",{value:true});Uc.ApiNotFoundError=Uc.ApiError=Uc.Problems=void 0;var Lje=O_r(Dje());Uc.Problems=Lje;var d$=class extends Error{static{a(this,"ApiError")}type;status;detail;instance;constructor(t){super(t.title);if(!t.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`)}this.name="ApiProblemError";this.type=t.type;this.status=t.status;this.detail=t.detail;this.instance=t.instance}};Uc.ApiError=d$;var ice=class extends d${static{a(this,"ApiNotFoundError")}constructor(t={}){super({...t,...Lje.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Uc.ApiNotFoundError=ice});var $c=y(y1=>{"use strict";var P_r=y1&&y1.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var N_r=y1&&y1.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))P_r(t,e,r)};Object.defineProperty(y1,"__esModule",{value:true});y1.HttpStatusCode=void 0;N_r(Fje(),y1);var I_r=nce();Object.defineProperty(y1,"HttpStatusCode",{enumerable:true,get:function(){return I_r.HttpStatusCode}})});var ace=y(p$=>{"use strict";Object.defineProperty(p$,"__esModule",{value:true});p$.CommonAuth=void 0;var E_=$c();var k_r=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var sce=class e{static{a(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(t){return k_r.includes(t)}isDeployerServiceAccount(t){return e.DEPLOYER_USER_SUB===t}static isAuthorizedSub(t,r){if(typeof r==="string"){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}try{const n=t.includes(r.sub);if(!n){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}}catch(n){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}}};p$.CommonAuth=sce});var Bje=y(f$=>{"use strict";Object.defineProperty(f$,"__esModule",{value:true});f$.hasBlockedNotifications=void 0;var D_r=["chocolate_bold_silverfish"];function L_r(e){return D_r.includes(e)}a(L_r,"hasBlockedNotifications");f$.hasBlockedNotifications=L_r});var Mje=y(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:true});jc.BuildIssueError=jc.WARNING_SEVERITY=jc.ERROR_SEVERITY=jc.FAILURE_STATUS=jc.WARNING_STATUS=jc.GOOD_STATUS=void 0;jc.GOOD_STATUS="Good";jc.WARNING_STATUS="Warnings";jc.FAILURE_STATUS="Failed";jc.ERROR_SEVERITY="error";jc.WARNING_SEVERITY="warning";var oce=class extends Error{static{a(this,"BuildIssueError")}issue;constructor(t){super(t.message);this.issue=t}};jc.BuildIssueError=oce});var qje=y(m$=>{"use strict";Object.defineProperty(m$,"__esModule",{value:true});m$.COMPATIBILITY_FLAG_MAPPINGS=void 0;m$.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true,removeAllVendorHeadersExceptListed:true}})});var Uje=y((Ias,F_r)=>{F_r.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2024-01-15",enum:["2023-03-14","2024-01-15"]}}}});var $je=y(h$=>{"use strict";Object.defineProperty(h$,"__esModule",{value:true});h$.VALID_COMPATIBILITY_DATES=void 0;h$.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var jje=y(b_=>{"use strict";var B_r=b_&&b_.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(b_,"__esModule",{value:true});b_.DEFAULT_COMPATIBILITY_DATE=b_.VALID_COMPATIBILITY_DATES=void 0;var M_r=B_r(Uje());var q_r=$je();Object.defineProperty(b_,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return q_r.VALID_COMPATIBILITY_DATES}});b_.DEFAULT_COMPATIBILITY_DATE=M_r.default.properties.compatibilityDate.default});var Gje=y(g$=>{"use strict";Object.defineProperty(g$,"__esModule",{value:true});g$.FeatureFlags=void 0;g$.FeatureFlags=Object.freeze({esmWorker:(e,t)=>({flagName:"ZUPLO_ESM_WORKER",defaultValue:false,accountName:e,projectName:t}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var Hje=y(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:true});S_.decrypt=S_.encrypt=S_.signString=void 0;var Jw=require("crypto");function U_r(e,t){return(0,Jw.createHmac)("sha256",t).update(e).digest("hex")}a(U_r,"signString");S_.signString=U_r;var uce={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var $_r=a(()=>(0,Jw.randomBytes)(uce.IV_BYTE_LEN),"getIV");function j_r(e,t){if(e===null){return null}const r=(0,Jw.createHash)("sha256").update(String(t)).digest("base64").substring(0,32);const n=$_r();const i=(0,Jw.createCipheriv)("aes-256-gcm",r,n,{authTagLength:uce.AUTH_TAG_BYTE_LEN});let s=i.update(e);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}a(j_r,"encrypt");S_.encrypt=j_r;function G_r(e,t){if(!e){return null}const r=Buffer.from(t);const n=(0,Jw.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(e,"hex");const s=i.slice(-16);const o=i.slice(0,12);const u=i.slice(12,-16);const l=(0,Jw.createDecipheriv)("aes-256-gcm",n,o,{authTagLength:uce.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}a(G_r,"decrypt");S_.decrypt=G_r});var Vje=y(y$=>{"use strict";Object.defineProperty(y$,"__esModule",{value:true});y$.getCurrentUtcDateTime=void 0;function H_r(){const e={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const t=new Date().toLocaleString("en-US",e);return t}a(H_r,"getCurrentUtcDateTime");y$.getCurrentUtcDateTime=H_r});var lce=y(_$=>{"use strict";Object.defineProperty(_$,"__esModule",{value:true});_$.DeploymentLogState=void 0;var zje;(function(e){e["ERROR"]="ERROR";e["IN_PROGRESS"]="IN_PROGRESS";e["SUCCESS"]="SUCCESS"})(zje||(_$.DeploymentLogState=zje={}))});var cce=y(Kje=>{"use strict";Object.defineProperty(Kje,"__esModule",{value:true})});var Yje=y(Wje=>{"use strict";Object.defineProperty(Wje,"__esModule",{value:true})});var Xje=y(v$=>{"use strict";Object.defineProperty(v$,"__esModule",{value:true});v$.MARKDOWN_FRONTMATTER_KEYS=void 0;v$.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var Qje=y(Jje=>{"use strict";Object.defineProperty(Jje,"__esModule",{value:true})});var Zje=y(Gh=>{"use strict";var V_r=Gh&&Gh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var E$=Gh&&Gh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))V_r(t,e,r)};Object.defineProperty(Gh,"__esModule",{value:true});E$(cce(),Gh);E$(Yje(),Gh);E$(Xje(),Gh);E$(Qje(),Gh)});var b$=y(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:true});Hh.getLoggerContext=Hh.requestIdGenerator=Hh.REQUEST_ID_HEADER=Hh.LEGACY_REQUEST_ID_HEADER=void 0;var z_r=require("crypto");Hh.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Hh.REQUEST_ID_HEADER="zp-rid";var K_r=a(e=>{const t=e.headers["zuplo-request-id"];const r=e.headers["X-GitHub-Delivery"];if(t){const n=t;return`${n}`}else if(r){return`${r}`}return(0,z_r.randomUUID)()},"requestIdGenerator");Hh.requestIdGenerator=K_r;function W_r(e){const t=e.raw.url??"";const r={};try{const n=e.headers["zuplo-user"]??e.user?.sub;if(n){r.userSub=`${n}`}const i=t.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=t.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const o=t.match(/(projects)\/([a-zA-Z-0-9]*)/);if(o&&o!==null&&o.length>=2){r.project=o[2]}}catch(n){}return r}a(W_r,"getLoggerContext");Hh.getLoggerContext=W_r});var dce=y(Qw=>{"use strict";var Y_r=Qw&&Qw.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Qw,"__esModule",{value:true});Qw.errorHandler=void 0;var kp=$c();var X_r=Y_r(Kd());var eGe=b$();function J_r(e,t,r){let n=500;let i;if(e instanceof kp.ApiError){n=e.status;i={type:e.type,title:e.message,status:e.status,detail:e.detail,instance:e.instance}}else if(typeof e==="object"&&"validation"in e&&"validationContext"in e){n=kp.HttpStatusCode.BAD_REQUEST;i={...kp.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${e.validationContext}.`,errors:e.validation}}else if(typeof e==="object"&&"code"in e&&e.code==="FST_ERR_NOT_FOUND"){n=404;i=kp.Problems.NOT_FOUND}else if(typeof e==="object"&&"code"in e&&typeof e.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(e.code)){n=kp.HttpStatusCode.BAD_REQUEST;i={...kp.Problems.BAD_REQUEST,detail:e.message}}else{let o;if(!r.statusCode||r.statusCode===200){if(typeof e==="object"&&"statusCode"in e&&typeof e.statusCode==="number"){o=e.statusCode}else if(typeof e==="object"&&"status"in e&&typeof e.status==="number"){o=e.status}n=o&&o>=400?o:500}else{n=r.statusCode}i=Q_r(n);if(X_r.default.NODE_ENV!=="production"){if(typeof e==="object"&&"message"in e){i.detail=e.message}else if(typeof e==="string"){i.detail=e}}}i.trace={timestamp:new Date().toJSON(),requestId:t.headers[eGe.REQUEST_ID_HEADER]??t.headers[eGe.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:e},e&&e.message)}else{r.log.error({req:t,res:r,err:e},e&&e.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}a(J_r,"errorHandler");Qw.errorHandler=J_r;function Q_r(e){if(e===401){return kp.Problems.UNAUTHORIZED}else if(e===403){return kp.Problems.FORBIDDEN}else if(e===404){return kp.Problems.NOT_FOUND}else if(e===405){return kp.Problems.METHOD_NOT_ALLOWED}else if(e<500&&e>=400){return kp.Problems.BAD_REQUEST}return kp.Problems.INTERNAL_SERVER_ERROR}a(Q_r,"getProblemFromStatus")});var rGe=y((Xas,pce)=>{"use strict";var Z_r=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var evr=/(\w*(\.\w*)*)\..*/;pce.exports=a(function e(t){if(t.name.length>0)return t.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return tGe(n.stack)}},"getPluginName");function tGe(e){const t=e.match(Z_r);return t?t[1].split(/[/\\]/).slice(-1)[0].match(evr)[1]:"anonymous"}a(tGe,"extractPluginName");pce.exports.extractPluginName=tGe});var iGe=y((Qas,nGe)=>{"use strict";nGe.exports=a(function e(t){if(t[0]==="@"){t=t.slice(1).replace("/","-")}const r=t.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var D2=y((eos,S$)=>{"use strict";var tvr=rGe();var rvr=iGe();var nvr=0;function fce(e,t={}){let r=false;if(typeof e.default!=="undefined"){e=e.default}if(typeof e!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof e}'`)}if(typeof t==="string"){t={fastify:t}}if(typeof t!=="object"||Array.isArray(t)||t===null){throw new TypeError("The options object should be an object")}if(t.fastify!==void 0&&typeof t.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof t.fastify}'`)}if(!t.name){r=true;t.name=tvr(e)+"-auto-"+nvr++}e[Symbol.for("skip-override")]=t.encapsulate!==true;e[Symbol.for("fastify.display-name")]=t.name;e[Symbol.for("plugin-meta")]=t;if(!e.default){e.default=e}const n=rvr(t.name);if(!r&&!e[n]){e[n]=e}return e}a(fce,"plugin");S$.exports=fce;S$.exports.default=fce;S$.exports.fastifyPlugin=fce});var aGe=y(Zw=>{"use strict";var ivr=Zw&&Zw.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Zw,"__esModule",{value:true});Zw.apiKeyAuthPlugin=void 0;var Vh=$c();var svr=ivr(D2());var avr="https://apikey.zuplo.com";var sGe=`Bearer `;Zw.apiKeyAuthPlugin=(0,svr.default)(async(e,t)=>{e.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new Vh.ApiError({...Vh.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(sGe)){throw new Vh.ApiError({...Vh.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(sGe.length);if(!i||i===""){throw new Vh.ApiError({...Vh.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const o=await fetch(`${avr}/v1/$validate/${t.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(o.status===401){throw new Vh.ApiError(Vh.Problems.UNAUTHORIZED)}const u=await o.json();if(t.allowedSubs){if(!t.allowedSubs.includes(u.name)){throw new Vh.ApiError(Vh.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var oGe=y(eT=>{"use strict";var ovr=eT&&eT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(eT,"__esModule",{value:true});eT.ensureZuploAdminPlugin=void 0;var A$=$c();var uvr=ovr(D2());var lvr=ace();eT.ensureZuploAdminPlugin=(0,uvr.default)(async function(e){const t=new lvr.CommonAuth;e.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new A$.ApiError(A$.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&t.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new A$.ApiError(A$.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var lGe=y(tT=>{"use strict";var cvr=tT&&tT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(tT,"__esModule",{value:true});tT.ensureZuploUserPlugin=void 0;var uGe=$c();var dvr=cvr(D2());tT.ensureZuploUserPlugin=(0,dvr.default)(async e=>{e.decorate("ensureZuploUser",async function(t){const r=t.headers["zuplo-user"];if(!r||typeof r!=="string"){t.log.error("The 'zuplo-user' header is missing");throw new uGe.ApiError(uGe.Problems.UNAUTHORIZED)}t.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var pGe=y(rT=>{"use strict";var pvr=rT&&rT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rT,"__esModule",{value:true});rT.featureFlagsPlugin=void 0;var fvr=pvr(D2());var mce;async function cGe(e,t){try{const r=await mce?.variation(t.flagName,{kind:t.kind,key:t.key},t.defaultValue);if(r===void 0){return t.defaultValue}else{return r}}catch(r){e.log.warn(`Failed to query Launch Darkly flag ${t.flagName}`);e.log.error(r)}return t.defaultValue}a(cGe,"getFlagValue");function dGe(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return Promise.resolve(false)}a(dGe,"fallback");rT.featureFlagsPlugin=(0,fvr.default)(async(e,t)=>{try{if(typeof t.key!=="string"||!t.key||!t.client){e.decorateRequest("getFlagValue",dGe);e.decorateRequest("getFlagValueByUser",dGe);return}mce=t.client;e.log.info("Launch Darkly SDK successfully initialized!");e.decorate("flags",mce);e.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return cGe(this,s)});e.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return cGe(this,s)})}catch(r){e.log.warn("Launch Darkly failed to initialize");e.log.error(r)}},{name:"feature-flag-plugin"})});var hce=y(nT=>{"use strict";var mvr=nT&&nT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(nT,"__esModule",{value:true});nT.getUserSubPlugin=void 0;var fGe=$c();var hvr=mvr(D2());nT.getUserSubPlugin=(0,hvr.default)(async e=>{e.decorateRequest("getUserSub",function(){const t=this.user?.sub;if(!t){this.log.error("Could not determine the user sub");throw new fGe.ApiError(fGe.Problems.UNAUTHORIZED)}return t})},{name:"get-user-sub-plugin"})});var gce=y(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:true});Dp.getUserSubPlugin=Dp.featureFlagsPlugin=Dp.ensureZuploUserPlugin=Dp.ensureZuploAdminPlugin=Dp.apiKeyAuthPlugin=void 0;var gvr=aGe();Object.defineProperty(Dp,"apiKeyAuthPlugin",{enumerable:true,get:function(){return gvr.apiKeyAuthPlugin}});var yvr=oGe();Object.defineProperty(Dp,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return yvr.ensureZuploAdminPlugin}});var _vr=lGe();Object.defineProperty(Dp,"ensureZuploUserPlugin",{enumerable:true,get:function(){return _vr.ensureZuploUserPlugin}});var vvr=pGe();Object.defineProperty(Dp,"featureFlagsPlugin",{enumerable:true,get:function(){return vvr.featureFlagsPlugin}});var Evr=hce();Object.defineProperty(Dp,"getUserSubPlugin",{enumerable:true,get:function(){return Evr.getUserSubPlugin}})});var ls=y(Fu=>{"use strict";var yce=Symbol.for("yaml.alias");var mGe=Symbol.for("yaml.document");var C$=Symbol.for("yaml.map");var hGe=Symbol.for("yaml.pair");var _ce=Symbol.for("yaml.scalar");var w$=Symbol.for("yaml.seq");var _1=Symbol.for("yaml.node.type");var bvr=a(e=>!!e&&typeof e==="object"&&e[_1]===yce,"isAlias");var Svr=a(e=>!!e&&typeof e==="object"&&e[_1]===mGe,"isDocument");var Avr=a(e=>!!e&&typeof e==="object"&&e[_1]===C$,"isMap");var Cvr=a(e=>!!e&&typeof e==="object"&&e[_1]===hGe,"isPair");var gGe=a(e=>!!e&&typeof e==="object"&&e[_1]===_ce,"isScalar");var wvr=a(e=>!!e&&typeof e==="object"&&e[_1]===w$,"isSeq");function yGe(e){if(e&&typeof e==="object")switch(e[_1]){case C$:case w$:return true}return false}a(yGe,"isCollection");function Tvr(e){if(e&&typeof e==="object")switch(e[_1]){case yce:case C$:case _ce:case w$:return true}return false}a(Tvr,"isNode");var xvr=a(e=>(gGe(e)||yGe(e))&&!!e.anchor,"hasAnchor");Fu.ALIAS=yce;Fu.DOC=mGe;Fu.MAP=C$;Fu.NODE_TYPE=_1;Fu.PAIR=hGe;Fu.SCALAR=_ce;Fu.SEQ=w$;Fu.hasAnchor=xvr;Fu.isAlias=bvr;Fu.isCollection=yGe;Fu.isDocument=Svr;Fu.isMap=Avr;Fu.isNode=Tvr;Fu.isPair=Cvr;Fu.isScalar=gGe;Fu.isSeq=wvr});var RD=y(vce=>{"use strict";var Jo=ls();var Gc=Symbol("break visit");var _Ge=Symbol("skip children");var zh=Symbol("remove node");function T$(e,t){const r=vGe(t);if(Jo.isDocument(e)){const n=iT(null,e.contents,r,Object.freeze([e]));if(n===zh)e.contents=null}else iT(null,e,r,Object.freeze([]))}a(T$,"visit");T$.BREAK=Gc;T$.SKIP=_Ge;T$.REMOVE=zh;function iT(e,t,r,n){const i=EGe(e,t,r,n);if(Jo.isNode(i)||Jo.isPair(i)){bGe(e,n,i);return iT(e,i,r,n)}if(typeof i!=="symbol"){if(Jo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=iT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===Gc)return Gc;else if(o===zh){t.items.splice(s,1);s-=1}}}else if(Jo.isPair(t)){n=Object.freeze(n.concat(t));const s=iT("key",t.key,r,n);if(s===Gc)return Gc;else if(s===zh)t.key=null;const o=iT("value",t.value,r,n);if(o===Gc)return Gc;else if(o===zh)t.value=null}}return i}a(iT,"visit_");async function x$(e,t){const r=vGe(t);if(Jo.isDocument(e)){const n=await sT(null,e.contents,r,Object.freeze([e]));if(n===zh)e.contents=null}else await sT(null,e,r,Object.freeze([]))}a(x$,"visitAsync");x$.BREAK=Gc;x$.SKIP=_Ge;x$.REMOVE=zh;async function sT(e,t,r,n){const i=await EGe(e,t,r,n);if(Jo.isNode(i)||Jo.isPair(i)){bGe(e,n,i);return sT(e,i,r,n)}if(typeof i!=="symbol"){if(Jo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=await sT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===Gc)return Gc;else if(o===zh){t.items.splice(s,1);s-=1}}}else if(Jo.isPair(t)){n=Object.freeze(n.concat(t));const s=await sT("key",t.key,r,n);if(s===Gc)return Gc;else if(s===zh)t.key=null;const o=await sT("value",t.value,r,n);if(o===Gc)return Gc;else if(o===zh)t.value=null}}return i}a(sT,"visitAsync_");function vGe(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value)){return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e)}return e}a(vGe,"initVisitor");function EGe(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(Jo.isMap(t))return r.Map?.(e,t,n);if(Jo.isSeq(t))return r.Seq?.(e,t,n);if(Jo.isPair(t))return r.Pair?.(e,t,n);if(Jo.isScalar(t))return r.Scalar?.(e,t,n);if(Jo.isAlias(t))return r.Alias?.(e,t,n);return void 0}a(EGe,"callVisitor");function bGe(e,t,r){const n=t[t.length-1];if(Jo.isCollection(n)){n.items[e]=r}else if(Jo.isPair(n)){if(e==="key")n.key=r;else n.value=r}else if(Jo.isDocument(n)){n.contents=r}else{const i=Jo.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}a(bGe,"replaceNode");vce.visit=T$;vce.visitAsync=x$});var Ece=y(AGe=>{"use strict";var SGe=ls();var Rvr=RD();var Ovr={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var Pvr=a(e=>e.replace(/[!,[\]{}]/g,t=>Ovr[t]),"escapeTagName");var OD=class e{static{a(this,"Directives")}constructor(t,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},e.defaultYaml,t);this.tags=Object.assign({},e.defaultTags,r)}clone(){const t=new e(this.yaml,this.tags);t.docStart=this.docStart;return t}atDocument(){const t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){if(this.atNextDocument){this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},e.defaultTags);this.atNextDocument=false}const n=t.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,o]=n;this.tags[s]=o;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const o=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,o);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!"){r(`Not a valid tag: ${t}`);return null}if(t[1]==="<"){const o=t.slice(2,-1);if(o==="!"||o==="!!"){r(`Verbatim tags aren't resolved, so ${t} is invalid.`);return null}if(t[t.length-1]!==">")r("Verbatim tags must end with a >");return o}const[,n,i]=t.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${t} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(o){r(String(o));return null}}if(n==="!")return t;r(`Could not resolve tag: ${t}`);return null}tagString(t){for(const[r,n]of Object.entries(this.tags)){if(t.startsWith(n))return r+Pvr(t.substring(n.length))}return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(t&&n.length>0&&SGe.isNode(t.contents)){const s={};Rvr.visit(t.contents,(o,u)=>{if(SGe.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,o]of n){if(s==="!!"&&o==="tag:yaml.org,2002:")continue;if(!t||i.some(u=>u.startsWith(o)))r.push(`%TAG ${s} ${o}`)}return r.join("\n")}};OD.defaultYaml={explicit:false,version:"1.2"};OD.defaultTags={"!!":"tag:yaml.org,2002:"};AGe.Directives=OD});var R$=y(PD=>{"use strict";var CGe=ls();var Nvr=RD();function Ivr(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const r=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(r)}return true}a(Ivr,"anchorIsValid");function wGe(e){const t=new Set;Nvr.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}});return t}a(wGe,"anchorNames");function TGe(e,t){for(let r=1;true;++r){const n=`${e}${r}`;if(!t.has(n))return n}}a(TGe,"findNewAnchor");function kvr(e,t){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=wGe(e);const o=TGe(t,i);i.add(o);return o},setAnchors:()=>{for(const s of r){const o=n.get(s);if(typeof o==="object"&&o.anchor&&(CGe.isScalar(o.node)||CGe.isCollection(o.node))){o.node.anchor=o.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}a(kvr,"createNodeAnchors");PD.anchorIsValid=Ivr;PD.anchorNames=wGe;PD.createNodeAnchors=kvr;PD.findNewAnchor=TGe});var bce=y(xGe=>{"use strict";function ND(e,t,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const o=n[i];const u=ND(e,n,String(i),o);if(u===void 0)delete n[i];else if(u!==o)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const o=ND(e,n,i,s);if(o===void 0)n.delete(i);else if(o!==s)n.set(i,o)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=ND(e,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const o=ND(e,n,i,s);if(o===void 0)delete n[i];else if(o!==s)n[i]=o}}}return e.call(t,r,n)}a(ND,"applyReviver");xGe.applyReviver=ND});var A_=y(OGe=>{"use strict";var Dvr=ls();function RGe(e,t,r){if(Array.isArray(e))return e.map((n,i)=>RGe(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Dvr.hasAnchor(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}a(RGe,"toJS");OGe.toJS=RGe});var O$=y(NGe=>{"use strict";var Lvr=bce();var PGe=ls();var Fvr=A_();var Sce=class{static{a(this,"NodeBase")}constructor(t){Object.defineProperty(this,PGe.NODE_TYPE,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)t.range=this.range.slice();return t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!PGe.isDocument(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=Fvr.toJS(this,"",o);if(typeof i==="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s==="function"?Lvr.applyReviver(s,{"":u},"",u):u}};NGe.NodeBase=Sce});var ID=y(kGe=>{"use strict";var Bvr=R$();var IGe=RD();var P$=ls();var Mvr=O$();var qvr=A_();var Ace=class extends Mvr.NodeBase{static{a(this,"Alias")}constructor(t){super(P$.ALIAS);this.source=t;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let r=void 0;IGe.visit(t,{Node:(n,i)=>{if(i===this)return IGe.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(t,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(o);if(!u){qvr.toJS(o,null,r);u=n.get(o)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=N$(i,o,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(t,r,n){const i=`*${this.source}`;if(t){Bvr.anchorIsValid(this.source);if(t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}};function N$(e,t,r){if(P$.isAlias(t)){const n=t.resolve(e);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(P$.isCollection(t)){let n=0;for(const i of t.items){const s=N$(e,i,r);if(s>n)n=s}return n}else if(P$.isPair(t)){const n=N$(e,t.key,r);const i=N$(e,t.value,r);return Math.max(n,i)}return 1}a(N$,"getAliasCount");kGe.Alias=Ace});var xo=y(Cce=>{"use strict";var Uvr=ls();var $vr=O$();var jvr=A_();var Gvr=a(e=>!e||typeof e!=="function"&&typeof e!=="object","isScalarValue");var C_=class extends $vr.NodeBase{static{a(this,"Scalar")}constructor(t){super(Uvr.SCALAR);this.value=t}toJSON(t,r){return r?.keep?this.value:jvr.toJS(this.value,t,r)}toString(){return String(this.value)}};C_.BLOCK_FOLDED="BLOCK_FOLDED";C_.BLOCK_LITERAL="BLOCK_LITERAL";C_.PLAIN="PLAIN";C_.QUOTE_DOUBLE="QUOTE_DOUBLE";C_.QUOTE_SINGLE="QUOTE_SINGLE";Cce.Scalar=C_;Cce.isScalarValue=Gvr});var kD=y(LGe=>{"use strict";var Hvr=ID();var L2=ls();var DGe=xo();var Vvr="tag:yaml.org,2002:";function zvr(e,t,r){if(t){const n=r.filter(s=>s.tag===t);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return r.find(n=>n.identify?.(e)&&!n.format)}a(zvr,"findTagObject");function Kvr(e,t,r){if(L2.isDocument(e))e=e.contents;if(L2.isNode(e))return e;if(L2.isPair(e)){const p=r.schema[L2.MAP].createNode?.(r.schema,null,r);p.items.push(e);return p}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:o,sourceObjects:u}=r;let l=void 0;if(n&&e&&typeof e==="object"){l=u.get(e);if(l){if(!l.anchor)l.anchor=i(e);return new Hvr.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(e,l)}}if(t?.startsWith("!!"))t=Vvr+t.slice(2);let c=zvr(e,t,o.tags);if(!c){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const p=new DGe.Scalar(e);if(l)l.node=p;return p}c=e instanceof Map?o[L2.MAP]:Symbol.iterator in Object(e)?o[L2.SEQ]:o[L2.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new DGe.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}a(Kvr,"createNode");LGe.createNode=Kvr});var DD=y(k$=>{"use strict";var Wvr=kD();var Kh=ls();var Yvr=O$();function wce(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){const s=t[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=n;n=o}else{n=new Map([[s,n]])}}return Wvr.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}a(wce,"collectionFromPath");var FGe=a(e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done,"isEmptyPath");var I$=class extends Yvr.NodeBase{static{a(this,"Collection")}constructor(t,r){super(t);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(t)r.schema=t;r.items=r.items.map(n=>Kh.isNode(n)||Kh.isPair(n)?n.clone(t):n);if(this.range)r.range=this.range.slice();return r}addIn(t,r){if(FGe(t))this.add(r);else{const[n,...i]=t;const s=this.get(n,true);if(Kh.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,wce(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(t){const[r,...n]=t;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(Kh.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){const[n,...i]=t;const s=this.get(n,true);if(i.length===0)return!r&&Kh.isScalar(s)?s.value:s;else return Kh.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!Kh.isPair(r))return false;const n=r.value;return n==null||t&&Kh.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){const[r,...n]=t;if(n.length===0)return this.has(r);const i=this.get(r,true);return Kh.isCollection(i)?i.hasIn(n):false}setIn(t,r){const[n,...i]=t;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(Kh.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,wce(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};I$.maxFlowStringSingleLineLength=60;k$.Collection=I$;k$.collectionFromPath=wce;k$.isEmptyPath=FGe});var LD=y(D$=>{"use strict";var Xvr=a(e=>e.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function Tce(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}a(Tce,"indentComment");var Jvr=a((e,t,r)=>e.endsWith("\n")?Tce(r,t):r.includes("\n")?"\n"+Tce(r,t):(e.endsWith(" ")?"":" ")+r,"lineComment");D$.indentComment=Tce;D$.lineComment=Jvr;D$.stringifyComment=Xvr});var MGe=y(FD=>{"use strict";var Qvr="flow";var xce="block";var L$="quoted";function Zvr(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:u}={}){if(!i||i<0)return e;const l=Math.max(1+s,1+i-t.length);if(e.length<=l)return e;const c=[];const d={};let p=i-t.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let m=void 0;let h=false;let g=-1;let _=-1;let v=-1;if(r===xce){g=BGe(e,g);if(g!==-1)p=g+l}for(let E;E=e[g+=1];){if(r===L$&&E==="\\"){_=g;switch(e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===xce)g=BGe(e,g);p=g+l;f=void 0}else{if(E===" "&&m&&m!==" "&&m!=="\n"&&m!==" "){const b=e[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===L$){while(m===" "||m===" "){m=E;E=e[g+=1];h=true}const b=g>v+1?g-2:_-1;if(d[b])return e;c.push(b);d[b]=true;p=b+l;f=void 0}else{h=true}}}m=E}if(h&&u)u();if(c.length===0)return e;if(o)o();let S=e.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const A=c[E+1]||e.length;if(b===0)S=`
|
|
25
|
+
"use strict";var Ayr=Object.create;var wD=Object.defineProperty;var Cyr=Object.getOwnPropertyDescriptor;var wyr=Object.getOwnPropertyNames;var Tyr=Object.getPrototypeOf;var xyr=Object.prototype.hasOwnProperty;var a=(e,t)=>wD(e,"name",{value:t,configurable:true});var Ii=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var TD=(e,t)=>{for(var r in t)wD(e,r,{get:t[r],enumerable:true})};var xje=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of wyr(t))if(!xyr.call(e,i)&&i!==r)wD(e,i,{get:()=>t[i],enumerable:!(n=Cyr(t,i))||n.enumerable})}return e};var I2=(e,t,r)=>(r=e!=null?Ayr(Tyr(e)):{},xje(t||!e||!e.__esModule?wD(r,"default",{value:e,enumerable:true}):r,e));var Ct=e=>xje(wD({},"__esModule",{value:true}),e);var Rje=y((pas,Ryr)=>{Ryr.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var Pje=y((fas,u$)=>{var Oyr=require("fs");var Oje=require("path");var Pyr=require("os");var Nyr=Rje();var Iyr=Nyr.version;var kyr=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Dyr(e){const t={};let r=e.toString();r=r.replace(/\r\n?/mg,"\n");let n;while((n=kyr.exec(r))!=null){const i=n[1];let s=n[2]||"";s=s.trim();const o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2");if(o==='"'){s=s.replace(/\\n/g,"\n");s=s.replace(/\\r/g,"\r")}t[i]=s}return t}a(Dyr,"parse");function tce(e){console.log(`[dotenv@${Iyr}][DEBUG] ${e}`)}a(tce,"_log");function Lyr(e){return e[0]==="~"?Oje.join(Pyr.homedir(),e.slice(1)):e}a(Lyr,"_resolveHome");function Fyr(e){let t=Oje.resolve(process.cwd(),".env");let r="utf8";const n=Boolean(e&&e.debug);const i=Boolean(e&&e.override);if(e){if(e.path!=null){t=Lyr(e.path)}if(e.encoding!=null){r=e.encoding}}try{const s=o$.parse(Oyr.readFileSync(t,{encoding:r}));Object.keys(s).forEach(function(o){if(!Object.prototype.hasOwnProperty.call(process.env,o)){process.env[o]=s[o]}else{if(i===true){process.env[o]=s[o]}if(n){if(i===true){tce(`"${o}" is already defined in \`process.env\` and WAS overwritten`)}else{tce(`"${o}" is already defined in \`process.env\` and was NOT overwritten`)}}}});return{parsed:s}}catch(s){if(n){tce(`Failed to load ${t} ${s.message}`)}return{error:s}}}a(Fyr,"config");var o$={config:Fyr,parse:Dyr};u$.exports.config=o$.config;u$.exports.parse=o$.parse;u$.exports=o$});var Kd=y(k2=>{"use strict";Object.defineProperty(k2,"__esModule",{value:true});k2.EnvironmentalVariableRequiredError=k2.getRequiredEnvVar=void 0;var rce=class{static{a(this,"Environment")}get LOG_LEVEL(){return process.env.LOG_LEVEL??"info"}get LOG_FORMAT(){return process.env.LOG_FORMAT??"pretty"}get NODE_ENV(){return process.env.NODE_ENV}get USE_LOCAL_API_SERVER(){return process.env.USE_LOCAL_API_SERVER==="true"}get USE_MONOREPO_PACKAGES(){return process.env.USE_MONOREPO_PACKAGES==="true"}get GCP_STORAGE_BUNDLE_BUCKET_NAME(){return process.env.GCP_STORAGE_BUNDLE_BUCKET_NAME}get GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME(){return process.env.GCP_STORAGE_DEV_PORTAL_BUILD_BUCKET_NAME}get GCP_STORAGE_ARCHIVE_BUCKET_NAME(){return process.env.GCP_STORAGE_ARCHIVE_BUCKET_NAME}get GCP_STORAGE_SOURCE_CODE_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCE_CODE_BUCKET_NAME}get GCP_STORAGE_SOURCES_BUCKET_NAME(){return process.env.GCP_STORAGE_SOURCES_BUCKET_NAME}get ZUPLO_AUTH_API_JWT(){return process.env.ZUPLO_AUTH_API_JWT}get GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS(){return process.env.GCP_SERVICE_ACCOUNT_KEY_USER_ZUPS}get RUNTIME_DENO_VERSION(){return process.env.RUNTIME_DENO_VERSION??"1.53.0"}get AUTH_API_URL(){return wm("AUTH_API_URL","http://localhost:5201")}get MANAGEMENT_API_URL(){return wm("MANAGEMENT_API_URL","http://localhost:3100")}get TENANT_API_URL(){return wm("TENANT_API_URL","http://localhost:5100")}get CONTENT_API_URL(){return wm("CONTENT_API_URL","http://localhost:5400")}get DEPLOYER_API_URL(){return wm("DEPLOYER_API_URL","http://localhost:5300")}get DEV_API_URL(){return wm("DEV_API_URL","http://localhost:5200")}get API_KEY_SERVICE_URL(){return wm("API_KEY_SERVICE_URL","https://apikey.zuplo.com")}get API_KEY_MANAGEMENT_SERVICE_URL(){return wm("API_KEY_MANAGEMENT_SERVICE_URL","https://api-key-management-service-rreeuhlsca-ue.a.run.app")}get METERING_SERVICE_URL(){return wm("METERING_SERVICE_URL","https://meters.zuplo.com")}get FETCH_PROXY_URL(){return process.env.FETCH_PROXY_URL||"https://proxy-main-04e55cb.zuplo.app"}get FETCH_PROXY_API_KEY(){return process.env.FETCH_PROXY_API_KEY||"zpk_123"}get LOG_EVENT_API_URL(){return process.env.LOG_EVENT_API_URL}get LAUNCH_DARKLY_SERVER_KEY(){return process.env.LAUNCH_DARKLY_SERVER_KEY}get REMOTE_LOGGING_SHARED_SECRET(){return process.env.REMOTE_LOGGING_SHARED_SECRET??"the-logging-shared-secret"}get TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT(){return process.env.TENANT_API_CLOUDRUN_K8_SERVICE_IP_PORT??"10.142.0.64:5000"}get DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME(){return process.env.DEVELOPER_API_API_KEY_SERVICE_BUCKET_NAME??"zpl-developer-api"}get __ZUPLO_AUTH_API_JWT(){return process.env.__ZUPLO_AUTH_API_JWT??void 0}get BUILD_ASSETS_BUCKET_NAME(){return process.env.BUILD_ASSETS_BUCKET_NAME}get BUILD_ASSETS_S3_ENDPOINT(){return process.env.BUILD_ASSETS_S3_ENDPOINT}get BUILD_ASSETS_ACCESS_KEY_ID(){return process.env.BUILD_ASSETS_ACCESS_KEY_ID}get BUILD_ASSETS_SECRET_ACCESS_KEY(){return process.env.BUILD_ASSETS_SECRET_ACCESS_KEY}get DEV_PORTAL_ENCRYPTION_SECRET(){if(!process.env.DEV_PORTAL_ENCRYPTION_SECRET){throw new xD(`DEV_PORTAL_ENCRYPTION_SECRET`)}return process.env.DEV_PORTAL_ENCRYPTION_SECRET}isProduction(){return this.NODE_ENV==="production"}get OPENFGA_SERVICE_URL(){return wm("OPENFGA_SERVICE_URL","https://openfga-eq7z4lly2a-ue.a.run.app")}get OPENFGA_STORE_ID(){return process.env.OPENFGA_STORE_ID??""}get OPENFGA_MODEL_ID(){return process.env.OPENFGA_MODEL_ID??""}};function wm(e,t){const r=process.env[e];if(r===void 0&&(t===void 0||process.env.NODE_ENV==="production")){throw new xD(e)}return r??t}a(wm,"getRequiredEnvVar");k2.getRequiredEnvVar=wm;var xD=class extends Error{static{a(this,"EnvironmentalVariableRequiredError")}constructor(t){super(`The environmental variable '${t}' is required.'`)}};k2.EnvironmentalVariableRequiredError=xD;var Byr=new rce;k2.default=Byr});var nce=y(l$=>{"use strict";Object.defineProperty(l$,"__esModule",{value:true});l$.HttpStatusCode=void 0;var Nje;(function(e){e[e["CONTINUE"]=100]="CONTINUE";e[e["SWITCHING_PROTOCOLS"]=101]="SWITCHING_PROTOCOLS";e[e["PROCESSING"]=102]="PROCESSING";e[e["OK"]=200]="OK";e[e["CREATED"]=201]="CREATED";e[e["ACCEPTED"]=202]="ACCEPTED";e[e["NON_AUTHORITATIVE_INFORMATION"]=203]="NON_AUTHORITATIVE_INFORMATION";e[e["NO_CONTENT"]=204]="NO_CONTENT";e[e["RESET_CONTENT"]=205]="RESET_CONTENT";e[e["PARTIAL_CONTENT"]=206]="PARTIAL_CONTENT";e[e["MULTI_STATUS"]=207]="MULTI_STATUS";e[e["ALREADY_REPORTED"]=208]="ALREADY_REPORTED";e[e["IM_USED"]=226]="IM_USED";e[e["MULTIPLE_CHOICES"]=300]="MULTIPLE_CHOICES";e[e["MOVED_PERMANENTLY"]=301]="MOVED_PERMANENTLY";e[e["FOUND"]=302]="FOUND";e[e["SEE_OTHER"]=303]="SEE_OTHER";e[e["NOT_MODIFIED"]=304]="NOT_MODIFIED";e[e["USE_PROXY"]=305]="USE_PROXY";e[e["SWITCH_PROXY"]=306]="SWITCH_PROXY";e[e["TEMPORARY_REDIRECT"]=307]="TEMPORARY_REDIRECT";e[e["PERMANENT_REDIRECT"]=308]="PERMANENT_REDIRECT";e[e["BAD_REQUEST"]=400]="BAD_REQUEST";e[e["UNAUTHORIZED"]=401]="UNAUTHORIZED";e[e["PAYMENT_REQUIRED"]=402]="PAYMENT_REQUIRED";e[e["FORBIDDEN"]=403]="FORBIDDEN";e[e["NOT_FOUND"]=404]="NOT_FOUND";e[e["METHOD_NOT_ALLOWED"]=405]="METHOD_NOT_ALLOWED";e[e["NOT_ACCEPTABLE"]=406]="NOT_ACCEPTABLE";e[e["PROXY_AUTHENTICATION_REQUIRED"]=407]="PROXY_AUTHENTICATION_REQUIRED";e[e["REQUEST_TIMEOUT"]=408]="REQUEST_TIMEOUT";e[e["CONFLICT"]=409]="CONFLICT";e[e["GONE"]=410]="GONE";e[e["LENGTH_REQUIRED"]=411]="LENGTH_REQUIRED";e[e["PRECONDITION_FAILED"]=412]="PRECONDITION_FAILED";e[e["PAYLOAD_TOO_LARGE"]=413]="PAYLOAD_TOO_LARGE";e[e["URI_TOO_LONG"]=414]="URI_TOO_LONG";e[e["UNSUPPORTED_MEDIA_TYPE"]=415]="UNSUPPORTED_MEDIA_TYPE";e[e["RANGE_NOT_SATISFIABLE"]=416]="RANGE_NOT_SATISFIABLE";e[e["EXPECTATION_FAILED"]=417]="EXPECTATION_FAILED";e[e["I_AM_A_TEAPOT"]=418]="I_AM_A_TEAPOT";e[e["MISDIRECTED_REQUEST"]=421]="MISDIRECTED_REQUEST";e[e["UNPROCESSABLE_ENTITY"]=422]="UNPROCESSABLE_ENTITY";e[e["LOCKED"]=423]="LOCKED";e[e["FAILED_DEPENDENCY"]=424]="FAILED_DEPENDENCY";e[e["UPGRADE_REQUIRED"]=426]="UPGRADE_REQUIRED";e[e["PRECONDITION_REQUIRED"]=428]="PRECONDITION_REQUIRED";e[e["TOO_MANY_REQUESTS"]=429]="TOO_MANY_REQUESTS";e[e["REQUEST_HEADER_FIELDS_TOO_LARGE"]=431]="REQUEST_HEADER_FIELDS_TOO_LARGE";e[e["UNAVAILABLE_FOR_LEGAL_REASONS"]=451]="UNAVAILABLE_FOR_LEGAL_REASONS";e[e["INTERNAL_SERVER_ERROR"]=500]="INTERNAL_SERVER_ERROR";e[e["NOT_IMPLEMENTED"]=501]="NOT_IMPLEMENTED";e[e["BAD_GATEWAY"]=502]="BAD_GATEWAY";e[e["SERVICE_UNAVAILABLE"]=503]="SERVICE_UNAVAILABLE";e[e["GATEWAY_TIMEOUT"]=504]="GATEWAY_TIMEOUT";e[e["HTTP_VERSION_NOT_SUPPORTED"]=505]="HTTP_VERSION_NOT_SUPPORTED";e[e["VARIANT_ALSO_NEGOTIATES"]=506]="VARIANT_ALSO_NEGOTIATES";e[e["INSUFFICIENT_STORAGE"]=507]="INSUFFICIENT_STORAGE";e[e["LOOP_DETECTED"]=508]="LOOP_DETECTED";e[e["NOT_EXTENDED"]=510]="NOT_EXTENDED";e[e["NETWORK_AUTHENTICATION_REQUIRED"]=511]="NETWORK_AUTHENTICATION_REQUIRED"})(Nje||(l$.HttpStatusCode=Nje={}))});var Ije=y(c$=>{"use strict";Object.defineProperty(c$,"__esModule",{value:true});c$.getSourceControlProviderLabel=void 0;function Myr(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}a(Myr,"getSourceControlProviderLabel");c$.getSourceControlProviderLabel=Myr});var Dje=y(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:true});V.DEPLOYMENT_INVALID_MULTI_PART=V.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=V.DEPLOYMENT_FILE_DOES_NOT_EXISTS=V.DEPLOYMENT_NOT_FOUND=V.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=V.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=V.DEPLOYMENT_NO_ACCESS=V.INVALID_SOURCE_REPO_URL=V.INVALID_EMAIL_FORMAT=V.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=V.PROJECT_MUST_HAVE_ONE_MEMBER=V.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=V.PROJECT_MEMBER_ALREADY_EXISTS=V.PROJECT_MEMBER_NOT_FOUND=V.INVALID_TEMPLATE_REPOSITORY=V.INCORRECT_PROJECT_TEMPLATE=V.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=V.PROJECT_NOT_FOUND=V.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=V.PROJECT_SHARING_DISABLED_ON_ACCOUNT=V.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=V.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=V.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=V.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=V.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=V.ACCOUNT_MEMBER_INVITE_INVALID=V.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=V.ACCOUNT_MEMBER_DOES_NOT_EXIST=V.ACCOUNT_MEMBER_INFO_MISSING=V.ACCOUNT_MEMBER_ALREADY_EXISTS=V.ACCOUNT_UPDATE_INFO_MISSING=V.ACCOUNT_INFO_MISSING=V.ACCOUNT_DOES_NOT_EXISTS=V.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=V.ACCOUNT_NAME_USES_RESERVED_KEYWORD=V.ACCOUNT_ALREADY_EXISTS=V.ACCOUNT_NOT_FOUND=V.USER_IS_NOT_SERVICE_ACCOUNT=V.USER_REMOVE_NOT_MEMBER_ACCOUNT=V.USER_HAS_NO_ACCESS_TO_ACCOUNT=V.USER_DETAILS_CANNOT_BE_FOUND=V.USER_ALREADY_EXISTS=V.CLIENT_NOT_FOUND=V.FORBIDDEN=V.UNAUTHORIZED=V.METHOD_NOT_ALLOWED=V.NOT_FOUND=V.CONFLICT=V.BAD_REQUEST=V.INTERNAL_SERVER_ERROR=void 0;V.GITHUB_INTEGRATION_DUPLICATE_REPO=V.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=V.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=V.GITHUB_INTEGRATION_BRANCH_BEHIND=V.GITHUB_INTEGRATION_NOT_FOUND=V.GITHUB_REPOSITORY_NOT_FOUND=V.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=V.GITHUB_INTEGRATION_ALREADY_EXISTS=V.FEATURE_FLAGS_NOT_FOUND=V.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=V.PROJECT_ALREADY_HAS_REPO=V.PROJECT_INVALID_NAME=V.FAILED_TO_REVOKE_GH_TOKEN=V.USER_ACCOUNT_NOT_FS_MIGRATED=V.USER_NO_ACCESS_GITLAB_REPO=V.USER_NO_ACCESS_BITBUCKET_REPO=V.GITHUB_APP_CONFIGURATION_NOT_FOUND=V.GITHUB_APP_NO_USER_ACCESS_=V.GITHUB_APP_NO_NAMESPACE_ACCESS=V.GENERIC_GITHUB_BRANCH_INFO_ERROR=V.GITHUB_USER_NO_READ_ACCESS_REPO=V.USER_NO_PULL_ACCESS_GITHUB_REPO=V.USER_NO_ACCESS_GITHUB_REPO=V.PROJECT_SHARING_REQUIRES_GIT_REPO=V.PROJECT_INVALID_GIT_REPO=V.PROJECT_INVALID_GIT_CLONE=V.USER_IS_PROJECT_MEMBER=V.USER_HAS_NO_ACCESS_TO_PROJECT=V.RUNTIME_FLAG_KEY_NOT_VALID=V.RUNTIME_FLAG_NOT_FOUND=V.RUNTIME_FLAG_ALREADY_EXISTS=V.PROJECT_NO_MEMBERS=V.PROJECT_ALREADY_EXISTS=V.SERVICE_CONFIGURATION_FAILED_DECRYPTION=V.WORKING_COPY_SERVICE_NOT_CREATED=V.WORKING_COPY_SERVICE_NOT_DELETED=V.WORKING_COPY_SERVICE_NOT_FOUND=V.SERVICE_CONFIGURATION_NOT_FOUND=V.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=V.DEPLOYMENT_INCORRECT_STATUS_PAUSE=V.DEPLOYMENT_NOT_WORKING_COPY=V.DEPLOYMENT_LOG_NOT_FOUND=V.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=V.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=V.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=V.DEPLOYMENT_DELETE_ERROR=V.DEPLOYMENT_CANNOT_DELETE_INSTANCE=void 0;V.TARGET_BRANCH_ONLY_FOR_PREVIEW=V.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=V.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=V.DEPLOYMENT_NAME_MISSING=V.NON_EXISTENT_ENVIRONMENT_VARIABLE=V.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=V.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=V.DUPLICATE_ENVIRONMENT_VARIABLE=V.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=V.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=V.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=V.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=V.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=V.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=V.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=V.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=V.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=V.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=V.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=V.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=V.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=V.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=V.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=V.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=V.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=V.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=V.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=V.SOURCE_CONTROL_REPO_OPERATION_ERROR=V.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=V.SOURCE_CONTROL_REPO_NOT_FOUND=V.SOURCE_CONTROL_AUTHENTICATION_FAILED=V.EXTERNAL_SERVICE_GENERIC_ERROR=V.API_USER_NO_ACCESS=V.EXTERNAL_USER_NOT_CONFIGURED=V.EXTERNAL_USER_NO_ACCESS=V.CONSUMER_DOES_NOT_EXIST=V.CONSUMER_NO_ACCESS=V.GITLAB_ACCESS_LEVEL_CHECK_FAIL=V.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=V.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=V.GITLAB_DUPLICATE_REPO=V.GITLAB_FAILED_DURING_REPO_CREATION=V.GITLAB_QUERY_USER_INFO_FAILED=V.BITBUCKET_FAILED_DURING_REPO_CREATION=V.BITBUCKET_WORKSPACE_MISCONFIGURATION=V.BITBUCKET_QUERY_USER_INFO_FAILED=V.GITHUB_INTEGRATION_INVALID_REPO=V.GIT_CREATE_PROJECT_WITH_INVALID_REPO=V.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=V.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=void 0;V.METERING_BUCKET_CREATION_FAILED=V.UNABLE_UPGRADE_PLAN=V.BUCKET_NOT_FOUND=V.BUCKET_API_KEY_SERVICE_CONFLICT=V.DIRECTORY_DELETE_FAILED=V.FILE_DELETE_FAILED=V.CANNOT_DELETE_SOLE_OPEN_API_FILE=V.CANNOT_DELETE_ESSENTIAL_DIRECTORY=V.CANNOT_DELETE_ESSENTIAL_FILE=V.FILE_WRITE_FAILED=V.FILE_RENAME_FAILED=V.FILE_RENAME_FILE_ALREADY_EXISTS=V.FILE_RENAME_CANNOT_CHANGE_EXTENSION=V.FILE_RENAME_PATHS_MATCH=V.DIRECTORY_CREATION_FAILED=V.DIRECTORY_OR_FILE_DOES_NOT_EXIST=V.DIRECTORY_DOES_NOT_EXIST=V.DIRECTORY_ALREADY_EXISTS=V.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=V.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=V.FAILED_DOWNLOAD_FROM_STORAGE=V.CANNOT_FIND_SRC_DIRECTORY=V.CANNOT_READ_PACKAGE_JSON=V.PACKAGE_JSON_NOT_FOUND=V.RUNTIME_VERSION_INCORRECT_FORMAT=V.MIGRATIONS_ONLY_ON_WORKING_COPY=V.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=V.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=V.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=V.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=V.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=V.NO_GLOBAL_SYMBOLS=V.NO_ZUPLO_PREFIXED_VARIABLES=V.NON_EMPTY_TARGETS_REQUIRED=V.CONFLICTING_TYPES=V.OVERLAPPING_TARGETS=V.INVALID_BRANCH_NAME=void 0;var Fe=nce();var kje=Ije();var qyr="https://github.com/apps/zuplo/installations/new";V.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:Fe.HttpStatusCode.BAD_REQUEST};V.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:Fe.HttpStatusCode.CONFLICT};V.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:Fe.HttpStatusCode.NOT_FOUND};V.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED};V.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:Fe.HttpStatusCode.UNAUTHORIZED};V.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:Fe.HttpStatusCode.FORBIDDEN};V.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:Fe.HttpStatusCode.NOT_FOUND};V.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:Fe.HttpStatusCode.CONFLICT};V.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:Fe.HttpStatusCode.NOT_FOUND};V.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:Fe.HttpStatusCode.UNAUTHORIZED};V.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:Fe.HttpStatusCode.BAD_REQUEST};V.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:Fe.HttpStatusCode.CONFLICT};V.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:Fe.HttpStatusCode.NOT_FOUND};V.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:Fe.HttpStatusCode.BAD_REQUEST};V.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:Fe.HttpStatusCode.BAD_REQUEST};V.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:Fe.HttpStatusCode.BAD_REQUEST};V.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:Fe.HttpStatusCode.FORBIDDEN};V.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:Fe.HttpStatusCode.NOT_FOUND};V.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:Fe.HttpStatusCode.NOT_FOUND};V.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:Fe.HttpStatusCode.FORBIDDEN};V.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:Fe.HttpStatusCode.BAD_REQUEST};var Uyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:Fe.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");V.INVALID_TEMPLATE_REPOSITORY=Uyr;V.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:Fe.HttpStatusCode.NOT_FOUND};V.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:Fe.HttpStatusCode.BAD_REQUEST};V.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:Fe.HttpStatusCode.BAD_REQUEST};V.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALID_EMAIL_FORMAT={type:"https://zup.fail/invalid-email-format",title:"The email address provided is in an invalid email format",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:Fe.HttpStatusCode.FORBIDDEN};V.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:Fe.HttpStatusCode.FORBIDDEN};V.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:`Deployment is not working copy.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:Fe.HttpStatusCode.NOT_FOUND};V.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:Fe.HttpStatusCode.NOT_FOUND};V.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:Fe.HttpStatusCode.BAD_REQUEST};V.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:Fe.HttpStatusCode.NOT_FOUND};V.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:Fe.HttpStatusCode.BAD_REQUEST};V.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:Fe.HttpStatusCode.NOT_FOUND};V.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:Fe.HttpStatusCode.BAD_REQUEST};V.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:Fe.HttpStatusCode.FORBIDDEN};V.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:Fe.HttpStatusCode.BAD_REQUEST};var $yr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");V.USER_NO_ACCESS_GITHUB_REPO=$yr;var jyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");V.USER_NO_PULL_ACCESS_GITHUB_REPO=jyr;var Gyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");V.GITHUB_USER_NO_READ_ACCESS_REPO=Gyr;V.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:Fe.HttpStatusCode.BAD_REQUEST};V.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:Fe.HttpStatusCode.FORBIDDEN};var Hyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${qyr}' to add the repository.`,status:Fe.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");V.GITHUB_APP_NO_USER_ACCESS_=Hyr;V.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:Fe.HttpStatusCode.NOT_FOUND};var Vyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");V.USER_NO_ACCESS_BITBUCKET_REPO=Vyr;var zyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:Fe.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");V.USER_NO_ACCESS_GITLAB_REPO=zyr;V.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:Fe.HttpStatusCode.FORBIDDEN};V.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:Fe.HttpStatusCode.BAD_REQUEST};V.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:Fe.HttpStatusCode.BAD_REQUEST};V.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:Fe.HttpStatusCode.BAD_REQUEST};V.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:Fe.HttpStatusCode.BAD_REQUEST};var Kyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:Fe.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");V.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Kyr;var Wyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:Fe.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");V.GITHUB_REPOSITORY_NOT_FOUND=Wyr;V.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:Fe.HttpStatusCode.NOT_FOUND,detail:`The project does not have a GitHub integration configured.`};V.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Fe.HttpStatusCode.BAD_REQUEST};V.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:Fe.HttpStatusCode.FORBIDDEN};V.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:Fe.HttpStatusCode.FORBIDDEN};var Yyr=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");V.GITHUB_INTEGRATION_DUPLICATE_REPO=Yyr;var Xyr=a(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");V.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Xyr;var Jyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");V.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=Jyr;var Qyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");V.GIT_CREATE_PROJECT_WITH_INVALID_REPO=Qyr;var Zyr=a(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");V.GITHUB_INTEGRATION_INVALID_REPO=Zyr;V.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:Fe.HttpStatusCode.FORBIDDEN};V.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:Fe.HttpStatusCode.FORBIDDEN};var e_r=a(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");V.BITBUCKET_FAILED_DURING_REPO_CREATION=e_r;V.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:Fe.HttpStatusCode.FORBIDDEN};var t_r=a(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");V.GITLAB_FAILED_DURING_REPO_CREATION=t_r;var r_r=a(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");V.GITLAB_DUPLICATE_REPO=r_r;var n_r=a(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");V.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=n_r;var i_r=a(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");V.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=i_r;var s_r=a(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");V.GITLAB_ACCESS_LEVEL_CHECK_FAIL=s_r;V.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:Fe.HttpStatusCode.UNAUTHORIZED};V.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist.",status:Fe.HttpStatusCode.NOT_FOUND};V.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:Fe.HttpStatusCode.UNAUTHORIZED};V.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:Fe.HttpStatusCode.FORBIDDEN};V.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:Fe.HttpStatusCode.FORBIDDEN};V.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};var a_r=a(({sourceControlProvider:e})=>{const t=(0,kje.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${t}`,status:Fe.HttpStatusCode.UNAUTHORIZED}},"SOURCE_CONTROL_AUTHENTICATION_FAILED");V.SOURCE_CONTROL_AUTHENTICATION_FAILED=a_r;var o_r=a(({sourceControlProvider:e})=>{const t=(0,kje.getSourceControlProviderLabel)(e);return{type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${t} repository`,status:Fe.HttpStatusCode.NOT_FOUND}},"SOURCE_CONTROL_REPO_NOT_FOUND");V.SOURCE_CONTROL_REPO_NOT_FOUND=o_r;V.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:Fe.HttpStatusCode.BAD_REQUEST};var u_r=a(({repoURL:e,operation:t})=>{return{type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:`Verify your source control configuration and make sure you have been granted read & write access to the repository`,status:Fe.HttpStatusCode.FORBIDDEN}},"SOURCE_CONTROL_REPO_OPERATION_ERROR");V.SOURCE_CONTROL_REPO_OPERATION_ERROR=u_r;V.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:`You do not have write access to the repository, verify your source control access configuration and try again.`,detail:`Verify your source control configuration and make sure you have been granted access to the repository`,status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:Fe.HttpStatusCode.NOT_FOUND};V.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:Fe.HttpStatusCode.NOT_FOUND};V.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:Fe.HttpStatusCode.UNAUTHORIZED};V.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:Fe.HttpStatusCode.FORBIDDEN};V.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:Fe.HttpStatusCode.BAD_REQUEST};V.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:Fe.HttpStatusCode.BAD_REQUEST};V.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:Fe.HttpStatusCode.FORBIDDEN};V.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:Fe.HttpStatusCode.NOT_FOUND};V.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:Fe.HttpStatusCode.NOT_FOUND};V.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR};V.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:Fe.HttpStatusCode.FAILED_DEPENDENCY};V.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:Fe.HttpStatusCode.FAILED_DEPENDENCY};V.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:Fe.HttpStatusCode.FAILED_DEPENDENCY};V.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:Fe.HttpStatusCode.BAD_REQUEST};V.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:Fe.HttpStatusCode.BAD_REQUEST};V.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:Fe.HttpStatusCode.BAD_REQUEST};V.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:Fe.HttpStatusCode.NOT_FOUND};V.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:Fe.HttpStatusCode.BAD_REQUEST};V.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:Fe.HttpStatusCode.BAD_REQUEST};V.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:Fe.HttpStatusCode.BAD_REQUEST};V.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:Fe.HttpStatusCode.BAD_REQUEST};V.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:Fe.HttpStatusCode.BAD_REQUEST};V.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:Fe.HttpStatusCode.BAD_REQUEST};V.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:Fe.HttpStatusCode.BAD_REQUEST};V.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:Fe.HttpStatusCode.BAD_REQUEST};V.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:Fe.HttpStatusCode.BAD_REQUEST};V.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:Fe.HttpStatusCode.FORBIDDEN};V.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:Fe.HttpStatusCode.NOT_FOUND};var l_r=a(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify file on read-only environment`,detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");V.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=l_r;var c_r=a(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot modify files on read-only environment`,detail:`Cannot save files on a read-only environment. Read-only environments cannot be edited.`,status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");V.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=c_r;V.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:`Migrations can only run on working copies.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:`Runtime version is in an incorrect format.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:`No package.json file found.`,status:Fe.HttpStatusCode.NOT_FOUND};V.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:`Cannot read package.json file.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:`Cannot find source directory.`,status:Fe.HttpStatusCode.BAD_REQUEST};V.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:`Failed to download content from storage.`,status:Fe.HttpStatusCode.BAD_REQUEST};var d_r=a(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:`Cannot create directory on read-only environment`,detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:Fe.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");V.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=d_r;var p_r=a(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:Fe.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");V.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=p_r;var f_r=a(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");V.DIRECTORY_ALREADY_EXISTS=f_r;var m_r=a(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");V.DIRECTORY_DOES_NOT_EXIST=m_r;var h_r=a(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");V.DIRECTORY_OR_FILE_DOES_NOT_EXIST=h_r;var g_r=a(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");V.DIRECTORY_CREATION_FAILED=g_r;var y_r=a(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");V.FILE_RENAME_PATHS_MATCH=y_r;var __r=a(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");V.FILE_RENAME_CANNOT_CHANGE_EXTENSION=__r;var v_r=a(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");V.FILE_RENAME_FILE_ALREADY_EXISTS=v_r;var E_r=a(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");V.FILE_RENAME_FAILED=E_r;var b_r=a(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");V.FILE_WRITE_FAILED=b_r;var S_r=a(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");V.CANNOT_DELETE_ESSENTIAL_FILE=S_r;var A_r=a(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");V.CANNOT_DELETE_ESSENTIAL_DIRECTORY=A_r;var C_r=a(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:Fe.HttpStatusCode.BAD_REQUEST,detail:`Your project must have at least 1 OpenAPI file.`}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");V.CANNOT_DELETE_SOLE_OPEN_API_FILE=C_r;var w_r=a(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");V.FILE_DELETE_FAILED=w_r;var T_r=a(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");V.DIRECTORY_DELETE_FAILED=T_r;V.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:Fe.HttpStatusCode.CONFLICT};V.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:Fe.HttpStatusCode.NOT_FOUND};V.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:Fe.HttpStatusCode.BAD_REQUEST};V.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:Fe.HttpStatusCode.INTERNAL_SERVER_ERROR}});var Fje=y(Uc=>{"use strict";var x_r=Uc&&Uc.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var R_r=Uc&&Uc.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var O_r=Uc&&Uc.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))x_r(t,e,r)}R_r(t,e);return t};Object.defineProperty(Uc,"__esModule",{value:true});Uc.ApiNotFoundError=Uc.ApiError=Uc.Problems=void 0;var Lje=O_r(Dje());Uc.Problems=Lje;var d$=class extends Error{static{a(this,"ApiError")}type;status;detail;instance;constructor(t){super(t.title);if(!t.type.startsWith("https://zup.fail/")){throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`)}this.name="ApiProblemError";this.type=t.type;this.status=t.status;this.detail=t.detail;this.instance=t.instance}};Uc.ApiError=d$;var ice=class extends d${static{a(this,"ApiNotFoundError")}constructor(t={}){super({...t,...Lje.NOT_FOUND});this.name="ApiNotFoundProblemError"}};Uc.ApiNotFoundError=ice});var $c=y(y1=>{"use strict";var P_r=y1&&y1.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var N_r=y1&&y1.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))P_r(t,e,r)};Object.defineProperty(y1,"__esModule",{value:true});y1.HttpStatusCode=void 0;N_r(Fje(),y1);var I_r=nce();Object.defineProperty(y1,"HttpStatusCode",{enumerable:true,get:function(){return I_r.HttpStatusCode}})});var ace=y(p$=>{"use strict";Object.defineProperty(p$,"__esModule",{value:true});p$.CommonAuth=void 0;var E_=$c();var k_r=["google-oauth2|106231436550039770264","google-oauth2|113609898431445637338","google-oauth2|115413213714061429608","google-oauth2|105283806895031006146","google-oauth2|116604562105669742663"];var sce=class e{static{a(this,"CommonAuth")}static DEPLOYER_USER_SUB="deployer-app@zuplo";isZuploAdmin(t){return k_r.includes(t)}isDeployerServiceAccount(t){return e.DEPLOYER_USER_SUB===t}static isAuthorizedSub(t,r){if(typeof r==="string"){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}if(r instanceof Buffer){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}try{const n=t.includes(r.sub);if(!n){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}}catch(n){throw new E_.ApiError(E_.Problems.API_USER_NO_ACCESS)}}};p$.CommonAuth=sce});var Bje=y(f$=>{"use strict";Object.defineProperty(f$,"__esModule",{value:true});f$.hasBlockedNotifications=void 0;var D_r=["chocolate_bold_silverfish"];function L_r(e){return D_r.includes(e)}a(L_r,"hasBlockedNotifications");f$.hasBlockedNotifications=L_r});var Mje=y(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:true});jc.BuildIssueError=jc.WARNING_SEVERITY=jc.ERROR_SEVERITY=jc.FAILURE_STATUS=jc.WARNING_STATUS=jc.GOOD_STATUS=void 0;jc.GOOD_STATUS="Good";jc.WARNING_STATUS="Warnings";jc.FAILURE_STATUS="Failed";jc.ERROR_SEVERITY="error";jc.WARNING_SEVERITY="warning";var oce=class extends Error{static{a(this,"BuildIssueError")}issue;constructor(t){super(t.message);this.issue=t}};jc.BuildIssueError=oce});var qje=y(m$=>{"use strict";Object.defineProperty(m$,"__esModule",{value:true});m$.COMPATIBILITY_FLAG_MAPPINGS=void 0;m$.COMPATIBILITY_FLAG_MAPPINGS=Object.freeze({none:{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2023-03-14":{runOutboundPoliciesOnHandlerOnAllStatuses:false,doNotRunHooksOnSystemRoutes:false,removeAllVendorHeadersExceptListed:false},"2024-01-15":{runOutboundPoliciesOnHandlerOnAllStatuses:true,doNotRunHooksOnSystemRoutes:true,removeAllVendorHeadersExceptListed:true}})});var Uje=y((Ias,F_r)=>{F_r.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/zuplo.config.json",title:"Zuplo Config",description:"",type:"object",required:[],additionalProperties:false,properties:{version:{description:"The version of the configuration",type:"number",enum:[1]},project:{type:"string"},compatibilityDate:{description:"The compatibility date on which to run the gateway",type:"string",title:"Compatibility Date",default:"2024-01-15",enum:["2023-03-14","2024-01-15"]}}}});var $je=y(h$=>{"use strict";Object.defineProperty(h$,"__esModule",{value:true});h$.VALID_COMPATIBILITY_DATES=void 0;h$.VALID_COMPATIBILITY_DATES=Object.freeze(["2023-03-14","2024-01-15"])});var jje=y(b_=>{"use strict";var B_r=b_&&b_.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(b_,"__esModule",{value:true});b_.DEFAULT_COMPATIBILITY_DATE=b_.VALID_COMPATIBILITY_DATES=void 0;var M_r=B_r(Uje());var q_r=$je();Object.defineProperty(b_,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return q_r.VALID_COMPATIBILITY_DATES}});b_.DEFAULT_COMPATIBILITY_DATE=M_r.default.properties.compatibilityDate.default});var Gje=y(g$=>{"use strict";Object.defineProperty(g$,"__esModule",{value:true});g$.FeatureFlags=void 0;g$.FeatureFlags=Object.freeze({esmWorker:(e,t)=>({flagName:"ZUPLO_ESM_WORKER",defaultValue:false,accountName:e,projectName:t}),FS_ACCOUNT_NAME_PATH:"FS_ACCOUNT_NAME_PATH"})});var Hje=y(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:true});S_.decrypt=S_.encrypt=S_.signString=void 0;var Jw=require("crypto");function U_r(e,t){return(0,Jw.createHmac)("sha256",t).update(e).digest("hex")}a(U_r,"signString");S_.signString=U_r;var uce={AUTH_TAG_BYTE_LEN:16,IV_BYTE_LEN:12};var $_r=a(()=>(0,Jw.randomBytes)(uce.IV_BYTE_LEN),"getIV");function j_r(e,t){if(e===null){return null}const r=(0,Jw.createHash)("sha256").update(String(t)).digest("base64").substring(0,32);const n=$_r();const i=(0,Jw.createCipheriv)("aes-256-gcm",r,n,{authTagLength:uce.AUTH_TAG_BYTE_LEN});let s=i.update(e);s=Buffer.concat([s,i.final()]);return Buffer.concat([n,s,i.getAuthTag()]).toString("hex")}a(j_r,"encrypt");S_.encrypt=j_r;function G_r(e,t){if(!e){return null}const r=Buffer.from(t);const n=(0,Jw.createHash)("sha256").update(String(r)).digest("base64").substring(0,32);const i=Buffer.from(e,"hex");const s=i.slice(-16);const o=i.slice(0,12);const u=i.slice(12,-16);const l=(0,Jw.createDecipheriv)("aes-256-gcm",n,o,{authTagLength:uce.AUTH_TAG_BYTE_LEN});l.setAuthTag(s);const c=l.update(u);return Buffer.concat([c,l.final()]).toString("utf-8")}a(G_r,"decrypt");S_.decrypt=G_r});var Vje=y(y$=>{"use strict";Object.defineProperty(y$,"__esModule",{value:true});y$.getCurrentUtcDateTime=void 0;function H_r(){const e={year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:true,timeZone:"UTC"};const t=new Date().toLocaleString("en-US",e);return t}a(H_r,"getCurrentUtcDateTime");y$.getCurrentUtcDateTime=H_r});var lce=y(_$=>{"use strict";Object.defineProperty(_$,"__esModule",{value:true});_$.DeploymentLogState=void 0;var zje;(function(e){e["ERROR"]="ERROR";e["IN_PROGRESS"]="IN_PROGRESS";e["SUCCESS"]="SUCCESS"})(zje||(_$.DeploymentLogState=zje={}))});var cce=y(Kje=>{"use strict";Object.defineProperty(Kje,"__esModule",{value:true})});var Yje=y(Wje=>{"use strict";Object.defineProperty(Wje,"__esModule",{value:true})});var Xje=y(v$=>{"use strict";Object.defineProperty(v$,"__esModule",{value:true});v$.MARKDOWN_FRONTMATTER_KEYS=void 0;v$.MARKDOWN_FRONTMATTER_KEYS=["sidebar_label"]});var Qje=y(Jje=>{"use strict";Object.defineProperty(Jje,"__esModule",{value:true})});var Zje=y(Gh=>{"use strict";var V_r=Gh&&Gh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var E$=Gh&&Gh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))V_r(t,e,r)};Object.defineProperty(Gh,"__esModule",{value:true});E$(cce(),Gh);E$(Yje(),Gh);E$(Xje(),Gh);E$(Qje(),Gh)});var b$=y(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:true});Hh.getLoggerContext=Hh.requestIdGenerator=Hh.REQUEST_ID_HEADER=Hh.LEGACY_REQUEST_ID_HEADER=void 0;var z_r=require("crypto");Hh.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Hh.REQUEST_ID_HEADER="zp-rid";var K_r=a(e=>{const t=e.headers["zuplo-request-id"];const r=e.headers["X-GitHub-Delivery"];if(t){const n=t;return`${n}`}else if(r){return`${r}`}return(0,z_r.randomUUID)()},"requestIdGenerator");Hh.requestIdGenerator=K_r;function W_r(e){const t=e.raw.url??"";const r={};try{const n=e.headers["zuplo-user"]??e.user?.sub;if(n){r.userSub=`${n}`}const i=t.match(/(deployments)\/([a-zA-Z-0-9]*)/);if(i&&i!==null&&i.length>=2){r.deployment=i[2]}const s=t.match(/(accounts)\/([a-zA-Z-0-9]*)/);if(s&&s!==null&&s.length>=2){r.account=s[2]}const o=t.match(/(projects)\/([a-zA-Z-0-9]*)/);if(o&&o!==null&&o.length>=2){r.project=o[2]}}catch(n){}return r}a(W_r,"getLoggerContext");Hh.getLoggerContext=W_r});var dce=y(Qw=>{"use strict";var Y_r=Qw&&Qw.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Qw,"__esModule",{value:true});Qw.errorHandler=void 0;var kp=$c();var X_r=Y_r(Kd());var eGe=b$();function J_r(e,t,r){let n=500;let i;if(e instanceof kp.ApiError){n=e.status;i={type:e.type,title:e.message,status:e.status,detail:e.detail,instance:e.instance}}else if(typeof e==="object"&&"validation"in e&&"validationContext"in e){n=kp.HttpStatusCode.BAD_REQUEST;i={...kp.Problems.BAD_REQUEST,detail:`An error occurred when validating the ${e.validationContext}.`,errors:e.validation}}else if(typeof e==="object"&&"code"in e&&e.code==="FST_ERR_NOT_FOUND"){n=404;i=kp.Problems.NOT_FOUND}else if(typeof e==="object"&&"code"in e&&typeof e.code==="string"&&["FST_ERR_CTP_INVALID_TYPE","FST_ERR_CTP_EMPTY_TYPE","FST_ERR_CTP_BODY_TOO_LARGE","FST_ERR_CTP_INVALID_MEDIA_TYPE","FST_ERR_CTP_INVALID_CONTENT_LENGTH","FST_ERR_CTP_EMPTY_JSON_BODY","FST_ERR_BAD_URL","FST_ERR_INVALID_URL"].includes(e.code)){n=kp.HttpStatusCode.BAD_REQUEST;i={...kp.Problems.BAD_REQUEST,detail:e.message}}else{let o;if(!r.statusCode||r.statusCode===200){if(typeof e==="object"&&"statusCode"in e&&typeof e.statusCode==="number"){o=e.statusCode}else if(typeof e==="object"&&"status"in e&&typeof e.status==="number"){o=e.status}n=o&&o>=400?o:500}else{n=r.statusCode}i=Q_r(n);if(X_r.default.NODE_ENV!=="production"){if(typeof e==="object"&&"message"in e){i.detail=e.message}else if(typeof e==="string"){i.detail=e}}}i.trace={timestamp:new Date().toJSON(),requestId:t.headers[eGe.REQUEST_ID_HEADER]??t.headers[eGe.LEGACY_REQUEST_ID_HEADER]};if(n<500){r.log.warn({res:r,err:e},e&&e.message)}else{r.log.error({req:t,res:r,err:e},e&&e.message)}const s=JSON.stringify(i,null,2);return r.status(n).header("content-type","application/json").send(s)}a(J_r,"errorHandler");Qw.errorHandler=J_r;function Q_r(e){if(e===401){return kp.Problems.UNAUTHORIZED}else if(e===403){return kp.Problems.FORBIDDEN}else if(e===404){return kp.Problems.NOT_FOUND}else if(e===405){return kp.Problems.METHOD_NOT_ALLOWED}else if(e<500&&e>=400){return kp.Problems.BAD_REQUEST}return kp.Problems.INTERNAL_SERVER_ERROR}a(Q_r,"getProblemFromStatus")});var rGe=y((Xas,pce)=>{"use strict";var Z_r=/at\s{1}(?:.*\.)?plugin\s{1}.*\n\s*(.*)/;var evr=/(\w*(\.\w*)*)\..*/;pce.exports=a(function e(t){if(t.name.length>0)return t.name;const r=Error.stackTraceLimit;Error.stackTraceLimit=10;try{throw new Error("anonymous function")}catch(n){Error.stackTraceLimit=r;return tGe(n.stack)}},"getPluginName");function tGe(e){const t=e.match(Z_r);return t?t[1].split(/[/\\]/).slice(-1)[0].match(evr)[1]:"anonymous"}a(tGe,"extractPluginName");pce.exports.extractPluginName=tGe});var iGe=y((Qas,nGe)=>{"use strict";nGe.exports=a(function e(t){if(t[0]==="@"){t=t.slice(1).replace("/","-")}const r=t.replace(/-(.)/g,function(n,i){return i.toUpperCase()});return r},"toCamelCase")});var D2=y((eos,S$)=>{"use strict";var tvr=rGe();var rvr=iGe();var nvr=0;function fce(e,t={}){let r=false;if(typeof e.default!=="undefined"){e=e.default}if(typeof e!=="function"){throw new TypeError(`fastify-plugin expects a function, instead got a '${typeof e}'`)}if(typeof t==="string"){t={fastify:t}}if(typeof t!=="object"||Array.isArray(t)||t===null){throw new TypeError("The options object should be an object")}if(t.fastify!==void 0&&typeof t.fastify!=="string"){throw new TypeError(`fastify-plugin expects a version string, instead got '${typeof t.fastify}'`)}if(!t.name){r=true;t.name=tvr(e)+"-auto-"+nvr++}e[Symbol.for("skip-override")]=t.encapsulate!==true;e[Symbol.for("fastify.display-name")]=t.name;e[Symbol.for("plugin-meta")]=t;if(!e.default){e.default=e}const n=rvr(t.name);if(!r&&!e[n]){e[n]=e}return e}a(fce,"plugin");S$.exports=fce;S$.exports.default=fce;S$.exports.fastifyPlugin=fce});var aGe=y(Zw=>{"use strict";var ivr=Zw&&Zw.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Zw,"__esModule",{value:true});Zw.apiKeyAuthPlugin=void 0;var Vh=$c();var svr=ivr(D2());var avr="https://apikey.zuplo.com";var sGe=`Bearer `;Zw.apiKeyAuthPlugin=(0,svr.default)(async(e,t)=>{e.decorate("validateApiKey",async function(r){const{authorization:n}=r.headers;if(!n){throw new Vh.ApiError({...Vh.Problems.UNAUTHORIZED,detail:`No Authorization Header`})}if(!n.toLowerCase().startsWith(sGe)){throw new Vh.ApiError({...Vh.Problems.UNAUTHORIZED,detail:`Invalid Authorization Scheme`})}const i=n.substring(sGe.length);if(!i||i===""){throw new Vh.ApiError({...Vh.Problems.UNAUTHORIZED,detail:`No key present`})}const s={key:i};const o=await fetch(`${avr}/v1/$validate/${t.bucketName}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(o.status===401){throw new Vh.ApiError(Vh.Problems.UNAUTHORIZED)}const u=await o.json();if(t.allowedSubs){if(!t.allowedSubs.includes(u.name)){throw new Vh.ApiError(Vh.Problems.UNAUTHORIZED)}}r.user={sub:u.name,metadata:u.metadata}})},{name:"api-key-auth"})});var oGe=y(eT=>{"use strict";var ovr=eT&&eT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(eT,"__esModule",{value:true});eT.ensureZuploAdminPlugin=void 0;var A$=$c();var uvr=ovr(D2());var lvr=ace();eT.ensureZuploAdminPlugin=(0,uvr.default)(async function(e){const t=new lvr.CommonAuth;e.decorate("ensureZuploAdmin",async function(r){if(!r.user){r.log.error(`Bad request, no user on request`);throw new A$.ApiError(A$.Problems.UNAUTHORIZED)}const n=r.user.sub;const i=n&&t.isZuploAdmin(n);if(!i){r.log.error(`User is not an admin`);throw new A$.ApiError(A$.Problems.FORBIDDEN)}})},{name:"ensure-zuplo-admin-plugin"})});var lGe=y(tT=>{"use strict";var cvr=tT&&tT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(tT,"__esModule",{value:true});tT.ensureZuploUserPlugin=void 0;var uGe=$c();var dvr=cvr(D2());tT.ensureZuploUserPlugin=(0,dvr.default)(async e=>{e.decorate("ensureZuploUser",async function(t){const r=t.headers["zuplo-user"];if(!r||typeof r!=="string"){t.log.error("The 'zuplo-user' header is missing");throw new uGe.ApiError(uGe.Problems.UNAUTHORIZED)}t.user={sub:r}})},{name:"ensure-zuplo-user-plugin"})});var pGe=y(rT=>{"use strict";var pvr=rT&&rT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rT,"__esModule",{value:true});rT.featureFlagsPlugin=void 0;var fvr=pvr(D2());var mce;async function cGe(e,t){try{const r=await mce?.variation(t.flagName,{kind:t.kind,key:t.key},t.defaultValue);if(r===void 0){return t.defaultValue}else{return r}}catch(r){e.log.warn(`Failed to query Launch Darkly flag ${t.flagName}`);e.log.error(r)}return t.defaultValue}a(cGe,"getFlagValue");function dGe(){this.log.error("Call to feature flag getFlagValue function on uninitialized flag plugin");return Promise.resolve(false)}a(dGe,"fallback");rT.featureFlagsPlugin=(0,fvr.default)(async(e,t)=>{try{if(typeof t.key!=="string"||!t.key||!t.client){e.decorateRequest("getFlagValue",dGe);e.decorateRequest("getFlagValueByUser",dGe);return}mce=t.client;e.log.info("Launch Darkly SDK successfully initialized!");e.decorate("flags",mce);e.decorateRequest("getFlagValue",async function(r){let n;let i;if("projectName"in r){n="project";i=`${r.accountName}/${r.projectName}`}else{n="account";i=r.accountName}const s={flagName:r.flagName,kind:n,key:i,defaultValue:r.defaultValue};return cGe(this,s)});e.decorateRequest("getFlagValueByUser",async function(r,n,i){const s={flagName:r,kind:"user",key:n,defaultValue:i};return cGe(this,s)})}catch(r){e.log.warn("Launch Darkly failed to initialize");e.log.error(r)}},{name:"feature-flag-plugin"})});var hce=y(nT=>{"use strict";var mvr=nT&&nT.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(nT,"__esModule",{value:true});nT.getUserSubPlugin=void 0;var fGe=$c();var hvr=mvr(D2());nT.getUserSubPlugin=(0,hvr.default)(async e=>{e.decorateRequest("getUserSub",function(){const t=this.user?.sub;if(!t){this.log.error("Could not determine the user sub");throw new fGe.ApiError(fGe.Problems.UNAUTHORIZED)}return t})},{name:"get-user-sub-plugin"})});var gce=y(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:true});Dp.getUserSubPlugin=Dp.featureFlagsPlugin=Dp.ensureZuploUserPlugin=Dp.ensureZuploAdminPlugin=Dp.apiKeyAuthPlugin=void 0;var gvr=aGe();Object.defineProperty(Dp,"apiKeyAuthPlugin",{enumerable:true,get:function(){return gvr.apiKeyAuthPlugin}});var yvr=oGe();Object.defineProperty(Dp,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return yvr.ensureZuploAdminPlugin}});var _vr=lGe();Object.defineProperty(Dp,"ensureZuploUserPlugin",{enumerable:true,get:function(){return _vr.ensureZuploUserPlugin}});var vvr=pGe();Object.defineProperty(Dp,"featureFlagsPlugin",{enumerable:true,get:function(){return vvr.featureFlagsPlugin}});var Evr=hce();Object.defineProperty(Dp,"getUserSubPlugin",{enumerable:true,get:function(){return Evr.getUserSubPlugin}})});var ls=y(Fu=>{"use strict";var yce=Symbol.for("yaml.alias");var mGe=Symbol.for("yaml.document");var C$=Symbol.for("yaml.map");var hGe=Symbol.for("yaml.pair");var _ce=Symbol.for("yaml.scalar");var w$=Symbol.for("yaml.seq");var _1=Symbol.for("yaml.node.type");var bvr=a(e=>!!e&&typeof e==="object"&&e[_1]===yce,"isAlias");var Svr=a(e=>!!e&&typeof e==="object"&&e[_1]===mGe,"isDocument");var Avr=a(e=>!!e&&typeof e==="object"&&e[_1]===C$,"isMap");var Cvr=a(e=>!!e&&typeof e==="object"&&e[_1]===hGe,"isPair");var gGe=a(e=>!!e&&typeof e==="object"&&e[_1]===_ce,"isScalar");var wvr=a(e=>!!e&&typeof e==="object"&&e[_1]===w$,"isSeq");function yGe(e){if(e&&typeof e==="object")switch(e[_1]){case C$:case w$:return true}return false}a(yGe,"isCollection");function Tvr(e){if(e&&typeof e==="object")switch(e[_1]){case yce:case C$:case _ce:case w$:return true}return false}a(Tvr,"isNode");var xvr=a(e=>(gGe(e)||yGe(e))&&!!e.anchor,"hasAnchor");Fu.ALIAS=yce;Fu.DOC=mGe;Fu.MAP=C$;Fu.NODE_TYPE=_1;Fu.PAIR=hGe;Fu.SCALAR=_ce;Fu.SEQ=w$;Fu.hasAnchor=xvr;Fu.isAlias=bvr;Fu.isCollection=yGe;Fu.isDocument=Svr;Fu.isMap=Avr;Fu.isNode=Tvr;Fu.isPair=Cvr;Fu.isScalar=gGe;Fu.isSeq=wvr});var RD=y(vce=>{"use strict";var Jo=ls();var Gc=Symbol("break visit");var _Ge=Symbol("skip children");var zh=Symbol("remove node");function T$(e,t){const r=vGe(t);if(Jo.isDocument(e)){const n=iT(null,e.contents,r,Object.freeze([e]));if(n===zh)e.contents=null}else iT(null,e,r,Object.freeze([]))}a(T$,"visit");T$.BREAK=Gc;T$.SKIP=_Ge;T$.REMOVE=zh;function iT(e,t,r,n){const i=EGe(e,t,r,n);if(Jo.isNode(i)||Jo.isPair(i)){bGe(e,n,i);return iT(e,i,r,n)}if(typeof i!=="symbol"){if(Jo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=iT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===Gc)return Gc;else if(o===zh){t.items.splice(s,1);s-=1}}}else if(Jo.isPair(t)){n=Object.freeze(n.concat(t));const s=iT("key",t.key,r,n);if(s===Gc)return Gc;else if(s===zh)t.key=null;const o=iT("value",t.value,r,n);if(o===Gc)return Gc;else if(o===zh)t.value=null}}return i}a(iT,"visit_");async function x$(e,t){const r=vGe(t);if(Jo.isDocument(e)){const n=await sT(null,e.contents,r,Object.freeze([e]));if(n===zh)e.contents=null}else await sT(null,e,r,Object.freeze([]))}a(x$,"visitAsync");x$.BREAK=Gc;x$.SKIP=_Ge;x$.REMOVE=zh;async function sT(e,t,r,n){const i=await EGe(e,t,r,n);if(Jo.isNode(i)||Jo.isPair(i)){bGe(e,n,i);return sT(e,i,r,n)}if(typeof i!=="symbol"){if(Jo.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){const o=await sT(s,t.items[s],r,n);if(typeof o==="number")s=o-1;else if(o===Gc)return Gc;else if(o===zh){t.items.splice(s,1);s-=1}}}else if(Jo.isPair(t)){n=Object.freeze(n.concat(t));const s=await sT("key",t.key,r,n);if(s===Gc)return Gc;else if(s===zh)t.key=null;const o=await sT("value",t.value,r,n);if(o===Gc)return Gc;else if(o===zh)t.value=null}}return i}a(sT,"visitAsync_");function vGe(e){if(typeof e==="object"&&(e.Collection||e.Node||e.Value)){return Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e)}return e}a(vGe,"initVisitor");function EGe(e,t,r,n){if(typeof r==="function")return r(e,t,n);if(Jo.isMap(t))return r.Map?.(e,t,n);if(Jo.isSeq(t))return r.Seq?.(e,t,n);if(Jo.isPair(t))return r.Pair?.(e,t,n);if(Jo.isScalar(t))return r.Scalar?.(e,t,n);if(Jo.isAlias(t))return r.Alias?.(e,t,n);return void 0}a(EGe,"callVisitor");function bGe(e,t,r){const n=t[t.length-1];if(Jo.isCollection(n)){n.items[e]=r}else if(Jo.isPair(n)){if(e==="key")n.key=r;else n.value=r}else if(Jo.isDocument(n)){n.contents=r}else{const i=Jo.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}a(bGe,"replaceNode");vce.visit=T$;vce.visitAsync=x$});var Ece=y(AGe=>{"use strict";var SGe=ls();var Rvr=RD();var Ovr={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};var Pvr=a(e=>e.replace(/[!,[\]{}]/g,t=>Ovr[t]),"escapeTagName");var OD=class e{static{a(this,"Directives")}constructor(t,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},e.defaultYaml,t);this.tags=Object.assign({},e.defaultTags,r)}clone(){const t=new e(this.yaml,this.tags);t.docStart=this.docStart;return t}atDocument(){const t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){if(this.atNextDocument){this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},e.defaultTags);this.atNextDocument=false}const n=t.trim().split(/[ \t]+/);const i=n.shift();switch(i){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[s,o]=n;this.tags[s]=o;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[s]=n;if(s==="1.1"||s==="1.2"){this.yaml.version=s;return true}else{const o=/^\d+\.\d+$/.test(s);r(6,`Unsupported YAML version ${s}`,o);return false}}default:r(0,`Unknown directive ${i}`,true);return false}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!"){r(`Not a valid tag: ${t}`);return null}if(t[1]==="<"){const o=t.slice(2,-1);if(o==="!"||o==="!!"){r(`Verbatim tags aren't resolved, so ${t} is invalid.`);return null}if(t[t.length-1]!==">")r("Verbatim tags must end with a >");return o}const[,n,i]=t.match(/^(.*!)([^!]*)$/s);if(!i)r(`The ${t} tag has no suffix`);const s=this.tags[n];if(s){try{return s+decodeURIComponent(i)}catch(o){r(String(o));return null}}if(n==="!")return t;r(`Could not resolve tag: ${t}`);return null}tagString(t){for(const[r,n]of Object.entries(this.tags)){if(t.startsWith(n))return r+Pvr(t.substring(n.length))}return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let i;if(t&&n.length>0&&SGe.isNode(t.contents)){const s={};Rvr.visit(t.contents,(o,u)=>{if(SGe.isNode(u)&&u.tag)s[u.tag]=true});i=Object.keys(s)}else i=[];for(const[s,o]of n){if(s==="!!"&&o==="tag:yaml.org,2002:")continue;if(!t||i.some(u=>u.startsWith(o)))r.push(`%TAG ${s} ${o}`)}return r.join("\n")}};OD.defaultYaml={explicit:false,version:"1.2"};OD.defaultTags={"!!":"tag:yaml.org,2002:"};AGe.Directives=OD});var R$=y(PD=>{"use strict";var CGe=ls();var Nvr=RD();function Ivr(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const r=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(r)}return true}a(Ivr,"anchorIsValid");function wGe(e){const t=new Set;Nvr.visit(e,{Value(r,n){if(n.anchor)t.add(n.anchor)}});return t}a(wGe,"anchorNames");function TGe(e,t){for(let r=1;true;++r){const n=`${e}${r}`;if(!t.has(n))return n}}a(TGe,"findNewAnchor");function kvr(e,t){const r=[];const n=new Map;let i=null;return{onAnchor:s=>{r.push(s);if(!i)i=wGe(e);const o=TGe(t,i);i.add(o);return o},setAnchors:()=>{for(const s of r){const o=n.get(s);if(typeof o==="object"&&o.anchor&&(CGe.isScalar(o.node)||CGe.isCollection(o.node))){o.node.anchor=o.anchor}else{const u=new Error("Failed to resolve repeated object (this should not happen)");u.source=s;throw u}}},sourceObjects:n}}a(kvr,"createNodeAnchors");PD.anchorIsValid=Ivr;PD.anchorNames=wGe;PD.createNodeAnchors=kvr;PD.findNewAnchor=TGe});var bce=y(xGe=>{"use strict";function ND(e,t,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let i=0,s=n.length;i<s;++i){const o=n[i];const u=ND(e,n,String(i),o);if(u===void 0)delete n[i];else if(u!==o)n[i]=u}}else if(n instanceof Map){for(const i of Array.from(n.keys())){const s=n.get(i);const o=ND(e,n,i,s);if(o===void 0)n.delete(i);else if(o!==s)n.set(i,o)}}else if(n instanceof Set){for(const i of Array.from(n)){const s=ND(e,n,i,i);if(s===void 0)n.delete(i);else if(s!==i){n.delete(i);n.add(s)}}}else{for(const[i,s]of Object.entries(n)){const o=ND(e,n,i,s);if(o===void 0)delete n[i];else if(o!==s)n[i]=o}}}return e.call(t,r,n)}a(ND,"applyReviver");xGe.applyReviver=ND});var A_=y(OGe=>{"use strict";var Dvr=ls();function RGe(e,t,r){if(Array.isArray(e))return e.map((n,i)=>RGe(n,String(i),r));if(e&&typeof e.toJSON==="function"){if(!r||!Dvr.hasAnchor(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n);r.onCreate=s=>{n.res=s;delete r.onCreate};const i=e.toJSON(t,r);if(r.onCreate)r.onCreate(i);return i}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}a(RGe,"toJS");OGe.toJS=RGe});var O$=y(NGe=>{"use strict";var Lvr=bce();var PGe=ls();var Fvr=A_();var Sce=class{static{a(this,"NodeBase")}constructor(t){Object.defineProperty(this,PGe.NODE_TYPE,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)t.range=this.range.slice();return t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!PGe.isDocument(t))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:t,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=Fvr.toJS(this,"",o);if(typeof i==="function")for(const{count:l,res:c}of o.anchors.values())i(c,l);return typeof s==="function"?Lvr.applyReviver(s,{"":u},"",u):u}};NGe.NodeBase=Sce});var ID=y(kGe=>{"use strict";var Bvr=R$();var IGe=RD();var P$=ls();var Mvr=O$();var qvr=A_();var Ace=class extends Mvr.NodeBase{static{a(this,"Alias")}constructor(t){super(P$.ALIAS);this.source=t;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let r=void 0;IGe.visit(t,{Node:(n,i)=>{if(i===this)return IGe.visit.BREAK;if(i.anchor===this.source)r=i}});return r}toJSON(t,r){if(!r)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:s}=r;const o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let u=n.get(o);if(!u){qvr.toJS(o,null,r);u=n.get(o)}if(!u||u.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0){u.count+=1;if(u.aliasCount===0)u.aliasCount=N$(i,o,n);if(u.count*u.aliasCount>s){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}}return u.res}toString(t,r,n){const i=`*${this.source}`;if(t){Bvr.anchorIsValid(this.source);if(t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}};function N$(e,t,r){if(P$.isAlias(t)){const n=t.resolve(e);const i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(P$.isCollection(t)){let n=0;for(const i of t.items){const s=N$(e,i,r);if(s>n)n=s}return n}else if(P$.isPair(t)){const n=N$(e,t.key,r);const i=N$(e,t.value,r);return Math.max(n,i)}return 1}a(N$,"getAliasCount");kGe.Alias=Ace});var xo=y(Cce=>{"use strict";var Uvr=ls();var $vr=O$();var jvr=A_();var Gvr=a(e=>!e||typeof e!=="function"&&typeof e!=="object","isScalarValue");var C_=class extends $vr.NodeBase{static{a(this,"Scalar")}constructor(t){super(Uvr.SCALAR);this.value=t}toJSON(t,r){return r?.keep?this.value:jvr.toJS(this.value,t,r)}toString(){return String(this.value)}};C_.BLOCK_FOLDED="BLOCK_FOLDED";C_.BLOCK_LITERAL="BLOCK_LITERAL";C_.PLAIN="PLAIN";C_.QUOTE_DOUBLE="QUOTE_DOUBLE";C_.QUOTE_SINGLE="QUOTE_SINGLE";Cce.Scalar=C_;Cce.isScalarValue=Gvr});var kD=y(LGe=>{"use strict";var Hvr=ID();var L2=ls();var DGe=xo();var Vvr="tag:yaml.org,2002:";function zvr(e,t,r){if(t){const n=r.filter(s=>s.tag===t);const i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return r.find(n=>n.identify?.(e)&&!n.format)}a(zvr,"findTagObject");function Kvr(e,t,r){if(L2.isDocument(e))e=e.contents;if(L2.isNode(e))return e;if(L2.isPair(e)){const p=r.schema[L2.MAP].createNode?.(r.schema,null,r);p.items.push(e);return p}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:o,sourceObjects:u}=r;let l=void 0;if(n&&e&&typeof e==="object"){l=u.get(e);if(l){if(!l.anchor)l.anchor=i(e);return new Hvr.Alias(l.anchor)}else{l={anchor:null,node:null};u.set(e,l)}}if(t?.startsWith("!!"))t=Vvr+t.slice(2);let c=zvr(e,t,o.tags);if(!c){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const p=new DGe.Scalar(e);if(l)l.node=p;return p}c=e instanceof Map?o[L2.MAP]:Symbol.iterator in Object(e)?o[L2.SEQ]:o[L2.MAP]}if(s){s(c);delete r.onTagObj}const d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from==="function"?c.nodeClass.from(r.schema,e,r):new DGe.Scalar(e);if(t)d.tag=t;else if(!c.default)d.tag=c.tag;if(l)l.node=d;return d}a(Kvr,"createNode");LGe.createNode=Kvr});var DD=y(k$=>{"use strict";var Wvr=kD();var Kh=ls();var Yvr=O$();function wce(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){const s=t[i];if(typeof s==="number"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=n;n=o}else{n=new Map([[s,n]])}}return Wvr.createNode(n,void 0,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}a(wce,"collectionFromPath");var FGe=a(e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done,"isEmptyPath");var I$=class extends Yvr.NodeBase{static{a(this,"Collection")}constructor(t,r){super(t);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(t)r.schema=t;r.items=r.items.map(n=>Kh.isNode(n)||Kh.isPair(n)?n.clone(t):n);if(this.range)r.range=this.range.slice();return r}addIn(t,r){if(FGe(t))this.add(r);else{const[n,...i]=t;const s=this.get(n,true);if(Kh.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,wce(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(t){const[r,...n]=t;if(n.length===0)return this.delete(r);const i=this.get(r,true);if(Kh.isCollection(i))return i.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){const[n,...i]=t;const s=this.get(n,true);if(i.length===0)return!r&&Kh.isScalar(s)?s.value:s;else return Kh.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!Kh.isPair(r))return false;const n=r.value;return n==null||t&&Kh.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){const[r,...n]=t;if(n.length===0)return this.has(r);const i=this.get(r,true);return Kh.isCollection(i)?i.hasIn(n):false}setIn(t,r){const[n,...i]=t;if(i.length===0){this.set(n,r)}else{const s=this.get(n,true);if(Kh.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,wce(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};I$.maxFlowStringSingleLineLength=60;k$.Collection=I$;k$.collectionFromPath=wce;k$.isEmptyPath=FGe});var LD=y(D$=>{"use strict";var Xvr=a(e=>e.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function Tce(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}a(Tce,"indentComment");var Jvr=a((e,t,r)=>e.endsWith("\n")?Tce(r,t):r.includes("\n")?"\n"+Tce(r,t):(e.endsWith(" ")?"":" ")+r,"lineComment");D$.indentComment=Tce;D$.lineComment=Jvr;D$.stringifyComment=Xvr});var MGe=y(FD=>{"use strict";var Qvr="flow";var xce="block";var L$="quoted";function Zvr(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:u}={}){if(!i||i<0)return e;const l=Math.max(1+s,1+i-t.length);if(e.length<=l)return e;const c=[];const d={};let p=i-t.length;if(typeof n==="number"){if(n>i-Math.max(2,s))c.push(0);else p=i-n}let f=void 0;let m=void 0;let h=false;let g=-1;let _=-1;let v=-1;if(r===xce){g=BGe(e,g);if(g!==-1)p=g+l}for(let E;E=e[g+=1];){if(r===L$&&E==="\\"){_=g;switch(e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}v=g}if(E==="\n"){if(r===xce)g=BGe(e,g);p=g+l;f=void 0}else{if(E===" "&&m&&m!==" "&&m!=="\n"&&m!==" "){const b=e[g+1];if(b&&b!==" "&&b!=="\n"&&b!==" ")f=g}if(g>=p){if(f){c.push(f);p=f+l;f=void 0}else if(r===L$){while(m===" "||m===" "){m=E;E=e[g+=1];h=true}const b=g>v+1?g-2:_-1;if(d[b])return e;c.push(b);d[b]=true;p=b+l;f=void 0}else{h=true}}}m=E}if(h&&u)u();if(c.length===0)return e;if(o)o();let S=e.slice(0,c[0]);for(let E=0;E<c.length;++E){const b=c[E];const A=c[E+1]||e.length;if(b===0)S=`
|
|
26
26
|
${t}${e.slice(0,A)}`;else{if(r===L$&&d[b])S+=`${e[b]}\\`;S+=`
|
|
27
27
|
${t}${e.slice(b+1,A)}`}}return S}a(Zvr,"foldFlowLines");function BGe(e,t){let r=e[t+1];while(r===" "||r===" "){do{r=e[t+=1]}while(r&&r!=="\n");r=e[t+1]}return t}a(BGe,"consumeMoreIndentedLines");FD.FOLD_BLOCK=xce;FD.FOLD_FLOW=Qvr;FD.FOLD_QUOTED=L$;FD.foldFlowLines=Zvr});var MD=y(qGe=>{"use strict";var Wh=xo();var w_=MGe();var B$=a((e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),"getFoldOptions");var M$=a(e=>/^(%|---|\.\.\.)/m.test(e),"containsDocumentMarker");function eEr(e,t,r){if(!t||t<0)return false;const n=t-r;const i=e.length;if(i<=n)return false;for(let s=0,o=0;s<i;++s){if(e[s]==="\n"){if(s-o>n)return true;o=s+1;if(i-o<=n)return false}}return true}a(eEr,"lineLengthOverLimit");function BD(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t;const i=t.options.doubleQuotedMinMultiLineLength;const s=t.indent||(M$(e)?" ":"");let o="";let u=0;for(let l=0,c=r[l];c;c=r[++l]){if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n"){o+=r.slice(u,l)+"\\ ";l+=1;u=l;c="\\"}if(c==="\\")switch(r[l+1]){case"u":{o+=r.slice(u,l);const d=r.substr(l+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:if(d.substr(0,2)==="00")o+="\\x"+d.substr(2);else o+=r.substr(l,6)}l+=5;u=l+1}break;case"n":if(n||r[l+2]==='"'||r.length<i){l+=1}else{o+=r.slice(u,l)+"\n\n";while(r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"'){o+="\n";l+=2}o+=s;if(r[l+2]===" ")o+="\\";l+=1;u=l+1}break;default:l+=1}}o=u?o+r.slice(u):r;return n?o:w_.foldFlowLines(o,s,w_.FOLD_QUOTED,B$(t,false))}a(BD,"doubleQuotedString");function Rce(e,t){if(t.options.singleQuote===false||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return BD(e,t);const r=t.indent||(M$(e)?" ":"");const n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
28
28
|
${r}`)+"'";return t.implicitKey?n:w_.foldFlowLines(n,r,w_.FOLD_FLOW,B$(t,false))}a(Rce,"singleQuotedString");function aT(e,t){const{singleQuote:r}=t.options;let n;if(r===false)n=BD;else{const i=e.includes('"');const s=e.includes("'");if(i&&!s)n=Rce;else if(s&&!i)n=BD;else n=r?Rce:BD}return n(e,t)}a(aT,"quotedString");var Oce;try{Oce=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{Oce=/\n+(?!\n|$)/g}function F$({comment:e,type:t,value:r},n,i,s){const{blockQuote:o,commentString:u,lineWidth:l}=n.options;if(!o||/\n[\t ]+$/.test(r)||/^\s*$/.test(r)){return aT(r,n)}const c=n.indent||(n.forceBlockIndent||M$(r)?" ":"");const d=o==="literal"?true:o==="folded"||t===Wh.Scalar.BLOCK_FOLDED?false:t===Wh.Scalar.BLOCK_LITERAL?true:!eEr(r,l,c.length);if(!r)return d?"|\n":">\n";let p;let f;for(f=r.length;f>0;--f){const C=r[f-1];if(C!=="\n"&&C!==" "&&C!==" ")break}let m=r.substring(f);const h=m.indexOf("\n");if(h===-1){p="-"}else if(r===m||h!==m.length-1){p="+";if(s)s()}else{p=""}if(m){r=r.slice(0,-m.length);if(m[m.length-1]==="\n")m=m.slice(0,-1);m=m.replace(Oce,`$&${c}`)}let g=false;let _;let v=-1;for(_=0;_<r.length;++_){const C=r[_];if(C===" ")g=true;else if(C==="\n")v=_;else break}let S=r.substring(0,v<_?v+1:_);if(S){r=r.substring(S.length);S=S.replace(/\n+/g,`$&${c}`)}const E=c?"2":"1";let b=(d?"|":">")+(g?E:"")+p;if(e){b+=" "+u(e.replace(/ ?[\r\n]+/g," "));if(i)i()}if(d){r=r.replace(/\n+/g,`$&${c}`);return`${b}
|