"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnRefElement=exports.CfnElement=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var constructs_1=()=>{var tmp=require("constructs");return constructs_1=()=>tmp,tmp},debug_1=()=>{var tmp=require("./debug");return debug_1=()=>tmp,tmp},lazy_1=()=>{var tmp=require("./lazy");return lazy_1=()=>tmp,tmp},cxschema=()=>{var tmp=require("../../cloud-assembly-schema");return cxschema=()=>tmp,tmp},cxapi=()=>{var tmp=require("../../cx-api");return cxapi=()=>tmp,tmp};const CFN_ELEMENT_SYMBOL=Symbol.for("@aws-cdk/core.CfnElement");class CfnElement extends constructs_1().Construct{static isCfnElement(x){return CFN_ELEMENT_SYMBOL in x}constructor(scope,id){super(scope,id),Object.defineProperty(this,CFN_ELEMENT_SYMBOL,{value:!0}),this.stack=stack_1().Stack.of(this),this.logicalId=lazy_1().Lazy.uncachedString({produce:()=>this.synthesizeLogicalId()},{displayHint:`${notTooLong(constructs_1().Node.of(this).path)}.LogicalID`}),this.node.tryGetContext(cxapi().DISABLE_LOGICAL_ID_METADATA)||constructs_1().Node.of(this).addMetadata(cxschema().ArtifactMetadataEntryType.LOGICAL_ID,this.logicalId,{stackTrace:(0,debug_1().debugModeEnabled)(),traceFromFunction:this.constructor})}overrideLogicalId(newLogicalId){if(this._logicalIdLocked)throw new Error(`The logicalId for resource at path ${constructs_1().Node.of(this).path} has been locked and cannot be overridden
Make sure you are calling "overrideLogicalId" before Stack.exportValue`);this._logicalIdOverride=newLogicalId}_lockLogicalId(){this._logicalIdLocked=!0}get creationStack(){const trace=constructs_1().Node.of(this).metadata.find(md=>md.type===cxschema().ArtifactMetadataEntryType.LOGICAL_ID).trace;if(!trace)return[];return filterStackTrace(trace);function filterStackTrace(stack){const result=Array.of(...stack);for(;result.length>0&&shouldFilter(result[result.length-1]);)result.pop();return result.length===0?stack:result}function shouldFilter(str){return str.match(/[^(]+\(internal\/.*/)!==null}}synthesizeLogicalId(){return this._logicalIdOverride?this._logicalIdOverride:this.stack.getLogicalId(this)}}exports.CfnElement=CfnElement,_a=JSII_RTTI_SYMBOL_1,CfnElement[_a]={fqn:"aws-cdk-lib.CfnElement",version:"2.159.0"};class CfnRefElement extends CfnElement{get ref(){return token_1().Token.asString(cfn_reference_1().CfnReference.for(this,"Ref"))}}exports.CfnRefElement=CfnRefElement,_b=JSII_RTTI_SYMBOL_1,CfnRefElement[_b]={fqn:"aws-cdk-lib.CfnRefElement",version:"2.159.0"};function notTooLong(x){return x.length<100?x:x.slice(0,47)+"..."+x.slice(-47)}var cfn_reference_1=()=>{var tmp=require("./private/cfn-reference");return cfn_reference_1=()=>tmp,tmp},stack_1=()=>{var tmp=require("./stack");return stack_1=()=>tmp,tmp},token_1=()=>{var tmp=require("./token");return token_1=()=>tmp,tmp};
