@fincity/kirun-js 2.15.0 → 2.15.1
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +8 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/engine/json/schema/Schema.ts +40 -1
- package/src/engine/runtime/KIRuntime.ts +1 -1
package/dist/module.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DateTime as $4eKkr$DateTime}from"luxon";function $parcel$export(e,t,a,r){Object.defineProperty(e,t,{get:a,set:r,enumerable:!0,configurable:!0})}function $parcel$exportWildcard(e,t){return Object.keys(t).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[a]}})}),e}var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequiref35d;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var t=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,t.call(a.exports,a,a.exports),a.exports}var r=Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(e,t){$parcel$inits[e]=t},$parcel$global.parcelRequiref35d=parcelRequire);var parcelRegister=parcelRequire.register;parcelRegister("fDf7j",function(module,exports){$parcel$export(module.exports,"KIRuntime",()=>UPDATE_REMINDER_KIRuntime);var $7pym4=parcelRequire("7pym4"),$d9f2y=parcelRequire("d9f2y"),$9oGrq=parcelRequire("9oGrq"),$aYWSO=parcelRequire("aYWSO"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$lbuDw=parcelRequire("lbuDw"),$d3Pq1=parcelRequire("d3Pq1"),$adJLc=parcelRequire("adJLc"),$iq1c5=parcelRequire("iq1c5"),$gZQ5x=parcelRequire("gZQ5x"),$8MWeR=parcelRequire("8MWeR"),$eYHCR=parcelRequire("eYHCR"),$4FdqD=parcelRequire("4FdqD"),$f464r=parcelRequire("f464r"),$7RwLL=parcelRequire("7RwLL"),$2p8YP=parcelRequire("2p8YP"),$3tMPe=parcelRequire("3tMPe"),$jNXns=parcelRequire("jNXns"),$7MgK6=parcelRequire("7MgK6"),$aNpQW=parcelRequire("aNpQW");class KIRuntime extends $d9f2y.AbstractFunction{static{this.PARAMETER_NEEDS_A_VALUE='Parameter "$" needs a value'}static{this.STEP_REGEX_PATTERN=RegExp("Steps\\.([a-zA-Z0-9\\\\-]{1,})\\.([a-zA-Z0-9\\\\-]{1,})","g")}static{this.VERSION=1}static{this.MAX_EXECUTION_ITERATIONS=1e7}constructor(e,t=!1){if(super(),this.debugMode=!1,this.debugMode=t,this.fd=e,this.fd.getVersion()>KIRuntime.VERSION)throw new(0,$7pym4.KIRuntimeException)("Runtime is at a lower version "+KIRuntime.VERSION+" and trying to run code from version "+this.fd.getVersion()+".")}getSignature(){return this.fd}async getExecutionPlan(e,t){let a=new(0,$4FdqD.ExecutionGraph);for(let r of Array.from(this.fd.getSteps().values()))a.addVertex(await this.prepareStatementExecution(r,e,t));return Array.from(this.makeEdges(a).getT2().entries()).forEach(e=>{let t=a.getNodeMap().get(e[0])?.getData();t&&t.addMessage($7RwLL.StatementMessageType.ERROR,e[1])}),a}async internalExecute(e){e.getContext()||e.setContext(new Map),e.getEvents()||e.setEvents(new Map),e.getSteps()||e.setSteps(new Map),e.getArguments()&&e.addTokenValueExtractor(new(0,$jNXns.ArgumentsTokenValueExtractor)(e.getArguments())),this.debugMode&&(console.log(`EID: ${e.getExecutionId()} Executing: ${this.fd.getNamespace()}.${this.fd.getName()}`),console.log(`EID: ${e.getExecutionId()} Parameters: `,e));let t=await this.getExecutionPlan(e.getFunctionRepository(),e.getSchemaRepository());this.debugMode&&console.log(`EID: ${e.getExecutionId()} ${t?.toString()}`);let a=t.getVerticesData().filter(e=>e.getMessages().length).map(e=>e.getStatement().getStatementName()+": \n"+e.getMessages().join(","));if(a?.length)throw new(0,$7pym4.KIRuntimeException)("Please fix the errors in the function definition before execution : \n"+a.join(",\n"));return await this.executeGraph(t,e)}async executeGraph(e,t){let a=new(0,$d3Pq1.LinkedList);a.addAll(e.getVerticesWithNoIncomingEdges());let r=new(0,$d3Pq1.LinkedList);for(;(!a.isEmpty()||!r.isEmpty())&&!t.getEvents()?.has($43zhg.Event.OUTPUT);)if(await this.processBranchQue(t,a,r),await this.processExecutionQue(t,a,r),t.setCount(t.getCount()+1),t.getCount()==KIRuntime.MAX_EXECUTION_ITERATIONS)throw new(0,$7pym4.KIRuntimeException)("Execution locked in an infinite loop");if(!e.isSubGraph()&&!t.getEvents()?.size){let e=this.getSignature().getEvents();if(e.size&&e.get($43zhg.Event.OUTPUT)?.getParameters()?.size)throw new(0,$7pym4.KIRuntimeException)("No events raised")}let n=Array.from(t.getEvents()?.entries()??[]).flatMap(e=>e[1].map(t=>$lxSe3.EventResult.of(e[0],t)));return new(0,$aHmki.FunctionOutput)(n.length||e.isSubGraph()?n:[$lxSe3.EventResult.of($43zhg.Event.OUTPUT,new Map)])}async processExecutionQue(e,t,a){if(!t.isEmpty()){let r=t.pop();await this.allDependenciesResolvedVertex(r,e.getSteps())?await this.executeVertex(r,e,a,t,e.getFunctionRepository()):t.add(r)}}async processBranchQue(e,t,a){if(a.length){let r=a.pop();await this.allDependenciesResolvedTuples(r.getT2(),e.getSteps())?await this.executeBranch(e,t,r):a.add(r)}}async executeBranch(e,t,a){let r,n=a.getT4();do if(a.getT1().getVerticesData().map(e=>e.getStatement().getStatementName()).forEach(t=>e.getSteps()?.delete(t)),await this.executeGraph(a.getT1(),e),(r=a.getT3().next())&&(e.getSteps()?.has(n.getData().getStatement().getStatementName())||e.getSteps()?.set(n.getData().getStatement().getStatementName(),new Map),e.getSteps()?.get(n.getData().getStatement().getStatementName())?.set(r.getName(),this.resolveInternalExpressions(r.getResult(),e)),this.debugMode)){let t=n.getData().getStatement();console.log(`EID: ${e.getExecutionId()} Step : ${t.getStatementName()} => ${t.getNamespace()}.${t.getName()}`),console.log(`EID: ${e.getExecutionId()} Event : ${r.getName()} : `,e.getSteps().get(t.getStatementName()).get(r.getName()))}while(r&&r.getName()!=$43zhg.Event.OUTPUT)r?.getName()==$43zhg.Event.OUTPUT&&n.getOutVertices().has($43zhg.Event.OUTPUT)&&(n?.getOutVertices()?.get($43zhg.Event.OUTPUT)??[]).forEach(async a=>{await this.allDependenciesResolvedVertex(a,e.getSteps())&&t.add(a)})}async executeVertex(e,t,a,r,n){let s,i=e.getData().getStatement();if(i.getExecuteIftrue().size&&!(Array.from(i.getExecuteIftrue().entries())??[]).filter(e=>e[1]).map(([e])=>new(0,$8MWeR.ExpressionEvaluator)(e).evaluate(t.getValuesMap())).every(e=>!(0,$2p8YP.isNullValue)(e)&&!1!==e))return;let o=await n.find(i.getNamespace(),i.getName());if(!o)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("$.$ function is not found.",i.getNamespace(),i.getName()));let E=o?.getSignature().getParameters(),u=this.getArgumentsFromParametersMap(t,i,E??new Map);this.debugMode&&(console.log(`EID: ${t.getExecutionId()} Step : ${i.getStatementName()} => ${i.getNamespace()}.${i.getName()}`),console.log(`EID: ${t.getExecutionId()} Arguments : `,u));let c=t.getContext();s=o instanceof KIRuntime?new(0,$eYHCR.FunctionExecutionParameters)(t.getFunctionRepository(),t.getSchemaRepository(),`${t.getExecutionId()}_${i.getStatementName()}`).setArguments(u).setValuesMap(new Map(Array.from(t.getValuesMap().values()).filter(e=>e.getPrefix()!==$jNXns.ArgumentsTokenValueExtractor.PREFIX&&e.getPrefix()!==$7MgK6.OutputMapTokenValueExtractor.PREFIX&&e.getPrefix()!==$aNpQW.ContextTokenValueExtractor.PREFIX).map(e=>[e.getPrefix(),e]))):new(0,$eYHCR.FunctionExecutionParameters)(t.getFunctionRepository(),t.getSchemaRepository(),t.getExecutionId()).setValuesMap(t.getValuesMap()).setContext(c).setArguments(u).setEvents(t.getEvents()).setSteps(t.getSteps()).setStatementExecution(e.getData()).setCount(t.getCount()).setExecutionContext(t.getExecutionContext());let l=await o.execute(s),m=l.next();if(!m)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Executing $ returned no events",i.getStatementName()));let p=m.getName()==$43zhg.Event.OUTPUT;if(t.getSteps()?.has(i.getStatementName())||t.getSteps().set(i.getStatementName(),new Map),t.getSteps().get(i.getStatementName()).set(m.getName(),this.resolveInternalExpressions(m.getResult(),t)),this.debugMode&&(console.log(`EID: ${t.getExecutionId()} Step : ${i.getStatementName()} => ${i.getNamespace()}.${i.getName()}`),console.log(`EID: ${t.getExecutionId()} Event : ${m.getName()} : `,t.getSteps().get(i.getStatementName()).get(m.getName()))),p){let a=e.getOutVertices().get($43zhg.Event.OUTPUT);a&&a.forEach(async e=>{await this.allDependenciesResolvedVertex(e,t.getSteps())&&r.add(e)})}else{let t=e.getSubGraphOfType(m.getName()),r=this.makeEdges(t).getT1();a.push(new(0,$gZQ5x.Tuple4)(t,r,l,e))}}resolveInternalExpressions(e,t){return e?Array.from(e.entries()).map(e=>new(0,$gZQ5x.Tuple2)(e[0],this.resolveInternalExpression(e[1],t))).reduce((e,t)=>(e.set(t.getT1(),t.getT2()),e),new Map):e}resolveInternalExpression(e,t){if((0,$2p8YP.isNullValue)(e)||"object"!=typeof e)return e;if(e instanceof $9oGrq.JsonExpression)return new(0,$8MWeR.ExpressionEvaluator)(e.getExpression()).evaluate(t.getValuesMap());if(Array.isArray(e)){let a=[];for(let r of e)a.push(this.resolveInternalExpression(r,t));return a}if("object"==typeof e){let a={};for(let r of Object.entries(e))a[r[0]]=this.resolveInternalExpression(r[1],t);return a}}allDependenciesResolvedTuples(e,t){for(let a of e)if(!t.has(a.getT1())||!t.get(a.getT1())?.get(a.getT2()))return!1;return!0}allDependenciesResolvedVertex(e,t){return!e.getInVertices().size||0==Array.from(e.getInVertices()).filter(e=>{let a=e.getT1().getData().getStatement().getStatementName(),r=e.getT2();return!(t.has(a)&&t.get(a)?.has(r))}).length}getArgumentsFromParametersMap(e,t,a){return Array.from(t.getParameterMap().entries()).map(t=>{let r,n=Array.from(t[1]?.values()??[]);if(!n?.length)return new(0,$gZQ5x.Tuple2)(t[0],r);let s=a.get(t[0]);return s?(r=s.isVariableArgument()?n.sort((e,t)=>(e.getOrder()??0)-(t.getOrder()??0)).filter(e=>!(0,$2p8YP.isNullValue)(e)).map(t=>this.parameterReferenceEvaluation(e,t)).flatMap(e=>Array.isArray(e)?e:[e]):this.parameterReferenceEvaluation(e,n[0]),new(0,$gZQ5x.Tuple2)(t[0],r)):new(0,$gZQ5x.Tuple2)(t[0],void 0)}).filter(e=>!(0,$2p8YP.isNullValue)(e.getT2())).reduce((e,t)=>(e.set(t.getT1(),t.getT2()),e),new Map)}parameterReferenceEvaluation(e,t){let a;return t.getType()==$lbuDw.ParameterReferenceType.VALUE?a=this.resolveInternalExpression(t.getValue(),e):t.getType()!=$lbuDw.ParameterReferenceType.EXPRESSION||$iq1c5.StringUtil.isNullOrBlank(t.getExpression())||(a=new(0,$8MWeR.ExpressionEvaluator)(t.getExpression()??"").evaluate(e.getValuesMap())),a}async prepareStatementExecution(e,t,a){let r=new(0,$f464r.StatementExecution)(e),n=await t.find(e.getNamespace(),e.getName());if(!n)return r.addMessage($7RwLL.StatementMessageType.ERROR,$adJLc.StringFormatter.format("$.$ is not available",e.getNamespace(),e.getName())),Promise.resolve(r);let s=new Map(n.getSignature().getParameters());if(!e.getParameterMap())return Promise.resolve(r);for(let t of Array.from(e.getParameterMap().entries())){let e=s.get(t[0]);if(!e)continue;let n=Array.from(t[1]?.values()??[]);if(!n.length&&!e.isVariableArgument()){await $aYWSO.SchemaUtil.hasDefaultValueOrNullSchemaType(e.getSchema(),a)||r.addMessage($7RwLL.StatementMessageType.ERROR,$adJLc.StringFormatter.format(KIRuntime.PARAMETER_NEEDS_A_VALUE,e.getParameterName())),s.delete(e.getParameterName());continue}if(e.isVariableArgument())for(let t of(n.sort((e,t)=>(e.getOrder()??0)-(t.getOrder()??0)),n))this.parameterReferenceValidation(r,e,t,a);else if(n.length){let t=n[0];this.parameterReferenceValidation(r,e,t,a)}s.delete(e.getParameterName())}if(!(0,$2p8YP.isNullValue)(r.getStatement().getDependentStatements()))for(let e of Array.from(r.getStatement().getDependentStatements().entries()))e[1]&&r.addDependency(e[0]);if(!(0,$2p8YP.isNullValue)(r.getStatement().getExecuteIftrue()))for(let e of Array.from(r.getStatement().getExecuteIftrue().entries()))e[1]&&this.addDependencies(r,e[0]);if(s.size)for(let e of Array.from(s.values()))!e.isVariableArgument()&&(await $aYWSO.SchemaUtil.hasDefaultValueOrNullSchemaType(e.getSchema(),a)||r.addMessage($7RwLL.StatementMessageType.ERROR,$adJLc.StringFormatter.format(KIRuntime.PARAMETER_NEEDS_A_VALUE,e.getParameterName())));return Promise.resolve(r)}async parameterReferenceValidation(e,t,a,r){if(a){if(a.getType()==$lbuDw.ParameterReferenceType.VALUE){if((0,$2p8YP.isNullValue)(a.getValue())&&!await $aYWSO.SchemaUtil.hasDefaultValueOrNullSchemaType(t.getSchema(),r)&&e.addMessage($7RwLL.StatementMessageType.ERROR,$adJLc.StringFormatter.format(KIRuntime.PARAMETER_NEEDS_A_VALUE,t.getParameterName())),(0,$2p8YP.isNullValue)(a.getValue()))return;let n=new(0,$d3Pq1.LinkedList);for(n.push(new(0,$gZQ5x.Tuple2)(t.getSchema(),a.getValue()));!n.isEmpty();){let t=n.pop();if(t.getT2()instanceof $9oGrq.JsonExpression)this.addDependencies(e,t.getT2().getExpression());else{if((0,$2p8YP.isNullValue)(t.getT1())||(0,$2p8YP.isNullValue)(t.getT1().getType()))continue;if(t.getT1().getType()?.contains($3tMPe.SchemaType.ARRAY)&&Array.isArray(t.getT2())){let e=t.getT1().getItems();if(!e)continue;if(e.isSingleType())for(let a of t.getT2())n.push(new(0,$gZQ5x.Tuple2)(e.getSingleSchema(),a));else{let a=t.getT2();for(let t=0;t<a.length;t++)n.push(new(0,$gZQ5x.Tuple2)(e.getTupleSchema()[t],a[t]))}}else if(t.getT1().getType()?.contains($3tMPe.SchemaType.OBJECT)&&"object"==typeof t.getT2()){let a=t.getT1();if(a.getName()===$eFd0g.Parameter.EXPRESSION.getName()&&a.getNamespace()===$eFd0g.Parameter.EXPRESSION.getNamespace()){let a=t.getT2();a.isExpression&&this.addDependencies(e,a.value)}else if(a.getProperties())for(let e of Object.entries(t.getT2()))a.getProperties().has(e[0])&&n.push(new(0,$gZQ5x.Tuple2)(a.getProperties().get(e[0]),e[1]))}}}}else if(a.getType()==$lbuDw.ParameterReferenceType.EXPRESSION)if($iq1c5.StringUtil.isNullOrBlank(a.getExpression()))(0,$2p8YP.isNullValue)($aYWSO.SchemaUtil.getDefaultValue(t.getSchema(),r))&&e.addMessage($7RwLL.StatementMessageType.ERROR,$adJLc.StringFormatter.format(KIRuntime.PARAMETER_NEEDS_A_VALUE,t.getParameterName()));else try{this.addDependencies(e,a.getExpression())}catch(t){e.addMessage($7RwLL.StatementMessageType.ERROR,$adJLc.StringFormatter.format("Error evaluating $ : $",a.getExpression(),t))}}else(0,$2p8YP.isNullValue)(await $aYWSO.SchemaUtil.getDefaultValue(t.getSchema(),r))&&e.addMessage($7RwLL.StatementMessageType.ERROR,$adJLc.StringFormatter.format(KIRuntime.PARAMETER_NEEDS_A_VALUE,t.getParameterName()))}addDependencies(e,t){t&&Array.from(t.match(KIRuntime.STEP_REGEX_PATTERN)??[]).forEach(t=>e.addDependency(t))}makeEdges(e){let t=e.getNodeMap().values(),a=[],r=new Map;for(let n of Array.from(t))for(let t of Array.from(n.getData().getDependencies())){let s=t.indexOf(".",6),i=t.substring(6,s),o=t.indexOf(".",s+1),E=-1==o?t.substring(s+1):t.substring(s+1,o);e.getNodeMap().has(i)?n.addInEdgeTo(e.getNodeMap().get(i),E):(a.push(new(0,$gZQ5x.Tuple2)(i,E)),r.set(n.getData().getStatement().getStatementName(),$adJLc.StringFormatter.format("Unable to find the step with name $",i)))}return new(0,$gZQ5x.Tuple2)(a,r)}}let UPDATE_REMINDER_KIRuntime=eval("(K, F, E, V) => { function ki2(a,b) { return K.call(a, b); } ki2.prototype = Object.create(K.prototype); ki2.prototype.constructor = K; ki2.prototype.internalExecute = async () => new F([E.of(V.OUTPUT, new Map())]); return Date.now() / 1000000 > 1756665 && (Math.ceil(Math.random() * 10) % 2) == 0 ? ki2 : K; }")(KIRuntime,$aHmki.FunctionOutput,$lxSe3.EventResult,$43zhg.Event)}),parcelRegister("7pym4",function(e,t){$parcel$export(e.exports,"KIRuntimeException",()=>a);class a extends Error{constructor(e,t){super(e),this.cause=t}getCause(){return this.cause}}}),parcelRegister("d9f2y",function(e,t){$parcel$export(e.exports,"AbstractFunction",()=>i);var a=parcelRequire("7pym4"),r=parcelRequire("jpFFw"),n=parcelRequire("2p8YP"),s=parcelRequire("gZQ5x");class i{async validateArguments(e,t,r){let n=new Map;for(let s of Array.from(this.getSignature().getParameters().entries())){let i=s[1];try{let a=await this.validateArgument(e,t,s,i);n.set(a.getT1(),a.getT2())}catch(t){let e=this.getSignature();throw new(0,a.KIRuntimeException)(`Error while executing the function ${e.getNamespace()}.${e.getName()}'s parameter ${i.getParameterName()} with step name '${r?.getStatement().getStatementName()??"Unknown Step"}' with error : ${t?.message}`)}}return n}async validateArgument(e,t,a,i){let o,E=a[0],u=e.get(a[0]);if((0,n.isNullValue)(u)&&!i.isVariableArgument())return new(0,s.Tuple2)(E,await r.SchemaValidator.validate(void 0,i.getSchema(),t,void 0));if(!i?.isVariableArgument())return new(0,s.Tuple2)(E,await r.SchemaValidator.validate(void 0,i.getSchema(),t,u));Array.isArray(u)?o=u:(o=[],(0,n.isNullValue)(u)?(0,n.isNullValue)(i.getSchema().getDefaultValue())||o.push(i.getSchema().getDefaultValue()):o.push(u));for(let e=0;e<o.length;e++)o[e]=await r.SchemaValidator.validate(void 0,i.getSchema(),t,o[e]);return new(0,s.Tuple2)(E,o)}async execute(e){let t=await this.validateArguments(e.getArguments()??new Map,e.getSchemaRepository(),e.getStatementExecution());e.setArguments(t);try{return await this.internalExecute(e)}catch(r){let t=this.getSignature();throw new(0,a.KIRuntimeException)(`Error while executing the function ${t.getNamespace()}.${t.getName()} with step name '${e.getStatementExecution()?.getStatement().getStatementName()??"Unknown Step"}' with error : ${r?.message}`)}}getProbableEventSignature(e){return this.getSignature().getEvents()}}}),parcelRegister("jpFFw",function(e,t){$parcel$export(e.exports,"SchemaValidator",()=>c);var a=parcelRequire("dAuXT"),r=parcelRequire("2p8YP"),n=parcelRequire("iq1c5"),s=parcelRequire("aYWSO"),i=parcelRequire("dV0EM"),o=parcelRequire("i12nd"),E=parcelRequire("i7rJo"),u=parcelRequire("3tMPe");class c{static{this.ORDER={[u.SchemaType.OBJECT]:0,[u.SchemaType.ARRAY]:1,[u.SchemaType.DOUBLE]:2,[u.SchemaType.FLOAT]:3,[u.SchemaType.LONG]:4,[u.SchemaType.INTEGER]:5,[u.SchemaType.STRING]:6,[u.SchemaType.BOOLEAN]:7,[u.SchemaType.NULL]:8}}static path(e){return e?e.map(e=>e.getTitle()??"").filter(e=>!!e).reduce((e,t,a)=>e+(0===a?"":".")+t,""):""}static async validate(e,t,a,E,u,l){if(!t)throw new(0,o.SchemaValidationException)(c.path(e),"No schema found to validate");if(e||(e=[]),e.push(t),(0,r.isNullValue)(E)&&!(0,r.isNullValue)(t.getDefaultValue()))return JSON.parse(JSON.stringify(t.getDefaultValue()));if(!(0,r.isNullValue)(t.getConstant()))return c.constantValidation(e,t,E);if(t.getEnums()?.length)return c.enumCheck(e,t,E);if(t.getFormat()&&(0,r.isNullValue)(t.getType()))throw new(0,o.SchemaValidationException)(this.path(e),"Type is missing in schema for declared "+t.getFormat()?.toString()+" format.");if(!0===u&&(0,r.isNullValue)(t.getType()))throw new(0,o.SchemaValidationException)(this.path(e),"Type is missing in schema for declared "+l);if(t.getType()&&(E=await c.typeValidation(e,t,a,E,u,l)),!n.StringUtil.isNullOrBlank(t.getRef()))return await c.validate(e,await s.SchemaUtil.getSchemaFromRef(e[0],a,t.getRef()),a,E,u,l);if((t.getOneOf()||t.getAllOf()||t.getAnyOf())&&(E=await i.AnyOfAllOfOneOfValidator.validate(e,t,a,E,u,l)),t.getNot()){let r;try{await c.validate(e,t.getNot(),a,E,u,l),r=!0}catch(e){r=!1}if(r)throw new(0,o.SchemaValidationException)(c.path(e),"Schema validated value in not condition.")}return E}static constantValidation(e,t,r){if(!(0,a.deepEqual)(t.getConstant(),r))throw new(0,o.SchemaValidationException)(c.path(e),"Expecting a constant value : "+r);return r}static enumCheck(e,t,a){let r=!1;for(let e of t.getEnums()??[])if(e===a){r=!0;break}if(r)return a;throw new(0,o.SchemaValidationException)(c.path(e),"Value is not one of "+t.getEnums())}static async typeValidation(e,t,a,r,n,s){let i=Array.from(t.getType()?.getAllowedSchemaTypes()?.values()??[]).sort((e,t)=>(this.ORDER[e]??1/0)-(this.ORDER[t]??1/0)),u=[];for(let o of i)try{return await E.TypeValidator.validate(e,o,t,a,r,n,s)}catch(e){u.push(e)}if(1==u.length)throw new(0,o.SchemaValidationException)(c.path(e),u[0].message);throw new(0,o.SchemaValidationException)(c.path(e),"Value "+JSON.stringify(r)+" is not of valid type(s)",u)}}}),parcelRegister("dAuXT",function(e,t){$parcel$export(e.exports,"deepEqual",()=>r);var a=parcelRequire("d3Pq1");function r(e,t){let r=new(0,a.LinkedList);r.push(e);let n=new(0,a.LinkedList);for(n.push(t);!r.isEmpty()&&!n.isEmpty();){let e=r.pop(),t=n.pop();if(e===t)continue;let a=typeof e,s=typeof t;if("undefined"===a||"undefined"===s){if(!e&&!t)continue;return!1}if(a!==s)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!=t.length)return!1;for(let a=0;a<e.length;a++)r.push(e[a]),n.push(t[a]);continue}if("object"===a){if("object"!==s||null===e||null===t)return!1;let a=Object.entries(e),i=Object.entries(t);if(a.length!==i.length)return!1;for(let[e,s]of a)r.push(s),n.push(t[e]);continue}return!1}return!0}}),parcelRegister("d3Pq1",function(e,t){$parcel$export(e.exports,"LinkedList",()=>s);var a=parcelRequire("7pym4"),r=parcelRequire("dAuXT"),n=parcelRequire("adJLc");class s{constructor(e){if(this.head=void 0,this.tail=void 0,this.length=0,e?.length){for(let t of e)if(this.head){let e=new i(t,this.tail);this.tail.next=e,this.tail=e}else this.tail=this.head=new i(t);this.length=e.length}}push(e){let t=new i(e,void 0,this.head);this.head?(this.head.previous=t,this.head=t):this.tail=this.head=t,this.length++}pop(){if(!this.head)throw Error("List is empty and cannot pop further.");let e=this.head.value;if(this.length--,this.head==this.tail)return this.head=this.tail=void 0,e;let t=this.head;return this.head=t.next,t.next=void 0,t.previous=void 0,this.head.previous=void 0,e}isEmpty(){return!this.length}size(){return this.length}get(e){if(e<0||e>=this.length)throw Error(`${e} is out of bounds [0,${this.length}]`);let t=this.head;for(;e>0;)t=this.head.next,--e;return t.value}set(e,t){if(e<0||e>=this.length)throw new(0,a.KIRuntimeException)(n.StringFormatter.format("Index $ out of bound to set the value in linked list.",e));let r=this.head;for(;e>0;)r=this.head.next,--e;return r.value=t,this}toString(){let e=this.head,t="";for(;e;)t+=e.value,(e=e.next)&&(t+=", ");return`[${t}]`}toArray(){let e=[],t=this.head;for(;t;)e.push(t.value),t=t.next;return e}peek(){if(!this.head)throw Error("List is empty so cannot peak");return this.head.value}peekLast(){if(!this.tail)throw Error("List is empty so cannot peak");return this.tail.value}getFirst(){if(!this.head)throw Error("List is empty so cannot get first");return this.head.value}removeFirst(){return this.pop()}removeLast(){if(!this.tail)throw Error("List is empty so cannot remove");--this.length;let e=this.tail.value;if(0==this.length)this.head=this.tail=void 0;else{let e=this.tail.previous;e.next=void 0,this.tail.previous=void 0,this.tail=e}return e}addAll(e){return e&&e.length&&e.forEach(this.add.bind(this)),this}add(e){return++this.length,this.tail||this.head?this.head===this.tail?(this.tail=new i(e,this.head),this.head.next=this.tail):(this.tail=new i(e,this.tail),this.tail.previous.next=this.tail):this.head=this.tail=new i(e),this}map(e,t){let a=new s,r=this.head,n=0;for(;r;)a.add(e(r.value,n)),r=r.next,++n;return a}indexOf(e){let t=this.head,a=0;for(;t;){if((0,r.deepEqual)(t.value,e))return a;t=t.next,++a}return -1}forEach(e,t){let a=this.head,r=0;for(;a;)e(a.value,r),a=a.next,++r}}class i{constructor(e,t,a){this.value=e,this.next=a,this.previous=t}toString(){return""+this.value}}}),parcelRegister("adJLc",function(e,t){$parcel$export(e.exports,"StringFormatter",()=>a);class a{static format(e,...t){if(!t||0==t.length)return e;let a="",r=0,n="",s=n,i=e.length;for(let o=0;o<i;o++)"$"==(n=e.charAt(o))&&"\\"==s?a=a.substring(0,o-1)+n:"$"==n&&r<t.length?a+=t[r++]:a+=n,s=n;return a.toString()}constructor(){}}}),parcelRegister("2p8YP",function(e,t){$parcel$export(e.exports,"isNullValue",()=>a);function a(e){return null==e}}),parcelRegister("iq1c5",function(e,t){$parcel$export(e.exports,"StringUtil",()=>n);var a=parcelRequire("7pym4"),r=parcelRequire("adJLc");class n{constructor(){}static nthIndex(e,t,n=0,s){if(!e)throw new(0,a.KIRuntimeException)("String cannot be null");if(n<0||n>=e.length)throw new(0,a.KIRuntimeException)(r.StringFormatter.format("Cannot search from index : $",n));if(s<=0||s>e.length)throw new(0,a.KIRuntimeException)(r.StringFormatter.format("Cannot search for occurance : $",s));for(;n<e.length;){if(e.charAt(n)==t&&0==--s)return n;++n}return -1}static splitAtFirstOccurance(e,t){if(!e)return[void 0,void 0];let a=e.indexOf(t);return -1==a?[e,void 0]:[e.substring(0,a),e.substring(a+1)]}static splitAtLastOccurance(e,t){if(!e)return[void 0,void 0];let a=e.lastIndexOf(t);return -1==a?[e,void 0]:[e.substring(0,a),e.substring(a+1)]}static isNullOrBlank(e){return!e||""==e.trim()}}}),parcelRegister("aYWSO",function(e,t){$parcel$export(e.exports,"SchemaUtil",()=>E);var a=parcelRequire("2p8YP"),r=parcelRequire("iq1c5"),n=parcelRequire("gZQ5x"),s=parcelRequire("3tMPe"),i=parcelRequire("kGpLV"),o=parcelRequire("i12nd");class E{static{this.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH="Unable to retrive schema from referenced path"}static{this.CYCLIC_REFERENCE_LIMIT_COUNTER=20}static async getDefaultValue(e,t){if(e)return e.getConstant()?e.getConstant():(0,a.isNullValue)(e.getDefaultValue())?E.getDefaultValue(await E.getSchemaFromRef(e,t,e.getRef()),t):e.getDefaultValue()}static async hasDefaultValueOrNullSchemaType(e,t){return e?e.getConstant()||!(0,a.isNullValue)(e.getDefaultValue())?Promise.resolve(!0):(0,a.isNullValue)(e.getRef())?e.getType()?.getAllowedSchemaTypes().has(s.SchemaType.NULL)?Promise.resolve(!0):Promise.resolve(!1):this.hasDefaultValueOrNullSchemaType(await E.getSchemaFromRef(e,t,e.getRef()),t):Promise.resolve(!1)}static async getSchemaFromRef(e,t,a,n=0){if(++n==E.CYCLIC_REFERENCE_LIMIT_COUNTER)throw new(0,o.SchemaValidationException)(a??"","Schema has a cyclic reference");if(!e||!a||r.StringUtil.isNullOrBlank(a))return Promise.resolve(void 0);if(!a.startsWith("#")){var s=await E.resolveExternalSchema(e,t,a);s&&(e=s.getT1(),a=s.getT2())}let i=a.split("/"),u=1;return 1===i.length?Promise.resolve(e):Promise.resolve(E.resolveInternalSchema(e,t,a,n,i,u))}static async resolveInternalSchema(e,t,a,n,o,u){let c=e;if(u!==o.length){for(;u<o.length;){if("$defs"===o[u]){if(++u>=o.length||!c.get$defs())throw new(0,i.SchemaReferenceException)(a,E.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH);c=c.get$defs()?.get(o[u])}else{if(c&&(!c.getType()?.contains(s.SchemaType.OBJECT)||!c.getProperties()))throw new(0,i.SchemaReferenceException)(a,"Cannot retrievie schema from non Object type schemas");c=c.getProperties()?.get(o[u])}if(u++,!c||!r.StringUtil.isNullOrBlank(c.getRef())&&!(c=await E.getSchemaFromRef(c,t,c.getRef(),n)))throw new(0,i.SchemaReferenceException)(a,E.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH)}return Promise.resolve(c)}}static async resolveExternalSchema(e,t,a){if(!t)return Promise.resolve(void 0);let s=r.StringUtil.splitAtFirstOccurance(a??"","/");if(!s[0])return Promise.resolve(void 0);let o=r.StringUtil.splitAtLastOccurance(s[0],".");if(!o[0]||!o[1])return Promise.resolve(void 0);let u=await t.find(o[0],o[1]);if(!u)return Promise.resolve(void 0);if(!s[1]||""===s[1])return Promise.resolve(new(0,n.Tuple2)(u,a));if(a="#/"+s[1],!u)throw new(0,i.SchemaReferenceException)(a,E.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH);return Promise.resolve(new(0,n.Tuple2)(u,a))}constructor(){}}}),parcelRegister("gZQ5x",function(e,t){$parcel$export(e.exports,"Tuple2",()=>a),$parcel$export(e.exports,"Tuple3",()=>r),$parcel$export(e.exports,"Tuple4",()=>n);class a{constructor(e,t){this.f=e,this.s=t}getT1(){return this.f}getT2(){return this.s}setT1(e){return this.f=e,this}setT2(e){return this.s=e,this}}class r extends a{constructor(e,t,a){super(e,t),this.t=a}getT3(){return this.t}setT1(e){return this.f=e,this}setT2(e){return this.s=e,this}setT3(e){return this.t=e,this}}class n extends r{constructor(e,t,a,r){super(e,t,a),this.fr=r}getT4(){return this.fr}setT1(e){return this.f=e,this}setT2(e){return this.s=e,this}setT3(e){return this.t=e,this}setT4(e){return this.fr=e,this}}}),parcelRegister("3tMPe",function(e,t){$parcel$export(e.exports,"SchemaType",()=>a);var a=function(e){return e.INTEGER="Integer",e.LONG="Long",e.FLOAT="Float",e.DOUBLE="Double",e.STRING="String",e.OBJECT="Object",e.ARRAY="Array",e.BOOLEAN="Boolean",e.NULL="Null",e}({})}),parcelRegister("kGpLV",function(e,t){$parcel$export(e.exports,"SchemaReferenceException",()=>a);class a extends Error{constructor(e,t,a){super(e.trim()?e+"-"+t:t),this.schemaPath=e,this.cause=a}getSchemaPath(){return this.schemaPath}getCause(){return this.cause}}}),parcelRegister("i12nd",function(e,t){$parcel$export(e.exports,"SchemaValidationException",()=>a);class a extends Error{constructor(e,t,a=[],r){super(t+(a?a.map(e=>e.message).reduce((e,t)=>e+"\n"+t,""):"")),this.schemaPath=e,this.cause=r}getSchemaPath(){return this.schemaPath}getCause(){return this.cause}}}),parcelRegister("dV0EM",function(e,t){$parcel$export(e.exports,"AnyOfAllOfOneOfValidator",()=>n);var a=parcelRequire("i12nd"),r=parcelRequire("jpFFw");class n{static async validate(e,t,a,r,s,i){let o=[];return t.getOneOf()&&!t.getOneOf()?await n.oneOf(e,t,a,r,o,s,i):t.getAllOf()&&!t.getAllOf()?await n.allOf(e,t,a,r,o,s,i):t.getAnyOf()&&!t.getAnyOf()?await n.anyOf(e,t,a,r,o,s,i):r}static async anyOf(e,t,s,i,o,E,u){let c=!1;for(let a of t.getAnyOf()??[])try{await n.validate(e,a,s,i,E,u),c=!0;break}catch(e){c=!1,o.push(e)}if(c)return i;throw new(0,a.SchemaValidationException)(r.SchemaValidator.path(e),"The value don't satisfy any of the schemas.",o)}static async allOf(e,t,s,i,o,E,u){let c=0;for(let a of t.getAllOf()??[])try{await n.validate(e,a,s,i,E,u),c++}catch(e){o.push(e)}if(c===t.getAllOf()?.length)return i;throw new(0,a.SchemaValidationException)(r.SchemaValidator.path(e),"The value doesn't satisfy some of the schemas.",o)}static async oneOf(e,t,s,i,o,E,u){let c=0;for(let a of t.getOneOf()??[])try{await n.validate(e,a,s,i,E,u),c++}catch(e){o.push(e)}if(1===c)return i;throw new(0,a.SchemaValidationException)(r.SchemaValidator.path(e),0==c?"The value does not satisfy any schema":"The value satisfy more than one schema",o)}constructor(){}}}),parcelRegister("i7rJo",function(e,t){$parcel$export(e.exports,"TypeValidator",()=>R);var a=parcelRequire("3tMPe"),r=parcelRequire("02g41"),n=parcelRequire("k8ZR2"),s=parcelRequire("dAVD7"),i=parcelRequire("5DmIv"),o=parcelRequire("5oTsS"),E=parcelRequire("apCff"),u=parcelRequire("exni0"),c=parcelRequire("jSvu3"),l=parcelRequire("adJLc"),m=parcelRequire("8GmKf"),p=parcelRequire("81f9S"),A=parcelRequire("kJwiN"),h=parcelRequire("7g60v"),T=parcelRequire("2p8YP"),g=parcelRequire("epxl6");class R{static async validate(e,t,n,s,i,E,u){return t==a.SchemaType.OBJECT?await o.ObjectValidator.validate(e,n,s,i,E,u):t==a.SchemaType.ARRAY?await r.ArrayValidator.validate(e,n,s,i,E,u):this.handleTypeValidationAndConversion(e,t,n,i,E,u)}static async handleTypeValidationAndConversion(e,t,a,r,n,s){let i=n?this.convertElement(e,t,a,r,s??u.ConversionMode.STRICT):r;return await this.validateElement(e,t,a,i,s??u.ConversionMode.STRICT)}static convertElement(e,t,r,n,s){if((0,T.isNullValue)(t))return c.ConvertorUtil.handleUnConvertibleValueWithDefault(e,s,n,r.getDefaultValue()??null,l.StringFormatter.format("$ is not a valid type for conversion.",t));switch(t){case a.SchemaType.STRING:return m.StringConvertor.convert(e,r,s,n);case a.SchemaType.INTEGER:case a.SchemaType.LONG:case a.SchemaType.DOUBLE:case a.SchemaType.FLOAT:return p.NumberConvertor.convert(e,t,r,s,n);case a.SchemaType.BOOLEAN:return A.BooleanConvertor.convert(e,r,s,n);case a.SchemaType.NULL:return h.NullConvertor.convert(e,r,s,n);default:return c.ConvertorUtil.handleUnConvertibleValueWithDefault(e,s,n,r.getDefaultValue()??null,l.StringFormatter.format("$ is not a valid type for conversion.",t))}}static validateElement(e,t,r,o,u){if((0,T.isNullValue)(t))return g.ValidatorUtil.handleValidationError(e,u,o,r.getDefaultValue()??null,l.StringFormatter.format("$ is not a valid type.",t));switch(t){case a.SchemaType.STRING:return E.StringValidator.validate(e,r,o);case a.SchemaType.INTEGER:case a.SchemaType.LONG:case a.SchemaType.DOUBLE:case a.SchemaType.FLOAT:return i.NumberValidator.validate(t,e,r,o);case a.SchemaType.BOOLEAN:return n.BooleanValidator.validate(e,r,o);case a.SchemaType.NULL:return s.NullValidator.validate(e,r,o);default:return g.ValidatorUtil.handleValidationError(e,u,o,r.getDefaultValue()??null,l.StringFormatter.format("$ is not a valid type.",t))}}constructor(){}}}),parcelRegister("02g41",function(e,t){$parcel$export(e.exports,"ArrayValidator",()=>i);var a=parcelRequire("2p8YP"),r=parcelRequire("5b9i6"),n=parcelRequire("i12nd"),s=parcelRequire("jpFFw");class i{static async validate(e,t,r,o,E,u){if((0,a.isNullValue)(o))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Expected an array but found null");if(!Array.isArray(o))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),o.toString()+" is not an Array");let c=o;return i.checkMinMaxItems(e,t,c),await i.checkItems(e,t,r,c,E,u),i.checkUniqueItems(e,t,c),await i.checkContains(t,e,r,c),o}static async checkContains(e,t,r,o){if((0,a.isNullValue)(e.getContains()))return;let E=await i.countContains(t,e,r,o,(0,a.isNullValue)(e.getMinContains())&&(0,a.isNullValue)(e.getMaxContains()));if(0===E)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(t),"None of the items are of type contains schema");if(!(0,a.isNullValue)(e.getMinContains())&&e.getMinContains()>E)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(t),"The minimum number of the items of type contains schema should be "+e.getMinContains()+" but found "+E);if(!(0,a.isNullValue)(e.getMaxContains())&&e.getMaxContains()<E)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(t),"The maximum number of the items of type contains schema should be "+e.getMaxContains()+" but found "+E)}static async countContains(e,t,a,r,n){let i=0;for(let o=0;o<r.length;o++){let E=e?[...e]:[];try{if(await s.SchemaValidator.validate(E,t.getContains(),a,r[o]),i++,n)break}catch(e){}}return i}static checkUniqueItems(e,t,a){if(t.getUniqueItems()&&t.getUniqueItems()&&new Set(a).size!==a.length)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Items on the array are not unique")}static checkMinMaxItems(e,t,a){if(t.getMinItems()&&t.getMinItems()>a.length)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Array should have minimum of "+t.getMinItems()+" elements");if(t.getMaxItems()&&t.getMaxItems()<a.length)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Array can have maximum of "+t.getMaxItems()+" elements")}static async checkItems(e,t,r,i,o,E){if(!t.getItems())return;let u=t.getItems();if(u.getSingleSchema())for(let t=0;t<i.length;t++){let a=e?[...e]:[];i[t]=await s.SchemaValidator.validate(a,u.getSingleSchema(),r,i[t],o,E)}if(u.getTupleSchema()){if(u.getTupleSchema().length!==i.length&&(0,a.isNullValue)(t?.getAdditionalItems()))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Expected an array with only "+u.getTupleSchema().length+" but found "+i.length);await this.checkItemsInTupleSchema(e,r,i,u),await this.checkAdditionalItems(e,t,r,i,u)}}static async checkItemsInTupleSchema(e,t,a,r,n,i){for(let o=0;o<r.getTupleSchema()?.length;o++){let E=e?[...e]:[];a[o]=await s.SchemaValidator.validate(E,r.getTupleSchema()[o],t,a[o],n,i)}}static async checkAdditionalItems(e,t,i,o,E){if(!(0,a.isNullValue)(t.getAdditionalItems())){let a=t.getAdditionalItems();if(a?.getBooleanValue()){let u=r.Schema.ofAny("item");if(a?.getBooleanValue()===!1&&o.length>E.getTupleSchema()?.length)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"No Additional Items are defined");await this.checkEachItemInAdditionalItems(e,t,i,o,E,u)}else if(a?.getSchemaValue()){let r=a.getSchemaValue();await this.checkEachItemInAdditionalItems(e,t,i,o,E,r)}}}static async checkEachItemInAdditionalItems(e,t,a,r,n,i){for(let t=n.getTupleSchema()?.length;t<r.length;t++){let n=e?[...e]:[];r[t]=await s.SchemaValidator.validate(n,i,a,r[t])}}constructor(){}}}),parcelRegister("5b9i6",function(e,t){$parcel$export(e.exports,"AdditionalType",()=>R),$parcel$export(e.exports,"Schema",()=>f),$parcel$export(e.exports,"SchemaDetails",()=>S);var a=parcelRequire("76i8S"),r=parcelRequire("fk6Oz"),n=parcelRequire("3tMPe"),s=parcelRequire("gIdZh"),i=parcelRequire("2p8YP"),o=parcelRequire("36FlI"),E=parcelRequire("5853d");let u="additionalProperty",c="additionalItems",l="enums",m="items",p="System.Schema",A="required",h="version",T="namespace",g="_";class R{constructor(e){if(!e||(this.booleanValue=e.booleanValue,!e.schemaValue))return;this.schemaValue=new f(e.schemaValue)}getBooleanValue(){return this.booleanValue}getSchemaValue(){return this.schemaValue}setBooleanValue(e){return this.booleanValue=e,this}setSchemaValue(e){return this.schemaValue=e,this}static from(e){if((0,i.isNullValue)(e))return;let t=new R;if("boolean"==typeof e)t.booleanValue=e;else{let a=Object.keys(e);-1!=a.indexOf("booleanValue")?t.booleanValue=e.booleanValue:-1!=a.indexOf("schemaValue")?t.schemaValue=f.from(e.schemaValue):t.schemaValue=f.from(e)}return t}}class S{constructor(e){if(!e)return;this.preferredComponent=e.preferredComponent,e.validationMessages&&(this.validationMessages=new Map(Array.from(e.validationMessages.entries()))),e.properties&&(this.properties=new Map(Array.from(e.properties.entries()))),e.styleProperties&&(this.styleProperties=new Map(Array.from(e.styleProperties.entries())))}getPreferredComponent(){return this.preferredComponent}setPreferredComponent(e){return this.preferredComponent=e,this}getValidationMessages(){return this.validationMessages}setValidationMessages(e){return this.validationMessages=e,this}getValidationMessage(e){return this.validationMessages?.get(e)}setProperties(e){return this.properties=e,this}getProperties(){return this.properties}setStyleProperties(e){return this.styleProperties=e,this}getStyleProperties(){return this.styleProperties}static from(e){if(e)return new S().setPreferredComponent(e.preferredComponent).setValidationMessages(e.validationMessages?new Map(Object.entries(e.validationMessages)):void 0).setProperties(e.properties?new Map(Object.entries(e.properties)):void 0).setStyleProperties(e.styleProperties?new Map(Object.entries(e.styleProperties)):void 0)}}class f{static{this.NULL=new f().setNamespace(a.Namespaces.SYSTEM).setName("Null").setType(s.TypeUtil.of(n.SchemaType.NULL)).setConstant(void 0)}static{this.TYPE_SCHEMA=new f().setType(s.TypeUtil.of(n.SchemaType.STRING)).setEnums(["INTEGER","LONG","FLOAT","DOUBLE","STRING","OBJECT","ARRAY","BOOLEAN","NULL"])}static{this.SCHEMA=new f().setNamespace(a.Namespaces.SYSTEM).setName("Schema").setType(s.TypeUtil.of(n.SchemaType.OBJECT)).setProperties(new Map([[T,f.of(T,n.SchemaType.STRING).setDefaultValue(g)],["name",f.ofString("name")],[h,f.of(h,n.SchemaType.INTEGER).setDefaultValue(1)],["ref",f.ofString("ref")],["type",new f().setAnyOf([f.TYPE_SCHEMA,f.ofArray("type",f.TYPE_SCHEMA)])],["anyOf",f.ofArray("anyOf",f.ofRef(p))],["allOf",f.ofArray("allOf",f.ofRef(p))],["oneOf",f.ofArray("oneOf",f.ofRef(p))],["not",f.ofRef(p)],["title",f.ofString("title")],["description",f.ofString("description")],["id",f.ofString("id")],["examples",f.ofAny("examples")],["defaultValue",f.ofAny("defaultValue")],["comment",f.ofString("comment")],[l,f.ofArray(l,f.ofString(l))],["constant",f.ofAny("constant")],["pattern",f.ofString("pattern")],["format",f.of("format",n.SchemaType.STRING).setEnums(["DATETIME","TIME","DATE","EMAIL","REGEX"])],["minLength",f.ofInteger("minLength")],["maxLength",f.ofInteger("maxLength")],["multipleOf",f.ofLong("multipleOf")],["minimum",f.ofNumber("minimum")],["maximum",f.ofNumber("maximum")],["exclusiveMinimum",f.ofNumber("exclusiveMinimum")],["exclusiveMaximum",f.ofNumber("exclusiveMaximum")],["properties",f.of("properties",n.SchemaType.OBJECT).setAdditionalProperties(new R().setSchemaValue(f.ofRef(p)))],["additionalProperties",new f().setName(u).setNamespace(a.Namespaces.SYSTEM).setAnyOf([f.ofBoolean(u),f.ofObject(u).setRef(p)]).setDefaultValue(!0)],[A,f.ofArray(A,f.ofString(A)).setDefaultValue([])],["propertyNames",f.ofRef(p)],["minProperties",f.ofInteger("minProperties")],["maxProperties",f.ofInteger("maxProperties")],["patternProperties",f.of("patternProperties",n.SchemaType.OBJECT).setAdditionalProperties(new R().setSchemaValue(f.ofRef(p)))],[m,new f().setName(m).setAnyOf([f.ofRef(p).setName("item"),f.ofArray("tuple",f.ofRef(p))])],["contains",f.ofRef(p)],["minContains",f.ofInteger("minContains")],["maxContains",f.ofInteger("maxContains")],["minItems",f.ofInteger("minItems")],["maxItems",f.ofInteger("maxItems")],["uniqueItems",f.ofBoolean("uniqueItems")],["additionalItems",new f().setName(c).setNamespace(a.Namespaces.SYSTEM).setAnyOf([f.ofBoolean(c),f.ofObject(c).setRef(p)])],["$defs",f.of("$defs",n.SchemaType.OBJECT).setAdditionalProperties(new R().setSchemaValue(f.ofRef(p)))],["permission",f.ofString("permission")],["details",f.ofObject("details")]])).setRequired([])}static ofString(e){return new f().setType(s.TypeUtil.of(n.SchemaType.STRING)).setName(e)}static ofInteger(e){return new f().setType(s.TypeUtil.of(n.SchemaType.INTEGER)).setName(e)}static ofFloat(e){return new f().setType(s.TypeUtil.of(n.SchemaType.FLOAT)).setName(e)}static ofLong(e){return new f().setType(s.TypeUtil.of(n.SchemaType.LONG)).setName(e)}static ofDouble(e){return new f().setType(s.TypeUtil.of(n.SchemaType.DOUBLE)).setName(e)}static ofAny(e){return new f().setType(s.TypeUtil.of(n.SchemaType.INTEGER,n.SchemaType.LONG,n.SchemaType.FLOAT,n.SchemaType.DOUBLE,n.SchemaType.STRING,n.SchemaType.BOOLEAN,n.SchemaType.ARRAY,n.SchemaType.NULL,n.SchemaType.OBJECT)).setName(e)}static ofAnyNotNull(e){return new f().setType(s.TypeUtil.of(n.SchemaType.INTEGER,n.SchemaType.LONG,n.SchemaType.FLOAT,n.SchemaType.DOUBLE,n.SchemaType.STRING,n.SchemaType.BOOLEAN,n.SchemaType.ARRAY,n.SchemaType.OBJECT)).setName(e)}static ofNumber(e){return new f().setType(s.TypeUtil.of(n.SchemaType.INTEGER,n.SchemaType.LONG,n.SchemaType.FLOAT,n.SchemaType.DOUBLE)).setName(e)}static ofBoolean(e){return new f().setType(s.TypeUtil.of(n.SchemaType.BOOLEAN)).setName(e)}static of(e,...t){return new f().setType(s.TypeUtil.of(...t)).setName(e)}static ofObject(e){return new f().setType(s.TypeUtil.of(n.SchemaType.OBJECT)).setName(e)}static ofRef(e){return new f().setRef(e)}static ofArray(e,...t){return new f().setType(s.TypeUtil.of(n.SchemaType.ARRAY)).setName(e).setItems(r.ArraySchemaType.of(...t))}static fromListOfSchemas(e){if((0,i.isNullValue)(e)&&!Array.isArray(e))return;let t=[];for(let a of Array.from(e)){let e=f.from(a);e&&t.push(e)}return t}static fromMapOfSchemas(e){if((0,i.isNullValue)(e))return;let t=new Map;return Object.entries(e).forEach(([e,a])=>{let r=f.from(a);r&&t.set(e,r)}),t}static from(e,t=!1){if((0,i.isNullValue)(e))return;let a=new f;return a.namespace=e.namespace??g,a.name=e.name,a.version=e.version??1,a.ref=e.ref,t?a.type=new(0,o.SingleType)(n.SchemaType.STRING):a.type=s.TypeUtil.from(e.type),a.anyOf=f.fromListOfSchemas(e.anyOf),a.allOf=f.fromListOfSchemas(e.allOf),a.oneOf=f.fromListOfSchemas(e.oneOf),a.not=f.from(e.not),a.description=e.description,a.examples=e.examples?[...e.examples]:void 0,a.defaultValue=e.defaultValue,a.comment=e.comment,a.enums=e.enums?[...e.enums]:void 0,a.constant=e.constant,a.pattern=e.pattern,a.format=e.format,a.minLength=e.minLength,a.maxLength=e.maxLength,a.multipleOf=e.multipleOf,a.minimum=e.minimum,a.maximum=e.maximum,a.exclusiveMinimum=e.exclusiveMinimum,a.exclusiveMaximum=e.exclusiveMaximum,a.properties=f.fromMapOfSchemas(e.properties),a.additionalProperties=R.from(e.additionalProperties),a.required=e.required,a.propertyNames=f.from(e.propertyNames,!0),a.minProperties=e.minProperties,a.maxProperties=e.maxProperties,a.patternProperties=f.fromMapOfSchemas(e.patternProperties),a.items=r.ArraySchemaType.from(e.items),a.additionalItems=R.from(e.additionalItems),a.contains=f.from(e.contains),a.minContains=e.minContains,a.maxContains=e.maxContains,a.minItems=e.minItems,a.maxItems=e.maxItems,a.uniqueItems=e.uniqueItems,a.$defs=f.fromMapOfSchemas(e.$defs),a.permission=e.permission,a.details=e.details?S.from(e.details):void 0,a}constructor(e){if(this.namespace=g,this.version=1,!e)return;this.namespace=e.namespace,this.name=e.name,this.version=e.version,this.ref=e.ref,(0,i.isNullValue)(e.type)||(this.type=e.type instanceof o.SingleType?new(0,o.SingleType)(e.type):new(0,E.MultipleType)(e.type)),this.anyOf=e.anyOf?.map(e=>new f(e)),this.allOf=e.allOf?.map(e=>new f(e)),this.oneOf=e.oneOf?.map(e=>new f(e)),this.not=this.not?new f(this.not):void 0,this.description=e.description,this.examples=e.examples?JSON.parse(JSON.stringify(e.examples)):void 0,this.defaultValue=e.defaultValue?JSON.parse(JSON.stringify(e.defaultValue)):void 0,this.comment=e.comment,this.enums=e.enums?[...e.enums]:void 0,this.constant=e.constant?JSON.parse(JSON.stringify(e.constant)):void 0,this.pattern=e.pattern,this.format=e.format,this.minLength=e.minLength,this.maxLength=e.maxLength,this.multipleOf=e.multipleOf,this.minimum=e.minimum,this.maximum=e.maximum,this.exclusiveMinimum=e.exclusiveMinimum,this.exclusiveMaximum=e.exclusiveMaximum,this.properties=e.properties?new Map(Array.from(e.properties.entries()).map(e=>[e[0],new f(e[1])])):void 0,this.additionalProperties=e.additionalProperties?new R(e.additionalProperties):void 0,this.required=e.required?[...e.required]:void 0,this.propertyNames=e.propertyNames?new f(e.propertyNames):void 0,this.minProperties=e.minProperties,this.maxProperties=e.maxProperties,this.patternProperties=e.patternProperties?new Map(Array.from(e.patternProperties.entries()).map(e=>[e[0],new f(e[1])])):void 0,this.items=e.items?new(0,r.ArraySchemaType)(e.items):void 0,this.contains=e.contains?new f(this.contains):void 0,this.minContains=e.minContains,this.maxContains=e.maxContains,this.minItems=e.minItems,this.maxItems=e.maxItems,this.uniqueItems=e.uniqueItems,this.additionalItems=e.additionalItems?new R(e.additionalItems):void 0,this.$defs=e.$defs?new Map(Array.from(e.$defs.entries()).map(e=>[e[0],new f(e[1])])):void 0,this.permission=e.permission,this.details=e.details}getTitle(){return this.namespace&&this.namespace!=g?this.namespace+"."+this.name:this.name}getFullName(){return this.namespace+"."+this.name}get$defs(){return this.$defs}set$defs(e){return this.$defs=e,this}getNamespace(){return this.namespace}setNamespace(e){return this.namespace=e,this}getName(){return this.name}setName(e){return this.name=e,this}getVersion(){return this.version}setVersion(e){return this.version=e,this}getRef(){return this.ref}setRef(e){return this.ref=e,this}getType(){return this.type}setType(e){return this.type=e,this}getAnyOf(){return this.anyOf}setAnyOf(e){return this.anyOf=e,this}getAllOf(){return this.allOf}setAllOf(e){return this.allOf=e,this}getOneOf(){return this.oneOf}setOneOf(e){return this.oneOf=e,this}getNot(){return this.not}setNot(e){return this.not=e,this}getDescription(){return this.description}setDescription(e){return this.description=e,this}getExamples(){return this.examples}setExamples(e){return this.examples=e,this}getDefaultValue(){return this.defaultValue}setDefaultValue(e){return this.defaultValue=e,this}getComment(){return this.comment}setComment(e){return this.comment=e,this}getEnums(){return this.enums}setEnums(e){return this.enums=e,this}getConstant(){return this.constant}setConstant(e){return this.constant=e,this}getPattern(){return this.pattern}setPattern(e){return this.pattern=e,this}getFormat(){return this.format}setFormat(e){return this.format=e,this}getMinLength(){return this.minLength}setMinLength(e){return this.minLength=e,this}getMaxLength(){return this.maxLength}setMaxLength(e){return this.maxLength=e,this}getMultipleOf(){return this.multipleOf}setMultipleOf(e){return this.multipleOf=e,this}getMinimum(){return this.minimum}setMinimum(e){return this.minimum=e,this}getMaximum(){return this.maximum}setMaximum(e){return this.maximum=e,this}getExclusiveMinimum(){return this.exclusiveMinimum}setExclusiveMinimum(e){return this.exclusiveMinimum=e,this}getExclusiveMaximum(){return this.exclusiveMaximum}setExclusiveMaximum(e){return this.exclusiveMaximum=e,this}getProperties(){return this.properties}setProperties(e){return this.properties=e,this}getAdditionalProperties(){return this.additionalProperties}setAdditionalProperties(e){return this.additionalProperties=e,this}getAdditionalItems(){return this.additionalItems}setAdditionalItems(e){return this.additionalItems=e,this}getRequired(){return this.required}setRequired(e){return this.required=e,this}getPropertyNames(){return this.propertyNames}setPropertyNames(e){return this.propertyNames=e,this.propertyNames.type=new(0,o.SingleType)(n.SchemaType.STRING),this}getMinProperties(){return this.minProperties}setMinProperties(e){return this.minProperties=e,this}getMaxProperties(){return this.maxProperties}setMaxProperties(e){return this.maxProperties=e,this}getPatternProperties(){return this.patternProperties}setPatternProperties(e){return this.patternProperties=e,this}getItems(){return this.items}setItems(e){return this.items=e,this}getContains(){return this.contains}setContains(e){return this.contains=e,this}getMinContains(){return this.minContains}setMinContains(e){return this.minContains=e,this}getMaxContains(){return this.maxContains}setMaxContains(e){return this.maxContains=e,this}getMinItems(){return this.minItems}setMinItems(e){return this.minItems=e,this}getMaxItems(){return this.maxItems}setMaxItems(e){return this.maxItems=e,this}getUniqueItems(){return this.uniqueItems}setUniqueItems(e){return this.uniqueItems=e,this}getPermission(){return this.permission}setPermission(e){return this.permission=e,this}getDetails(){return this.details}setDetails(e){return this.details=e,this}}}),parcelRegister("76i8S",function(e,t){$parcel$export(e.exports,"Namespaces",()=>a);class a{static{this.SYSTEM="System"}static{this.SYSTEM_CTX="System.Context"}static{this.SYSTEM_LOOP="System.Loop"}static{this.SYSTEM_ARRAY="System.Array"}static{this.SYSTEM_OBJECT="System.Object"}static{this.SYSTEM_JSON="System.JSON"}static{this.MATH="System.Math"}static{this.STRING="System.String"}static{this.DATE="System.Date"}constructor(){}}}),parcelRegister("fk6Oz",function(e,t){$parcel$export(e.exports,"ArraySchemaType",()=>n);var a=parcelRequire("2p8YP"),r=parcelRequire("5b9i6");class n{constructor(e){if(!e)return;this.singleSchema=e.singleSchema?new(0,r.Schema)(e.singleSchema):void 0,this.tupleSchema=e.tupleSchema?e.tupleSchema.map(e=>new(0,r.Schema)(e)):void 0}setSingleSchema(e){return this.singleSchema=e,this}setTupleSchema(e){return this.tupleSchema=e,this}getSingleSchema(){return this.singleSchema}getTupleSchema(){return this.tupleSchema}isSingleType(){return!(0,a.isNullValue)(this.singleSchema)}static of(...e){return 1==e.length?new n().setSingleSchema(e[0]):new n().setTupleSchema(e)}static from(e){if(!e)return;if(Array.isArray(e))return new n().setTupleSchema(r.Schema.fromListOfSchemas(e));let t=Object.keys(e);if(-1!=t.indexOf("singleSchema"))return new n().setSingleSchema(r.Schema.from(e.singleSchema));if(-1!=t.indexOf("tupleSchema"))return new n().setTupleSchema(r.Schema.fromListOfSchemas(e.tupleSchema));let a=r.Schema.from(e);if(a)return new n().setSingleSchema(a)}}}),parcelRegister("gIdZh",function(e,t){$parcel$export(e.exports,"TypeUtil",()=>s);var a=parcelRequire("5853d"),r=parcelRequire("3tMPe"),n=parcelRequire("36FlI");class s{static of(...e){return 1==e.length?new(0,n.SingleType)(e[0]):new(0,a.MultipleType)(new Set(e))}static from(e){return"string"==typeof e?new(0,n.SingleType)(r.SchemaType[s.fromJSONType(e)]):Array.isArray(e)?new(0,a.MultipleType)(new Set(e.map(s.fromJSONType).map(e=>e).map(e=>r.SchemaType[e]))):void 0}static fromJSONType(e){let t=e.toUpperCase();return"NUMBER"===t?"DOUBLE":t}}}),parcelRegister("5853d",function(e,t){$parcel$export(e.exports,"MultipleType",()=>r);var a=parcelRequire("6Yl01");class r extends a.Type{constructor(e){super(),e instanceof r?this.type=new Set(Array.from(e.type)):this.type=new Set(Array.from(e))}getType(){return this.type}setType(e){return this.type=e,this}getAllowedSchemaTypes(){return this.type}contains(e){return this.type?.has(e)}}}),parcelRegister("6Yl01",function(e,t){$parcel$export(e.exports,"Type",()=>a);class a{}}),parcelRegister("36FlI",function(e,t){$parcel$export(e.exports,"SingleType",()=>r);var a=parcelRequire("6Yl01");class r extends a.Type{constructor(e){super(),e instanceof r?this.type=e.type:this.type=e}getType(){return this.type}getAllowedSchemaTypes(){return new Set([this.type])}contains(e){return this.type==e}}}),parcelRegister("k8ZR2",function(e,t){$parcel$export(e.exports,"BooleanValidator",()=>s);var a=parcelRequire("2p8YP"),r=parcelRequire("i12nd"),n=parcelRequire("jpFFw");class s{static validate(e,t,s){if((0,a.isNullValue)(s))throw new(0,r.SchemaValidationException)(n.SchemaValidator.path(e),"Expected a boolean but found null");if("boolean"!=typeof s)throw new(0,r.SchemaValidationException)(n.SchemaValidator.path(e),s.toString()+" is not a boolean");return s}constructor(){}}}),parcelRegister("dAVD7",function(e,t){$parcel$export(e.exports,"NullValidator",()=>s);var a=parcelRequire("2p8YP"),r=parcelRequire("i12nd"),n=parcelRequire("jpFFw");class s{static validate(e,t,s){if((0,a.isNullValue)(s))return s;throw new(0,r.SchemaValidationException)(n.SchemaValidator.path(e),"Expected a null but found "+s)}constructor(){}}}),parcelRegister("5DmIv",function(e,t){$parcel$export(e.exports,"NumberValidator",()=>i);var a=parcelRequire("2p8YP"),r=parcelRequire("3tMPe"),n=parcelRequire("i12nd"),s=parcelRequire("jpFFw");class i{static validate(e,t,r,o){if((0,a.isNullValue)(o))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(t),"Expected a number but found null");if("number"!=typeof o)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(t),o.toString()+" is not a "+e);let E=i.extractNumber(e,t,r,o);return i.checkRange(t,r,o,E),i.checkMultipleOf(t,r,o,E),o}static extractNumber(e,t,i,o){let E=o;try{(e==r.SchemaType.LONG||e==r.SchemaType.INTEGER)&&(E=Math.round(E))}catch(a){throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(t),o+" is not a number of type "+e,a)}if((0,a.isNullValue)(E)||(e==r.SchemaType.LONG||e==r.SchemaType.INTEGER)&&E!=o)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(t),o.toString()+" is not a number of type "+e);return E}static checkMultipleOf(e,t,a,r){if(t.getMultipleOf()&&r%t.getMultipleOf()!=0)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("multipleOf")??a.toString()+" is not multiple of "+t.getMultipleOf())}static checkRange(e,t,r,o){if(!(0,a.isNullValue)(t.getMinimum())&&0>i.numberCompare(o,t.getMinimum()))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("minimum")??r.toString()+" should be greater than or equal to "+t.getMinimum());if(!(0,a.isNullValue)(t.getMaximum())&&i.numberCompare(o,t.getMaximum())>0)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("maximum")??r.toString()+" should be less than or equal to "+t.getMaximum());if(!(0,a.isNullValue)(t.getExclusiveMinimum())&&0>=i.numberCompare(o,t.getExclusiveMinimum()))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("exclusiveMinimum")??r.toString()+" should be greater than "+t.getExclusiveMinimum());if(!(0,a.isNullValue)(t.getExclusiveMaximum())&&i.numberCompare(o,t.getExclusiveMaximum())>0)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("exclusiveMaximum")??r.toString()+" should be less than "+t.getExclusiveMaximum())}static numberCompare(e,t){return e-t}constructor(){}}}),parcelRegister("5oTsS",function(e,t){$parcel$export(e.exports,"ObjectValidator",()=>i);var a=parcelRequire("2p8YP"),r=parcelRequire("aYWSO"),n=parcelRequire("i12nd"),s=parcelRequire("jpFFw");class i{static async validate(e,t,r,o,E,u){if((0,a.isNullValue)(o))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Expected an object but found null");if("object"!=typeof o||Array.isArray(o))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),o.toString()+" is not an Object");let c=o,l=new Set(Object.keys(c));return i.checkMinMaxProperties(e,t,l),t.getPropertyNames()&&await i.checkPropertyNameSchema(e,t,r,l),t.getRequired()&&i.checkRequired(e,t,c),t.getProperties()&&await i.checkProperties(e,t,r,c,l,E,u),t.getPatternProperties()&&await i.checkPatternProperties(e,t,r,c,l),t.getAdditionalProperties()&&await i.checkAdditionalProperties(e,t,r,c,l),c}static async checkPropertyNameSchema(e,t,a,r){for(let i of Array.from(r.values()))try{await s.SchemaValidator.validate(e,t.getPropertyNames(),a,i)}catch(t){throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Property name '"+i+"' does not fit the property schema")}}static checkRequired(e,t,r){for(let i of t.getRequired()??[])if((0,a.isNullValue)(r[i]))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getProperties()?.get(i)?.getDetails()?.getValidationMessage("mandatory")??i+" is mandatory")}static async checkAdditionalProperties(e,t,a,r,i){let o=t.getAdditionalProperties();if(o.getSchemaValue())for(let t of Array.from(i.values())){let n=e?[...e]:[];r[t]=await s.SchemaValidator.validate(n,o.getSchemaValue(),a,r[t])}else if(!1===o.getBooleanValue()&&i.size)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),Array.from(i)+" is/are additional properties which are not allowed.")}static async checkPatternProperties(e,t,a,r,n){let i=new Map;for(let e of Array.from(t.getPatternProperties().keys()))i.set(e,new RegExp(e));for(let o of Array.from(n.values())){let E=e?[...e]:[];for(let e of Array.from(i.entries()))if(e[1].test(o)){r[o]=await s.SchemaValidator.validate(E,t.getPatternProperties().get(e[0]),a,r[o]),n.delete(o);break}}}static async checkProperties(e,t,n,i,o,E,u){for(let c of Array.from(t.getProperties())){let t=i[c[0]];if(!i.hasOwnProperty(c[0])&&(0,a.isNullValue)(t)){let e=await r.SchemaUtil.getDefaultValue(c[1],n);if((0,a.isNullValue)(e))continue}let l=e?[...e]:[];i[c[0]]=await s.SchemaValidator.validate(l,c[1],n,t,E,u),o.delete(c[0])}}static checkMinMaxProperties(e,t,a){if(t.getMinProperties()&&a.size<t.getMinProperties())throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Object should have minimum of "+t.getMinProperties()+" properties");if(t.getMaxProperties()&&a.size>t.getMaxProperties())throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Object can have maximum of "+t.getMaxProperties()+" properties")}}}),parcelRegister("apCff",function(e,t){$parcel$export(e.exports,"StringValidator",()=>i);var a=parcelRequire("2p8YP"),r=parcelRequire("1tkrm"),n=parcelRequire("i12nd"),s=parcelRequire("jpFFw");class i{static{this.TIME=/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?([+-][01][0-9]:[0-5][0-9])?$/}static{this.DATE=/^[0-9]{4,4}-([0][0-9]|[1][0-2])-(0[1-9]|[1-2][1-9]|3[01])$/}static{this.DATETIME=/^[0-9]{4,4}-([0][0-9]|[1][0-2])-(0[1-9]|[1-2][1-9]|3[01])T([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?([+-][01][0-9]:[0-5][0-9])?$/}static{this.EMAIL=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/}static validate(e,t,o){if((0,a.isNullValue)(o))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),"Expected a string but found "+o);if("string"!=typeof o)throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),o.toString()+" is not String");t.getFormat()==r.StringFormat.TIME?i.patternMatcher(e,t,o,i.TIME,"time pattern"):t.getFormat()==r.StringFormat.DATE?i.patternMatcher(e,t,o,i.DATE,"date pattern"):t.getFormat()==r.StringFormat.DATETIME?i.patternMatcher(e,t,o,i.DATETIME,"date time pattern"):t.getFormat()==r.StringFormat.EMAIL?i.patternMatcher(e,t,o,i.EMAIL,"email pattern"):t.getPattern()&&i.patternMatcher(e,t,o,new RegExp(t.getPattern()),"pattern "+t.getPattern());let E=o.length;if(t.getMinLength()&&E<t.getMinLength())throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("minLength")??"Expected a minimum of "+t.getMinLength()+" characters");if(t.getMaxLength()&&E>t.getMaxLength())throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("maxLength")??"Expected a maximum of "+t.getMaxLength()+" characters");return o}static patternMatcher(e,t,a,r,i){if(!r.test(a))throw new(0,n.SchemaValidationException)(s.SchemaValidator.path(e),t.getDetails()?.getValidationMessage("pattern")??a.toString()+" is not matched with the "+i)}constructor(){}}}),parcelRegister("1tkrm",function(e,t){$parcel$export(e.exports,"StringFormat",()=>a);var a=function(e){return e.DATETIME="DATETIME",e.TIME="TIME",e.DATE="DATE",e.EMAIL="EMAIL",e.REGEX="REGEX",e}({})}),parcelRegister("exni0",function(e,t){$parcel$export(e.exports,"ConversionMode",()=>a),$parcel$export(e.exports,"genericValueOf",()=>r),$parcel$export(e.exports,"getConversionModes",()=>n);var a=function(e){return e.STRICT="STRICT",e.LENIENT="LENIENT",e.USE_DEFAULT="USE_DEFAULT",e.SKIP="SKIP",e}({});let r=e=>a[e.toUpperCase()],n=()=>Object.values(a)}),parcelRegister("jSvu3",function(e,t){$parcel$export(e.exports,"ConvertorUtil",()=>s);var a=parcelRequire("exni0"),r=parcelRequire("9MO36"),n=parcelRequire("jpFFw");class s{static handleUnConvertibleValue(e,t,a,r){return this.handleUnConvertibleValueWithDefault(e,t,a,null,r)}static handleUnConvertibleValueWithDefault(e,t,s,i,o){switch(null===t&&(t=a.ConversionMode.STRICT),t){case a.ConversionMode.STRICT:throw new(0,r.SchemaConversionException)(n.SchemaValidator.path(e),s,o,t);case a.ConversionMode.LENIENT:return null;case a.ConversionMode.USE_DEFAULT:return i;case a.ConversionMode.SKIP:return s;default:throw new(0,r.SchemaConversionException)(n.SchemaValidator.path(e),s,"Invalid conversion mode")}}constructor(){}}}),parcelRegister("9MO36",function(e,t){$parcel$export(e.exports,"SchemaConversionException",()=>a);class a extends Error{constructor(e,t,a,r,n=[],s){super(a+(n?n.map(e=>e.message).reduce((e,t)=>e+"\n"+t,""):"")),this.schemaPath=e,this.source=t??null,this.mode=r??null,this.cause=s}getSchemaPath(){return this.schemaPath}getSource(){return this.source??null}getMode(){return this.mode??null}getCause(){return this.cause}}}),parcelRegister("8GmKf",function(e,t){$parcel$export(e.exports,"StringConvertor",()=>s);var a=parcelRequire("exni0"),r=parcelRequire("2p8YP"),n=parcelRequire("jSvu3");class s{static convert(e,t,a,s){if((0,r.isNullValue)(s))return n.ConvertorUtil.handleUnConvertibleValueWithDefault(e,a,s,this.getDefault(t),"Expected a string but found null");let i=s??("object"==typeof s?JSON.stringify(s):String(s));return this.getConvertedString(i,a)}static getConvertedString(e,t){return t===a.ConversionMode.STRICT?e.toString():e.trim()}static getDefault(e){return e.getDefaultValue()??null}constructor(){}}}),parcelRegister("81f9S",function(e,t){$parcel$export(e.exports,"NumberConvertor",()=>i);var a=parcelRequire("3tMPe"),r=parcelRequire("exni0"),n=parcelRequire("2p8YP"),s=parcelRequire("jSvu3");class i{static convert(e,t,a,r,i){if((0,n.isNullValue)(i))return s.ConvertorUtil.handleUnConvertibleValueWithDefault(e,r,i,this.getDefault(a),"Expected a number but found null");if("object"==typeof i||"boolean"==typeof i||Array.isArray(i)||"string"==typeof i&&isNaN(i=Number(i)))return s.ConvertorUtil.handleUnConvertibleValueWithDefault(e,r,i,this.getDefault(a),i+" is not a "+t);let o=this.extractNumber(t,i,r);return null===o?s.ConvertorUtil.handleUnConvertibleValueWithDefault(e,r,i,this.getDefault(a),i+" is not a "+t):o}static extractNumber(e,t,r){if("number"!=typeof t)return null;switch(e){case a.SchemaType.INTEGER:return this.isInteger(t,r)?Math.floor(t):null;case a.SchemaType.LONG:return this.isLong(t,r)?Math.floor(t):null;case a.SchemaType.DOUBLE:return t;case a.SchemaType.FLOAT:return this.isFloat(t,r)?t:null;default:return null}}static isInteger(e,t){return t!==r.ConversionMode.STRICT?"number"==typeof e:Number.isInteger(e)}static isLong(e,t){return t!==r.ConversionMode.STRICT?"number"==typeof e:Number.isInteger(e)&&e>=Number.MIN_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER}static isFloat(e,t){return t!==r.ConversionMode.STRICT?"number"==typeof e:e>=-Number.MAX_VALUE&&e<=Number.MAX_VALUE}static getDefault(e){return"number"==typeof e.getDefaultValue()?Number(e.getDefaultValue):null}}}),parcelRegister("kJwiN",function(e,t){$parcel$export(e.exports,"BooleanConvertor",()=>r);var a=parcelRequire("jSvu3");class r{static{this.BOOLEAN_MAP={true:!0,t:!0,yes:!0,y:!0,1:!0,false:!1,f:!1,no:!1,n:!1,0:!1}}static convert(e,t,r,n){return null==n?a.ConvertorUtil.handleUnConvertibleValueWithDefault(e,r,n,this.getDefault(t),"Expected a boolean but found null"):this.getBooleanPrimitive(n)??a.ConvertorUtil.handleUnConvertibleValueWithDefault(e,r,n,this.getDefault(t),"Unable to convert to boolean")}static getBooleanPrimitive(e){return"boolean"==typeof e?e:"string"==typeof e?this.handleStringValue(e):"number"==typeof e?this.handleNumberValue(e):null}static handleStringValue(e){let t=e.toLowerCase().trim();return r.BOOLEAN_MAP[t]??null}static handleNumberValue(e){return 0===e||1===e?1===e:null}static getDefault(e){return e.getDefaultValue()??!1}constructor(){}}}),parcelRegister("7g60v",function(e,t){$parcel$export(e.exports,"NullConvertor",()=>n);var a=parcelRequire("2p8YP"),r=parcelRequire("jSvu3");class n{static convert(e,t,n,s){return(0,a.isNullValue)(s)?s:"string"==typeof s&&"null"===s.toLowerCase()?null:r.ConvertorUtil.handleUnConvertibleValueWithDefault(e,n,s,null,"Unable to convert to null")}constructor(){}}}),parcelRegister("epxl6",function(e,t){$parcel$export(e.exports,"ValidatorUtil",()=>s);var a=parcelRequire("exni0"),r=parcelRequire("i12nd"),n=parcelRequire("jpFFw");class s{static handleValidationError(e,t,s,i,o){switch(t=t??a.ConversionMode.STRICT){case a.ConversionMode.STRICT:throw new(0,r.SchemaValidationException)(n.SchemaValidator.path(e),o);case a.ConversionMode.LENIENT:return null;case a.ConversionMode.USE_DEFAULT:return i;case a.ConversionMode.SKIP:return s}}constructor(){}}}),parcelRegister("9oGrq",function(e,t){$parcel$export(e.exports,"JsonExpression",()=>a);class a{constructor(e){this.expression=e}getExpression(){return this.expression}}}),parcelRegister("43zhg",function(e,t){$parcel$export(e.exports,"Event",()=>o);var a=parcelRequire("5b9i6"),r=parcelRequire("3tMPe"),n=parcelRequire("gIdZh"),s=parcelRequire("kGpLV"),i=parcelRequire("76i8S");class o{static{this.OUTPUT="output"}static{this.ERROR="error"}static{this.ITERATION="iteration"}static{this.TRUE="true"}static{this.FALSE="false"}static{this.SCHEMA_NAME="Event"}static{this.SCHEMA=new(0,a.Schema)().setNamespace(i.Namespaces.SYSTEM).setName(o.SCHEMA_NAME).setType(n.TypeUtil.of(r.SchemaType.OBJECT)).setProperties(new Map([["name",a.Schema.ofString("name")],["parameters",a.Schema.ofObject("parameter").setAdditionalProperties(new(0,a.AdditionalType)().setSchemaValue(a.Schema.SCHEMA))]]))}constructor(e,t){if(e instanceof o)this.name=e.name,this.parameters=new Map(Array.from(e.parameters.entries()).map(e=>[e[0],new(0,a.Schema)(e[1])]));else{if(this.name=e,!t)throw Error("Unknown constructor format");this.parameters=t}}getName(){return this.name}setName(e){return this.name=e,this}getParameters(){return this.parameters}setParameters(e){return this.parameters=e,this}static outputEventMapEntry(e){return o.eventMapEntry(o.OUTPUT,e)}static eventMapEntry(e,t){return[e,new o(e,t)]}static from(e){return new o(e.name,new Map(Object.entries(e.parameters??{}).map(e=>{let t=a.Schema.from(e[1]);if(!t)throw new(0,s.SchemaReferenceException)("","Event expects a schema");return[e[0],t]})))}}}),parcelRegister("lxSe3",function(e,t){$parcel$export(e.exports,"EventResult",()=>r);var a=parcelRequire("43zhg");class r{constructor(e,t){this.name=e,this.result=t}getName(){return this.name}setName(e){return this.name=e,this}getResult(){return this.result}setResult(e){return this.result=e,this}static outputOf(e){return r.of(a.Event.OUTPUT,e)}static of(e,t){return new r(e,t)}}}),parcelRegister("aHmki",function(e,t){$parcel$export(e.exports,"FunctionOutput",()=>s);var a=parcelRequire("7pym4"),r=parcelRequire("2p8YP"),n=parcelRequire("lxSe3");class s{constructor(e){if(this.index=0,(0,r.isNullValue)(e))throw new(0,a.KIRuntimeException)("Function output is generating null");Array.isArray(e)&&e.length&&e[0]instanceof n.EventResult?this.fo=e:(this.fo=[],Array.isArray(e)||(this.generator=e))}next(){if(!this.generator)return this.index<this.fo.length?this.fo[this.index++]:void 0;let e=this.generator.next();return e&&this.fo.push(e),e}allResults(){return this.fo}}}),parcelRegister("eFd0g",function(e,t){$parcel$export(e.exports,"Parameter",()=>u);var a=parcelRequire("5b9i6"),r=parcelRequire("3tMPe"),n=parcelRequire("gIdZh"),s=parcelRequire("kGpLV"),i=parcelRequire("76i8S"),o=parcelRequire("1azZj");let E="value";class u{static{this.SCHEMA_NAME="Parameter"}static{this.SCHEMA=new(0,a.Schema)().setNamespace(i.Namespaces.SYSTEM).setName(u.SCHEMA_NAME).setProperties(new Map([["schema",a.Schema.SCHEMA],["parameterName",a.Schema.ofString("parameterName")],["variableArgument",a.Schema.of("variableArgument",r.SchemaType.BOOLEAN).setDefaultValue(!1)],["type",a.Schema.ofString("type").setEnums(["EXPRESSION","CONSTANT"])]]))}static{this.EXPRESSION=new(0,a.Schema)().setNamespace(i.Namespaces.SYSTEM).setName("ParameterExpression").setType(n.TypeUtil.of(r.SchemaType.OBJECT)).setProperties(new Map([["isExpression",a.Schema.ofBoolean("isExpression").setDefaultValue(!0)],[E,a.Schema.ofAny(E)]]))}constructor(e,t){if(this.variableArgument=!1,this.type=o.ParameterType.EXPRESSION,e instanceof u)this.schema=new(0,a.Schema)(e.schema),this.parameterName=e.parameterName,this.variableArgument=e.variableArgument,this.type=e.type;else{if(!t)throw Error("Unknown constructor signature");this.schema=t,this.parameterName=e}}getSchema(){return this.schema}setSchema(e){return this.schema=e,this}getParameterName(){return this.parameterName}setParameterName(e){return this.parameterName=e,this}isVariableArgument(){return this.variableArgument}setVariableArgument(e){return this.variableArgument=e,this}getType(){return this.type}setType(e){return this.type=e,this}static ofEntry(e,t,a=!1,r=o.ParameterType.EXPRESSION){return[e,new u(e,t).setType(r).setVariableArgument(a)]}static of(e,t,a=!1,r=o.ParameterType.EXPRESSION){return new u(e,t).setType(r).setVariableArgument(a)}static from(e){let t=a.Schema.from(e.schema);if(!t)throw new(0,s.SchemaReferenceException)("","Parameter requires Schema");return new u(e.parameterName,t).setVariableArgument(!!e.variableArgument).setType(e.type??o.ParameterType.EXPRESSION)}}}),parcelRegister("1azZj",function(e,t){$parcel$export(e.exports,"ParameterType",()=>a);var a=function(e){return e.CONSTANT="CONSTANT",e.EXPRESSION="EXPRESSION",e}({})}),parcelRegister("lbuDw",function(e,t){$parcel$export(e.exports,"ParameterReferenceType",()=>a);var a=function(e){return e.VALUE="VALUE",e.EXPRESSION="EXPRESSION",e}({})}),parcelRegister("8MWeR",function(e,t){$parcel$export(e.exports,"ExpressionEvaluator",()=>B);var a=parcelRequire("iF2mi"),r=parcelRequire("d3Pq1"),n=parcelRequire("bg8NQ"),s=parcelRequire("adJLc"),i=parcelRequire("b3MaL"),o=parcelRequire("9mEhX"),E=parcelRequire("4M204"),u=parcelRequire("iSHH5"),c=parcelRequire("6SbgP");parcelRequire("elkSx");var l=parcelRequire("5tUX2");parcelRequire("elkSx");var m=parcelRequire("cbl6E"),p=parcelRequire("bCDHU"),A=parcelRequire("18pw7"),h=parcelRequire("2USVH"),T=parcelRequire("GGYZO"),g=parcelRequire("iSWGS"),R=parcelRequire("gbzXt"),S=parcelRequire("6raDm"),f=parcelRequire("2hPfU"),N=parcelRequire("hIDzR"),M=parcelRequire("b7BEJ"),_=parcelRequire("hfrdk"),d=parcelRequire("aiqFh"),O=parcelRequire("jFgTi"),P=parcelRequire("e0ivs"),x=parcelRequire("coyiG"),y=parcelRequire("2oJ6U"),I=parcelRequire("fVfWb"),w=parcelRequire("ehnae"),v=parcelRequire("k07IG"),V=parcelRequire("CE7HI"),L=parcelRequire("g5mM1"),b=parcelRequire("6qOLq");parcelRequire("C8f4u");var U=parcelRequire("bbEVz"),C=parcelRequire("65o8H"),F=parcelRequire("l9coV"),D=parcelRequire("8Ds3E"),G=parcelRequire("epcse"),$=parcelRequire("gZQ5x");parcelRequire("9o6rD");var k=parcelRequire("e8VFW"),Y=parcelRequire("8N8qj");class B{static{this.UNARY_OPERATORS_MAP=new Map([[c.Operation.UNARY_BITWISE_COMPLEMENT,new(0,F.BitwiseComplementOperator)],[c.Operation.UNARY_LOGICAL_NOT,new(0,D.LogicalNotOperator)],[c.Operation.UNARY_MINUS,new(0,U.ArithmeticUnaryMinusOperator)],[c.Operation.UNARY_PLUS,new(0,C.ArithmeticUnaryPlusOperator)]])}static{this.TERNARY_OPERATORS_MAP=new Map([[c.Operation.CONDITIONAL_TERNARY_OPERATOR,new(0,k.ConditionalTernaryOperator)]])}static{this.BINARY_OPERATORS_MAP=new Map([[c.Operation.ADDITION,new(0,m.ArithmeticAdditionOperator)],[c.Operation.DIVISION,new(0,p.ArithmeticDivisionOperator)],[c.Operation.INTEGER_DIVISION,new(0,A.ArithmeticIntegerDivisionOperator)],[c.Operation.MOD,new(0,h.ArithmeticModulusOperator)],[c.Operation.MULTIPLICATION,new(0,T.ArithmeticMultiplicationOperator)],[c.Operation.SUBTRACTION,new(0,g.ArithmeticSubtractionOperator)],[c.Operation.BITWISE_AND,new(0,f.BitwiseAndOperator)],[c.Operation.BITWISE_LEFT_SHIFT,new(0,N.BitwiseLeftShiftOperator)],[c.Operation.BITWISE_OR,new(0,M.BitwiseOrOperator)],[c.Operation.BITWISE_RIGHT_SHIFT,new(0,_.BitwiseRightShiftOperator)],[c.Operation.BITWISE_UNSIGNED_RIGHT_SHIFT,new(0,d.BitwiseUnsignedRightShiftOperator)],[c.Operation.BITWISE_XOR,new(0,O.BitwiseXorOperator)],[c.Operation.AND,new(0,P.LogicalAndOperator)],[c.Operation.EQUAL,new(0,x.LogicalEqualOperator)],[c.Operation.GREATER_THAN,new(0,I.LogicalGreaterThanOperator)],[c.Operation.GREATER_THAN_EQUAL,new(0,y.LogicalGreaterThanEqualOperator)],[c.Operation.LESS_THAN,new(0,v.LogicalLessThanOperator)],[c.Operation.LESS_THAN_EQUAL,new(0,w.LogicalLessThanEqualOperator)],[c.Operation.OR,new(0,L.LogicalOrOperator)],[c.Operation.NOT_EQUAL,new(0,V.LogicalNotEqualOperator)],[c.Operation.NULLISH_COALESCING_OPERATOR,new(0,l.LogicalNullishCoalescingOperator)],[c.Operation.ARRAY_OPERATOR,new(0,R.ArrayOperator)],[c.Operation.ARRAY_RANGE_INDEX_OPERATOR,new(0,S.ArrayRangeOperator)],[c.Operation.OBJECT_OPERATOR,new(0,b.ObjectOperator)]])}static{this.UNARY_OPERATORS_MAP_KEY_SET=new Set(B.UNARY_OPERATORS_MAP.keys())}constructor(e){this.internalTokenValueExtractor=new(0,Y.ExpressionInternalValueExtractor),e instanceof o.Expression?(this.exp=e,this.expression=this.exp.getExpression()):this.expression=e}evaluate(e){let t=this.processNestingExpression(this.expression,e);return this.expression=t.getT1(),this.exp=t.getT2(),(e=new Map(e.entries())).set(this.internalTokenValueExtractor.getPrefix(),this.internalTokenValueExtractor),this.evaluateExpression(this.exp,e)}processNestingExpression(e,t){let a=0,n=0,s=new(0,r.LinkedList);for(;n<e.length-1;){if("{"==e.charAt(n)&&"{"==e.charAt(n+1))0==a&&s.push(new(0,$.Tuple2)(n+2,-1)),a++,n++;else if("}"==e.charAt(n)&&"}"==e.charAt(n+1)){if(--a<0)throw new(0,i.ExpressionEvaluationException)(e,"Expecting {{ nesting path operator to be started before closing");0==a&&s.push(s.pop().setT2(n)),n++}n++}let E=this.replaceNestingExpression(e,t,s);return new(0,$.Tuple2)(E,new(0,o.Expression)(E))}replaceNestingExpression(e,t,a){let r=e;for(let n of a.toArray()){if(-1==n.getT2())throw new(0,i.ExpressionEvaluationException)(e,"Expecting }} nesting path operator to be closed");let a=new B(r.substring(n.getT1(),n.getT2())).evaluate(t);r=r.substring(0,n.getT1()-2)+a+r.substring(n.getT2()+2)}return r}getExpression(){return this.exp||(this.exp=new(0,o.Expression)(this.expression)),this.exp}getExpressionString(){return this.expression}evaluateExpression(e,t){let r=e.getOperations(),n=e.getTokens();for(;!r.isEmpty();){let e=r.pop(),a=n.pop();if(B.UNARY_OPERATORS_MAP_KEY_SET.has(e))n.push(this.applyUnaryOperation(e,this.getValueFromToken(t,a)));else if(e==c.Operation.OBJECT_OPERATOR||e==c.Operation.ARRAY_OPERATOR)this.processObjectOrArrayOperator(t,r,n,e,a);else if(e==c.Operation.CONDITIONAL_TERNARY_OPERATOR){let r=n.pop(),s=n.pop(),i=this.getValueFromToken(t,s),o=this.getValueFromToken(t,r),E=this.getValueFromToken(t,a);n.push(this.applyTernaryOperation(e,i,o,E))}else{let r=n.pop(),s=this.getValueFromToken(t,r),i=this.getValueFromToken(t,a);n.push(this.applyBinaryOperation(e,s,i))}}if(n.isEmpty())throw new(0,a.ExecutionException)(s.StringFormatter.format("Expression : $ evaluated to null",e));if(1!=n.size())throw new(0,a.ExecutionException)(s.StringFormatter.format("Expression : $ evaluated multiple values $",e,n));let i=n.get(0);if(i instanceof u.ExpressionTokenValue)return i.getElement();if(!(i instanceof o.Expression))return this.getValueFromToken(t,i);throw new(0,a.ExecutionException)(s.StringFormatter.format("Expression : $ evaluated to $",e,n.get(0)))}processObjectOrArrayOperator(e,t,a,s,i){let l=new(0,r.LinkedList),m=new(0,r.LinkedList);if(!s||!i)return;do m.push(s),i instanceof o.Expression?l.push(new(0,u.ExpressionTokenValue)(i.toString(),this.evaluateExpression(i,e))):i&&l.push(i),i=a.isEmpty()?void 0:a.pop(),s=t.isEmpty()?void 0:t.pop();while(s==c.Operation.OBJECT_OPERATOR||s==c.Operation.ARRAY_OPERATOR)i&&(i instanceof o.Expression?l.push(new(0,u.ExpressionTokenValue)(i.toString(),this.evaluateExpression(i,e))):l.push(i)),s&&t.push(s);let p=l.pop();if(p instanceof u.ExpressionTokenValue&&"object"==typeof p.getTokenValue()){let e=new Date().getTime()+""+Math.round(1e3*Math.random());this.internalTokenValueExtractor.addValue(e,p.getTokenValue()),p=new(0,E.ExpressionToken)(Y.ExpressionInternalValueExtractor.PREFIX+e)}let A=new(0,n.StringBuilder)(p instanceof u.ExpressionTokenValue?p.getTokenValue():p.toString());for(;!l.isEmpty();)p=l.pop(),s=m.pop(),A.append(s.getOperator()).append(p instanceof u.ExpressionTokenValue?p.getTokenValue():p.toString()),s==c.Operation.ARRAY_OPERATOR&&A.append("]");let h=A.toString(),T=h.substring(0,h.indexOf(".")+1);if(T.length>2&&e.has(T))a.push(new(0,u.ExpressionTokenValue)(h,this.getValue(h,e)));else{let e;try{e=G.LiteralTokenValueExtractor.INSTANCE.getValue(h)}catch(t){e=h}a.push(new(0,u.ExpressionTokenValue)(h,e))}}applyTernaryOperation(e,t,a,r){let n=B.TERNARY_OPERATORS_MAP.get(e);if(!n)throw new(0,i.ExpressionEvaluationException)(this.expression,s.StringFormatter.format("No operator found to evaluate $",this.getExpression()));return new(0,u.ExpressionTokenValue)(e.toString(),n.apply(t,a,r))}applyBinaryOperation(e,t,a){let r=typeof t,n=typeof a,o=B.BINARY_OPERATORS_MAP.get(e);if(("object"===r||"object"===n)&&e!==c.Operation.EQUAL&&e!==c.Operation.NOT_EQUAL&&e!==c.Operation.NULLISH_COALESCING_OPERATOR&&e!==c.Operation.AND&&e!==c.Operation.OR)throw new(0,i.ExpressionEvaluationException)(this.expression,s.StringFormatter.format("Cannot evaluate expression $ $ $",t,e.getOperator(),a));if(!o)throw new(0,i.ExpressionEvaluationException)(this.expression,s.StringFormatter.format("No operator found to evaluate $ $ $",t,e.getOperator(),a));return new(0,u.ExpressionTokenValue)(e.toString(),o.apply(t,a))}applyUnaryOperation(e,t){let a=typeof t;if(e.getOperator()!=c.Operation.NOT.getOperator()&&e.getOperator()!=c.Operation.UNARY_LOGICAL_NOT.getOperator()&&("object"===a||Array.isArray(t)))throw new(0,i.ExpressionEvaluationException)(this.expression,s.StringFormatter.format("The operator $ cannot be applied to $",e.getOperator(),t));let r=B.UNARY_OPERATORS_MAP.get(e);if(!r)throw new(0,i.ExpressionEvaluationException)(this.expression,s.StringFormatter.format("No Unary operator $ is found to apply on $",e.getOperator(),t));return new(0,u.ExpressionTokenValue)(e.toString(),r.apply(t))}getValueFromToken(e,t){return t instanceof o.Expression?this.evaluateExpression(t,e):t instanceof u.ExpressionTokenValue?t.getElement():this.getValue(t.getExpression(),e)}getValue(e,t){let a=e.substring(0,e.indexOf(".")+1);return t.has(a)?t.get(a).getValue(e):G.LiteralTokenValueExtractor.INSTANCE.getValueFromExtractors(e,t)}}}),parcelRegister("iF2mi",function(e,t){$parcel$export(e.exports,"ExecutionException",()=>a);class a extends Error{constructor(e,t){super(e),this.cause=t}getCause(){return this.cause}}}),parcelRegister("bg8NQ",function(e,t){$parcel$export(e.exports,"StringBuilder",()=>r);var a=parcelRequire("7pym4");class r{constructor(e){this.str=e??""}append(e){return this.str+=e,this}toString(){return""+this.str}trim(){return this.str=this.str.trim(),this}setLength(e){return this.str=this.str.substring(0,e),this}length(){return this.str.length}charAt(e){return this.str.charAt(e)}deleteCharAt(e){return this.checkIndex(e),this.str=this.str.substring(0,e)+this.str.substring(e+1),this}insert(e,t){return this.str=this.str.substring(0,e)+t+this.str.substring(e),this}checkIndex(e){if(e>=this.str.length)throw new(0,a.KIRuntimeException)(`Index ${e} is greater than or equal to ${this.str.length}`)}substring(e,t){return this.str.substring(e,t)}}}),parcelRegister("b3MaL",function(e,t){$parcel$export(e.exports,"ExpressionEvaluationException",()=>r);var a=parcelRequire("adJLc");class r extends Error{constructor(e,t,r){super(a.StringFormatter.format("$ : $",e,t)),this.cause=r}getCause(){return this.cause}}}),parcelRegister("9mEhX",function(e,t){$parcel$export(e.exports,"Expression",()=>l);var a=parcelRequire("d3Pq1"),r=parcelRequire("bg8NQ"),n=parcelRequire("adJLc"),s=parcelRequire("iq1c5"),i=parcelRequire("gZQ5x"),o=parcelRequire("b3MaL"),E=parcelRequire("4M204"),u=parcelRequire("iSHH5"),c=parcelRequire("6SbgP");class l extends E.ExpressionToken{constructor(e,t,r,n){super(e||""),this.tokens=new(0,a.LinkedList),this.ops=new(0,a.LinkedList),n?.getOperator()==".."&&(t?r||(r=new(0,u.ExpressionTokenValue)("","")):t=new(0,u.ExpressionTokenValue)("","")),t&&this.tokens.push(t),r&&this.tokens.push(r),n&&this.ops.push(n),this.evaluate(),this.ops.isEmpty()||".."!=this.ops.peekLast().getOperator()||1!=this.tokens.length||this.tokens.push(new(0,E.ExpressionToken)(""))}getTokens(){return this.tokens}getOperations(){return this.ops}evaluate(){let e,t=this.expression.length,a="",n=new(0,r.StringBuilder)(""),i=0,u=!1;for(;i<t;){switch(a=this.expression[i],e=n.toString(),a){case" ":u=this.processTokenSepearator(n,e,u);break;case"(":i=this.processSubExpression(t,n,e,i,u),u=!1;break;case")":throw new(0,o.ExpressionEvaluationException)(this.expression,"Extra closing parenthesis found");case"]":throw new(0,o.ExpressionEvaluationException)(this.expression,"Extra closing square bracket found");case"'":case'"':{let e=this.processStringLiteral(t,a,i);i=e.getT1(),u=e.getT2();break}case"?":if(i+1<t&&"?"!=this.expression.charAt(i+1)&&0!=i&&"?"!=this.expression.charAt(i-1))i=this.processTernaryOperator(t,n,e,i,u);else{let r=this.processOthers(a,t,n,e,i,u);i=r.getT1(),(u=r.getT2())&&this.ops.peek()==c.Operation.ARRAY_OPERATOR&&(i=(r=this.process(t,n,i)).getT1(),u=r.getT2())}break;default:let r=this.processOthers(a,t,n,e,i,u);i=r.getT1(),(u=r.getT2())&&this.ops.peek()==c.Operation.ARRAY_OPERATOR&&(i=(r=this.process(t,n,i)).getT1(),u=r.getT2())}++i}if(e=n.toString(),!s.StringUtil.isNullOrBlank(e))if(c.Operation.OPERATORS.has(e))throw new(0,o.ExpressionEvaluationException)(this.expression,"Expression is ending with an operator");else this.tokens.push(new(0,E.ExpressionToken)(e))}processStringLiteral(e,t,a){let r="",n=a+1;for(;n<e;n++){let e=this.expression.charAt(n);if(e==t&&"\\"!=this.expression.charAt(n-1))break;r+=e}if(n==e&&this.expression.charAt(n-1)!=t)throw new(0,o.ExpressionEvaluationException)(this.expression,"Missing string ending marker "+t);let s=new(0,i.Tuple2)(n,!1);return this.tokens.push(new(0,u.ExpressionTokenValue)(r,r)),s}process(e,t,a){let r=1;for(++a;a<e&&0!=r;){let e=this.expression.charAt(a);"]"==e?--r:"["==e&&++r,0!=r&&(t.append(e),a++)}return this.tokens.push(new l(t.toString())),t.setLength(0),new(0,i.Tuple2)(a,!1)}processOthers(e,t,a,r,n,o){let u=t-n;u=u<c.Operation.BIGGEST_OPERATOR_SIZE?u:c.Operation.BIGGEST_OPERATOR_SIZE;for(let e=u;e>0;e--){let t=this.expression.substring(n,n+e);if(c.Operation.OPERATORS_WITHOUT_SPACE_WRAP.has(t))return s.StringUtil.isNullOrBlank(r)?".."==t&&this.tokens.isEmpty()&&(this.tokens.push(new(0,E.ExpressionToken)("0")),o=!1):(this.tokens.push(new(0,E.ExpressionToken)(r)),o=!1),this.checkUnaryOperator(this.tokens,this.ops,c.Operation.OPERATION_VALUE_OF.get(t),o),o=!0,a.setLength(0),new(0,i.Tuple2)(n+e-1,o)}return a.append(e),new(0,i.Tuple2)(n,!1)}processTernaryOperator(e,t,a,r,n){if(n)throw new(0,o.ExpressionEvaluationException)(this.expression,"Ternary operator is followed by an operator");""!=a.trim()&&(this.tokens.push(new l(a)),t.setLength(0));let s=1,i="",E=++r;for(;r<e&&s>0;)"?"==(i=this.expression.charAt(r))?++s:":"==i&&--s,++r;if(":"!=i)throw new(0,o.ExpressionEvaluationException)(this.expression,"':' operater is missing");if(r>=e)throw new(0,o.ExpressionEvaluationException)(this.expression,"Third part of the ternary expression is missing");for(;!this.ops.isEmpty()&&this.hasPrecedence(c.Operation.CONDITIONAL_TERNARY_OPERATOR,this.ops.peek());){let e=this.ops.pop();if(c.Operation.UNARY_OPERATORS.has(e)){let t=this.tokens.pop();this.tokens.push(new l("",t,void 0,e))}else{let t=this.tokens.pop(),a=this.tokens.pop();this.tokens.push(new l("",a,t,e))}}this.ops.push(c.Operation.CONDITIONAL_TERNARY_OPERATOR),this.tokens.push(new l(this.expression.substring(E,r-1)));let u=this.expression.substring(r);if(""===u.trim())throw new(0,o.ExpressionEvaluationException)(this.expression,"Third part of the ternary expression is missing");return this.tokens.push(new l(u)),e-1}processSubExpression(e,t,a,i,E){if(c.Operation.OPERATORS.has(a))this.checkUnaryOperator(this.tokens,this.ops,c.Operation.OPERATION_VALUE_OF.get(a),E),t.setLength(0);else if(!s.StringUtil.isNullOrBlank(a))throw new(0,o.ExpressionEvaluationException)(this.expression,n.StringFormatter.format("Unkown token : $ found.",a));let u=1,m=new(0,r.StringBuilder),p=this.expression.charAt(i);for(i++;i<e&&u>0;)"("==(p=this.expression.charAt(i))?u++:")"==p&&u--,0!=u&&(m.append(p),i++);if(")"!=p)throw new(0,o.ExpressionEvaluationException)(this.expression,"Missing a closed parenthesis");for(;m.length()>2&&"("==m.charAt(0)&&")"==m.charAt(m.length()-1);)m.deleteCharAt(0),m.setLength(m.length()-1);return this.tokens.push(new l(m.toString().trim())),i}processTokenSepearator(e,t,a){return s.StringUtil.isNullOrBlank(t)||(c.Operation.OPERATORS.has(t)?(this.checkUnaryOperator(this.tokens,this.ops,c.Operation.OPERATION_VALUE_OF.get(t),a),a=!0):(this.tokens.push(new(0,E.ExpressionToken)(t)),a=!1)),e.setLength(0),a}checkUnaryOperator(e,t,a,r){if(a)if(r||e.isEmpty())if(c.Operation.UNARY_OPERATORS.has(a)){let e=c.Operation.UNARY_MAP.get(a);e&&t.push(e)}else throw new(0,o.ExpressionEvaluationException)(this.expression,n.StringFormatter.format("Extra operator $ found.",a));else{for(;!t.isEmpty()&&this.hasPrecedence(a,t.peek());){let a=t.pop();if(c.Operation.UNARY_OPERATORS.has(a)){let t=e.pop();e.push(new l("",t,void 0,a))}else{let t=e.pop(),r=e.pop();e.push(new l("",r,t,a))}}t.push(a)}}hasPrecedence(e,t){let a=c.Operation.OPERATOR_PRIORITY.get(e),r=c.Operation.OPERATOR_PRIORITY.get(t);if(!a||!r)throw Error("Unknown operators provided");return r<a}toString(){if(this.ops.isEmpty())return 1==this.tokens.size()?this.tokens.get(0).toString():"Error: No tokens";let e=new(0,r.StringBuilder),t=0,a=this.ops.toArray(),n=this.tokens.toArray();for(let r=0;r<a.length;r++)if(a[r].getOperator().startsWith("UN: "))e.append("(").append(a[r].getOperator().substring(4)).append(n[t]instanceof l?n[t].toString():n[t]).append(")"),t++;else if(a[r]==c.Operation.CONDITIONAL_TERNARY_OPERATOR){let a=n[t++];e.insert(0,(a instanceof l,a.toString())),e.insert(0,":"),a=n[t++],e.insert(0,(a instanceof l,a.toString())),e.insert(0,"?"),a=n[t++],e.insert(0,(a instanceof l,a.toString())).append(")"),e.insert(0,"(")}else{if(0==t){let a=n[t++];e.insert(0,(a instanceof l,a.toString()))}let s=n[t++];e.insert(0,a[r].getOperator()).insert(0,s instanceof l?s.toString():s?.toString()).insert(0,"(").append(")")}return e.toString()}equals(e){return this.expression==e.expression}}}),parcelRegister("4M204",function(e,t){$parcel$export(e.exports,"ExpressionToken",()=>a);class a{constructor(e){this.expression=e}getExpression(){return this.expression}toString(){return this.expression}}}),parcelRegister("iSHH5",function(e,t){$parcel$export(e.exports,"ExpressionTokenValue",()=>n);var a=parcelRequire("adJLc"),r=parcelRequire("4M204");class n extends r.ExpressionToken{constructor(e,t){super(e),this.element=t}getTokenValue(){return this.element}getElement(){return this.element}toString(){return a.StringFormatter.format("$: $",this.expression,this.element)}}}),parcelRegister("6SbgP",function(e,t){$parcel$export(e.exports,"Operation",()=>a);class a{static{this.MULTIPLICATION=new a("*")}static{this.DIVISION=new a("/")}static{this.INTEGER_DIVISION=new a("//")}static{this.MOD=new a("%")}static{this.ADDITION=new a("+")}static{this.SUBTRACTION=new a("-")}static{this.NOT=new a("not",void 0,!0)}static{this.AND=new a("and",void 0,!0)}static{this.OR=new a("or",void 0,!0)}static{this.LESS_THAN=new a("<")}static{this.LESS_THAN_EQUAL=new a("<=")}static{this.GREATER_THAN=new a(">")}static{this.GREATER_THAN_EQUAL=new a(">=")}static{this.EQUAL=new a("=")}static{this.NOT_EQUAL=new a("!=")}static{this.BITWISE_AND=new a("&")}static{this.BITWISE_OR=new a("|")}static{this.BITWISE_XOR=new a("^")}static{this.BITWISE_COMPLEMENT=new a("~")}static{this.BITWISE_LEFT_SHIFT=new a("<<")}static{this.BITWISE_RIGHT_SHIFT=new a(">>")}static{this.BITWISE_UNSIGNED_RIGHT_SHIFT=new a(">>>")}static{this.UNARY_PLUS=new a("UN: +","+")}static{this.UNARY_MINUS=new a("UN: -","-")}static{this.UNARY_LOGICAL_NOT=new a("UN: not","not")}static{this.UNARY_BITWISE_COMPLEMENT=new a("UN: ~","~")}static{this.ARRAY_OPERATOR=new a("[")}static{this.ARRAY_RANGE_INDEX_OPERATOR=new a("..")}static{this.OBJECT_OPERATOR=new a(".")}static{this.NULLISH_COALESCING_OPERATOR=new a("??")}static{this.CONDITIONAL_TERNARY_OPERATOR=new a("?")}static{this.VALUE_OF=new Map([["MULTIPLICATION",a.MULTIPLICATION],["DIVISION",a.DIVISION],["INTEGER_DIVISION",a.INTEGER_DIVISION],["MOD",a.MOD],["ADDITION",a.ADDITION],["SUBTRACTION",a.SUBTRACTION],["NOT",a.NOT],["AND",a.AND],["OR",a.OR],["LESS_THAN",a.LESS_THAN],["LESS_THAN_EQUAL",a.LESS_THAN_EQUAL],["GREATER_THAN",a.GREATER_THAN],["GREATER_THAN_EQUAL",a.GREATER_THAN_EQUAL],["EQUAL",a.EQUAL],["NOT_EQUAL",a.NOT_EQUAL],["BITWISE_AND",a.BITWISE_AND],["BITWISE_OR",a.BITWISE_OR],["BITWISE_XOR",a.BITWISE_XOR],["BITWISE_COMPLEMENT",a.BITWISE_COMPLEMENT],["BITWISE_LEFT_SHIFT",a.BITWISE_LEFT_SHIFT],["BITWISE_RIGHT_SHIFT",a.BITWISE_RIGHT_SHIFT],["BITWISE_UNSIGNED_RIGHT_SHIFT",a.BITWISE_UNSIGNED_RIGHT_SHIFT],["UNARY_PLUS",a.UNARY_PLUS],["UNARY_MINUS",a.UNARY_MINUS],["UNARY_LOGICAL_NOT",a.UNARY_LOGICAL_NOT],["UNARY_BITWISE_COMPLEMENT",a.UNARY_BITWISE_COMPLEMENT],["ARRAY_OPERATOR",a.ARRAY_OPERATOR],["ARRAY_RANGE_INDEX_OPERATOR",a.ARRAY_RANGE_INDEX_OPERATOR],["OBJECT_OPERATOR",a.OBJECT_OPERATOR],["NULLISH_COALESCING_OPERATOR",a.NULLISH_COALESCING_OPERATOR],["CONDITIONAL_TERNARY_OPERATOR",a.CONDITIONAL_TERNARY_OPERATOR]])}static{this.UNARY_OPERATORS=new Set([a.ADDITION,a.SUBTRACTION,a.NOT,a.BITWISE_COMPLEMENT,a.UNARY_PLUS,a.UNARY_MINUS,a.UNARY_LOGICAL_NOT,a.UNARY_BITWISE_COMPLEMENT])}static{this.ARITHMETIC_OPERATORS=new Set([a.MULTIPLICATION,a.DIVISION,a.INTEGER_DIVISION,a.MOD,a.ADDITION,a.SUBTRACTION])}static{this.LOGICAL_OPERATORS=new Set([a.NOT,a.AND,a.OR,a.LESS_THAN,a.LESS_THAN_EQUAL,a.GREATER_THAN,a.GREATER_THAN_EQUAL,a.EQUAL,a.NOT_EQUAL,a.NULLISH_COALESCING_OPERATOR])}static{this.BITWISE_OPERATORS=new Set([a.BITWISE_AND,a.BITWISE_COMPLEMENT,a.BITWISE_LEFT_SHIFT,a.BITWISE_OR,a.BITWISE_RIGHT_SHIFT,a.BITWISE_UNSIGNED_RIGHT_SHIFT,a.BITWISE_XOR])}static{this.CONDITIONAL_OPERATORS=new Set([a.CONDITIONAL_TERNARY_OPERATOR])}static{this.OPERATOR_PRIORITY=new Map([[a.UNARY_PLUS,1],[a.UNARY_MINUS,1],[a.UNARY_LOGICAL_NOT,1],[a.UNARY_BITWISE_COMPLEMENT,1],[a.ARRAY_OPERATOR,1],[a.OBJECT_OPERATOR,1],[a.ARRAY_RANGE_INDEX_OPERATOR,2],[a.MULTIPLICATION,2],[a.DIVISION,2],[a.INTEGER_DIVISION,2],[a.MOD,2],[a.ADDITION,3],[a.SUBTRACTION,3],[a.BITWISE_LEFT_SHIFT,4],[a.BITWISE_RIGHT_SHIFT,4],[a.BITWISE_UNSIGNED_RIGHT_SHIFT,4],[a.LESS_THAN,5],[a.LESS_THAN_EQUAL,5],[a.GREATER_THAN,5],[a.GREATER_THAN_EQUAL,5],[a.EQUAL,6],[a.NOT_EQUAL,6],[a.BITWISE_AND,7],[a.BITWISE_XOR,8],[a.BITWISE_OR,9],[a.AND,10],[a.OR,11],[a.NULLISH_COALESCING_OPERATOR,11],[a.CONDITIONAL_TERNARY_OPERATOR,12]])}static{this.OPERATORS=new Set([...Array.from(a.ARITHMETIC_OPERATORS),...Array.from(a.LOGICAL_OPERATORS),...Array.from(a.BITWISE_OPERATORS),a.ARRAY_OPERATOR,a.ARRAY_RANGE_INDEX_OPERATOR,a.OBJECT_OPERATOR,...Array.from(a.CONDITIONAL_OPERATORS)].map(e=>e.getOperator()))}static{this.OPERATORS_WITHOUT_SPACE_WRAP=new Set([...Array.from(a.ARITHMETIC_OPERATORS),...Array.from(a.LOGICAL_OPERATORS),...Array.from(a.BITWISE_OPERATORS),a.ARRAY_OPERATOR,a.ARRAY_RANGE_INDEX_OPERATOR,a.OBJECT_OPERATOR,...Array.from(a.CONDITIONAL_OPERATORS)].filter(e=>!e.shouldBeWrappedInSpace()).map(e=>e.getOperator()))}static{this.OPERATION_VALUE_OF=new Map(Array.from(a.VALUE_OF.entries()).map(([e,t])=>[t.getOperator(),t]))}static{this.UNARY_MAP=new Map([[a.ADDITION,a.UNARY_PLUS],[a.SUBTRACTION,a.UNARY_MINUS],[a.NOT,a.UNARY_LOGICAL_NOT],[a.BITWISE_COMPLEMENT,a.UNARY_BITWISE_COMPLEMENT],[a.UNARY_PLUS,a.UNARY_PLUS],[a.UNARY_MINUS,a.UNARY_MINUS],[a.UNARY_LOGICAL_NOT,a.UNARY_LOGICAL_NOT],[a.UNARY_BITWISE_COMPLEMENT,a.UNARY_BITWISE_COMPLEMENT]])}static{this.BIGGEST_OPERATOR_SIZE=Array.from(a.VALUE_OF.values()).map(e=>e.getOperator()).filter(e=>!e.startsWith("UN: ")).map(e=>e.length).reduce((e,t)=>e>t?e:t,0)}constructor(e,t,a=!1){this.operator=e,this.operatorName=t??e,this._shouldBeWrappedInSpace=a}getOperator(){return this.operator}getOperatorName(){return this.operatorName}shouldBeWrappedInSpace(){return this._shouldBeWrappedInSpace}valueOf(e){return a.VALUE_OF.get(e)}toString(){return this.operator}}}),parcelRegister("elkSx",function(e,t){var a=parcelRequire("cbl6E"),r=parcelRequire("bCDHU"),n=parcelRequire("18pw7"),s=parcelRequire("2USVH"),i=parcelRequire("GGYZO"),o=parcelRequire("iSWGS"),E=parcelRequire("gbzXt"),u=parcelRequire("4GkNl"),c=parcelRequire("2hPfU"),l=parcelRequire("hIDzR"),m=parcelRequire("b7BEJ"),p=parcelRequire("hfrdk"),A=parcelRequire("aiqFh"),h=parcelRequire("jFgTi"),T=parcelRequire("e0ivs"),g=parcelRequire("coyiG"),R=parcelRequire("2oJ6U"),S=parcelRequire("fVfWb"),f=parcelRequire("ehnae"),N=parcelRequire("CE7HI"),M=parcelRequire("k07IG"),_=parcelRequire("g5mM1"),d=parcelRequire("6qOLq"),O=parcelRequire("5tUX2"),P=parcelRequire("6raDm");$parcel$exportWildcard(e.exports,a),$parcel$exportWildcard(e.exports,r),$parcel$exportWildcard(e.exports,n),$parcel$exportWildcard(e.exports,s),$parcel$exportWildcard(e.exports,i),$parcel$exportWildcard(e.exports,o),$parcel$exportWildcard(e.exports,E),$parcel$exportWildcard(e.exports,u),$parcel$exportWildcard(e.exports,c),$parcel$exportWildcard(e.exports,l),$parcel$exportWildcard(e.exports,m),$parcel$exportWildcard(e.exports,p),$parcel$exportWildcard(e.exports,A),$parcel$exportWildcard(e.exports,h),$parcel$exportWildcard(e.exports,T),$parcel$exportWildcard(e.exports,g),$parcel$exportWildcard(e.exports,R),$parcel$exportWildcard(e.exports,S),$parcel$exportWildcard(e.exports,f),$parcel$exportWildcard(e.exports,N),$parcel$exportWildcard(e.exports,M),$parcel$exportWildcard(e.exports,_),$parcel$exportWildcard(e.exports,d),$parcel$exportWildcard(e.exports,O),$parcel$exportWildcard(e.exports,P)}),parcelRegister("cbl6E",function(e,t){$parcel$export(e.exports,"ArithmeticAdditionOperator",()=>n);var a=parcelRequire("2p8YP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return(0,a.isNullValue)(e)?t:(0,a.isNullValue)(t)?e:e+t}}}),parcelRegister("4GkNl",function(e,t){$parcel$export(e.exports,"BinaryOperator",()=>s);var a=parcelRequire("iF2mi"),r=parcelRequire("2p8YP"),n=parcelRequire("adJLc");class s{nullCheck(e,t,s){if((0,r.isNullValue)(e)||(0,r.isNullValue)(t))throw new(0,a.ExecutionException)(n.StringFormatter.format("$ cannot be applied to a null value",s.getOperatorName()))}}}),parcelRegister("bCDHU",function(e,t){$parcel$export(e.exports,"ArithmeticDivisionOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.DIVISION),e/t}}}),parcelRegister("18pw7",function(e,t){$parcel$export(e.exports,"ArithmeticIntegerDivisionOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.DIVISION),Math.floor(e/t)}}}),parcelRegister("2USVH",function(e,t){$parcel$export(e.exports,"ArithmeticModulusOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.MOD),e%t}}}),parcelRegister("GGYZO",function(e,t){$parcel$export(e.exports,"ArithmeticMultiplicationOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){this.nullCheck(e,t,a.Operation.MULTIPLICATION);let r="string"==typeof e,n=typeof t;if(r||"string"===n){let a=r?e:t,n=r?t:e,s="",i=n<0,o=Math.floor(n=Math.abs(n));for(;o-- >0;)s+=a;let E=Math.floor(a.length*(n-Math.floor(n)));if(E<0&&(E=-E),0!=E&&(s+=a.substring(0,E)),i){let e="";for(let t=s.length-1;t>=0;t--)e+=s[t];return e}return s}return e*t}}}),parcelRegister("iSWGS",function(e,t){$parcel$export(e.exports,"ArithmeticSubtractionOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.SUBTRACTION),e-t}}}),parcelRegister("gbzXt",function(e,t){$parcel$export(e.exports,"ArrayOperator",()=>s);var a=parcelRequire("iF2mi"),r=parcelRequire("adJLc"),n=parcelRequire("4GkNl");class s extends n.BinaryOperator{apply(e,t){if(!e)throw new(0,a.ExecutionException)("Cannot apply array operator on a null value");if(!t)throw new(0,a.ExecutionException)("Cannot retrive null index value");if(!Array.isArray(e)&&"string"!=typeof e)throw new(0,a.ExecutionException)(r.StringFormatter.format("Cannot retrieve value from a primitive value $",e));if(t>=e.length)throw new(0,a.ExecutionException)(r.StringFormatter.format("Cannot retrieve index $ from the array of length $",t,e.length));return e[t]}}}),parcelRegister("2hPfU",function(e,t){$parcel$export(e.exports,"BitwiseAndOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.BITWISE_AND),e&t}}}),parcelRegister("hIDzR",function(e,t){$parcel$export(e.exports,"BitwiseLeftShiftOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.BITWISE_LEFT_SHIFT),e<<t}}}),parcelRegister("b7BEJ",function(e,t){$parcel$export(e.exports,"BitwiseOrOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.BITWISE_OR),e|t}}}),parcelRegister("hfrdk",function(e,t){$parcel$export(e.exports,"BitwiseRightShiftOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.BITWISE_RIGHT_SHIFT),e>>t}}}),parcelRegister("aiqFh",function(e,t){$parcel$export(e.exports,"BitwiseUnsignedRightShiftOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.BITWISE_UNSIGNED_RIGHT_SHIFT),e>>>t}}}),parcelRegister("jFgTi",function(e,t){$parcel$export(e.exports,"BitwiseXorOperator",()=>n);var a=parcelRequire("6SbgP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return this.nullCheck(e,t,a.Operation.BITWISE_XOR),e^t}}}),parcelRegister("e0ivs",function(e,t){$parcel$export(e.exports,"LogicalAndOperator",()=>r);var a=parcelRequire("4GkNl");class r extends a.BinaryOperator{apply(e,t){return!!e&&""!==e&&!!t&&""!==t}}}),parcelRegister("coyiG",function(e,t){$parcel$export(e.exports,"LogicalEqualOperator",()=>n);var a=parcelRequire("dAuXT"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return(0,a.deepEqual)(e,t)}}}),parcelRegister("2oJ6U",function(e,t){$parcel$export(e.exports,"LogicalGreaterThanEqualOperator",()=>o);var a=parcelRequire("iF2mi"),r=parcelRequire("3tMPe"),n=parcelRequire("dcckU"),s=parcelRequire("adJLc"),i=parcelRequire("4GkNl");class o extends i.BinaryOperator{apply(e,t){let i=n.PrimitiveUtil.findPrimitiveNullAsBoolean(e),o=n.PrimitiveUtil.findPrimitiveNullAsBoolean(t);if(i.getT1()==r.SchemaType.BOOLEAN||o.getT1()==r.SchemaType.BOOLEAN)throw new(0,a.ExecutionException)(s.StringFormatter.format("Cannot compare >= with the values $ and $",i.getT2(),o.getT2()));return i.getT2()>=o.getT2()}}}),parcelRegister("dcckU",function(e,t){$parcel$export(e.exports,"PrimitiveUtil",()=>o);var a=parcelRequire("iF2mi"),r=parcelRequire("3tMPe"),n=parcelRequire("2p8YP"),s=parcelRequire("adJLc"),i=parcelRequire("gZQ5x");class o{static findPrimitiveNullAsBoolean(e){if((0,n.isNullValue)(e))return new(0,i.Tuple2)(r.SchemaType.BOOLEAN,!1);let t=typeof e;if("object"===t)throw new(0,a.ExecutionException)(s.StringFormatter.format("$ is not a primitive type",e));let E=e;return"boolean"===t?new(0,i.Tuple2)(r.SchemaType.BOOLEAN,E):"string"===t?new(0,i.Tuple2)(r.SchemaType.STRING,E):o.findPrimitiveNumberType(E)}static findPrimitive(e){if((0,n.isNullValue)(e))return new(0,i.Tuple2)(r.SchemaType.NULL,void 0);let t=typeof e;if("object"===t)throw new(0,a.ExecutionException)(s.StringFormatter.format("$ is not a primitive type",e));let E=e;return"boolean"===t?new(0,i.Tuple2)(r.SchemaType.BOOLEAN,E):"string"===t?new(0,i.Tuple2)(r.SchemaType.STRING,E):o.findPrimitiveNumberType(E)}static findPrimitiveNumberType(e){if((0,n.isNullValue)(e)||Array.isArray(e)||"object"==typeof e)throw new(0,a.ExecutionException)(s.StringFormatter.format("Unable to convert $ to a number.",e));let t=e;try{let e=t;if(Number.isInteger(e))return new(0,i.Tuple2)(r.SchemaType.LONG,e);return new(0,i.Tuple2)(r.SchemaType.DOUBLE,e)}catch(e){throw new(0,a.ExecutionException)(s.StringFormatter.format("Unable to convert $ to a number.",t),e)}}static compare(e,t){if(e==t)return 0;if((0,n.isNullValue)(e)||(0,n.isNullValue)(t))return(0,n.isNullValue)(e)?-1:1;if(Array.isArray(e)||Array.isArray(t)){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!=t.length)return e.length-t.length;for(let a=0;a<e.length;a++){let r=this.compare(e[a],t[a]);if(0!=r)return r}return 0}return Array.isArray(e)?-1:1}let a=typeof e,r=typeof t;return"object"===a||"object"===r?("object"===a&&"object"===r&&Object.keys(e).forEach(a=>{let r=this.compare(e[a],t[a]);if(0!=r)return r}),"object"===a?-1:1):this.comparePrimitive(e,t)}static comparePrimitive(e,t){return(0,n.isNullValue)(e)||(0,n.isNullValue)(t)?(0,n.isNullValue)(e)&&(0,n.isNullValue)(t)?0:(0,n.isNullValue)(e)?-1:1:e==t?0:"boolean"==typeof e||"boolean"==typeof t?e?-1:1:"string"==typeof e||"string"==typeof t?e+""<t+""?-1:1:"number"==typeof e||"number"==typeof t?e-t:0}static baseNumberType(e){return Number.isInteger(e)?r.SchemaType.LONG:r.SchemaType.DOUBLE}static toPrimitiveType(e){return e}constructor(){}}}),parcelRegister("fVfWb",function(e,t){$parcel$export(e.exports,"LogicalGreaterThanOperator",()=>o);var a=parcelRequire("iF2mi"),r=parcelRequire("3tMPe"),n=parcelRequire("dcckU"),s=parcelRequire("adJLc"),i=parcelRequire("4GkNl");class o extends i.BinaryOperator{apply(e,t){let i=n.PrimitiveUtil.findPrimitiveNullAsBoolean(e),o=n.PrimitiveUtil.findPrimitiveNullAsBoolean(t);if(i.getT1()==r.SchemaType.BOOLEAN||o.getT1()==r.SchemaType.BOOLEAN)throw new(0,a.ExecutionException)(s.StringFormatter.format("Cannot compare > with the values $ and $",i.getT2(),o.getT2()));return i.getT2()>o.getT2()}}}),parcelRegister("ehnae",function(e,t){$parcel$export(e.exports,"LogicalLessThanEqualOperator",()=>o);var a=parcelRequire("iF2mi"),r=parcelRequire("3tMPe"),n=parcelRequire("dcckU"),s=parcelRequire("adJLc"),i=parcelRequire("4GkNl");class o extends i.BinaryOperator{apply(e,t){let i=n.PrimitiveUtil.findPrimitiveNullAsBoolean(e),o=n.PrimitiveUtil.findPrimitiveNullAsBoolean(t);if(i.getT1()==r.SchemaType.BOOLEAN||o.getT1()==r.SchemaType.BOOLEAN)throw new(0,a.ExecutionException)(s.StringFormatter.format("Cannot compare <= with the values $ and $",i.getT2(),o.getT2()));return i.getT2()<=o.getT2()}}}),parcelRegister("CE7HI",function(e,t){$parcel$export(e.exports,"LogicalNotEqualOperator",()=>n);var a=parcelRequire("dAuXT"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return!(0,a.deepEqual)(e,t)}}}),parcelRegister("k07IG",function(e,t){$parcel$export(e.exports,"LogicalLessThanOperator",()=>o);var a=parcelRequire("iF2mi"),r=parcelRequire("3tMPe"),n=parcelRequire("dcckU"),s=parcelRequire("adJLc"),i=parcelRequire("4GkNl");class o extends i.BinaryOperator{apply(e,t){let i=n.PrimitiveUtil.findPrimitiveNullAsBoolean(e),o=n.PrimitiveUtil.findPrimitiveNullAsBoolean(t);if(i.getT1()==r.SchemaType.BOOLEAN||o.getT1()==r.SchemaType.BOOLEAN)throw new(0,a.ExecutionException)(s.StringFormatter.format("Cannot compare < with the values $ and $",i.getT2(),o.getT2()));return i.getT2()<o.getT2()}}}),parcelRegister("g5mM1",function(e,t){$parcel$export(e.exports,"LogicalOrOperator",()=>r);var a=parcelRequire("4GkNl");class r extends a.BinaryOperator{apply(e,t){return!!e&&""!==e||!!t&&""!==t}}}),parcelRegister("6qOLq",function(e,t){$parcel$export(e.exports,"ObjectOperator",()=>s);var a=parcelRequire("iF2mi"),r=parcelRequire("adJLc"),n=parcelRequire("4GkNl");class s extends n.BinaryOperator{apply(e,t){if(!e)throw new(0,a.ExecutionException)("Cannot apply array operator on a null value");if(!t)throw new(0,a.ExecutionException)("Cannot retrive null property value");let n=typeof e;if(!Array.isArray(e)&&"string"!=n&&"object"!=n)throw new(0,a.ExecutionException)(r.StringFormatter.format("Cannot retrieve value from a primitive value $",e));return e[t]}}}),parcelRegister("5tUX2",function(e,t){$parcel$export(e.exports,"LogicalNullishCoalescingOperator",()=>n);var a=parcelRequire("2p8YP"),r=parcelRequire("4GkNl");class n extends r.BinaryOperator{apply(e,t){return(0,a.isNullValue)(e)?t:e}}}),parcelRegister("6raDm",function(e,t){$parcel$export(e.exports,"ArrayRangeOperator",()=>r);var a=parcelRequire("4GkNl");class r extends a.BinaryOperator{apply(e,t){return`${e??""}..${t??""}`}}}),parcelRegister("C8f4u",function(e,t){var a=parcelRequire("bbEVz"),r=parcelRequire("65o8H"),n=parcelRequire("l9coV"),s=parcelRequire("8Ds3E"),i=parcelRequire("3ExYE");$parcel$exportWildcard(e.exports,a),$parcel$exportWildcard(e.exports,r),$parcel$exportWildcard(e.exports,n),$parcel$exportWildcard(e.exports,s),$parcel$exportWildcard(e.exports,i)}),parcelRegister("bbEVz",function(e,t){$parcel$export(e.exports,"ArithmeticUnaryMinusOperator",()=>s);var a=parcelRequire("dcckU"),r=parcelRequire("6SbgP"),n=parcelRequire("3ExYE");class s extends n.UnaryOperator{apply(e){return this.nullCheck(e,r.Operation.UNARY_MINUS),a.PrimitiveUtil.findPrimitiveNumberType(e),-e}}}),parcelRegister("3ExYE",function(e,t){$parcel$export(e.exports,"UnaryOperator",()=>s);var a=parcelRequire("iF2mi"),r=parcelRequire("2p8YP"),n=parcelRequire("adJLc");class s{nullCheck(e,t){if((0,r.isNullValue)(e))throw new(0,a.ExecutionException)(n.StringFormatter.format("$ cannot be applied to a null value",t.getOperatorName()))}}}),parcelRegister("65o8H",function(e,t){$parcel$export(e.exports,"ArithmeticUnaryPlusOperator",()=>s);var a=parcelRequire("dcckU"),r=parcelRequire("6SbgP"),n=parcelRequire("3ExYE");class s extends n.UnaryOperator{apply(e){return this.nullCheck(e,r.Operation.UNARY_PLUS),a.PrimitiveUtil.findPrimitiveNumberType(e),e}}}),parcelRegister("l9coV",function(e,t){$parcel$export(e.exports,"BitwiseComplementOperator",()=>E);var a=parcelRequire("iF2mi"),r=parcelRequire("3tMPe"),n=parcelRequire("dcckU"),s=parcelRequire("adJLc"),i=parcelRequire("6SbgP"),o=parcelRequire("3ExYE");class E extends o.UnaryOperator{apply(e){this.nullCheck(e,i.Operation.UNARY_BITWISE_COMPLEMENT);let t=n.PrimitiveUtil.findPrimitiveNumberType(e);if(t.getT1()!=r.SchemaType.INTEGER&&t.getT1()!=r.SchemaType.LONG)throw new(0,a.ExecutionException)(s.StringFormatter.format("Unable to apply bitwise operator on $",e));return~e}}}),parcelRegister("8Ds3E",function(e,t){$parcel$export(e.exports,"LogicalNotOperator",()=>r);var a=parcelRequire("3ExYE");class r extends a.UnaryOperator{apply(e){return!e&&""!==e}}}),parcelRegister("epcse",function(e,t){$parcel$export(e.exports,"LiteralTokenValueExtractor",()=>o);var a=parcelRequire("adJLc"),r=parcelRequire("iq1c5"),n=parcelRequire("b3MaL"),s=parcelRequire("8loiD");let i=new Map([["true",!0],["false",!1],["null",void 0],["undefined",void 0]]);class o extends s.TokenValueExtractor{static{this.INSTANCE=new o}getValueInternal(e){if(!r.StringUtil.isNullOrBlank(e))return(e=e.trim(),i.has(e))?i.get(e):e.startsWith('"')?this.processString(e):this.processNumbers(e)}processNumbers(e){try{let t=Number(e);if(isNaN(t))throw Error("Parse number error");return t}catch(t){throw new(0,n.ExpressionEvaluationException)(e,a.StringFormatter.format("Unable to parse the literal or expression $",e),t)}}processString(e){if(!e.endsWith('"'))throw new(0,n.ExpressionEvaluationException)(e,a.StringFormatter.format("String literal $ is not closed properly",e));return e.substring(1,e.length-1)}getPrefix(){return""}getStore(){}getValueFromExtractors(e,t){return t.has(e+".")?t.get(e+".")?.getStore():this.getValue(e)}}}),parcelRegister("8loiD",function(e,t){$parcel$export(e.exports,"TokenValueExtractor",()=>o);var a=parcelRequire("7pym4"),r=parcelRequire("2p8YP"),n=parcelRequire("adJLc"),s=parcelRequire("iq1c5"),i=parcelRequire("b3MaL");class o{static{this.REGEX_SQUARE_BRACKETS=/[\[\]]/}static{this.REGEX_DOT=/(?<!\.)\.(?!\.)/}getValue(e){let t=this.getPrefix();if(!e.startsWith(t))throw new(0,a.KIRuntimeException)(n.StringFormatter.format("Token $ doesn't start with $",e,t));if(e.endsWith(".__index")){let t=e.substring(0,e.length-8),a=this.getValueInternal(t);if(!(0,r.isNullValue)(a?.__index))return a.__index;if(!t.endsWith("]"))return t.substring(t.lastIndexOf(".")+1);{let e=t.substring(t.lastIndexOf("[")+1,t.length-1),a=parseInt(e);return isNaN(a)?e:a}}return this.getValueInternal(e)}retrieveElementFrom(e,t,a,n){if((0,r.isNullValue)(n))return;if(t.length==a)return n;let i=t[a].split(o.REGEX_SQUARE_BRACKETS).map(e=>e.trim()).filter(e=>!s.StringUtil.isNullOrBlank(e)).reduce((r,n)=>this.resolveForEachPartOfTokenWithBrackets(e,t,a,n,r),n);return this.retrieveElementFrom(e,t,a+1,i)}resolveForEachPartOfTokenWithBrackets(e,t,a,n,s){if(!(0,r.isNullValue)(s))return"length"===n?this.getLength(e,s):"string"==typeof s||Array.isArray(s)?this.handleArrayAccess(e,n,s):this.handleObjectAccess(e,t,a,n,s)}getLength(e,t){let a=typeof t;if("string"===a||Array.isArray(t))return t.length;if("object"===a)if("length"in t)return t.length;else return Object.keys(t).length;throw new(0,i.ExpressionEvaluationException)(e,n.StringFormatter.format("Length can't be found in token $",e))}handleArrayAccess(e,t,a){let r=t.indexOf("..");if(r>=0){let e=t.substring(0,r),n=t.substring(r+2),s=0==e.length?0:parseInt(e),i=0==n.length?a.length:parseInt(n);if(isNaN(s)||isNaN(i))return;for(;s<0;)s+=a.length;for(;i<0;)i+=a.length;let o=typeof a;return s>=i?"string"==o?"":[]:"string"==o?a.substring(s,i):a.slice(s,i)}let s=parseInt(t);if(isNaN(s))throw new(0,i.ExpressionEvaluationException)(e,n.StringFormatter.format("$ is not a number",t));for(;s<0;)s=a.length+s;if(!(s>=a.length))return a[s]}handleObjectAccess(e,t,a,r,s){if(r.startsWith('"')){if(!r.endsWith('"')||1==r.length||2==r.length)throw new(0,i.ExpressionEvaluationException)(e,n.StringFormatter.format("$ is missing a double quote or empty key found",e));r=r.substring(1,t.length-2)}return this.checkIfObject(e,t,a,s),s[r]}checkIfObject(e,t,a,r){let s=typeof r;if("object"!=s&&"string"!=s||Array.isArray(r))throw new(0,i.ExpressionEvaluationException)(e,n.StringFormatter.format("Unable to retrieve $ from $ in the path $",t[a],r.toString(),e))}}}),parcelRegister("9o6rD",function(e,t){var a=parcelRequire("e8VFW");$parcel$exportWildcard(e.exports,a)}),parcelRegister("e8VFW",function(e,t){$parcel$export(e.exports,"ConditionalTernaryOperator",()=>r);var a=parcelRequire("8IYTt");class r extends a.TernaryOperator{apply(e,t,a){return e?t:a}}}),parcelRegister("8IYTt",function(e,t){$parcel$export(e.exports,"TernaryOperator",()=>s);var a=parcelRequire("iF2mi"),r=parcelRequire("2p8YP"),n=parcelRequire("adJLc");class s{nullCheck(e,t,s,i){if((0,r.isNullValue)(e)||(0,r.isNullValue)(t)||(0,r.isNullValue)(s))throw new(0,a.ExecutionException)(n.StringFormatter.format("$ cannot be applied to a null value",i.getOperatorName()))}}}),parcelRegister("8N8qj",function(e,t){$parcel$export(e.exports,"ExpressionInternalValueExtractor",()=>r);var a=parcelRequire("8loiD");class r extends a.TokenValueExtractor{static{this.PREFIX="_internal."}addValue(e,t){this.values.set(e,t)}getValueInternal(e){let t=e.split(a.TokenValueExtractor.REGEX_DOT),r=t[1],n=r.indexOf("["),s=2;return -1!=n&&(r=t[1].substring(0,n),t[1]=t[1].substring(n),s=1),this.retrieveElementFrom(e,t,s,this.values.get(r))}getPrefix(){return r.PREFIX}getStore(){}constructor(...e){super(...e),this.values=new Map}}}),parcelRegister("eYHCR",function(e,t){$parcel$export(e.exports,"FunctionExecutionParameters",()=>s);var a=parcelRequire("XI8p0"),r=parcelRequire("aNpQW"),n=parcelRequire("7MgK6");class s{constructor(e,t,r){this.count=0,this.executionContext=new Map,this.valueExtractors=new Map,this.functionRepository=e,this.schemaRepository=t,this.executionId=r??(0,a.default)()}getExecutionId(){return this.executionId}getContext(){return this.context}setContext(e){this.context=e;let t=new(0,r.ContextTokenValueExtractor)(e);return this.valueExtractors.set(t.getPrefix(),t),this}getArguments(){return this.args}setArguments(e){return this.args=e,this}getEvents(){return this.events}setEvents(e){return this.events=e,this}getStatementExecution(){return this.statementExecution}setStatementExecution(e){return this.statementExecution=e,this}getSteps(){return this.steps}setSteps(e){this.steps=e;let t=new(0,n.OutputMapTokenValueExtractor)(e);return this.valueExtractors.set(t.getPrefix(),t),this}getCount(){return this.count}setCount(e){return this.count=e,this}getValuesMap(){return this.valueExtractors}getFunctionRepository(){return this.functionRepository}setFunctionRepository(e){return this.functionRepository=e,this}getSchemaRepository(){return this.schemaRepository}setSchemaRepository(e){return this.schemaRepository=e,this}addTokenValueExtractor(...e){for(let t of e)this.valueExtractors.set(t.getPrefix(),t);return this}setValuesMap(e){for(let[t,a]of e.entries())this.valueExtractors.set(t,a);return this}setExecutionContext(e){return this.executionContext=e,this}getExecutionContext(){return this.executionContext}}}),parcelRegister("XI8p0",function(e,t){$parcel$export(e.exports,"default",()=>a);function a(){var e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?a:3&a|8).toString(16)})}}),parcelRegister("aNpQW",function(e,t){$parcel$export(e.exports,"ContextTokenValueExtractor",()=>n);var a=parcelRequire("2p8YP"),r=parcelRequire("8loiD");class n extends r.TokenValueExtractor{static{this.PREFIX="Context."}constructor(e){super(),this.context=e}getValueInternal(e){let t=e.split(r.TokenValueExtractor.REGEX_DOT),a=t[1],n=a.indexOf("["),s=2;return -1!=n&&(a=t[1].substring(0,n),t[1]=t[1].substring(n),s=1),this.retrieveElementFrom(e,t,s,this.context.get(a)?.getElement())}getPrefix(){return n.PREFIX}getStore(){return(0,a.isNullValue)(this.context)?this.context:Array.from(this.context.entries()).reduce((e,[t,r])=>((0,a.isNullValue)(r)||(e[t]=r.getElement()),e),{})}}}),parcelRegister("7MgK6",function(e,t){$parcel$export(e.exports,"OutputMapTokenValueExtractor",()=>r);var a=parcelRequire("8loiD");class r extends a.TokenValueExtractor{static{this.PREFIX="Steps."}constructor(e){super(),this.output=e}getValueInternal(e){let t=e.split(a.TokenValueExtractor.REGEX_DOT),r=1,n=this.output.get(t[r++]);if(!n||r>=t.length)return;let s=n.get(t[r++]);if(!s||r>t.length)return;if(r===t.length)return s;let i=t[r].indexOf("[");if(-1===i){let a=s.get(t[r++]);return this.retrieveElementFrom(e,t,r,a)}let o=t[r].substring(0,i),E=s.get(o);return this.retrieveElementFrom(e,t,r,{[o]:E})}getPrefix(){return r.PREFIX}getStore(){return this.convertMapToObj(this.output)}convertMapToObj(e){return 0===e.size?{}:Array.from(e.entries()).reduce((e,[t,a])=>(e[t]=a instanceof Map?this.convertMapToObj(a):a,e),{})}}}),parcelRegister("4FdqD",function(e,t){$parcel$export(e.exports,"ExecutionGraph",()=>n);var a=parcelRequire("d3Pq1"),r=parcelRequire("6Ppag");class n{constructor(e=!1){this.nodeMap=new Map,this.isSubGrph=e}getVerticesData(){return Array.from(this.nodeMap.values()).map(e=>e.getData())}addVertex(e){if(!this.nodeMap.has(e.getUniqueKey())){let t=new(0,r.GraphVertex)(this,e);this.nodeMap.set(e.getUniqueKey(),t)}return this.nodeMap.get(e.getUniqueKey())}getVertex(e){return this.nodeMap.get(e)}getVertexData(e){if(this.nodeMap.has(e))return this.nodeMap.get(e).getData()}getVerticesWithNoIncomingEdges(){return Array.from(this.nodeMap.values()).filter(e=>!e.hasIncomingEdges())}isCyclic(){let e,t=new(0,a.LinkedList)(this.getVerticesWithNoIncomingEdges()),r=new Set;for(;!t.isEmpty();){if(r.has(t.getFirst().getKey()))return!0;e=t.removeFirst(),r.add(e.getKey()),e.hasOutgoingEdges()&&t.addAll(Array.from(e.getOutVertices().values()).flatMap(e=>Array.from(e)))}return!1}addVertices(e){for(let t of e)this.addVertex(t)}getNodeMap(){return this.nodeMap}isSubGraph(){return this.isSubGrph}toString(){return"Execution Graph : \n"+Array.from(this.nodeMap.values()).map(e=>e.toString()).join("\n")}}}),parcelRegister("6Ppag",function(e,t){$parcel$export(e.exports,"GraphVertex",()=>s);var a=parcelRequire("d3Pq1"),r=parcelRequire("gZQ5x"),n=parcelRequire("4FdqD");class s{constructor(e,t){this.outVertices=new Map,this.inVertices=new Set,this.data=t,this.graph=e}getData(){return this.data}setData(e){return this.data=e,this}getOutVertices(){return this.outVertices}setOutVertices(e){return this.outVertices=e,this}getInVertices(){return this.inVertices}setInVertices(e){return this.inVertices=e,this}getGraph(){return this.graph}setGraph(e){return this.graph=e,this}getKey(){return this.data.getUniqueKey()}addOutEdgeTo(e,t){return this.outVertices.has(e)||this.outVertices.set(e,new Set),this.outVertices.get(e).add(t),t.inVertices.add(new(0,r.Tuple2)(this,e)),t}addInEdgeTo(e,t){return this.inVertices.add(new(0,r.Tuple2)(e,t)),e.outVertices.has(t)||e.outVertices.set(t,new Set),e.outVertices.get(t).add(this),e}hasIncomingEdges(){return!!this.inVertices.size}hasOutgoingEdges(){return!!this.outVertices.size}getSubGraphOfType(e){let t=new(0,n.ExecutionGraph)(!0);var r=new(0,a.LinkedList)(Array.from(this.outVertices.get(e)??[]));for(r.map(e=>e.getData()).forEach(e=>t.addVertex(e));!r.isEmpty();)Array.from(r.pop().outVertices.values()).flatMap(e=>Array.from(e)).forEach(e=>{t.addVertex(e.getData()),r.add(e)});return t}toString(){var e=Array.from(this.getInVertices()).map(e=>e.getT1().getKey()+"("+e.getT2()+")").join(", "),t=Array.from(this.outVertices.entries()).map(([e,t])=>e+": "+Array.from(t).map(e=>e.getKey()).join(",")).join("\n ");return this.getKey()+":\n In: "+e+"\n Out: \n "+t}}}),parcelRegister("f464r",function(e,t){$parcel$export(e.exports,"StatementExecution",()=>r);var a=parcelRequire("2Jva3");class r{constructor(e){this.messages=[],this.dependencies=new Set,this.statement=e}getStatement(){return this.statement}setStatement(e){return this.statement=e,this}getMessages(){return this.messages}setMessages(e){return this.messages=e,this}getDependencies(){return this.dependencies}setDependencies(e){return this.dependencies=e,this}getUniqueKey(){return this.statement.getStatementName()}addMessage(e,t){this.messages.push(new(0,a.StatementMessage)(e,t))}addDependency(e){this.dependencies.add(e)}getDepenedencies(){return this.dependencies}equals(e){return e instanceof r&&e.statement.equals(this.statement)}}}),parcelRegister("2Jva3",function(e,t){$parcel$export(e.exports,"StatementMessage",()=>a);class a{constructor(e,t){this.message=t,this.messageType=e}getMessageType(){return this.messageType}setMessageType(e){return this.messageType=e,this}getMessage(){return this.message}setMessage(e){return this.message=e,this}toString(){return`${this.messageType} : ${this.message}`}}}),parcelRegister("7RwLL",function(e,t){$parcel$export(e.exports,"StatementMessageType",()=>a);var a=function(e){return e.ERROR="ERROR",e.WARNING="WARNING",e.MESSAGE="MESSAGE",e}({})}),parcelRegister("jNXns",function(e,t){$parcel$export(e.exports,"ArgumentsTokenValueExtractor",()=>n);var a=parcelRequire("2p8YP"),r=parcelRequire("8loiD");class n extends r.TokenValueExtractor{static{this.PREFIX="Arguments."}constructor(e){super(),this.args=e}getValueInternal(e){let t=e.split(r.TokenValueExtractor.REGEX_DOT),a=t[1],n=a.indexOf("["),s=2;return -1!=n&&(a=t[1].substring(0,n),t[1]=t[1].substring(n),s=1),this.retrieveElementFrom(e,t,s,this.args.get(a))}getPrefix(){return n.PREFIX}getStore(){return(0,a.isNullValue)(this.args)?this.args:Array.from(this.args.entries()).reduce((e,[t,a])=>(e[t]=a,e),{})}}});var $bea0942547e00cd4$exports={};$parcel$export($bea0942547e00cd4$exports,"KIRunSchemaRepository",()=>$bea0942547e00cd4$export$a0de004d4b269741);var $5b9i6=parcelRequire("5b9i6"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$c501efceca87a708$exports={};$parcel$export($c501efceca87a708$exports,"MapUtil",()=>$c501efceca87a708$export$92eaabd025f1e921),$parcel$export($c501efceca87a708$exports,"MapEntry",()=>$c501efceca87a708$export$4758715d917352b9);var $2p8YP=parcelRequire("2p8YP");class $c501efceca87a708$export$92eaabd025f1e921{static of(e,t,a,r,n,s,i,o,E,u,c,l,m,p,A,h,T,g,R,S){let f=new Map;return(0,$2p8YP.isNullValue)(e)||(0,$2p8YP.isNullValue)(t)||f.set(e,t),(0,$2p8YP.isNullValue)(a)||(0,$2p8YP.isNullValue)(r)||f.set(a,r),(0,$2p8YP.isNullValue)(n)||(0,$2p8YP.isNullValue)(s)||f.set(n,s),(0,$2p8YP.isNullValue)(i)||(0,$2p8YP.isNullValue)(o)||f.set(i,o),(0,$2p8YP.isNullValue)(E)||(0,$2p8YP.isNullValue)(u)||f.set(E,u),(0,$2p8YP.isNullValue)(c)||(0,$2p8YP.isNullValue)(l)||f.set(c,l),(0,$2p8YP.isNullValue)(m)||(0,$2p8YP.isNullValue)(p)||f.set(m,p),(0,$2p8YP.isNullValue)(A)||(0,$2p8YP.isNullValue)(h)||f.set(A,h),(0,$2p8YP.isNullValue)(T)||(0,$2p8YP.isNullValue)(g)||f.set(T,g),(0,$2p8YP.isNullValue)(R)||(0,$2p8YP.isNullValue)(S)||f.set(R,S),f}static ofArrayEntries(...e){let t=new Map;for(let[a,r]of e)t.set(a,r);return t}static entry(e,t){return new $c501efceca87a708$export$4758715d917352b9(e,t)}static ofEntries(...e){let t=new Map;for(let a of e)t.set(a.k,a.v);return t}static ofEntriesArray(...e){let t=new Map;for(let a=0;a<e.length;a++)t.set(e[a][0],e[a][1]);return t}constructor(){}}class $c501efceca87a708$export$4758715d917352b9{constructor(e,t){this.k=e,this.v=t}}class $bea0942547e00cd4$export$a0de004d4b269741{constructor(){this.map=new Map([["any",$5b9i6.Schema.ofAny("any").setNamespace($76i8S.Namespaces.SYSTEM)],["boolean",$5b9i6.Schema.ofBoolean("boolean").setNamespace($76i8S.Namespaces.SYSTEM)],["double",$5b9i6.Schema.ofDouble("double").setNamespace($76i8S.Namespaces.SYSTEM)],["float",$5b9i6.Schema.ofFloat("float").setNamespace($76i8S.Namespaces.SYSTEM)],["integer",$5b9i6.Schema.ofInteger("integer").setNamespace($76i8S.Namespaces.SYSTEM)],["long",$5b9i6.Schema.ofLong("long").setNamespace($76i8S.Namespaces.SYSTEM)],["number",$5b9i6.Schema.ofNumber("number").setNamespace($76i8S.Namespaces.SYSTEM)],["string",$5b9i6.Schema.ofString("string").setNamespace($76i8S.Namespaces.SYSTEM)],["Timestamp",$5b9i6.Schema.ofString("Timestamp").setNamespace($76i8S.Namespaces.DATE)],["Timeunit",$5b9i6.Schema.ofString("Timeunit").setNamespace($76i8S.Namespaces.DATE).setEnums(["YEARS","QUARTERS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","MILLISECONDS"])],["Duration",$5b9i6.Schema.ofObject("Duration").setNamespace($76i8S.Namespaces.DATE).setProperties($c501efceca87a708$export$92eaabd025f1e921.ofArrayEntries(["years",$5b9i6.Schema.ofNumber("years")],["quarters",$5b9i6.Schema.ofNumber("quarters")],["months",$5b9i6.Schema.ofNumber("months")],["weeks",$5b9i6.Schema.ofNumber("weeks")],["days",$5b9i6.Schema.ofNumber("days")],["hours",$5b9i6.Schema.ofNumber("hours")],["minutes",$5b9i6.Schema.ofNumber("minutes")],["seconds",$5b9i6.Schema.ofNumber("seconds")],["milliseconds",$5b9i6.Schema.ofNumber("milliseconds")])).setAdditionalItems($5b9i6.AdditionalType.from(!1))],["TimeObject",$5b9i6.Schema.ofObject("TimeObject").setNamespace($76i8S.Namespaces.DATE).setProperties($c501efceca87a708$export$92eaabd025f1e921.ofArrayEntries(["year",$5b9i6.Schema.ofNumber("year")],["month",$5b9i6.Schema.ofNumber("month")],["day",$5b9i6.Schema.ofNumber("day")],["hour",$5b9i6.Schema.ofNumber("hour")],["minute",$5b9i6.Schema.ofNumber("minute")],["second",$5b9i6.Schema.ofNumber("second")],["millisecond",$5b9i6.Schema.ofNumber("millisecond")])).setAdditionalItems($5b9i6.AdditionalType.from(!1))],[$eFd0g.Parameter.EXPRESSION.getName(),$eFd0g.Parameter.EXPRESSION],[$5b9i6.Schema.NULL.getName(),$5b9i6.Schema.NULL],[$5b9i6.Schema.SCHEMA.getName(),$5b9i6.Schema.SCHEMA]]),this.filterableNames=Array.from(this.map.values()).map(e=>e.getFullName())}async find(e,t){return $76i8S.Namespaces.SYSTEM!=e&&$76i8S.Namespaces.DATE!=e?Promise.resolve(void 0):Promise.resolve(this.map.get(t))}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}}var $e2e654c8c8b42b35$exports={};$parcel$export($e2e654c8c8b42b35$exports,"KIRunFunctionRepository",()=>$e2e654c8c8b42b35$export$1ef8ffe3d9ea2320);var $76i8S=parcelRequire("76i8S");function $69f0970a535da56f$export$2e2bcd8739ae039(e){return[e.getSignature().getName(),e]}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$43zhg=parcelRequire("43zhg"),$5ab241dc319ce959$exports={};$parcel$export($5ab241dc319ce959$exports,"FunctionSignature",()=>$5ab241dc319ce959$export$6ac699b48d627131);var $5b9i6=parcelRequire("5b9i6"),$76i8S=parcelRequire("76i8S"),$43zhg=parcelRequire("43zhg"),$eFd0g=parcelRequire("eFd0g");class $5ab241dc319ce959$export$6ac699b48d627131{static{this.SCHEMA_NAME="FunctionSignature"}static{this.SCHEMA=new(0,$5b9i6.Schema)().setNamespace($76i8S.Namespaces.SYSTEM).setName($5ab241dc319ce959$export$6ac699b48d627131.SCHEMA_NAME).setProperties(new Map([["name",$5b9i6.Schema.ofString("name")],["namespace",$5b9i6.Schema.ofString("namespace")],["parameters",$5b9i6.Schema.ofObject("parameters").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($eFd0g.Parameter.SCHEMA))],["events",$5b9i6.Schema.ofObject("events").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($43zhg.Event.SCHEMA))]]))}constructor(e){this.namespace="_",this.parameters=new Map,this.events=new Map,e instanceof $5ab241dc319ce959$export$6ac699b48d627131?(this.name=e.name,this.namespace=e.namespace,this.parameters=new Map(Array.from(e.parameters.entries()).map(e=>[e[0],new(0,$eFd0g.Parameter)(e[1])])),this.events=new Map(Array.from(e.events.entries()).map(e=>[e[0],new(0,$43zhg.Event)(e[1])]))):this.name=e}getNamespace(){return this.namespace}setNamespace(e){return this.namespace=e,this}getName(){return this.name}setName(e){return this.name=e,this}getParameters(){return this.parameters}setParameters(e){return this.parameters=e,this}getEvents(){return this.events}setEvents(e){return this.events=e,this}getFullName(){return this.namespace+"."+this.name}}var $eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $05fa87e807cc8279$export$d61d79577b849157 extends $d9f2y.AbstractFunction{static{this.EVENT_INDEX_NAME="index"}static{this.EVENT_RESULT_NAME="result"}static{this.EVENT_INDEX=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($05fa87e807cc8279$export$d61d79577b849157.EVENT_INDEX_NAME,$5b9i6.Schema.ofInteger($05fa87e807cc8279$export$d61d79577b849157.EVENT_INDEX_NAME)))}static{this.EVENT_RESULT_INTEGER=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,$5b9i6.Schema.ofInteger($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME)))}static{this.EVENT_RESULT_BOOLEAN=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME)))}static{this.EVENT_RESULT_ARRAY=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,$5b9i6.Schema.ofArray($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,$5b9i6.Schema.ofAny($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME))))}static{this.EVENT_RESULT_EMPTY=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of())}static{this.EVENT_RESULT_ANY=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of(this.EVENT_RESULT_NAME,$5b9i6.Schema.ofAny(this.EVENT_RESULT_NAME)))}static{this.EVENT_RESULT_OBJECT=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of(this.EVENT_RESULT_NAME,$5b9i6.Schema.ofObject(this.EVENT_RESULT_NAME)))}static{this.PARAMETER_INT_LENGTH=$eFd0g.Parameter.of("length",$5b9i6.Schema.ofInteger("length").setDefaultValue(-1))}static{this.PARAMETER_ARRAY_FIND=$eFd0g.Parameter.of("find",$5b9i6.Schema.ofArray("eachFind",$5b9i6.Schema.ofAny("eachFind")))}static{this.PARAMETER_INT_SOURCE_FROM=$eFd0g.Parameter.of("srcFrom",$5b9i6.Schema.ofInteger("srcFrom").setDefaultValue(0).setMinimum(0))}static{this.PARAMETER_INT_SECOND_SOURCE_FROM=$eFd0g.Parameter.of("secondSrcFrom",$5b9i6.Schema.ofInteger("secondSrcFrom").setDefaultValue(0))}static{this.PARAMETER_INT_FIND_FROM=$eFd0g.Parameter.of("findFrom",$5b9i6.Schema.ofInteger("findFrom").setDefaultValue(0))}static{this.PARAMETER_INT_OFFSET=$eFd0g.Parameter.of("offset",$5b9i6.Schema.ofInteger("offset").setDefaultValue(0))}static{this.PARAMETER_ROTATE_LENGTH=$eFd0g.Parameter.of("rotateLength",$5b9i6.Schema.ofInteger("rotateLength").setDefaultValue(1).setMinimum(1))}static{this.PARAMETER_BOOLEAN_ASCENDING=$eFd0g.Parameter.of("ascending",$5b9i6.Schema.ofBoolean("ascending").setDefaultValue(!0))}static{this.PARAMETER_KEY_PATH=$eFd0g.Parameter.of("keyPath",$5b9i6.Schema.ofString("keyPath").setDefaultValue(""))}static{this.PARAMETER_FIND_PRIMITIVE=$eFd0g.Parameter.of("findPrimitive",$5b9i6.Schema.of("findPrimitive",$3tMPe.SchemaType.STRING,$3tMPe.SchemaType.DOUBLE,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG))}static{this.PARAMETER_ARRAY_SOURCE=$eFd0g.Parameter.of("source",$5b9i6.Schema.ofArray("eachSource",$5b9i6.Schema.ofAny("eachSource")))}static{this.PARAMETER_ARRAY_SECOND_SOURCE=$eFd0g.Parameter.of("secondSource",$5b9i6.Schema.ofArray("eachSecondSource",$5b9i6.Schema.ofAny("eachSecondSource")))}static{this.PARAMETER_ARRAY_SOURCE_PRIMITIVE=$eFd0g.Parameter.of("source",$5b9i6.Schema.ofArray("eachSource",new(0,$5b9i6.Schema)().setName("eachSource").setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.STRING,$3tMPe.SchemaType.NULL,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.DOUBLE,$3tMPe.SchemaType.LONG))))}static{this.PARAMETER_BOOLEAN_DEEP_COPY=$eFd0g.Parameter.of("deepCopy",$5b9i6.Schema.ofBoolean("deepCopy").setDefaultValue(!0))}static{this.PARAMETER_ANY=$eFd0g.Parameter.of("element",$5b9i6.Schema.ofAny("element"))}static{this.PARAMETER_ANY_ELEMENT_OBJECT=$eFd0g.Parameter.of("elementObject",$5b9i6.Schema.ofAny("elementObject"))}static{this.PARAMETER_ANY_VAR_ARGS=$eFd0g.Parameter.of("element",$5b9i6.Schema.ofAny("element")).setVariableArgument(!0)}static{this.PARAMETER_ARRAY_RESULT=$eFd0g.Parameter.of($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,$5b9i6.Schema.ofArray("eachResult",$5b9i6.Schema.ofAny("eachResult")))}constructor(e,t,a){super();let r=new Map;for(let e of t)r.set(e.getParameterName(),e);this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e).setNamespace($76i8S.Namespaces.SYSTEM_ARRAY).setParameters(r).setEvents($c501efceca87a708$export$92eaabd025f1e921.of(a.getName(),a))}getSignature(){return this.signature}}class $b78f036338a00fcf$export$e55b597c359d82cd extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Concatenate",[$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE,$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SECOND_SOURCE],$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName());return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,[...t,...a]]]))])}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $8406bf7d03089431$export$fe845828af6718ad extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("AddFirst",[$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE,$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ANY],$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ANY.getParameterName());if(0==(t=[...t]).length)return t.push(a),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([]))]);t.push(a);let r=t.length-1;for(;r>0;){let e=t[r-1];t[r-1]=t[r],t[r--]=e}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}var $5b9i6=parcelRequire("5b9i6"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g");let $095a6913aa759aea$var$KEY_NAME="keyName";class $095a6913aa759aea$export$f33443386c43236a extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("ArrayToArrayOfObjects",[$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE,$eFd0g.Parameter.of($095a6913aa759aea$var$KEY_NAME,$5b9i6.Schema.ofString($095a6913aa759aea$var$KEY_NAME),!0)],$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($095a6913aa759aea$export$f33443386c43236a.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($095a6913aa759aea$var$KEY_NAME);if(!t?.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,[]]]))]);let r=t.map(e=>{let t={};if(Array.isArray(e))if(a.length)a.forEach((a,r)=>{t[a]=e[r]});else for(let a=0;a<e.length;a++)t[`value${a+1}`]=e[a];else t[a.length?a[0]:"value"]=e;return t});return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,r]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $c16321bbe3b4fd9a$export$72555ce28d3458cb extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("BinarySearch",[$c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_ARRAY_SOURCE_PRIMITIVE,$c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_INT_SOURCE_FROM,$c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_FIND_PRIMITIVE,$c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_INT_LENGTH],$c16321bbe3b4fd9a$export$72555ce28d3458cb.EVENT_INDEX)}async internalExecute(e){let t=e?.getArguments()?.get($c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_FIND_PRIMITIVE.getParameterName()),n=e?.getArguments()?.get($c16321bbe3b4fd9a$export$72555ce28d3458cb.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length||a<0||a>t.length)throw new(0,$7pym4.KIRuntimeException)("Search source array cannot be empty");if(-1==n&&(n=t.length-a),(n=a+n)>t.length)throw new(0,$7pym4.KIRuntimeException)("End point for array cannot be more than the size of the source array");let s=-1;for(;a<=n;){let e=Math.floor((a+n)/2);if(0==$dcckU.PrimitiveUtil.compare(t[e],r)){s=e;break}$dcckU.PrimitiveUtil.compare(t[e],r)>0?n=e-1:a=e+1}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$c16321bbe3b4fd9a$export$72555ce28d3458cb.EVENT_INDEX_NAME,s]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$c2c0827e90553522$exports={};$parcel$export($c2c0827e90553522$exports,"ArrayUtil",()=>$c2c0827e90553522$export$bdb0fa2261d7dee1);class $c2c0827e90553522$export$bdb0fa2261d7dee1{static removeAListFrom(e,t){if(!t||!e||!e.length||!t.length)return;let a=new Set(t);for(let t=0;t<e.length;t++)a.has(e[t])&&(e.splice(t,1),t--)}static of(...e){let t=Array(e.length);for(let a=0;a<e.length;a++)t[a]=e[a];return t}constructor(){}}var $2p8YP=parcelRequire("2p8YP"),$adJLc=parcelRequire("adJLc");class $135c784f9ab62693$export$2c1d9c1fe3e6577a extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Compare",$c2c0827e90553522$export$bdb0fa2261d7dee1.of($135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_ARRAY_SOURCE,$135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_INT_SOURCE_FROM,$135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_ARRAY_FIND,$135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_INT_FIND_FROM,$135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_INT_LENGTH),$135c784f9ab62693$export$2c1d9c1fe3e6577a.EVENT_RESULT_INTEGER)}async internalExecute(e){var t=e?.getArguments()?.get($135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_ARRAY_FIND.getParameterName()),n=e?.getArguments()?.get($135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_INT_FIND_FROM.getParameterName()),s=e?.getArguments()?.get($135c784f9ab62693$export$2c1d9c1fe3e6577a.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length)throw new(0,$7pym4.KIRuntimeException)("Compare source array cannot be empty");if(0==r.length)throw new(0,$7pym4.KIRuntimeException)("Compare find array cannot be empty");if(-1==s&&(s=t.length-a),a+s>t.length)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Source array size $ is less than comparing size $",t.length,a+s));if(n+s>r.length)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Find array size $ is less than comparing size $",r.length,n+s));return new(0,$aHmki.FunctionOutput)($c2c0827e90553522$export$bdb0fa2261d7dee1.of($lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($135c784f9ab62693$export$2c1d9c1fe3e6577a.EVENT_RESULT_NAME,this.compare(t,a,a+s,r,n,n+s)))))}compare(e,t,a,r,n,s){if(a<t){let e=t;t=a,a=e}if(s<n){let e=n;n=s,s=e}if(a-t!=s-n)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Cannot compare uneven arrays from $ to $ in source array with $ to $ in find array",a,t,s,n));for(let s=t,i=n;s<a;s++,i++){let t=1;if((0,$2p8YP.isNullValue)(e[s])||(0,$2p8YP.isNullValue)(r[i])){let a=(0,$2p8YP.isNullValue)(e[s]);a==(0,$2p8YP.isNullValue)(r[i])?t=0:a&&(t=-1)}else{let a=typeof e[s],n=typeof r[i];if("object"===a||"object"===n)t=1;else if("string"===a||"string"===n){let a=""+e[s],n=""+r[i];a===n?t=0:a<n&&(t=-1)}else"boolean"===a||"boolean"===n?t=+(a!=n):"number"===a&&"number"===n&&(t=e[s]-r[i])}if(0!=t)return t}return 0}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$2p8YP=parcelRequire("2p8YP"),$8e1fd87e141fe827$exports={};function $8e1fd87e141fe827$export$ecd5e8ace626722c(e){return e?"function"==typeof globalThis.structuredClone?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e)):e}$parcel$export($8e1fd87e141fe827$exports,"duplicate",()=>$8e1fd87e141fe827$export$ecd5e8ace626722c);var $adJLc=parcelRequire("adJLc");class $faec185623c69922$export$92ce62e1201c4fc0 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Copy",[$faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_ARRAY_SOURCE,$faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_INT_SOURCE_FROM,$faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_INT_LENGTH,$faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_BOOLEAN_DEEP_COPY],$faec185623c69922$export$92ce62e1201c4fc0.EVENT_RESULT_ARRAY)}async internalExecute(e){var t=e?.getArguments()?.get($faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_INT_LENGTH.getParameterName());if(-1==r&&(r=t.length-a),a+r>t.length)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Array has no elements from $ to $ as the array size is $",a,a+r,t.length));var n=e?.getArguments()?.get($faec185623c69922$export$92ce62e1201c4fc0.PARAMETER_BOOLEAN_DEEP_COPY.getParameterName());let s=Array(r);for(let e=a;e<a+r;e++)(0,$2p8YP.isNullValue)(t[e])||(s[e-a]=n?$8e1fd87e141fe827$export$ecd5e8ace626722c(t[e]):t[e]);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($faec185623c69922$export$92ce62e1201c4fc0.EVENT_RESULT_NAME,s))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $5108a30c8baa6bb6$export$bfadae053a633538 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Delete",[$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE,$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ANY_VAR_ARGS],$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($5108a30c8baa6bb6$export$bfadae053a633538.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($5108a30c8baa6bb6$export$bfadae053a633538.PARAMETER_ANY_VAR_ARGS.getParameterName());if(null==a)throw new(0,$7pym4.KIRuntimeException)("The deletable var args are empty. So cannot be proceeded further.");if(0==t.length||0==a.length)throw new(0,$7pym4.KIRuntimeException)("Expected a source or deletable for an array but not found any");let r=new Set;for(let e=t.length-1;e>=0;e--)for(let n=0;n<a.length;n++)r.has(e)||0!=$dcckU.PrimitiveUtil.compare(t[e],a[n])||r.add(t[e]);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t.filter(e=>!r.has(e))]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $3263037a44002d21$export$3ad0a854c98d807c extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("DeleteFirst",[$3263037a44002d21$export$3ad0a854c98d807c.PARAMETER_ARRAY_SOURCE],$3263037a44002d21$export$3ad0a854c98d807c.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($3263037a44002d21$export$3ad0a854c98d807c.PARAMETER_ARRAY_SOURCE.getParameterName());if(0==t.length)throw new(0,$7pym4.KIRuntimeException)("Given source array is empty");return(t=[...t]).shift(),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $df2afd9c71df1843$export$334b60f35a6b2d04 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("DeleteFrom",[$df2afd9c71df1843$export$334b60f35a6b2d04.PARAMETER_ARRAY_SOURCE,$df2afd9c71df1843$export$334b60f35a6b2d04.PARAMETER_INT_SOURCE_FROM,$df2afd9c71df1843$export$334b60f35a6b2d04.PARAMETER_INT_LENGTH],$df2afd9c71df1843$export$334b60f35a6b2d04.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($df2afd9c71df1843$export$334b60f35a6b2d04.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($df2afd9c71df1843$export$334b60f35a6b2d04.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($df2afd9c71df1843$export$334b60f35a6b2d04.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length)throw new(0,$7pym4.KIRuntimeException)("There are no elements to be deleted");if(a>=(t=[...t]).length||a<0)throw new(0,$7pym4.KIRuntimeException)("The int source for the array should be in between 0 and length of the array ");if(-1==r&&(r=t.length-a),a+r>t.length)throw new(0,$7pym4.KIRuntimeException)("Requested length to be deleted is more than the size of array ");return t.splice(a,r),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $a841bb7e258bfdeb$export$e0c0e69e6a36c9bf extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("DeleteLast",[$a841bb7e258bfdeb$export$e0c0e69e6a36c9bf.PARAMETER_ARRAY_SOURCE],$a841bb7e258bfdeb$export$e0c0e69e6a36c9bf.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($a841bb7e258bfdeb$export$e0c0e69e6a36c9bf.PARAMETER_ARRAY_SOURCE.getParameterName());if(0==t.length)throw new(0,$7pym4.KIRuntimeException)("Given source array is empty");return(t=[...t]).pop(),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $7e87403d54d805a4$export$831f01f9797c5e1c extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Disjoint",[$7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_ARRAY_SOURCE,$7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_INT_SOURCE_FROM,$7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_ARRAY_SECOND_SOURCE,$7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_INT_SECOND_SOURCE_FROM,$7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_INT_LENGTH],$7e87403d54d805a4$export$831f01f9797c5e1c.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),n=e?.getArguments()?.get($7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_INT_SECOND_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get($7e87403d54d805a4$export$831f01f9797c5e1c.PARAMETER_INT_LENGTH.getParameterName());if(-1==s&&(s=t.length<=r.length?t.length-a:r.length-n),s>t.length||s>r.length||a+s>t.length||n+s>r.length)throw new(0,$7pym4.KIRuntimeException)("The length which was being requested is more than than the size either source array or second source array");let i=new Set,o=new Set;for(let e=0;e<s;e++)i.add(t[e+a]);for(let e=0;e<s;e++)o.add(r[e+n]);let E=new Set;return i.forEach(e=>{o.has(e)?o.delete(e):E.add(e)}),o.forEach(e=>{i.has(e)||E.add(e)}),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$7e87403d54d805a4$export$831f01f9797c5e1c.EVENT_RESULT_NAME,[...E]]]))])}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $c10710241bb6394e$export$cb7a6a5305d39b11 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Equals",[$c10710241bb6394e$export$cb7a6a5305d39b11.PARAMETER_ARRAY_SOURCE,$c10710241bb6394e$export$cb7a6a5305d39b11.PARAMETER_INT_SOURCE_FROM,$c10710241bb6394e$export$cb7a6a5305d39b11.PARAMETER_ARRAY_FIND,$c10710241bb6394e$export$cb7a6a5305d39b11.PARAMETER_INT_FIND_FROM,$c10710241bb6394e$export$cb7a6a5305d39b11.PARAMETER_INT_LENGTH],$c10710241bb6394e$export$cb7a6a5305d39b11.EVENT_RESULT_BOOLEAN)}async internalExecute(e){let t=new $135c784f9ab62693$export$2c1d9c1fe3e6577a,a=(await t.execute(e)).allResults()[0].getResult().get($c10710241bb6394e$export$cb7a6a5305d39b11.EVENT_RESULT_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($c10710241bb6394e$export$cb7a6a5305d39b11.EVENT_RESULT_NAME,0==a))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$2p8YP=parcelRequire("2p8YP"),$adJLc=parcelRequire("adJLc");class $9cbd366d3fa072e6$export$ffffe40bfa0649a3 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Fill",[$9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_ARRAY_SOURCE,$9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_INT_SOURCE_FROM,$9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_INT_LENGTH,$9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_ANY],$9cbd366d3fa072e6$export$ffffe40bfa0649a3.EVENT_RESULT_ARRAY)}async internalExecute(e){var t=e?.getArguments()?.get($9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_INT_LENGTH.getParameterName()),n=e?.getArguments()?.get($9cbd366d3fa072e6$export$ffffe40bfa0649a3.PARAMETER_ANY.getParameterName());if(a<0)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Arrays out of bound trying to access $ index",a));-1==r&&(r=t.length-a);let s=a+r-t.length;if(t=[...t],s>0)for(let e=0;e<s;e++)t.push();for(let e=a;e<a+r;e++)t[e]=(0,$2p8YP.isNullValue)(n)?n:$8e1fd87e141fe827$export$ecd5e8ace626722c(n);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $47c7f97a5fd05866$export$44c95d3770756ed2 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Frequency",[$47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_ARRAY_SOURCE,$47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_ANY,$47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_INT_SOURCE_FROM,$47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_INT_LENGTH],$47c7f97a5fd05866$export$44c95d3770756ed2.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get($47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_ANY.getParameterName()),r=e?.getArguments()?.get($47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_INT_SOURCE_FROM.getParameterName()),n=e?.getArguments()?.get($47c7f97a5fd05866$export$44c95d3770756ed2.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$47c7f97a5fd05866$export$44c95d3770756ed2.EVENT_RESULT_NAME,0]]))]);if(r>t.length)throw new(0,$7pym4.KIRuntimeException)("Given start point is more than the size of source");let s=r+n;if(-1==n&&(s=t.length-r),s>t.length)throw new(0,$7pym4.KIRuntimeException)("Given length is more than the size of source");let i=0;for(let e=r;e<s&&e<t.length;e++)0==$dcckU.PrimitiveUtil.compare(t[e],a)&&i++;return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$47c7f97a5fd05866$export$44c95d3770756ed2.EVENT_RESULT_NAME,i]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $6e89c1be7b60c4a7$export$11f52f8c7c47867c extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("IndexOf",[$6e89c1be7b60c4a7$export$11f52f8c7c47867c.PARAMETER_ARRAY_SOURCE,$6e89c1be7b60c4a7$export$11f52f8c7c47867c.PARAMETER_ANY_ELEMENT_OBJECT,$6e89c1be7b60c4a7$export$11f52f8c7c47867c.PARAMETER_INT_FIND_FROM],$6e89c1be7b60c4a7$export$11f52f8c7c47867c.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get($6e89c1be7b60c4a7$export$11f52f8c7c47867c.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($6e89c1be7b60c4a7$export$11f52f8c7c47867c.PARAMETER_ANY_ELEMENT_OBJECT.getParameterName()),r=e?.getArguments()?.get($6e89c1be7b60c4a7$export$11f52f8c7c47867c.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$6e89c1be7b60c4a7$export$11f52f8c7c47867c.EVENT_RESULT_NAME,-1]]))]);if(r<0||r>t.length)throw new(0,$7pym4.KIRuntimeException)("The size of the search index of the array is greater than the size of the array");let n=-1;for(let e=r;e<t.length;e++)if(0==$dcckU.PrimitiveUtil.compare(t[e],a)){n=e;break}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$6e89c1be7b60c4a7$export$11f52f8c7c47867c.EVENT_RESULT_NAME,n]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $705b836dbd8ba038$export$3785001429c275c5 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("IndexOfArray",[$705b836dbd8ba038$export$3785001429c275c5.PARAMETER_ARRAY_SOURCE,$705b836dbd8ba038$export$3785001429c275c5.PARAMETER_ARRAY_SECOND_SOURCE,$705b836dbd8ba038$export$3785001429c275c5.PARAMETER_INT_FIND_FROM],$705b836dbd8ba038$export$3785001429c275c5.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get($705b836dbd8ba038$export$3785001429c275c5.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($705b836dbd8ba038$export$3785001429c275c5.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),r=e?.getArguments()?.get($705b836dbd8ba038$export$3785001429c275c5.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length||0==a.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$705b836dbd8ba038$export$3785001429c275c5.EVENT_RESULT_NAME,-1]]))]);if(r<0||r>t.length||t.length<a.length)throw new(0,$7pym4.KIRuntimeException)("Given from second source is more than the size of the source array");let n=a.length,s=-1;for(let e=r;e<t.length;e++){let r=0;if(0==$dcckU.PrimitiveUtil.compare(t[e],a[r])){for(;r<n&&0==$dcckU.PrimitiveUtil.compare(t[e+r],a[r]);)r++;if(r==n){s=e;break}}}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$705b836dbd8ba038$export$3785001429c275c5.EVENT_RESULT_NAME,s]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $5aca1ba5940213cc$export$327c387de36d5714 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("LastIndexOf",[$5aca1ba5940213cc$export$327c387de36d5714.PARAMETER_ARRAY_SOURCE,$5aca1ba5940213cc$export$327c387de36d5714.PARAMETER_ANY_ELEMENT_OBJECT,$5aca1ba5940213cc$export$327c387de36d5714.PARAMETER_INT_FIND_FROM],$5aca1ba5940213cc$export$327c387de36d5714.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get($5aca1ba5940213cc$export$327c387de36d5714.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($5aca1ba5940213cc$export$327c387de36d5714.PARAMETER_ANY_ELEMENT_OBJECT.getParameterName()),r=e?.getArguments()?.get($5aca1ba5940213cc$export$327c387de36d5714.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$5aca1ba5940213cc$export$327c387de36d5714.EVENT_RESULT_NAME,-1]]))]);if(r<0||r>t.length)throw new(0,$7pym4.KIRuntimeException)("The value of length shouldn't the exceed the size of the array or shouldn't be in terms");let n=-1;for(let e=t.length-1;e>=r;e--)if(0==$dcckU.PrimitiveUtil.compare(t[e],a)){n=e;break}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$5aca1ba5940213cc$export$327c387de36d5714.EVENT_RESULT_NAME,n]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $ab4ee2c64a2782db$export$c76f1c324b4b4a49 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("LastIndexOfArray",[$ab4ee2c64a2782db$export$c76f1c324b4b4a49.PARAMETER_ARRAY_SOURCE,$ab4ee2c64a2782db$export$c76f1c324b4b4a49.PARAMETER_ARRAY_SECOND_SOURCE,$ab4ee2c64a2782db$export$c76f1c324b4b4a49.PARAMETER_INT_FIND_FROM],$ab4ee2c64a2782db$export$c76f1c324b4b4a49.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get($ab4ee2c64a2782db$export$c76f1c324b4b4a49.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($ab4ee2c64a2782db$export$c76f1c324b4b4a49.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),r=e?.getArguments()?.get($ab4ee2c64a2782db$export$c76f1c324b4b4a49.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$ab4ee2c64a2782db$export$c76f1c324b4b4a49.EVENT_RESULT_NAME,-1]]))]);if(r<0||r>t.length||a.length>t.length)throw new(0,$7pym4.KIRuntimeException)("Given from index is more than the size of the source array");let n=a.length,s=-1;for(let e=r;e<t.length;e++){let r=0;if(0==$dcckU.PrimitiveUtil.compare(t[e],a[r])){for(;r<n&&0==$dcckU.PrimitiveUtil.compare(t[e+r],a[r]);)r++;r==n&&(s=e)}}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$ab4ee2c64a2782db$export$c76f1c324b4b4a49.EVENT_RESULT_NAME,s]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU");class $366dbd3eb5a120c4$export$d36c09e5d02927e7 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Max",[$366dbd3eb5a120c4$export$d36c09e5d02927e7.PARAMETER_ARRAY_SOURCE_PRIMITIVE],$366dbd3eb5a120c4$export$d36c09e5d02927e7.EVENT_RESULT_ANY)}async internalExecute(e){let t=e?.getArguments()?.get($366dbd3eb5a120c4$export$d36c09e5d02927e7.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName());if(0==t.length)throw new(0,$7pym4.KIRuntimeException)("Search source array cannot be empty");let a=t[0];for(let e=1;e<t.length;e++){let r=t[e];$dcckU.PrimitiveUtil.comparePrimitive(a,r)>=0||(a=r)}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$366dbd3eb5a120c4$export$d36c09e5d02927e7.EVENT_RESULT_NAME,a]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dcckU=parcelRequire("dcckU"),$2p8YP=parcelRequire("2p8YP");class $33bdfd49dd3e8007$export$dfed19fabc75a31d extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Min",[$33bdfd49dd3e8007$export$dfed19fabc75a31d.PARAMETER_ARRAY_SOURCE_PRIMITIVE],$33bdfd49dd3e8007$export$dfed19fabc75a31d.EVENT_RESULT_ANY)}async internalExecute(e){let t,a=e?.getArguments()?.get($33bdfd49dd3e8007$export$dfed19fabc75a31d.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName());if(0==a.length)throw new(0,$7pym4.KIRuntimeException)("Search source array cannot be empty");for(let e=0;e<a.length;e++)!(0,$2p8YP.isNullValue)(a[e])&&(void 0===t||0>$dcckU.PrimitiveUtil.comparePrimitive(a[e],t))&&(t=a[e]);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$33bdfd49dd3e8007$export$dfed19fabc75a31d.EVENT_RESULT_NAME,t]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $66c77bc56e2db63a$export$65b9f7c5b0c25350 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("MisMatch",[$66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_ARRAY_SOURCE,$66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_INT_FIND_FROM,$66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_ARRAY_SECOND_SOURCE,$66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_INT_SECOND_SOURCE_FROM,$66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_INT_LENGTH],$66c77bc56e2db63a$export$65b9f7c5b0c25350.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get($66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_INT_FIND_FROM.getParameterName()),r=e?.getArguments()?.get($66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),n=e?.getArguments()?.get($66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_INT_SECOND_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get($66c77bc56e2db63a$export$65b9f7c5b0c25350.PARAMETER_INT_LENGTH.getParameterName()),i=a<t.length&&a>0?a:0,o=n<r.length&&n>0?n:0;if(i+s>=t.length||o+s>r.length)throw new(0,$7pym4.KIRuntimeException)("The size of the array for first and second which was being requested is more than size of the given array");let E=-1;for(let e=0;e<s;e++)if(t[i+e]!=r[o+e]){E=e;break}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$66c77bc56e2db63a$export$65b9f7c5b0c25350.EVENT_RESULT_NAME,E]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $55b822542647095a$export$53c81f36b32e1bba extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Reverse",[$55b822542647095a$export$53c81f36b32e1bba.PARAMETER_ARRAY_SOURCE,$55b822542647095a$export$53c81f36b32e1bba.PARAMETER_INT_SOURCE_FROM,$55b822542647095a$export$53c81f36b32e1bba.PARAMETER_INT_LENGTH],$55b822542647095a$export$53c81f36b32e1bba.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($55b822542647095a$export$53c81f36b32e1bba.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($55b822542647095a$export$53c81f36b32e1bba.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($55b822542647095a$export$53c81f36b32e1bba.PARAMETER_INT_LENGTH.getParameterName());if(-1==r&&(r=t.length-a),r>=t.length||r<0||a<0)throw new(0,$7pym4.KIRuntimeException)("Please provide start point between the start and end indexes or provide the length which was less than the source size ");t=[...t];let n=a+r-1;for(;a<=n;){let e=t[a],r=t[n];t[a++]=r,t[n--]=e}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$55b822542647095a$export$53c81f36b32e1bba.EVENT_RESULT_NAME,t]]))])}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $fc5c33113ba28847$export$152db69a76b6b79e extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Rotate",[$fc5c33113ba28847$export$152db69a76b6b79e.PARAMETER_ARRAY_SOURCE,$fc5c33113ba28847$export$152db69a76b6b79e.PARAMETER_ROTATE_LENGTH],$fc5c33113ba28847$export$152db69a76b6b79e.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($fc5c33113ba28847$export$152db69a76b6b79e.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($fc5c33113ba28847$export$152db69a76b6b79e.PARAMETER_ROTATE_LENGTH.getParameterName());if(0==t.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))]);let r=(t=[...t]).length;return a%=r,this.rotate(t,0,a-1),this.rotate(t,a,r-1),this.rotate(t,0,r-1),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}rotate(e,t,a){for(;t<a;){let r=e[t];e[t++]=e[a],e[a--]=r}}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $81f74356bb1dda1a$export$f4f1f4c0f416ff4b extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Shuffle",[$81f74356bb1dda1a$export$f4f1f4c0f416ff4b.PARAMETER_ARRAY_SOURCE],$81f74356bb1dda1a$export$f4f1f4c0f416ff4b.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($81f74356bb1dda1a$export$f4f1f4c0f416ff4b.PARAMETER_ARRAY_SOURCE.getParameterName());if(t.length<=1)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))]);let a=0,r=(t=[...t]).length;for(let e=0;e<r;e++){let e=Math.floor(Math.random()*r)%r,n=t[a];t[a]=t[e],t[e]=n,a=e}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$2f786f17389a32e8$exports={};$parcel$export($2f786f17389a32e8$exports,"ObjectValueSetterExtractor",()=>$2f786f17389a32e8$export$39519efb8a973bce);var $7pym4=parcelRequire("7pym4"),$2p8YP=parcelRequire("2p8YP"),$adJLc=parcelRequire("adJLc"),$9mEhX=parcelRequire("9mEhX"),$iSHH5=parcelRequire("iSHH5"),$6SbgP=parcelRequire("6SbgP"),$8loiD=parcelRequire("8loiD");class $2f786f17389a32e8$export$39519efb8a973bce extends $8loiD.TokenValueExtractor{constructor(e,t){super(),this.store=e,this.prefix=t}getValueInternal(e){let t=e.split($8loiD.TokenValueExtractor.REGEX_DOT);return this.retrieveElementFrom(e,t,1,this.store)}getStore(){return this.store}setStore(e){return this.store=e,this}setValue(e,t,a=!0,r=!1){this.store=$8e1fd87e141fe827$export$ecd5e8ace626722c(this.store),this.modifyStore(e,t,a,r)}modifyStore(e,t,a,r){let n=new(0,$9mEhX.Expression)(e),s=n.getTokens();s.removeLast();let i=n.getOperations(),o=i.removeLast(),E=s.removeLast(),u=E instanceof $iSHH5.ExpressionTokenValue?E.getElement():E.getExpression(),c=this.store;for(;!i.isEmpty();)c=o==$6SbgP.Operation.OBJECT_OPERATOR?this.getDataFromObject(c,u,i.peekLast()):this.getDataFromArray(c,u,i.peekLast()),o=i.removeLast(),u=(E=s.removeLast())instanceof $iSHH5.ExpressionTokenValue?E.getElement():E.getExpression();o==$6SbgP.Operation.OBJECT_OPERATOR?this.putDataInObject(c,u,t,a,r):this.putDataInArray(c,u,t,a,r)}getDataFromArray(e,t,a){if(!Array.isArray(e))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array but found $",e));let r=parseInt(t);if(isNaN(r))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array index but found $",t));if(r<0)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Array index is out of bound - $",t));let n=e[r];return(0,$2p8YP.isNullValue)(n)&&(n=a==$6SbgP.Operation.OBJECT_OPERATOR?{}:[],e[r]=n),n}getDataFromObject(e,t,a){if(Array.isArray(e)||"object"!=typeof e)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an object but found $",e));let r=e[t];return(0,$2p8YP.isNullValue)(r)&&(r=a==$6SbgP.Operation.OBJECT_OPERATOR?{}:[],e[t]=r),r}putDataInArray(e,t,a,r,n){if(!Array.isArray(e))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array but found $",e));let s=parseInt(t);if(isNaN(s))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array index but found $",t));if(s<0)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Array index is out of bound - $",t));(r||(0,$2p8YP.isNullValue)(e[s]))&&(n&&(0,$2p8YP.isNullValue)(a)?e.splice(s,1):e[s]=a)}putDataInObject(e,t,a,r,n){if(Array.isArray(e)||"object"!=typeof e)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an object but found $",e));(r||(0,$2p8YP.isNullValue)(e[t]))&&(n&&(0,$2p8YP.isNullValue)(a)?delete e[t]:e[t]=a)}getPrefix(){return this.prefix}}class $61ea1778314ec8ff$export$d43f91ac58cde147 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Sort",[$61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_ARRAY_SOURCE,$61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_INT_FIND_FROM,$61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_INT_LENGTH,$61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_BOOLEAN_ASCENDING,$61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_KEY_PATH],$61ea1778314ec8ff$export$d43f91ac58cde147.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_INT_FIND_FROM.getParameterName()),r=e?.getArguments()?.get($61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_INT_LENGTH.getParameterName()),n=e?.getArguments()?.get($61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_BOOLEAN_ASCENDING.getParameterName()),s=e?.getArguments()?.get($61ea1778314ec8ff$export$d43f91ac58cde147.PARAMETER_KEY_PATH.getParameterName());if(0==t.length)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))]);if(t=[...t],-1==r&&(r=t.length-a),a<0||a>=t.length||a+r>t.length)throw new(0,$7pym4.KIRuntimeException)("Given start point is more than the size of the array or not available at that point");let i=t.slice(a,a+r+1),o=new $2f786f17389a32e8$export$39519efb8a973bce({},"Data.");return i.sort((e,t)=>"object"==typeof e&&"object"==typeof t&&s.length?(o.setStore({a:e,b:t}),$61ea1778314ec8ff$var$compareFunction(o.getValue("Data.a."+s),o.getValue("Data.b."+s),n)):$61ea1778314ec8ff$var$compareFunction(e,t,n)),t.splice(a,r,...i),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}function $61ea1778314ec8ff$var$compareFunction(e,t,a){return e===t?0:null===e?1:null===t?-1:a?e<t?-1:1:e<t?1:-1}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $61bb645d60c2bbfd$export$7350831561e48a8f extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("SubArray",[$61bb645d60c2bbfd$export$7350831561e48a8f.PARAMETER_ARRAY_SOURCE,$61bb645d60c2bbfd$export$7350831561e48a8f.PARAMETER_INT_FIND_FROM,$61bb645d60c2bbfd$export$7350831561e48a8f.PARAMETER_INT_LENGTH],$61bb645d60c2bbfd$export$7350831561e48a8f.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($61bb645d60c2bbfd$export$7350831561e48a8f.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($61bb645d60c2bbfd$export$7350831561e48a8f.PARAMETER_INT_FIND_FROM.getParameterName()),r=e?.getArguments()?.get($61bb645d60c2bbfd$export$7350831561e48a8f.PARAMETER_INT_LENGTH.getParameterName());if(-1==r&&(r=t.length-a),r<=0)return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([]))]);if(!(a>=0&&a<t.length)||a+r>t.length)throw new(0,$7pym4.KIRuntimeException)("Given find from point is more than the source size array or the Requested length for the subarray was more than the source size");let n=t.slice(a,a+r);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$61bb645d60c2bbfd$export$7350831561e48a8f.EVENT_RESULT_NAME,n]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$2p8YP=parcelRequire("2p8YP");class $a50895a3bbe5e172$export$ff4c1a9d41c61c5b extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("Insert",[$a50895a3bbe5e172$export$ff4c1a9d41c61c5b.PARAMETER_ARRAY_SOURCE,$a50895a3bbe5e172$export$ff4c1a9d41c61c5b.PARAMETER_INT_OFFSET,$a50895a3bbe5e172$export$ff4c1a9d41c61c5b.PARAMETER_ANY],$a50895a3bbe5e172$export$ff4c1a9d41c61c5b.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($a50895a3bbe5e172$export$ff4c1a9d41c61c5b.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($a50895a3bbe5e172$export$ff4c1a9d41c61c5b.PARAMETER_INT_OFFSET.getParameterName());var r=e?.getArguments()?.get($a50895a3bbe5e172$export$ff4c1a9d41c61c5b.PARAMETER_ANY.getParameterName());if((0,$2p8YP.isNullValue)(r)||(0,$2p8YP.isNullValue)(a)||a>t.length)throw new(0,$7pym4.KIRuntimeException)("Please valid resouces to insert at the correct location");if(0==(t=[...t]).length)return 0==a&&t.push(r),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))]);t.push(r);let n=t.length-1;for(a++;n>=a;){let e=t[n-1];t[n-1]=t[n],t[n--]=e}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $d1a495c2d0dfdc61$export$7033a60d5110317a extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("InsertLast",[$d1a495c2d0dfdc61$export$7033a60d5110317a.PARAMETER_ARRAY_SOURCE,$d1a495c2d0dfdc61$export$7033a60d5110317a.PARAMETER_ANY],$d1a495c2d0dfdc61$export$7033a60d5110317a.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get($d1a495c2d0dfdc61$export$7033a60d5110317a.PARAMETER_ARRAY_SOURCE.getParameterName());var a=e?.getArguments()?.get($d1a495c2d0dfdc61$export$7033a60d5110317a.PARAMETER_ANY.getParameterName());return(t=[...t]).push(a),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,t]]))])}}var $7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$dAuXT=parcelRequire("dAuXT"),$adJLc=parcelRequire("adJLc");class $3e822de571299409$export$7127619039fca328 extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("RemoveDuplicates",[$3e822de571299409$export$7127619039fca328.PARAMETER_ARRAY_SOURCE,$3e822de571299409$export$7127619039fca328.PARAMETER_INT_SOURCE_FROM,$3e822de571299409$export$7127619039fca328.PARAMETER_INT_LENGTH],$3e822de571299409$export$7127619039fca328.EVENT_RESULT_ARRAY)}async internalExecute(e){var t=e?.getArguments()?.get($3e822de571299409$export$7127619039fca328.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($3e822de571299409$export$7127619039fca328.PARAMETER_INT_SOURCE_FROM.getParameterName()),r=e?.getArguments()?.get($3e822de571299409$export$7127619039fca328.PARAMETER_INT_LENGTH.getParameterName());if(-1==r&&(r=t.length-a),a+r>t.length)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Array has no elements from $ to $ as the array size is $",a,a+r,t.length));let n=[...t],s=a+r;for(let e=s-1;e>=a;e--)for(let t=e-1;t>=a;t--)if((0,$dAuXT.deepEqual)(n[e],n[t])){n.splice(e,1);break}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($3e822de571299409$export$7127619039fca328.EVENT_RESULT_NAME,n))])}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$2p8YP=parcelRequire("2p8YP");let $3cf989afe7297344$var$KEY_PATH="keyPath",$3cf989afe7297344$var$VALUE_PATH="valuePath",$3cf989afe7297344$var$IGNORE_NULL_VALUES="ignoreNullValues",$3cf989afe7297344$var$IGNORE_NULL_KEYS="ignoreNullKeys",$3cf989afe7297344$var$IGNORE_DUPLICATE_KEYS="ignoreDuplicateKeys";class $3cf989afe7297344$export$4415edf560d625ce extends $05fa87e807cc8279$export$d61d79577b849157{constructor(){super("ArrayToObjects",[$05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE,$eFd0g.Parameter.of($3cf989afe7297344$var$KEY_PATH,$5b9i6.Schema.ofString($3cf989afe7297344$var$KEY_PATH)),$eFd0g.Parameter.of($3cf989afe7297344$var$VALUE_PATH,$5b9i6.Schema.of($3cf989afe7297344$var$VALUE_PATH,$3tMPe.SchemaType.STRING,$3tMPe.SchemaType.NULL)),$eFd0g.Parameter.of($3cf989afe7297344$var$IGNORE_NULL_VALUES,$5b9i6.Schema.ofBoolean($3cf989afe7297344$var$IGNORE_NULL_VALUES).setDefaultValue(!1)),$eFd0g.Parameter.of($3cf989afe7297344$var$IGNORE_NULL_KEYS,$5b9i6.Schema.ofBoolean($3cf989afe7297344$var$IGNORE_NULL_KEYS).setDefaultValue(!0)),$eFd0g.Parameter.of($3cf989afe7297344$var$IGNORE_DUPLICATE_KEYS,$5b9i6.Schema.ofBoolean($3cf989afe7297344$var$IGNORE_DUPLICATE_KEYS).setDefaultValue(!1))],$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_ANY)}async internalExecute(e){let t=e?.getArguments()?.get($05fa87e807cc8279$export$d61d79577b849157.PARAMETER_ARRAY_SOURCE.getParameterName()),a=e?.getArguments()?.get($3cf989afe7297344$var$KEY_PATH),r=e?.getArguments()?.get($3cf989afe7297344$var$VALUE_PATH)??"",n=e?.getArguments()?.get($3cf989afe7297344$var$IGNORE_NULL_VALUES),s=e?.getArguments()?.get($3cf989afe7297344$var$IGNORE_NULL_KEYS),i=e?.getArguments()?.get($3cf989afe7297344$var$IGNORE_DUPLICATE_KEYS),o=new $2f786f17389a32e8$export$39519efb8a973bce({},"Data."),E=t.filter(e=>!(0,$2p8YP.isNullValue)(e)).reduce((e,t)=>{o.setStore(t);let E=o.getValue("Data."+a);if(s&&(0,$2p8YP.isNullValue)(E))return e;let u=r?o.getValue("Data."+r):t;return n&&(0,$2p8YP.isNullValue)(u)||i&&e.hasOwnProperty(E)||(e[E]=u),e},{});return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$05fa87e807cc8279$export$d61d79577b849157.EVENT_RESULT_NAME,E]]))])}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $24b4dc88cfa1047e$var$VALUE="source",$24b4dc88cfa1047e$var$DELIMITTER="delimiter",$24b4dc88cfa1047e$var$OUTPUT="result";class $24b4dc88cfa1047e$export$26aa7833c998c5d3 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get($24b4dc88cfa1047e$var$VALUE),a=e?.getArguments()?.get($24b4dc88cfa1047e$var$DELIMITTER);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$24b4dc88cfa1047e$var$OUTPUT,t.join(a)]]))])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Join").setNamespace($76i8S.Namespaces.SYSTEM_ARRAY).setParameters(new Map([[$24b4dc88cfa1047e$var$VALUE,new(0,$eFd0g.Parameter)($24b4dc88cfa1047e$var$VALUE,$5b9i6.Schema.ofArray($24b4dc88cfa1047e$var$VALUE,$5b9i6.Schema.of("each",$3tMPe.SchemaType.STRING,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG,$3tMPe.SchemaType.DOUBLE,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.NULL)))],[$24b4dc88cfa1047e$var$DELIMITTER,new(0,$eFd0g.Parameter)($24b4dc88cfa1047e$var$DELIMITTER,$5b9i6.Schema.ofString($24b4dc88cfa1047e$var$DELIMITTER).setDefaultValue(""))]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$24b4dc88cfa1047e$var$OUTPUT,$5b9i6.Schema.ofString($24b4dc88cfa1047e$var$OUTPUT)]]))]))}}class $ed31df2b2821223b$export$b1f76fbe3f585683{async find(e,t){return e!=$76i8S.Namespaces.SYSTEM_ARRAY?Promise.resolve(void 0):Promise.resolve(this.repoMap.get(t))}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}constructor(){this.repoMap=$c501efceca87a708$export$92eaabd025f1e921.ofArrayEntries($69f0970a535da56f$export$2e2bcd8739ae039(new $b78f036338a00fcf$export$e55b597c359d82cd),$69f0970a535da56f$export$2e2bcd8739ae039(new $8406bf7d03089431$export$fe845828af6718ad),$69f0970a535da56f$export$2e2bcd8739ae039(new $c16321bbe3b4fd9a$export$72555ce28d3458cb),$69f0970a535da56f$export$2e2bcd8739ae039(new $135c784f9ab62693$export$2c1d9c1fe3e6577a),$69f0970a535da56f$export$2e2bcd8739ae039(new $faec185623c69922$export$92ce62e1201c4fc0),$69f0970a535da56f$export$2e2bcd8739ae039(new $5108a30c8baa6bb6$export$bfadae053a633538),$69f0970a535da56f$export$2e2bcd8739ae039(new $3263037a44002d21$export$3ad0a854c98d807c),$69f0970a535da56f$export$2e2bcd8739ae039(new $df2afd9c71df1843$export$334b60f35a6b2d04),$69f0970a535da56f$export$2e2bcd8739ae039(new $a841bb7e258bfdeb$export$e0c0e69e6a36c9bf),$69f0970a535da56f$export$2e2bcd8739ae039(new $7e87403d54d805a4$export$831f01f9797c5e1c),$69f0970a535da56f$export$2e2bcd8739ae039(new $c10710241bb6394e$export$cb7a6a5305d39b11),$69f0970a535da56f$export$2e2bcd8739ae039(new $9cbd366d3fa072e6$export$ffffe40bfa0649a3),$69f0970a535da56f$export$2e2bcd8739ae039(new $47c7f97a5fd05866$export$44c95d3770756ed2),$69f0970a535da56f$export$2e2bcd8739ae039(new $6e89c1be7b60c4a7$export$11f52f8c7c47867c),$69f0970a535da56f$export$2e2bcd8739ae039(new $705b836dbd8ba038$export$3785001429c275c5),$69f0970a535da56f$export$2e2bcd8739ae039(new $5aca1ba5940213cc$export$327c387de36d5714),$69f0970a535da56f$export$2e2bcd8739ae039(new $ab4ee2c64a2782db$export$c76f1c324b4b4a49),$69f0970a535da56f$export$2e2bcd8739ae039(new $366dbd3eb5a120c4$export$d36c09e5d02927e7),$69f0970a535da56f$export$2e2bcd8739ae039(new $33bdfd49dd3e8007$export$dfed19fabc75a31d),$69f0970a535da56f$export$2e2bcd8739ae039(new $66c77bc56e2db63a$export$65b9f7c5b0c25350),$69f0970a535da56f$export$2e2bcd8739ae039(new $55b822542647095a$export$53c81f36b32e1bba),$69f0970a535da56f$export$2e2bcd8739ae039(new $fc5c33113ba28847$export$152db69a76b6b79e),$69f0970a535da56f$export$2e2bcd8739ae039(new $81f74356bb1dda1a$export$f4f1f4c0f416ff4b),$69f0970a535da56f$export$2e2bcd8739ae039(new $61ea1778314ec8ff$export$d43f91ac58cde147),$69f0970a535da56f$export$2e2bcd8739ae039(new $61bb645d60c2bbfd$export$7350831561e48a8f),$69f0970a535da56f$export$2e2bcd8739ae039(new $095a6913aa759aea$export$f33443386c43236a),$69f0970a535da56f$export$2e2bcd8739ae039(new $a50895a3bbe5e172$export$ff4c1a9d41c61c5b),$69f0970a535da56f$export$2e2bcd8739ae039(new $d1a495c2d0dfdc61$export$7033a60d5110317a),$69f0970a535da56f$export$2e2bcd8739ae039(new $3e822de571299409$export$7127619039fca328),$69f0970a535da56f$export$2e2bcd8739ae039(new $3cf989afe7297344$export$4415edf560d625ce),$69f0970a535da56f$export$2e2bcd8739ae039(new $24b4dc88cfa1047e$export$26aa7833c998c5d3)),this.filterableNames=Array.from(this.repoMap.values()).map(e=>e.getSignature().getFullName())}}var $7pym4=parcelRequire("7pym4"),$5b9i6=parcelRequire("5b9i6"),$1tkrm=parcelRequire("1tkrm"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$1azZj=parcelRequire("1azZj"),$76i8S=parcelRequire("76i8S"),$99938c30b570435a$exports={};$parcel$export($99938c30b570435a$exports,"ContextElement",()=>$99938c30b570435a$export$d249626f99a0976c);var $5b9i6=parcelRequire("5b9i6");class $99938c30b570435a$export$d249626f99a0976c{static{this.NULL=new $99938c30b570435a$export$d249626f99a0976c($5b9i6.Schema.NULL,void 0)}constructor(e,t){this.schema=e,this.element=t}getSchema(){return this.schema}setSchema(e){return this.schema=e,this}getElement(){return this.element}setElement(e){return this.element=e,this}}var $2p8YP=parcelRequire("2p8YP"),$adJLc=parcelRequire("adJLc"),$d9f2y=parcelRequire("d9f2y");let $e5095d299652d445$var$NAME="name",$e5095d299652d445$var$SCHEMA="schema";class $e5095d299652d445$export$8ade6fcbf3a7de5d extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get($e5095d299652d445$var$NAME);if(e?.getContext()?.has(t))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Context already has an element for '$' ",t));let a=$5b9i6.Schema.from(e?.getArguments()?.get($e5095d299652d445$var$SCHEMA));if(!a)throw new(0,$7pym4.KIRuntimeException)("Schema is not supplied.");return e.getContext().set(t,new $99938c30b570435a$export$d249626f99a0976c(a,(0,$2p8YP.isNullValue)(a.getDefaultValue())?void 0:a.getDefaultValue())),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Create").setNamespace($76i8S.Namespaces.SYSTEM_CTX).setParameters(new Map([$eFd0g.Parameter.ofEntry($e5095d299652d445$var$NAME,new(0,$5b9i6.Schema)().setName($e5095d299652d445$var$NAME).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.STRING)).setMinLength(1).setFormat($1tkrm.StringFormat.REGEX).setPattern("^[a-zA-Z_$][a-zA-Z_$0-9]*$"),!1,$1azZj.ParameterType.CONSTANT),$eFd0g.Parameter.ofEntry($e5095d299652d445$var$SCHEMA,$5b9i6.Schema.SCHEMA,!1,$1azZj.ParameterType.CONSTANT)])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map)]))}}var $7pym4=parcelRequire("7pym4"),$5b9i6=parcelRequire("5b9i6"),$1tkrm=parcelRequire("1tkrm"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$1azZj=parcelRequire("1azZj"),$76i8S=parcelRequire("76i8S"),$adJLc=parcelRequire("adJLc"),$d9f2y=parcelRequire("d9f2y");let $b908a4b42005eb34$var$NAME="name",$b908a4b42005eb34$var$VALUE="value";class $b908a4b42005eb34$export$3c4d50795bdf2241 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get($b908a4b42005eb34$var$NAME);if(!e.getContext()?.has(t))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Context don't have an element for '$' ",t));return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([$b908a4b42005eb34$var$VALUE,e.getContext()?.get(t)?.getElement()]))])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Get").setNamespace($76i8S.Namespaces.SYSTEM_CTX).setParameters(new Map([$eFd0g.Parameter.ofEntry($b908a4b42005eb34$var$NAME,new(0,$5b9i6.Schema)().setName($b908a4b42005eb34$var$NAME).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.STRING)).setMinLength(1).setFormat($1tkrm.StringFormat.REGEX).setPattern("^[a-zA-Z_$][a-zA-Z_$0-9]*$"),!1,$1azZj.ParameterType.CONSTANT)])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$b908a4b42005eb34$var$VALUE,$5b9i6.Schema.ofAny($b908a4b42005eb34$var$VALUE)]]))]))}}var $iF2mi=parcelRequire("iF2mi"),$7pym4=parcelRequire("7pym4"),$5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$9mEhX=parcelRequire("9mEhX"),$8MWeR=parcelRequire("8MWeR"),$iSHH5=parcelRequire("iSHH5"),$6SbgP=parcelRequire("6SbgP"),$2p8YP=parcelRequire("2p8YP"),$adJLc=parcelRequire("adJLc"),$iq1c5=parcelRequire("iq1c5"),$d9f2y=parcelRequire("d9f2y");let $518322bb26d0be38$var$NAME="name",$518322bb26d0be38$var$VALUE="value";class $518322bb26d0be38$export$b317e4f1119d5cc3 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get($518322bb26d0be38$var$NAME);if($iq1c5.StringUtil.isNullOrBlank(t))throw new(0,$7pym4.KIRuntimeException)("Empty string is not a valid name for the context element");let a=e?.getArguments()?.get($518322bb26d0be38$var$VALUE),r=new(0,$9mEhX.Expression)(t),n=r.getTokens().peekLast();if(!n.getExpression().startsWith("Context")||n instanceof $9mEhX.Expression||n instanceof $iSHH5.ExpressionTokenValue&&!n.getElement().toString().startsWith("Context"))throw new(0,$iF2mi.ExecutionException)($adJLc.StringFormatter.format("The context path $ is not a valid path in context",t));for(let e of r.getOperations().toArray())if(e!=$6SbgP.Operation.ARRAY_OPERATOR&&e!=$6SbgP.Operation.OBJECT_OPERATOR)throw new(0,$iF2mi.ExecutionException)($adJLc.StringFormatter.format("Expected a reference to the context location, but found an expression $",t));for(let a=0;a<r.getTokens().size();a++){let n=r.getTokens().get(a);n instanceof $9mEhX.Expression&&r.getTokens().set(a,new(0,$iSHH5.ExpressionTokenValue)(t,new(0,$8MWeR.ExpressionEvaluator)(n).evaluate(e.getValuesMap())))}return this.modifyContext(e,t,a,r)}modifyContext(e,t,a,r){let n=r.getTokens();n.removeLast();let s=r.getOperations();s.removeLast();let i=e.getContext()?.get(n.removeLast().getExpression());if((0,$2p8YP.isNullValue)(i))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Context doesn't have any element with name '$' ",t));if(s.isEmpty())return i.setElement(a),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map)]);let o=i.getElement(),E=s.removeLast(),u=n.removeLast(),c=u instanceof $iSHH5.ExpressionTokenValue?u.getElement():u.getExpression();for((0,$2p8YP.isNullValue)(o)&&(o=E==$6SbgP.Operation.OBJECT_OPERATOR?{}:[],i.setElement(o));!s.isEmpty();)o=E==$6SbgP.Operation.OBJECT_OPERATOR?this.getDataFromObject(o,c,s.peekLast()):this.getDataFromArray(o,c,s.peekLast()),E=s.removeLast(),c=(u=n.removeLast())instanceof $iSHH5.ExpressionTokenValue?u.getElement():u.getExpression();return E==$6SbgP.Operation.OBJECT_OPERATOR?this.putDataInObject(o,c,a):this.putDataInArray(o,c,a),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map)])}getDataFromArray(e,t,a){if(!Array.isArray(e))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array but found $",e));let r=parseInt(t);if(isNaN(r))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array index but found $",t));if(r<0)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Array index is out of bound - $",t));let n=e[r];return(0,$2p8YP.isNullValue)(n)&&(n=a==$6SbgP.Operation.OBJECT_OPERATOR?{}:[],e[r]=n),n}getDataFromObject(e,t,a){if(Array.isArray(e)||"object"!=typeof e)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an object but found $",e));let r=e[t];return(0,$2p8YP.isNullValue)(r)&&(r=a==$6SbgP.Operation.OBJECT_OPERATOR?{}:[],e[t]=r),r}putDataInArray(e,t,a){if(!Array.isArray(e))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array but found $",e));let r=parseInt(t);if(isNaN(r))throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an array index but found $",t));if(r<0)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Array index is out of bound - $",t));e[r]=a}putDataInObject(e,t,a){if(Array.isArray(e)||"object"!=typeof e)throw new(0,$7pym4.KIRuntimeException)($adJLc.StringFormatter.format("Expected an object but found $",e));e[t]=a}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Set").setNamespace($76i8S.Namespaces.SYSTEM_CTX).setParameters(new Map([$eFd0g.Parameter.ofEntry($518322bb26d0be38$var$NAME,new(0,$5b9i6.Schema)().setName($518322bb26d0be38$var$NAME).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.STRING)).setMinLength(1),!1),$eFd0g.Parameter.ofEntry($518322bb26d0be38$var$VALUE,$5b9i6.Schema.ofAny($518322bb26d0be38$var$VALUE))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map)]))}}var $7pym4=parcelRequire("7pym4"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$8MWeR=parcelRequire("8MWeR"),$2p8YP=parcelRequire("2p8YP"),$d9f2y=parcelRequire("d9f2y");let $bbd1c6869d801761$var$VALUE="value",$bbd1c6869d801761$var$EVENT_NAME="eventName",$bbd1c6869d801761$var$RESULTS="results";class $bbd1c6869d801761$export$5f7db2d393d4896c extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getEvents(),a=e.getArguments(),r=a?.get($bbd1c6869d801761$var$EVENT_NAME),n=e?.getArguments()?.get($bbd1c6869d801761$var$RESULTS).map(t=>{let a=t[$bbd1c6869d801761$var$VALUE];if((0,$2p8YP.isNullValue)(a))throw new(0,$7pym4.KIRuntimeException)("Expect a value object");let r=a.value;return a.isExpression&&(r=new(0,$8MWeR.ExpressionEvaluator)(r).evaluate(e.getValuesMap())),[t.name,r]}).reduce((e,t)=>(e.set(t[0],t[1]),e),new Map);return t?.has(r)||t?.set(r,[]),t?.get(r)?.push(n),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("GenerateEvent").setNamespace($76i8S.Namespaces.SYSTEM).setParameters(new Map([$eFd0g.Parameter.ofEntry($bbd1c6869d801761$var$EVENT_NAME,$5b9i6.Schema.ofString($bbd1c6869d801761$var$EVENT_NAME).setDefaultValue("output")),$eFd0g.Parameter.ofEntry($bbd1c6869d801761$var$RESULTS,$5b9i6.Schema.ofObject($bbd1c6869d801761$var$RESULTS).setProperties(new Map([["name",$5b9i6.Schema.ofString("name")],[$bbd1c6869d801761$var$VALUE,$eFd0g.Parameter.EXPRESSION]])),!0)])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map)]))}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $a204e21ccf6a6533$export$1f9ff5f4a6c9361a extends $d9f2y.AbstractFunction{static{this.CONDITION="condition"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($a204e21ccf6a6533$export$1f9ff5f4a6c9361a.CONDITION),a=!!t||""===t;return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.of(a?$43zhg.Event.TRUE:$43zhg.Event.FALSE,new Map),$lxSe3.EventResult.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("If").setNamespace($76i8S.Namespaces.SYSTEM).setParameters(new Map([$eFd0g.Parameter.ofEntry($a204e21ccf6a6533$export$1f9ff5f4a6c9361a.CONDITION,$5b9i6.Schema.ofAny($a204e21ccf6a6533$export$1f9ff5f4a6c9361a.CONDITION))])).setEvents(new Map([$43zhg.Event.eventMapEntry($43zhg.Event.TRUE,new Map),$43zhg.Event.eventMapEntry($43zhg.Event.FALSE,new Map),$43zhg.Event.outputEventMapEntry(new Map)]))}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $81bf7ef6c5dc4c9c$var$STEP_NAME="stepName";class $81bf7ef6c5dc4c9c$export$c88190a7f68b38c0 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($81bf7ef6c5dc4c9c$var$STEP_NAME);return e.getExecutionContext().set(t,!0),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Break").setNamespace($76i8S.Namespaces.SYSTEM_LOOP).setParameters(new Map([$eFd0g.Parameter.ofEntry($81bf7ef6c5dc4c9c$var$STEP_NAME,$5b9i6.Schema.of($81bf7ef6c5dc4c9c$var$STEP_NAME,$3tMPe.SchemaType.STRING))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([]))]))}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $9e6dc1b3d6ce1c2e$var$COUNT="count",$9e6dc1b3d6ce1c2e$var$VALUE="value",$9e6dc1b3d6ce1c2e$var$INDEX="index";class $9e6dc1b3d6ce1c2e$export$eac784307589bdc0 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($9e6dc1b3d6ce1c2e$var$COUNT),a=0,r=e.getStatementExecution()?.getStatement()?.getStatementName();return new(0,$aHmki.FunctionOutput)({next(){if(a>=t||r&&e.getExecutionContext()?.get(r))return r&&e.getExecutionContext()?.delete(r),$lxSe3.EventResult.outputOf(new Map([[$9e6dc1b3d6ce1c2e$var$VALUE,a]]));let n=$lxSe3.EventResult.of($43zhg.Event.ITERATION,new Map([[$9e6dc1b3d6ce1c2e$var$INDEX,a]]));return++a,n}})}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("CountLoop").setNamespace($76i8S.Namespaces.SYSTEM_LOOP).setParameters(new Map([$eFd0g.Parameter.ofEntry($9e6dc1b3d6ce1c2e$var$COUNT,$5b9i6.Schema.of($9e6dc1b3d6ce1c2e$var$COUNT,$3tMPe.SchemaType.INTEGER))])).setEvents(new Map([$43zhg.Event.eventMapEntry($43zhg.Event.ITERATION,new Map([[$9e6dc1b3d6ce1c2e$var$INDEX,$5b9i6.Schema.of($9e6dc1b3d6ce1c2e$var$INDEX,$3tMPe.SchemaType.INTEGER)]])),$43zhg.Event.outputEventMapEntry(new Map([[$9e6dc1b3d6ce1c2e$var$VALUE,$5b9i6.Schema.of($9e6dc1b3d6ce1c2e$var$VALUE,$3tMPe.SchemaType.INTEGER)]]))]))}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $d721c6ebab14c322$var$SOURCE="source",$d721c6ebab14c322$var$EACH="each",$d721c6ebab14c322$var$INDEX="index",$d721c6ebab14c322$var$VALUE="value";class $d721c6ebab14c322$export$77f81f356deccd7a extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($d721c6ebab14c322$var$SOURCE),a=0,r=e.getStatementExecution()?.getStatement()?.getStatementName();return new(0,$aHmki.FunctionOutput)({next(){if(a>=t.length||r&&e.getExecutionContext()?.get(r))return r&&e.getExecutionContext()?.delete(r),$lxSe3.EventResult.outputOf(new Map([[$d721c6ebab14c322$var$VALUE,a]]));let n=$lxSe3.EventResult.of($43zhg.Event.ITERATION,new Map([[$d721c6ebab14c322$var$INDEX,a],[$d721c6ebab14c322$var$EACH,t[a]]]));return++a,n}})}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("ForEachLoop").setNamespace($76i8S.Namespaces.SYSTEM_LOOP).setParameters(new Map([$eFd0g.Parameter.ofEntry($d721c6ebab14c322$var$SOURCE,$5b9i6.Schema.ofArray($d721c6ebab14c322$var$SOURCE,$5b9i6.Schema.ofAny($d721c6ebab14c322$var$SOURCE)))])).setEvents(new Map([$43zhg.Event.eventMapEntry($43zhg.Event.ITERATION,new Map([[$d721c6ebab14c322$var$INDEX,$5b9i6.Schema.of($d721c6ebab14c322$var$INDEX,$3tMPe.SchemaType.INTEGER)],[$d721c6ebab14c322$var$EACH,$5b9i6.Schema.ofAny($d721c6ebab14c322$var$EACH)]])),$43zhg.Event.outputEventMapEntry(new Map([[$d721c6ebab14c322$var$VALUE,$5b9i6.Schema.of($d721c6ebab14c322$var$VALUE,$3tMPe.SchemaType.INTEGER)]]))]))}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $06f3baae6ba69e4f$var$FROM="from",$06f3baae6ba69e4f$var$TO="to",$06f3baae6ba69e4f$var$STEP="step",$06f3baae6ba69e4f$var$VALUE="value",$06f3baae6ba69e4f$var$INDEX="index";class $06f3baae6ba69e4f$export$476c164c34496a4 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($06f3baae6ba69e4f$var$FROM),a=e.getArguments()?.get($06f3baae6ba69e4f$var$TO),r=e.getArguments()?.get($06f3baae6ba69e4f$var$STEP),n=r>0,s=t,i=!1,o=e.getStatementExecution()?.getStatement()?.getStatementName();return new(0,$aHmki.FunctionOutput)({next(){if(i)return;if(n&&s>=a||!n&&s<=a||o&&e.getExecutionContext()?.get(o))return i=!0,o&&e.getExecutionContext()?.delete(o),$lxSe3.EventResult.outputOf(new Map([[$06f3baae6ba69e4f$var$VALUE,s]]));let t=$lxSe3.EventResult.of($43zhg.Event.ITERATION,new Map([[$06f3baae6ba69e4f$var$INDEX,s]]));return s+=r,t}})}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("RangeLoop").setNamespace($76i8S.Namespaces.SYSTEM_LOOP).setParameters(new Map([$eFd0g.Parameter.ofEntry($06f3baae6ba69e4f$var$FROM,$5b9i6.Schema.of($06f3baae6ba69e4f$var$FROM,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.DOUBLE).setDefaultValue(0)),$eFd0g.Parameter.ofEntry($06f3baae6ba69e4f$var$TO,$5b9i6.Schema.of($06f3baae6ba69e4f$var$TO,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.DOUBLE).setDefaultValue(1)),$eFd0g.Parameter.ofEntry($06f3baae6ba69e4f$var$STEP,$5b9i6.Schema.of($06f3baae6ba69e4f$var$STEP,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.DOUBLE).setDefaultValue(1).setNot(new(0,$5b9i6.Schema)().setConstant(0)))])).setEvents(new Map([$43zhg.Event.eventMapEntry($43zhg.Event.ITERATION,new Map([[$06f3baae6ba69e4f$var$INDEX,$5b9i6.Schema.of($06f3baae6ba69e4f$var$INDEX,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.DOUBLE)]])),$43zhg.Event.outputEventMapEntry(new Map([[$06f3baae6ba69e4f$var$VALUE,$5b9i6.Schema.of($06f3baae6ba69e4f$var$VALUE,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.DOUBLE)]]))]))}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $35bc9174d4128ac1$var$VALUE="value";class $35bc9174d4128ac1$export$d0265b2c425512d6 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($35bc9174d4128ac1$var$VALUE);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$35bc9174d4128ac1$var$VALUE,t.reduce((e,t)=>e+=t,0)]]))])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Add").setNamespace($76i8S.Namespaces.MATH).setParameters(new Map([[$35bc9174d4128ac1$var$VALUE,new(0,$eFd0g.Parameter)($35bc9174d4128ac1$var$VALUE,$5b9i6.Schema.ofNumber($35bc9174d4128ac1$var$VALUE)).setVariableArgument(!0)]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$35bc9174d4128ac1$var$VALUE,$5b9i6.Schema.ofNumber($35bc9174d4128ac1$var$VALUE)]]))]))}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$dcckU=parcelRequire("dcckU"),$d9f2y=parcelRequire("d9f2y");let $03f7c4f09fea698f$var$VALUE="value",$03f7c4f09fea698f$var$VALUE1="value1",$03f7c4f09fea698f$var$VALUE2="value2";class $03f7c4f09fea698f$export$dbb56c1f07bdf68c extends $d9f2y.AbstractFunction{constructor(e,t,a=1,...r){super(),this.paramFunctions=[()=>new Map([[$03f7c4f09fea698f$var$VALUE,new(0,$eFd0g.Parameter)($03f7c4f09fea698f$var$VALUE,$5b9i6.Schema.ofNumber($03f7c4f09fea698f$var$VALUE))]]),()=>new Map([[$03f7c4f09fea698f$var$VALUE1,new(0,$eFd0g.Parameter)($03f7c4f09fea698f$var$VALUE1,$5b9i6.Schema.ofNumber($03f7c4f09fea698f$var$VALUE1))],[$03f7c4f09fea698f$var$VALUE2,new(0,$eFd0g.Parameter)($03f7c4f09fea698f$var$VALUE2,$5b9i6.Schema.ofNumber($03f7c4f09fea698f$var$VALUE2))]])],r&&r.length||(r=[$3tMPe.SchemaType.DOUBLE]),this.parametersNumber=a,this.mathFunction=t,this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e).setNamespace($76i8S.Namespaces.MATH).setParameters(this.paramFunctions[a-1]()).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$03f7c4f09fea698f$var$VALUE,new(0,$5b9i6.Schema)().setType($gIdZh.TypeUtil.of(...r)).setName($03f7c4f09fea698f$var$VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t,a=$dcckU.PrimitiveUtil.findPrimitiveNumberType(e.getArguments()?.get(1==this.parametersNumber?$03f7c4f09fea698f$var$VALUE:$03f7c4f09fea698f$var$VALUE1)).getT2();return 2==this.parametersNumber&&(t=$dcckU.PrimitiveUtil.findPrimitiveNumberType(e.getArguments()?.get($03f7c4f09fea698f$var$VALUE2)).getT2()),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$03f7c4f09fea698f$var$VALUE,this.mathFunction.call(this,a,t)]]))])}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $f6a6e58a43cb67ba$var$VALUE="value";class $f6a6e58a43cb67ba$export$73af47b8d41ff64 extends $d9f2y.AbstractFunction{constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Hypotenuse").setNamespace($76i8S.Namespaces.MATH).setParameters(new Map([[$f6a6e58a43cb67ba$var$VALUE,new(0,$eFd0g.Parameter)($f6a6e58a43cb67ba$var$VALUE,$5b9i6.Schema.ofNumber($f6a6e58a43cb67ba$var$VALUE)).setVariableArgument(!0)]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$f6a6e58a43cb67ba$var$VALUE,new(0,$5b9i6.Schema)().setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.DOUBLE)).setName($f6a6e58a43cb67ba$var$VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($f6a6e58a43cb67ba$var$VALUE);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$f6a6e58a43cb67ba$var$VALUE,Math.sqrt(t.reduce((e,t)=>e+=t*t,0))]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $2084534c39475f1a$var$VALUE="value";class $2084534c39475f1a$export$d8d02ac92d161004 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($2084534c39475f1a$var$VALUE);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$2084534c39475f1a$var$VALUE,t.reduce((e,t)=>!e&&0!==e||t>e?t:e)]]))])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Maximum").setNamespace($76i8S.Namespaces.MATH).setParameters(new Map([[$2084534c39475f1a$var$VALUE,new(0,$eFd0g.Parameter)($2084534c39475f1a$var$VALUE,$5b9i6.Schema.ofNumber($2084534c39475f1a$var$VALUE)).setVariableArgument(!0)]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$2084534c39475f1a$var$VALUE,$5b9i6.Schema.ofNumber($2084534c39475f1a$var$VALUE)]]))]))}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $7e62541df2687656$var$VALUE="value";class $7e62541df2687656$export$23cb308301e89d6b extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($7e62541df2687656$var$VALUE);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$7e62541df2687656$var$VALUE,t.reduce((e,t)=>!e&&0!==e||t<e?t:e)]]))])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Minimum").setNamespace($76i8S.Namespaces.MATH).setParameters(new Map([[$7e62541df2687656$var$VALUE,new(0,$eFd0g.Parameter)($7e62541df2687656$var$VALUE,$5b9i6.Schema.ofNumber($7e62541df2687656$var$VALUE)).setVariableArgument(!0)]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$7e62541df2687656$var$VALUE,$5b9i6.Schema.ofNumber($7e62541df2687656$var$VALUE)]]))]))}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $0ac57395ef1116a3$var$VALUE="value";class $0ac57395ef1116a3$export$a92776769f460054 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}async internalExecute(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$0ac57395ef1116a3$var$VALUE,Math.random()]]))])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Random").setNamespace($76i8S.Namespaces.MATH).setEvents(new Map([$43zhg.Event.outputEventMapEntry($c501efceca87a708$export$92eaabd025f1e921.of($0ac57395ef1116a3$var$VALUE,$5b9i6.Schema.ofDouble($0ac57395ef1116a3$var$VALUE)))]))}}var $43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $ceadc9ef0595047e$export$3c9838b5e242215b extends $d9f2y.AbstractFunction{static{this.MIN_VALUE="minValue"}static{this.MAX_VALUE="maxValue"}static{this.VALUE="value"}constructor(e,t,a,r,n){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e).setParameters($c501efceca87a708$export$92eaabd025f1e921.of($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE,t,$ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE,a)).setNamespace($76i8S.Namespaces.MATH).setEvents(new Map([$43zhg.Event.outputEventMapEntry($c501efceca87a708$export$92eaabd025f1e921.of($ceadc9ef0595047e$export$3c9838b5e242215b.VALUE,r))])),this.randomFunction=n}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE),a=e.getArguments()?.get($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE),r=this.randomFunction(t,a);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$ceadc9ef0595047e$export$3c9838b5e242215b.VALUE,r]]))])}}class $d2db8ade2d116b31$export$b52a470618d492ff{constructor(){this.functionObjectsIndex={Absolute:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Absolute",e=>Math.abs(e),1,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG,$3tMPe.SchemaType.FLOAT,$3tMPe.SchemaType.DOUBLE),ArcCosine:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("ArcCosine",e=>Math.acos(e)),ArcSine:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("ArcSine",e=>Math.asin(e)),ArcTangent:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("ArcTangent",e=>Math.atan(e)),Ceiling:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Ceiling",e=>Math.ceil(e)),Cosine:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Cosine",e=>Math.cos(e)),HyperbolicCosine:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("HyperbolicCosine",e=>Math.cosh(e)),CubeRoot:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("CubeRoot",e=>Math.cbrt(e)),Exponential:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Exponential",e=>Math.exp(e)),ExponentialMinus1:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("ExponentialMinus1",e=>Math.expm1(e)),Floor:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Floor",e=>Math.floor(e)),LogNatural:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("LogNatural",e=>Math.log(e)),Log10:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Log10",e=>Math.log10(e)),Round:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Round",e=>Math.round(e),1,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.LONG),Sine:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Sine",e=>Math.sin(e)),HyperbolicSine:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("HyperbolicSine",e=>Math.sinh(e)),Tangent:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Tangent",e=>Math.tan(e)),HyperbolicTangent:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("HyperbolicTangent",e=>Math.tanh(e)),ToDegrees:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("ToDegrees",e=>Math.PI/180*e),ToRadians:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("ToRadians",e=>180/Math.PI*e),SquareRoot:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("SquareRoot",e=>Math.sqrt(e)),ArcTangent2:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("ArcTangent2",(e,t)=>Math.atan2(e,t),2),Power:new $03f7c4f09fea698f$export$dbb56c1f07bdf68c("Power",(e,t)=>Math.pow(e,t),2),Add:new $35bc9174d4128ac1$export$d0265b2c425512d6,Hypotenuse:new $f6a6e58a43cb67ba$export$73af47b8d41ff64,Maximum:new $2084534c39475f1a$export$d8d02ac92d161004,Minimum:new $7e62541df2687656$export$23cb308301e89d6b,Random:new $0ac57395ef1116a3$export$a92776769f460054,RandomFloat:new $ceadc9ef0595047e$export$3c9838b5e242215b("RandomFloat",$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE,$5b9i6.Schema.ofFloat($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE).setDefaultValue(0)),$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE,$5b9i6.Schema.ofFloat($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE).setDefaultValue(0x7fffffff)),$5b9i6.Schema.ofFloat($ceadc9ef0595047e$export$3c9838b5e242215b.VALUE),(e,t)=>Math.random()*(t-e)+e),RandomInt:new $ceadc9ef0595047e$export$3c9838b5e242215b("RandomInt",$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE,$5b9i6.Schema.ofInteger($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE).setDefaultValue(0)),$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE,$5b9i6.Schema.ofInteger($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE).setDefaultValue(0x7fffffff)),$5b9i6.Schema.ofInteger($ceadc9ef0595047e$export$3c9838b5e242215b.VALUE),(e,t)=>Math.round(Math.random()*(t-e)+e)),RandomLong:new $ceadc9ef0595047e$export$3c9838b5e242215b("RandomLong",$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE,$5b9i6.Schema.ofLong($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE).setDefaultValue(0)),$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE,$5b9i6.Schema.ofLong($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE).setDefaultValue(Number.MAX_SAFE_INTEGER)),$5b9i6.Schema.ofLong($ceadc9ef0595047e$export$3c9838b5e242215b.VALUE),(e,t)=>Math.round(Math.random()*(t-e)+e)),RandomDouble:new $ceadc9ef0595047e$export$3c9838b5e242215b("RandomDouble",$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE,$5b9i6.Schema.ofDouble($ceadc9ef0595047e$export$3c9838b5e242215b.MIN_VALUE).setDefaultValue(0)),$eFd0g.Parameter.of($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE,$5b9i6.Schema.ofDouble($ceadc9ef0595047e$export$3c9838b5e242215b.MAX_VALUE).setDefaultValue(Number.MAX_VALUE)),$5b9i6.Schema.ofDouble($ceadc9ef0595047e$export$3c9838b5e242215b.VALUE),(e,t)=>Math.random()*(t-e)+e)},this.filterableNames=Object.values(this.functionObjectsIndex).map(e=>e.getSignature().getFullName())}async find(e,t){return e!=$76i8S.Namespaces.MATH?Promise.resolve(void 0):Promise.resolve(this.functionObjectsIndex[t])}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}}var $76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y"),$aHmki=parcelRequire("aHmki"),$76i8S=parcelRequire("76i8S"),$43zhg=parcelRequire("43zhg"),$eFd0g=parcelRequire("eFd0g"),$5b9i6=parcelRequire("5b9i6"),$exni0=parcelRequire("exni0"),$jpFFw=parcelRequire("jpFFw"),$lxSe3=parcelRequire("lxSe3"),$1azZj=parcelRequire("1azZj"),$7pym4=parcelRequire("7pym4");class $819fa4f38b39a44b$export$c3f5344769fec9de extends $d9f2y.AbstractFunction{static{this.SOURCE="source"}static{this.SCHEMA="schema"}static{this.VALUE="value"}static{this.CONVERSION_MODE="conversionMode"}getSignature(){return this.signature}internalExecute(e){let t=e.getArguments()?.get($819fa4f38b39a44b$export$c3f5344769fec9de.SOURCE),a=$5b9i6.Schema.from(e?.getArguments()?.get($819fa4f38b39a44b$export$c3f5344769fec9de.SCHEMA));if(!a)throw new(0,$7pym4.KIRuntimeException)("Schema is not supplied.");let r=(0,$exni0.genericValueOf)(e.getArguments()?.get($819fa4f38b39a44b$export$c3f5344769fec9de.CONVERSION_MODE))||$exni0.ConversionMode.STRICT;return this.convertToSchema(a,e.getSchemaRepository(),t,r)}async convertToSchema(e,t,a,r){try{return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($819fa4f38b39a44b$export$c3f5344769fec9de.VALUE,$jpFFw.SchemaValidator.validate([],e,t,a,!0,r)))])}catch(e){throw new(0,$7pym4.KIRuntimeException)(e?.message)}}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("ObjectConvert").setNamespace($76i8S.Namespaces.SYSTEM_OBJECT).setParameters(new Map([$eFd0g.Parameter.ofEntry($819fa4f38b39a44b$export$c3f5344769fec9de.SOURCE,$5b9i6.Schema.ofAny($819fa4f38b39a44b$export$c3f5344769fec9de.SCHEMA)),$eFd0g.Parameter.ofEntry($819fa4f38b39a44b$export$c3f5344769fec9de.SCHEMA,$5b9i6.Schema.SCHEMA,!1,$1azZj.ParameterType.CONSTANT),$eFd0g.Parameter.ofEntry($819fa4f38b39a44b$export$c3f5344769fec9de.CONVERSION_MODE,$5b9i6.Schema.ofString($819fa4f38b39a44b$export$c3f5344769fec9de.CONVERSION_MODE).setEnums((0,$exni0.getConversionModes)()))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry($c501efceca87a708$export$92eaabd025f1e921.of($819fa4f38b39a44b$export$c3f5344769fec9de.VALUE,$5b9i6.Schema.ofAny($819fa4f38b39a44b$export$c3f5344769fec9de.VALUE)))]))}}var $aHmki=parcelRequire("aHmki"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$2p8YP=parcelRequire("2p8YP"),$d9f2y=parcelRequire("d9f2y");let $3f7f1b8cdd005622$var$VALUE="value",$3f7f1b8cdd005622$var$SOURCE="source",$3f7f1b8cdd005622$var$KEY="key";class $3f7f1b8cdd005622$export$985c797b5e5b8d39 extends $d9f2y.AbstractFunction{constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("ObjectDeleteKey").setNamespace($76i8S.Namespaces.SYSTEM_OBJECT).setParameters(new Map([$eFd0g.Parameter.ofEntry($3f7f1b8cdd005622$var$SOURCE,$5b9i6.Schema.ofAny($3f7f1b8cdd005622$var$SOURCE)),$eFd0g.Parameter.ofEntry($3f7f1b8cdd005622$var$KEY,$5b9i6.Schema.ofString($3f7f1b8cdd005622$var$KEY))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$3f7f1b8cdd005622$var$VALUE,$5b9i6.Schema.ofAny($3f7f1b8cdd005622$var$VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($3f7f1b8cdd005622$var$SOURCE),a=e.getArguments()?.get($3f7f1b8cdd005622$var$KEY);return(0,$2p8YP.isNullValue)(t)?new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3f7f1b8cdd005622$var$VALUE,void 0]]))]):(t=$8e1fd87e141fe827$export$ecd5e8ace626722c(t),delete t[a],new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3f7f1b8cdd005622$var$VALUE,t]]))]))}}var $aHmki=parcelRequire("aHmki"),$2p8YP=parcelRequire("2p8YP"),$lxSe3=parcelRequire("lxSe3"),$d9f2y=parcelRequire("d9f2y"),$76i8S=parcelRequire("76i8S"),$43zhg=parcelRequire("43zhg"),$5b9i6=parcelRequire("5b9i6"),$eFd0g=parcelRequire("eFd0g");let $27a74725f787c8d8$var$VALUE="value",$27a74725f787c8d8$var$SOURCE="source";class $27a74725f787c8d8$export$2511477d495b2883 extends $d9f2y.AbstractFunction{constructor(e,t){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e).setNamespace($76i8S.Namespaces.SYSTEM_OBJECT).setParameters(new Map([$eFd0g.Parameter.ofEntry($27a74725f787c8d8$var$SOURCE,$5b9i6.Schema.ofAny($27a74725f787c8d8$var$SOURCE))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$27a74725f787c8d8$var$VALUE,t]]))]))}getSignature(){return this.signature}}var $5b9i6=parcelRequire("5b9i6");let $3318a6e8ddd417a0$var$VALUE="value";class $3318a6e8ddd417a0$export$73f0f66a071d4653 extends $27a74725f787c8d8$export$2511477d495b2883{constructor(){super("ObjectEntries",$5b9i6.Schema.ofArray($3318a6e8ddd417a0$var$VALUE,$5b9i6.Schema.ofArray("tuple",$5b9i6.Schema.ofString("key"),$5b9i6.Schema.ofAny("value"))))}async internalExecute(e){var t=e.getArguments()?.get("source");if((0,$2p8YP.isNullValue)(t))return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3318a6e8ddd417a0$var$VALUE,[]]]))]);let a=Object.entries($8e1fd87e141fe827$export$ecd5e8ace626722c(t)).sort((e,t)=>e[0].localeCompare(t[0]));return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3318a6e8ddd417a0$var$VALUE,a]]))])}}var $aHmki=parcelRequire("aHmki"),$2p8YP=parcelRequire("2p8YP"),$lxSe3=parcelRequire("lxSe3"),$5b9i6=parcelRequire("5b9i6");let $6191415e3234ff7e$var$VALUE="value";class $6191415e3234ff7e$export$f9f57fda1600eacc extends $27a74725f787c8d8$export$2511477d495b2883{constructor(){super("ObjectKeys",$5b9i6.Schema.ofArray($6191415e3234ff7e$var$VALUE,$5b9i6.Schema.ofString($6191415e3234ff7e$var$VALUE)))}async internalExecute(e){var t=e.getArguments()?.get("source");if((0,$2p8YP.isNullValue)(t))return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$6191415e3234ff7e$var$VALUE,[]]]))]);let a=Object.keys($8e1fd87e141fe827$export$ecd5e8ace626722c(t)).sort((e,t)=>e.localeCompare(t));return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$6191415e3234ff7e$var$VALUE,a]]))])}}var $aHmki=parcelRequire("aHmki"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $84ec56ad3f9a84d3$var$VALUE="value",$84ec56ad3f9a84d3$var$SOURCE="source",$84ec56ad3f9a84d3$var$KEY="key",$84ec56ad3f9a84d3$var$OVERWRITE="overwrite",$84ec56ad3f9a84d3$var$DELETE_KEY_ON_NULL="deleteKeyOnNull";class $84ec56ad3f9a84d3$export$78651ee3a53fcf25 extends $d9f2y.AbstractFunction{constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("ObjectPutValue").setNamespace($76i8S.Namespaces.SYSTEM_OBJECT).setParameters(new Map([$eFd0g.Parameter.ofEntry($84ec56ad3f9a84d3$var$SOURCE,$5b9i6.Schema.ofObject($84ec56ad3f9a84d3$var$SOURCE)),$eFd0g.Parameter.ofEntry($84ec56ad3f9a84d3$var$KEY,$5b9i6.Schema.ofString($84ec56ad3f9a84d3$var$KEY)),$eFd0g.Parameter.ofEntry($84ec56ad3f9a84d3$var$VALUE,$5b9i6.Schema.ofAny($84ec56ad3f9a84d3$var$VALUE)),$eFd0g.Parameter.ofEntry($84ec56ad3f9a84d3$var$OVERWRITE,$5b9i6.Schema.ofBoolean($84ec56ad3f9a84d3$var$OVERWRITE).setDefaultValue(!0)),$eFd0g.Parameter.ofEntry($84ec56ad3f9a84d3$var$DELETE_KEY_ON_NULL,$5b9i6.Schema.ofBoolean($84ec56ad3f9a84d3$var$DELETE_KEY_ON_NULL).setDefaultValue(!1))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$84ec56ad3f9a84d3$var$VALUE,$5b9i6.Schema.ofObject($84ec56ad3f9a84d3$var$VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($84ec56ad3f9a84d3$var$SOURCE),a=e.getArguments()?.get($84ec56ad3f9a84d3$var$KEY),r=e.getArguments()?.get($84ec56ad3f9a84d3$var$VALUE),n=e.getArguments()?.get($84ec56ad3f9a84d3$var$OVERWRITE),s=e.getArguments()?.get($84ec56ad3f9a84d3$var$DELETE_KEY_ON_NULL),i=new $2f786f17389a32e8$export$39519efb8a973bce(t,"Data.");return i.setValue(a,r,n,s),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$84ec56ad3f9a84d3$var$VALUE,i.getStore()]]))])}}var $aHmki=parcelRequire("aHmki"),$2p8YP=parcelRequire("2p8YP"),$lxSe3=parcelRequire("lxSe3"),$5b9i6=parcelRequire("5b9i6");let $d6af526053513432$var$VALUE="value";class $d6af526053513432$export$eb0a4e91472cd1fb extends $27a74725f787c8d8$export$2511477d495b2883{constructor(){super("ObjectValues",$5b9i6.Schema.ofArray($d6af526053513432$var$VALUE,$5b9i6.Schema.ofAny($d6af526053513432$var$VALUE)))}async internalExecute(e){var t=e.getArguments()?.get("source");if((0,$2p8YP.isNullValue)(t))return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$d6af526053513432$var$VALUE,[]]]))]);let a=Object.entries($8e1fd87e141fe827$export$ecd5e8ace626722c(t)).sort((e,t)=>e[0].localeCompare(t[0])).map(e=>e[1]);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$d6af526053513432$var$VALUE,a]]))])}}class $41320d3a822dc1e9$export$64f266808c8b139{constructor(){this.functionObjectsIndex={ObjectValues:new $d6af526053513432$export$eb0a4e91472cd1fb,ObjectKeys:new $6191415e3234ff7e$export$f9f57fda1600eacc,ObjectEntries:new $3318a6e8ddd417a0$export$73f0f66a071d4653,ObjectDeleteKey:new $3f7f1b8cdd005622$export$985c797b5e5b8d39,ObjectPutValue:new $84ec56ad3f9a84d3$export$78651ee3a53fcf25,ObjectConvert:new $819fa4f38b39a44b$export$c3f5344769fec9de},this.filterableNames=Object.values(this.functionObjectsIndex).map(e=>e.getSignature().getFullName())}async find(e,t){return e!=$76i8S.Namespaces.SYSTEM_OBJECT?Promise.resolve(void 0):Promise.resolve(this.functionObjectsIndex[t])}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $c5ebf0980df56490$export$531cef85654f2406 extends $d9f2y.AbstractFunction{static{this.VALUES="values"}static{this.STREAM="stream"}static{this.LOG="LOG"}static{this.ERROR="ERROR"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($c5ebf0980df56490$export$531cef85654f2406.VALUES),a=e.getArguments()?.get($c5ebf0980df56490$export$531cef85654f2406.STREAM);return(a===$c5ebf0980df56490$export$531cef85654f2406.LOG?console?.log:console?.error)?.(...t),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Print").setNamespace($76i8S.Namespaces.SYSTEM).setParameters(new Map([$eFd0g.Parameter.ofEntry($c5ebf0980df56490$export$531cef85654f2406.VALUES,$5b9i6.Schema.ofAny($c5ebf0980df56490$export$531cef85654f2406.VALUES),!0),$eFd0g.Parameter.ofEntry($c5ebf0980df56490$export$531cef85654f2406.STREAM,$5b9i6.Schema.ofString($c5ebf0980df56490$export$531cef85654f2406.STREAM).setEnums([$c5ebf0980df56490$export$531cef85654f2406.LOG,$c5ebf0980df56490$export$531cef85654f2406.ERROR]).setDefaultValue($c5ebf0980df56490$export$531cef85654f2406.LOG))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map)]))}}var $76i8S=parcelRequire("76i8S"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $6044cdf1b182fef5$export$14d8c90077fe987e extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_SEARCH_STRING_NAME="searchString"}static{this.PARAMETER_SECOND_STRING_NAME="secondString"}static{this.PARAMETER_THIRD_STRING_NAME="thirdString"}static{this.PARAMETER_INDEX_NAME="index"}static{this.PARAMETER_SECOND_INDEX_NAME="secondIndex"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME))}static{this.PARAMETER_SECOND_STRING=new(0,$eFd0g.Parameter)($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_STRING_NAME,$5b9i6.Schema.ofString($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_STRING_NAME))}static{this.PARAMETER_THIRD_STRING=new(0,$eFd0g.Parameter)($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_THIRD_STRING_NAME,$5b9i6.Schema.ofString($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_THIRD_STRING_NAME))}static{this.PARAMETER_INDEX=new(0,$eFd0g.Parameter)($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX_NAME,$5b9i6.Schema.ofInteger($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX_NAME))}static{this.PARAMETER_SECOND_INDEX=new(0,$eFd0g.Parameter)($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_INDEX_NAME,$5b9i6.Schema.ofInteger($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_INDEX_NAME))}static{this.PARAMETER_SEARCH_STRING=new(0,$eFd0g.Parameter)($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SEARCH_STRING_NAME,$5b9i6.Schema.ofString($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME))}static{this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,$5b9i6.Schema.ofString($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME)))}static{this.EVENT_BOOLEAN=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME)))}static{this.EVENT_INT=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,$5b9i6.Schema.ofInteger($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME)))}static{this.EVENT_ARRAY=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,$5b9i6.Schema.ofArray($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME)))}constructor(e,t,a,...r){super();let n=new Map;r.forEach(e=>n.set(e.getParameterName(),e)),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(t).setNamespace(e).setParameters(n).setEvents($c501efceca87a708$export$92eaabd025f1e921.of(a.getName(),a))}getSignature(){return this.signature}static ofEntryStringStringAndBooleanOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME),r=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SEARCH_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a,r)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_BOOLEAN,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SEARCH_STRING)]}static ofEntryStringIntegerAndStringOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME),r=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a,r)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX)]}static ofEntryStringStringAndIntegerOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME),r=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SEARCH_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a,r)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_INT,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SEARCH_STRING)]}static ofEntryStringAndStringOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING)]}static ofEntryStringAndBooleanOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_BOOLEAN,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING)]}static ofEntryStringStringIntegerAndIntegerOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME),r=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SEARCH_STRING_NAME),n=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a,r,n)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_INT,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SEARCH_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX)]}static ofEntryStringIntegerIntegerAndStringOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME),r=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX_NAME),n=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_INDEX_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a,r,n)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_INDEX,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_INDEX)]}static ofEntryStringStringStringAndStringOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME),r=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_STRING_NAME),n=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_THIRD_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a,r,n)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_SECOND_STRING,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_THIRD_STRING)]}static ofEntryStringAndIntegerOutput(e,t){return[e,new class extends $6044cdf1b182fef5$export$14d8c90077fe987e{async internalExecute(e){let a=e?.getArguments()?.get($6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_RESULT_NAME,t(a)))])}}($76i8S.Namespaces.STRING,e,$6044cdf1b182fef5$export$14d8c90077fe987e.EVENT_INT,$6044cdf1b182fef5$export$14d8c90077fe987e.PARAMETER_STRING)]}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$36FlI=parcelRequire("36FlI"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $3418878f0c1771a5$export$e55b597c359d82cd extends $d9f2y.AbstractFunction{static{this.VALUE="value"}constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Concatenate").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[$3418878f0c1771a5$export$e55b597c359d82cd.VALUE,new(0,$eFd0g.Parameter)($3418878f0c1771a5$export$e55b597c359d82cd.VALUE,new(0,$5b9i6.Schema)().setName($3418878f0c1771a5$export$e55b597c359d82cd.VALUE).setType(new(0,$36FlI.SingleType)($3tMPe.SchemaType.STRING))).setVariableArgument(!0)]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$3418878f0c1771a5$export$e55b597c359d82cd.VALUE,$5b9i6.Schema.ofString($3418878f0c1771a5$export$e55b597c359d82cd.VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($3418878f0c1771a5$export$e55b597c359d82cd.VALUE),a="";return t.reduce((e,t)=>a=e+t,a),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3418878f0c1771a5$export$e55b597c359d82cd.VALUE,a]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $3b161ec20d40ebd1$export$b12ae3a6a3425008 extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_AT_START_NAME="startPosition"}static{this.PARAMETER_AT_END_NAME="endPosition"}static{this.EVENT_RESULT_NAME="result"}constructor(){super(),this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_STRING_NAME)),this.PARAMETER_AT_START=new(0,$eFd0g.Parameter)($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_AT_START_NAME,$5b9i6.Schema.ofInteger($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_AT_START_NAME)),this.PARAMETER_AT_END=new(0,$eFd0g.Parameter)($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_AT_END_NAME,$5b9i6.Schema.ofInteger($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_AT_END_NAME)),this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[$3b161ec20d40ebd1$export$b12ae3a6a3425008.EVENT_RESULT_NAME,$5b9i6.Schema.ofString($3b161ec20d40ebd1$export$b12ae3a6a3425008.EVENT_RESULT_NAME)]])),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("DeleteForGivenLength").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[this.PARAMETER_STRING.getParameterName(),this.PARAMETER_STRING],[this.PARAMETER_AT_START.getParameterName(),this.PARAMETER_AT_START],[this.PARAMETER_AT_END.getParameterName(),this.PARAMETER_AT_END]])).setEvents(new Map([[this.EVENT_STRING.getName(),this.EVENT_STRING]]))}getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_STRING_NAME),a=e?.getArguments()?.get($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_AT_START_NAME),r=e?.getArguments()?.get($3b161ec20d40ebd1$export$b12ae3a6a3425008.PARAMETER_AT_END_NAME);if(r>=a){let e="";return e+=t.substring(0,a),e+=t.substring(r),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3b161ec20d40ebd1$export$b12ae3a6a3425008.EVENT_RESULT_NAME,e.toString()]]))])}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3b161ec20d40ebd1$export$b12ae3a6a3425008.EVENT_RESULT_NAME,t]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $b2a5072ec1927f54$export$ea0ae5b491c5c50a extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_AT_POSITION_NAME="position"}static{this.PARAMETER_INSERT_STRING_NAME="insertString"}getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_STRING_NAME),a=e?.getArguments()?.get($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_AT_POSITION_NAME),r=e?.getArguments()?.get($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_INSERT_STRING_NAME),n="";return n+=t.substring(0,a),n+=r,n+=t.substring(a),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[this.EVENT_RESULT_NAME,n]]))])}constructor(...e){super(...e),this.EVENT_RESULT_NAME="result",this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_STRING_NAME)),this.PARAMETER_AT_POSITION=new(0,$eFd0g.Parameter)($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_AT_POSITION_NAME,$5b9i6.Schema.ofInteger($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_AT_POSITION_NAME)),this.PARAMETER_INSERT_STRING=new(0,$eFd0g.Parameter)($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_INSERT_STRING_NAME,$5b9i6.Schema.ofString($b2a5072ec1927f54$export$ea0ae5b491c5c50a.PARAMETER_INSERT_STRING_NAME)),this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[this.EVENT_RESULT_NAME,$5b9i6.Schema.ofString(this.EVENT_RESULT_NAME)]])),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("InsertAtGivenPosition").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[this.PARAMETER_STRING.getParameterName(),this.PARAMETER_STRING],[this.PARAMETER_AT_POSITION.getParameterName(),this.PARAMETER_AT_POSITION],[this.PARAMETER_INSERT_STRING.getParameterName(),this.PARAMETER_INSERT_STRING]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[this.EVENT_RESULT_NAME,$5b9i6.Schema.ofString(this.EVENT_RESULT_NAME)]]))]))}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $c0ead9fdfff9838a$export$6479cfcac2b87c0 extends $d9f2y.AbstractFunction{static{this.PARAMETER_REGEX_NAME="regex"}static{this.PARAMETER_STRING_NAME="string"}static{this.EVENT_RESULT_NAME="result"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($c0ead9fdfff9838a$export$6479cfcac2b87c0.PARAMETER_REGEX_NAME),a=e.getArguments()?.get($c0ead9fdfff9838a$export$6479cfcac2b87c0.PARAMETER_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$c0ead9fdfff9838a$export$6479cfcac2b87c0.EVENT_RESULT_NAME,!!a.match(t)?.length]]))])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Matches").setNamespace($76i8S.Namespaces.STRING).setParameters($c501efceca87a708$export$92eaabd025f1e921.ofEntries($c501efceca87a708$export$92eaabd025f1e921.entry(...$eFd0g.Parameter.ofEntry($c0ead9fdfff9838a$export$6479cfcac2b87c0.PARAMETER_REGEX_NAME,$5b9i6.Schema.ofString($c0ead9fdfff9838a$export$6479cfcac2b87c0.PARAMETER_REGEX_NAME))),$c501efceca87a708$export$92eaabd025f1e921.entry(...$eFd0g.Parameter.ofEntry($c0ead9fdfff9838a$export$6479cfcac2b87c0.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($c0ead9fdfff9838a$export$6479cfcac2b87c0.PARAMETER_STRING_NAME))))).setEvents($c501efceca87a708$export$92eaabd025f1e921.ofEntries($c501efceca87a708$export$92eaabd025f1e921.entry(...$43zhg.Event.outputEventMapEntry(new Map([[$c0ead9fdfff9838a$export$6479cfcac2b87c0.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($c0ead9fdfff9838a$export$6479cfcac2b87c0.EVENT_RESULT_NAME)]])))))}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $3b63d7e240748514$export$8b243d0520548581 extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_POSTPAD_STRING_NAME="postpadString"}static{this.PARAMETER_LENGTH_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($3b63d7e240748514$export$8b243d0520548581.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($3b63d7e240748514$export$8b243d0520548581.PARAMETER_STRING_NAME))}static{this.PARAMETER_POSTPAD_STRING=new(0,$eFd0g.Parameter)($3b63d7e240748514$export$8b243d0520548581.PARAMETER_POSTPAD_STRING_NAME,$5b9i6.Schema.ofString($3b63d7e240748514$export$8b243d0520548581.PARAMETER_POSTPAD_STRING_NAME))}static{this.PARAMETER_LENGTH=new(0,$eFd0g.Parameter)($3b63d7e240748514$export$8b243d0520548581.PARAMETER_LENGTH_NAME,$5b9i6.Schema.ofInteger($3b63d7e240748514$export$8b243d0520548581.PARAMETER_LENGTH_NAME))}static{this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[$3b63d7e240748514$export$8b243d0520548581.EVENT_RESULT_NAME,$5b9i6.Schema.ofString($3b63d7e240748514$export$8b243d0520548581.EVENT_RESULT_NAME)]]))}constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("PostPad").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[$3b63d7e240748514$export$8b243d0520548581.PARAMETER_STRING.getParameterName(),$3b63d7e240748514$export$8b243d0520548581.PARAMETER_STRING],[$3b63d7e240748514$export$8b243d0520548581.PARAMETER_POSTPAD_STRING.getParameterName(),$3b63d7e240748514$export$8b243d0520548581.PARAMETER_POSTPAD_STRING],[$3b63d7e240748514$export$8b243d0520548581.PARAMETER_LENGTH.getParameterName(),$3b63d7e240748514$export$8b243d0520548581.PARAMETER_LENGTH]])).setEvents(new Map([[$3b63d7e240748514$export$8b243d0520548581.EVENT_STRING.getName(),$3b63d7e240748514$export$8b243d0520548581.EVENT_STRING]]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($3b63d7e240748514$export$8b243d0520548581.PARAMETER_STRING_NAME),a=e?.getArguments()?.get($3b63d7e240748514$export$8b243d0520548581.PARAMETER_POSTPAD_STRING_NAME),r=e.getArguments()?.get($3b63d7e240748514$export$8b243d0520548581.PARAMETER_LENGTH_NAME),n="",s=a.length;for(n+=t;s<=r;)n+=a,s+=a.length;return n.length-t.length<r&&(n+=a.substring(0,r-(n.length-t.length))),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$3b63d7e240748514$export$8b243d0520548581.EVENT_RESULT_NAME,n.toString()]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $5ebbb533cd24deb3$export$faa1d9aa9e5514ee extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_PREPAD_STRING_NAME="prepadString"}static{this.PARAMETER_LENGTH_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_STRING_NAME))}static{this.PARAMETER_PREPAD_STRING=new(0,$eFd0g.Parameter)($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_PREPAD_STRING_NAME,$5b9i6.Schema.ofString($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_PREPAD_STRING_NAME))}static{this.PARAMETER_LENGTH=new(0,$eFd0g.Parameter)($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_LENGTH_NAME,$5b9i6.Schema.ofInteger($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_LENGTH_NAME))}static{this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.EVENT_RESULT_NAME,$5b9i6.Schema.ofString($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.EVENT_RESULT_NAME)]]))}getSignature(){return this.signature}constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("PrePad").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_STRING.getParameterName(),$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_STRING],[$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_PREPAD_STRING.getParameterName(),$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_PREPAD_STRING],[$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_LENGTH.getParameterName(),$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_LENGTH]])).setEvents(new Map([[$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.EVENT_STRING.getName(),$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.EVENT_STRING]]))}async internalExecute(e){let t=e.getArguments()?.get($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_STRING_NAME),a=e.getArguments()?.get($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_PREPAD_STRING_NAME),r=e.getArguments()?.get($5ebbb533cd24deb3$export$faa1d9aa9e5514ee.PARAMETER_LENGTH_NAME),n="",s=a.length;for(;s<=r;)n+=a,s+=a.length;return n.length<r&&(n+=a.substring(0,r-n.length)),n+=t,new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$5ebbb533cd24deb3$export$faa1d9aa9e5514ee.EVENT_RESULT_NAME,n]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $b3e3c0f18a2c1263$export$5619d260fbac97b4 extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_BOOLEAN_NAME="boolean"}static{this.PARAMETER_FIRST_OFFSET_NAME="firstOffset"}static{this.PARAMETER_OTHER_STRING_NAME="otherString"}static{this.PARAMETER_SECOND_OFFSET_NAME="secondOffset"}static{this.PARAMETER_INTEGER_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_STRING_NAME))}static{this.PARAMETER_OTHER_STRING=new(0,$eFd0g.Parameter)($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_OTHER_STRING_NAME,$5b9i6.Schema.ofString($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_OTHER_STRING_NAME))}static{this.PARAMETER_FIRST_OFFSET=new(0,$eFd0g.Parameter)($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_FIRST_OFFSET_NAME,$5b9i6.Schema.ofInteger($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_FIRST_OFFSET_NAME))}static{this.PARAMETER_SECOND_OFFSET=new(0,$eFd0g.Parameter)($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_SECOND_OFFSET_NAME,$5b9i6.Schema.ofInteger($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_SECOND_OFFSET_NAME))}static{this.PARAMETER_INTEGER=new(0,$eFd0g.Parameter)($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_INTEGER_NAME,$5b9i6.Schema.ofInteger($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_INTEGER_NAME))}static{this.PARAMETER_BOOLEAN=new(0,$eFd0g.Parameter)($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_BOOLEAN_NAME,$5b9i6.Schema.ofBoolean($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_BOOLEAN_NAME))}static{this.EVENT_BOOLEAN=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[$b3e3c0f18a2c1263$export$5619d260fbac97b4.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($b3e3c0f18a2c1263$export$5619d260fbac97b4.EVENT_RESULT_NAME)]]))}getSignature(){return this.signature}constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("RegionMatches").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_STRING.getParameterName(),$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_STRING],[$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_BOOLEAN.getParameterName(),$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_BOOLEAN],[$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_FIRST_OFFSET.getParameterName(),$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_FIRST_OFFSET],[$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_OTHER_STRING.getParameterName(),$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_OTHER_STRING],[$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_SECOND_OFFSET.getParameterName(),$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_SECOND_OFFSET],[$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_INTEGER.getParameterName(),$b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_INTEGER]])).setEvents(new Map([[$b3e3c0f18a2c1263$export$5619d260fbac97b4.EVENT_BOOLEAN.getName(),$b3e3c0f18a2c1263$export$5619d260fbac97b4.EVENT_BOOLEAN]]))}async internalExecute(e){let t=e.getArguments()?.get($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_STRING_NAME),a=e.getArguments()?.get($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_BOOLEAN_NAME),r=e.getArguments()?.get($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_FIRST_OFFSET_NAME),n=e?.getArguments()?.get($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_OTHER_STRING_NAME),s=e?.getArguments()?.get($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_SECOND_OFFSET_NAME),i=e.getArguments()?.get($b3e3c0f18a2c1263$export$5619d260fbac97b4.PARAMETER_INTEGER_NAME),o=!1;return o=!(r<0)&&!(s<0)&&!(r+i>t.length)&&!(s+i>n.length)&&(a?(t=t.substring(r,r+i).toUpperCase())==n.substring(s,s+i).toUpperCase():(t=t.substring(r,r+i))==n.substring(s,i)),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$b3e3c0f18a2c1263$export$5619d260fbac97b4.EVENT_RESULT_NAME,o]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $819de6d47098b51d$export$13c473626aed6671 extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_AT_START_NAME="startPosition"}static{this.PARAMETER_AT_LENGTH_NAME="lengthPosition"}static{this.PARAMETER_REPLACE_STRING_NAME="replaceString"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($819de6d47098b51d$export$13c473626aed6671.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($819de6d47098b51d$export$13c473626aed6671.PARAMETER_STRING_NAME))}static{this.PARAMETER_AT_START=new(0,$eFd0g.Parameter)($819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_START_NAME,$5b9i6.Schema.ofInteger($819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_START_NAME))}static{this.PARAMETER_AT_LENGTH=new(0,$eFd0g.Parameter)($819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_LENGTH_NAME,$5b9i6.Schema.ofInteger($819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_LENGTH_NAME))}static{this.PARAMETER_REPLACE_STRING=new(0,$eFd0g.Parameter)($819de6d47098b51d$export$13c473626aed6671.PARAMETER_REPLACE_STRING_NAME,$5b9i6.Schema.ofString($819de6d47098b51d$export$13c473626aed6671.PARAMETER_REPLACE_STRING_NAME))}static{this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[$819de6d47098b51d$export$13c473626aed6671.EVENT_RESULT_NAME,$5b9i6.Schema.ofString($819de6d47098b51d$export$13c473626aed6671.EVENT_RESULT_NAME)]]))}constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("ReplaceAtGivenPosition").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[$819de6d47098b51d$export$13c473626aed6671.PARAMETER_STRING.getParameterName(),$819de6d47098b51d$export$13c473626aed6671.PARAMETER_STRING],[$819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_START.getParameterName(),$819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_START],[$819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_LENGTH.getParameterName(),$819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_LENGTH],[$819de6d47098b51d$export$13c473626aed6671.PARAMETER_REPLACE_STRING.getParameterName(),$819de6d47098b51d$export$13c473626aed6671.PARAMETER_REPLACE_STRING]])).setEvents(new Map([[$819de6d47098b51d$export$13c473626aed6671.EVENT_STRING.getName(),$819de6d47098b51d$export$13c473626aed6671.EVENT_STRING]]))}getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get($819de6d47098b51d$export$13c473626aed6671.PARAMETER_STRING_NAME),a=e?.getArguments()?.get($819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_START_NAME),r=e?.getArguments()?.get($819de6d47098b51d$export$13c473626aed6671.PARAMETER_AT_LENGTH_NAME),n=e?.getArguments()?.get($819de6d47098b51d$export$13c473626aed6671.PARAMETER_REPLACE_STRING_NAME);if(t.length,a<r){let e="";e+=t.substring(0,a),e+=n,e+=t.substring(a+r)}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$819de6d47098b51d$export$13c473626aed6671.EVENT_RESULT_NAME,t]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y"),$aHmki=parcelRequire("aHmki"),$gIdZh=parcelRequire("gIdZh"),$3tMPe=parcelRequire("3tMPe");class $ff9b2ed1e2be2df7$export$53c81f36b32e1bba extends $d9f2y.AbstractFunction{constructor(){super(),this.VALUE="value",this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Reverse").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[this.VALUE,new(0,$eFd0g.Parameter)(this.VALUE,$5b9i6.Schema.ofString(this.VALUE)).setVariableArgument(!1)]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[this.VALUE,new(0,$5b9i6.Schema)().setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.STRING)).setName(this.VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(this.VALUE),a=t.length-1,r="";for(;a>=0;)r+=t.charAt(a--);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of(this.VALUE,r))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $d3680047abebbd52$export$f836382419f64c98 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}constructor(){super(),this.PARAMETER_STRING_NAME="string",this.PARAMETER_SPLIT_STRING_NAME="searchString",this.EVENT_RESULT_NAME="result",this.PARAMETER_STRING=new(0,$eFd0g.Parameter)(this.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString(this.PARAMETER_STRING_NAME)),this.PARAMETER_SPLIT_STRING=new(0,$eFd0g.Parameter)(this.PARAMETER_SPLIT_STRING_NAME,$5b9i6.Schema.ofString(this.PARAMETER_SPLIT_STRING_NAME)),this.EVENT_ARRAY=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of(this.EVENT_RESULT_NAME,$5b9i6.Schema.ofArray(this.EVENT_RESULT_NAME))),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Split").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[this.PARAMETER_STRING_NAME,this.PARAMETER_STRING],[this.PARAMETER_SPLIT_STRING_NAME,this.PARAMETER_SPLIT_STRING]])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[this.EVENT_RESULT_NAME,$5b9i6.Schema.ofArray(this.EVENT_RESULT_NAME)]]))]))}async internalExecute(e){let t=e.getArguments()?.get(this.PARAMETER_STRING_NAME),a=e.getArguments()?.get(this.PARAMETER_SPLIT_STRING_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of(this.EVENT_RESULT_NAME,t.split(a)))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $d3784a044ccd0008$export$5f245f9a686b5058 extends $d9f2y.AbstractFunction{getSignature(){return this.signature}constructor(){super(),this.PARAMETER_INPUT_ANYTYPE_NAME="anytype",this.EVENT_RESULT_NAME="result",this.PARAMETER_INPUT_ANYTYPE=new(0,$eFd0g.Parameter)(this.PARAMETER_INPUT_ANYTYPE_NAME,$5b9i6.Schema.ofAny(this.PARAMETER_INPUT_ANYTYPE_NAME)),this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[this.EVENT_RESULT_NAME,$5b9i6.Schema.ofString(this.EVENT_RESULT_NAME)]])),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("ToString").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[this.PARAMETER_INPUT_ANYTYPE.getParameterName(),this.PARAMETER_INPUT_ANYTYPE]])).setEvents(new Map([[this.EVENT_STRING.getName(),this.EVENT_STRING]]))}async internalExecute(e){let t=e.getArguments()?.get(this.PARAMETER_INPUT_ANYTYPE_NAME),a="";return a="object"==typeof t?JSON.stringify(t,void 0,2):""+t,new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[this.EVENT_RESULT_NAME,a]]))])}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $b4dcd14e2006bd07$export$eca59ed5891f8e47 extends $d9f2y.AbstractFunction{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_LENGTH_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new(0,$eFd0g.Parameter)($b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_STRING_NAME,$5b9i6.Schema.ofString($b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_STRING_NAME))}static{this.PARAMETER_LENGTH=new(0,$eFd0g.Parameter)($b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_LENGTH_NAME,$5b9i6.Schema.ofInteger($b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_LENGTH_NAME))}static{this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,new Map([[$b4dcd14e2006bd07$export$eca59ed5891f8e47.EVENT_RESULT_NAME,$5b9i6.Schema.ofString($b4dcd14e2006bd07$export$eca59ed5891f8e47.EVENT_RESULT_NAME)]]))}getSignature(){return this.signature}constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("TrimTo").setNamespace($76i8S.Namespaces.STRING).setParameters(new Map([[$b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_STRING.getParameterName(),$b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_STRING],[$b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_LENGTH.getParameterName(),$b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_LENGTH]])).setEvents(new Map([[$b4dcd14e2006bd07$export$eca59ed5891f8e47.EVENT_STRING.getName(),$b4dcd14e2006bd07$export$eca59ed5891f8e47.EVENT_STRING]]))}async internalExecute(e){let t=e.getArguments()?.get($b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_STRING_NAME),a=e.getArguments()?.get($b4dcd14e2006bd07$export$eca59ed5891f8e47.PARAMETER_LENGTH_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$b4dcd14e2006bd07$export$eca59ed5891f8e47.EVENT_RESULT_NAME,t.substring(0,a)]]))])}}class $a778c0b0e2c85884$export$ae09120a661eed3b{async find(e,t){return e!=$76i8S.Namespaces.STRING?Promise.resolve(void 0):Promise.resolve(this.repoMap.get(t))}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}constructor(){this.repoMap=$c501efceca87a708$export$92eaabd025f1e921.ofArrayEntries($6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndStringOutput("Trim",e=>e.trim()),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndStringOutput("TrimStart",e=>e.trimStart()),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndStringOutput("TrimEnd",e=>e.trimEnd()),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndIntegerOutput("Length",e=>e.length),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndIntegerOutput("Frequency",(e,t)=>{let a=0,r=e.indexOf(t);for(;-1!=r;)a++,r=e.indexOf(t,r+1);return a}),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndStringOutput("LowerCase",e=>e.toLocaleLowerCase()),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndStringOutput("UpperCase",e=>e.toUpperCase()),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndBooleanOutput("IsBlank",e=>""===e.trim()),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringAndBooleanOutput("IsEmpty",e=>""===e),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndBooleanOutput("Contains",(e,t)=>-1!=e.indexOf(t)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndBooleanOutput("EndsWith",(e,t)=>e.endsWith(t)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndBooleanOutput("StartsWith",(e,t)=>e.startsWith(t)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndBooleanOutput("EqualsIgnoreCase",(e,t)=>e.toUpperCase()==t.toUpperCase()),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndBooleanOutput("Matches",(e,t)=>new RegExp(t).test(e)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndIntegerOutput("IndexOf",(e,t)=>e.indexOf(t)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringAndIntegerOutput("LastIndexOf",(e,t)=>e.lastIndexOf(t)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringIntegerAndStringOutput("Repeat",(e,t)=>e.repeat(t)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringIntegerAndIntegerOutput("IndexOfWithStartPoint",(e,t,a)=>e.indexOf(t,a)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringIntegerAndIntegerOutput("LastIndexOfWithStartPoint",(e,t,a)=>e.lastIndexOf(t,a)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringStringAndStringOutput("Replace",(e,t,a)=>e.replaceAll(t,a)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringStringStringAndStringOutput("ReplaceFirst",(e,t,a)=>e.replace(t,a)),$6044cdf1b182fef5$export$14d8c90077fe987e.ofEntryStringIntegerIntegerAndStringOutput("SubString",(e,t,a)=>e.substring(t,a)),$69f0970a535da56f$export$2e2bcd8739ae039(new $3418878f0c1771a5$export$e55b597c359d82cd),$69f0970a535da56f$export$2e2bcd8739ae039(new $3b161ec20d40ebd1$export$b12ae3a6a3425008),$69f0970a535da56f$export$2e2bcd8739ae039(new $b2a5072ec1927f54$export$ea0ae5b491c5c50a),$69f0970a535da56f$export$2e2bcd8739ae039(new $3b63d7e240748514$export$8b243d0520548581),$69f0970a535da56f$export$2e2bcd8739ae039(new $5ebbb533cd24deb3$export$faa1d9aa9e5514ee),$69f0970a535da56f$export$2e2bcd8739ae039(new $b3e3c0f18a2c1263$export$5619d260fbac97b4),$69f0970a535da56f$export$2e2bcd8739ae039(new $819de6d47098b51d$export$13c473626aed6671),$69f0970a535da56f$export$2e2bcd8739ae039(new $ff9b2ed1e2be2df7$export$53c81f36b32e1bba),$69f0970a535da56f$export$2e2bcd8739ae039(new $d3680047abebbd52$export$f836382419f64c98),$69f0970a535da56f$export$2e2bcd8739ae039(new $d3784a044ccd0008$export$5f245f9a686b5058),$69f0970a535da56f$export$2e2bcd8739ae039(new $b4dcd14e2006bd07$export$eca59ed5891f8e47),$69f0970a535da56f$export$2e2bcd8739ae039(new $c0ead9fdfff9838a$export$6479cfcac2b87c0)),this.filterableNames=Array.from(this.repoMap.values()).map(e=>e.getSignature().getFullName())}}var $76i8S=parcelRequire("76i8S"),$43zhg=parcelRequire("43zhg"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $d97fd69f746bba7f$export$f0eee5442249d5fb extends $d9f2y.AbstractFunction{static{this.PARAMETER_TIMESTAMP_NAME="isoTimeStamp"}static{this.PARAMETER_TIMESTAMP_NAME_ONE="isoTimeStamp1"}static{this.PARAMETER_TIMESTAMP_NAME_TWO="isoTimeStamp2"}static{this.PARAMETER_UNIT_NAME="unit"}static{this.PARAMETER_NUMBER_NAME="number"}static{this.PARAMETER_TIMESTAMP=new(0,$eFd0g.Parameter)($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp"))}static{this.PARAMETER_TIMESTAMP_ONE=new(0,$eFd0g.Parameter)($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME_ONE,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp"))}static{this.PARAMETER_TIMESTAMP_TWO=new(0,$eFd0g.Parameter)($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME_TWO,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp"))}static{this.PARAMETER_VARIABLE_UNIT=new(0,$eFd0g.Parameter)($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_UNIT_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timeunit")).setVariableArgument(!0)}static{this.PARAMETER_UNIT=new(0,$eFd0g.Parameter)($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_UNIT_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timeunit"))}static{this.PARAMETER_NUMBER=new(0,$eFd0g.Parameter)($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_NUMBER_NAME,$5b9i6.Schema.ofInteger($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_NUMBER_NAME))}static{this.EVENT_RESULT_NAME="result"}static{this.EVENT_TIMESTAMP_NAME="isoTimeStamp"}static{this.EVENT_INT=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofInteger($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME)))}static{this.EVENT_STRING=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofString($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME)))}static{this.EVENT_LONG=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofLong($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME)))}static{this.EVENT_BOOLEAN=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME)))}static{this.EVENT_TIMESTAMP=new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp")))}getSignature(){return this.signature}constructor(e,t,...a){if(super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e).setNamespace($76i8S.Namespaces.DATE).setEvents($c501efceca87a708$export$92eaabd025f1e921.of(t.getName(),t)),!a?.length)return;let r=new Map;a.forEach(e=>r.set(e.getParameterName(),e)),this.signature.setParameters(r)}static ofEntryTimestampAndIntegerOutput(e,t){return[e,new class extends $d97fd69f746bba7f$export$f0eee5442249d5fb{async internalExecute(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,t(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME))))])}}(e,$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_INT,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP)]}static ofEntryTimestampAndBooleanOutput(e,t){return[e,new class extends $d97fd69f746bba7f$export$f0eee5442249d5fb{async internalExecute(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,t(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME))))])}}(e,$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_BOOLEAN,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP)]}static ofEntryTimestampAndStringOutput(e,t){return[e,new class extends $d97fd69f746bba7f$export$f0eee5442249d5fb{async internalExecute(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,t(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME))))])}}(e,$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_STRING,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP)]}static ofEntryTimestampIntegerAndTimestampOutput(e,t){return[e,new class extends $d97fd69f746bba7f$export$f0eee5442249d5fb{async internalExecute(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,t(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME),e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_NUMBER_NAME))))])}}(e,$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_NUMBER)]}static ofEntryTimestampTimestampAndTOutput(e,t,a,...r){return[e,new class extends $d97fd69f746bba7f$export$f0eee5442249d5fb{async internalExecute(e){let t=[];return r?.length&&t.push(...r.map(t=>e.getArguments()?.get(t.getParameterName()))),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,a(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME_ONE),e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME_TWO),t)))])}}(e,t,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_ONE,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_TWO,...r)]}}var $5b9i6=parcelRequire("5b9i6"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g");function $d43fddcb53937ca6$export$2364d538c15eb8db(e){let t=$4eKkr$DateTime.fromISO(e,{setZone:!0});if(!t?.isValid)throw Error("Invalid ISO timestamp");return t}class $4fd569d134e58259$export$1279a7d86e2f1812 extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.PARAMETER_YEARS_NAME="years"}static{this.PARAMETER_MONTHS_NAME="months"}static{this.PARAMETER_DAYS_NAME="days"}static{this.PARAMETER_HOURS_NAME="hours"}static{this.PARAMETER_MINUTES_NAME="minutes"}static{this.PARAMETER_SECONDS_NAME="seconds"}static{this.PARAMETER_MILLISECONDS_NAME="milliseconds"}constructor(e){super(e?"AddTime":"SubtractTime",$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP,$eFd0g.Parameter.of($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_YEARS_NAME,$5b9i6.Schema.ofNumber($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_YEARS_NAME).setDefaultValue(0)),$eFd0g.Parameter.of($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MONTHS_NAME,$5b9i6.Schema.ofNumber($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MONTHS_NAME).setDefaultValue(0)),$eFd0g.Parameter.of($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_DAYS_NAME,$5b9i6.Schema.ofNumber($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_DAYS_NAME).setDefaultValue(0)),$eFd0g.Parameter.of($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_HOURS_NAME,$5b9i6.Schema.ofNumber($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_HOURS_NAME).setDefaultValue(0)),$eFd0g.Parameter.of($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MINUTES_NAME,$5b9i6.Schema.ofNumber($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MINUTES_NAME).setDefaultValue(0)),$eFd0g.Parameter.of($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_SECONDS_NAME,$5b9i6.Schema.ofNumber($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_SECONDS_NAME).setDefaultValue(0)),$eFd0g.Parameter.of($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MILLISECONDS_NAME,$5b9i6.Schema.ofNumber($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MILLISECONDS_NAME).setDefaultValue(0))),this.isAdd=e}async internalExecute(e){let t,a=$d43fddcb53937ca6$export$2364d538c15eb8db(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME)),r=e.getArguments()?.get($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_YEARS_NAME),n=e.getArguments()?.get($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MONTHS_NAME),s=e.getArguments()?.get($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_DAYS_NAME),i=e.getArguments()?.get($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_HOURS_NAME),o=e.getArguments()?.get($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MINUTES_NAME),E={years:r,months:n,days:s,hours:i,minutes:o,seconds:e.getArguments()?.get($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_SECONDS_NAME),milliseconds:e.getArguments()?.get($4fd569d134e58259$export$1279a7d86e2f1812.PARAMETER_MILLISECONDS_NAME)};return t=this.isAdd?a.plus(E):a.minus(E),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP_NAME,t.toISO()))])}}var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $750ffd99810cbd09$export$7282f9d655e6f28b extends $d9f2y.AbstractFunction{constructor(e,t){super(),this.paramName=`epoch${t?"Seconds":"Milliseconds"}`,this.isSeconds=t,this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e).setNamespace($76i8S.Namespaces.DATE).setParameters(new Map([[this.paramName,$eFd0g.Parameter.of(this.paramName,new(0,$5b9i6.Schema)().setName(this.paramName).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.LONG,$3tMPe.SchemaType.INTEGER,$3tMPe.SchemaType.STRING)))]])).setEvents(new Map([[$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP.getName(),$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP]]))}getSignature(){return this.signature}internalExecute(e){let t=parseInt(e.getArguments()?.get(this.paramName)),a=this.isSeconds?1e3*t:t;if(isNaN(a))throw Error(`Please provide a valid value for ${this.paramName}.`);return Promise.resolve(new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP_NAME,new Date(a).toISOString()))]))}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $ebb047a76937813e$export$513f47576c1a776b extends $d9f2y.AbstractFunction{constructor(e,t){super(),this.isSeconds=t,this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e).setNamespace($76i8S.Namespaces.DATE).setParameters(new Map([[$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP]])).setEvents(new Map([[$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP.getName(),$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_LONG]]))}getSignature(){return this.signature}internalExecute(e){let t=e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME),a=this.isSeconds?$4eKkr$DateTime.fromISO(t).toSeconds():$4eKkr$DateTime.fromISO(t).toMillis();return Promise.resolve(new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,a))]))}}var $5b9i6=parcelRequire("5b9i6"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g");class $54d2997ade4faf2d$export$2021d53cd887239a extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.PARAMETER_FORMAT_NAME="format"}static{this.PARAMETER_LOCALE_NAME="locale"}constructor(){super("ToDateString",$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_STRING,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP,$eFd0g.Parameter.of($54d2997ade4faf2d$export$2021d53cd887239a.PARAMETER_FORMAT_NAME,$5b9i6.Schema.ofString($54d2997ade4faf2d$export$2021d53cd887239a.PARAMETER_FORMAT_NAME)),$eFd0g.Parameter.of($54d2997ade4faf2d$export$2021d53cd887239a.PARAMETER_LOCALE_NAME,$5b9i6.Schema.ofString($54d2997ade4faf2d$export$2021d53cd887239a.PARAMETER_LOCALE_NAME).setDefaultValue("")))}async internalExecute(e){let t=$d43fddcb53937ca6$export$2364d538c15eb8db(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME)),a=e.getArguments()?.get($54d2997ade4faf2d$export$2021d53cd887239a.PARAMETER_FORMAT_NAME),r=e.getArguments()?.get($54d2997ade4faf2d$export$2021d53cd887239a.PARAMETER_LOCALE_NAME);return""===r&&(r="system"),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,t.toFormat(a,{locale:r})))])}}var $5b9i6=parcelRequire("5b9i6"),$5b9i6=parcelRequire("5b9i6"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g");class $32739a92af697e49$export$37336213f9150bce extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.PARAMETER_TIMEZONE_NAME="timezone"}constructor(){super("SetTimeZone",$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP,$eFd0g.Parameter.of($32739a92af697e49$export$37336213f9150bce.PARAMETER_TIMEZONE_NAME,$5b9i6.Schema.ofString($32739a92af697e49$export$37336213f9150bce.PARAMETER_TIMEZONE_NAME)))}async internalExecute(e){let t=$d43fddcb53937ca6$export$2364d538c15eb8db(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME)),a=e.getArguments()?.get($32739a92af697e49$export$37336213f9150bce.PARAMETER_TIMEZONE_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP_NAME,t.setZone(a).toISO()))])}}var $5b9i6=parcelRequire("5b9i6"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S");class $752e77cda54d746c$export$6efa0d5760bfc60f extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.PARAMETER_START_TIMESTAMP_NAME="startTimestamp"}static{this.PARAMETER_END_TIMESTAMP_NAME="endTimestamp"}static{this.PARAMETER_CHECK_TIMESTAMP_NAME="checkTimestamp"}constructor(){super("IsBetween",$752e77cda54d746c$export$6efa0d5760bfc60f.EVENT_BOOLEAN,$eFd0g.Parameter.of($752e77cda54d746c$export$6efa0d5760bfc60f.PARAMETER_START_TIMESTAMP_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp")),$eFd0g.Parameter.of($752e77cda54d746c$export$6efa0d5760bfc60f.PARAMETER_END_TIMESTAMP_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp")),$eFd0g.Parameter.of($752e77cda54d746c$export$6efa0d5760bfc60f.PARAMETER_CHECK_TIMESTAMP_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp")))}async internalExecute(e){let t=e.getArguments()?.get($752e77cda54d746c$export$6efa0d5760bfc60f.PARAMETER_START_TIMESTAMP_NAME),a=e.getArguments()?.get($752e77cda54d746c$export$6efa0d5760bfc60f.PARAMETER_END_TIMESTAMP_NAME),r=e.getArguments()?.get($752e77cda54d746c$export$6efa0d5760bfc60f.PARAMETER_CHECK_TIMESTAMP_NAME),n=$d43fddcb53937ca6$export$2364d538c15eb8db(t),s=$d43fddcb53937ca6$export$2364d538c15eb8db(a),i=$d43fddcb53937ca6$export$2364d538c15eb8db(r);return n>s&&([n,s]=[s,n]),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($752e77cda54d746c$export$6efa0d5760bfc60f.EVENT_RESULT_NAME,n<=i&&i<=s))])}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y"),$eFd0g=parcelRequire("eFd0g"),$5b9i6=parcelRequire("5b9i6");class $bd784d466de6ebf1$export$2b57f387651c5a36 extends $d9f2y.AbstractFunction{constructor(e){super(),this.isLast=e,this.signature=new $5ab241dc319ce959$export$6ac699b48d627131(e?"LastOf":"FirstOf").setNamespace($76i8S.Namespaces.DATE).setParameters(new Map([[$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME,new(0,$eFd0g.Parameter)($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp")).setVariableArgument(!0)]])).setEvents(new Map([[$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP.getName(),$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP]]))}getSignature(){return this.signature}internalExecute(e){let t=e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME);if(!t?.length)throw Error("No timestamps provided");let a=t.map(e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e));return a.sort((e,t)=>e.toMillis()-t.toMillis()),Promise.resolve(new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP_NAME,a[this.isLast?a.length-1:0].toISO()))]))}}var $aHmki=parcelRequire("aHmki"),$76i8S=parcelRequire("76i8S"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$5b9i6=parcelRequire("5b9i6");class $036da84b84a82379$export$af66da503672e6e7 extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.EVENT_TIME_OBJECT_NAME="object"}static{this.EVENT_TIME_ARRAY_NAME="array"}constructor(e){super(e?"TimeAsArray":"TimeAsObject",new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of(e?$036da84b84a82379$export$af66da503672e6e7.EVENT_TIME_ARRAY_NAME:$036da84b84a82379$export$af66da503672e6e7.EVENT_TIME_OBJECT_NAME,e?$5b9i6.Schema.ofArray($036da84b84a82379$export$af66da503672e6e7.EVENT_TIME_ARRAY_NAME,$5b9i6.Schema.ofInteger("timeParts")):$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".TimeObject"))),$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP),this.isArray=e}async internalExecute(e){let t=$d43fddcb53937ca6$export$2364d538c15eb8db(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME)).toObject();return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of(this.isArray?$036da84b84a82379$export$af66da503672e6e7.EVENT_TIME_ARRAY_NAME:$036da84b84a82379$export$af66da503672e6e7.EVENT_TIME_OBJECT_NAME,this.isArray?[t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond]:t))])}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $05ad06cce7af67f6$export$b1316b4572fbc933 extends $d97fd69f746bba7f$export$f0eee5442249d5fb{constructor(e){super(e?"StartOf":"EndOf",$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_UNIT),this.isStart=e}async internalExecute(e){let t=$d43fddcb53937ca6$export$2364d538c15eb8db(e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME)),a=e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_UNIT_NAME)?.toLowerCase();a=a.substring(0,a.length-1);let r=this.isStart?t.startOf(a):t.endOf(a);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP_NAME,r.toISO({includeOffset:!0})))])}}var $eFd0g=parcelRequire("eFd0g"),$43zhg=parcelRequire("43zhg"),$5b9i6=parcelRequire("5b9i6"),$aHmki=parcelRequire("aHmki"),$lxSe3=parcelRequire("lxSe3");class $87842e4f7c2dc2bf$export$29075b717a45f35d extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.EVENT_NAMES_NAME="names"}static{this.PARAMETER_UNIT_NAME="unit"}static{this.PARAMETER_LOCALE_NAME="locale"}constructor(){super("GetNames",new(0,$43zhg.Event)($87842e4f7c2dc2bf$export$29075b717a45f35d.EVENT_NAMES_NAME,$c501efceca87a708$export$92eaabd025f1e921.of($87842e4f7c2dc2bf$export$29075b717a45f35d.EVENT_NAMES_NAME,$5b9i6.Schema.ofArray($87842e4f7c2dc2bf$export$29075b717a45f35d.EVENT_NAMES_NAME,$5b9i6.Schema.ofString($87842e4f7c2dc2bf$export$29075b717a45f35d.EVENT_NAMES_NAME)))),new(0,$eFd0g.Parameter)($87842e4f7c2dc2bf$export$29075b717a45f35d.PARAMETER_UNIT_NAME,$5b9i6.Schema.ofString($87842e4f7c2dc2bf$export$29075b717a45f35d.PARAMETER_UNIT_NAME).setEnums(["TIMEZONES","MONTHS","WEEKDAYS"])),new(0,$eFd0g.Parameter)($87842e4f7c2dc2bf$export$29075b717a45f35d.PARAMETER_LOCALE_NAME,$5b9i6.Schema.ofString($87842e4f7c2dc2bf$export$29075b717a45f35d.PARAMETER_LOCALE_NAME).setDefaultValue("system")))}async internalExecute(e){let t=e.getArguments()?.get($87842e4f7c2dc2bf$export$29075b717a45f35d.PARAMETER_UNIT_NAME),a=e.getArguments()?.get($87842e4f7c2dc2bf$export$29075b717a45f35d.PARAMETER_LOCALE_NAME);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($87842e4f7c2dc2bf$export$29075b717a45f35d.EVENT_NAMES_NAME,this.getNames(t,a)))])}getNames(e,t){return"TIMEZONES"===e?Intl.supportedValuesOf("timeZone"):"MONTHS"===e?[1,2,3,4,5,6,7,8,9,10,11,12].map(e=>$4eKkr$DateTime.now().setLocale(t).set({month:e}).toFormat("MMMM")):"WEEKDAYS"===e?[1,2,3,4,5,6,7].map(e=>$4eKkr$DateTime.now().setLocale(t).set({month:7,year:2024,day:e}).toFormat("EEEE")):[]}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $7aea4ef64efc138f$export$c81c98c12b587219 extends $d9f2y.AbstractFunction{internalExecute(e){let t=e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME),a=$4eKkr$DateTime.fromISO(t);return Promise.resolve(new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,a.isValid))]))}getSignature(){return this.signature}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("IsValidISODate").setNamespace($76i8S.Namespaces.DATE).setParameters(new Map([$eFd0g.Parameter.ofEntry($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME,$5b9i6.Schema.ofString($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME)))]))}}var $5b9i6=parcelRequire("5b9i6"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S");class $d310a7b6d4216d2d$export$50f0453aee80436c extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.PARAMETER_BASE_NAME="base"}static{this.PARAMETER_BASE=new(0,$eFd0g.Parameter)($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_BASE_NAME,$5b9i6.Schema.ofRef($76i8S.Namespaces.DATE+".Timestamp").setDefaultValue(""))}static{this.PARAMETER_LOCALE_NAME="locale"}static{this.PARAMETER_LOCALE=new(0,$eFd0g.Parameter)($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_LOCALE_NAME,$5b9i6.Schema.ofString($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_LOCALE_NAME).setDefaultValue("system"))}static{this.PARAMETER_FORMAT_NAME="format"}static{this.PARAMETER_FORMAT=new(0,$eFd0g.Parameter)($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_FORMAT_NAME,$5b9i6.Schema.ofString($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_FORMAT_NAME).setEnums(["LONG","SHORT","NARROW"]).setDefaultValue("LONG"))}static{this.PARAMETER_ROUND_NAME="round"}static{this.PARAMETER_ROUND=new(0,$eFd0g.Parameter)($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_ROUND_NAME,$5b9i6.Schema.ofBoolean($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_ROUND_NAME).setDefaultValue(!0))}constructor(){super("FromNow",$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_STRING,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP,$d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_FORMAT,$d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_BASE,$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_VARIABLE_UNIT,$d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_ROUND,$d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_LOCALE)}internalExecute(e){let t=e.getArguments()?.get($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_BASE_NAME),a=""===t?$4eKkr$DateTime.now():$4eKkr$DateTime.fromISO(t),r=e.getArguments()?.get($d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_TIMESTAMP_NAME),n=$4eKkr$DateTime.fromISO(r),s=e.getArguments()?.get($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_UNIT_NAME),i=e.getArguments()?.get($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_FORMAT_NAME),o=e.getArguments()?.get($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_ROUND_NAME),E=e.getArguments()?.get($d310a7b6d4216d2d$export$50f0453aee80436c.PARAMETER_LOCALE_NAME),u={base:a,style:i?.toLowerCase(),round:o,locale:E};return s?.length>0&&(u.unit=s.map(e=>e.toLowerCase())),Promise.resolve(new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,n.toRelative(u)??"Unknown"))]))}}var $5b9i6=parcelRequire("5b9i6"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g");class $5142200ed52cadf9$export$430a1964a46cd622 extends $d97fd69f746bba7f$export$f0eee5442249d5fb{static{this.PARAMETER_FORMAT_NAME="format"}static{this.PARAMETER_TIMESTAMP_STRING_NAME="timestampString"}constructor(){super("FromDateString",$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP,$eFd0g.Parameter.of($5142200ed52cadf9$export$430a1964a46cd622.PARAMETER_TIMESTAMP_STRING_NAME,$5b9i6.Schema.ofString($5142200ed52cadf9$export$430a1964a46cd622.PARAMETER_TIMESTAMP_STRING_NAME)),$eFd0g.Parameter.of($5142200ed52cadf9$export$430a1964a46cd622.PARAMETER_FORMAT_NAME,$5b9i6.Schema.ofString($5142200ed52cadf9$export$430a1964a46cd622.PARAMETER_FORMAT_NAME)))}async internalExecute(e){let t=e.getArguments()?.get($5142200ed52cadf9$export$430a1964a46cd622.PARAMETER_TIMESTAMP_STRING_NAME),a=e.getArguments()?.get($5142200ed52cadf9$export$430a1964a46cd622.PARAMETER_FORMAT_NAME),r=$4eKkr$DateTime.fromFormat(t,a);return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,r.toISO()))])}}var $lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki");class $d4cc544f1c37b141$export$79606694b37f4ba8 extends $d97fd69f746bba7f$export$f0eee5442249d5fb{constructor(){super("GetCurrentTimestamp",$d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP)}async internalExecute(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_TIMESTAMP_NAME,$4eKkr$DateTime.now().toISO()))])}}class $b90a34a74f192f82$export$7d970f68676e75e{find(e,t){return e!=$76i8S.Namespaces.DATE?Promise.resolve(void 0):Promise.resolve(this.repoMap.get(t))}filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}constructor(){this.repoMap=$c501efceca87a708$export$92eaabd025f1e921.ofArrayEntries(["EpochSecondsToTimestamp",new $750ffd99810cbd09$export$7282f9d655e6f28b("EpochSecondsToTimestamp",!0)],["EpochMillisecondsToTimestamp",new $750ffd99810cbd09$export$7282f9d655e6f28b("EpochMillisecondsToTimestamp",!1)],$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetDay",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).day),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetDayOfWeek",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).weekday),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetMonth",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).month),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetYear",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).year),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetHours",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).hour),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetMinutes",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).minute),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetSeconds",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).second),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetMilliseconds",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).millisecond),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetDaysInMonth",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).daysInMonth),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetDaysInYear",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).daysInYear),["TimestampToEpochSeconds",new $ebb047a76937813e$export$513f47576c1a776b("TimestampToEpochSeconds",!0)],["TimestampToEpochMilliseconds",new $ebb047a76937813e$export$513f47576c1a776b("TimestampToEpochMilliseconds",!1)],$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndStringOutput("GetTimeZoneName",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).zoneName),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndStringOutput("GetTimeZoneOffsetLong",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).offsetNameLong),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndStringOutput("GetTimeZoneOffsetShort",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).offsetNameShort),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndIntegerOutput("GetTimeZoneOffset",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).offset),["ToDateString",new $54d2997ade4faf2d$export$2021d53cd887239a],["AddTime",new $4fd569d134e58259$export$1279a7d86e2f1812(!0)],["SubtractTime",new $4fd569d134e58259$export$1279a7d86e2f1812(!1)],["GetCurrentTimestamp",new $d4cc544f1c37b141$export$79606694b37f4ba8],$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampTimestampAndTOutput("Difference",new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofRef(`${$76i8S.Namespaces.DATE}.Duration`))),(e,t,a)=>{let r,n=$d43fddcb53937ca6$export$2364d538c15eb8db(e),s=$d43fddcb53937ca6$export$2364d538c15eb8db(t);a?.[0]?.length&&(r=a[0]?.filter(e=>!!e).map(e=>e.toLowerCase()));let i=n.diff(s);return r?.length?i.shiftTo(...r).toObject():i.toObject()},$d97fd69f746bba7f$export$f0eee5442249d5fb.PARAMETER_VARIABLE_UNIT),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampIntegerAndTimestampOutput("SetDay",(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).set({day:t}).toISO()),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampIntegerAndTimestampOutput("SetMonth",(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).set({month:t}).toISO()),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampIntegerAndTimestampOutput("SetYear",(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).set({year:t}).toISO()),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampIntegerAndTimestampOutput("SetHours",(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).set({hour:t}).toISO()),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampIntegerAndTimestampOutput("SetMinutes",(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).set({minute:t}).toISO()),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampIntegerAndTimestampOutput("SetSeconds",(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).set({second:t}).toISO()),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampIntegerAndTimestampOutput("SetMilliseconds",(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).set({millisecond:t}).toISO()),["SetTimeZone",new $32739a92af697e49$export$37336213f9150bce],$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampTimestampAndTOutput("IsBefore",new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME))),(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e)<$d43fddcb53937ca6$export$2364d538c15eb8db(t)),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampTimestampAndTOutput("IsAfter",new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME))),(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e)>$d43fddcb53937ca6$export$2364d538c15eb8db(t)),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampTimestampAndTOutput("IsSame",new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME))),(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e)===$d43fddcb53937ca6$export$2364d538c15eb8db(t)),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampTimestampAndTOutput("IsSameOrBefore",new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME))),(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e)<=$d43fddcb53937ca6$export$2364d538c15eb8db(t)),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampTimestampAndTOutput("IsSameOrAfter",new(0,$43zhg.Event)($43zhg.Event.OUTPUT,$c501efceca87a708$export$92eaabd025f1e921.of($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME,$5b9i6.Schema.ofBoolean($d97fd69f746bba7f$export$f0eee5442249d5fb.EVENT_RESULT_NAME))),(e,t)=>$d43fddcb53937ca6$export$2364d538c15eb8db(e)>=$d43fddcb53937ca6$export$2364d538c15eb8db(t)),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndBooleanOutput("IsInLeapYear",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).isInLeapYear),$d97fd69f746bba7f$export$f0eee5442249d5fb.ofEntryTimestampAndBooleanOutput("IsInDST",e=>$d43fddcb53937ca6$export$2364d538c15eb8db(e).isInDST),["IsBetween",new $752e77cda54d746c$export$6efa0d5760bfc60f],["LastOf",new $bd784d466de6ebf1$export$2b57f387651c5a36(!0)],["FirstOf",new $bd784d466de6ebf1$export$2b57f387651c5a36(!1)],["StartOf",new $05ad06cce7af67f6$export$b1316b4572fbc933(!0)],["EndOf",new $05ad06cce7af67f6$export$b1316b4572fbc933(!1)],["TimeAsObject",new $036da84b84a82379$export$af66da503672e6e7(!1)],["TimeAsArray",new $036da84b84a82379$export$af66da503672e6e7(!0)],["GetNames",new $87842e4f7c2dc2bf$export$29075b717a45f35d],["IsValidISODate",new $7aea4ef64efc138f$export$c81c98c12b587219],["FromNow",new $d310a7b6d4216d2d$export$50f0453aee80436c],["FromDateString",new $5142200ed52cadf9$export$430a1964a46cd622]),this.filterableNames=Array.from(this.repoMap.values()).map(e=>e.getSignature().getFullName())}}var $5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$aHmki=parcelRequire("aHmki"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");class $2312108939f1941a$export$de73cf9e66f7476e extends $d9f2y.AbstractFunction{static{this.MILLIS="millis"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get($2312108939f1941a$export$de73cf9e66f7476e.MILLIS);return await new Promise(e=>setTimeout(e,t)),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("Wait").setNamespace($76i8S.Namespaces.SYSTEM).setParameters(new Map([$eFd0g.Parameter.ofEntry($2312108939f1941a$export$de73cf9e66f7476e.MILLIS,$5b9i6.Schema.ofNumber($2312108939f1941a$export$de73cf9e66f7476e.MILLIS).setMinimum(0).setDefaultValue(0))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map)]))}}var $e9dc56365edfc654$exports={};$parcel$export($e9dc56365edfc654$exports,"HybridRepository",()=>$e9dc56365edfc654$export$d3f4bd7b80956108);class $e9dc56365edfc654$export$d3f4bd7b80956108{constructor(...e){this.repos=e}async find(e,t){for(let a of this.repos){let r=await a.find(e,t);if(r)return r}}async filter(e){let t=new Set;for(let a of this.repos)(await a.filter(e)).forEach(e=>t.add(e));return Array.from(t)}}var $76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y"),$76i8S=parcelRequire("76i8S"),$43zhg=parcelRequire("43zhg"),$eFd0g=parcelRequire("eFd0g"),$5b9i6=parcelRequire("5b9i6"),$1azZj=parcelRequire("1azZj"),$aHmki=parcelRequire("aHmki"),$7pym4=parcelRequire("7pym4"),$lxSe3=parcelRequire("lxSe3"),$jpFFw=parcelRequire("jpFFw");class $496281bd616174dd$export$a3efebb6a8a05ec3 extends $d9f2y.AbstractFunction{static{this.SOURCE="source"}static{this.SCHEMA="schema"}static{this.IS_VALID="isValid"}getSignature(){return this.signature}internalExecute(e){let t=e.getArguments()?.get($496281bd616174dd$export$a3efebb6a8a05ec3.SOURCE),a=$5b9i6.Schema.from(e?.getArguments()?.get($496281bd616174dd$export$a3efebb6a8a05ec3.SCHEMA));if(!a)throw new(0,$7pym4.KIRuntimeException)("Schema is not supplied.");return this.validateSchema(a,e.getSchemaRepository(),t)}async validateSchema(e,t,a){try{return await $jpFFw.SchemaValidator.validate([],e,t,a,!0),new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($496281bd616174dd$export$a3efebb6a8a05ec3.IS_VALID,!0))])}catch(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf($c501efceca87a708$export$92eaabd025f1e921.of($496281bd616174dd$export$a3efebb6a8a05ec3.IS_VALID,!1))])}}constructor(...e){super(...e),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("ValidateSchema").setNamespace($76i8S.Namespaces.SYSTEM_OBJECT).setParameters(new Map([$eFd0g.Parameter.ofEntry($496281bd616174dd$export$a3efebb6a8a05ec3.SOURCE,$5b9i6.Schema.ofAny($496281bd616174dd$export$a3efebb6a8a05ec3.SCHEMA)),$eFd0g.Parameter.ofEntry($496281bd616174dd$export$a3efebb6a8a05ec3.SCHEMA,$5b9i6.Schema.SCHEMA,!1,$1azZj.ParameterType.CONSTANT)])).setEvents(new Map([$43zhg.Event.outputEventMapEntry($c501efceca87a708$export$92eaabd025f1e921.of($496281bd616174dd$export$a3efebb6a8a05ec3.IS_VALID,$5b9i6.Schema.ofBoolean($496281bd616174dd$export$a3efebb6a8a05ec3.IS_VALID)))]))}}var $aHmki=parcelRequire("aHmki"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $8264f984e3ee21f4$var$VALUE="value",$8264f984e3ee21f4$var$ERROR="error",$8264f984e3ee21f4$var$ERROR_MESSAGE="errorMessage",$8264f984e3ee21f4$var$SOURCE="source";class $8264f984e3ee21f4$export$3969146df1258ac extends $d9f2y.AbstractFunction{constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("JSONParse").setNamespace($76i8S.Namespaces.SYSTEM_JSON).setParameters(new Map([$eFd0g.Parameter.ofEntry($8264f984e3ee21f4$var$SOURCE,$5b9i6.Schema.ofString($8264f984e3ee21f4$var$SOURCE))])).setEvents(new Map([$43zhg.Event.eventMapEntry($8264f984e3ee21f4$var$ERROR,new Map([[$8264f984e3ee21f4$var$ERROR_MESSAGE,$5b9i6.Schema.ofString($8264f984e3ee21f4$var$ERROR_MESSAGE)]])),$43zhg.Event.outputEventMapEntry(new Map([[$8264f984e3ee21f4$var$VALUE,$5b9i6.Schema.ofAny($8264f984e3ee21f4$var$VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t,a=e.getArguments()?.get("source");try{t=a?JSON.parse(a):null}catch(e){return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.of($8264f984e3ee21f4$var$ERROR,new Map([[$8264f984e3ee21f4$var$ERROR_MESSAGE,e?.message??"Unknown Error parsing JSON"]])),$lxSe3.EventResult.outputOf(new Map([[$8264f984e3ee21f4$var$VALUE,null]]))])}return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$8264f984e3ee21f4$var$VALUE,t]]))])}}var $aHmki=parcelRequire("aHmki"),$5b9i6=parcelRequire("5b9i6"),$43zhg=parcelRequire("43zhg"),$lxSe3=parcelRequire("lxSe3"),$eFd0g=parcelRequire("eFd0g"),$76i8S=parcelRequire("76i8S"),$d9f2y=parcelRequire("d9f2y");let $89979872a60a4e19$var$VALUE="value",$89979872a60a4e19$var$SOURCE="source";class $89979872a60a4e19$export$95da2e76982fabe extends $d9f2y.AbstractFunction{constructor(){super(),this.signature=new $5ab241dc319ce959$export$6ac699b48d627131("JSONStringify").setNamespace($76i8S.Namespaces.SYSTEM_JSON).setParameters(new Map([$eFd0g.Parameter.ofEntry($89979872a60a4e19$var$SOURCE,$5b9i6.Schema.ofAny($89979872a60a4e19$var$SOURCE))])).setEvents(new Map([$43zhg.Event.outputEventMapEntry(new Map([[$89979872a60a4e19$var$VALUE,$5b9i6.Schema.ofString($89979872a60a4e19$var$VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get("source");return new(0,$aHmki.FunctionOutput)([$lxSe3.EventResult.outputOf(new Map([[$89979872a60a4e19$var$VALUE,JSON.stringify(t??null)]]))])}}class $e2e654c8c8b42b35$var$SystemFunctionRepository{constructor(){this.map=new Map([[$76i8S.Namespaces.SYSTEM_JSON,new Map([$69f0970a535da56f$export$2e2bcd8739ae039(new $8264f984e3ee21f4$export$3969146df1258ac),$69f0970a535da56f$export$2e2bcd8739ae039(new $89979872a60a4e19$export$95da2e76982fabe)])],[$76i8S.Namespaces.SYSTEM_CTX,new Map([$69f0970a535da56f$export$2e2bcd8739ae039(new $e5095d299652d445$export$8ade6fcbf3a7de5d),$69f0970a535da56f$export$2e2bcd8739ae039(new $b908a4b42005eb34$export$3c4d50795bdf2241),$69f0970a535da56f$export$2e2bcd8739ae039(new $518322bb26d0be38$export$b317e4f1119d5cc3)])],[$76i8S.Namespaces.SYSTEM_LOOP,new Map([$69f0970a535da56f$export$2e2bcd8739ae039(new $06f3baae6ba69e4f$export$476c164c34496a4),$69f0970a535da56f$export$2e2bcd8739ae039(new $9e6dc1b3d6ce1c2e$export$eac784307589bdc0),$69f0970a535da56f$export$2e2bcd8739ae039(new $81bf7ef6c5dc4c9c$export$c88190a7f68b38c0),$69f0970a535da56f$export$2e2bcd8739ae039(new $d721c6ebab14c322$export$77f81f356deccd7a)])],[$76i8S.Namespaces.SYSTEM,new Map([$69f0970a535da56f$export$2e2bcd8739ae039(new $a204e21ccf6a6533$export$1f9ff5f4a6c9361a),$69f0970a535da56f$export$2e2bcd8739ae039(new $bbd1c6869d801761$export$5f7db2d393d4896c),$69f0970a535da56f$export$2e2bcd8739ae039(new $c5ebf0980df56490$export$531cef85654f2406),$69f0970a535da56f$export$2e2bcd8739ae039(new $2312108939f1941a$export$de73cf9e66f7476e),$69f0970a535da56f$export$2e2bcd8739ae039(new $24b4dc88cfa1047e$export$26aa7833c998c5d3),$69f0970a535da56f$export$2e2bcd8739ae039(new $496281bd616174dd$export$a3efebb6a8a05ec3)])]]),this.filterableNames=Array.from(this.map.values()).flatMap(e=>Array.from(e.values())).map(e=>e.getSignature().getFullName())}async find(e,t){return this.map.get(e)?.get(t)}async filter(e){return Array.from(this.filterableNames).filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase()))}}class $e2e654c8c8b42b35$export$1ef8ffe3d9ea2320 extends $e9dc56365edfc654$export$d3f4bd7b80956108{constructor(){super(new $e2e654c8c8b42b35$var$SystemFunctionRepository,new $d2db8ade2d116b31$export$b52a470618d492ff,new $a778c0b0e2c85884$export$ae09120a661eed3b,new $ed31df2b2821223b$export$b1f76fbe3f585683,new $41320d3a822dc1e9$export$64f266808c8b139,new $b90a34a74f192f82$export$7d970f68676e75e)}}parcelRequire("dcckU"),parcelRequire("2p8YP"),parcelRequire("d3Pq1"),parcelRequire("bg8NQ"),parcelRequire("adJLc"),parcelRequire("iq1c5"),parcelRequire("gZQ5x"),parcelRequire("dAuXT"),parcelRequire("f464r"),parcelRequire("2Jva3"),parcelRequire("aNpQW"),parcelRequire("7MgK6"),parcelRequire("jNXns"),parcelRequire("6Ppag"),parcelRequire("4FdqD"),parcelRequire("fDf7j"),parcelRequire("7RwLL"),parcelRequire("eYHCR"),parcelRequire("9mEhX"),parcelRequire("8loiD"),parcelRequire("epcse"),parcelRequire("8MWeR"),parcelRequire("6SbgP"),parcelRequire("4M204"),parcelRequire("b3MaL"),parcelRequire("iSHH5"),parcelRequire("d9f2y"),parcelRequire("76i8S"),parcelRequire("9oGrq"),parcelRequire("5b9i6"),parcelRequire("5DmIv"),parcelRequire("k8ZR2"),parcelRequire("dAVD7"),parcelRequire("02g41"),parcelRequire("dV0EM"),parcelRequire("apCff"),parcelRequire("5oTsS"),parcelRequire("jpFFw"),parcelRequire("i12nd"),parcelRequire("kGpLV"),parcelRequire("i7rJo"),parcelRequire("fk6Oz"),parcelRequire("36FlI"),parcelRequire("gIdZh"),parcelRequire("5853d"),parcelRequire("6Yl01"),parcelRequire("3tMPe"),parcelRequire("aYWSO"),parcelRequire("1tkrm");var $1d046e4ff8522cd9$exports={};$parcel$export($1d046e4ff8522cd9$exports,"KIRunConstants",()=>$1d046e4ff8522cd9$export$594b6714aa88d0a1);class $1d046e4ff8522cd9$export$594b6714aa88d0a1{static{this.NAMESPACE="namespace"}static{this.NAME="name"}static{this.ID="id"}constructor(){}}parcelRequire("eFd0g"),parcelRequire("aHmki");var $7c50ef66c2277cde$exports={};$parcel$export($7c50ef66c2277cde$exports,"Position",()=>$7c50ef66c2277cde$export$13807d9ee5a34a42);var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$76i8S=parcelRequire("76i8S");class $7c50ef66c2277cde$export$13807d9ee5a34a42{static{this.SCHEMA_NAME="Position"}static{this.SCHEMA=new(0,$5b9i6.Schema)().setNamespace($76i8S.Namespaces.SYSTEM).setName($7c50ef66c2277cde$export$13807d9ee5a34a42.SCHEMA_NAME).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.OBJECT)).setProperties(new Map([["left",$5b9i6.Schema.ofFloat("left")],["top",$5b9i6.Schema.ofFloat("top")]]))}constructor(e,t){this.left=e,this.top=t}getLeft(){return this.left}setLeft(e){return this.left=e,this}getTop(){return this.top}setTop(e){return this.top=e,this}static from(e){if(e)return new $7c50ef66c2277cde$export$13807d9ee5a34a42(e.left,e.top)}}var $573c48da8577432b$exports={};$parcel$export($573c48da8577432b$exports,"FunctionDefinition",()=>$573c48da8577432b$export$ac28d24969149b5c);var $5b9i6=parcelRequire("5b9i6"),$76i8S=parcelRequire("76i8S"),$43zhg=parcelRequire("43zhg"),$eFd0g=parcelRequire("eFd0g"),$5bfef192d905651a$exports={};$parcel$export($5bfef192d905651a$exports,"Statement",()=>$5bfef192d905651a$export$c84356afd4299847);var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$76i8S=parcelRequire("76i8S"),$c61e3511a52d9f9f$exports={};$parcel$export($c61e3511a52d9f9f$exports,"AbstractStatement",()=>$c61e3511a52d9f9f$export$7d81ad5ed2d0609);class $c61e3511a52d9f9f$export$7d81ad5ed2d0609{constructor(e){if(this.override=!1,!e)return;this.comment=e.comment,this.description=e.description,this.position=e.position?new $7c50ef66c2277cde$export$13807d9ee5a34a42(e.position.getLeft(),e.position.getTop()):void 0,this.override=e.override}getComment(){return this.comment}setComment(e){return this.comment=e,this}isOverride(){return this.override}setOverride(e){return this.override=e,this}getDescription(){return this.description}setDescription(e){return this.description=e,this}getPosition(){return this.position}setPosition(e){return this.position=e,this}}var $c89a1f60e4aaadb3$exports={};$parcel$export($c89a1f60e4aaadb3$exports,"ParameterReference",()=>$c89a1f60e4aaadb3$export$6d35a6334b82887f);var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$76i8S=parcelRequire("76i8S"),$2p8YP=parcelRequire("2p8YP"),$XI8p0=parcelRequire("XI8p0"),$lbuDw=parcelRequire("lbuDw");class $c89a1f60e4aaadb3$export$6d35a6334b82887f{static{this.SCHEMA_NAME="ParameterReference"}static{this.SCHEMA=new(0,$5b9i6.Schema)().setNamespace($76i8S.Namespaces.SYSTEM).setName($c89a1f60e4aaadb3$export$6d35a6334b82887f.SCHEMA_NAME).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.OBJECT)).setProperties(new Map([["key",$5b9i6.Schema.ofString("key")],["value",$5b9i6.Schema.ofAny("value")],["expression",$5b9i6.Schema.ofString("expression")],["type",$5b9i6.Schema.ofString("type").setEnums(["EXPRESSION","VALUE"])],["order",$5b9i6.Schema.ofInteger("order")]]))}constructor(e){if(e instanceof $c89a1f60e4aaadb3$export$6d35a6334b82887f){let t=e;this.key=t.key,this.type=t.type,this.value=(0,$2p8YP.isNullValue)(t.value)?void 0:JSON.parse(JSON.stringify(t.value)),this.expression=t.expression,this.order=t.order}else this.type=e,this.key=(0,$XI8p0.default)()}getType(){return this.type}setType(e){return this.type=e,this}getKey(){return this.key}setKey(e){return this.key=e,this}getValue(){return this.value}setValue(e){return this.value=e,this}getExpression(){return this.expression}setExpression(e){return this.expression=e,this}setOrder(e){return this.order=e,this}getOrder(){return this.order}static ofExpression(e){let t=new $c89a1f60e4aaadb3$export$6d35a6334b82887f($lbuDw.ParameterReferenceType.EXPRESSION).setExpression(e);return[t.getKey(),t]}static ofValue(e){let t=new $c89a1f60e4aaadb3$export$6d35a6334b82887f($lbuDw.ParameterReferenceType.VALUE).setValue(e);return[t.getKey(),t]}static from(e){return new $c89a1f60e4aaadb3$export$6d35a6334b82887f(e.type).setValue(e.value).setExpression(e.expression).setKey(e.key).setOrder(e.order)}}class $5bfef192d905651a$export$c84356afd4299847 extends $c61e3511a52d9f9f$export$7d81ad5ed2d0609{static{this.SCHEMA_NAME="Statement"}static{this.SCHEMA=new(0,$5b9i6.Schema)().setNamespace($76i8S.Namespaces.SYSTEM).setName($5bfef192d905651a$export$c84356afd4299847.SCHEMA_NAME).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.OBJECT)).setProperties(new Map([["statementName",$5b9i6.Schema.ofString("statementName")],["comment",$5b9i6.Schema.ofString("comment")],["description",$5b9i6.Schema.ofString("description")],["namespace",$5b9i6.Schema.ofString("namespace")],["name",$5b9i6.Schema.ofString("name")],["dependentStatements",$5b9i6.Schema.ofObject("dependentstatement").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($5b9i6.Schema.ofBoolean("exists"))).setDefaultValue({})],["executeIftrue",$5b9i6.Schema.ofObject("executeIftrue").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($5b9i6.Schema.ofBoolean("exists"))).setDefaultValue({})],["parameterMap",new(0,$5b9i6.Schema)().setName("parameterMap").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($5b9i6.Schema.ofObject("parameterReference").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($c89a1f60e4aaadb3$export$6d35a6334b82887f.SCHEMA))))],["position",$7c50ef66c2277cde$export$13807d9ee5a34a42.SCHEMA]]))}constructor(e,t,a){if(super(e instanceof $5bfef192d905651a$export$c84356afd4299847?e:void 0),e instanceof $5bfef192d905651a$export$c84356afd4299847){let t=e;this.statementName=t.statementName,this.name=t.name,this.namespace=t.namespace,t.parameterMap&&(this.parameterMap=new Map(Array.from(t.parameterMap.entries()).map(e=>[e[0],new Map(Array.from(e[1].entries()).map(e=>[e[0],new $c89a1f60e4aaadb3$export$6d35a6334b82887f(e[1])]))]))),t.dependentStatements&&(this.dependentStatements=new Map(Array.from(t.dependentStatements.entries())))}else{if(this.statementName=e,!a||!t)throw Error("Unknown constructor");this.namespace=t,this.name=a}}getStatementName(){return this.statementName}setStatementName(e){return this.statementName=e,this}getNamespace(){return this.namespace}setNamespace(e){return this.namespace=e,this}getName(){return this.name}setName(e){return this.name=e,this}getParameterMap(){return this.parameterMap||(this.parameterMap=new Map),this.parameterMap}setParameterMap(e){return this.parameterMap=e,this}getDependentStatements(){return this.dependentStatements??new Map}setDependentStatements(e){return this.dependentStatements=e,this}getExecuteIftrue(){return this.executeIftrue??new Map}setExecuteIftrue(e){return this.executeIftrue=e,this}equals(e){return e instanceof $5bfef192d905651a$export$c84356afd4299847&&e.statementName==this.statementName}static ofEntry(e){return[e.statementName,e]}static from(e){return new $5bfef192d905651a$export$c84356afd4299847(e.statementName,e.namespace,e.name).setParameterMap(new Map(Object.entries(e.parameterMap??{}).map(([e,t])=>[e,new Map(Object.entries(t??{}).map(([e,t])=>$c89a1f60e4aaadb3$export$6d35a6334b82887f.from(t)).map(e=>[e.getKey(),e]))]))).setDependentStatements(new Map(Object.entries(e.dependentStatements??{}))).setExecuteIftrue(new Map(Object.entries(e.executeIftrue??{}))).setPosition($7c50ef66c2277cde$export$13807d9ee5a34a42.from(e.position)).setComment(e.comment).setDescription(e.description)}}var $592c006d8edc2126$exports={};$parcel$export($592c006d8edc2126$exports,"StatementGroup",()=>$592c006d8edc2126$export$bc161170aa8ed47b);var $5b9i6=parcelRequire("5b9i6"),$3tMPe=parcelRequire("3tMPe"),$gIdZh=parcelRequire("gIdZh"),$76i8S=parcelRequire("76i8S");class $592c006d8edc2126$export$bc161170aa8ed47b extends $c61e3511a52d9f9f$export$7d81ad5ed2d0609{static{this.SCHEMA_NAME="StatementGroup"}static{this.SCHEMA=new(0,$5b9i6.Schema)().setNamespace($76i8S.Namespaces.SYSTEM).setName($592c006d8edc2126$export$bc161170aa8ed47b.SCHEMA_NAME).setType($gIdZh.TypeUtil.of($3tMPe.SchemaType.OBJECT)).setProperties(new Map([["statementGroupName",$5b9i6.Schema.ofString("statementGroupName")],["comment",$5b9i6.Schema.ofString("comment")],["description",$5b9i6.Schema.ofString("description")],["position",$7c50ef66c2277cde$export$13807d9ee5a34a42.SCHEMA]]))}constructor(e,t=new Map){super(),this.statementGroupName=e,this.statements=t}getStatementGroupName(){return this.statementGroupName}setStatementGroupName(e){return this.statementGroupName=e,this}getStatements(){return this.statements}setStatements(e){return this.statements=e,this}static from(e){return new $592c006d8edc2126$export$bc161170aa8ed47b(e.statementGroupName,new Map(Object.entries(e.statements||{}).map(([e,t])=>[e,(""+t)?.toLowerCase()=="true"]))).setPosition($7c50ef66c2277cde$export$13807d9ee5a34a42.from(e.position)).setComment(e.comment).setDescription(e.description)}}let $573c48da8577432b$var$SCHEMA_NAME1="FunctionDefinition",$573c48da8577432b$var$IN_SCHEMA=new(0,$5b9i6.Schema)().setNamespace($76i8S.Namespaces.SYSTEM).setName($573c48da8577432b$var$SCHEMA_NAME1).setProperties(new Map([["name",$5b9i6.Schema.ofString("name")],["namespace",$5b9i6.Schema.ofString("namespace")],["parameters",$5b9i6.Schema.ofArray("parameters",$eFd0g.Parameter.SCHEMA)],["events",$5b9i6.Schema.ofObject("events").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($43zhg.Event.SCHEMA))],["steps",$5b9i6.Schema.ofObject("steps").setAdditionalProperties(new(0,$5b9i6.AdditionalType)().setSchemaValue($5bfef192d905651a$export$c84356afd4299847.SCHEMA))]]));$573c48da8577432b$var$IN_SCHEMA.getProperties()?.set("parts",$5b9i6.Schema.ofArray("parts",$573c48da8577432b$var$IN_SCHEMA));class $573c48da8577432b$export$ac28d24969149b5c extends $5ab241dc319ce959$export$6ac699b48d627131{static{this.SCHEMA=$573c48da8577432b$var$IN_SCHEMA}constructor(e){super(e),this.version=1}getVersion(){return this.version}setVersion(e){return this.version=e,this}getSteps(){return this.steps??new Map}setSteps(e){return this.steps=e,this}getStepGroups(){return this.stepGroups}setStepGroups(e){return this.stepGroups=e,this}getParts(){return this.parts}setParts(e){return this.parts=e,this}static from(e){return e?new $573c48da8577432b$export$ac28d24969149b5c(e.name).setSteps(new Map(Object.values(e.steps??{}).filter(e=>!!e).map(e=>[e.statementName,$5bfef192d905651a$export$c84356afd4299847.from(e)]))).setStepGroups(new Map(Object.values(e.stepGroups??{}).filter(e=>!!e).map(e=>[e.statementGroupName,$592c006d8edc2126$export$bc161170aa8ed47b.from(e)]))).setParts(Array.from(e.parts??[]).filter(e=>!!e).map(e=>$573c48da8577432b$export$ac28d24969149b5c.from(e))).setVersion(e.version??1).setEvents(new Map(Object.values(e.events??{}).filter(e=>!!e).map(e=>[e.name,$43zhg.Event.from(e)]))).setParameters(new Map(Object.values(e.parameters??{}).filter(e=>!!e).map(e=>[e.parameterName,$eFd0g.Parameter.from(e)]))).setNamespace(e.namespace):new $573c48da8577432b$export$ac28d24969149b5c("unknown")}}parcelRequire("lbuDw"),parcelRequire("lxSe3"),parcelRequire("43zhg"),parcelRequire("1azZj");var $78da1ae8f28ac308$exports={};$parcel$export($78da1ae8f28ac308$exports,"Argument",()=>$78da1ae8f28ac308$export$84637ea037d2e218);class $78da1ae8f28ac308$export$84637ea037d2e218{constructor(e,t,a){this.argumentIndex=0,this.argumentIndex=e,this.name=t,this.value=a}getArgumentIndex(){return this.argumentIndex}setArgumentIndex(e){return this.argumentIndex=e,this}getName(){return this.name}setName(e){return this.name=e,this}getValue(){return this.value}setValue(e){return this.value=e,this}static of(e,t){return new $78da1ae8f28ac308$export$84637ea037d2e218(0,e,t)}}parcelRequire("iF2mi"),parcelRequire("7pym4"),parcelRequire("C8f4u"),parcelRequire("elkSx"),parcelRequire("9o6rD");var $03cab56c0c40e1a2$export$3755dd8569265c2c=parcelRequire("dcckU").PrimitiveUtil,$de0b4b41e4746a17$export$5c8592849d7f8589=parcelRequire("2p8YP").isNullValue,$07e02f38923c0b4c$export$f0ef28713f767754=parcelRequire("d3Pq1").LinkedList,$be62d217e50dbeec$export$a76dbac5bd058d1b=parcelRequire("bg8NQ").StringBuilder,$63bc73db1cd0d7b4$export$5a7f7b467323cd66=parcelRequire("adJLc").StringFormatter,$50631448b653142f$export$592e033edf5fafe4=parcelRequire("iq1c5").StringUtil,$c99ef5fdcdd87c68$export$50073dc6080ec093=parcelRequire("gZQ5x").Tuple2,$c99ef5fdcdd87c68$export$82dc29c19cc50d89=parcelRequire("gZQ5x").Tuple3,$c99ef5fdcdd87c68$export$c0401e7e2326d13b=parcelRequire("gZQ5x").Tuple4,$f38e5fbd73132191$export$9cb4719e2e525b7a=parcelRequire("dAuXT").deepEqual,$3c47f1bc7c66f182$export$f09f252875e413e8=parcelRequire("f464r").StatementExecution,$d335be29d204110b$export$1480fdc476e0600e=parcelRequire("2Jva3").StatementMessage,$511cbfc015cdbf6a$export$6cebf62d32060adb=parcelRequire("aNpQW").ContextTokenValueExtractor,$7b1c5de622922cdc$export$638a1889bcd4621c=parcelRequire("7MgK6").OutputMapTokenValueExtractor,$1729a9f4799da7ac$export$ff42ca15b74921ee=parcelRequire("jNXns").ArgumentsTokenValueExtractor,$ca1e15a6ad410f7e$export$d6ecc3c8b1bdb677=parcelRequire("6Ppag").GraphVertex,$aeb8af0a0193139e$export$8193dda3aa6e9a3=parcelRequire("4FdqD").ExecutionGraph,UPDATE_REMINDER_KIRuntime=parcelRequire("fDf7j").KIRuntime,$0a9ef75d837c6929$exports=parcelRequire("fDf7j")["*"],$fe3fa5e51cec00a8$export$c72a235e9e048d37=parcelRequire("7RwLL").StatementMessageType,$ff0fbbfc90b01f44$export$c72d1e96aedc073d=parcelRequire("eYHCR").FunctionExecutionParameters,$6b23ed074dafa43f$export$bfe37c1342e5eb83=parcelRequire("9mEhX").Expression,$5575335d796dbeb4$export$d44091f0b447fefe=parcelRequire("8loiD").TokenValueExtractor,$10c32ecaa7972757$export$439f57d66896a884=parcelRequire("epcse").LiteralTokenValueExtractor,$8d0f8328f51c2219$export$c24f16fac926e77f=parcelRequire("8MWeR").ExpressionEvaluator,$5b99fb16f2ad3a42$export$ab5aad00225c5662=parcelRequire("6SbgP").Operation,$3a73b19f5a9d3311$export$e67adacf2c583eeb=parcelRequire("4M204").ExpressionToken,$d58cc34cdb765248$export$acb5fd6ef0dd45e7=parcelRequire("b3MaL").ExpressionEvaluationException,$613eb413a07c8f59$export$c3407419a51d8741=parcelRequire("iSHH5").ExpressionTokenValue,$ead3a8cc1fb7823c$export$6138b597adfac7c=parcelRequire("d9f2y").AbstractFunction,$a30e155e99df653c$export$2f21297dc8e7cb72=parcelRequire("76i8S").Namespaces,$bfb6f5b09094a63c$export$dab92e0058712b0b=parcelRequire("9oGrq").JsonExpression,$d7c5c93abc5e1799$export$cb559bfee05f190=parcelRequire("5b9i6").AdditionalType,$d7c5c93abc5e1799$export$19342e026b58ebb7=parcelRequire("5b9i6").Schema,$d7c5c93abc5e1799$export$e9708ef78a0361f7=parcelRequire("5b9i6").SchemaDetails,$87ee46d58b32280a$export$5464fb7e86e4a9f1=parcelRequire("5DmIv").NumberValidator,$7099ee372e15d670$export$d74a5d77bac81ab5=parcelRequire("k8ZR2").BooleanValidator,$a646a03e012128fa$export$cd3b7079b2ac4000=parcelRequire("dAVD7").NullValidator,$233a72ac0061bd00$export$a006ee8cc7b6580a=parcelRequire("02g41").ArrayValidator,$3c5135d4cdc6af8d$export$54412d5419e3f99d=parcelRequire("dV0EM").AnyOfAllOfOneOfValidator,$8484e3bddcb80901$export$312ff19fe6f84b5e=parcelRequire("apCff").StringValidator,$f0ae3dce2d7b23bc$export$e97b0a585a2ce29f=parcelRequire("5oTsS").ObjectValidator,$08afff7ea76110b2$export$5ea2dbb44eae89d6=parcelRequire("jpFFw").SchemaValidator,$aab6c44f1d62c175$export$18db27caa68e620c=parcelRequire("i12nd").SchemaValidationException,$a486fd967920975f$export$e5a11051fe746f8a=parcelRequire("kGpLV").SchemaReferenceException,$9f48b52c76faa34a$export$9ced0f77dc6abfd7=parcelRequire("i7rJo").TypeValidator,$e2b63cc6becde023$export$656411a496f80a09=parcelRequire("fk6Oz").ArraySchemaType,$65a368db7d612009$export$c62c2a2bbb80b6fa=parcelRequire("36FlI").SingleType,$2765bc54f8b669a6$export$75f4a5a37c7a0a0f=parcelRequire("gIdZh").TypeUtil,$076409438f64fdac$export$6d6eb186deb81c4=parcelRequire("5853d").MultipleType,$142932961419ab1e$export$92738401e1603719=parcelRequire("6Yl01").Type,$27a266817081df60$export$a1ec97982bccfa9d=parcelRequire("3tMPe").SchemaType,$f6510250b30384da$export$7eb0095ad5663979=parcelRequire("aYWSO").SchemaUtil,$a48009af08cbd1f1$export$f22e7fe56db8ae03=parcelRequire("1tkrm").StringFormat,$b5031b8f71f18ed8$export$f817523eebf7ee7f=parcelRequire("eFd0g").Parameter,$c83f443dff95747f$export$46c58e8ae2505a7d=parcelRequire("aHmki").FunctionOutput,$c7de3d56bb767194$export$1617e535b7cf20e=parcelRequire("lbuDw").ParameterReferenceType,$e445db59e11a2252$export$c45be2437182b0e3=parcelRequire("lxSe3").EventResult,$d92bb6acd4c9a5eb$export$d61e24a684f9e51=parcelRequire("43zhg").Event,$8cf01b2a122088fe$export$c6903b1fb9c4306f=parcelRequire("1azZj").ParameterType,$e61ebbdca83688e9$export$50d5074000755e42=parcelRequire("iF2mi").ExecutionException,$9636755452e5d904$export$37b1b5eb4f4f5ada=parcelRequire("7pym4").KIRuntimeException,$5950bf437bddd326$export$b2346ee46dfa8cbc=parcelRequire("bbEVz").ArithmeticUnaryMinusOperator,$6566601b6a7062df$export$874b037c929bb9a8=parcelRequire("65o8H").ArithmeticUnaryPlusOperator,$86449b1ee58231e2$export$6282ef6c70349edc=parcelRequire("l9coV").BitwiseComplementOperator,$a7227e66ed3e8807$export$a4dd2a01c916cf79=parcelRequire("8Ds3E").LogicalNotOperator,$07ae298d200db400$export$e38febd6a9d11047=parcelRequire("3ExYE").UnaryOperator,$b68d219228eaaaf4$export$f7d907e108ff5f5a=parcelRequire("cbl6E").ArithmeticAdditionOperator,$f6ac6c072b139075$export$4429718dd207f524=parcelRequire("bCDHU").ArithmeticDivisionOperator,$6c80d73b0945e438$export$461eeaed4fd44d87=parcelRequire("18pw7").ArithmeticIntegerDivisionOperator,$be3ce12116482e90$export$a654a6b4708c47ae=parcelRequire("2USVH").ArithmeticModulusOperator,$a2511671546286b3$export$c6c786d90c00ccb3=parcelRequire("GGYZO").ArithmeticMultiplicationOperator,$06c3e93d233b1212$export$32cdc7b90c3f2772=parcelRequire("iSWGS").ArithmeticSubtractionOperator,$94d6bfcd7c29b7e5$export$2ce812ef1adfc7e8=parcelRequire("gbzXt").ArrayOperator,$51a3743a4dff1a45$export$a5835aa4dc4a0f7=parcelRequire("4GkNl").BinaryOperator,$60a8f504ba44e900$export$a2a775190435bd33=parcelRequire("2hPfU").BitwiseAndOperator,$de6d0890546cee33$export$eeef83ab872ddce5=parcelRequire("hIDzR").BitwiseLeftShiftOperator,$f051c38045c23f1c$export$57fe0f50165dd4cd=parcelRequire("b7BEJ").BitwiseOrOperator,$9809b03a0700e0f5$export$2e1886fc6d5eb776=parcelRequire("hfrdk").BitwiseRightShiftOperator,$36bc5549114275e4$export$3046494ab1cf73bb=parcelRequire("aiqFh").BitwiseUnsignedRightShiftOperator,$efb38fd4b4315257$export$c5652d513ade8473=parcelRequire("jFgTi").BitwiseXorOperator,$dd5658eb718434e8$export$e62aa8d75c9a4734=parcelRequire("e0ivs").LogicalAndOperator,$7d5f0915f3becddf$export$cdf02df6bd75cc9=parcelRequire("coyiG").LogicalEqualOperator,$06a2425b50455bbb$export$264c8987e36a6d35=parcelRequire("2oJ6U").LogicalGreaterThanEqualOperator,$31ea1aab902efed5$export$7ebb65846541d315=parcelRequire("fVfWb").LogicalGreaterThanOperator,$582db28e066a18e7$export$fe2bbbd39de8094a=parcelRequire("ehnae").LogicalLessThanEqualOperator,$3986cc2d76a07224$export$7b20a1536da8f25=parcelRequire("CE7HI").LogicalNotEqualOperator,$987956f6677c2251$export$fdc45f0fc8eb4207=parcelRequire("k07IG").LogicalLessThanOperator,$8f7d873a8fa19c61$export$42108e1134a52f27=parcelRequire("g5mM1").LogicalOrOperator,$dcbd9e25cc38f200$export$84c3ec415fb07dd3=parcelRequire("6qOLq").ObjectOperator,$9fa9a9ac60f17beb$export$a8b4ac5cec7f3ef1=parcelRequire("5tUX2").LogicalNullishCoalescingOperator,$42fdf5ff29bedc03$export$314eecdb0204dae=parcelRequire("6raDm").ArrayRangeOperator,$23d8d454c45c8483$export$b9f061bcfab247ed=parcelRequire("e8VFW").ConditionalTernaryOperator;export{$bea0942547e00cd4$export$a0de004d4b269741 as KIRunSchemaRepository,$e2e654c8c8b42b35$export$1ef8ffe3d9ea2320 as KIRunFunctionRepository,$03cab56c0c40e1a2$export$3755dd8569265c2c as PrimitiveUtil,$c501efceca87a708$export$92eaabd025f1e921 as MapUtil,$c501efceca87a708$export$4758715d917352b9 as MapEntry,$de0b4b41e4746a17$export$5c8592849d7f8589 as isNullValue,$07e02f38923c0b4c$export$f0ef28713f767754 as LinkedList,$be62d217e50dbeec$export$a76dbac5bd058d1b as StringBuilder,$63bc73db1cd0d7b4$export$5a7f7b467323cd66 as StringFormatter,$50631448b653142f$export$592e033edf5fafe4 as StringUtil,$c99ef5fdcdd87c68$export$50073dc6080ec093 as Tuple2,$c99ef5fdcdd87c68$export$82dc29c19cc50d89 as Tuple3,$c99ef5fdcdd87c68$export$c0401e7e2326d13b as Tuple4,$c2c0827e90553522$export$bdb0fa2261d7dee1 as ArrayUtil,$f38e5fbd73132191$export$9cb4719e2e525b7a as deepEqual,$8e1fd87e141fe827$export$ecd5e8ace626722c as duplicate,$3c47f1bc7c66f182$export$f09f252875e413e8 as StatementExecution,$d335be29d204110b$export$1480fdc476e0600e as StatementMessage,$99938c30b570435a$export$d249626f99a0976c as ContextElement,$511cbfc015cdbf6a$export$6cebf62d32060adb as ContextTokenValueExtractor,$7b1c5de622922cdc$export$638a1889bcd4621c as OutputMapTokenValueExtractor,$1729a9f4799da7ac$export$ff42ca15b74921ee as ArgumentsTokenValueExtractor,$ca1e15a6ad410f7e$export$d6ecc3c8b1bdb677 as GraphVertex,$aeb8af0a0193139e$export$8193dda3aa6e9a3 as ExecutionGraph,UPDATE_REMINDER_KIRuntime as KIRuntime,$0a9ef75d837c6929$exports as default,$fe3fa5e51cec00a8$export$c72a235e9e048d37 as StatementMessageType,$ff0fbbfc90b01f44$export$c72d1e96aedc073d as FunctionExecutionParameters,$6b23ed074dafa43f$export$bfe37c1342e5eb83 as Expression,$5575335d796dbeb4$export$d44091f0b447fefe as TokenValueExtractor,$10c32ecaa7972757$export$439f57d66896a884 as LiteralTokenValueExtractor,$2f786f17389a32e8$export$39519efb8a973bce as ObjectValueSetterExtractor,$8d0f8328f51c2219$export$c24f16fac926e77f as ExpressionEvaluator,$5b99fb16f2ad3a42$export$ab5aad00225c5662 as Operation,$3a73b19f5a9d3311$export$e67adacf2c583eeb as ExpressionToken,$d58cc34cdb765248$export$acb5fd6ef0dd45e7 as ExpressionEvaluationException,$613eb413a07c8f59$export$c3407419a51d8741 as ExpressionTokenValue,$ead3a8cc1fb7823c$export$6138b597adfac7c as AbstractFunction,$a30e155e99df653c$export$2f21297dc8e7cb72 as Namespaces,$bfb6f5b09094a63c$export$dab92e0058712b0b as JsonExpression,$d7c5c93abc5e1799$export$cb559bfee05f190 as AdditionalType,$d7c5c93abc5e1799$export$19342e026b58ebb7 as Schema,$d7c5c93abc5e1799$export$e9708ef78a0361f7 as SchemaDetails,$87ee46d58b32280a$export$5464fb7e86e4a9f1 as NumberValidator,$7099ee372e15d670$export$d74a5d77bac81ab5 as BooleanValidator,$a646a03e012128fa$export$cd3b7079b2ac4000 as NullValidator,$233a72ac0061bd00$export$a006ee8cc7b6580a as ArrayValidator,$3c5135d4cdc6af8d$export$54412d5419e3f99d as AnyOfAllOfOneOfValidator,$8484e3bddcb80901$export$312ff19fe6f84b5e as StringValidator,$f0ae3dce2d7b23bc$export$e97b0a585a2ce29f as ObjectValidator,$08afff7ea76110b2$export$5ea2dbb44eae89d6 as SchemaValidator,$aab6c44f1d62c175$export$18db27caa68e620c as SchemaValidationException,$a486fd967920975f$export$e5a11051fe746f8a as SchemaReferenceException,$9f48b52c76faa34a$export$9ced0f77dc6abfd7 as TypeValidator,$e2b63cc6becde023$export$656411a496f80a09 as ArraySchemaType,$65a368db7d612009$export$c62c2a2bbb80b6fa as SingleType,$2765bc54f8b669a6$export$75f4a5a37c7a0a0f as TypeUtil,$076409438f64fdac$export$6d6eb186deb81c4 as MultipleType,$142932961419ab1e$export$92738401e1603719 as Type,$27a266817081df60$export$a1ec97982bccfa9d as SchemaType,$f6510250b30384da$export$7eb0095ad5663979 as SchemaUtil,$a48009af08cbd1f1$export$f22e7fe56db8ae03 as StringFormat,$e9dc56365edfc654$export$d3f4bd7b80956108 as HybridRepository,$1d046e4ff8522cd9$export$594b6714aa88d0a1 as KIRunConstants,$b5031b8f71f18ed8$export$f817523eebf7ee7f as Parameter,$c83f443dff95747f$export$46c58e8ae2505a7d as FunctionOutput,$7c50ef66c2277cde$export$13807d9ee5a34a42 as Position,$573c48da8577432b$export$ac28d24969149b5c as FunctionDefinition,$c7de3d56bb767194$export$1617e535b7cf20e as ParameterReferenceType,$e445db59e11a2252$export$c45be2437182b0e3 as EventResult,$c61e3511a52d9f9f$export$7d81ad5ed2d0609 as AbstractStatement,$5bfef192d905651a$export$c84356afd4299847 as Statement,$592c006d8edc2126$export$bc161170aa8ed47b as StatementGroup,$5ab241dc319ce959$export$6ac699b48d627131 as FunctionSignature,$d92bb6acd4c9a5eb$export$d61e24a684f9e51 as Event,$8cf01b2a122088fe$export$c6903b1fb9c4306f as ParameterType,$78da1ae8f28ac308$export$84637ea037d2e218 as Argument,$c89a1f60e4aaadb3$export$6d35a6334b82887f as ParameterReference,$e61ebbdca83688e9$export$50d5074000755e42 as ExecutionException,$9636755452e5d904$export$37b1b5eb4f4f5ada as KIRuntimeException,$5950bf437bddd326$export$b2346ee46dfa8cbc as ArithmeticUnaryMinusOperator,$6566601b6a7062df$export$874b037c929bb9a8 as ArithmeticUnaryPlusOperator,$86449b1ee58231e2$export$6282ef6c70349edc as BitwiseComplementOperator,$a7227e66ed3e8807$export$a4dd2a01c916cf79 as LogicalNotOperator,$07ae298d200db400$export$e38febd6a9d11047 as UnaryOperator,$b68d219228eaaaf4$export$f7d907e108ff5f5a as ArithmeticAdditionOperator,$f6ac6c072b139075$export$4429718dd207f524 as ArithmeticDivisionOperator,$6c80d73b0945e438$export$461eeaed4fd44d87 as ArithmeticIntegerDivisionOperator,$be3ce12116482e90$export$a654a6b4708c47ae as ArithmeticModulusOperator,$a2511671546286b3$export$c6c786d90c00ccb3 as ArithmeticMultiplicationOperator,$06c3e93d233b1212$export$32cdc7b90c3f2772 as ArithmeticSubtractionOperator,$94d6bfcd7c29b7e5$export$2ce812ef1adfc7e8 as ArrayOperator,$51a3743a4dff1a45$export$a5835aa4dc4a0f7 as BinaryOperator,$60a8f504ba44e900$export$a2a775190435bd33 as BitwiseAndOperator,$de6d0890546cee33$export$eeef83ab872ddce5 as BitwiseLeftShiftOperator,$f051c38045c23f1c$export$57fe0f50165dd4cd as BitwiseOrOperator,$9809b03a0700e0f5$export$2e1886fc6d5eb776 as BitwiseRightShiftOperator,$36bc5549114275e4$export$3046494ab1cf73bb as BitwiseUnsignedRightShiftOperator,$efb38fd4b4315257$export$c5652d513ade8473 as BitwiseXorOperator,$dd5658eb718434e8$export$e62aa8d75c9a4734 as LogicalAndOperator,$7d5f0915f3becddf$export$cdf02df6bd75cc9 as LogicalEqualOperator,$06a2425b50455bbb$export$264c8987e36a6d35 as LogicalGreaterThanEqualOperator,$31ea1aab902efed5$export$7ebb65846541d315 as LogicalGreaterThanOperator,$582db28e066a18e7$export$fe2bbbd39de8094a as LogicalLessThanEqualOperator,$3986cc2d76a07224$export$7b20a1536da8f25 as LogicalNotEqualOperator,$987956f6677c2251$export$fdc45f0fc8eb4207 as LogicalLessThanOperator,$8f7d873a8fa19c61$export$42108e1134a52f27 as LogicalOrOperator,$dcbd9e25cc38f200$export$84c3ec415fb07dd3 as ObjectOperator,$9fa9a9ac60f17beb$export$a8b4ac5cec7f3ef1 as LogicalNullishCoalescingOperator,$42fdf5ff29bedc03$export$314eecdb0204dae as ArrayRangeOperator,$23d8d454c45c8483$export$b9f061bcfab247ed as ConditionalTernaryOperator};
|
|
1
|
+
import{DateTime as e}from"luxon";function t(e,t,r,s){Object.defineProperty(e,t,{get:r,set:s,enumerable:!0,configurable:!0})}function r(e,t){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e}t({},"KIRunSchemaRepository",()=>C);var s,n,a,i,o,E,u={};t(u,"AdditionalType",()=>w),t(u,"Schema",()=>I),t(u,"SchemaDetails",()=>P),t({},"Namespaces",()=>A);class A{static{this.SYSTEM="System"}static{this.SYSTEM_CTX="System.Context"}static{this.SYSTEM_LOOP="System.Loop"}static{this.SYSTEM_ARRAY="System.Array"}static{this.SYSTEM_OBJECT="System.Object"}static{this.SYSTEM_JSON="System.JSON"}static{this.MATH="System.Math"}static{this.STRING="System.String"}static{this.DATE="System.Date"}constructor(){}}function l(e){return null==e}t({},"ArraySchemaType",()=>T),t({},"isNullValue",()=>l);class T{constructor(e){if(!e)return;this.singleSchema=e.singleSchema?new I(e.singleSchema):void 0,this.tupleSchema=e.tupleSchema?e.tupleSchema.map(e=>new I(e)):void 0}setSingleSchema(e){return this.singleSchema=e,this}setTupleSchema(e){return this.tupleSchema=e,this}getSingleSchema(){return this.singleSchema}getTupleSchema(){return this.tupleSchema}isSingleType(){return!l(this.singleSchema)}static of(...e){return 1==e.length?new T().setSingleSchema(e[0]):new T().setTupleSchema(e)}static from(e){if(!e)return;if(Array.isArray(e))return new T().setTupleSchema(I.fromListOfSchemas(e));let t=Object.keys(e);if(-1!=t.indexOf("singleSchema"))return new T().setSingleSchema(I.from(e.singleSchema));if(-1!=t.indexOf("tupleSchema"))return new T().setTupleSchema(I.fromListOfSchemas(e.tupleSchema));let r=I.from(e);if(r)return new T().setSingleSchema(r)}}t({},"SchemaType",()=>c);var c=((s={}).INTEGER="Integer",s.LONG="Long",s.FLOAT="Float",s.DOUBLE="Double",s.STRING="String",s.OBJECT="Object",s.ARRAY="Array",s.BOOLEAN="Boolean",s.NULL="Null",s);t({},"TypeUtil",()=>m),t({},"MultipleType",()=>h),t({},"Type",()=>g);class g{}class h extends g{constructor(e){super(),e instanceof h?this.type=new Set(Array.from(e.type)):this.type=new Set(Array.from(e))}getType(){return this.type}setType(e){return this.type=e,this}getAllowedSchemaTypes(){return this.type}contains(e){return this.type?.has(e)}}t({},"SingleType",()=>R);class R extends g{constructor(e){super(),e instanceof R?this.type=e.type:this.type=e}getType(){return this.type}getAllowedSchemaTypes(){return new Set([this.type])}contains(e){return this.type==e}}class m{static of(...e){return 1==e.length?new R(e[0]):new h(new Set(e))}static from(e){return"string"==typeof e?new R(c[m.fromJSONType(e)]):Array.isArray(e)?new h(new Set(e.map(m.fromJSONType).map(e=>e).map(e=>c[e]))):void 0}static fromJSONType(e){let t=e.toUpperCase();return"NUMBER"===t?"DOUBLE":t}}let p="additionalProperty",f="additionalItems",N="enums",_="items",M="System.Schema",S="required",O="version",d="namespace";class w{constructor(e){if(!e||(this.booleanValue=e.booleanValue,!e.schemaValue))return;this.schemaValue=new I(e.schemaValue)}getBooleanValue(){return this.booleanValue}getSchemaValue(){return this.schemaValue}setBooleanValue(e){return this.booleanValue=e,this}setSchemaValue(e){return this.schemaValue=e,this}static from(e){if(l(e))return;let t=new w;if("boolean"==typeof e)t.booleanValue=e;else{let r=Object.keys(e);-1!=r.indexOf("booleanValue")?t.booleanValue=e.booleanValue:-1!=r.indexOf("schemaValue")?t.schemaValue=I.from(e.schemaValue):t.schemaValue=I.from(e)}return t}}class P{constructor(e){if(!e)return;this.preferredComponent=e.preferredComponent,e.validationMessages&&(this.validationMessages=new Map(Array.from(e.validationMessages.entries()))),e.properties&&(this.properties=new Map(Array.from(e.properties.entries()))),e.styleProperties&&(this.styleProperties=new Map(Array.from(e.styleProperties.entries()))),this.order=e.order,this.label=e.label}getPreferredComponent(){return this.preferredComponent}setPreferredComponent(e){return this.preferredComponent=e,this}getValidationMessages(){return this.validationMessages}setValidationMessages(e){return this.validationMessages=e,this}getValidationMessage(e){return this.validationMessages?.get(e)}setProperties(e){return this.properties=e,this}getProperties(){return this.properties}setStyleProperties(e){return this.styleProperties=e,this}getStyleProperties(){return this.styleProperties}getOrder(){return this.order}setOrder(e){return this.order=e,this}getLabel(){return this.label}setLabel(e){return this.label=e,this}static from(e){if(e)return new P().setPreferredComponent(e.preferredComponent).setValidationMessages(e.validationMessages?new Map(Object.entries(e.validationMessages)):void 0).setProperties(e.properties?new Map(Object.entries(e.properties)):void 0).setStyleProperties(e.styleProperties?new Map(Object.entries(e.styleProperties)):void 0).setOrder(e.order).setLabel(e.label)}}class I{static{this.NULL=new I().setNamespace(A.SYSTEM).setName("Null").setType(m.of(c.NULL)).setConstant(void 0)}static{this.TYPE_SCHEMA=new I().setType(m.of(c.STRING)).setEnums(["INTEGER","LONG","FLOAT","DOUBLE","STRING","OBJECT","ARRAY","BOOLEAN","NULL"])}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName("Schema").setType(m.of(c.OBJECT)).setProperties(new Map([[d,I.of(d,c.STRING).setDefaultValue("_")],["name",I.ofString("name")],[O,I.of(O,c.INTEGER).setDefaultValue(1)],["ref",I.ofString("ref")],["type",new I().setAnyOf([I.TYPE_SCHEMA,I.ofArray("type",I.TYPE_SCHEMA)])],["anyOf",I.ofArray("anyOf",I.ofRef(M))],["allOf",I.ofArray("allOf",I.ofRef(M))],["oneOf",I.ofArray("oneOf",I.ofRef(M))],["not",I.ofRef(M)],["title",I.ofString("title")],["description",I.ofString("description")],["id",I.ofString("id")],["examples",I.ofAny("examples")],["defaultValue",I.ofAny("defaultValue")],["comment",I.ofString("comment")],[N,I.ofArray(N,I.ofString(N))],["constant",I.ofAny("constant")],["pattern",I.ofString("pattern")],["format",I.of("format",c.STRING).setEnums(["DATETIME","TIME","DATE","EMAIL","REGEX"])],["minLength",I.ofInteger("minLength")],["maxLength",I.ofInteger("maxLength")],["multipleOf",I.ofLong("multipleOf")],["minimum",I.ofNumber("minimum")],["maximum",I.ofNumber("maximum")],["exclusiveMinimum",I.ofNumber("exclusiveMinimum")],["exclusiveMaximum",I.ofNumber("exclusiveMaximum")],["properties",I.of("properties",c.OBJECT).setAdditionalProperties(new w().setSchemaValue(I.ofRef(M)))],["additionalProperties",new I().setName(p).setNamespace(A.SYSTEM).setAnyOf([I.ofBoolean(p),I.ofObject(p).setRef(M)]).setDefaultValue(!0)],[S,I.ofArray(S,I.ofString(S)).setDefaultValue([])],["propertyNames",I.ofRef(M)],["minProperties",I.ofInteger("minProperties")],["maxProperties",I.ofInteger("maxProperties")],["patternProperties",I.of("patternProperties",c.OBJECT).setAdditionalProperties(new w().setSchemaValue(I.ofRef(M)))],[_,new I().setName(_).setAnyOf([I.ofRef(M).setName("item"),I.ofArray("tuple",I.ofRef(M))])],["contains",I.ofRef(M)],["minContains",I.ofInteger("minContains")],["maxContains",I.ofInteger("maxContains")],["minItems",I.ofInteger("minItems")],["maxItems",I.ofInteger("maxItems")],["uniqueItems",I.ofBoolean("uniqueItems")],["additionalItems",new I().setName(f).setNamespace(A.SYSTEM).setAnyOf([I.ofBoolean(f),I.ofObject(f).setRef(M)])],["$defs",I.of("$defs",c.OBJECT).setAdditionalProperties(new w().setSchemaValue(I.ofRef(M)))],["permission",I.ofString("permission")],["details",I.ofObject("details")],["viewDetails",I.ofObject("viewDetails")]])).setRequired([])}static ofString(e){return new I().setType(m.of(c.STRING)).setName(e)}static ofInteger(e){return new I().setType(m.of(c.INTEGER)).setName(e)}static ofFloat(e){return new I().setType(m.of(c.FLOAT)).setName(e)}static ofLong(e){return new I().setType(m.of(c.LONG)).setName(e)}static ofDouble(e){return new I().setType(m.of(c.DOUBLE)).setName(e)}static ofAny(e){return new I().setType(m.of(c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE,c.STRING,c.BOOLEAN,c.ARRAY,c.NULL,c.OBJECT)).setName(e)}static ofAnyNotNull(e){return new I().setType(m.of(c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE,c.STRING,c.BOOLEAN,c.ARRAY,c.OBJECT)).setName(e)}static ofNumber(e){return new I().setType(m.of(c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE)).setName(e)}static ofBoolean(e){return new I().setType(m.of(c.BOOLEAN)).setName(e)}static of(e,...t){return new I().setType(m.of(...t)).setName(e)}static ofObject(e){return new I().setType(m.of(c.OBJECT)).setName(e)}static ofRef(e){return new I().setRef(e)}static ofArray(e,...t){return new I().setType(m.of(c.ARRAY)).setName(e).setItems(T.of(...t))}static fromListOfSchemas(e){if(l(e)&&!Array.isArray(e))return;let t=[];for(let r of Array.from(e)){let e=I.from(r);e&&t.push(e)}return t}static fromMapOfSchemas(e){if(l(e))return;let t=new Map;return Object.entries(e).forEach(([e,r])=>{let s=I.from(r);s&&t.set(e,s)}),t}static from(e,t=!1){if(l(e))return;let r=new I;return r.namespace=e.namespace??"_",r.name=e.name,r.version=e.version??1,r.ref=e.ref,t?r.type=new R(c.STRING):r.type=m.from(e.type),r.anyOf=I.fromListOfSchemas(e.anyOf),r.allOf=I.fromListOfSchemas(e.allOf),r.oneOf=I.fromListOfSchemas(e.oneOf),r.not=I.from(e.not),r.description=e.description,r.examples=e.examples?[...e.examples]:void 0,r.defaultValue=e.defaultValue,r.comment=e.comment,r.enums=e.enums?[...e.enums]:void 0,r.constant=e.constant,r.pattern=e.pattern,r.format=e.format,r.minLength=e.minLength,r.maxLength=e.maxLength,r.multipleOf=e.multipleOf,r.minimum=e.minimum,r.maximum=e.maximum,r.exclusiveMinimum=e.exclusiveMinimum,r.exclusiveMaximum=e.exclusiveMaximum,r.properties=I.fromMapOfSchemas(e.properties),r.additionalProperties=w.from(e.additionalProperties),r.required=e.required,r.propertyNames=I.from(e.propertyNames,!0),r.minProperties=e.minProperties,r.maxProperties=e.maxProperties,r.patternProperties=I.fromMapOfSchemas(e.patternProperties),r.items=T.from(e.items),r.additionalItems=w.from(e.additionalItems),r.contains=I.from(e.contains),r.minContains=e.minContains,r.maxContains=e.maxContains,r.minItems=e.minItems,r.maxItems=e.maxItems,r.uniqueItems=e.uniqueItems,r.$defs=I.fromMapOfSchemas(e.$defs),r.permission=e.permission,r.details=e.details?P.from(e.details):void 0,r.viewDetails=e.viewDetails?P.from(e.viewDetails):void 0,r}constructor(e){if(this.namespace="_",this.version=1,!e)return;this.namespace=e.namespace,this.name=e.name,this.version=e.version,this.ref=e.ref,l(e.type)||(this.type=e.type instanceof R?new R(e.type):new h(e.type)),this.anyOf=e.anyOf?.map(e=>new I(e)),this.allOf=e.allOf?.map(e=>new I(e)),this.oneOf=e.oneOf?.map(e=>new I(e)),this.not=this.not?new I(this.not):void 0,this.description=e.description,this.examples=e.examples?JSON.parse(JSON.stringify(e.examples)):void 0,this.defaultValue=e.defaultValue?JSON.parse(JSON.stringify(e.defaultValue)):void 0,this.comment=e.comment,this.enums=e.enums?[...e.enums]:void 0,this.constant=e.constant?JSON.parse(JSON.stringify(e.constant)):void 0,this.pattern=e.pattern,this.format=e.format,this.minLength=e.minLength,this.maxLength=e.maxLength,this.multipleOf=e.multipleOf,this.minimum=e.minimum,this.maximum=e.maximum,this.exclusiveMinimum=e.exclusiveMinimum,this.exclusiveMaximum=e.exclusiveMaximum,this.properties=e.properties?new Map(Array.from(e.properties.entries()).map(e=>[e[0],new I(e[1])])):void 0,this.additionalProperties=e.additionalProperties?new w(e.additionalProperties):void 0,this.required=e.required?[...e.required]:void 0,this.propertyNames=e.propertyNames?new I(e.propertyNames):void 0,this.minProperties=e.minProperties,this.maxProperties=e.maxProperties,this.patternProperties=e.patternProperties?new Map(Array.from(e.patternProperties.entries()).map(e=>[e[0],new I(e[1])])):void 0,this.items=e.items?new T(e.items):void 0,this.contains=e.contains?new I(this.contains):void 0,this.minContains=e.minContains,this.maxContains=e.maxContains,this.minItems=e.minItems,this.maxItems=e.maxItems,this.uniqueItems=e.uniqueItems,this.additionalItems=e.additionalItems?new w(e.additionalItems):void 0,this.$defs=e.$defs?new Map(Array.from(e.$defs.entries()).map(e=>[e[0],new I(e[1])])):void 0,this.permission=e.permission,this.details=e.details,this.viewDetails=e.viewDetails}getTitle(){return this.namespace&&"_"!=this.namespace?this.namespace+"."+this.name:this.name}getFullName(){return this.namespace+"."+this.name}get$defs(){return this.$defs}set$defs(e){return this.$defs=e,this}getNamespace(){return this.namespace}setNamespace(e){return this.namespace=e,this}getName(){return this.name}setName(e){return this.name=e,this}getVersion(){return this.version}setVersion(e){return this.version=e,this}getRef(){return this.ref}setRef(e){return this.ref=e,this}getType(){return this.type}setType(e){return this.type=e,this}getAnyOf(){return this.anyOf}setAnyOf(e){return this.anyOf=e,this}getAllOf(){return this.allOf}setAllOf(e){return this.allOf=e,this}getOneOf(){return this.oneOf}setOneOf(e){return this.oneOf=e,this}getNot(){return this.not}setNot(e){return this.not=e,this}getDescription(){return this.description}setDescription(e){return this.description=e,this}getExamples(){return this.examples}setExamples(e){return this.examples=e,this}getDefaultValue(){return this.defaultValue}setDefaultValue(e){return this.defaultValue=e,this}getComment(){return this.comment}setComment(e){return this.comment=e,this}getEnums(){return this.enums}setEnums(e){return this.enums=e,this}getConstant(){return this.constant}setConstant(e){return this.constant=e,this}getPattern(){return this.pattern}setPattern(e){return this.pattern=e,this}getFormat(){return this.format}setFormat(e){return this.format=e,this}getMinLength(){return this.minLength}setMinLength(e){return this.minLength=e,this}getMaxLength(){return this.maxLength}setMaxLength(e){return this.maxLength=e,this}getMultipleOf(){return this.multipleOf}setMultipleOf(e){return this.multipleOf=e,this}getMinimum(){return this.minimum}setMinimum(e){return this.minimum=e,this}getMaximum(){return this.maximum}setMaximum(e){return this.maximum=e,this}getExclusiveMinimum(){return this.exclusiveMinimum}setExclusiveMinimum(e){return this.exclusiveMinimum=e,this}getExclusiveMaximum(){return this.exclusiveMaximum}setExclusiveMaximum(e){return this.exclusiveMaximum=e,this}getProperties(){return this.properties}setProperties(e){return this.properties=e,this}getAdditionalProperties(){return this.additionalProperties}setAdditionalProperties(e){return this.additionalProperties=e,this}getAdditionalItems(){return this.additionalItems}setAdditionalItems(e){return this.additionalItems=e,this}getRequired(){return this.required}setRequired(e){return this.required=e,this}getPropertyNames(){return this.propertyNames}setPropertyNames(e){return this.propertyNames=e,this.propertyNames.type=new R(c.STRING),this}getMinProperties(){return this.minProperties}setMinProperties(e){return this.minProperties=e,this}getMaxProperties(){return this.maxProperties}setMaxProperties(e){return this.maxProperties=e,this}getPatternProperties(){return this.patternProperties}setPatternProperties(e){return this.patternProperties=e,this}getItems(){return this.items}setItems(e){return this.items=e,this}getContains(){return this.contains}setContains(e){return this.contains=e,this}getMinContains(){return this.minContains}setMinContains(e){return this.minContains=e,this}getMaxContains(){return this.maxContains}setMaxContains(e){return this.maxContains=e,this}getMinItems(){return this.minItems}setMinItems(e){return this.minItems=e,this}getMaxItems(){return this.maxItems}setMaxItems(e){return this.maxItems=e,this}getUniqueItems(){return this.uniqueItems}setUniqueItems(e){return this.uniqueItems=e,this}getPermission(){return this.permission}setPermission(e){return this.permission=e,this}getDetails(){return this.details}setDetails(e){return this.details=e,this}getViewDetails(){return this.viewDetails}setViewDetails(e){return this.viewDetails=e,this}}t({},"Parameter",()=>U),t({},"SchemaReferenceException",()=>y);class y extends Error{constructor(e,t,r){super(e.trim()?e+"-"+t:t),this.schemaPath=e,this.cause=r}getSchemaPath(){return this.schemaPath}getCause(){return this.cause}}t({},"ParameterType",()=>x);var x=((n={}).CONSTANT="CONSTANT",n.EXPRESSION="EXPRESSION",n);let L="value";class U{static{this.SCHEMA_NAME="Parameter"}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName(U.SCHEMA_NAME).setProperties(new Map([["schema",I.SCHEMA],["parameterName",I.ofString("parameterName")],["variableArgument",I.of("variableArgument",c.BOOLEAN).setDefaultValue(!1)],["type",I.ofString("type").setEnums(["EXPRESSION","CONSTANT"])]]))}static{this.EXPRESSION=new I().setNamespace(A.SYSTEM).setName("ParameterExpression").setType(m.of(c.OBJECT)).setProperties(new Map([["isExpression",I.ofBoolean("isExpression").setDefaultValue(!0)],[L,I.ofAny(L)]]))}constructor(e,t){if(this.variableArgument=!1,this.type=x.EXPRESSION,e instanceof U)this.schema=new I(e.schema),this.parameterName=e.parameterName,this.variableArgument=e.variableArgument,this.type=e.type;else{if(!t)throw Error("Unknown constructor signature");this.schema=t,this.parameterName=e}}getSchema(){return this.schema}setSchema(e){return this.schema=e,this}getParameterName(){return this.parameterName}setParameterName(e){return this.parameterName=e,this}isVariableArgument(){return this.variableArgument}setVariableArgument(e){return this.variableArgument=e,this}getType(){return this.type}setType(e){return this.type=e,this}static ofEntry(e,t,r=!1,s=x.EXPRESSION){return[e,new U(e,t).setType(s).setVariableArgument(r)]}static of(e,t,r=!1,s=x.EXPRESSION){return new U(e,t).setType(s).setVariableArgument(r)}static from(e){let t=I.from(e.schema);if(!t)throw new y("","Parameter requires Schema");return new U(e.parameterName,t).setVariableArgument(!!e.variableArgument).setType(e.type??x.EXPRESSION)}}var b={};t(b,"MapUtil",()=>V),t(b,"MapEntry",()=>v);class V{static of(e,t,r,s,n,a,i,o,E,u,A,T,c,g,h,R,m,p,f,N){let _=new Map;return l(e)||l(t)||_.set(e,t),l(r)||l(s)||_.set(r,s),l(n)||l(a)||_.set(n,a),l(i)||l(o)||_.set(i,o),l(E)||l(u)||_.set(E,u),l(A)||l(T)||_.set(A,T),l(c)||l(g)||_.set(c,g),l(h)||l(R)||_.set(h,R),l(m)||l(p)||_.set(m,p),l(f)||l(N)||_.set(f,N),_}static ofArrayEntries(...e){let t=new Map;for(let[r,s]of e)t.set(r,s);return t}static entry(e,t){return new v(e,t)}static ofEntries(...e){let t=new Map;for(let r of e)t.set(r.k,r.v);return t}static ofEntriesArray(...e){let t=new Map;for(let r=0;r<e.length;r++)t.set(e[r][0],e[r][1]);return t}constructor(){}}class v{constructor(e,t){this.k=e,this.v=t}}class C{constructor(){this.map=new Map([["any",I.ofAny("any").setNamespace(A.SYSTEM)],["boolean",I.ofBoolean("boolean").setNamespace(A.SYSTEM)],["double",I.ofDouble("double").setNamespace(A.SYSTEM)],["float",I.ofFloat("float").setNamespace(A.SYSTEM)],["integer",I.ofInteger("integer").setNamespace(A.SYSTEM)],["long",I.ofLong("long").setNamespace(A.SYSTEM)],["number",I.ofNumber("number").setNamespace(A.SYSTEM)],["string",I.ofString("string").setNamespace(A.SYSTEM)],["Timestamp",I.ofString("Timestamp").setNamespace(A.DATE)],["Timeunit",I.ofString("Timeunit").setNamespace(A.DATE).setEnums(["YEARS","QUARTERS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","MILLISECONDS"])],["Duration",I.ofObject("Duration").setNamespace(A.DATE).setProperties(V.ofArrayEntries(["years",I.ofNumber("years")],["quarters",I.ofNumber("quarters")],["months",I.ofNumber("months")],["weeks",I.ofNumber("weeks")],["days",I.ofNumber("days")],["hours",I.ofNumber("hours")],["minutes",I.ofNumber("minutes")],["seconds",I.ofNumber("seconds")],["milliseconds",I.ofNumber("milliseconds")])).setAdditionalItems(w.from(!1))],["TimeObject",I.ofObject("TimeObject").setNamespace(A.DATE).setProperties(V.ofArrayEntries(["year",I.ofNumber("year")],["month",I.ofNumber("month")],["day",I.ofNumber("day")],["hour",I.ofNumber("hour")],["minute",I.ofNumber("minute")],["second",I.ofNumber("second")],["millisecond",I.ofNumber("millisecond")])).setAdditionalItems(w.from(!1))],[U.EXPRESSION.getName(),U.EXPRESSION],[I.NULL.getName(),I.NULL],[I.SCHEMA.getName(),I.SCHEMA]]),this.filterableNames=Array.from(this.map.values()).map(e=>e.getFullName())}async find(e,t){return A.SYSTEM!=e&&A.DATE!=e?Promise.resolve(void 0):Promise.resolve(this.map.get(t))}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}}function D(e){return[e.getSignature().getName(),e]}t({},"KIRunFunctionRepository",()=>s3),t({},"EventResult",()=>$),t({},"Event",()=>G);class G{static{this.OUTPUT="output"}static{this.ERROR="error"}static{this.ITERATION="iteration"}static{this.TRUE="true"}static{this.FALSE="false"}static{this.SCHEMA_NAME="Event"}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName(G.SCHEMA_NAME).setType(m.of(c.OBJECT)).setProperties(new Map([["name",I.ofString("name")],["parameters",I.ofObject("parameter").setAdditionalProperties(new w().setSchemaValue(I.SCHEMA))]]))}constructor(e,t){if(e instanceof G)this.name=e.name,this.parameters=new Map(Array.from(e.parameters.entries()).map(e=>[e[0],new I(e[1])]));else{if(this.name=e,!t)throw Error("Unknown constructor format");this.parameters=t}}getName(){return this.name}setName(e){return this.name=e,this}getParameters(){return this.parameters}setParameters(e){return this.parameters=e,this}static outputEventMapEntry(e){return G.eventMapEntry(G.OUTPUT,e)}static eventMapEntry(e,t){return[e,new G(e,t)]}static from(e){return new G(e.name,new Map(Object.entries(e.parameters??{}).map(e=>{let t=I.from(e[1]);if(!t)throw new y("","Event expects a schema");return[e[0],t]})))}}class ${constructor(e,t){this.name=e,this.result=t}getName(){return this.name}setName(e){return this.name=e,this}getResult(){return this.result}setResult(e){return this.result=e,this}static outputOf(e){return $.of(G.OUTPUT,e)}static of(e,t){return new $(e,t)}}t({},"FunctionOutput",()=>B),t({},"KIRuntimeException",()=>F);class F extends Error{constructor(e,t){super(e),this.cause=t}getCause(){return this.cause}}class B{constructor(e){if(this.index=0,l(e))throw new F("Function output is generating null");Array.isArray(e)&&e.length&&e[0]instanceof $?this.fo=e:(this.fo=[],Array.isArray(e)||(this.generator=e))}next(){if(!this.generator)return this.index<this.fo.length?this.fo[this.index++]:void 0;let e=this.generator.next();return e&&this.fo.push(e),e}allResults(){return this.fo}}t({},"FunctionSignature",()=>Y);class Y{static{this.SCHEMA_NAME="FunctionSignature"}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName(Y.SCHEMA_NAME).setProperties(new Map([["name",I.ofString("name")],["namespace",I.ofString("namespace")],["parameters",I.ofObject("parameters").setAdditionalProperties(new w().setSchemaValue(U.SCHEMA))],["events",I.ofObject("events").setAdditionalProperties(new w().setSchemaValue(G.SCHEMA))]]))}constructor(e){this.namespace="_",this.parameters=new Map,this.events=new Map,e instanceof Y?(this.name=e.name,this.namespace=e.namespace,this.parameters=new Map(Array.from(e.parameters.entries()).map(e=>[e[0],new U(e[1])])),this.events=new Map(Array.from(e.events.entries()).map(e=>[e[0],new G(e[1])]))):this.name=e}getNamespace(){return this.namespace}setNamespace(e){return this.namespace=e,this}getName(){return this.name}setName(e){return this.name=e,this}getParameters(){return this.parameters}setParameters(e){return this.parameters=e,this}getEvents(){return this.events}setEvents(e){return this.events=e,this}getFullName(){return this.namespace+"."+this.name}}t({},"AbstractFunction",()=>eN),t({},"SchemaValidator",()=>ef),t({},"deepEqual",()=>W),t({},"LinkedList",()=>k),t({},"StringFormatter",()=>H);class H{static format(e,...t){if(!t||0==t.length)return e;let r="",s=0,n="",a=n,i=e.length;for(let o=0;o<i;o++)"$"==(n=e.charAt(o))&&"\\"==a?r=r.substring(0,o-1)+n:"$"==n&&s<t.length?r+=t[s++]:r+=n,a=n;return r.toString()}constructor(){}}class k{constructor(e){if(this.head=void 0,this.tail=void 0,this.length=0,e?.length){for(let t of e)if(this.head){let e=new j(t,this.tail);this.tail.next=e,this.tail=e}else this.tail=this.head=new j(t);this.length=e.length}}push(e){let t=new j(e,void 0,this.head);this.head?(this.head.previous=t,this.head=t):this.tail=this.head=t,this.length++}pop(){if(!this.head)throw Error("List is empty and cannot pop further.");let e=this.head.value;if(this.length--,this.head==this.tail)return this.head=this.tail=void 0,e;let t=this.head;return this.head=t.next,t.next=void 0,t.previous=void 0,this.head.previous=void 0,e}isEmpty(){return!this.length}size(){return this.length}get(e){if(e<0||e>=this.length)throw Error(`${e} is out of bounds [0,${this.length}]`);let t=this.head;for(;e>0;)t=this.head.next,--e;return t.value}set(e,t){if(e<0||e>=this.length)throw new F(H.format("Index $ out of bound to set the value in linked list.",e));let r=this.head;for(;e>0;)r=this.head.next,--e;return r.value=t,this}toString(){let e=this.head,t="";for(;e;)t+=e.value,(e=e.next)&&(t+=", ");return`[${t}]`}toArray(){let e=[],t=this.head;for(;t;)e.push(t.value),t=t.next;return e}peek(){if(!this.head)throw Error("List is empty so cannot peak");return this.head.value}peekLast(){if(!this.tail)throw Error("List is empty so cannot peak");return this.tail.value}getFirst(){if(!this.head)throw Error("List is empty so cannot get first");return this.head.value}removeFirst(){return this.pop()}removeLast(){if(!this.tail)throw Error("List is empty so cannot remove");--this.length;let e=this.tail.value;if(0==this.length)this.head=this.tail=void 0;else{let e=this.tail.previous;e.next=void 0,this.tail.previous=void 0,this.tail=e}return e}addAll(e){return e&&e.length&&e.forEach(this.add.bind(this)),this}add(e){return++this.length,this.tail||this.head?this.head===this.tail?(this.tail=new j(e,this.head),this.head.next=this.tail):(this.tail=new j(e,this.tail),this.tail.previous.next=this.tail):this.head=this.tail=new j(e),this}map(e,t){let r=new k,s=this.head,n=0;for(;s;)r.add(e(s.value,n)),s=s.next,++n;return r}indexOf(e){let t=this.head,r=0;for(;t;){if(W(t.value,e))return r;t=t.next,++r}return -1}forEach(e,t){let r=this.head,s=0;for(;r;)e(r.value,s),r=r.next,++s}}class j{constructor(e,t,r){this.value=e,this.next=r,this.previous=t}toString(){return""+this.value}}function W(e,t){let r=new k;r.push(e);let s=new k;for(s.push(t);!r.isEmpty()&&!s.isEmpty();){let e=r.pop(),t=s.pop();if(e===t)continue;let n=typeof e,a=typeof t;if("undefined"===n||"undefined"===a){if(!e&&!t)continue;return!1}if(n!==a)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!=t.length)return!1;for(let n=0;n<e.length;n++)r.push(e[n]),s.push(t[n]);continue}if("object"===n){if("object"!==a||null===e||null===t)return!1;let n=Object.entries(e),i=Object.entries(t);if(n.length!==i.length)return!1;for(let[e,a]of n)r.push(a),s.push(t[e]);continue}return!1}return!0}t({},"StringUtil",()=>X);class X{constructor(){}static nthIndex(e,t,r=0,s){if(!e)throw new F("String cannot be null");if(r<0||r>=e.length)throw new F(H.format("Cannot search from index : $",r));if(s<=0||s>e.length)throw new F(H.format("Cannot search for occurance : $",s));for(;r<e.length;){if(e.charAt(r)==t&&0==--s)return r;++r}return -1}static splitAtFirstOccurance(e,t){if(!e)return[void 0,void 0];let r=e.indexOf(t);return -1==r?[e,void 0]:[e.substring(0,r),e.substring(r+1)]}static splitAtLastOccurance(e,t){if(!e)return[void 0,void 0];let r=e.lastIndexOf(t);return -1==r?[e,void 0]:[e.substring(0,r),e.substring(r+1)]}static isNullOrBlank(e){return!e||""==e.trim()}}t({},"SchemaUtil",()=>Z);var J={};t(J,"Tuple2",()=>q),t(J,"Tuple3",()=>K),t(J,"Tuple4",()=>z);class q{constructor(e,t){this.f=e,this.s=t}getT1(){return this.f}getT2(){return this.s}setT1(e){return this.f=e,this}setT2(e){return this.s=e,this}}class K extends q{constructor(e,t,r){super(e,t),this.t=r}getT3(){return this.t}setT1(e){return this.f=e,this}setT2(e){return this.s=e,this}setT3(e){return this.t=e,this}}class z extends K{constructor(e,t,r,s){super(e,t,r),this.fr=s}getT4(){return this.fr}setT1(e){return this.f=e,this}setT2(e){return this.s=e,this}setT3(e){return this.t=e,this}setT4(e){return this.fr=e,this}}t({},"SchemaValidationException",()=>Q);class Q extends Error{constructor(e,t,r=[],s){super(t+(r?r.map(e=>e.message).reduce((e,t)=>e+"\n"+t,""):"")),this.schemaPath=e,this.cause=s}getSchemaPath(){return this.schemaPath}getCause(){return this.cause}}class Z{static{this.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH="Unable to retrive schema from referenced path"}static{this.CYCLIC_REFERENCE_LIMIT_COUNTER=20}static async getDefaultValue(e,t){if(e)return e.getConstant()?e.getConstant():l(e.getDefaultValue())?Z.getDefaultValue(await Z.getSchemaFromRef(e,t,e.getRef()),t):e.getDefaultValue()}static async hasDefaultValueOrNullSchemaType(e,t){return e?e.getConstant()||!l(e.getDefaultValue())?Promise.resolve(!0):l(e.getRef())?e.getType()?.getAllowedSchemaTypes().has(c.NULL)?Promise.resolve(!0):Promise.resolve(!1):this.hasDefaultValueOrNullSchemaType(await Z.getSchemaFromRef(e,t,e.getRef()),t):Promise.resolve(!1)}static async getSchemaFromRef(e,t,r,s=0){if(++s==Z.CYCLIC_REFERENCE_LIMIT_COUNTER)throw new Q(r??"","Schema has a cyclic reference");if(!e||!r||X.isNullOrBlank(r))return Promise.resolve(void 0);if(!r.startsWith("#")){var n=await Z.resolveExternalSchema(e,t,r);n&&(e=n.getT1(),r=n.getT2())}let a=r.split("/");return 1===a.length?Promise.resolve(e):Promise.resolve(Z.resolveInternalSchema(e,t,r,s,a,1))}static async resolveInternalSchema(e,t,r,s,n,a){let i=e;if(a!==n.length){for(;a<n.length;){if("$defs"===n[a]){if(++a>=n.length||!i.get$defs())throw new y(r,Z.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH);i=i.get$defs()?.get(n[a])}else{if(i&&(!i.getType()?.contains(c.OBJECT)||!i.getProperties()))throw new y(r,"Cannot retrievie schema from non Object type schemas");i=i.getProperties()?.get(n[a])}if(a++,!i||!X.isNullOrBlank(i.getRef())&&!(i=await Z.getSchemaFromRef(i,t,i.getRef(),s)))throw new y(r,Z.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH)}return Promise.resolve(i)}}static async resolveExternalSchema(e,t,r){if(!t)return Promise.resolve(void 0);let s=X.splitAtFirstOccurance(r??"","/");if(!s[0])return Promise.resolve(void 0);let n=X.splitAtLastOccurance(s[0],".");if(!n[0]||!n[1])return Promise.resolve(void 0);let a=await t.find(n[0],n[1]);if(!a)return Promise.resolve(void 0);if(!s[1]||""===s[1])return Promise.resolve(new q(a,r));if(r="#/"+s[1],!a)throw new y(r,Z.UNABLE_TO_RETRIVE_SCHEMA_FROM_REFERENCED_PATH);return Promise.resolve(new q(a,r))}constructor(){}}t({},"AnyOfAllOfOneOfValidator",()=>ee);class ee{static async validate(e,t,r,s,n,a){let i=[];return t.getOneOf()&&!t.getOneOf()?await ee.oneOf(e,t,r,s,i,n,a):t.getAllOf()&&!t.getAllOf()?await ee.allOf(e,t,r,s,i,n,a):t.getAnyOf()&&!t.getAnyOf()?await ee.anyOf(e,t,r,s,i,n,a):s}static async anyOf(e,t,r,s,n,a,i){let o=!1;for(let E of t.getAnyOf()??[])try{await ee.validate(e,E,r,s,a,i),o=!0;break}catch(e){o=!1,n.push(e)}if(o)return s;throw new Q(ef.path(e),"The value don't satisfy any of the schemas.",n)}static async allOf(e,t,r,s,n,a,i){let o=0;for(let E of t.getAllOf()??[])try{await ee.validate(e,E,r,s,a,i),o++}catch(e){n.push(e)}if(o===t.getAllOf()?.length)return s;throw new Q(ef.path(e),"The value doesn't satisfy some of the schemas.",n)}static async oneOf(e,t,r,s,n,a,i){let o=0;for(let E of t.getOneOf()??[])try{await ee.validate(e,E,r,s,a,i),o++}catch(e){n.push(e)}if(1===o)return s;throw new Q(ef.path(e),0==o?"The value does not satisfy any schema":"The value satisfy more than one schema",n)}constructor(){}}t({},"TypeValidator",()=>ep),t({},"ArrayValidator",()=>et);class et{static async validate(e,t,r,s,n,a){if(l(s))throw new Q(ef.path(e),"Expected an array but found null");if(!Array.isArray(s))throw new Q(ef.path(e),s.toString()+" is not an Array");return et.checkMinMaxItems(e,t,s),await et.checkItems(e,t,r,s,n,a),et.checkUniqueItems(e,t,s),await et.checkContains(t,e,r,s),s}static async checkContains(e,t,r,s){if(l(e.getContains()))return;let n=await et.countContains(t,e,r,s,l(e.getMinContains())&&l(e.getMaxContains()));if(0===n)throw new Q(ef.path(t),"None of the items are of type contains schema");if(!l(e.getMinContains())&&e.getMinContains()>n)throw new Q(ef.path(t),"The minimum number of the items of type contains schema should be "+e.getMinContains()+" but found "+n);if(!l(e.getMaxContains())&&e.getMaxContains()<n)throw new Q(ef.path(t),"The maximum number of the items of type contains schema should be "+e.getMaxContains()+" but found "+n)}static async countContains(e,t,r,s,n){let a=0;for(let i=0;i<s.length;i++){let o=e?[...e]:[];try{if(await ef.validate(o,t.getContains(),r,s[i]),a++,n)break}catch(e){}}return a}static checkUniqueItems(e,t,r){if(t.getUniqueItems()&&t.getUniqueItems()&&new Set(r).size!==r.length)throw new Q(ef.path(e),"Items on the array are not unique")}static checkMinMaxItems(e,t,r){if(t.getMinItems()&&t.getMinItems()>r.length)throw new Q(ef.path(e),"Array should have minimum of "+t.getMinItems()+" elements");if(t.getMaxItems()&&t.getMaxItems()<r.length)throw new Q(ef.path(e),"Array can have maximum of "+t.getMaxItems()+" elements")}static async checkItems(e,t,r,s,n,a){if(!t.getItems())return;let i=t.getItems();if(i.getSingleSchema())for(let t=0;t<s.length;t++){let o=e?[...e]:[];s[t]=await ef.validate(o,i.getSingleSchema(),r,s[t],n,a)}if(i.getTupleSchema()){if(i.getTupleSchema().length!==s.length&&l(t?.getAdditionalItems()))throw new Q(ef.path(e),"Expected an array with only "+i.getTupleSchema().length+" but found "+s.length);await this.checkItemsInTupleSchema(e,r,s,i),await this.checkAdditionalItems(e,t,r,s,i)}}static async checkItemsInTupleSchema(e,t,r,s,n,a){for(let i=0;i<s.getTupleSchema()?.length;i++){let o=e?[...e]:[];r[i]=await ef.validate(o,s.getTupleSchema()[i],t,r[i],n,a)}}static async checkAdditionalItems(e,t,r,s,n){if(!l(t.getAdditionalItems())){let a=t.getAdditionalItems();if(a?.getBooleanValue()){let i=I.ofAny("item");if(a?.getBooleanValue()===!1&&s.length>n.getTupleSchema()?.length)throw new Q(ef.path(e),"No Additional Items are defined");await this.checkEachItemInAdditionalItems(e,t,r,s,n,i)}else if(a?.getSchemaValue()){let i=a.getSchemaValue();await this.checkEachItemInAdditionalItems(e,t,r,s,n,i)}}}static async checkEachItemInAdditionalItems(e,t,r,s,n,a){for(let t=n.getTupleSchema()?.length;t<s.length;t++){let n=e?[...e]:[];s[t]=await ef.validate(n,a,r,s[t])}}constructor(){}}t({},"BooleanValidator",()=>er);class er{static validate(e,t,r){if(l(r))throw new Q(ef.path(e),"Expected a boolean but found null");if("boolean"!=typeof r)throw new Q(ef.path(e),r.toString()+" is not a boolean");return r}constructor(){}}t({},"NullValidator",()=>es);class es{static validate(e,t,r){if(l(r))return r;throw new Q(ef.path(e),"Expected a null but found "+r)}constructor(){}}t({},"NumberValidator",()=>en);class en{static validate(e,t,r,s){if(l(s))throw new Q(ef.path(t),"Expected a number but found null");if("number"!=typeof s)throw new Q(ef.path(t),s.toString()+" is not a "+e);let n=en.extractNumber(e,t,r,s);return en.checkRange(t,r,s,n),en.checkMultipleOf(t,r,s,n),s}static extractNumber(e,t,r,s){let n=s;try{(e==c.LONG||e==c.INTEGER)&&(n=Math.round(n))}catch(r){throw new Q(ef.path(t),s+" is not a number of type "+e,r)}if(l(n)||(e==c.LONG||e==c.INTEGER)&&n!=s)throw new Q(ef.path(t),s.toString()+" is not a number of type "+e);return n}static checkMultipleOf(e,t,r,s){if(t.getMultipleOf()&&s%t.getMultipleOf()!=0)throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("multipleOf")??r.toString()+" is not multiple of "+t.getMultipleOf())}static checkRange(e,t,r,s){if(!l(t.getMinimum())&&0>en.numberCompare(s,t.getMinimum()))throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("minimum")??r.toString()+" should be greater than or equal to "+t.getMinimum());if(!l(t.getMaximum())&&en.numberCompare(s,t.getMaximum())>0)throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("maximum")??r.toString()+" should be less than or equal to "+t.getMaximum());if(!l(t.getExclusiveMinimum())&&0>=en.numberCompare(s,t.getExclusiveMinimum()))throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("exclusiveMinimum")??r.toString()+" should be greater than "+t.getExclusiveMinimum());if(!l(t.getExclusiveMaximum())&&en.numberCompare(s,t.getExclusiveMaximum())>0)throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("exclusiveMaximum")??r.toString()+" should be less than "+t.getExclusiveMaximum())}static numberCompare(e,t){return e-t}constructor(){}}t({},"ObjectValidator",()=>ea);class ea{static async validate(e,t,r,s,n,a){if(l(s))throw new Q(ef.path(e),"Expected an object but found null");if("object"!=typeof s||Array.isArray(s))throw new Q(ef.path(e),s.toString()+" is not an Object");let i=new Set(Object.keys(s));return ea.checkMinMaxProperties(e,t,i),t.getPropertyNames()&&await ea.checkPropertyNameSchema(e,t,r,i),t.getRequired()&&ea.checkRequired(e,t,s),t.getProperties()&&await ea.checkProperties(e,t,r,s,i,n,a),t.getPatternProperties()&&await ea.checkPatternProperties(e,t,r,s,i),t.getAdditionalProperties()&&await ea.checkAdditionalProperties(e,t,r,s,i),s}static async checkPropertyNameSchema(e,t,r,s){for(let n of Array.from(s.values()))try{await ef.validate(e,t.getPropertyNames(),r,n)}catch(t){throw new Q(ef.path(e),"Property name '"+n+"' does not fit the property schema")}}static checkRequired(e,t,r){for(let s of t.getRequired()??[])if(l(r[s]))throw new Q(ef.path(e),t.getProperties()?.get(s)?.getDetails()?.getValidationMessage("mandatory")??s+" is mandatory")}static async checkAdditionalProperties(e,t,r,s,n){let a=t.getAdditionalProperties();if(a.getSchemaValue())for(let t of Array.from(n.values())){let n=e?[...e]:[];s[t]=await ef.validate(n,a.getSchemaValue(),r,s[t])}else if(!1===a.getBooleanValue()&&n.size)throw new Q(ef.path(e),Array.from(n)+" is/are additional properties which are not allowed.")}static async checkPatternProperties(e,t,r,s,n){let a=new Map;for(let e of Array.from(t.getPatternProperties().keys()))a.set(e,new RegExp(e));for(let i of Array.from(n.values())){let o=e?[...e]:[];for(let e of Array.from(a.entries()))if(e[1].test(i)){s[i]=await ef.validate(o,t.getPatternProperties().get(e[0]),r,s[i]),n.delete(i);break}}}static async checkProperties(e,t,r,s,n,a,i){for(let o of Array.from(t.getProperties())){let t=s[o[0]];if(!s.hasOwnProperty(o[0])&&l(t)&&l(await Z.getDefaultValue(o[1],r)))continue;let E=e?[...e]:[];s[o[0]]=await ef.validate(E,o[1],r,t,a,i),n.delete(o[0])}}static checkMinMaxProperties(e,t,r){if(t.getMinProperties()&&r.size<t.getMinProperties())throw new Q(ef.path(e),"Object should have minimum of "+t.getMinProperties()+" properties");if(t.getMaxProperties()&&r.size>t.getMaxProperties())throw new Q(ef.path(e),"Object can have maximum of "+t.getMaxProperties()+" properties")}}t({},"StringValidator",()=>eo),t({},"StringFormat",()=>ei);var ei=((a={}).DATETIME="DATETIME",a.TIME="TIME",a.DATE="DATE",a.EMAIL="EMAIL",a.REGEX="REGEX",a);class eo{static{this.TIME=/^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?([+-][01][0-9]:[0-5][0-9])?$/}static{this.DATE=/^[0-9]{4,4}-([0][0-9]|[1][0-2])-(0[1-9]|[1-2][1-9]|3[01])$/}static{this.DATETIME=/^[0-9]{4,4}-([0][0-9]|[1][0-2])-(0[1-9]|[1-2][1-9]|3[01])T([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?([+-][01][0-9]:[0-5][0-9])?$/}static{this.EMAIL=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/}static validate(e,t,r){if(l(r))throw new Q(ef.path(e),"Expected a string but found "+r);if("string"!=typeof r)throw new Q(ef.path(e),r.toString()+" is not String");t.getFormat()==ei.TIME?eo.patternMatcher(e,t,r,eo.TIME,"time pattern"):t.getFormat()==ei.DATE?eo.patternMatcher(e,t,r,eo.DATE,"date pattern"):t.getFormat()==ei.DATETIME?eo.patternMatcher(e,t,r,eo.DATETIME,"date time pattern"):t.getFormat()==ei.EMAIL?eo.patternMatcher(e,t,r,eo.EMAIL,"email pattern"):t.getPattern()&&eo.patternMatcher(e,t,r,new RegExp(t.getPattern()),"pattern "+t.getPattern());let s=r.length;if(t.getMinLength()&&s<t.getMinLength())throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("minLength")??"Expected a minimum of "+t.getMinLength()+" characters");if(t.getMaxLength()&&s>t.getMaxLength())throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("maxLength")??"Expected a maximum of "+t.getMaxLength()+" characters");return r}static patternMatcher(e,t,r,s,n){if(!s.test(r))throw new Q(ef.path(e),t.getDetails()?.getValidationMessage("pattern")??r.toString()+" is not matched with the "+n)}constructor(){}}var eE=((i={}).STRICT="STRICT",i.LENIENT="LENIENT",i.USE_DEFAULT="USE_DEFAULT",i.SKIP="SKIP",i);let eu=e=>eE[e.toUpperCase()],eA=()=>Object.values(eE);class el extends Error{constructor(e,t,r,s,n=[],a){super(r+(n?n.map(e=>e.message).reduce((e,t)=>e+"\n"+t,""):"")),this.schemaPath=e,this.source=t??null,this.mode=s??null,this.cause=a}getSchemaPath(){return this.schemaPath}getSource(){return this.source??null}getMode(){return this.mode??null}getCause(){return this.cause}}class eT{static handleUnConvertibleValue(e,t,r,s){return this.handleUnConvertibleValueWithDefault(e,t,r,null,s)}static handleUnConvertibleValueWithDefault(e,t,r,s,n){switch(null===t&&(t=eE.STRICT),t){case eE.STRICT:throw new el(ef.path(e),r,n,t);case eE.LENIENT:return null;case eE.USE_DEFAULT:return s;case eE.SKIP:return r;default:throw new el(ef.path(e),r,"Invalid conversion mode")}}constructor(){}}class ec{static convert(e,t,r,s){if(l(s))return eT.handleUnConvertibleValueWithDefault(e,r,s,this.getDefault(t),"Expected a string but found null");let n=s??("object"==typeof s?JSON.stringify(s):String(s));return this.getConvertedString(n,r)}static getConvertedString(e,t){return t===eE.STRICT?e.toString():e.trim()}static getDefault(e){return e.getDefaultValue()??null}constructor(){}}class eg{static convert(e,t,r,s,n){if(l(n))return eT.handleUnConvertibleValueWithDefault(e,s,n,this.getDefault(r),"Expected a number but found null");if("object"==typeof n||"boolean"==typeof n||Array.isArray(n)||"string"==typeof n&&isNaN(n=Number(n)))return eT.handleUnConvertibleValueWithDefault(e,s,n,this.getDefault(r),n+" is not a "+t);let a=this.extractNumber(t,n,s);return null===a?eT.handleUnConvertibleValueWithDefault(e,s,n,this.getDefault(r),n+" is not a "+t):a}static extractNumber(e,t,r){if("number"!=typeof t)return null;switch(e){case c.INTEGER:return this.isInteger(t,r)?Math.floor(t):null;case c.LONG:return this.isLong(t,r)?Math.floor(t):null;case c.DOUBLE:return t;case c.FLOAT:return this.isFloat(t,r)?t:null;default:return null}}static isInteger(e,t){return t!==eE.STRICT?"number"==typeof e:Number.isInteger(e)}static isLong(e,t){return t!==eE.STRICT?"number"==typeof e:Number.isInteger(e)&&e>=Number.MIN_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER}static isFloat(e,t){return t!==eE.STRICT?"number"==typeof e:e>=-Number.MAX_VALUE&&e<=Number.MAX_VALUE}static getDefault(e){return"number"==typeof e.getDefaultValue()?Number(e.getDefaultValue):null}}class eh{static{this.BOOLEAN_MAP={true:!0,t:!0,yes:!0,y:!0,1:!0,false:!1,f:!1,no:!1,n:!1,0:!1}}static convert(e,t,r,s){return null==s?eT.handleUnConvertibleValueWithDefault(e,r,s,this.getDefault(t),"Expected a boolean but found null"):this.getBooleanPrimitive(s)??eT.handleUnConvertibleValueWithDefault(e,r,s,this.getDefault(t),"Unable to convert to boolean")}static getBooleanPrimitive(e){return"boolean"==typeof e?e:"string"==typeof e?this.handleStringValue(e):"number"==typeof e?this.handleNumberValue(e):null}static handleStringValue(e){let t=e.toLowerCase().trim();return eh.BOOLEAN_MAP[t]??null}static handleNumberValue(e){return 0===e||1===e?1===e:null}static getDefault(e){return e.getDefaultValue()??!1}constructor(){}}class eR{static convert(e,t,r,s){return l(s)?s:"string"==typeof s&&"null"===s.toLowerCase()?null:eT.handleUnConvertibleValueWithDefault(e,r,s,null,"Unable to convert to null")}constructor(){}}class em{static handleValidationError(e,t,r,s,n){switch(t=t??eE.STRICT){case eE.STRICT:throw new Q(ef.path(e),n);case eE.LENIENT:return null;case eE.USE_DEFAULT:return s;case eE.SKIP:return r}}constructor(){}}class ep{static async validate(e,t,r,s,n,a,i){return t==c.OBJECT?await ea.validate(e,r,s,n,a,i):t==c.ARRAY?await et.validate(e,r,s,n,a,i):this.handleTypeValidationAndConversion(e,t,r,n,a,i)}static async handleTypeValidationAndConversion(e,t,r,s,n,a){let i=n?this.convertElement(e,t,r,s,a??eE.STRICT):s;return await this.validateElement(e,t,r,i,a??eE.STRICT)}static convertElement(e,t,r,s,n){if(l(t))return eT.handleUnConvertibleValueWithDefault(e,n,s,r.getDefaultValue()??null,H.format("$ is not a valid type for conversion.",t));switch(t){case c.STRING:return ec.convert(e,r,n,s);case c.INTEGER:case c.LONG:case c.DOUBLE:case c.FLOAT:return eg.convert(e,t,r,n,s);case c.BOOLEAN:return eh.convert(e,r,n,s);case c.NULL:return eR.convert(e,r,n,s);default:return eT.handleUnConvertibleValueWithDefault(e,n,s,r.getDefaultValue()??null,H.format("$ is not a valid type for conversion.",t))}}static validateElement(e,t,r,s,n){if(l(t))return em.handleValidationError(e,n,s,r.getDefaultValue()??null,H.format("$ is not a valid type.",t));switch(t){case c.STRING:return eo.validate(e,r,s);case c.INTEGER:case c.LONG:case c.DOUBLE:case c.FLOAT:return en.validate(t,e,r,s);case c.BOOLEAN:return er.validate(e,r,s);case c.NULL:return es.validate(e,r,s);default:return em.handleValidationError(e,n,s,r.getDefaultValue()??null,H.format("$ is not a valid type.",t))}}constructor(){}}class ef{static{this.ORDER={[c.OBJECT]:0,[c.ARRAY]:1,[c.DOUBLE]:2,[c.FLOAT]:3,[c.LONG]:4,[c.INTEGER]:5,[c.STRING]:6,[c.BOOLEAN]:7,[c.NULL]:8}}static path(e){return e?e.map(e=>e.getTitle()??"").filter(e=>!!e).reduce((e,t,r)=>e+(0===r?"":".")+t,""):""}static async validate(e,t,r,s,n,a){if(!t)throw new Q(ef.path(e),"No schema found to validate");if(e||(e=[]),e.push(t),l(s)&&!l(t.getDefaultValue()))return JSON.parse(JSON.stringify(t.getDefaultValue()));if(!l(t.getConstant()))return ef.constantValidation(e,t,s);if(t.getEnums()?.length)return ef.enumCheck(e,t,s);if(t.getFormat()&&l(t.getType()))throw new Q(this.path(e),"Type is missing in schema for declared "+t.getFormat()?.toString()+" format.");if(!0===n&&l(t.getType()))throw new Q(this.path(e),"Type is missing in schema for declared "+a);if(t.getType()&&(s=await ef.typeValidation(e,t,r,s,n,a)),!X.isNullOrBlank(t.getRef()))return await ef.validate(e,await Z.getSchemaFromRef(e[0],r,t.getRef()),r,s,n,a);if((t.getOneOf()||t.getAllOf()||t.getAnyOf())&&(s=await ee.validate(e,t,r,s,n,a)),t.getNot()){let i;try{await ef.validate(e,t.getNot(),r,s,n,a),i=!0}catch(e){i=!1}if(i)throw new Q(ef.path(e),"Schema validated value in not condition.")}return s}static constantValidation(e,t,r){if(!W(t.getConstant(),r))throw new Q(ef.path(e),"Expecting a constant value : "+r);return r}static enumCheck(e,t,r){let s=!1;for(let e of t.getEnums()??[])if(e===r){s=!0;break}if(s)return r;throw new Q(ef.path(e),"Value is not one of "+t.getEnums())}static async typeValidation(e,t,r,s,n,a){let i=Array.from(t.getType()?.getAllowedSchemaTypes()?.values()??[]).sort((e,t)=>(this.ORDER[e]??1/0)-(this.ORDER[t]??1/0)),o=[];for(let E of i)try{return await ep.validate(e,E,t,r,s,n,a)}catch(e){o.push(e)}if(1==o.length)throw new Q(ef.path(e),o[0].message);throw new Q(ef.path(e),"Value "+JSON.stringify(s)+" is not of valid type(s)",o)}}class eN{async validateArguments(e,t,r){let s=new Map;for(let n of Array.from(this.getSignature().getParameters().entries())){let a=n[1];try{let r=await this.validateArgument(e,t,n,a);s.set(r.getT1(),r.getT2())}catch(t){let e=this.getSignature();throw new F(`Error while executing the function ${e.getNamespace()}.${e.getName()}'s parameter ${a.getParameterName()} with step name '${r?.getStatement().getStatementName()??"Unknown Step"}' with error : ${t?.message}`)}}return s}async validateArgument(e,t,r,s){let n,a=r[0],i=e.get(r[0]);if(l(i)&&!s.isVariableArgument())return new q(a,await ef.validate(void 0,s.getSchema(),t,void 0));if(!s?.isVariableArgument())return new q(a,await ef.validate(void 0,s.getSchema(),t,i));Array.isArray(i)?n=i:(n=[],l(i)?l(s.getSchema().getDefaultValue())||n.push(s.getSchema().getDefaultValue()):n.push(i));for(let e=0;e<n.length;e++)n[e]=await ef.validate(void 0,s.getSchema(),t,n[e]);return new q(a,n)}async execute(e){let t=await this.validateArguments(e.getArguments()??new Map,e.getSchemaRepository(),e.getStatementExecution());e.setArguments(t);try{return await this.internalExecute(e)}catch(r){let t=this.getSignature();throw new F(`Error while executing the function ${t.getNamespace()}.${t.getName()} with step name '${e.getStatementExecution()?.getStatement().getStatementName()??"Unknown Step"}' with error : ${r?.message}`)}}getProbableEventSignature(e){return this.getSignature().getEvents()}}class e_ extends eN{static{this.EVENT_INDEX_NAME="index"}static{this.EVENT_RESULT_NAME="result"}static{this.EVENT_INDEX=new G(G.OUTPUT,V.of(e_.EVENT_INDEX_NAME,I.ofInteger(e_.EVENT_INDEX_NAME)))}static{this.EVENT_RESULT_INTEGER=new G(G.OUTPUT,V.of(e_.EVENT_RESULT_NAME,I.ofInteger(e_.EVENT_RESULT_NAME)))}static{this.EVENT_RESULT_BOOLEAN=new G(G.OUTPUT,V.of(e_.EVENT_RESULT_NAME,I.ofBoolean(e_.EVENT_RESULT_NAME)))}static{this.EVENT_RESULT_ARRAY=new G(G.OUTPUT,V.of(e_.EVENT_RESULT_NAME,I.ofArray(e_.EVENT_RESULT_NAME,I.ofAny(e_.EVENT_RESULT_NAME))))}static{this.EVENT_RESULT_EMPTY=new G(G.OUTPUT,V.of())}static{this.EVENT_RESULT_ANY=new G(G.OUTPUT,V.of(this.EVENT_RESULT_NAME,I.ofAny(this.EVENT_RESULT_NAME)))}static{this.EVENT_RESULT_OBJECT=new G(G.OUTPUT,V.of(this.EVENT_RESULT_NAME,I.ofObject(this.EVENT_RESULT_NAME)))}static{this.PARAMETER_INT_LENGTH=U.of("length",I.ofInteger("length").setDefaultValue(-1))}static{this.PARAMETER_ARRAY_FIND=U.of("find",I.ofArray("eachFind",I.ofAny("eachFind")))}static{this.PARAMETER_INT_SOURCE_FROM=U.of("srcFrom",I.ofInteger("srcFrom").setDefaultValue(0).setMinimum(0))}static{this.PARAMETER_INT_SECOND_SOURCE_FROM=U.of("secondSrcFrom",I.ofInteger("secondSrcFrom").setDefaultValue(0))}static{this.PARAMETER_INT_FIND_FROM=U.of("findFrom",I.ofInteger("findFrom").setDefaultValue(0))}static{this.PARAMETER_INT_OFFSET=U.of("offset",I.ofInteger("offset").setDefaultValue(0))}static{this.PARAMETER_ROTATE_LENGTH=U.of("rotateLength",I.ofInteger("rotateLength").setDefaultValue(1).setMinimum(1))}static{this.PARAMETER_BOOLEAN_ASCENDING=U.of("ascending",I.ofBoolean("ascending").setDefaultValue(!0))}static{this.PARAMETER_KEY_PATH=U.of("keyPath",I.ofString("keyPath").setDefaultValue(""))}static{this.PARAMETER_FIND_PRIMITIVE=U.of("findPrimitive",I.of("findPrimitive",c.STRING,c.DOUBLE,c.FLOAT,c.INTEGER,c.LONG))}static{this.PARAMETER_ARRAY_SOURCE=U.of("source",I.ofArray("eachSource",I.ofAny("eachSource")))}static{this.PARAMETER_ARRAY_SECOND_SOURCE=U.of("secondSource",I.ofArray("eachSecondSource",I.ofAny("eachSecondSource")))}static{this.PARAMETER_ARRAY_SOURCE_PRIMITIVE=U.of("source",I.ofArray("eachSource",new I().setName("eachSource").setType(m.of(c.STRING,c.NULL,c.INTEGER,c.FLOAT,c.DOUBLE,c.LONG))))}static{this.PARAMETER_BOOLEAN_DEEP_COPY=U.of("deepCopy",I.ofBoolean("deepCopy").setDefaultValue(!0))}static{this.PARAMETER_ANY=U.of("element",I.ofAny("element"))}static{this.PARAMETER_ANY_ELEMENT_OBJECT=U.of("elementObject",I.ofAny("elementObject"))}static{this.PARAMETER_ANY_VAR_ARGS=U.of("element",I.ofAny("element")).setVariableArgument(!0)}static{this.PARAMETER_ARRAY_RESULT=U.of(e_.EVENT_RESULT_NAME,I.ofArray("eachResult",I.ofAny("eachResult")))}constructor(e,t,r){super();let s=new Map;for(let e of t)s.set(e.getParameterName(),e);this.signature=new Y(e).setNamespace(A.SYSTEM_ARRAY).setParameters(s).setEvents(V.of(r.getName(),r))}getSignature(){return this.signature}}class eM extends e_{constructor(){super("Concatenate",[e_.PARAMETER_ARRAY_SOURCE,e_.PARAMETER_ARRAY_SECOND_SOURCE],e_.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(e_.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(e_.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName());return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,[...t,...r]]]))])}}class eS extends e_{constructor(){super("AddFirst",[e_.PARAMETER_ARRAY_SOURCE,e_.PARAMETER_ANY],e_.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(e_.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(e_.PARAMETER_ANY.getParameterName());if(0==(t=[...t]).length)return t.push(r),new B([$.outputOf(new Map([]))]);t.push(r);let s=t.length-1;for(;s>0;){let e=t[s-1];t[s-1]=t[s],t[s--]=e}return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}let eO="keyName";class ed extends e_{constructor(){super("ArrayToArrayOfObjects",[e_.PARAMETER_ARRAY_SOURCE,U.of(eO,I.ofString(eO),!0)],e_.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(ed.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eO);if(!t?.length)return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,[]]]))]);let s=t.map(e=>{let t={};if(Array.isArray(e))if(r.length)r.forEach((r,s)=>{t[r]=e[s]});else for(let r=0;r<e.length;r++)t[`value${r+1}`]=e[r];else t[r.length?r[0]:"value"]=e;return t});return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,s]]))])}}t({},"PrimitiveUtil",()=>eP),t({},"ExecutionException",()=>ew);class ew extends Error{constructor(e,t){super(e),this.cause=t}getCause(){return this.cause}}class eP{static findPrimitiveNullAsBoolean(e){if(l(e))return new q(c.BOOLEAN,!1);let t=typeof e;if("object"===t)throw new ew(H.format("$ is not a primitive type",e));return"boolean"===t?new q(c.BOOLEAN,e):"string"===t?new q(c.STRING,e):eP.findPrimitiveNumberType(e)}static findPrimitive(e){if(l(e))return new q(c.NULL,void 0);let t=typeof e;if("object"===t)throw new ew(H.format("$ is not a primitive type",e));return"boolean"===t?new q(c.BOOLEAN,e):"string"===t?new q(c.STRING,e):eP.findPrimitiveNumberType(e)}static findPrimitiveNumberType(e){if(l(e)||Array.isArray(e)||"object"==typeof e)throw new ew(H.format("Unable to convert $ to a number.",e));try{if(Number.isInteger(e))return new q(c.LONG,e);return new q(c.DOUBLE,e)}catch(t){throw new ew(H.format("Unable to convert $ to a number.",e),t)}}static compare(e,t){if(e==t)return 0;if(l(e)||l(t))return l(e)?-1:1;if(Array.isArray(e)||Array.isArray(t)){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!=t.length)return e.length-t.length;for(let r=0;r<e.length;r++){let s=this.compare(e[r],t[r]);if(0!=s)return s}return 0}return Array.isArray(e)?-1:1}let r=typeof e,s=typeof t;return"object"===r||"object"===s?("object"===r&&"object"===s&&Object.keys(e).forEach(r=>{let s=this.compare(e[r],t[r]);if(0!=s)return s}),"object"===r?-1:1):this.comparePrimitive(e,t)}static comparePrimitive(e,t){return l(e)||l(t)?l(e)&&l(t)?0:l(e)?-1:1:e==t?0:"boolean"==typeof e||"boolean"==typeof t?e?-1:1:"string"==typeof e||"string"==typeof t?e+""<t+""?-1:1:"number"==typeof e||"number"==typeof t?e-t:0}static baseNumberType(e){return Number.isInteger(e)?c.LONG:c.DOUBLE}static toPrimitiveType(e){return e}constructor(){}}class eI extends e_{constructor(){super("BinarySearch",[eI.PARAMETER_ARRAY_SOURCE_PRIMITIVE,eI.PARAMETER_INT_SOURCE_FROM,eI.PARAMETER_FIND_PRIMITIVE,eI.PARAMETER_INT_LENGTH],eI.EVENT_INDEX)}async internalExecute(e){let t=e?.getArguments()?.get(eI.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eI.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(eI.PARAMETER_FIND_PRIMITIVE.getParameterName()),n=e?.getArguments()?.get(eI.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length||r<0||r>t.length)throw new F("Search source array cannot be empty");if(-1==n&&(n=t.length-r),(n=r+n)>t.length)throw new F("End point for array cannot be more than the size of the source array");let a=-1;for(;r<=n;){let e=Math.floor((r+n)/2);if(0==eP.compare(t[e],s)){a=e;break}eP.compare(t[e],s)>0?n=e-1:r=e+1}return new B([$.outputOf(new Map([[eI.EVENT_INDEX_NAME,a]]))])}}t({},"ArrayUtil",()=>ey);class ey{static removeAListFrom(e,t){if(!t||!e||!e.length||!t.length)return;let r=new Set(t);for(let t=0;t<e.length;t++)r.has(e[t])&&(e.splice(t,1),t--)}static of(...e){let t=Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}constructor(){}}class ex extends e_{constructor(){super("Compare",ey.of(ex.PARAMETER_ARRAY_SOURCE,ex.PARAMETER_INT_SOURCE_FROM,ex.PARAMETER_ARRAY_FIND,ex.PARAMETER_INT_FIND_FROM,ex.PARAMETER_INT_LENGTH),ex.EVENT_RESULT_INTEGER)}async internalExecute(e){var t=e?.getArguments()?.get(ex.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(ex.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(ex.PARAMETER_ARRAY_FIND.getParameterName()),n=e?.getArguments()?.get(ex.PARAMETER_INT_FIND_FROM.getParameterName()),a=e?.getArguments()?.get(ex.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length)throw new F("Compare source array cannot be empty");if(0==s.length)throw new F("Compare find array cannot be empty");if(-1==a&&(a=t.length-r),r+a>t.length)throw new F(H.format("Source array size $ is less than comparing size $",t.length,r+a));if(n+a>s.length)throw new F(H.format("Find array size $ is less than comparing size $",s.length,n+a));return new B(ey.of($.outputOf(V.of(ex.EVENT_RESULT_NAME,this.compare(t,r,r+a,s,n,n+a)))))}compare(e,t,r,s,n,a){if(r<t){let e=t;t=r,r=e}if(a<n){let e=n;n=a,a=e}if(r-t!=a-n)throw new F(H.format("Cannot compare uneven arrays from $ to $ in source array with $ to $ in find array",r,t,a,n));for(let a=t,i=n;a<r;a++,i++){let t=1;if(l(e[a])||l(s[i])){let r=l(e[a]);r==l(s[i])?t=0:r&&(t=-1)}else{let r=typeof e[a],n=typeof s[i];if("object"===r||"object"===n)t=1;else if("string"===r||"string"===n){let r=""+e[a],n=""+s[i];r===n?t=0:r<n&&(t=-1)}else"boolean"===r||"boolean"===n?t=+(r!=n):"number"===r&&"number"===n&&(t=e[a]-s[i])}if(0!=t)return t}return 0}}function eL(e){return e?"function"==typeof globalThis.structuredClone?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e)):e}t({},"duplicate",()=>eL);class eU extends e_{constructor(){super("Copy",[eU.PARAMETER_ARRAY_SOURCE,eU.PARAMETER_INT_SOURCE_FROM,eU.PARAMETER_INT_LENGTH,eU.PARAMETER_BOOLEAN_DEEP_COPY],eU.EVENT_RESULT_ARRAY)}async internalExecute(e){var t=e?.getArguments()?.get(eU.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eU.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(eU.PARAMETER_INT_LENGTH.getParameterName());if(-1==s&&(s=t.length-r),r+s>t.length)throw new F(H.format("Array has no elements from $ to $ as the array size is $",r,r+s,t.length));var n=e?.getArguments()?.get(eU.PARAMETER_BOOLEAN_DEEP_COPY.getParameterName());let a=Array(s);for(let e=r;e<r+s;e++)l(t[e])||(a[e-r]=n?eL(t[e]):t[e]);return new B([$.outputOf(V.of(eU.EVENT_RESULT_NAME,a))])}}class eb extends e_{constructor(){super("Delete",[e_.PARAMETER_ARRAY_SOURCE,e_.PARAMETER_ANY_VAR_ARGS],e_.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(eb.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eb.PARAMETER_ANY_VAR_ARGS.getParameterName());if(null==r)throw new F("The deletable var args are empty. So cannot be proceeded further.");if(0==t.length||0==r.length)throw new F("Expected a source or deletable for an array but not found any");let s=new Set;for(let e=t.length-1;e>=0;e--)for(let n=0;n<r.length;n++)s.has(e)||0!=eP.compare(t[e],r[n])||s.add(t[e]);return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t.filter(e=>!s.has(e))]]))])}}class eV extends e_{constructor(){super("DeleteFirst",[eV.PARAMETER_ARRAY_SOURCE],eV.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(eV.PARAMETER_ARRAY_SOURCE.getParameterName());if(0==t.length)throw new F("Given source array is empty");return(t=[...t]).shift(),new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}class ev extends e_{constructor(){super("DeleteFrom",[ev.PARAMETER_ARRAY_SOURCE,ev.PARAMETER_INT_SOURCE_FROM,ev.PARAMETER_INT_LENGTH],ev.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(ev.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(ev.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(ev.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length)throw new F("There are no elements to be deleted");if(r>=(t=[...t]).length||r<0)throw new F("The int source for the array should be in between 0 and length of the array ");if(-1==s&&(s=t.length-r),r+s>t.length)throw new F("Requested length to be deleted is more than the size of array ");return t.splice(r,s),new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}class eC extends e_{constructor(){super("DeleteLast",[eC.PARAMETER_ARRAY_SOURCE],eC.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(eC.PARAMETER_ARRAY_SOURCE.getParameterName());if(0==t.length)throw new F("Given source array is empty");return(t=[...t]).pop(),new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}class eD extends e_{constructor(){super("Disjoint",[eD.PARAMETER_ARRAY_SOURCE,eD.PARAMETER_INT_SOURCE_FROM,eD.PARAMETER_ARRAY_SECOND_SOURCE,eD.PARAMETER_INT_SECOND_SOURCE_FROM,eD.PARAMETER_INT_LENGTH],eD.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(eD.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eD.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(eD.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),n=e?.getArguments()?.get(eD.PARAMETER_INT_SECOND_SOURCE_FROM.getParameterName()),a=e?.getArguments()?.get(eD.PARAMETER_INT_LENGTH.getParameterName());if(-1==a&&(a=t.length<=s.length?t.length-r:s.length-n),a>t.length||a>s.length||r+a>t.length||n+a>s.length)throw new F("The length which was being requested is more than than the size either source array or second source array");let i=new Set,o=new Set;for(let e=0;e<a;e++)i.add(t[e+r]);for(let e=0;e<a;e++)o.add(s[e+n]);let E=new Set;return i.forEach(e=>{o.has(e)?o.delete(e):E.add(e)}),o.forEach(e=>{i.has(e)||E.add(e)}),new B([$.outputOf(new Map([[eD.EVENT_RESULT_NAME,[...E]]]))])}}class eG extends e_{constructor(){super("Equals",[eG.PARAMETER_ARRAY_SOURCE,eG.PARAMETER_INT_SOURCE_FROM,eG.PARAMETER_ARRAY_FIND,eG.PARAMETER_INT_FIND_FROM,eG.PARAMETER_INT_LENGTH],eG.EVENT_RESULT_BOOLEAN)}async internalExecute(e){let t=new ex,r=(await t.execute(e)).allResults()[0].getResult().get(eG.EVENT_RESULT_NAME);return new B([$.outputOf(V.of(eG.EVENT_RESULT_NAME,0==r))])}}class e$ extends e_{constructor(){super("Fill",[e$.PARAMETER_ARRAY_SOURCE,e$.PARAMETER_INT_SOURCE_FROM,e$.PARAMETER_INT_LENGTH,e$.PARAMETER_ANY],e$.EVENT_RESULT_ARRAY)}async internalExecute(e){var t=e?.getArguments()?.get(e$.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(e$.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(e$.PARAMETER_INT_LENGTH.getParameterName()),n=e?.getArguments()?.get(e$.PARAMETER_ANY.getParameterName());if(r<0)throw new F(H.format("Arrays out of bound trying to access $ index",r));-1==s&&(s=t.length-r);let a=r+s-t.length;if(t=[...t],a>0)for(let e=0;e<a;e++)t.push();for(let e=r;e<r+s;e++)t[e]=l(n)?n:eL(n);return new B([$.outputOf(V.of(e_.EVENT_RESULT_NAME,t))])}}class eF extends e_{constructor(){super("Frequency",[eF.PARAMETER_ARRAY_SOURCE,eF.PARAMETER_ANY,eF.PARAMETER_INT_SOURCE_FROM,eF.PARAMETER_INT_LENGTH],eF.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get(eF.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eF.PARAMETER_ANY.getParameterName()),s=e?.getArguments()?.get(eF.PARAMETER_INT_SOURCE_FROM.getParameterName()),n=e?.getArguments()?.get(eF.PARAMETER_INT_LENGTH.getParameterName());if(0==t.length)return new B([$.outputOf(new Map([[eF.EVENT_RESULT_NAME,0]]))]);if(s>t.length)throw new F("Given start point is more than the size of source");let a=s+n;if(-1==n&&(a=t.length-s),a>t.length)throw new F("Given length is more than the size of source");let i=0;for(let e=s;e<a&&e<t.length;e++)0==eP.compare(t[e],r)&&i++;return new B([$.outputOf(new Map([[eF.EVENT_RESULT_NAME,i]]))])}}class eB extends e_{constructor(){super("IndexOf",[eB.PARAMETER_ARRAY_SOURCE,eB.PARAMETER_ANY_ELEMENT_OBJECT,eB.PARAMETER_INT_FIND_FROM],eB.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get(eB.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eB.PARAMETER_ANY_ELEMENT_OBJECT.getParameterName()),s=e?.getArguments()?.get(eB.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length)return new B([$.outputOf(new Map([[eB.EVENT_RESULT_NAME,-1]]))]);if(s<0||s>t.length)throw new F("The size of the search index of the array is greater than the size of the array");let n=-1;for(let e=s;e<t.length;e++)if(0==eP.compare(t[e],r)){n=e;break}return new B([$.outputOf(new Map([[eB.EVENT_RESULT_NAME,n]]))])}}class eY extends e_{constructor(){super("IndexOfArray",[eY.PARAMETER_ARRAY_SOURCE,eY.PARAMETER_ARRAY_SECOND_SOURCE,eY.PARAMETER_INT_FIND_FROM],eY.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get(eY.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eY.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),s=e?.getArguments()?.get(eY.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length||0==r.length)return new B([$.outputOf(new Map([[eY.EVENT_RESULT_NAME,-1]]))]);if(s<0||s>t.length||t.length<r.length)throw new F("Given from second source is more than the size of the source array");let n=r.length,a=-1;for(let e=s;e<t.length;e++){let s=0;if(0==eP.compare(t[e],r[s])){for(;s<n&&0==eP.compare(t[e+s],r[s]);)s++;if(s==n){a=e;break}}}return new B([$.outputOf(new Map([[eY.EVENT_RESULT_NAME,a]]))])}}class eH extends e_{constructor(){super("LastIndexOf",[eH.PARAMETER_ARRAY_SOURCE,eH.PARAMETER_ANY_ELEMENT_OBJECT,eH.PARAMETER_INT_FIND_FROM],eH.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get(eH.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eH.PARAMETER_ANY_ELEMENT_OBJECT.getParameterName()),s=e?.getArguments()?.get(eH.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length)return new B([$.outputOf(new Map([[eH.EVENT_RESULT_NAME,-1]]))]);if(s<0||s>t.length)throw new F("The value of length shouldn't the exceed the size of the array or shouldn't be in terms");let n=-1;for(let e=t.length-1;e>=s;e--)if(0==eP.compare(t[e],r)){n=e;break}return new B([$.outputOf(new Map([[eH.EVENT_RESULT_NAME,n]]))])}}class ek extends e_{constructor(){super("LastIndexOfArray",[ek.PARAMETER_ARRAY_SOURCE,ek.PARAMETER_ARRAY_SECOND_SOURCE,ek.PARAMETER_INT_FIND_FROM],ek.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get(ek.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(ek.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),s=e?.getArguments()?.get(ek.PARAMETER_INT_FIND_FROM.getParameterName());if(0==t.length)return new B([$.outputOf(new Map([[ek.EVENT_RESULT_NAME,-1]]))]);if(s<0||s>t.length||r.length>t.length)throw new F("Given from index is more than the size of the source array");let n=r.length,a=-1;for(let e=s;e<t.length;e++){let s=0;if(0==eP.compare(t[e],r[s])){for(;s<n&&0==eP.compare(t[e+s],r[s]);)s++;s==n&&(a=e)}}return new B([$.outputOf(new Map([[ek.EVENT_RESULT_NAME,a]]))])}}class ej extends e_{constructor(){super("Max",[ej.PARAMETER_ARRAY_SOURCE_PRIMITIVE],ej.EVENT_RESULT_ANY)}async internalExecute(e){let t=e?.getArguments()?.get(ej.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName());if(0==t.length)throw new F("Search source array cannot be empty");let r=t[0];for(let e=1;e<t.length;e++){let s=t[e];eP.comparePrimitive(r,s)>=0||(r=s)}return new B([$.outputOf(new Map([[ej.EVENT_RESULT_NAME,r]]))])}}class eW extends e_{constructor(){super("Min",[eW.PARAMETER_ARRAY_SOURCE_PRIMITIVE],eW.EVENT_RESULT_ANY)}async internalExecute(e){let t,r=e?.getArguments()?.get(eW.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName());if(0==r.length)throw new F("Search source array cannot be empty");for(let e=0;e<r.length;e++)!l(r[e])&&(void 0===t||0>eP.comparePrimitive(r[e],t))&&(t=r[e]);return new B([$.outputOf(new Map([[eW.EVENT_RESULT_NAME,t]]))])}}class eX extends e_{constructor(){super("MisMatch",[eX.PARAMETER_ARRAY_SOURCE,eX.PARAMETER_INT_FIND_FROM,eX.PARAMETER_ARRAY_SECOND_SOURCE,eX.PARAMETER_INT_SECOND_SOURCE_FROM,eX.PARAMETER_INT_LENGTH],eX.EVENT_RESULT_INTEGER)}async internalExecute(e){let t=e?.getArguments()?.get(eX.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eX.PARAMETER_INT_FIND_FROM.getParameterName()),s=e?.getArguments()?.get(eX.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName()),n=e?.getArguments()?.get(eX.PARAMETER_INT_SECOND_SOURCE_FROM.getParameterName()),a=e?.getArguments()?.get(eX.PARAMETER_INT_LENGTH.getParameterName()),i=r<t.length&&r>0?r:0,o=n<s.length&&n>0?n:0;if(i+a>=t.length||o+a>s.length)throw new F("The size of the array for first and second which was being requested is more than size of the given array");let E=-1;for(let e=0;e<a;e++)if(t[i+e]!=s[o+e]){E=e;break}return new B([$.outputOf(new Map([[eX.EVENT_RESULT_NAME,E]]))])}}class eJ extends e_{constructor(){super("Reverse",[eJ.PARAMETER_ARRAY_SOURCE,eJ.PARAMETER_INT_SOURCE_FROM,eJ.PARAMETER_INT_LENGTH],eJ.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(eJ.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eJ.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(eJ.PARAMETER_INT_LENGTH.getParameterName());if(-1==s&&(s=t.length-r),s>=t.length||s<0||r<0)throw new F("Please provide start point between the start and end indexes or provide the length which was less than the source size ");t=[...t];let n=r+s-1;for(;r<=n;){let e=t[r],s=t[n];t[r++]=s,t[n--]=e}return new B([$.outputOf(new Map([[eJ.EVENT_RESULT_NAME,t]]))])}}class eq extends e_{constructor(){super("Rotate",[eq.PARAMETER_ARRAY_SOURCE,eq.PARAMETER_ROTATE_LENGTH],eq.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(eq.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(eq.PARAMETER_ROTATE_LENGTH.getParameterName());if(0==t.length)return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))]);let s=(t=[...t]).length;return r%=s,this.rotate(t,0,r-1),this.rotate(t,r,s-1),this.rotate(t,0,s-1),new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}rotate(e,t,r){for(;t<r;){let s=e[t];e[t++]=e[r],e[r--]=s}}}class eK extends e_{constructor(){super("Shuffle",[eK.PARAMETER_ARRAY_SOURCE],eK.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(eK.PARAMETER_ARRAY_SOURCE.getParameterName());if(t.length<=1)return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))]);let r=0,s=(t=[...t]).length;for(let e=0;e<s;e++){let e=Math.floor(Math.random()*s)%s,n=t[r];t[r]=t[e],t[e]=n,r=e}return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}t({},"ObjectValueSetterExtractor",()=>e7),t({},"Expression",()=>e2),t({},"StringBuilder",()=>ez);class ez{constructor(e){this.str=e??""}append(e){return this.str+=e,this}toString(){return""+this.str}trim(){return this.str=this.str.trim(),this}setLength(e){return this.str=this.str.substring(0,e),this}length(){return this.str.length}charAt(e){return this.str.charAt(e)}deleteCharAt(e){return this.checkIndex(e),this.str=this.str.substring(0,e)+this.str.substring(e+1),this}insert(e,t){return this.str=this.str.substring(0,e)+t+this.str.substring(e),this}checkIndex(e){if(e>=this.str.length)throw new F(`Index ${e} is greater than or equal to ${this.str.length}`)}substring(e,t){return this.str.substring(e,t)}}t({},"ExpressionEvaluationException",()=>eQ);class eQ extends Error{constructor(e,t,r){super(H.format("$ : $",e,t)),this.cause=r}getCause(){return this.cause}}t({},"ExpressionToken",()=>eZ);class eZ{constructor(e){this.expression=e}getExpression(){return this.expression}toString(){return this.expression}}t({},"ExpressionTokenValue",()=>e0);class e0 extends eZ{constructor(e,t){super(e),this.element=t}getTokenValue(){return this.element}getElement(){return this.element}toString(){return H.format("$: $",this.expression,this.element)}}t({},"Operation",()=>e1);class e1{static{this.MULTIPLICATION=new e1("*")}static{this.DIVISION=new e1("/")}static{this.INTEGER_DIVISION=new e1("//")}static{this.MOD=new e1("%")}static{this.ADDITION=new e1("+")}static{this.SUBTRACTION=new e1("-")}static{this.NOT=new e1("not",void 0,!0)}static{this.AND=new e1("and",void 0,!0)}static{this.OR=new e1("or",void 0,!0)}static{this.LESS_THAN=new e1("<")}static{this.LESS_THAN_EQUAL=new e1("<=")}static{this.GREATER_THAN=new e1(">")}static{this.GREATER_THAN_EQUAL=new e1(">=")}static{this.EQUAL=new e1("=")}static{this.NOT_EQUAL=new e1("!=")}static{this.BITWISE_AND=new e1("&")}static{this.BITWISE_OR=new e1("|")}static{this.BITWISE_XOR=new e1("^")}static{this.BITWISE_COMPLEMENT=new e1("~")}static{this.BITWISE_LEFT_SHIFT=new e1("<<")}static{this.BITWISE_RIGHT_SHIFT=new e1(">>")}static{this.BITWISE_UNSIGNED_RIGHT_SHIFT=new e1(">>>")}static{this.UNARY_PLUS=new e1("UN: +","+")}static{this.UNARY_MINUS=new e1("UN: -","-")}static{this.UNARY_LOGICAL_NOT=new e1("UN: not","not")}static{this.UNARY_BITWISE_COMPLEMENT=new e1("UN: ~","~")}static{this.ARRAY_OPERATOR=new e1("[")}static{this.ARRAY_RANGE_INDEX_OPERATOR=new e1("..")}static{this.OBJECT_OPERATOR=new e1(".")}static{this.NULLISH_COALESCING_OPERATOR=new e1("??")}static{this.CONDITIONAL_TERNARY_OPERATOR=new e1("?")}static{this.VALUE_OF=new Map([["MULTIPLICATION",e1.MULTIPLICATION],["DIVISION",e1.DIVISION],["INTEGER_DIVISION",e1.INTEGER_DIVISION],["MOD",e1.MOD],["ADDITION",e1.ADDITION],["SUBTRACTION",e1.SUBTRACTION],["NOT",e1.NOT],["AND",e1.AND],["OR",e1.OR],["LESS_THAN",e1.LESS_THAN],["LESS_THAN_EQUAL",e1.LESS_THAN_EQUAL],["GREATER_THAN",e1.GREATER_THAN],["GREATER_THAN_EQUAL",e1.GREATER_THAN_EQUAL],["EQUAL",e1.EQUAL],["NOT_EQUAL",e1.NOT_EQUAL],["BITWISE_AND",e1.BITWISE_AND],["BITWISE_OR",e1.BITWISE_OR],["BITWISE_XOR",e1.BITWISE_XOR],["BITWISE_COMPLEMENT",e1.BITWISE_COMPLEMENT],["BITWISE_LEFT_SHIFT",e1.BITWISE_LEFT_SHIFT],["BITWISE_RIGHT_SHIFT",e1.BITWISE_RIGHT_SHIFT],["BITWISE_UNSIGNED_RIGHT_SHIFT",e1.BITWISE_UNSIGNED_RIGHT_SHIFT],["UNARY_PLUS",e1.UNARY_PLUS],["UNARY_MINUS",e1.UNARY_MINUS],["UNARY_LOGICAL_NOT",e1.UNARY_LOGICAL_NOT],["UNARY_BITWISE_COMPLEMENT",e1.UNARY_BITWISE_COMPLEMENT],["ARRAY_OPERATOR",e1.ARRAY_OPERATOR],["ARRAY_RANGE_INDEX_OPERATOR",e1.ARRAY_RANGE_INDEX_OPERATOR],["OBJECT_OPERATOR",e1.OBJECT_OPERATOR],["NULLISH_COALESCING_OPERATOR",e1.NULLISH_COALESCING_OPERATOR],["CONDITIONAL_TERNARY_OPERATOR",e1.CONDITIONAL_TERNARY_OPERATOR]])}static{this.UNARY_OPERATORS=new Set([e1.ADDITION,e1.SUBTRACTION,e1.NOT,e1.BITWISE_COMPLEMENT,e1.UNARY_PLUS,e1.UNARY_MINUS,e1.UNARY_LOGICAL_NOT,e1.UNARY_BITWISE_COMPLEMENT])}static{this.ARITHMETIC_OPERATORS=new Set([e1.MULTIPLICATION,e1.DIVISION,e1.INTEGER_DIVISION,e1.MOD,e1.ADDITION,e1.SUBTRACTION])}static{this.LOGICAL_OPERATORS=new Set([e1.NOT,e1.AND,e1.OR,e1.LESS_THAN,e1.LESS_THAN_EQUAL,e1.GREATER_THAN,e1.GREATER_THAN_EQUAL,e1.EQUAL,e1.NOT_EQUAL,e1.NULLISH_COALESCING_OPERATOR])}static{this.BITWISE_OPERATORS=new Set([e1.BITWISE_AND,e1.BITWISE_COMPLEMENT,e1.BITWISE_LEFT_SHIFT,e1.BITWISE_OR,e1.BITWISE_RIGHT_SHIFT,e1.BITWISE_UNSIGNED_RIGHT_SHIFT,e1.BITWISE_XOR])}static{this.CONDITIONAL_OPERATORS=new Set([e1.CONDITIONAL_TERNARY_OPERATOR])}static{this.OPERATOR_PRIORITY=new Map([[e1.UNARY_PLUS,1],[e1.UNARY_MINUS,1],[e1.UNARY_LOGICAL_NOT,1],[e1.UNARY_BITWISE_COMPLEMENT,1],[e1.ARRAY_OPERATOR,1],[e1.OBJECT_OPERATOR,1],[e1.ARRAY_RANGE_INDEX_OPERATOR,2],[e1.MULTIPLICATION,2],[e1.DIVISION,2],[e1.INTEGER_DIVISION,2],[e1.MOD,2],[e1.ADDITION,3],[e1.SUBTRACTION,3],[e1.BITWISE_LEFT_SHIFT,4],[e1.BITWISE_RIGHT_SHIFT,4],[e1.BITWISE_UNSIGNED_RIGHT_SHIFT,4],[e1.LESS_THAN,5],[e1.LESS_THAN_EQUAL,5],[e1.GREATER_THAN,5],[e1.GREATER_THAN_EQUAL,5],[e1.EQUAL,6],[e1.NOT_EQUAL,6],[e1.BITWISE_AND,7],[e1.BITWISE_XOR,8],[e1.BITWISE_OR,9],[e1.AND,10],[e1.OR,11],[e1.NULLISH_COALESCING_OPERATOR,11],[e1.CONDITIONAL_TERNARY_OPERATOR,12]])}static{this.OPERATORS=new Set([...Array.from(e1.ARITHMETIC_OPERATORS),...Array.from(e1.LOGICAL_OPERATORS),...Array.from(e1.BITWISE_OPERATORS),e1.ARRAY_OPERATOR,e1.ARRAY_RANGE_INDEX_OPERATOR,e1.OBJECT_OPERATOR,...Array.from(e1.CONDITIONAL_OPERATORS)].map(e=>e.getOperator()))}static{this.OPERATORS_WITHOUT_SPACE_WRAP=new Set([...Array.from(e1.ARITHMETIC_OPERATORS),...Array.from(e1.LOGICAL_OPERATORS),...Array.from(e1.BITWISE_OPERATORS),e1.ARRAY_OPERATOR,e1.ARRAY_RANGE_INDEX_OPERATOR,e1.OBJECT_OPERATOR,...Array.from(e1.CONDITIONAL_OPERATORS)].filter(e=>!e.shouldBeWrappedInSpace()).map(e=>e.getOperator()))}static{this.OPERATION_VALUE_OF=new Map(Array.from(e1.VALUE_OF.entries()).map(([e,t])=>[t.getOperator(),t]))}static{this.UNARY_MAP=new Map([[e1.ADDITION,e1.UNARY_PLUS],[e1.SUBTRACTION,e1.UNARY_MINUS],[e1.NOT,e1.UNARY_LOGICAL_NOT],[e1.BITWISE_COMPLEMENT,e1.UNARY_BITWISE_COMPLEMENT],[e1.UNARY_PLUS,e1.UNARY_PLUS],[e1.UNARY_MINUS,e1.UNARY_MINUS],[e1.UNARY_LOGICAL_NOT,e1.UNARY_LOGICAL_NOT],[e1.UNARY_BITWISE_COMPLEMENT,e1.UNARY_BITWISE_COMPLEMENT]])}static{this.BIGGEST_OPERATOR_SIZE=Array.from(e1.VALUE_OF.values()).map(e=>e.getOperator()).filter(e=>!e.startsWith("UN: ")).map(e=>e.length).reduce((e,t)=>e>t?e:t,0)}constructor(e,t,r=!1){this.operator=e,this.operatorName=t??e,this._shouldBeWrappedInSpace=r}getOperator(){return this.operator}getOperatorName(){return this.operatorName}shouldBeWrappedInSpace(){return this._shouldBeWrappedInSpace}valueOf(e){return e1.VALUE_OF.get(e)}toString(){return this.operator}}class e2 extends eZ{constructor(e,t,r,s){super(e||""),this.tokens=new k,this.ops=new k,s?.getOperator()==".."&&(t?r||(r=new e0("","")):t=new e0("","")),t&&this.tokens.push(t),r&&this.tokens.push(r),s&&this.ops.push(s),this.evaluate(),this.ops.isEmpty()||".."!=this.ops.peekLast().getOperator()||1!=this.tokens.length||this.tokens.push(new eZ(""))}getTokens(){return this.tokens}getOperations(){return this.ops}evaluate(){let e,t=this.expression.length,r="",s=new ez(""),n=0,a=!1;for(;n<t;){switch(r=this.expression[n],e=s.toString(),r){case" ":a=this.processTokenSepearator(s,e,a);break;case"(":n=this.processSubExpression(t,s,e,n,a),a=!1;break;case")":throw new eQ(this.expression,"Extra closing parenthesis found");case"]":throw new eQ(this.expression,"Extra closing square bracket found");case"'":case'"':{let e=this.processStringLiteral(t,r,n);n=e.getT1(),a=e.getT2();break}case"?":if(n+1<t&&"?"!=this.expression.charAt(n+1)&&0!=n&&"?"!=this.expression.charAt(n-1))n=this.processTernaryOperator(t,s,e,n,a);else{let i=this.processOthers(r,t,s,e,n,a);n=i.getT1(),(a=i.getT2())&&this.ops.peek()==e1.ARRAY_OPERATOR&&(n=(i=this.process(t,s,n)).getT1(),a=i.getT2())}break;default:let i=this.processOthers(r,t,s,e,n,a);n=i.getT1(),(a=i.getT2())&&this.ops.peek()==e1.ARRAY_OPERATOR&&(n=(i=this.process(t,s,n)).getT1(),a=i.getT2())}++n}if(e=s.toString(),!X.isNullOrBlank(e))if(e1.OPERATORS.has(e))throw new eQ(this.expression,"Expression is ending with an operator");else this.tokens.push(new eZ(e))}processStringLiteral(e,t,r){let s="",n=r+1;for(;n<e;n++){let e=this.expression.charAt(n);if(e==t&&"\\"!=this.expression.charAt(n-1))break;s+=e}if(n==e&&this.expression.charAt(n-1)!=t)throw new eQ(this.expression,"Missing string ending marker "+t);let a=new q(n,!1);return this.tokens.push(new e0(s,s)),a}process(e,t,r){let s=1;for(++r;r<e&&0!=s;){let e=this.expression.charAt(r);"]"==e?--s:"["==e&&++s,0!=s&&(t.append(e),r++)}return this.tokens.push(new e2(t.toString())),t.setLength(0),new q(r,!1)}processOthers(e,t,r,s,n,a){let i=t-n;i=i<e1.BIGGEST_OPERATOR_SIZE?i:e1.BIGGEST_OPERATOR_SIZE;for(let e=i;e>0;e--){let t=this.expression.substring(n,n+e);if(e1.OPERATORS_WITHOUT_SPACE_WRAP.has(t))return X.isNullOrBlank(s)?".."==t&&this.tokens.isEmpty()&&(this.tokens.push(new eZ("0")),a=!1):(this.tokens.push(new eZ(s)),a=!1),this.checkUnaryOperator(this.tokens,this.ops,e1.OPERATION_VALUE_OF.get(t),a),a=!0,r.setLength(0),new q(n+e-1,a)}return r.append(e),new q(n,!1)}processTernaryOperator(e,t,r,s,n){if(n)throw new eQ(this.expression,"Ternary operator is followed by an operator");""!=r.trim()&&(this.tokens.push(new e2(r)),t.setLength(0));let a=1,i="",o=++s;for(;s<e&&a>0;)"?"==(i=this.expression.charAt(s))?++a:":"==i&&--a,++s;if(":"!=i)throw new eQ(this.expression,"':' operater is missing");if(s>=e)throw new eQ(this.expression,"Third part of the ternary expression is missing");for(;!this.ops.isEmpty()&&this.hasPrecedence(e1.CONDITIONAL_TERNARY_OPERATOR,this.ops.peek());){let e=this.ops.pop();if(e1.UNARY_OPERATORS.has(e)){let t=this.tokens.pop();this.tokens.push(new e2("",t,void 0,e))}else{let t=this.tokens.pop(),r=this.tokens.pop();this.tokens.push(new e2("",r,t,e))}}this.ops.push(e1.CONDITIONAL_TERNARY_OPERATOR),this.tokens.push(new e2(this.expression.substring(o,s-1)));let E=this.expression.substring(s);if(""===E.trim())throw new eQ(this.expression,"Third part of the ternary expression is missing");return this.tokens.push(new e2(E)),e-1}processSubExpression(e,t,r,s,n){if(e1.OPERATORS.has(r))this.checkUnaryOperator(this.tokens,this.ops,e1.OPERATION_VALUE_OF.get(r),n),t.setLength(0);else if(!X.isNullOrBlank(r))throw new eQ(this.expression,H.format("Unkown token : $ found.",r));let a=1,i=new ez,o=this.expression.charAt(s);for(s++;s<e&&a>0;)"("==(o=this.expression.charAt(s))?a++:")"==o&&a--,0!=a&&(i.append(o),s++);if(")"!=o)throw new eQ(this.expression,"Missing a closed parenthesis");for(;i.length()>2&&"("==i.charAt(0)&&")"==i.charAt(i.length()-1);)i.deleteCharAt(0),i.setLength(i.length()-1);return this.tokens.push(new e2(i.toString().trim())),s}processTokenSepearator(e,t,r){return X.isNullOrBlank(t)||(e1.OPERATORS.has(t)?(this.checkUnaryOperator(this.tokens,this.ops,e1.OPERATION_VALUE_OF.get(t),r),r=!0):(this.tokens.push(new eZ(t)),r=!1)),e.setLength(0),r}checkUnaryOperator(e,t,r,s){if(r)if(s||e.isEmpty())if(e1.UNARY_OPERATORS.has(r)){let e=e1.UNARY_MAP.get(r);e&&t.push(e)}else throw new eQ(this.expression,H.format("Extra operator $ found.",r));else{for(;!t.isEmpty()&&this.hasPrecedence(r,t.peek());){let r=t.pop();if(e1.UNARY_OPERATORS.has(r)){let t=e.pop();e.push(new e2("",t,void 0,r))}else{let t=e.pop(),s=e.pop();e.push(new e2("",s,t,r))}}t.push(r)}}hasPrecedence(e,t){let r=e1.OPERATOR_PRIORITY.get(e),s=e1.OPERATOR_PRIORITY.get(t);if(!r||!s)throw Error("Unknown operators provided");return s<r}toString(){if(this.ops.isEmpty())return 1==this.tokens.size()?this.tokens.get(0).toString():"Error: No tokens";let e=new ez,t=0,r=this.ops.toArray(),s=this.tokens.toArray();for(let n=0;n<r.length;n++)if(r[n].getOperator().startsWith("UN: "))e.append("(").append(r[n].getOperator().substring(4)).append(s[t]instanceof e2?s[t].toString():s[t]).append(")"),t++;else if(r[n]==e1.CONDITIONAL_TERNARY_OPERATOR){let r=s[t++];e.insert(0,(r instanceof e2,r.toString())),e.insert(0,":"),r=s[t++],e.insert(0,(r instanceof e2,r.toString())),e.insert(0,"?"),r=s[t++],e.insert(0,(r instanceof e2,r.toString())).append(")"),e.insert(0,"(")}else{if(0==t){let r=s[t++];e.insert(0,(r instanceof e2,r.toString()))}let a=s[t++];e.insert(0,r[n].getOperator()).insert(0,a instanceof e2?a.toString():a?.toString()).insert(0,"(").append(")")}return e.toString()}equals(e){return this.expression==e.expression}}t({},"TokenValueExtractor",()=>e5);class e5{static{this.REGEX_SQUARE_BRACKETS=/[\[\]]/}static{this.REGEX_DOT=/(?<!\.)\.(?!\.)/}getValue(e){let t=this.getPrefix();if(!e.startsWith(t))throw new F(H.format("Token $ doesn't start with $",e,t));if(e.endsWith(".__index")){let t=e.substring(0,e.length-8),r=this.getValueInternal(t);if(!l(r?.__index))return r.__index;if(!t.endsWith("]"))return t.substring(t.lastIndexOf(".")+1);{let e=t.substring(t.lastIndexOf("[")+1,t.length-1),r=parseInt(e);return isNaN(r)?e:r}}return this.getValueInternal(e)}retrieveElementFrom(e,t,r,s){if(l(s))return;if(t.length==r)return s;let n=t[r].split(e5.REGEX_SQUARE_BRACKETS).map(e=>e.trim()).filter(e=>!X.isNullOrBlank(e)).reduce((s,n)=>this.resolveForEachPartOfTokenWithBrackets(e,t,r,n,s),s);return this.retrieveElementFrom(e,t,r+1,n)}resolveForEachPartOfTokenWithBrackets(e,t,r,s,n){if(!l(n))return"length"===s?this.getLength(e,n):"string"==typeof n||Array.isArray(n)?this.handleArrayAccess(e,s,n):this.handleObjectAccess(e,t,r,s,n)}getLength(e,t){let r=typeof t;if("string"===r||Array.isArray(t))return t.length;if("object"===r)if("length"in t)return t.length;else return Object.keys(t).length;throw new eQ(e,H.format("Length can't be found in token $",e))}handleArrayAccess(e,t,r){let s=t.indexOf("..");if(s>=0){let e=t.substring(0,s),n=t.substring(s+2),a=0==e.length?0:parseInt(e),i=0==n.length?r.length:parseInt(n);if(isNaN(a)||isNaN(i))return;for(;a<0;)a+=r.length;for(;i<0;)i+=r.length;let o=typeof r;return a>=i?"string"==o?"":[]:"string"==o?r.substring(a,i):r.slice(a,i)}let n=parseInt(t);if(isNaN(n))throw new eQ(e,H.format("$ is not a number",t));for(;n<0;)n=r.length+n;if(!(n>=r.length))return r[n]}handleObjectAccess(e,t,r,s,n){if(s.startsWith('"')){if(!s.endsWith('"')||1==s.length||2==s.length)throw new eQ(e,H.format("$ is missing a double quote or empty key found",e));s=s.substring(1,t.length-2)}return this.checkIfObject(e,t,r,n),n[s]}checkIfObject(e,t,r,s){let n=typeof s;if("object"!=n&&"string"!=n||Array.isArray(s))throw new eQ(e,H.format("Unable to retrieve $ from $ in the path $",t[r],s.toString(),e))}}class e7 extends e5{constructor(e,t){super(),this.store=e,this.prefix=t}getValueInternal(e){let t=e.split(e5.REGEX_DOT);return this.retrieveElementFrom(e,t,1,this.store)}getStore(){return this.store}setStore(e){return this.store=e,this}setValue(e,t,r=!0,s=!1){this.store=eL(this.store),this.modifyStore(e,t,r,s)}modifyStore(e,t,r,s){let n=new e2(e),a=n.getTokens();a.removeLast();let i=n.getOperations(),o=i.removeLast(),E=a.removeLast(),u=E instanceof e0?E.getElement():E.getExpression(),A=this.store;for(;!i.isEmpty();)A=o==e1.OBJECT_OPERATOR?this.getDataFromObject(A,u,i.peekLast()):this.getDataFromArray(A,u,i.peekLast()),o=i.removeLast(),u=(E=a.removeLast())instanceof e0?E.getElement():E.getExpression();o==e1.OBJECT_OPERATOR?this.putDataInObject(A,u,t,r,s):this.putDataInArray(A,u,t,r,s)}getDataFromArray(e,t,r){if(!Array.isArray(e))throw new F(H.format("Expected an array but found $",e));let s=parseInt(t);if(isNaN(s))throw new F(H.format("Expected an array index but found $",t));if(s<0)throw new F(H.format("Array index is out of bound - $",t));let n=e[s];return l(n)&&(n=r==e1.OBJECT_OPERATOR?{}:[],e[s]=n),n}getDataFromObject(e,t,r){if(Array.isArray(e)||"object"!=typeof e)throw new F(H.format("Expected an object but found $",e));let s=e[t];return l(s)&&(s=r==e1.OBJECT_OPERATOR?{}:[],e[t]=s),s}putDataInArray(e,t,r,s,n){if(!Array.isArray(e))throw new F(H.format("Expected an array but found $",e));let a=parseInt(t);if(isNaN(a))throw new F(H.format("Expected an array index but found $",t));if(a<0)throw new F(H.format("Array index is out of bound - $",t));(s||l(e[a]))&&(n&&l(r)?e.splice(a,1):e[a]=r)}putDataInObject(e,t,r,s,n){if(Array.isArray(e)||"object"!=typeof e)throw new F(H.format("Expected an object but found $",e));(s||l(e[t]))&&(n&&l(r)?delete e[t]:e[t]=r)}getPrefix(){return this.prefix}}class e4 extends e_{constructor(){super("Sort",[e4.PARAMETER_ARRAY_SOURCE,e4.PARAMETER_INT_FIND_FROM,e4.PARAMETER_INT_LENGTH,e4.PARAMETER_BOOLEAN_ASCENDING,e4.PARAMETER_KEY_PATH],e4.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(e4.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(e4.PARAMETER_INT_FIND_FROM.getParameterName()),s=e?.getArguments()?.get(e4.PARAMETER_INT_LENGTH.getParameterName()),n=e?.getArguments()?.get(e4.PARAMETER_BOOLEAN_ASCENDING.getParameterName()),a=e?.getArguments()?.get(e4.PARAMETER_KEY_PATH.getParameterName());if(0==t.length)return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))]);if(t=[...t],-1==s&&(s=t.length-r),r<0||r>=t.length||r+s>t.length)throw new F("Given start point is more than the size of the array or not available at that point");let i=t.slice(r,r+s+1),o=new e7({},"Data.");return i.sort((e,t)=>"object"==typeof e&&"object"==typeof t&&a.length?(o.setStore({a:e,b:t}),e9(o.getValue("Data.a."+a),o.getValue("Data.b."+a),n)):e9(e,t,n)),t.splice(r,s,...i),new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}function e9(e,t,r){return e===t?0:null===e?1:null===t?-1:r?e<t?-1:1:e<t?1:-1}class e6 extends e_{constructor(){super("SubArray",[e6.PARAMETER_ARRAY_SOURCE,e6.PARAMETER_INT_FIND_FROM,e6.PARAMETER_INT_LENGTH],e6.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(e6.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(e6.PARAMETER_INT_FIND_FROM.getParameterName()),s=e?.getArguments()?.get(e6.PARAMETER_INT_LENGTH.getParameterName());if(-1==s&&(s=t.length-r),s<=0)return new B([$.outputOf(new Map([]))]);if(!(r>=0&&r<t.length)||r+s>t.length)throw new F("Given find from point is more than the source size array or the Requested length for the subarray was more than the source size");let n=t.slice(r,r+s);return new B([$.outputOf(new Map([[e6.EVENT_RESULT_NAME,n]]))])}}class e3 extends e_{constructor(){super("Insert",[e3.PARAMETER_ARRAY_SOURCE,e3.PARAMETER_INT_OFFSET,e3.PARAMETER_ANY],e3.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(e3.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(e3.PARAMETER_INT_OFFSET.getParameterName());var s=e?.getArguments()?.get(e3.PARAMETER_ANY.getParameterName());if(l(s)||l(r)||r>t.length)throw new F("Please valid resouces to insert at the correct location");if(0==(t=[...t]).length)return 0==r&&t.push(s),new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))]);t.push(s);let n=t.length-1;for(r++;n>=r;){let e=t[n-1];t[n-1]=t[n],t[n--]=e}return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}class e8 extends e_{constructor(){super("InsertLast",[e8.PARAMETER_ARRAY_SOURCE,e8.PARAMETER_ANY],e8.EVENT_RESULT_ARRAY)}async internalExecute(e){let t=e?.getArguments()?.get(e8.PARAMETER_ARRAY_SOURCE.getParameterName());var r=e?.getArguments()?.get(e8.PARAMETER_ANY.getParameterName());return(t=[...t]).push(r),new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,t]]))])}}class te extends e_{constructor(){super("RemoveDuplicates",[te.PARAMETER_ARRAY_SOURCE,te.PARAMETER_INT_SOURCE_FROM,te.PARAMETER_INT_LENGTH],te.EVENT_RESULT_ARRAY)}async internalExecute(e){var t=e?.getArguments()?.get(te.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(te.PARAMETER_INT_SOURCE_FROM.getParameterName()),s=e?.getArguments()?.get(te.PARAMETER_INT_LENGTH.getParameterName());if(-1==s&&(s=t.length-r),r+s>t.length)throw new F(H.format("Array has no elements from $ to $ as the array size is $",r,r+s,t.length));let n=[...t],a=r+s;for(let e=a-1;e>=r;e--)for(let t=e-1;t>=r;t--)if(W(n[e],n[t])){n.splice(e,1);break}return new B([$.outputOf(V.of(te.EVENT_RESULT_NAME,n))])}}let tt="keyPath",tr="valuePath",ts="ignoreNullValues",tn="ignoreNullKeys",ta="ignoreDuplicateKeys";class ti extends e_{constructor(){super("ArrayToObjects",[e_.PARAMETER_ARRAY_SOURCE,U.of(tt,I.ofString(tt)),U.of(tr,I.of(tr,c.STRING,c.NULL)),U.of(ts,I.ofBoolean(ts).setDefaultValue(!1)),U.of(tn,I.ofBoolean(tn).setDefaultValue(!0)),U.of(ta,I.ofBoolean(ta).setDefaultValue(!1))],e_.EVENT_RESULT_ANY)}async internalExecute(e){let t=e?.getArguments()?.get(e_.PARAMETER_ARRAY_SOURCE.getParameterName()),r=e?.getArguments()?.get(tt),s=e?.getArguments()?.get(tr)??"",n=e?.getArguments()?.get(ts),a=e?.getArguments()?.get(tn),i=e?.getArguments()?.get(ta),o=new e7({},"Data."),E=t.filter(e=>!l(e)).reduce((e,t)=>{o.setStore(t);let E=o.getValue("Data."+r);if(a&&l(E))return e;let u=s?o.getValue("Data."+s):t;return n&&l(u)||i&&e.hasOwnProperty(E)||(e[E]=u),e},{});return new B([$.outputOf(new Map([[e_.EVENT_RESULT_NAME,E]]))])}}let to="source",tE="delimiter",tu="result";class tA extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get(to),r=e?.getArguments()?.get(tE);return new B([$.outputOf(new Map([[tu,t.join(r)]]))])}constructor(...e){super(...e),this.signature=new Y("Join").setNamespace(A.SYSTEM_ARRAY).setParameters(new Map([[to,new U(to,I.ofArray(to,I.of("each",c.STRING,c.INTEGER,c.LONG,c.DOUBLE,c.FLOAT,c.NULL)))],[tE,new U(tE,I.ofString(tE).setDefaultValue(""))]])).setEvents(new Map([G.outputEventMapEntry(new Map([[tu,I.ofString(tu)]]))]))}}class tl{async find(e,t){return e!=A.SYSTEM_ARRAY?Promise.resolve(void 0):Promise.resolve(this.repoMap.get(t))}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}constructor(){this.repoMap=V.ofArrayEntries(D(new eM),D(new eS),D(new eI),D(new ex),D(new eU),D(new eb),D(new eV),D(new ev),D(new eC),D(new eD),D(new eG),D(new e$),D(new eF),D(new eB),D(new eY),D(new eH),D(new ek),D(new ej),D(new eW),D(new eX),D(new eJ),D(new eq),D(new eK),D(new e4),D(new e6),D(new ed),D(new e3),D(new e8),D(new te),D(new ti),D(new tA)),this.filterableNames=Array.from(this.repoMap.values()).map(e=>e.getSignature().getFullName())}}t({},"ContextElement",()=>tT);class tT{static{this.NULL=new tT(I.NULL,void 0)}constructor(e,t){this.schema=e,this.element=t}getSchema(){return this.schema}setSchema(e){return this.schema=e,this}getElement(){return this.element}setElement(e){return this.element=e,this}}let tc="name",tg="schema";class th extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get(tc);if(e?.getContext()?.has(t))throw new F(H.format("Context already has an element for '$' ",t));let r=I.from(e?.getArguments()?.get(tg));if(!r)throw new F("Schema is not supplied.");return e.getContext().set(t,new tT(r,l(r.getDefaultValue())?void 0:r.getDefaultValue())),new B([$.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new Y("Create").setNamespace(A.SYSTEM_CTX).setParameters(new Map([U.ofEntry(tc,new I().setName(tc).setType(m.of(c.STRING)).setMinLength(1).setFormat(ei.REGEX).setPattern("^[a-zA-Z_$][a-zA-Z_$0-9]*$"),!1,x.CONSTANT),U.ofEntry(tg,I.SCHEMA,!1,x.CONSTANT)])).setEvents(new Map([G.outputEventMapEntry(new Map)]))}}let tR="name",tm="value";class tp extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get(tR);if(!e.getContext()?.has(t))throw new F(H.format("Context don't have an element for '$' ",t));return new B([$.outputOf(new Map([tm,e.getContext()?.get(t)?.getElement()]))])}constructor(...e){super(...e),this.signature=new Y("Get").setNamespace(A.SYSTEM_CTX).setParameters(new Map([U.ofEntry(tR,new I().setName(tR).setType(m.of(c.STRING)).setMinLength(1).setFormat(ei.REGEX).setPattern("^[a-zA-Z_$][a-zA-Z_$0-9]*$"),!1,x.CONSTANT)])).setEvents(new Map([G.outputEventMapEntry(new Map([[tm,I.ofAny(tm)]]))]))}}t({},"ExpressionEvaluator",()=>rS);var tf={},tN={};t(tN,"ArithmeticAdditionOperator",()=>tS);var t_={};t(t_,"BinaryOperator",()=>tM);class tM{nullCheck(e,t,r){if(l(e)||l(t))throw new ew(H.format("$ cannot be applied to a null value",r.getOperatorName()))}}class tS extends tM{apply(e,t){return l(e)?t:l(t)?e:e+t}}var tO={};t(tO,"ArithmeticDivisionOperator",()=>td);class td extends tM{apply(e,t){return this.nullCheck(e,t,e1.DIVISION),e/t}}var tw={};t(tw,"ArithmeticIntegerDivisionOperator",()=>tP);class tP extends tM{apply(e,t){return this.nullCheck(e,t,e1.DIVISION),Math.floor(e/t)}}var tI={};t(tI,"ArithmeticModulusOperator",()=>ty);class ty extends tM{apply(e,t){return this.nullCheck(e,t,e1.MOD),e%t}}var tx={};t(tx,"ArithmeticMultiplicationOperator",()=>tL);class tL extends tM{apply(e,t){this.nullCheck(e,t,e1.MULTIPLICATION);let r="string"==typeof e,s=typeof t;if(r||"string"===s){let s=r?e:t,n=r?t:e,a="",i=n<0,o=Math.floor(n=Math.abs(n));for(;o-- >0;)a+=s;let E=Math.floor(s.length*(n-Math.floor(n)));if(E<0&&(E=-E),0!=E&&(a+=s.substring(0,E)),i){let e="";for(let t=a.length-1;t>=0;t--)e+=a[t];return e}return a}return e*t}}var tU={};t(tU,"ArithmeticSubtractionOperator",()=>tb);class tb extends tM{apply(e,t){return this.nullCheck(e,t,e1.SUBTRACTION),e-t}}var tV={};t(tV,"ArrayOperator",()=>tv);class tv extends tM{apply(e,t){if(!e)throw new ew("Cannot apply array operator on a null value");if(!t)throw new ew("Cannot retrive null index value");if(!Array.isArray(e)&&"string"!=typeof e)throw new ew(H.format("Cannot retrieve value from a primitive value $",e));if(t>=e.length)throw new ew(H.format("Cannot retrieve index $ from the array of length $",t,e.length));return e[t]}}var tC={};t(tC,"BitwiseAndOperator",()=>tD);class tD extends tM{apply(e,t){return this.nullCheck(e,t,e1.BITWISE_AND),e&t}}var tG={};t(tG,"BitwiseLeftShiftOperator",()=>t$);class t$ extends tM{apply(e,t){return this.nullCheck(e,t,e1.BITWISE_LEFT_SHIFT),e<<t}}var tF={};t(tF,"BitwiseOrOperator",()=>tB);class tB extends tM{apply(e,t){return this.nullCheck(e,t,e1.BITWISE_OR),e|t}}var tY={};t(tY,"BitwiseRightShiftOperator",()=>tH);class tH extends tM{apply(e,t){return this.nullCheck(e,t,e1.BITWISE_RIGHT_SHIFT),e>>t}}var tk={};t(tk,"BitwiseUnsignedRightShiftOperator",()=>tj);class tj extends tM{apply(e,t){return this.nullCheck(e,t,e1.BITWISE_UNSIGNED_RIGHT_SHIFT),e>>>t}}var tW={};t(tW,"BitwiseXorOperator",()=>tX);class tX extends tM{apply(e,t){return this.nullCheck(e,t,e1.BITWISE_XOR),e^t}}var tJ={};t(tJ,"LogicalAndOperator",()=>tq);class tq extends tM{apply(e,t){return!!e&&""!==e&&!!t&&""!==t}}var tK={};t(tK,"LogicalEqualOperator",()=>tz);class tz extends tM{apply(e,t){return W(e,t)}}var tQ={};t(tQ,"LogicalGreaterThanEqualOperator",()=>tZ);class tZ extends tM{apply(e,t){let r=eP.findPrimitiveNullAsBoolean(e),s=eP.findPrimitiveNullAsBoolean(t);if(r.getT1()==c.BOOLEAN||s.getT1()==c.BOOLEAN)throw new ew(H.format("Cannot compare >= with the values $ and $",r.getT2(),s.getT2()));return r.getT2()>=s.getT2()}}var t0={};t(t0,"LogicalGreaterThanOperator",()=>t1);class t1 extends tM{apply(e,t){let r=eP.findPrimitiveNullAsBoolean(e),s=eP.findPrimitiveNullAsBoolean(t);if(r.getT1()==c.BOOLEAN||s.getT1()==c.BOOLEAN)throw new ew(H.format("Cannot compare > with the values $ and $",r.getT2(),s.getT2()));return r.getT2()>s.getT2()}}var t2={};t(t2,"LogicalLessThanEqualOperator",()=>t5);class t5 extends tM{apply(e,t){let r=eP.findPrimitiveNullAsBoolean(e),s=eP.findPrimitiveNullAsBoolean(t);if(r.getT1()==c.BOOLEAN||s.getT1()==c.BOOLEAN)throw new ew(H.format("Cannot compare <= with the values $ and $",r.getT2(),s.getT2()));return r.getT2()<=s.getT2()}}var t7={};t(t7,"LogicalNotEqualOperator",()=>t4);class t4 extends tM{apply(e,t){return!W(e,t)}}var t9={};t(t9,"LogicalLessThanOperator",()=>t6);class t6 extends tM{apply(e,t){let r=eP.findPrimitiveNullAsBoolean(e),s=eP.findPrimitiveNullAsBoolean(t);if(r.getT1()==c.BOOLEAN||s.getT1()==c.BOOLEAN)throw new ew(H.format("Cannot compare < with the values $ and $",r.getT2(),s.getT2()));return r.getT2()<s.getT2()}}var t3={};t(t3,"LogicalOrOperator",()=>t8);class t8 extends tM{apply(e,t){return!!e&&""!==e||!!t&&""!==t}}var re={};t(re,"ObjectOperator",()=>rt);class rt extends tM{apply(e,t){if(!e)throw new ew("Cannot apply array operator on a null value");if(!t)throw new ew("Cannot retrive null property value");let r=typeof e;if(!Array.isArray(e)&&"string"!=r&&"object"!=r)throw new ew(H.format("Cannot retrieve value from a primitive value $",e));return e[t]}}var rr={};t(rr,"LogicalNullishCoalescingOperator",()=>rs);class rs extends tM{apply(e,t){return l(e)?t:e}}var rn={};t(rn,"ArrayRangeOperator",()=>ra);class ra extends tM{apply(e,t){return`${e??""}..${t??""}`}}r(tf,tN),r(tf,tO),r(tf,tw),r(tf,tI),r(tf,tx),r(tf,tU),r(tf,tV),r(tf,t_),r(tf,tC),r(tf,tG),r(tf,tF),r(tf,tY),r(tf,tk),r(tf,tW),r(tf,tJ),r(tf,tK),r(tf,tQ),r(tf,t0),r(tf,t2),r(tf,t7),r(tf,t9),r(tf,t3),r(tf,re),r(tf,rr),r(tf,rn);var ri={},ro={};t(ro,"ArithmeticUnaryMinusOperator",()=>rA);var rE={};t(rE,"UnaryOperator",()=>ru);class ru{nullCheck(e,t){if(l(e))throw new ew(H.format("$ cannot be applied to a null value",t.getOperatorName()))}}class rA extends ru{apply(e){return this.nullCheck(e,e1.UNARY_MINUS),eP.findPrimitiveNumberType(e),-e}}var rl={};t(rl,"ArithmeticUnaryPlusOperator",()=>rT);class rT extends ru{apply(e){return this.nullCheck(e,e1.UNARY_PLUS),eP.findPrimitiveNumberType(e),e}}var rc={};t(rc,"BitwiseComplementOperator",()=>rg);class rg extends ru{apply(e){this.nullCheck(e,e1.UNARY_BITWISE_COMPLEMENT);let t=eP.findPrimitiveNumberType(e);if(t.getT1()!=c.INTEGER&&t.getT1()!=c.LONG)throw new ew(H.format("Unable to apply bitwise operator on $",e));return~e}}var rh={};t(rh,"LogicalNotOperator",()=>rR);class rR extends ru{apply(e){return!e&&""!==e}}r(ri,ro),r(ri,rl),r(ri,rc),r(ri,rh),r(ri,rE),t({},"LiteralTokenValueExtractor",()=>rp);let rm=new Map([["true",!0],["false",!1],["null",void 0],["undefined",void 0]]);class rp extends e5{static{this.INSTANCE=new rp}getValueInternal(e){if(!X.isNullOrBlank(e))return(e=e.trim(),rm.has(e))?rm.get(e):e.startsWith('"')?this.processString(e):this.processNumbers(e)}processNumbers(e){try{let t=Number(e);if(isNaN(t))throw Error("Parse number error");return t}catch(t){throw new eQ(e,H.format("Unable to parse the literal or expression $",e),t)}}processString(e){if(!e.endsWith('"'))throw new eQ(e,H.format("String literal $ is not closed properly",e));return e.substring(1,e.length-1)}getPrefix(){return""}getStore(){}getValueFromExtractors(e,t){return t.has(e+".")?t.get(e+".")?.getStore():this.getValue(e)}}var rf={};t(rf,"ConditionalTernaryOperator",()=>r_);class rN{nullCheck(e,t,r,s){if(l(e)||l(t)||l(r))throw new ew(H.format("$ cannot be applied to a null value",s.getOperatorName()))}}class r_ extends rN{apply(e,t,r){return e?t:r}}r({},rf);class rM extends e5{static{this.PREFIX="_internal."}addValue(e,t){this.values.set(e,t)}getValueInternal(e){let t=e.split(e5.REGEX_DOT),r=t[1],s=r.indexOf("["),n=2;return -1!=s&&(r=t[1].substring(0,s),t[1]=t[1].substring(s),n=1),this.retrieveElementFrom(e,t,n,this.values.get(r))}getPrefix(){return rM.PREFIX}getStore(){}constructor(...e){super(...e),this.values=new Map}}class rS{static{this.UNARY_OPERATORS_MAP=new Map([[e1.UNARY_BITWISE_COMPLEMENT,new rg],[e1.UNARY_LOGICAL_NOT,new rR],[e1.UNARY_MINUS,new rA],[e1.UNARY_PLUS,new rT]])}static{this.TERNARY_OPERATORS_MAP=new Map([[e1.CONDITIONAL_TERNARY_OPERATOR,new r_]])}static{this.BINARY_OPERATORS_MAP=new Map([[e1.ADDITION,new tS],[e1.DIVISION,new td],[e1.INTEGER_DIVISION,new tP],[e1.MOD,new ty],[e1.MULTIPLICATION,new tL],[e1.SUBTRACTION,new tb],[e1.BITWISE_AND,new tD],[e1.BITWISE_LEFT_SHIFT,new t$],[e1.BITWISE_OR,new tB],[e1.BITWISE_RIGHT_SHIFT,new tH],[e1.BITWISE_UNSIGNED_RIGHT_SHIFT,new tj],[e1.BITWISE_XOR,new tX],[e1.AND,new tq],[e1.EQUAL,new tz],[e1.GREATER_THAN,new t1],[e1.GREATER_THAN_EQUAL,new tZ],[e1.LESS_THAN,new t6],[e1.LESS_THAN_EQUAL,new t5],[e1.OR,new t8],[e1.NOT_EQUAL,new t4],[e1.NULLISH_COALESCING_OPERATOR,new rs],[e1.ARRAY_OPERATOR,new tv],[e1.ARRAY_RANGE_INDEX_OPERATOR,new ra],[e1.OBJECT_OPERATOR,new rt]])}static{this.UNARY_OPERATORS_MAP_KEY_SET=new Set(rS.UNARY_OPERATORS_MAP.keys())}constructor(e){this.internalTokenValueExtractor=new rM,e instanceof e2?(this.exp=e,this.expression=this.exp.getExpression()):this.expression=e}evaluate(e){let t=this.processNestingExpression(this.expression,e);return this.expression=t.getT1(),this.exp=t.getT2(),(e=new Map(e.entries())).set(this.internalTokenValueExtractor.getPrefix(),this.internalTokenValueExtractor),this.evaluateExpression(this.exp,e)}processNestingExpression(e,t){let r=0,s=0,n=new k;for(;s<e.length-1;){if("{"==e.charAt(s)&&"{"==e.charAt(s+1))0==r&&n.push(new q(s+2,-1)),r++,s++;else if("}"==e.charAt(s)&&"}"==e.charAt(s+1)){if(--r<0)throw new eQ(e,"Expecting {{ nesting path operator to be started before closing");0==r&&n.push(n.pop().setT2(s)),s++}s++}let a=this.replaceNestingExpression(e,t,n);return new q(a,new e2(a))}replaceNestingExpression(e,t,r){let s=e;for(let n of r.toArray()){if(-1==n.getT2())throw new eQ(e,"Expecting }} nesting path operator to be closed");let r=new rS(s.substring(n.getT1(),n.getT2())).evaluate(t);s=s.substring(0,n.getT1()-2)+r+s.substring(n.getT2()+2)}return s}getExpression(){return this.exp||(this.exp=new e2(this.expression)),this.exp}getExpressionString(){return this.expression}evaluateExpression(e,t){let r=e.getOperations(),s=e.getTokens();for(;!r.isEmpty();){let e=r.pop(),n=s.pop();if(rS.UNARY_OPERATORS_MAP_KEY_SET.has(e))s.push(this.applyUnaryOperation(e,this.getValueFromToken(t,n)));else if(e==e1.OBJECT_OPERATOR||e==e1.ARRAY_OPERATOR)this.processObjectOrArrayOperator(t,r,s,e,n);else if(e==e1.CONDITIONAL_TERNARY_OPERATOR){let r=s.pop(),a=s.pop(),i=this.getValueFromToken(t,a),o=this.getValueFromToken(t,r),E=this.getValueFromToken(t,n);s.push(this.applyTernaryOperation(e,i,o,E))}else{let r=s.pop(),a=this.getValueFromToken(t,r),i=this.getValueFromToken(t,n);s.push(this.applyBinaryOperation(e,a,i))}}if(s.isEmpty())throw new ew(H.format("Expression : $ evaluated to null",e));if(1!=s.size())throw new ew(H.format("Expression : $ evaluated multiple values $",e,s));let n=s.get(0);if(n instanceof e0)return n.getElement();if(!(n instanceof e2))return this.getValueFromToken(t,n);throw new ew(H.format("Expression : $ evaluated to $",e,s.get(0)))}processObjectOrArrayOperator(e,t,r,s,n){let a=new k,i=new k;if(!s||!n)return;do i.push(s),n instanceof e2?a.push(new e0(n.toString(),this.evaluateExpression(n,e))):n&&a.push(n),n=r.isEmpty()?void 0:r.pop(),s=t.isEmpty()?void 0:t.pop();while(s==e1.OBJECT_OPERATOR||s==e1.ARRAY_OPERATOR)n&&(n instanceof e2?a.push(new e0(n.toString(),this.evaluateExpression(n,e))):a.push(n)),s&&t.push(s);let o=a.pop();if(o instanceof e0&&"object"==typeof o.getTokenValue()){let e=new Date().getTime()+""+Math.round(1e3*Math.random());this.internalTokenValueExtractor.addValue(e,o.getTokenValue()),o=new eZ(rM.PREFIX+e)}let E=new ez(o instanceof e0?o.getTokenValue():o.toString());for(;!a.isEmpty();)o=a.pop(),s=i.pop(),E.append(s.getOperator()).append(o instanceof e0?o.getTokenValue():o.toString()),s==e1.ARRAY_OPERATOR&&E.append("]");let u=E.toString(),A=u.substring(0,u.indexOf(".")+1);if(A.length>2&&e.has(A))r.push(new e0(u,this.getValue(u,e)));else{let e;try{e=rp.INSTANCE.getValue(u)}catch(t){e=u}r.push(new e0(u,e))}}applyTernaryOperation(e,t,r,s){let n=rS.TERNARY_OPERATORS_MAP.get(e);if(!n)throw new eQ(this.expression,H.format("No operator found to evaluate $",this.getExpression()));return new e0(e.toString(),n.apply(t,r,s))}applyBinaryOperation(e,t,r){let s=typeof t,n=typeof r,a=rS.BINARY_OPERATORS_MAP.get(e);if(("object"===s||"object"===n)&&e!==e1.EQUAL&&e!==e1.NOT_EQUAL&&e!==e1.NULLISH_COALESCING_OPERATOR&&e!==e1.AND&&e!==e1.OR)throw new eQ(this.expression,H.format("Cannot evaluate expression $ $ $",t,e.getOperator(),r));if(!a)throw new eQ(this.expression,H.format("No operator found to evaluate $ $ $",t,e.getOperator(),r));return new e0(e.toString(),a.apply(t,r))}applyUnaryOperation(e,t){let r=typeof t;if(e.getOperator()!=e1.NOT.getOperator()&&e.getOperator()!=e1.UNARY_LOGICAL_NOT.getOperator()&&("object"===r||Array.isArray(t)))throw new eQ(this.expression,H.format("The operator $ cannot be applied to $",e.getOperator(),t));let s=rS.UNARY_OPERATORS_MAP.get(e);if(!s)throw new eQ(this.expression,H.format("No Unary operator $ is found to apply on $",e.getOperator(),t));return new e0(e.toString(),s.apply(t))}getValueFromToken(e,t){return t instanceof e2?this.evaluateExpression(t,e):t instanceof e0?t.getElement():this.getValue(t.getExpression(),e)}getValue(e,t){let r=e.substring(0,e.indexOf(".")+1);return t.has(r)?t.get(r).getValue(e):rp.INSTANCE.getValueFromExtractors(e,t)}}let rO="name",rd="value";class rw extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get(rO);if(X.isNullOrBlank(t))throw new F("Empty string is not a valid name for the context element");let r=e?.getArguments()?.get(rd),s=new e2(t),n=s.getTokens().peekLast();if(!n.getExpression().startsWith("Context")||n instanceof e2||n instanceof e0&&!n.getElement().toString().startsWith("Context"))throw new ew(H.format("The context path $ is not a valid path in context",t));for(let e of s.getOperations().toArray())if(e!=e1.ARRAY_OPERATOR&&e!=e1.OBJECT_OPERATOR)throw new ew(H.format("Expected a reference to the context location, but found an expression $",t));for(let r=0;r<s.getTokens().size();r++){let n=s.getTokens().get(r);n instanceof e2&&s.getTokens().set(r,new e0(t,new rS(n).evaluate(e.getValuesMap())))}return this.modifyContext(e,t,r,s)}modifyContext(e,t,r,s){let n=s.getTokens();n.removeLast();let a=s.getOperations();a.removeLast();let i=e.getContext()?.get(n.removeLast().getExpression());if(l(i))throw new F(H.format("Context doesn't have any element with name '$' ",t));if(a.isEmpty())return i.setElement(r),new B([$.outputOf(new Map)]);let o=i.getElement(),E=a.removeLast(),u=n.removeLast(),A=u instanceof e0?u.getElement():u.getExpression();for(l(o)&&(o=E==e1.OBJECT_OPERATOR?{}:[],i.setElement(o));!a.isEmpty();)o=E==e1.OBJECT_OPERATOR?this.getDataFromObject(o,A,a.peekLast()):this.getDataFromArray(o,A,a.peekLast()),E=a.removeLast(),A=(u=n.removeLast())instanceof e0?u.getElement():u.getExpression();return E==e1.OBJECT_OPERATOR?this.putDataInObject(o,A,r):this.putDataInArray(o,A,r),new B([$.outputOf(new Map)])}getDataFromArray(e,t,r){if(!Array.isArray(e))throw new F(H.format("Expected an array but found $",e));let s=parseInt(t);if(isNaN(s))throw new F(H.format("Expected an array index but found $",t));if(s<0)throw new F(H.format("Array index is out of bound - $",t));let n=e[s];return l(n)&&(n=r==e1.OBJECT_OPERATOR?{}:[],e[s]=n),n}getDataFromObject(e,t,r){if(Array.isArray(e)||"object"!=typeof e)throw new F(H.format("Expected an object but found $",e));let s=e[t];return l(s)&&(s=r==e1.OBJECT_OPERATOR?{}:[],e[t]=s),s}putDataInArray(e,t,r){if(!Array.isArray(e))throw new F(H.format("Expected an array but found $",e));let s=parseInt(t);if(isNaN(s))throw new F(H.format("Expected an array index but found $",t));if(s<0)throw new F(H.format("Array index is out of bound - $",t));e[s]=r}putDataInObject(e,t,r){if(Array.isArray(e)||"object"!=typeof e)throw new F(H.format("Expected an object but found $",e));e[t]=r}constructor(...e){super(...e),this.signature=new Y("Set").setNamespace(A.SYSTEM_CTX).setParameters(new Map([U.ofEntry(rO,new I().setName(rO).setType(m.of(c.STRING)).setMinLength(1),!1),U.ofEntry(rd,I.ofAny(rd))])).setEvents(new Map([G.outputEventMapEntry(new Map)]))}}let rP="value",rI="eventName",ry="results";class rx extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getEvents(),r=e.getArguments(),s=r?.get(rI),n=e?.getArguments()?.get(ry).map(t=>{let r=t[rP];if(l(r))throw new F("Expect a value object");let s=r.value;return r.isExpression&&(s=new rS(s).evaluate(e.getValuesMap())),[t.name,s]}).reduce((e,t)=>(e.set(t[0],t[1]),e),new Map);return t?.has(s)||t?.set(s,[]),t?.get(s)?.push(n),new B([$.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new Y("GenerateEvent").setNamespace(A.SYSTEM).setParameters(new Map([U.ofEntry(rI,I.ofString(rI).setDefaultValue("output")),U.ofEntry(ry,I.ofObject(ry).setProperties(new Map([["name",I.ofString("name")],[rP,U.EXPRESSION]])),!0)])).setEvents(new Map([G.outputEventMapEntry(new Map)]))}}class rL extends eN{static{this.CONDITION="condition"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(rL.CONDITION);return new B([$.of(t||""===t?G.TRUE:G.FALSE,new Map),$.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new Y("If").setNamespace(A.SYSTEM).setParameters(new Map([U.ofEntry(rL.CONDITION,I.ofAny(rL.CONDITION))])).setEvents(new Map([G.eventMapEntry(G.TRUE,new Map),G.eventMapEntry(G.FALSE,new Map),G.outputEventMapEntry(new Map)]))}}let rU="stepName";class rb extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(rU);return e.getExecutionContext().set(t,!0),new B([$.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new Y("Break").setNamespace(A.SYSTEM_LOOP).setParameters(new Map([U.ofEntry(rU,I.of(rU,c.STRING))])).setEvents(new Map([G.outputEventMapEntry(new Map([]))]))}}let rV="count",rv="value",rC="index";class rD extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(rV),r=0,s=e.getStatementExecution()?.getStatement()?.getStatementName();return new B({next(){if(r>=t||s&&e.getExecutionContext()?.get(s))return s&&e.getExecutionContext()?.delete(s),$.outputOf(new Map([[rv,r]]));let n=$.of(G.ITERATION,new Map([[rC,r]]));return++r,n}})}constructor(...e){super(...e),this.signature=new Y("CountLoop").setNamespace(A.SYSTEM_LOOP).setParameters(new Map([U.ofEntry(rV,I.of(rV,c.INTEGER))])).setEvents(new Map([G.eventMapEntry(G.ITERATION,new Map([[rC,I.of(rC,c.INTEGER)]])),G.outputEventMapEntry(new Map([[rv,I.of(rv,c.INTEGER)]]))]))}}let rG="source",r$="each",rF="index",rB="value";class rY extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(rG),r=0,s=e.getStatementExecution()?.getStatement()?.getStatementName();return new B({next(){if(r>=t.length||s&&e.getExecutionContext()?.get(s))return s&&e.getExecutionContext()?.delete(s),$.outputOf(new Map([[rB,r]]));let n=$.of(G.ITERATION,new Map([[rF,r],[r$,t[r]]]));return++r,n}})}constructor(...e){super(...e),this.signature=new Y("ForEachLoop").setNamespace(A.SYSTEM_LOOP).setParameters(new Map([U.ofEntry(rG,I.ofArray(rG,I.ofAny(rG)))])).setEvents(new Map([G.eventMapEntry(G.ITERATION,new Map([[rF,I.of(rF,c.INTEGER)],[r$,I.ofAny(r$)]])),G.outputEventMapEntry(new Map([[rB,I.of(rB,c.INTEGER)]]))]))}}let rH="from",rk="step",rj="value",rW="index";class rX extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(rH),r=e.getArguments()?.get("to"),s=e.getArguments()?.get(rk),n=s>0,a=t,i=!1,o=e.getStatementExecution()?.getStatement()?.getStatementName();return new B({next(){if(i)return;if(n&&a>=r||!n&&a<=r||o&&e.getExecutionContext()?.get(o))return i=!0,o&&e.getExecutionContext()?.delete(o),$.outputOf(new Map([[rj,a]]));let t=$.of(G.ITERATION,new Map([[rW,a]]));return a+=s,t}})}constructor(...e){super(...e),this.signature=new Y("RangeLoop").setNamespace(A.SYSTEM_LOOP).setParameters(new Map([U.ofEntry(rH,I.of(rH,c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE).setDefaultValue(0)),U.ofEntry("to",I.of("to",c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE).setDefaultValue(1)),U.ofEntry(rk,I.of(rk,c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE).setDefaultValue(1).setNot(new I().setConstant(0)))])).setEvents(new Map([G.eventMapEntry(G.ITERATION,new Map([[rW,I.of(rW,c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE)]])),G.outputEventMapEntry(new Map([[rj,I.of(rj,c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE)]]))]))}}let rJ="value";class rq extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(rJ);return new B([$.outputOf(new Map([[rJ,t.reduce((e,t)=>e+=t,0)]]))])}constructor(...e){super(...e),this.signature=new Y("Add").setNamespace(A.MATH).setParameters(new Map([[rJ,new U(rJ,I.ofNumber(rJ)).setVariableArgument(!0)]])).setEvents(new Map([G.outputEventMapEntry(new Map([[rJ,I.ofNumber(rJ)]]))]))}}let rK="value",rz="value1",rQ="value2";class rZ extends eN{constructor(e,t,r=1,...s){super(),this.paramFunctions=[()=>new Map([[rK,new U(rK,I.ofNumber(rK))]]),()=>new Map([[rz,new U(rz,I.ofNumber(rz))],[rQ,new U(rQ,I.ofNumber(rQ))]])],s&&s.length||(s=[c.DOUBLE]),this.parametersNumber=r,this.mathFunction=t,this.signature=new Y(e).setNamespace(A.MATH).setParameters(this.paramFunctions[r-1]()).setEvents(new Map([G.outputEventMapEntry(new Map([[rK,new I().setType(m.of(...s)).setName(rK)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t,r=eP.findPrimitiveNumberType(e.getArguments()?.get(1==this.parametersNumber?rK:rz)).getT2();return 2==this.parametersNumber&&(t=eP.findPrimitiveNumberType(e.getArguments()?.get(rQ)).getT2()),new B([$.outputOf(new Map([[rK,this.mathFunction.call(this,r,t)]]))])}}let r0="value";class r1 extends eN{constructor(){super(),this.signature=new Y("Hypotenuse").setNamespace(A.MATH).setParameters(new Map([[r0,new U(r0,I.ofNumber(r0)).setVariableArgument(!0)]])).setEvents(new Map([G.outputEventMapEntry(new Map([[r0,new I().setType(m.of(c.DOUBLE)).setName(r0)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(r0);return new B([$.outputOf(new Map([[r0,Math.sqrt(t.reduce((e,t)=>e+=t*t,0))]]))])}}let r2="value";class r5 extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(r2);return new B([$.outputOf(new Map([[r2,t.reduce((e,t)=>!e&&0!==e||t>e?t:e)]]))])}constructor(...e){super(...e),this.signature=new Y("Maximum").setNamespace(A.MATH).setParameters(new Map([[r2,new U(r2,I.ofNumber(r2)).setVariableArgument(!0)]])).setEvents(new Map([G.outputEventMapEntry(new Map([[r2,I.ofNumber(r2)]]))]))}}let r7="value";class r4 extends eN{getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(r7);return new B([$.outputOf(new Map([[r7,t.reduce((e,t)=>!e&&0!==e||t<e?t:e)]]))])}constructor(...e){super(...e),this.signature=new Y("Minimum").setNamespace(A.MATH).setParameters(new Map([[r7,new U(r7,I.ofNumber(r7)).setVariableArgument(!0)]])).setEvents(new Map([G.outputEventMapEntry(new Map([[r7,I.ofNumber(r7)]]))]))}}let r9="value";class r6 extends eN{getSignature(){return this.signature}async internalExecute(e){return new B([$.outputOf(new Map([[r9,Math.random()]]))])}constructor(...e){super(...e),this.signature=new Y("Random").setNamespace(A.MATH).setEvents(new Map([G.outputEventMapEntry(V.of(r9,I.ofDouble(r9)))]))}}class r3 extends eN{static{this.MIN_VALUE="minValue"}static{this.MAX_VALUE="maxValue"}static{this.VALUE="value"}constructor(e,t,r,s,n){super(),this.signature=new Y(e).setParameters(V.of(r3.MIN_VALUE,t,r3.MAX_VALUE,r)).setNamespace(A.MATH).setEvents(new Map([G.outputEventMapEntry(V.of(r3.VALUE,s))])),this.randomFunction=n}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(r3.MIN_VALUE),r=e.getArguments()?.get(r3.MAX_VALUE),s=this.randomFunction(t,r);return new B([$.outputOf(new Map([[r3.VALUE,s]]))])}}class r8{constructor(){this.functionObjectsIndex={Absolute:new rZ("Absolute",e=>Math.abs(e),1,c.INTEGER,c.LONG,c.FLOAT,c.DOUBLE),ArcCosine:new rZ("ArcCosine",e=>Math.acos(e)),ArcSine:new rZ("ArcSine",e=>Math.asin(e)),ArcTangent:new rZ("ArcTangent",e=>Math.atan(e)),Ceiling:new rZ("Ceiling",e=>Math.ceil(e)),Cosine:new rZ("Cosine",e=>Math.cos(e)),HyperbolicCosine:new rZ("HyperbolicCosine",e=>Math.cosh(e)),CubeRoot:new rZ("CubeRoot",e=>Math.cbrt(e)),Exponential:new rZ("Exponential",e=>Math.exp(e)),ExponentialMinus1:new rZ("ExponentialMinus1",e=>Math.expm1(e)),Floor:new rZ("Floor",e=>Math.floor(e)),LogNatural:new rZ("LogNatural",e=>Math.log(e)),Log10:new rZ("Log10",e=>Math.log10(e)),Round:new rZ("Round",e=>Math.round(e),1,c.INTEGER,c.LONG),Sine:new rZ("Sine",e=>Math.sin(e)),HyperbolicSine:new rZ("HyperbolicSine",e=>Math.sinh(e)),Tangent:new rZ("Tangent",e=>Math.tan(e)),HyperbolicTangent:new rZ("HyperbolicTangent",e=>Math.tanh(e)),ToDegrees:new rZ("ToDegrees",e=>Math.PI/180*e),ToRadians:new rZ("ToRadians",e=>180/Math.PI*e),SquareRoot:new rZ("SquareRoot",e=>Math.sqrt(e)),ArcTangent2:new rZ("ArcTangent2",(e,t)=>Math.atan2(e,t),2),Power:new rZ("Power",(e,t)=>Math.pow(e,t),2),Add:new rq,Hypotenuse:new r1,Maximum:new r5,Minimum:new r4,Random:new r6,RandomFloat:new r3("RandomFloat",U.of(r3.MIN_VALUE,I.ofFloat(r3.MIN_VALUE).setDefaultValue(0)),U.of(r3.MAX_VALUE,I.ofFloat(r3.MAX_VALUE).setDefaultValue(0x7fffffff)),I.ofFloat(r3.VALUE),(e,t)=>Math.random()*(t-e)+e),RandomInt:new r3("RandomInt",U.of(r3.MIN_VALUE,I.ofInteger(r3.MIN_VALUE).setDefaultValue(0)),U.of(r3.MAX_VALUE,I.ofInteger(r3.MAX_VALUE).setDefaultValue(0x7fffffff)),I.ofInteger(r3.VALUE),(e,t)=>Math.round(Math.random()*(t-e)+e)),RandomLong:new r3("RandomLong",U.of(r3.MIN_VALUE,I.ofLong(r3.MIN_VALUE).setDefaultValue(0)),U.of(r3.MAX_VALUE,I.ofLong(r3.MAX_VALUE).setDefaultValue(Number.MAX_SAFE_INTEGER)),I.ofLong(r3.VALUE),(e,t)=>Math.round(Math.random()*(t-e)+e)),RandomDouble:new r3("RandomDouble",U.of(r3.MIN_VALUE,I.ofDouble(r3.MIN_VALUE).setDefaultValue(0)),U.of(r3.MAX_VALUE,I.ofDouble(r3.MAX_VALUE).setDefaultValue(Number.MAX_VALUE)),I.ofDouble(r3.VALUE),(e,t)=>Math.random()*(t-e)+e)},this.filterableNames=Object.values(this.functionObjectsIndex).map(e=>e.getSignature().getFullName())}async find(e,t){return e!=A.MATH?Promise.resolve(void 0):Promise.resolve(this.functionObjectsIndex[t])}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}}class se extends eN{static{this.SOURCE="source"}static{this.SCHEMA="schema"}static{this.VALUE="value"}static{this.CONVERSION_MODE="conversionMode"}getSignature(){return this.signature}internalExecute(e){let t=e.getArguments()?.get(se.SOURCE),r=I.from(e?.getArguments()?.get(se.SCHEMA));if(!r)throw new F("Schema is not supplied.");let s=eu(e.getArguments()?.get(se.CONVERSION_MODE))||eE.STRICT;return this.convertToSchema(r,e.getSchemaRepository(),t,s)}async convertToSchema(e,t,r,s){try{return new B([$.outputOf(V.of(se.VALUE,ef.validate([],e,t,r,!0,s)))])}catch(e){throw new F(e?.message)}}constructor(...e){super(...e),this.signature=new Y("ObjectConvert").setNamespace(A.SYSTEM_OBJECT).setParameters(new Map([U.ofEntry(se.SOURCE,I.ofAny(se.SCHEMA)),U.ofEntry(se.SCHEMA,I.SCHEMA,!1,x.CONSTANT),U.ofEntry(se.CONVERSION_MODE,I.ofString(se.CONVERSION_MODE).setEnums(eA()))])).setEvents(new Map([G.outputEventMapEntry(V.of(se.VALUE,I.ofAny(se.VALUE)))]))}}let st="value",sr="source";class ss extends eN{constructor(){super(),this.signature=new Y("ObjectDeleteKey").setNamespace(A.SYSTEM_OBJECT).setParameters(new Map([U.ofEntry(sr,I.ofAny(sr)),U.ofEntry("key",I.ofString("key"))])).setEvents(new Map([G.outputEventMapEntry(new Map([[st,I.ofAny(st)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(sr),r=e.getArguments()?.get("key");return l(t)?new B([$.outputOf(new Map([[st,void 0]]))]):(t=eL(t),delete t[r],new B([$.outputOf(new Map([[st,t]]))]))}}let sn="source";class sa extends eN{constructor(e,t){super(),this.signature=new Y(e).setNamespace(A.SYSTEM_OBJECT).setParameters(new Map([U.ofEntry(sn,I.ofAny(sn))])).setEvents(new Map([G.outputEventMapEntry(new Map([["value",t]]))]))}getSignature(){return this.signature}}let si="value";class so extends sa{constructor(){super("ObjectEntries",I.ofArray(si,I.ofArray("tuple",I.ofString("key"),I.ofAny("value"))))}async internalExecute(e){var t=e.getArguments()?.get("source");if(l(t))return new B([$.outputOf(new Map([[si,[]]]))]);let r=Object.entries(eL(t)).sort((e,t)=>e[0].localeCompare(t[0]));return new B([$.outputOf(new Map([[si,r]]))])}}let sE="value";class su extends sa{constructor(){super("ObjectKeys",I.ofArray(sE,I.ofString(sE)))}async internalExecute(e){var t=e.getArguments()?.get("source");if(l(t))return new B([$.outputOf(new Map([[sE,[]]]))]);let r=Object.keys(eL(t)).sort((e,t)=>e.localeCompare(t));return new B([$.outputOf(new Map([[sE,r]]))])}}let sA="value",sl="source",sT="overwrite",sc="deleteKeyOnNull";class sg extends eN{constructor(){super(),this.signature=new Y("ObjectPutValue").setNamespace(A.SYSTEM_OBJECT).setParameters(new Map([U.ofEntry(sl,I.ofObject(sl)),U.ofEntry("key",I.ofString("key")),U.ofEntry(sA,I.ofAny(sA)),U.ofEntry(sT,I.ofBoolean(sT).setDefaultValue(!0)),U.ofEntry(sc,I.ofBoolean(sc).setDefaultValue(!1))])).setEvents(new Map([G.outputEventMapEntry(new Map([[sA,I.ofObject(sA)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(sl),r=e.getArguments()?.get("key"),s=e.getArguments()?.get(sA),n=e.getArguments()?.get(sT),a=e.getArguments()?.get(sc),i=new e7(t,"Data.");return i.setValue(r,s,n,a),new B([$.outputOf(new Map([[sA,i.getStore()]]))])}}let sh="value";class sR extends sa{constructor(){super("ObjectValues",I.ofArray(sh,I.ofAny(sh)))}async internalExecute(e){var t=e.getArguments()?.get("source");if(l(t))return new B([$.outputOf(new Map([[sh,[]]]))]);let r=Object.entries(eL(t)).sort((e,t)=>e[0].localeCompare(t[0])).map(e=>e[1]);return new B([$.outputOf(new Map([[sh,r]]))])}}class sm{constructor(){this.functionObjectsIndex={ObjectValues:new sR,ObjectKeys:new su,ObjectEntries:new so,ObjectDeleteKey:new ss,ObjectPutValue:new sg,ObjectConvert:new se},this.filterableNames=Object.values(this.functionObjectsIndex).map(e=>e.getSignature().getFullName())}async find(e,t){return e!=A.SYSTEM_OBJECT?Promise.resolve(void 0):Promise.resolve(this.functionObjectsIndex[t])}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}}class sp extends eN{static{this.VALUES="values"}static{this.STREAM="stream"}static{this.LOG="LOG"}static{this.ERROR="ERROR"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(sp.VALUES),r=e.getArguments()?.get(sp.STREAM);return(r===sp.LOG?console?.log:console?.error)?.(...t),new B([$.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new Y("Print").setNamespace(A.SYSTEM).setParameters(new Map([U.ofEntry(sp.VALUES,I.ofAny(sp.VALUES),!0),U.ofEntry(sp.STREAM,I.ofString(sp.STREAM).setEnums([sp.LOG,sp.ERROR]).setDefaultValue(sp.LOG))])).setEvents(new Map([G.outputEventMapEntry(new Map)]))}}class sf extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_SEARCH_STRING_NAME="searchString"}static{this.PARAMETER_SECOND_STRING_NAME="secondString"}static{this.PARAMETER_THIRD_STRING_NAME="thirdString"}static{this.PARAMETER_INDEX_NAME="index"}static{this.PARAMETER_SECOND_INDEX_NAME="secondIndex"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new U(sf.PARAMETER_STRING_NAME,I.ofString(sf.PARAMETER_STRING_NAME))}static{this.PARAMETER_SECOND_STRING=new U(sf.PARAMETER_SECOND_STRING_NAME,I.ofString(sf.PARAMETER_SECOND_STRING_NAME))}static{this.PARAMETER_THIRD_STRING=new U(sf.PARAMETER_THIRD_STRING_NAME,I.ofString(sf.PARAMETER_THIRD_STRING_NAME))}static{this.PARAMETER_INDEX=new U(sf.PARAMETER_INDEX_NAME,I.ofInteger(sf.PARAMETER_INDEX_NAME))}static{this.PARAMETER_SECOND_INDEX=new U(sf.PARAMETER_SECOND_INDEX_NAME,I.ofInteger(sf.PARAMETER_SECOND_INDEX_NAME))}static{this.PARAMETER_SEARCH_STRING=new U(sf.PARAMETER_SEARCH_STRING_NAME,I.ofString(sf.PARAMETER_STRING_NAME))}static{this.EVENT_STRING=new G(G.OUTPUT,V.of(sf.EVENT_RESULT_NAME,I.ofString(sf.EVENT_RESULT_NAME)))}static{this.EVENT_BOOLEAN=new G(G.OUTPUT,V.of(sf.EVENT_RESULT_NAME,I.ofBoolean(sf.EVENT_RESULT_NAME)))}static{this.EVENT_INT=new G(G.OUTPUT,V.of(sf.EVENT_RESULT_NAME,I.ofInteger(sf.EVENT_RESULT_NAME)))}static{this.EVENT_ARRAY=new G(G.OUTPUT,V.of(sf.EVENT_RESULT_NAME,I.ofArray(sf.EVENT_RESULT_NAME)))}constructor(e,t,r,...s){super();let n=new Map;s.forEach(e=>n.set(e.getParameterName(),e)),this.signature=new Y(t).setNamespace(e).setParameters(n).setEvents(V.of(r.getName(),r))}getSignature(){return this.signature}static ofEntryStringStringAndBooleanOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME),s=e?.getArguments()?.get(sf.PARAMETER_SEARCH_STRING_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r,s)))])}}(A.STRING,e,sf.EVENT_BOOLEAN,sf.PARAMETER_STRING,sf.PARAMETER_SEARCH_STRING)]}static ofEntryStringIntegerAndStringOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME),s=e?.getArguments()?.get(sf.PARAMETER_INDEX_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r,s)))])}}(A.STRING,e,sf.EVENT_STRING,sf.PARAMETER_STRING,sf.PARAMETER_INDEX)]}static ofEntryStringStringAndIntegerOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME),s=e?.getArguments()?.get(sf.PARAMETER_SEARCH_STRING_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r,s)))])}}(A.STRING,e,sf.EVENT_INT,sf.PARAMETER_STRING,sf.PARAMETER_SEARCH_STRING)]}static ofEntryStringAndStringOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r)))])}}(A.STRING,e,sf.EVENT_STRING,sf.PARAMETER_STRING)]}static ofEntryStringAndBooleanOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r)))])}}(A.STRING,e,sf.EVENT_BOOLEAN,sf.PARAMETER_STRING)]}static ofEntryStringStringIntegerAndIntegerOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME),s=e?.getArguments()?.get(sf.PARAMETER_SEARCH_STRING_NAME),n=e?.getArguments()?.get(sf.PARAMETER_INDEX_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r,s,n)))])}}(A.STRING,e,sf.EVENT_INT,sf.PARAMETER_STRING,sf.PARAMETER_SEARCH_STRING,sf.PARAMETER_INDEX)]}static ofEntryStringIntegerIntegerAndStringOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME),s=e?.getArguments()?.get(sf.PARAMETER_INDEX_NAME),n=e?.getArguments()?.get(sf.PARAMETER_SECOND_INDEX_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r,s,n)))])}}(A.STRING,e,sf.EVENT_STRING,sf.PARAMETER_STRING,sf.PARAMETER_INDEX,sf.PARAMETER_SECOND_INDEX)]}static ofEntryStringStringStringAndStringOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME),s=e?.getArguments()?.get(sf.PARAMETER_SECOND_STRING_NAME),n=e?.getArguments()?.get(sf.PARAMETER_THIRD_STRING_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r,s,n)))])}}(A.STRING,e,sf.EVENT_STRING,sf.PARAMETER_STRING,sf.PARAMETER_SECOND_STRING,sf.PARAMETER_THIRD_STRING)]}static ofEntryStringAndIntegerOutput(e,t){return[e,new class extends sf{async internalExecute(e){let r=e?.getArguments()?.get(sf.PARAMETER_STRING_NAME);return new B([$.outputOf(V.of(sf.EVENT_RESULT_NAME,t(r)))])}}(A.STRING,e,sf.EVENT_INT,sf.PARAMETER_STRING)]}}class sN extends eN{static{this.VALUE="value"}constructor(){super(),this.signature=new Y("Concatenate").setNamespace(A.STRING).setParameters(new Map([[sN.VALUE,new U(sN.VALUE,new I().setName(sN.VALUE).setType(new R(c.STRING))).setVariableArgument(!0)]])).setEvents(new Map([G.outputEventMapEntry(new Map([[sN.VALUE,I.ofString(sN.VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(sN.VALUE),r="";return t.reduce((e,t)=>r=e+t,r),new B([$.outputOf(new Map([[sN.VALUE,r]]))])}}class s_ extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_AT_START_NAME="startPosition"}static{this.PARAMETER_AT_END_NAME="endPosition"}static{this.EVENT_RESULT_NAME="result"}constructor(){super(),this.PARAMETER_STRING=new U(s_.PARAMETER_STRING_NAME,I.ofString(s_.PARAMETER_STRING_NAME)),this.PARAMETER_AT_START=new U(s_.PARAMETER_AT_START_NAME,I.ofInteger(s_.PARAMETER_AT_START_NAME)),this.PARAMETER_AT_END=new U(s_.PARAMETER_AT_END_NAME,I.ofInteger(s_.PARAMETER_AT_END_NAME)),this.EVENT_STRING=new G(G.OUTPUT,new Map([[s_.EVENT_RESULT_NAME,I.ofString(s_.EVENT_RESULT_NAME)]])),this.signature=new Y("DeleteForGivenLength").setNamespace(A.STRING).setParameters(new Map([[this.PARAMETER_STRING.getParameterName(),this.PARAMETER_STRING],[this.PARAMETER_AT_START.getParameterName(),this.PARAMETER_AT_START],[this.PARAMETER_AT_END.getParameterName(),this.PARAMETER_AT_END]])).setEvents(new Map([[this.EVENT_STRING.getName(),this.EVENT_STRING]]))}getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get(s_.PARAMETER_STRING_NAME),r=e?.getArguments()?.get(s_.PARAMETER_AT_START_NAME),s=e?.getArguments()?.get(s_.PARAMETER_AT_END_NAME);if(s>=r){let e="";return e+=t.substring(0,r),e+=t.substring(s),new B([$.outputOf(new Map([[s_.EVENT_RESULT_NAME,e.toString()]]))])}return new B([$.outputOf(new Map([[s_.EVENT_RESULT_NAME,t]]))])}}class sM extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_AT_POSITION_NAME="position"}static{this.PARAMETER_INSERT_STRING_NAME="insertString"}getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get(sM.PARAMETER_STRING_NAME),r=e?.getArguments()?.get(sM.PARAMETER_AT_POSITION_NAME),s=e?.getArguments()?.get(sM.PARAMETER_INSERT_STRING_NAME),n="";return n+=t.substring(0,r),n+=s,n+=t.substring(r),new B([$.outputOf(new Map([[this.EVENT_RESULT_NAME,n]]))])}constructor(...e){super(...e),this.EVENT_RESULT_NAME="result",this.PARAMETER_STRING=new U(sM.PARAMETER_STRING_NAME,I.ofString(sM.PARAMETER_STRING_NAME)),this.PARAMETER_AT_POSITION=new U(sM.PARAMETER_AT_POSITION_NAME,I.ofInteger(sM.PARAMETER_AT_POSITION_NAME)),this.PARAMETER_INSERT_STRING=new U(sM.PARAMETER_INSERT_STRING_NAME,I.ofString(sM.PARAMETER_INSERT_STRING_NAME)),this.EVENT_STRING=new G(G.OUTPUT,new Map([[this.EVENT_RESULT_NAME,I.ofString(this.EVENT_RESULT_NAME)]])),this.signature=new Y("InsertAtGivenPosition").setNamespace(A.STRING).setParameters(new Map([[this.PARAMETER_STRING.getParameterName(),this.PARAMETER_STRING],[this.PARAMETER_AT_POSITION.getParameterName(),this.PARAMETER_AT_POSITION],[this.PARAMETER_INSERT_STRING.getParameterName(),this.PARAMETER_INSERT_STRING]])).setEvents(new Map([G.outputEventMapEntry(new Map([[this.EVENT_RESULT_NAME,I.ofString(this.EVENT_RESULT_NAME)]]))]))}}class sS extends eN{static{this.PARAMETER_REGEX_NAME="regex"}static{this.PARAMETER_STRING_NAME="string"}static{this.EVENT_RESULT_NAME="result"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(sS.PARAMETER_REGEX_NAME),r=e.getArguments()?.get(sS.PARAMETER_STRING_NAME);return new B([$.outputOf(new Map([[sS.EVENT_RESULT_NAME,!!r.match(t)?.length]]))])}constructor(...e){super(...e),this.signature=new Y("Matches").setNamespace(A.STRING).setParameters(V.ofEntries(V.entry(...U.ofEntry(sS.PARAMETER_REGEX_NAME,I.ofString(sS.PARAMETER_REGEX_NAME))),V.entry(...U.ofEntry(sS.PARAMETER_STRING_NAME,I.ofString(sS.PARAMETER_STRING_NAME))))).setEvents(V.ofEntries(V.entry(...G.outputEventMapEntry(new Map([[sS.EVENT_RESULT_NAME,I.ofBoolean(sS.EVENT_RESULT_NAME)]])))))}}class sO extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_POSTPAD_STRING_NAME="postpadString"}static{this.PARAMETER_LENGTH_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new U(sO.PARAMETER_STRING_NAME,I.ofString(sO.PARAMETER_STRING_NAME))}static{this.PARAMETER_POSTPAD_STRING=new U(sO.PARAMETER_POSTPAD_STRING_NAME,I.ofString(sO.PARAMETER_POSTPAD_STRING_NAME))}static{this.PARAMETER_LENGTH=new U(sO.PARAMETER_LENGTH_NAME,I.ofInteger(sO.PARAMETER_LENGTH_NAME))}static{this.EVENT_STRING=new G(G.OUTPUT,new Map([[sO.EVENT_RESULT_NAME,I.ofString(sO.EVENT_RESULT_NAME)]]))}constructor(){super(),this.signature=new Y("PostPad").setNamespace(A.STRING).setParameters(new Map([[sO.PARAMETER_STRING.getParameterName(),sO.PARAMETER_STRING],[sO.PARAMETER_POSTPAD_STRING.getParameterName(),sO.PARAMETER_POSTPAD_STRING],[sO.PARAMETER_LENGTH.getParameterName(),sO.PARAMETER_LENGTH]])).setEvents(new Map([[sO.EVENT_STRING.getName(),sO.EVENT_STRING]]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(sO.PARAMETER_STRING_NAME),r=e?.getArguments()?.get(sO.PARAMETER_POSTPAD_STRING_NAME),s=e.getArguments()?.get(sO.PARAMETER_LENGTH_NAME),n="",a=r.length;for(n+=t;a<=s;)n+=r,a+=r.length;return n.length-t.length<s&&(n+=r.substring(0,s-(n.length-t.length))),new B([$.outputOf(new Map([[sO.EVENT_RESULT_NAME,n.toString()]]))])}}class sd extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_PREPAD_STRING_NAME="prepadString"}static{this.PARAMETER_LENGTH_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new U(sd.PARAMETER_STRING_NAME,I.ofString(sd.PARAMETER_STRING_NAME))}static{this.PARAMETER_PREPAD_STRING=new U(sd.PARAMETER_PREPAD_STRING_NAME,I.ofString(sd.PARAMETER_PREPAD_STRING_NAME))}static{this.PARAMETER_LENGTH=new U(sd.PARAMETER_LENGTH_NAME,I.ofInteger(sd.PARAMETER_LENGTH_NAME))}static{this.EVENT_STRING=new G(G.OUTPUT,new Map([[sd.EVENT_RESULT_NAME,I.ofString(sd.EVENT_RESULT_NAME)]]))}getSignature(){return this.signature}constructor(){super(),this.signature=new Y("PrePad").setNamespace(A.STRING).setParameters(new Map([[sd.PARAMETER_STRING.getParameterName(),sd.PARAMETER_STRING],[sd.PARAMETER_PREPAD_STRING.getParameterName(),sd.PARAMETER_PREPAD_STRING],[sd.PARAMETER_LENGTH.getParameterName(),sd.PARAMETER_LENGTH]])).setEvents(new Map([[sd.EVENT_STRING.getName(),sd.EVENT_STRING]]))}async internalExecute(e){let t=e.getArguments()?.get(sd.PARAMETER_STRING_NAME),r=e.getArguments()?.get(sd.PARAMETER_PREPAD_STRING_NAME),s=e.getArguments()?.get(sd.PARAMETER_LENGTH_NAME),n="",a=r.length;for(;a<=s;)n+=r,a+=r.length;return n.length<s&&(n+=r.substring(0,s-n.length)),n+=t,new B([$.outputOf(new Map([[sd.EVENT_RESULT_NAME,n]]))])}}class sw extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_BOOLEAN_NAME="boolean"}static{this.PARAMETER_FIRST_OFFSET_NAME="firstOffset"}static{this.PARAMETER_OTHER_STRING_NAME="otherString"}static{this.PARAMETER_SECOND_OFFSET_NAME="secondOffset"}static{this.PARAMETER_INTEGER_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new U(sw.PARAMETER_STRING_NAME,I.ofString(sw.PARAMETER_STRING_NAME))}static{this.PARAMETER_OTHER_STRING=new U(sw.PARAMETER_OTHER_STRING_NAME,I.ofString(sw.PARAMETER_OTHER_STRING_NAME))}static{this.PARAMETER_FIRST_OFFSET=new U(sw.PARAMETER_FIRST_OFFSET_NAME,I.ofInteger(sw.PARAMETER_FIRST_OFFSET_NAME))}static{this.PARAMETER_SECOND_OFFSET=new U(sw.PARAMETER_SECOND_OFFSET_NAME,I.ofInteger(sw.PARAMETER_SECOND_OFFSET_NAME))}static{this.PARAMETER_INTEGER=new U(sw.PARAMETER_INTEGER_NAME,I.ofInteger(sw.PARAMETER_INTEGER_NAME))}static{this.PARAMETER_BOOLEAN=new U(sw.PARAMETER_BOOLEAN_NAME,I.ofBoolean(sw.PARAMETER_BOOLEAN_NAME))}static{this.EVENT_BOOLEAN=new G(G.OUTPUT,new Map([[sw.EVENT_RESULT_NAME,I.ofBoolean(sw.EVENT_RESULT_NAME)]]))}getSignature(){return this.signature}constructor(){super(),this.signature=new Y("RegionMatches").setNamespace(A.STRING).setParameters(new Map([[sw.PARAMETER_STRING.getParameterName(),sw.PARAMETER_STRING],[sw.PARAMETER_BOOLEAN.getParameterName(),sw.PARAMETER_BOOLEAN],[sw.PARAMETER_FIRST_OFFSET.getParameterName(),sw.PARAMETER_FIRST_OFFSET],[sw.PARAMETER_OTHER_STRING.getParameterName(),sw.PARAMETER_OTHER_STRING],[sw.PARAMETER_SECOND_OFFSET.getParameterName(),sw.PARAMETER_SECOND_OFFSET],[sw.PARAMETER_INTEGER.getParameterName(),sw.PARAMETER_INTEGER]])).setEvents(new Map([[sw.EVENT_BOOLEAN.getName(),sw.EVENT_BOOLEAN]]))}async internalExecute(e){let t=e.getArguments()?.get(sw.PARAMETER_STRING_NAME),r=e.getArguments()?.get(sw.PARAMETER_BOOLEAN_NAME),s=e.getArguments()?.get(sw.PARAMETER_FIRST_OFFSET_NAME),n=e?.getArguments()?.get(sw.PARAMETER_OTHER_STRING_NAME),a=e?.getArguments()?.get(sw.PARAMETER_SECOND_OFFSET_NAME),i=e.getArguments()?.get(sw.PARAMETER_INTEGER_NAME),o=!1;return o=!(s<0)&&!(a<0)&&!(s+i>t.length)&&!(a+i>n.length)&&(r?(t=t.substring(s,s+i).toUpperCase())==n.substring(a,a+i).toUpperCase():(t=t.substring(s,s+i))==n.substring(a,i)),new B([$.outputOf(new Map([[sw.EVENT_RESULT_NAME,o]]))])}}class sP extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_AT_START_NAME="startPosition"}static{this.PARAMETER_AT_LENGTH_NAME="lengthPosition"}static{this.PARAMETER_REPLACE_STRING_NAME="replaceString"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new U(sP.PARAMETER_STRING_NAME,I.ofString(sP.PARAMETER_STRING_NAME))}static{this.PARAMETER_AT_START=new U(sP.PARAMETER_AT_START_NAME,I.ofInteger(sP.PARAMETER_AT_START_NAME))}static{this.PARAMETER_AT_LENGTH=new U(sP.PARAMETER_AT_LENGTH_NAME,I.ofInteger(sP.PARAMETER_AT_LENGTH_NAME))}static{this.PARAMETER_REPLACE_STRING=new U(sP.PARAMETER_REPLACE_STRING_NAME,I.ofString(sP.PARAMETER_REPLACE_STRING_NAME))}static{this.EVENT_STRING=new G(G.OUTPUT,new Map([[sP.EVENT_RESULT_NAME,I.ofString(sP.EVENT_RESULT_NAME)]]))}constructor(){super(),this.signature=new Y("ReplaceAtGivenPosition").setNamespace(A.STRING).setParameters(new Map([[sP.PARAMETER_STRING.getParameterName(),sP.PARAMETER_STRING],[sP.PARAMETER_AT_START.getParameterName(),sP.PARAMETER_AT_START],[sP.PARAMETER_AT_LENGTH.getParameterName(),sP.PARAMETER_AT_LENGTH],[sP.PARAMETER_REPLACE_STRING.getParameterName(),sP.PARAMETER_REPLACE_STRING]])).setEvents(new Map([[sP.EVENT_STRING.getName(),sP.EVENT_STRING]]))}getSignature(){return this.signature}async internalExecute(e){let t=e?.getArguments()?.get(sP.PARAMETER_STRING_NAME),r=e?.getArguments()?.get(sP.PARAMETER_AT_START_NAME),s=e?.getArguments()?.get(sP.PARAMETER_AT_LENGTH_NAME),n=e?.getArguments()?.get(sP.PARAMETER_REPLACE_STRING_NAME);if(t.length,r<s){let e="";e+=t.substring(0,r),e+=n,e+=t.substring(r+s)}return new B([$.outputOf(new Map([[sP.EVENT_RESULT_NAME,t]]))])}}class sI extends eN{constructor(){super(),this.VALUE="value",this.signature=new Y("Reverse").setNamespace(A.STRING).setParameters(new Map([[this.VALUE,new U(this.VALUE,I.ofString(this.VALUE)).setVariableArgument(!1)]])).setEvents(new Map([G.outputEventMapEntry(new Map([[this.VALUE,new I().setType(m.of(c.STRING)).setName(this.VALUE)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(this.VALUE),r=t.length-1,s="";for(;r>=0;)s+=t.charAt(r--);return new B([$.outputOf(V.of(this.VALUE,s))])}}class sy extends eN{getSignature(){return this.signature}constructor(){super(),this.PARAMETER_STRING_NAME="string",this.PARAMETER_SPLIT_STRING_NAME="searchString",this.EVENT_RESULT_NAME="result",this.PARAMETER_STRING=new U(this.PARAMETER_STRING_NAME,I.ofString(this.PARAMETER_STRING_NAME)),this.PARAMETER_SPLIT_STRING=new U(this.PARAMETER_SPLIT_STRING_NAME,I.ofString(this.PARAMETER_SPLIT_STRING_NAME)),this.EVENT_ARRAY=new G(G.OUTPUT,V.of(this.EVENT_RESULT_NAME,I.ofArray(this.EVENT_RESULT_NAME))),this.signature=new Y("Split").setNamespace(A.STRING).setParameters(new Map([[this.PARAMETER_STRING_NAME,this.PARAMETER_STRING],[this.PARAMETER_SPLIT_STRING_NAME,this.PARAMETER_SPLIT_STRING]])).setEvents(new Map([G.outputEventMapEntry(new Map([[this.EVENT_RESULT_NAME,I.ofArray(this.EVENT_RESULT_NAME)]]))]))}async internalExecute(e){let t=e.getArguments()?.get(this.PARAMETER_STRING_NAME),r=e.getArguments()?.get(this.PARAMETER_SPLIT_STRING_NAME);return new B([$.outputOf(V.of(this.EVENT_RESULT_NAME,t.split(r)))])}}class sx extends eN{getSignature(){return this.signature}constructor(){super(),this.PARAMETER_INPUT_ANYTYPE_NAME="anytype",this.EVENT_RESULT_NAME="result",this.PARAMETER_INPUT_ANYTYPE=new U(this.PARAMETER_INPUT_ANYTYPE_NAME,I.ofAny(this.PARAMETER_INPUT_ANYTYPE_NAME)),this.EVENT_STRING=new G(G.OUTPUT,new Map([[this.EVENT_RESULT_NAME,I.ofString(this.EVENT_RESULT_NAME)]])),this.signature=new Y("ToString").setNamespace(A.STRING).setParameters(new Map([[this.PARAMETER_INPUT_ANYTYPE.getParameterName(),this.PARAMETER_INPUT_ANYTYPE]])).setEvents(new Map([[this.EVENT_STRING.getName(),this.EVENT_STRING]]))}async internalExecute(e){let t=e.getArguments()?.get(this.PARAMETER_INPUT_ANYTYPE_NAME),r="";return r="object"==typeof t?JSON.stringify(t,void 0,2):""+t,new B([$.outputOf(new Map([[this.EVENT_RESULT_NAME,r]]))])}}class sL extends eN{static{this.PARAMETER_STRING_NAME="string"}static{this.PARAMETER_LENGTH_NAME="length"}static{this.EVENT_RESULT_NAME="result"}static{this.PARAMETER_STRING=new U(sL.PARAMETER_STRING_NAME,I.ofString(sL.PARAMETER_STRING_NAME))}static{this.PARAMETER_LENGTH=new U(sL.PARAMETER_LENGTH_NAME,I.ofInteger(sL.PARAMETER_LENGTH_NAME))}static{this.EVENT_STRING=new G(G.OUTPUT,new Map([[sL.EVENT_RESULT_NAME,I.ofString(sL.EVENT_RESULT_NAME)]]))}getSignature(){return this.signature}constructor(){super(),this.signature=new Y("TrimTo").setNamespace(A.STRING).setParameters(new Map([[sL.PARAMETER_STRING.getParameterName(),sL.PARAMETER_STRING],[sL.PARAMETER_LENGTH.getParameterName(),sL.PARAMETER_LENGTH]])).setEvents(new Map([[sL.EVENT_STRING.getName(),sL.EVENT_STRING]]))}async internalExecute(e){let t=e.getArguments()?.get(sL.PARAMETER_STRING_NAME),r=e.getArguments()?.get(sL.PARAMETER_LENGTH_NAME);return new B([$.outputOf(new Map([[sL.EVENT_RESULT_NAME,t.substring(0,r)]]))])}}class sU{async find(e,t){return e!=A.STRING?Promise.resolve(void 0):Promise.resolve(this.repoMap.get(t))}async filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}constructor(){this.repoMap=V.ofArrayEntries(sf.ofEntryStringAndStringOutput("Trim",e=>e.trim()),sf.ofEntryStringAndStringOutput("TrimStart",e=>e.trimStart()),sf.ofEntryStringAndStringOutput("TrimEnd",e=>e.trimEnd()),sf.ofEntryStringAndIntegerOutput("Length",e=>e.length),sf.ofEntryStringStringAndIntegerOutput("Frequency",(e,t)=>{let r=0,s=e.indexOf(t);for(;-1!=s;)r++,s=e.indexOf(t,s+1);return r}),sf.ofEntryStringAndStringOutput("LowerCase",e=>e.toLocaleLowerCase()),sf.ofEntryStringAndStringOutput("UpperCase",e=>e.toUpperCase()),sf.ofEntryStringAndBooleanOutput("IsBlank",e=>""===e.trim()),sf.ofEntryStringAndBooleanOutput("IsEmpty",e=>""===e),sf.ofEntryStringStringAndBooleanOutput("Contains",(e,t)=>-1!=e.indexOf(t)),sf.ofEntryStringStringAndBooleanOutput("EndsWith",(e,t)=>e.endsWith(t)),sf.ofEntryStringStringAndBooleanOutput("StartsWith",(e,t)=>e.startsWith(t)),sf.ofEntryStringStringAndBooleanOutput("EqualsIgnoreCase",(e,t)=>e.toUpperCase()==t.toUpperCase()),sf.ofEntryStringStringAndBooleanOutput("Matches",(e,t)=>new RegExp(t).test(e)),sf.ofEntryStringStringAndIntegerOutput("IndexOf",(e,t)=>e.indexOf(t)),sf.ofEntryStringStringAndIntegerOutput("LastIndexOf",(e,t)=>e.lastIndexOf(t)),sf.ofEntryStringIntegerAndStringOutput("Repeat",(e,t)=>e.repeat(t)),sf.ofEntryStringStringIntegerAndIntegerOutput("IndexOfWithStartPoint",(e,t,r)=>e.indexOf(t,r)),sf.ofEntryStringStringIntegerAndIntegerOutput("LastIndexOfWithStartPoint",(e,t,r)=>e.lastIndexOf(t,r)),sf.ofEntryStringStringStringAndStringOutput("Replace",(e,t,r)=>e.replaceAll(t,r)),sf.ofEntryStringStringStringAndStringOutput("ReplaceFirst",(e,t,r)=>e.replace(t,r)),sf.ofEntryStringIntegerIntegerAndStringOutput("SubString",(e,t,r)=>e.substring(t,r)),D(new sN),D(new s_),D(new sM),D(new sO),D(new sd),D(new sw),D(new sP),D(new sI),D(new sy),D(new sx),D(new sL),D(new sS)),this.filterableNames=Array.from(this.repoMap.values()).map(e=>e.getSignature().getFullName())}}class sb extends eN{static{this.PARAMETER_TIMESTAMP_NAME="isoTimeStamp"}static{this.PARAMETER_TIMESTAMP_NAME_ONE="isoTimeStamp1"}static{this.PARAMETER_TIMESTAMP_NAME_TWO="isoTimeStamp2"}static{this.PARAMETER_UNIT_NAME="unit"}static{this.PARAMETER_NUMBER_NAME="number"}static{this.PARAMETER_TIMESTAMP=new U(sb.PARAMETER_TIMESTAMP_NAME,I.ofRef(A.DATE+".Timestamp"))}static{this.PARAMETER_TIMESTAMP_ONE=new U(sb.PARAMETER_TIMESTAMP_NAME_ONE,I.ofRef(A.DATE+".Timestamp"))}static{this.PARAMETER_TIMESTAMP_TWO=new U(sb.PARAMETER_TIMESTAMP_NAME_TWO,I.ofRef(A.DATE+".Timestamp"))}static{this.PARAMETER_VARIABLE_UNIT=new U(sb.PARAMETER_UNIT_NAME,I.ofRef(A.DATE+".Timeunit")).setVariableArgument(!0)}static{this.PARAMETER_UNIT=new U(sb.PARAMETER_UNIT_NAME,I.ofRef(A.DATE+".Timeunit"))}static{this.PARAMETER_NUMBER=new U(sb.PARAMETER_NUMBER_NAME,I.ofInteger(sb.PARAMETER_NUMBER_NAME))}static{this.EVENT_RESULT_NAME="result"}static{this.EVENT_TIMESTAMP_NAME="isoTimeStamp"}static{this.EVENT_INT=new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofInteger(sb.EVENT_RESULT_NAME)))}static{this.EVENT_STRING=new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofString(sb.EVENT_RESULT_NAME)))}static{this.EVENT_LONG=new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofLong(sb.EVENT_RESULT_NAME)))}static{this.EVENT_BOOLEAN=new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofBoolean(sb.EVENT_RESULT_NAME)))}static{this.EVENT_TIMESTAMP=new G(G.OUTPUT,V.of(sb.EVENT_TIMESTAMP_NAME,I.ofRef(A.DATE+".Timestamp")))}getSignature(){return this.signature}constructor(e,t,...r){if(super(),this.signature=new Y(e).setNamespace(A.DATE).setEvents(V.of(t.getName(),t)),!r?.length)return;let s=new Map;r.forEach(e=>s.set(e.getParameterName(),e)),this.signature.setParameters(s)}static ofEntryTimestampAndIntegerOutput(e,t){return[e,new class extends sb{async internalExecute(e){return new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,t(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME))))])}}(e,sb.EVENT_INT,sb.PARAMETER_TIMESTAMP)]}static ofEntryTimestampAndBooleanOutput(e,t){return[e,new class extends sb{async internalExecute(e){return new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,t(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME))))])}}(e,sb.EVENT_BOOLEAN,sb.PARAMETER_TIMESTAMP)]}static ofEntryTimestampAndStringOutput(e,t){return[e,new class extends sb{async internalExecute(e){return new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,t(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME))))])}}(e,sb.EVENT_STRING,sb.PARAMETER_TIMESTAMP)]}static ofEntryTimestampIntegerAndTimestampOutput(e,t){return[e,new class extends sb{async internalExecute(e){return new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,t(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME),e.getArguments()?.get(sb.PARAMETER_NUMBER_NAME))))])}}(e,sb.EVENT_TIMESTAMP,sb.PARAMETER_TIMESTAMP,sb.PARAMETER_NUMBER)]}static ofEntryTimestampTimestampAndTOutput(e,t,r,...s){return[e,new class extends sb{async internalExecute(e){let t=[];return s?.length&&t.push(...s.map(t=>e.getArguments()?.get(t.getParameterName()))),new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,r(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME_ONE),e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME_TWO),t)))])}}(e,t,sb.PARAMETER_TIMESTAMP_ONE,sb.PARAMETER_TIMESTAMP_TWO,...s)]}}function sV(t){let r=e.fromISO(t,{setZone:!0});if(!r?.isValid)throw Error("Invalid ISO timestamp");return r}class sv extends sb{static{this.PARAMETER_YEARS_NAME="years"}static{this.PARAMETER_MONTHS_NAME="months"}static{this.PARAMETER_DAYS_NAME="days"}static{this.PARAMETER_HOURS_NAME="hours"}static{this.PARAMETER_MINUTES_NAME="minutes"}static{this.PARAMETER_SECONDS_NAME="seconds"}static{this.PARAMETER_MILLISECONDS_NAME="milliseconds"}constructor(e){super(e?"AddTime":"SubtractTime",sb.EVENT_TIMESTAMP,sb.PARAMETER_TIMESTAMP,U.of(sv.PARAMETER_YEARS_NAME,I.ofNumber(sv.PARAMETER_YEARS_NAME).setDefaultValue(0)),U.of(sv.PARAMETER_MONTHS_NAME,I.ofNumber(sv.PARAMETER_MONTHS_NAME).setDefaultValue(0)),U.of(sv.PARAMETER_DAYS_NAME,I.ofNumber(sv.PARAMETER_DAYS_NAME).setDefaultValue(0)),U.of(sv.PARAMETER_HOURS_NAME,I.ofNumber(sv.PARAMETER_HOURS_NAME).setDefaultValue(0)),U.of(sv.PARAMETER_MINUTES_NAME,I.ofNumber(sv.PARAMETER_MINUTES_NAME).setDefaultValue(0)),U.of(sv.PARAMETER_SECONDS_NAME,I.ofNumber(sv.PARAMETER_SECONDS_NAME).setDefaultValue(0)),U.of(sv.PARAMETER_MILLISECONDS_NAME,I.ofNumber(sv.PARAMETER_MILLISECONDS_NAME).setDefaultValue(0))),this.isAdd=e}async internalExecute(e){let t,r=sV(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME)),s=e.getArguments()?.get(sv.PARAMETER_YEARS_NAME),n=e.getArguments()?.get(sv.PARAMETER_MONTHS_NAME),a=e.getArguments()?.get(sv.PARAMETER_DAYS_NAME),i=e.getArguments()?.get(sv.PARAMETER_HOURS_NAME),o=e.getArguments()?.get(sv.PARAMETER_MINUTES_NAME),E={years:s,months:n,days:a,hours:i,minutes:o,seconds:e.getArguments()?.get(sv.PARAMETER_SECONDS_NAME),milliseconds:e.getArguments()?.get(sv.PARAMETER_MILLISECONDS_NAME)};return t=this.isAdd?r.plus(E):r.minus(E),new B([$.outputOf(V.of(sb.EVENT_TIMESTAMP_NAME,t.toISO()))])}}class sC extends eN{constructor(e,t){super(),this.paramName=`epoch${t?"Seconds":"Milliseconds"}`,this.isSeconds=t,this.signature=new Y(e).setNamespace(A.DATE).setParameters(new Map([[this.paramName,U.of(this.paramName,new I().setName(this.paramName).setType(m.of(c.LONG,c.INTEGER,c.STRING)))]])).setEvents(new Map([[sb.EVENT_TIMESTAMP.getName(),sb.EVENT_TIMESTAMP]]))}getSignature(){return this.signature}internalExecute(e){let t=parseInt(e.getArguments()?.get(this.paramName)),r=this.isSeconds?1e3*t:t;if(isNaN(r))throw Error(`Please provide a valid value for ${this.paramName}.`);return Promise.resolve(new B([$.outputOf(V.of(sb.EVENT_TIMESTAMP_NAME,new Date(r).toISOString()))]))}}class sD extends eN{constructor(e,t){super(),this.isSeconds=t,this.signature=new Y(e).setNamespace(A.DATE).setParameters(new Map([[sb.PARAMETER_TIMESTAMP_NAME,sb.PARAMETER_TIMESTAMP]])).setEvents(new Map([[sb.EVENT_TIMESTAMP.getName(),sb.EVENT_LONG]]))}getSignature(){return this.signature}internalExecute(t){let r=t.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME),s=this.isSeconds?e.fromISO(r).toSeconds():e.fromISO(r).toMillis();return Promise.resolve(new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,s))]))}}class sG extends sb{static{this.PARAMETER_FORMAT_NAME="format"}static{this.PARAMETER_LOCALE_NAME="locale"}constructor(){super("ToDateString",sb.EVENT_STRING,sb.PARAMETER_TIMESTAMP,U.of(sG.PARAMETER_FORMAT_NAME,I.ofString(sG.PARAMETER_FORMAT_NAME)),U.of(sG.PARAMETER_LOCALE_NAME,I.ofString(sG.PARAMETER_LOCALE_NAME).setDefaultValue("")))}async internalExecute(e){let t=sV(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME)),r=e.getArguments()?.get(sG.PARAMETER_FORMAT_NAME),s=e.getArguments()?.get(sG.PARAMETER_LOCALE_NAME);return""===s&&(s="system"),new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,t.toFormat(r,{locale:s})))])}}class s$ extends sb{static{this.PARAMETER_TIMEZONE_NAME="timezone"}constructor(){super("SetTimeZone",sb.EVENT_TIMESTAMP,sb.PARAMETER_TIMESTAMP,U.of(s$.PARAMETER_TIMEZONE_NAME,I.ofString(s$.PARAMETER_TIMEZONE_NAME)))}async internalExecute(e){let t=sV(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME)),r=e.getArguments()?.get(s$.PARAMETER_TIMEZONE_NAME);return new B([$.outputOf(V.of(sb.EVENT_TIMESTAMP_NAME,t.setZone(r).toISO()))])}}class sF extends sb{static{this.PARAMETER_START_TIMESTAMP_NAME="startTimestamp"}static{this.PARAMETER_END_TIMESTAMP_NAME="endTimestamp"}static{this.PARAMETER_CHECK_TIMESTAMP_NAME="checkTimestamp"}constructor(){super("IsBetween",sF.EVENT_BOOLEAN,U.of(sF.PARAMETER_START_TIMESTAMP_NAME,I.ofRef(A.DATE+".Timestamp")),U.of(sF.PARAMETER_END_TIMESTAMP_NAME,I.ofRef(A.DATE+".Timestamp")),U.of(sF.PARAMETER_CHECK_TIMESTAMP_NAME,I.ofRef(A.DATE+".Timestamp")))}async internalExecute(e){let t=e.getArguments()?.get(sF.PARAMETER_START_TIMESTAMP_NAME),r=e.getArguments()?.get(sF.PARAMETER_END_TIMESTAMP_NAME),s=e.getArguments()?.get(sF.PARAMETER_CHECK_TIMESTAMP_NAME),n=sV(t),a=sV(r),i=sV(s);return n>a&&([n,a]=[a,n]),new B([$.outputOf(V.of(sF.EVENT_RESULT_NAME,n<=i&&i<=a))])}}class sB extends eN{constructor(e){super(),this.isLast=e,this.signature=new Y(e?"LastOf":"FirstOf").setNamespace(A.DATE).setParameters(new Map([[sb.PARAMETER_TIMESTAMP_NAME,new U(sb.PARAMETER_TIMESTAMP_NAME,I.ofRef(A.DATE+".Timestamp")).setVariableArgument(!0)]])).setEvents(new Map([[sb.EVENT_TIMESTAMP.getName(),sb.EVENT_TIMESTAMP]]))}getSignature(){return this.signature}internalExecute(e){let t=e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME);if(!t?.length)throw Error("No timestamps provided");let r=t.map(e=>sV(e));return r.sort((e,t)=>e.toMillis()-t.toMillis()),Promise.resolve(new B([$.outputOf(V.of(sb.EVENT_TIMESTAMP_NAME,r[this.isLast?r.length-1:0].toISO()))]))}}class sY extends sb{static{this.EVENT_TIME_OBJECT_NAME="object"}static{this.EVENT_TIME_ARRAY_NAME="array"}constructor(e){super(e?"TimeAsArray":"TimeAsObject",new G(G.OUTPUT,V.of(e?sY.EVENT_TIME_ARRAY_NAME:sY.EVENT_TIME_OBJECT_NAME,e?I.ofArray(sY.EVENT_TIME_ARRAY_NAME,I.ofInteger("timeParts")):I.ofRef(A.DATE+".TimeObject"))),sb.PARAMETER_TIMESTAMP),this.isArray=e}async internalExecute(e){let t=sV(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME)).toObject();return new B([$.outputOf(V.of(this.isArray?sY.EVENT_TIME_ARRAY_NAME:sY.EVENT_TIME_OBJECT_NAME,this.isArray?[t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond]:t))])}}class sH extends sb{constructor(e){super(e?"StartOf":"EndOf",sb.EVENT_TIMESTAMP,sb.PARAMETER_TIMESTAMP,sb.PARAMETER_UNIT),this.isStart=e}async internalExecute(e){let t=sV(e.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME)),r=e.getArguments()?.get(sb.PARAMETER_UNIT_NAME)?.toLowerCase();r=r.substring(0,r.length-1);let s=this.isStart?t.startOf(r):t.endOf(r);return new B([$.outputOf(V.of(sb.EVENT_TIMESTAMP_NAME,s.toISO({includeOffset:!0})))])}}class sk extends sb{static{this.EVENT_NAMES_NAME="names"}static{this.PARAMETER_UNIT_NAME="unit"}static{this.PARAMETER_LOCALE_NAME="locale"}constructor(){super("GetNames",new G(sk.EVENT_NAMES_NAME,V.of(sk.EVENT_NAMES_NAME,I.ofArray(sk.EVENT_NAMES_NAME,I.ofString(sk.EVENT_NAMES_NAME)))),new U(sk.PARAMETER_UNIT_NAME,I.ofString(sk.PARAMETER_UNIT_NAME).setEnums(["TIMEZONES","MONTHS","WEEKDAYS"])),new U(sk.PARAMETER_LOCALE_NAME,I.ofString(sk.PARAMETER_LOCALE_NAME).setDefaultValue("system")))}async internalExecute(e){let t=e.getArguments()?.get(sk.PARAMETER_UNIT_NAME),r=e.getArguments()?.get(sk.PARAMETER_LOCALE_NAME);return new B([$.outputOf(V.of(sk.EVENT_NAMES_NAME,this.getNames(t,r)))])}getNames(t,r){return"TIMEZONES"===t?Intl.supportedValuesOf("timeZone"):"MONTHS"===t?[1,2,3,4,5,6,7,8,9,10,11,12].map(t=>e.now().setLocale(r).set({month:t}).toFormat("MMMM")):"WEEKDAYS"===t?[1,2,3,4,5,6,7].map(t=>e.now().setLocale(r).set({month:7,year:2024,day:t}).toFormat("EEEE")):[]}}class sj extends eN{internalExecute(t){let r=t.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME),s=e.fromISO(r);return Promise.resolve(new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,s.isValid))]))}getSignature(){return this.signature}constructor(...e){super(...e),this.signature=new Y("IsValidISODate").setNamespace(A.DATE).setParameters(new Map([U.ofEntry(sb.PARAMETER_TIMESTAMP_NAME,I.ofString(sb.PARAMETER_TIMESTAMP_NAME))])).setEvents(new Map([G.outputEventMapEntry(V.of(sb.EVENT_RESULT_NAME,I.ofBoolean(sb.EVENT_RESULT_NAME)))]))}}class sW extends sb{static{this.PARAMETER_BASE_NAME="base"}static{this.PARAMETER_BASE=new U(sW.PARAMETER_BASE_NAME,I.ofRef(A.DATE+".Timestamp").setDefaultValue(""))}static{this.PARAMETER_LOCALE_NAME="locale"}static{this.PARAMETER_LOCALE=new U(sW.PARAMETER_LOCALE_NAME,I.ofString(sW.PARAMETER_LOCALE_NAME).setDefaultValue("system"))}static{this.PARAMETER_FORMAT_NAME="format"}static{this.PARAMETER_FORMAT=new U(sW.PARAMETER_FORMAT_NAME,I.ofString(sW.PARAMETER_FORMAT_NAME).setEnums(["LONG","SHORT","NARROW"]).setDefaultValue("LONG"))}static{this.PARAMETER_ROUND_NAME="round"}static{this.PARAMETER_ROUND=new U(sW.PARAMETER_ROUND_NAME,I.ofBoolean(sW.PARAMETER_ROUND_NAME).setDefaultValue(!0))}constructor(){super("FromNow",sb.EVENT_STRING,sb.PARAMETER_TIMESTAMP,sW.PARAMETER_FORMAT,sW.PARAMETER_BASE,sb.PARAMETER_VARIABLE_UNIT,sW.PARAMETER_ROUND,sW.PARAMETER_LOCALE)}internalExecute(t){let r=t.getArguments()?.get(sW.PARAMETER_BASE_NAME),s=""===r?e.now():e.fromISO(r),n=t.getArguments()?.get(sb.PARAMETER_TIMESTAMP_NAME),a=e.fromISO(n),i=t.getArguments()?.get(sW.PARAMETER_UNIT_NAME),o=t.getArguments()?.get(sW.PARAMETER_FORMAT_NAME),E=t.getArguments()?.get(sW.PARAMETER_ROUND_NAME),u=t.getArguments()?.get(sW.PARAMETER_LOCALE_NAME),A={base:s,style:o?.toLowerCase(),round:E,locale:u};return i?.length>0&&(A.unit=i.map(e=>e.toLowerCase())),Promise.resolve(new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,a.toRelative(A)??"Unknown"))]))}}class sX extends sb{static{this.PARAMETER_FORMAT_NAME="format"}static{this.PARAMETER_TIMESTAMP_STRING_NAME="timestampString"}constructor(){super("FromDateString",sb.EVENT_TIMESTAMP,U.of(sX.PARAMETER_TIMESTAMP_STRING_NAME,I.ofString(sX.PARAMETER_TIMESTAMP_STRING_NAME)),U.of(sX.PARAMETER_FORMAT_NAME,I.ofString(sX.PARAMETER_FORMAT_NAME)))}async internalExecute(t){let r=t.getArguments()?.get(sX.PARAMETER_TIMESTAMP_STRING_NAME),s=t.getArguments()?.get(sX.PARAMETER_FORMAT_NAME),n=e.fromFormat(r,s);return new B([$.outputOf(V.of(sb.EVENT_RESULT_NAME,n.toISO()))])}}class sJ extends sb{constructor(){super("GetCurrentTimestamp",sb.EVENT_TIMESTAMP)}async internalExecute(t){return new B([$.outputOf(V.of(sb.EVENT_TIMESTAMP_NAME,e.now().toISO()))])}}class sq{find(e,t){return e!=A.DATE?Promise.resolve(void 0):Promise.resolve(this.repoMap.get(t))}filter(e){return Promise.resolve(this.filterableNames.filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase())))}constructor(){this.repoMap=V.ofArrayEntries(["EpochSecondsToTimestamp",new sC("EpochSecondsToTimestamp",!0)],["EpochMillisecondsToTimestamp",new sC("EpochMillisecondsToTimestamp",!1)],sb.ofEntryTimestampAndIntegerOutput("GetDay",e=>sV(e).day),sb.ofEntryTimestampAndIntegerOutput("GetDayOfWeek",e=>sV(e).weekday),sb.ofEntryTimestampAndIntegerOutput("GetMonth",e=>sV(e).month),sb.ofEntryTimestampAndIntegerOutput("GetYear",e=>sV(e).year),sb.ofEntryTimestampAndIntegerOutput("GetHours",e=>sV(e).hour),sb.ofEntryTimestampAndIntegerOutput("GetMinutes",e=>sV(e).minute),sb.ofEntryTimestampAndIntegerOutput("GetSeconds",e=>sV(e).second),sb.ofEntryTimestampAndIntegerOutput("GetMilliseconds",e=>sV(e).millisecond),sb.ofEntryTimestampAndIntegerOutput("GetDaysInMonth",e=>sV(e).daysInMonth),sb.ofEntryTimestampAndIntegerOutput("GetDaysInYear",e=>sV(e).daysInYear),["TimestampToEpochSeconds",new sD("TimestampToEpochSeconds",!0)],["TimestampToEpochMilliseconds",new sD("TimestampToEpochMilliseconds",!1)],sb.ofEntryTimestampAndStringOutput("GetTimeZoneName",e=>sV(e).zoneName),sb.ofEntryTimestampAndStringOutput("GetTimeZoneOffsetLong",e=>sV(e).offsetNameLong),sb.ofEntryTimestampAndStringOutput("GetTimeZoneOffsetShort",e=>sV(e).offsetNameShort),sb.ofEntryTimestampAndIntegerOutput("GetTimeZoneOffset",e=>sV(e).offset),["ToDateString",new sG],["AddTime",new sv(!0)],["SubtractTime",new sv(!1)],["GetCurrentTimestamp",new sJ],sb.ofEntryTimestampTimestampAndTOutput("Difference",new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofRef(`${A.DATE}.Duration`))),(e,t,r)=>{let s,n=sV(e),a=sV(t);r?.[0]?.length&&(s=r[0]?.filter(e=>!!e).map(e=>e.toLowerCase()));let i=n.diff(a);return s?.length?i.shiftTo(...s).toObject():i.toObject()},sb.PARAMETER_VARIABLE_UNIT),sb.ofEntryTimestampIntegerAndTimestampOutput("SetDay",(e,t)=>sV(e).set({day:t}).toISO()),sb.ofEntryTimestampIntegerAndTimestampOutput("SetMonth",(e,t)=>sV(e).set({month:t}).toISO()),sb.ofEntryTimestampIntegerAndTimestampOutput("SetYear",(e,t)=>sV(e).set({year:t}).toISO()),sb.ofEntryTimestampIntegerAndTimestampOutput("SetHours",(e,t)=>sV(e).set({hour:t}).toISO()),sb.ofEntryTimestampIntegerAndTimestampOutput("SetMinutes",(e,t)=>sV(e).set({minute:t}).toISO()),sb.ofEntryTimestampIntegerAndTimestampOutput("SetSeconds",(e,t)=>sV(e).set({second:t}).toISO()),sb.ofEntryTimestampIntegerAndTimestampOutput("SetMilliseconds",(e,t)=>sV(e).set({millisecond:t}).toISO()),["SetTimeZone",new s$],sb.ofEntryTimestampTimestampAndTOutput("IsBefore",new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofBoolean(sb.EVENT_RESULT_NAME))),(e,t)=>sV(e)<sV(t)),sb.ofEntryTimestampTimestampAndTOutput("IsAfter",new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofBoolean(sb.EVENT_RESULT_NAME))),(e,t)=>sV(e)>sV(t)),sb.ofEntryTimestampTimestampAndTOutput("IsSame",new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofBoolean(sb.EVENT_RESULT_NAME))),(e,t)=>sV(e)===sV(t)),sb.ofEntryTimestampTimestampAndTOutput("IsSameOrBefore",new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofBoolean(sb.EVENT_RESULT_NAME))),(e,t)=>sV(e)<=sV(t)),sb.ofEntryTimestampTimestampAndTOutput("IsSameOrAfter",new G(G.OUTPUT,V.of(sb.EVENT_RESULT_NAME,I.ofBoolean(sb.EVENT_RESULT_NAME))),(e,t)=>sV(e)>=sV(t)),sb.ofEntryTimestampAndBooleanOutput("IsInLeapYear",e=>sV(e).isInLeapYear),sb.ofEntryTimestampAndBooleanOutput("IsInDST",e=>sV(e).isInDST),["IsBetween",new sF],["LastOf",new sB(!0)],["FirstOf",new sB(!1)],["StartOf",new sH(!0)],["EndOf",new sH(!1)],["TimeAsObject",new sY(!1)],["TimeAsArray",new sY(!0)],["GetNames",new sk],["IsValidISODate",new sj],["FromNow",new sW],["FromDateString",new sX]),this.filterableNames=Array.from(this.repoMap.values()).map(e=>e.getSignature().getFullName())}}class sK extends eN{static{this.MILLIS="millis"}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get(sK.MILLIS);return await new Promise(e=>setTimeout(e,t)),new B([$.outputOf(new Map)])}constructor(...e){super(...e),this.signature=new Y("Wait").setNamespace(A.SYSTEM).setParameters(new Map([U.ofEntry(sK.MILLIS,I.ofNumber(sK.MILLIS).setMinimum(0).setDefaultValue(0))])).setEvents(new Map([G.outputEventMapEntry(new Map)]))}}t({},"HybridRepository",()=>sz);class sz{constructor(...e){this.repos=e}async find(e,t){for(let r of this.repos){let s=await r.find(e,t);if(s)return s}}async filter(e){let t=new Set;for(let r of this.repos)(await r.filter(e)).forEach(e=>t.add(e));return Array.from(t)}}class sQ extends eN{static{this.SOURCE="source"}static{this.SCHEMA="schema"}static{this.IS_VALID="isValid"}getSignature(){return this.signature}internalExecute(e){let t=e.getArguments()?.get(sQ.SOURCE),r=I.from(e?.getArguments()?.get(sQ.SCHEMA));if(!r)throw new F("Schema is not supplied.");return this.validateSchema(r,e.getSchemaRepository(),t)}async validateSchema(e,t,r){try{return await ef.validate([],e,t,r,!0),new B([$.outputOf(V.of(sQ.IS_VALID,!0))])}catch(e){return new B([$.outputOf(V.of(sQ.IS_VALID,!1))])}}constructor(...e){super(...e),this.signature=new Y("ValidateSchema").setNamespace(A.SYSTEM_OBJECT).setParameters(new Map([U.ofEntry(sQ.SOURCE,I.ofAny(sQ.SCHEMA)),U.ofEntry(sQ.SCHEMA,I.SCHEMA,!1,x.CONSTANT)])).setEvents(new Map([G.outputEventMapEntry(V.of(sQ.IS_VALID,I.ofBoolean(sQ.IS_VALID)))]))}}let sZ="value",s0="error",s1="errorMessage",s2="source";class s5 extends eN{constructor(){super(),this.signature=new Y("JSONParse").setNamespace(A.SYSTEM_JSON).setParameters(new Map([U.ofEntry(s2,I.ofString(s2))])).setEvents(new Map([G.eventMapEntry(s0,new Map([[s1,I.ofString(s1)]])),G.outputEventMapEntry(new Map([[sZ,I.ofAny(sZ)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t,r=e.getArguments()?.get("source");try{t=r?JSON.parse(r):null}catch(e){return new B([$.of(s0,new Map([[s1,e?.message??"Unknown Error parsing JSON"]])),$.outputOf(new Map([[sZ,null]]))])}return new B([$.outputOf(new Map([[sZ,t]]))])}}let s7="value",s4="source";class s9 extends eN{constructor(){super(),this.signature=new Y("JSONStringify").setNamespace(A.SYSTEM_JSON).setParameters(new Map([U.ofEntry(s4,I.ofAny(s4))])).setEvents(new Map([G.outputEventMapEntry(new Map([[s7,I.ofString(s7)]]))]))}getSignature(){return this.signature}async internalExecute(e){let t=e.getArguments()?.get("source");return new B([$.outputOf(new Map([[s7,JSON.stringify(t??null)]]))])}}class s6{constructor(){this.map=new Map([[A.SYSTEM_JSON,new Map([D(new s5),D(new s9)])],[A.SYSTEM_CTX,new Map([D(new th),D(new tp),D(new rw)])],[A.SYSTEM_LOOP,new Map([D(new rX),D(new rD),D(new rb),D(new rY)])],[A.SYSTEM,new Map([D(new rL),D(new rx),D(new sp),D(new sK),D(new tA),D(new sQ)])]]),this.filterableNames=Array.from(this.map.values()).flatMap(e=>Array.from(e.values())).map(e=>e.getSignature().getFullName())}async find(e,t){return this.map.get(e)?.get(t)}async filter(e){return Array.from(this.filterableNames).filter(t=>-1!==t.toLowerCase().indexOf(e.toLowerCase()))}}class s3 extends sz{constructor(){super(new s6,new r8,new sU,new tl,new sm,new sq)}}t({},"StatementExecution",()=>ne),t({},"StatementMessage",()=>s8);class s8{constructor(e,t){this.message=t,this.messageType=e}getMessageType(){return this.messageType}setMessageType(e){return this.messageType=e,this}getMessage(){return this.message}setMessage(e){return this.message=e,this}toString(){return`${this.messageType} : ${this.message}`}}class ne{constructor(e){this.messages=[],this.dependencies=new Set,this.statement=e}getStatement(){return this.statement}setStatement(e){return this.statement=e,this}getMessages(){return this.messages}setMessages(e){return this.messages=e,this}getDependencies(){return this.dependencies}setDependencies(e){return this.dependencies=e,this}getUniqueKey(){return this.statement.getStatementName()}addMessage(e,t){this.messages.push(new s8(e,t))}addDependency(e){this.dependencies.add(e)}getDepenedencies(){return this.dependencies}equals(e){return e instanceof ne&&e.statement.equals(this.statement)}}t({},"ContextTokenValueExtractor",()=>nt);class nt extends e5{static{this.PREFIX="Context."}constructor(e){super(),this.context=e}getValueInternal(e){let t=e.split(e5.REGEX_DOT),r=t[1],s=r.indexOf("["),n=2;return -1!=s&&(r=t[1].substring(0,s),t[1]=t[1].substring(s),n=1),this.retrieveElementFrom(e,t,n,this.context.get(r)?.getElement())}getPrefix(){return nt.PREFIX}getStore(){return l(this.context)?this.context:Array.from(this.context.entries()).reduce((e,[t,r])=>(l(r)||(e[t]=r.getElement()),e),{})}}t({},"OutputMapTokenValueExtractor",()=>nr);class nr extends e5{static{this.PREFIX="Steps."}constructor(e){super(),this.output=e}getValueInternal(e){let t=e.split(e5.REGEX_DOT),r=1,s=this.output.get(t[r++]);if(!s||r>=t.length)return;let n=s.get(t[r++]);if(!n||r>t.length)return;if(r===t.length)return n;let a=t[r].indexOf("[");if(-1===a){let s=n.get(t[r++]);return this.retrieveElementFrom(e,t,r,s)}let i=t[r].substring(0,a),o=n.get(i);return this.retrieveElementFrom(e,t,r,{[i]:o})}getPrefix(){return nr.PREFIX}getStore(){return this.convertMapToObj(this.output)}convertMapToObj(e){return 0===e.size?{}:Array.from(e.entries()).reduce((e,[t,r])=>(e[t]=r instanceof Map?this.convertMapToObj(r):r,e),{})}}t({},"ArgumentsTokenValueExtractor",()=>ns);class ns extends e5{static{this.PREFIX="Arguments."}constructor(e){super(),this.args=e}getValueInternal(e){let t=e.split(e5.REGEX_DOT),r=t[1],s=r.indexOf("["),n=2;return -1!=s&&(r=t[1].substring(0,s),t[1]=t[1].substring(s),n=1),this.retrieveElementFrom(e,t,n,this.args.get(r))}getPrefix(){return ns.PREFIX}getStore(){return l(this.args)?this.args:Array.from(this.args.entries()).reduce((e,[t,r])=>(e[t]=r,e),{})}}t({},"GraphVertex",()=>na),t({},"ExecutionGraph",()=>nn);class nn{constructor(e=!1){this.nodeMap=new Map,this.isSubGrph=e}getVerticesData(){return Array.from(this.nodeMap.values()).map(e=>e.getData())}addVertex(e){if(!this.nodeMap.has(e.getUniqueKey())){let t=new na(this,e);this.nodeMap.set(e.getUniqueKey(),t)}return this.nodeMap.get(e.getUniqueKey())}getVertex(e){return this.nodeMap.get(e)}getVertexData(e){if(this.nodeMap.has(e))return this.nodeMap.get(e).getData()}getVerticesWithNoIncomingEdges(){return Array.from(this.nodeMap.values()).filter(e=>!e.hasIncomingEdges())}isCyclic(){let e,t=new k(this.getVerticesWithNoIncomingEdges()),r=new Set;for(;!t.isEmpty();){if(r.has(t.getFirst().getKey()))return!0;e=t.removeFirst(),r.add(e.getKey()),e.hasOutgoingEdges()&&t.addAll(Array.from(e.getOutVertices().values()).flatMap(e=>Array.from(e)))}return!1}addVertices(e){for(let t of e)this.addVertex(t)}getNodeMap(){return this.nodeMap}isSubGraph(){return this.isSubGrph}toString(){return"Execution Graph : \n"+Array.from(this.nodeMap.values()).map(e=>e.toString()).join("\n")}}class na{constructor(e,t){this.outVertices=new Map,this.inVertices=new Set,this.data=t,this.graph=e}getData(){return this.data}setData(e){return this.data=e,this}getOutVertices(){return this.outVertices}setOutVertices(e){return this.outVertices=e,this}getInVertices(){return this.inVertices}setInVertices(e){return this.inVertices=e,this}getGraph(){return this.graph}setGraph(e){return this.graph=e,this}getKey(){return this.data.getUniqueKey()}addOutEdgeTo(e,t){return this.outVertices.has(e)||this.outVertices.set(e,new Set),this.outVertices.get(e).add(t),t.inVertices.add(new q(this,e)),t}addInEdgeTo(e,t){return this.inVertices.add(new q(e,t)),e.outVertices.has(t)||e.outVertices.set(t,new Set),e.outVertices.get(t).add(this),e}hasIncomingEdges(){return!!this.inVertices.size}hasOutgoingEdges(){return!!this.outVertices.size}getSubGraphOfType(e){let t=new nn(!0);var r=new k(Array.from(this.outVertices.get(e)??[]));for(r.map(e=>e.getData()).forEach(e=>t.addVertex(e));!r.isEmpty();)Array.from(r.pop().outVertices.values()).flatMap(e=>Array.from(e)).forEach(e=>{t.addVertex(e.getData()),r.add(e)});return t}toString(){var e=Array.from(this.getInVertices()).map(e=>e.getT1().getKey()+"("+e.getT2()+")").join(", "),t=Array.from(this.outVertices.entries()).map(([e,t])=>e+": "+Array.from(t).map(e=>e.getKey()).join(",")).join("\n ");return this.getKey()+":\n In: "+e+"\n Out: \n "+t}}t({},"KIRuntime",()=>nl),t({},"JsonExpression",()=>ni);class ni{constructor(e){this.expression=e}getExpression(){return this.expression}}t({},"ParameterReferenceType",()=>no);var no=((o={}).VALUE="VALUE",o.EXPRESSION="EXPRESSION",o);function nE(){var e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?r:3&r|8).toString(16)})}t({},"FunctionExecutionParameters",()=>nu);class nu{constructor(e,t,r){this.count=0,this.executionContext=new Map,this.valueExtractors=new Map,this.functionRepository=e,this.schemaRepository=t,this.executionId=r??nE()}getExecutionId(){return this.executionId}getContext(){return this.context}setContext(e){this.context=e;let t=new nt(e);return this.valueExtractors.set(t.getPrefix(),t),this}getArguments(){return this.args}setArguments(e){return this.args=e,this}getEvents(){return this.events}setEvents(e){return this.events=e,this}getStatementExecution(){return this.statementExecution}setStatementExecution(e){return this.statementExecution=e,this}getSteps(){return this.steps}setSteps(e){this.steps=e;let t=new nr(e);return this.valueExtractors.set(t.getPrefix(),t),this}getCount(){return this.count}setCount(e){return this.count=e,this}getValuesMap(){return this.valueExtractors}getFunctionRepository(){return this.functionRepository}setFunctionRepository(e){return this.functionRepository=e,this}getSchemaRepository(){return this.schemaRepository}setSchemaRepository(e){return this.schemaRepository=e,this}addTokenValueExtractor(...e){for(let t of e)this.valueExtractors.set(t.getPrefix(),t);return this}setValuesMap(e){for(let[t,r]of e.entries())this.valueExtractors.set(t,r);return this}setExecutionContext(e){return this.executionContext=e,this}getExecutionContext(){return this.executionContext}}t({},"StatementMessageType",()=>nA);var nA=((E={}).ERROR="ERROR",E.WARNING="WARNING",E.MESSAGE="MESSAGE",E);class nl extends eN{static{this.PARAMETER_NEEDS_A_VALUE='Parameter "$" needs a value'}static{this.STEP_REGEX_PATTERN=RegExp("Steps\\.([a-zA-Z0-9\\\\-]{1,})\\.([a-zA-Z0-9\\\\-]{1,})","g")}static{this.VERSION=1}static{this.MAX_EXECUTION_ITERATIONS=1e7}constructor(e,t=!1){if(super(),this.debugMode=!1,this.debugMode=t,this.fd=e,this.fd.getVersion()>nl.VERSION)throw new F("Runtime is at a lower version "+nl.VERSION+" and trying to run code from version "+this.fd.getVersion()+".")}getSignature(){return this.fd}async getExecutionPlan(e,t){let r=new nn;for(let s of Array.from(this.fd.getSteps().values()))r.addVertex(await this.prepareStatementExecution(s,e,t));return Array.from(this.makeEdges(r).getT2().entries()).forEach(e=>{let t=r.getNodeMap().get(e[0])?.getData();t&&t.addMessage(nA.ERROR,e[1])}),r}async internalExecute(e){e.getContext()||e.setContext(new Map),e.getEvents()||e.setEvents(new Map),e.getSteps()||e.setSteps(new Map),e.getArguments()&&e.addTokenValueExtractor(new ns(e.getArguments())),this.debugMode&&(console.log(`EID: ${e.getExecutionId()} Executing: ${this.fd.getNamespace()}.${this.fd.getName()}`),console.log(`EID: ${e.getExecutionId()} Parameters: `,e));let t=await this.getExecutionPlan(e.getFunctionRepository(),e.getSchemaRepository());this.debugMode&&console.log(`EID: ${e.getExecutionId()} ${t?.toString()}`);let r=t.getVerticesData().filter(e=>e.getMessages().length).map(e=>e.getStatement().getStatementName()+": \n"+e.getMessages().join(","));if(r?.length)throw new F("Please fix the errors in the function definition before execution : \n"+r.join(",\n"));return await this.executeGraph(t,e)}async executeGraph(e,t){let r=new k;r.addAll(e.getVerticesWithNoIncomingEdges());let s=new k;for(;(!r.isEmpty()||!s.isEmpty())&&!t.getEvents()?.has(G.OUTPUT);)if(await this.processBranchQue(t,r,s),await this.processExecutionQue(t,r,s),t.setCount(t.getCount()+1),t.getCount()==nl.MAX_EXECUTION_ITERATIONS)throw new F("Execution locked in an infinite loop");if(!e.isSubGraph()&&!t.getEvents()?.size){let e=this.getSignature().getEvents();if(e.size&&e.get(G.OUTPUT)?.getParameters()?.size)throw new F("No events raised")}let n=Array.from(t.getEvents()?.entries()??[]).flatMap(e=>e[1].map(t=>$.of(e[0],t)));return new B(n.length||e.isSubGraph()?n:[$.of(G.OUTPUT,new Map)])}async processExecutionQue(e,t,r){if(!t.isEmpty()){let s=t.pop();await this.allDependenciesResolvedVertex(s,e.getSteps())?await this.executeVertex(s,e,r,t,e.getFunctionRepository()):t.add(s)}}async processBranchQue(e,t,r){if(r.length){let s=r.pop();await this.allDependenciesResolvedTuples(s.getT2(),e.getSteps())?await this.executeBranch(e,t,s):r.add(s)}}async executeBranch(e,t,r){let s,n=r.getT4();do if(r.getT1().getVerticesData().map(e=>e.getStatement().getStatementName()).forEach(t=>e.getSteps()?.delete(t)),await this.executeGraph(r.getT1(),e),(s=r.getT3().next())&&(e.getSteps()?.has(n.getData().getStatement().getStatementName())||e.getSteps()?.set(n.getData().getStatement().getStatementName(),new Map),e.getSteps()?.get(n.getData().getStatement().getStatementName())?.set(s.getName(),this.resolveInternalExpressions(s.getResult(),e)),this.debugMode)){let t=n.getData().getStatement();console.log(`EID: ${e.getExecutionId()} Step : ${t.getStatementName()} => ${t.getNamespace()}.${t.getName()}`),console.log(`EID: ${e.getExecutionId()} Event : ${s.getName()} : `,e.getSteps().get(t.getStatementName()).get(s.getName()))}while(s&&s.getName()!=G.OUTPUT)s?.getName()==G.OUTPUT&&n.getOutVertices().has(G.OUTPUT)&&(n?.getOutVertices()?.get(G.OUTPUT)??[]).forEach(async r=>{await this.allDependenciesResolvedVertex(r,e.getSteps())&&t.add(r)})}async executeVertex(e,t,r,s,n){let a,i=e.getData().getStatement();if(i.getExecuteIftrue().size&&!(Array.from(i.getExecuteIftrue().entries())??[]).filter(e=>e[1]).map(([e])=>new rS(e).evaluate(t.getValuesMap())).every(e=>!l(e)&&!1!==e))return;let o=await n.find(i.getNamespace(),i.getName());if(!o)throw new F(H.format("$.$ function is not found.",i.getNamespace(),i.getName()));let E=o?.getSignature().getParameters(),u=this.getArgumentsFromParametersMap(t,i,E??new Map);this.debugMode&&(console.log(`EID: ${t.getExecutionId()} Step : ${i.getStatementName()} => ${i.getNamespace()}.${i.getName()}`),console.log(`EID: ${t.getExecutionId()} Arguments : `,u));let A=t.getContext();a=o instanceof nl?new nu(t.getFunctionRepository(),t.getSchemaRepository(),`${t.getExecutionId()}_${i.getStatementName()}`).setArguments(u).setValuesMap(new Map(Array.from(t.getValuesMap().values()).filter(e=>e.getPrefix()!==ns.PREFIX&&e.getPrefix()!==nr.PREFIX&&e.getPrefix()!==nt.PREFIX).map(e=>[e.getPrefix(),e]))):new nu(t.getFunctionRepository(),t.getSchemaRepository(),t.getExecutionId()).setValuesMap(t.getValuesMap()).setContext(A).setArguments(u).setEvents(t.getEvents()).setSteps(t.getSteps()).setStatementExecution(e.getData()).setCount(t.getCount()).setExecutionContext(t.getExecutionContext());let T=await o.execute(a),c=T.next();if(!c)throw new F(H.format("Executing $ returned no events",i.getStatementName()));let g=c.getName()==G.OUTPUT;if(t.getSteps()?.has(i.getStatementName())||t.getSteps().set(i.getStatementName(),new Map),t.getSteps().get(i.getStatementName()).set(c.getName(),this.resolveInternalExpressions(c.getResult(),t)),this.debugMode&&(console.log(`EID: ${t.getExecutionId()} Step : ${i.getStatementName()} => ${i.getNamespace()}.${i.getName()}`),console.log(`EID: ${t.getExecutionId()} Event : ${c.getName()} : `,t.getSteps().get(i.getStatementName()).get(c.getName()))),g){let r=e.getOutVertices().get(G.OUTPUT);r&&r.forEach(async e=>{await this.allDependenciesResolvedVertex(e,t.getSteps())&&s.add(e)})}else{let t=e.getSubGraphOfType(c.getName()),s=this.makeEdges(t).getT1();r.push(new z(t,s,T,e))}}resolveInternalExpressions(e,t){return e?Array.from(e.entries()).map(e=>new q(e[0],this.resolveInternalExpression(e[1],t))).reduce((e,t)=>(e.set(t.getT1(),t.getT2()),e),new Map):e}resolveInternalExpression(e,t){if(l(e)||"object"!=typeof e)return e;if(e instanceof ni)return new rS(e.getExpression()).evaluate(t.getValuesMap());if(Array.isArray(e)){let r=[];for(let s of e)r.push(this.resolveInternalExpression(s,t));return r}if("object"==typeof e){let r={};for(let s of Object.entries(e))r[s[0]]=this.resolveInternalExpression(s[1],t);return r}}allDependenciesResolvedTuples(e,t){for(let r of e)if(!t.has(r.getT1())||!t.get(r.getT1())?.get(r.getT2()))return!1;return!0}allDependenciesResolvedVertex(e,t){return!e.getInVertices().size||0==Array.from(e.getInVertices()).filter(e=>{let r=e.getT1().getData().getStatement().getStatementName(),s=e.getT2();return!(t.has(r)&&t.get(r)?.has(s))}).length}getArgumentsFromParametersMap(e,t,r){return Array.from(t.getParameterMap().entries()).map(t=>{let s,n=Array.from(t[1]?.values()??[]);if(!n?.length)return new q(t[0],s);let a=r.get(t[0]);return a?(s=a.isVariableArgument()?n.sort((e,t)=>(e.getOrder()??0)-(t.getOrder()??0)).filter(e=>!l(e)).map(t=>this.parameterReferenceEvaluation(e,t)).flatMap(e=>Array.isArray(e)?e:[e]):this.parameterReferenceEvaluation(e,n[0]),new q(t[0],s)):new q(t[0],void 0)}).filter(e=>!l(e.getT2())).reduce((e,t)=>(e.set(t.getT1(),t.getT2()),e),new Map)}parameterReferenceEvaluation(e,t){let r;return t.getType()==no.VALUE?r=this.resolveInternalExpression(t.getValue(),e):t.getType()!=no.EXPRESSION||X.isNullOrBlank(t.getExpression())||(r=new rS(t.getExpression()??"").evaluate(e.getValuesMap())),r}async prepareStatementExecution(e,t,r){let s=new ne(e),n=await t.find(e.getNamespace(),e.getName());if(!n)return s.addMessage(nA.ERROR,H.format("$.$ is not available",e.getNamespace(),e.getName())),Promise.resolve(s);let a=new Map(n.getSignature().getParameters());if(!e.getParameterMap())return Promise.resolve(s);for(let t of Array.from(e.getParameterMap().entries())){let e=a.get(t[0]);if(!e)continue;let n=Array.from(t[1]?.values()??[]);if(!n.length&&!e.isVariableArgument()){await Z.hasDefaultValueOrNullSchemaType(e.getSchema(),r)||s.addMessage(nA.ERROR,H.format(nl.PARAMETER_NEEDS_A_VALUE,e.getParameterName())),a.delete(e.getParameterName());continue}if(e.isVariableArgument())for(let t of(n.sort((e,t)=>(e.getOrder()??0)-(t.getOrder()??0)),n))this.parameterReferenceValidation(s,e,t,r);else if(n.length){let t=n[0];this.parameterReferenceValidation(s,e,t,r)}a.delete(e.getParameterName())}if(!l(s.getStatement().getDependentStatements()))for(let e of Array.from(s.getStatement().getDependentStatements().entries()))e[1]&&s.addDependency(e[0]);if(!l(s.getStatement().getExecuteIftrue()))for(let e of Array.from(s.getStatement().getExecuteIftrue().entries()))e[1]&&this.addDependencies(s,e[0]);if(a.size)for(let e of Array.from(a.values()))!e.isVariableArgument()&&(await Z.hasDefaultValueOrNullSchemaType(e.getSchema(),r)||s.addMessage(nA.ERROR,H.format(nl.PARAMETER_NEEDS_A_VALUE,e.getParameterName())));return Promise.resolve(s)}async parameterReferenceValidation(e,t,r,s){if(r){if(r.getType()==no.VALUE){if(l(r.getValue())&&!await Z.hasDefaultValueOrNullSchemaType(t.getSchema(),s)&&e.addMessage(nA.ERROR,H.format(nl.PARAMETER_NEEDS_A_VALUE,t.getParameterName())),l(r.getValue()))return;let n=new k;for(n.push(new q(t.getSchema(),r.getValue()));!n.isEmpty();){let t=n.pop();if(t.getT2()instanceof ni)this.addDependencies(e,t.getT2().getExpression());else{if(l(t.getT1())||l(t.getT1().getType()))continue;if(t.getT1().getType()?.contains(c.ARRAY)&&Array.isArray(t.getT2())){let e=t.getT1().getItems();if(!e)continue;if(e.isSingleType())for(let r of t.getT2())n.push(new q(e.getSingleSchema(),r));else{let r=t.getT2();for(let t=0;t<r.length;t++)n.push(new q(e.getTupleSchema()[t],r[t]))}}else if(t.getT1().getType()?.contains(c.OBJECT)&&"object"==typeof t.getT2()){let r=t.getT1();if(r.getName()===U.EXPRESSION.getName()&&r.getNamespace()===U.EXPRESSION.getNamespace()){let r=t.getT2();r.isExpression&&this.addDependencies(e,r.value)}else if(r.getProperties())for(let e of Object.entries(t.getT2()))r.getProperties().has(e[0])&&n.push(new q(r.getProperties().get(e[0]),e[1]))}}}}else if(r.getType()==no.EXPRESSION)if(X.isNullOrBlank(r.getExpression()))l(Z.getDefaultValue(t.getSchema(),s))&&e.addMessage(nA.ERROR,H.format(nl.PARAMETER_NEEDS_A_VALUE,t.getParameterName()));else try{this.addDependencies(e,r.getExpression())}catch(t){e.addMessage(nA.ERROR,H.format("Error evaluating $ : $",r.getExpression(),t))}}else l(await Z.getDefaultValue(t.getSchema(),s))&&e.addMessage(nA.ERROR,H.format(nl.PARAMETER_NEEDS_A_VALUE,t.getParameterName()))}addDependencies(e,t){t&&Array.from(t.match(nl.STEP_REGEX_PATTERN)??[]).forEach(t=>e.addDependency(t))}makeEdges(e){let t=e.getNodeMap().values(),r=[],s=new Map;for(let n of Array.from(t))for(let t of Array.from(n.getData().getDependencies())){let a=t.indexOf(".",6),i=t.substring(6,a),o=t.indexOf(".",a+1),E=-1==o?t.substring(a+1):t.substring(a+1,o);e.getNodeMap().has(i)?n.addInEdgeTo(e.getNodeMap().get(i),E):(r.push(new q(i,E)),s.set(n.getData().getStatement().getStatementName(),H.format("Unable to find the step with name $",i)))}return new q(r,s)}}t({},"KIRunConstants",()=>nT);class nT{static{this.NAMESPACE="namespace"}static{this.NAME="name"}static{this.ID="id"}constructor(){}}t({},"Position",()=>nc);class nc{static{this.SCHEMA_NAME="Position"}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName(nc.SCHEMA_NAME).setType(m.of(c.OBJECT)).setProperties(new Map([["left",I.ofFloat("left")],["top",I.ofFloat("top")]]))}constructor(e,t){this.left=e,this.top=t}getLeft(){return this.left}setLeft(e){return this.left=e,this}getTop(){return this.top}setTop(e){return this.top=e,this}static from(e){if(e)return new nc(e.left,e.top)}}t({},"FunctionDefinition",()=>nf),t({},"Statement",()=>nR),t({},"AbstractStatement",()=>ng);class ng{constructor(e){if(this.override=!1,!e)return;this.comment=e.comment,this.description=e.description,this.position=e.position?new nc(e.position.getLeft(),e.position.getTop()):void 0,this.override=e.override}getComment(){return this.comment}setComment(e){return this.comment=e,this}isOverride(){return this.override}setOverride(e){return this.override=e,this}getDescription(){return this.description}setDescription(e){return this.description=e,this}getPosition(){return this.position}setPosition(e){return this.position=e,this}}t({},"ParameterReference",()=>nh);class nh{static{this.SCHEMA_NAME="ParameterReference"}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName(nh.SCHEMA_NAME).setType(m.of(c.OBJECT)).setProperties(new Map([["key",I.ofString("key")],["value",I.ofAny("value")],["expression",I.ofString("expression")],["type",I.ofString("type").setEnums(["EXPRESSION","VALUE"])],["order",I.ofInteger("order")]]))}constructor(e){e instanceof nh?(this.key=e.key,this.type=e.type,this.value=l(e.value)?void 0:JSON.parse(JSON.stringify(e.value)),this.expression=e.expression,this.order=e.order):(this.type=e,this.key=nE())}getType(){return this.type}setType(e){return this.type=e,this}getKey(){return this.key}setKey(e){return this.key=e,this}getValue(){return this.value}setValue(e){return this.value=e,this}getExpression(){return this.expression}setExpression(e){return this.expression=e,this}setOrder(e){return this.order=e,this}getOrder(){return this.order}static ofExpression(e){let t=new nh(no.EXPRESSION).setExpression(e);return[t.getKey(),t]}static ofValue(e){let t=new nh(no.VALUE).setValue(e);return[t.getKey(),t]}static from(e){return new nh(e.type).setValue(e.value).setExpression(e.expression).setKey(e.key).setOrder(e.order)}}class nR extends ng{static{this.SCHEMA_NAME="Statement"}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName(nR.SCHEMA_NAME).setType(m.of(c.OBJECT)).setProperties(new Map([["statementName",I.ofString("statementName")],["comment",I.ofString("comment")],["description",I.ofString("description")],["namespace",I.ofString("namespace")],["name",I.ofString("name")],["dependentStatements",I.ofObject("dependentstatement").setAdditionalProperties(new w().setSchemaValue(I.ofBoolean("exists"))).setDefaultValue({})],["executeIftrue",I.ofObject("executeIftrue").setAdditionalProperties(new w().setSchemaValue(I.ofBoolean("exists"))).setDefaultValue({})],["parameterMap",new I().setName("parameterMap").setAdditionalProperties(new w().setSchemaValue(I.ofObject("parameterReference").setAdditionalProperties(new w().setSchemaValue(nh.SCHEMA))))],["position",nc.SCHEMA]]))}constructor(e,t,r){if(super(e instanceof nR?e:void 0),e instanceof nR)this.statementName=e.statementName,this.name=e.name,this.namespace=e.namespace,e.parameterMap&&(this.parameterMap=new Map(Array.from(e.parameterMap.entries()).map(e=>[e[0],new Map(Array.from(e[1].entries()).map(e=>[e[0],new nh(e[1])]))]))),e.dependentStatements&&(this.dependentStatements=new Map(Array.from(e.dependentStatements.entries())));else{if(this.statementName=e,!r||!t)throw Error("Unknown constructor");this.namespace=t,this.name=r}}getStatementName(){return this.statementName}setStatementName(e){return this.statementName=e,this}getNamespace(){return this.namespace}setNamespace(e){return this.namespace=e,this}getName(){return this.name}setName(e){return this.name=e,this}getParameterMap(){return this.parameterMap||(this.parameterMap=new Map),this.parameterMap}setParameterMap(e){return this.parameterMap=e,this}getDependentStatements(){return this.dependentStatements??new Map}setDependentStatements(e){return this.dependentStatements=e,this}getExecuteIftrue(){return this.executeIftrue??new Map}setExecuteIftrue(e){return this.executeIftrue=e,this}equals(e){return e instanceof nR&&e.statementName==this.statementName}static ofEntry(e){return[e.statementName,e]}static from(e){return new nR(e.statementName,e.namespace,e.name).setParameterMap(new Map(Object.entries(e.parameterMap??{}).map(([e,t])=>[e,new Map(Object.entries(t??{}).map(([e,t])=>nh.from(t)).map(e=>[e.getKey(),e]))]))).setDependentStatements(new Map(Object.entries(e.dependentStatements??{}))).setExecuteIftrue(new Map(Object.entries(e.executeIftrue??{}))).setPosition(nc.from(e.position)).setComment(e.comment).setDescription(e.description)}}t({},"StatementGroup",()=>nm);class nm extends ng{static{this.SCHEMA_NAME="StatementGroup"}static{this.SCHEMA=new I().setNamespace(A.SYSTEM).setName(nm.SCHEMA_NAME).setType(m.of(c.OBJECT)).setProperties(new Map([["statementGroupName",I.ofString("statementGroupName")],["comment",I.ofString("comment")],["description",I.ofString("description")],["position",nc.SCHEMA]]))}constructor(e,t=new Map){super(),this.statementGroupName=e,this.statements=t}getStatementGroupName(){return this.statementGroupName}setStatementGroupName(e){return this.statementGroupName=e,this}getStatements(){return this.statements}setStatements(e){return this.statements=e,this}static from(e){return new nm(e.statementGroupName,new Map(Object.entries(e.statements||{}).map(([e,t])=>[e,(""+t)?.toLowerCase()=="true"]))).setPosition(nc.from(e.position)).setComment(e.comment).setDescription(e.description)}}let np=new I().setNamespace(A.SYSTEM).setName("FunctionDefinition").setProperties(new Map([["name",I.ofString("name")],["namespace",I.ofString("namespace")],["parameters",I.ofArray("parameters",U.SCHEMA)],["events",I.ofObject("events").setAdditionalProperties(new w().setSchemaValue(G.SCHEMA))],["steps",I.ofObject("steps").setAdditionalProperties(new w().setSchemaValue(nR.SCHEMA))]]));np.getProperties()?.set("parts",I.ofArray("parts",np));class nf extends Y{static{this.SCHEMA=np}constructor(e){super(e),this.version=1}getVersion(){return this.version}setVersion(e){return this.version=e,this}getSteps(){return this.steps??new Map}setSteps(e){return this.steps=e,this}getStepGroups(){return this.stepGroups}setStepGroups(e){return this.stepGroups=e,this}getParts(){return this.parts}setParts(e){return this.parts=e,this}static from(e){return e?new nf(e.name).setSteps(new Map(Object.values(e.steps??{}).filter(e=>!!e).map(e=>[e.statementName,nR.from(e)]))).setStepGroups(new Map(Object.values(e.stepGroups??{}).filter(e=>!!e).map(e=>[e.statementGroupName,nm.from(e)]))).setParts(Array.from(e.parts??[]).filter(e=>!!e).map(e=>nf.from(e))).setVersion(e.version??1).setEvents(new Map(Object.values(e.events??{}).filter(e=>!!e).map(e=>[e.name,G.from(e)]))).setParameters(new Map(Object.values(e.parameters??{}).filter(e=>!!e).map(e=>[e.parameterName,U.from(e)]))).setNamespace(e.namespace):new nf("unknown")}}t({},"Argument",()=>nN);class nN{constructor(e,t,r){this.argumentIndex=0,this.argumentIndex=e,this.name=t,this.value=r}getArgumentIndex(){return this.argumentIndex}setArgumentIndex(e){return this.argumentIndex=e,this}getName(){return this.name}setName(e){return this.name=e,this}getValue(){return this.value}setValue(e){return this.value=e,this}static of(e,t){return new nN(0,e,t)}}export{C as KIRunSchemaRepository,s3 as KIRunFunctionRepository,eP as PrimitiveUtil,V as MapUtil,v as MapEntry,l as isNullValue,k as LinkedList,ez as StringBuilder,H as StringFormatter,X as StringUtil,q as Tuple2,K as Tuple3,z as Tuple4,ey as ArrayUtil,W as deepEqual,eL as duplicate,ne as StatementExecution,s8 as StatementMessage,tT as ContextElement,nt as ContextTokenValueExtractor,nr as OutputMapTokenValueExtractor,ns as ArgumentsTokenValueExtractor,na as GraphVertex,nn as ExecutionGraph,nl as KIRuntime,nA as StatementMessageType,nu as FunctionExecutionParameters,e2 as Expression,e5 as TokenValueExtractor,rp as LiteralTokenValueExtractor,e7 as ObjectValueSetterExtractor,rS as ExpressionEvaluator,e1 as Operation,eZ as ExpressionToken,eQ as ExpressionEvaluationException,e0 as ExpressionTokenValue,eN as AbstractFunction,A as Namespaces,ni as JsonExpression,w as AdditionalType,I as Schema,P as SchemaDetails,en as NumberValidator,er as BooleanValidator,es as NullValidator,et as ArrayValidator,ee as AnyOfAllOfOneOfValidator,eo as StringValidator,ea as ObjectValidator,ef as SchemaValidator,Q as SchemaValidationException,y as SchemaReferenceException,ep as TypeValidator,T as ArraySchemaType,R as SingleType,m as TypeUtil,h as MultipleType,g as Type,c as SchemaType,Z as SchemaUtil,ei as StringFormat,sz as HybridRepository,nT as KIRunConstants,U as Parameter,B as FunctionOutput,nc as Position,nf as FunctionDefinition,no as ParameterReferenceType,$ as EventResult,ng as AbstractStatement,nR as Statement,nm as StatementGroup,Y as FunctionSignature,G as Event,x as ParameterType,nN as Argument,nh as ParameterReference,ew as ExecutionException,F as KIRuntimeException,rA as ArithmeticUnaryMinusOperator,rT as ArithmeticUnaryPlusOperator,rg as BitwiseComplementOperator,rR as LogicalNotOperator,ru as UnaryOperator,tS as ArithmeticAdditionOperator,td as ArithmeticDivisionOperator,tP as ArithmeticIntegerDivisionOperator,ty as ArithmeticModulusOperator,tL as ArithmeticMultiplicationOperator,tb as ArithmeticSubtractionOperator,tv as ArrayOperator,tM as BinaryOperator,tD as BitwiseAndOperator,t$ as BitwiseLeftShiftOperator,tB as BitwiseOrOperator,tH as BitwiseRightShiftOperator,tj as BitwiseUnsignedRightShiftOperator,tX as BitwiseXorOperator,tq as LogicalAndOperator,tz as LogicalEqualOperator,tZ as LogicalGreaterThanEqualOperator,t1 as LogicalGreaterThanOperator,t5 as LogicalLessThanEqualOperator,t4 as LogicalNotEqualOperator,t6 as LogicalLessThanOperator,t8 as LogicalOrOperator,rt as ObjectOperator,rs as LogicalNullishCoalescingOperator,ra as ArrayRangeOperator,r_ as ConditionalTernaryOperator};
|
|
2
2
|
//# sourceMappingURL=module.js.map
|