Object.defineProperty(exports,"__esModule",{value:!0}),exports.CGGetItemFromArray=void 0;let ScriptNodeAPI_1=require("../Utils/ScriptNodeAPI");class CGGetItemFromArray extends ScriptNodeAPI_1.BaseNode{constructor(){super()}clamp(e,t,r){return Math.min(r,Math.max(e,t))}getOutput(){var e,t=this.inputs[0](),r=this.inputs[1]();if(null!=r&&null!=t)return e=r.length,null==r[t=this.clamp(Math.floor(t),0,e-1)]?(0,ScriptNodeAPI_1.getDefaultValue)(null!=(e=this.valueType)?e:""):r[t]}}exports.CGGetItemFromArray=CGGetItemFromArray;