{"ast":null,"code":"import { FlowGraphBlock } from \"../../flowGraphBlock.js\";\nimport { getRichTypeFromValue } from \"../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { defaultValueSerializationFunction } from \"../../serialization.js\";\n/**\n * @experimental\n * Block that returns a constant value.\n */\nexport class FlowGraphConstantBlock extends FlowGraphBlock {\n constructor(\n /**\n * the configuration of the block\n */\n config) {\n super(config);\n this.config = config;\n this.output = this.registerDataOutput(\"output\", getRichTypeFromValue(config.value));\n }\n _updateOutputs(context) {\n this.output.setValue(this.config.value, context);\n }\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n getClassName() {\n return \"FGConstantBlock\";\n }\n /**\n * Serializes this block\n * @param serializationObject the object to serialize to\n * @param valueSerializeFunction the function to use to serialize the value\n */\n serialize(serializationObject = {}, valueSerializeFunction = defaultValueSerializationFunction) {\n super.serialize(serializationObject);\n valueSerializeFunction(\"value\", this.config.value, serializationObject.config);\n }\n}\nRegisterClass(\"FGConstantBlock\", FlowGraphConstantBlock);","map":{"version":3,"names":["FlowGraphBlock","getRichTypeFromValue","RegisterClass","defaultValueSerializationFunction","FlowGraphConstantBlock","constructor","config","output","registerDataOutput","value","_updateOutputs","context","setValue","getClassName","serialize","serializationObject","valueSerializeFunction"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FlowGraph/Blocks/Data/flowGraphConstantBlock.js"],"sourcesContent":["import { FlowGraphBlock } from \"../../flowGraphBlock.js\";\nimport { getRichTypeFromValue } from \"../../flowGraphRichTypes.js\";\nimport { RegisterClass } from \"../../../Misc/typeStore.js\";\nimport { defaultValueSerializationFunction } from \"../../serialization.js\";\n/**\n * @experimental\n * Block that returns a constant value.\n */\nexport class FlowGraphConstantBlock extends FlowGraphBlock {\n constructor(\n /**\n * the configuration of the block\n */\n config) {\n super(config);\n this.config = config;\n this.output = this.registerDataOutput(\"output\", getRichTypeFromValue(config.value));\n }\n _updateOutputs(context) {\n this.output.setValue(this.config.value, context);\n }\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n getClassName() {\n return \"FGConstantBlock\";\n }\n /**\n * Serializes this block\n * @param serializationObject the object to serialize to\n * @param valueSerializeFunction the function to use to serialize the value\n */\n serialize(serializationObject = {}, valueSerializeFunction = defaultValueSerializationFunction) {\n super.serialize(serializationObject);\n valueSerializeFunction(\"value\", this.config.value, serializationObject.config);\n }\n}\nRegisterClass(\"FGConstantBlock\", FlowGraphConstantBlock);\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,yBAAyB;AACxD,SAASC,oBAAoB,QAAQ,6BAA6B;AAClE,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,iCAAiC,QAAQ,wBAAwB;AAC1E;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASJ,cAAc,CAAC;EACvDK,WAAWA;EACX;AACJ;AACA;EACIC,MAAM,EAAE;IACJ,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,MAAM,GAAG,IAAI,CAACC,kBAAkB,CAAC,QAAQ,EAAEP,oBAAoB,CAACK,MAAM,CAACG,KAAK,CAAC,CAAC;EACvF;EACAC,cAAcA,CAACC,OAAO,EAAE;IACpB,IAAI,CAACJ,MAAM,CAACK,QAAQ,CAAC,IAAI,CAACN,MAAM,CAACG,KAAK,EAAEE,OAAO,CAAC;EACpD;EACA;AACJ;AACA;AACA;EACIE,YAAYA,CAAA,EAAG;IACX,OAAO,iBAAiB;EAC5B;EACA;AACJ;AACA;AACA;AACA;EACIC,SAASA,CAACC,mBAAmB,GAAG,CAAC,CAAC,EAAEC,sBAAsB,GAAGb,iCAAiC,EAAE;IAC5F,KAAK,CAACW,SAAS,CAACC,mBAAmB,CAAC;IACpCC,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAACV,MAAM,CAACG,KAAK,EAAEM,mBAAmB,CAACT,MAAM,CAAC;EAClF;AACJ;AACAJ,aAAa,CAAC,iBAAiB,EAAEE,sBAAsB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}