var TcHmi;!function(TcHmi){!function(Controls){!function(Helpers){class CallbackManagerBase{constructor(){this.__callbacks=new Set}add(callback){return this.__callbacks.add(callback),()=>this.remove(callback)}remove(callback){this.__callbacks.delete(callback)}getManipulators(){return Object.freeze({add:this.add.bind(this),remove:this.remove.bind(this)})}}Helpers.CallbackManager=class extends CallbackManagerBase{trigger(...args){let result=[];for(const callback of this.__callbacks)result.push(callback(...args));return result}};Helpers.AsyncCallbackManager=class extends CallbackManagerBase{trigger(...args){return 0===this.__callbacks.size?Promise.resolve([]):new Promise(((resolve,reject)=>{let results=[],pendingCallbacks=this.__callbacks.size;function onPromiseSettled(index,result){results[index]=result,0==--pendingCallbacks&&resolve(results)}let index=0;for(const callback of this.__callbacks){const closureIndex=index++;callback(...args).then((value=>{onPromiseSettled(closureIndex,{status:"fulfilled",value:value})}),(reason=>{onPromiseSettled(closureIndex,{status:"rejected",reason:reason})}))}}))}}}(Controls.Helpers||(Controls.Helpers={}))}(TcHmi.Controls||(TcHmi.Controls={}))}(TcHmi||(TcHmi={}));