text: var TcHmi,__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(receiver,state,kind,f){if("a"===kind&&!f)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof state?receiver!==state||!f:!state.has(receiver))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===kind?f:"a"===kind?f.call(receiver):f?f.value:state.get(receiver)};!function(TcHmi){!function(Controls){!function(Beckhoff){var _a,_TcHmiRecipeSelect_tchmiFQN;class TcHmiRecipeSelect extends TcHmi.Controls.System.TcHmiControl{constructor(element,pcElement,attrs){super(element,pcElement,attrs),this.__serverDomainDestroyWatchCallback=null,this.__serverDomainIsValid=!1,this.__buttonActivate=null,this.__buttonTeach=null,this.__topMostButtonOK=null,this.__topMostButtonCancel=null,this.__destroyButtonActivateOnPressed=null,this.__destroyButtonTeachOnPressed=null,this.__destroyTopMostButtonOKOnPressed=null,this.__destroyTopMostButtonCancelPressed=null,this.__currentSelectionFolderTemp=null,this.__currentSelectionRecipeTemp=null,this.__currentSelectionFolder=null,this.__currentSelectionRecipe=null,this.__currentActiveRecipes=null,this.__breadcrumbScrollingMouseDown=!1,this.__topMostLayerOpened=!1,this.__breadcrumbItems=[],this.__subscrIdGetActiveRecipes=null,this.__subscrIdCurrentSelectionFolderRecipes=null,this.__localizedElements=new Map,this.__localizationReader=void 0,this.__destroyLocalizationWatch=null;let tempDivTopMostSelection=document.createElement("div");tempDivTopMostSelection.innerHTML='<div class="TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection"><h1>Header_Recipes</h1><div class="TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_list"></div></div>',this.__elementTopMostSelection=tempDivTopMostSelection.firstElementChild,this.__addLocalizedElement(this.__elementTopMostSelection.querySelector("h1"),"Header_Recipes"),this.__elementTopMostSelection&&(this.__elementTopMostSelectionList=this.__elementTopMostSelection.querySelector(".TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_list"))}__previnit(){if(this.__elementTemplateRoot=this.__element[0].querySelector(".TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-template"),!this.__elementTemplateRoot)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-template");if(this.__elementSelectDiv=this.__elementTemplateRoot.querySelector(".TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-1"),!this.__elementSelectDiv)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-1");if(this.__elementBreadcrumbScrollContainer=this.__elementTemplateRoot.querySelector(".TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-breadcrumb-scroll-container"),!this.__elementBreadcrumbScrollContainer)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-breadcrumb-scroll-container");if(this.__elementBreadcrumbList=this.__elementTemplateRoot.querySelector(".TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-breadcrumb-list"),!this.__elementBreadcrumbList)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-breadcrumb-list");let localizedElements=this.__element[0].querySelectorAll("[data-tchmi-localized-content-key]");for(let i=0,ii=localizedElements.length;i<ii;i++){let element=localizedElements[i],localizeKey=element.dataset.tchmiLocalizedContentKey;localizeKey&&this.__localizedElements.set(element,{key:localizeKey})}this.__destroyLocalizationWatch=this.__localization.watch(data=>{if(data.error===TcHmi.Errors.NONE&&data.reader){this.__localizationReader=data.reader;for(const[element,info]of this.__localizedElements){let localizedText=data.reader.get(info.key);info.parameters&&(localizedText=tchmi_format_string(localizedText,...info.parameters)),element.textContent=tchmi_decode_control_characters(localizedText)}}}),super.__previnit()}__init(){if(!this.__elementTemplateRoot)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-template");if(!this.__elementSelectDiv)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-1");if(!this.__elementBreadcrumbScrollContainer)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-breadcrumb-scroll-container");if(!this.__elementBreadcrumbList)throw new Error("Invalid Template.html - Missing element with class: TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-breadcrumb-list");TCHMI_DESIGNER||(this.__elementSelectDivMouseDownListener=this.__onSelectDivMouseDown(),this.__elementSelectDiv.addEventListener("mousedown",this.__elementSelectDivMouseDownListener,{passive:!1,capture:!1}),this.__elementBreadcrumbScrollContainerMouseDownListener=this.__onBreadcrumbScrollingContainerMouseDown(),this.__elementBreadcrumbScrollContainer.addEventListener("mousedown",this.__elementBreadcrumbScrollContainerMouseDownListener,{passive:!1,capture:!1}));let elementRow1Cell2=this.__elementTemplateRoot.querySelector(".TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-2");this.__buttonActivate=TcHmi.ControlFactory.createEx("TcHmi.Controls.Beckhoff.TcHmiButton",this.__id+"_ButtonActivate",{"data-tchmi-left":"0","data-tchmi-top":"0","data-tchmi-right":"0","data-tchmi-bottom":"0","data-tchmi-text":"%l%Control::TcHmi.Controls.Beckhoff.TcHmiRecipeSelect::Button_Text_Activate%/l%","data-tchmi-tooltip":"%l%Control::TcHmi.Controls.Beckhoff.TcHmiRecipeSelect::Button_Tooltip_Activate%/l%","data-tchmi-text-font-size-unit":"px","data-tchmi-text-font-style":"Auto","data-tchmi-text-font-weight":"Auto"},this),TCHMI_DESIGNER||(this.__destroyButtonActivateOnPressed=TcHmi.EventProvider.register(this.__id+"_ButtonActivate.onPressed",this.__onButtonActivePressed())),this.__buttonActivate&&elementRow1Cell2&&elementRow1Cell2.appendChild(this.__buttonActivate.getElement()[0]);let elementRow1Cell3=this.__elementTemplateRoot.querySelector(".TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-3");this.__buttonTeach=TcHmi.ControlFactory.createEx("TcHmi.Controls.Beckhoff.TcHmiButton",this.__id+"_ButtonTeach",{"data-tchmi-left":"0","data-tchmi-top":"0","data-tchmi-right":"0","data-tchmi-bottom":"0","data-tchmi-text":"%l%Control::TcHmi.Controls.Beckhoff.TcHmiRecipeSelect::Button_Text_Teach%/l%","data-tchmi-tooltip":"%l%Control::TcHmi.Controls.Beckhoff.TcHmiRecipeSelect::Button_Tooltip_Teach%/l%","data-tchmi-text-font-size-unit":"px","data-tchmi-text-font-style":"Auto","data-tchmi-text-font-weight":"Auto"},this),TCHMI_DESIGNER||(this.__destroyButtonTeachOnPressed=TcHmi.EventProvider.register(this.__id+"_ButtonTeach.onPressed",this.__onButtonTeachPressed())),this.__buttonTeach&&elementRow1Cell3&&elementRow1Cell3.appendChild(this.__buttonTeach.getElement()[0]),this.__topMostButtonOK=TcHmi.ControlFactory.createEx("TcHmi.Controls.Beckhoff.TcHmiButton",this.__id+"_TopMostButtonOK",{"data-tchmi-text":"%l%Control::TcHmi.Controls.Beckhoff.TcHmiRecipeSelect::Button_Text_Ok%/l%","data-tchmi-width":"75","data-tchmi-height":"35","data-tchmi-right":"90"},this),TCHMI_DESIGNER||(this.__destroyTopMostButtonOKOnPressed=TcHmi.EventProvider.register(this.__id+"_TopMostButtonOK.onPressed",this.__onTopMostButtonOKPressed())),this.__topMostButtonCancel=TcHmi.ControlFactory.createEx("TcHmi.Controls.Beckhoff.TcHmiButton",this.__id+"_TopMostButtonCancel",{"data-tchmi-text":"%l%Control::TcHmi.Controls.Beckhoff.TcHmiRecipeSelect::Button_Text_Cancel%/l%","data-tchmi-width":"75","data-tchmi-height":"35","data-tchmi-right":"10"},this),TCHMI_DESIGNER||(this.__destroyTopMostButtonCancelPressed=TcHmi.EventProvider.register(this.__id+"_TopMostButtonCancel.onPressed",this.__onTopMostButtonCancelPressed())),this.__elementTopMostSelection&&this.__topMostButtonOK&&this.__elementTopMostSelection.appendChild(this.__topMostButtonOK.getElement()[0]),this.__elementTopMostSelection&&this.__topMostButtonCancel&&this.__elementTopMostSelection.appendChild(this.__topMostButtonCancel.getElement()[0]),TCHMI_DESIGNER||this.__processSelection(),super.__init()}__attach(){if(!TCHMI_DESIGNER&&this.__serverDomain&&(this.__serverDomainDestroyWatchCallback=TcHmi.Server.Domains.watch(this.__serverDomain,this.__onServerDomainWatchCallback())),super.__attach(),!TCHMI_DESIGNER){const activeEventOptions={passive:!1,capture:!1};this.__documentMouseUpListener=this.__onDocumentMouseUp(),document.addEventListener("mouseup",this.__documentMouseUpListener,activeEventOptions),this.__documentMouseMoveListener=this.__onDocumentMouseMove(),document.addEventListener("mousemove",this.__documentMouseMoveListener,activeEventOptions)}}__detach(){this.__serverDomainDestroyWatchCallback&&(this.__serverDomainDestroyWatchCallback(),this.__serverDomainDestroyWatchCallback=null),this.__unwatchActiveRecipes(),this.__serverDomainIsValid=!1;const activeEventOptions={passive:!1,capture:!1};this.__documentMouseUpListener&&(document.removeEventListener("mouseup",this.__documentMouseUpListener,activeEventOptions),this.__documentMouseUpListener=void 0),this.__documentMouseMoveListener&&(document.removeEventListener("mousemove",this.__documentMouseMoveListener,activeEventOptions),this.__documentMouseMoveListener=void 0),super.__detach()}destroy(){var _b;if(!this.__keepAlive){this.__destroyButtonActivateOnPressed&&(this.__destroyButtonActivateOnPressed(),this.__destroyButtonActivateOnPressed=null),this.__destroyButtonTeachOnPressed&&(this.__destroyButtonTeachOnPressed(),this.__destroyButtonTeachOnPressed=null),this.__destroyTopMostButtonOKOnPressed&&(this.__destroyTopMostButtonOKOnPressed(),this.__destroyTopMostButtonOKOnPressed=null),this.__destroyTopMostButtonCancelPressed&&(this.__destroyTopMostButtonCancelPressed(),this.__destroyTopMostButtonCancelPressed=null),this.__elementSelectDiv&&this.__elementSelectDivMouseDownListener&&(this.__elementSelectDiv.removeEventListener("mousedown",this.__elementSelectDivMouseDownListener),this.__elementSelectDivMouseDownListener=null),this.__elementBreadcrumbScrollContainer&&this.__elementBreadcrumbScrollContainerMouseDownListener&&(this.__elementBreadcrumbScrollContainer.removeEventListener("mousedown",this.__elementBreadcrumbScrollContainerMouseDownListener),this.__elementBreadcrumbScrollContainerMouseDownListener=null),this.__serverDomainDestroyWatchCallback&&(this.__serverDomainDestroyWatchCallback(),this.__serverDomainDestroyWatchCallback=null);for(const breadcrumbItem of this.__breadcrumbItems)breadcrumbItem&&breadcrumbItem.breadcrumbElement&&breadcrumbItem.breadcrumbEventListenerClick&&breadcrumbItem.breadcrumbElement.removeEventListener("click",breadcrumbItem.breadcrumbEventListenerClick);TcHmi.TopMostLayer.remove(this,$(this.__elementTopMostSelection)),null===(_b=this.__destroyLocalizationWatch)||void 0===_b||_b.call(this),this.__destroyLocalizationWatch=null,super.destroy()}}__addLocalizedElement(element,key,...parameters){let info={key:key};if(0!==parameters.length&&(info.parameters=parameters),this.__localizedElements.set(element,info),this.__localizationReader){let localizedText=this.__localizationReader.get(key);info.parameters&&(localizedText=tchmi_format_string(localizedText,...info.parameters)),element.textContent=tchmi_decode_control_characters(localizedText)}}__removeLocalizedElement(element){this.__localizedElements.delete(element)}__onServerDomainWatchCallback(){return data=>{data&&data.error===TcHmi.Errors.NONE?data.value&&"Initialized"===data.value.state?(this.setIsEnabled(!0),this.__serverDomainIsValid=!0,this.__watchActiveRecipes()):(this.setIsEnabled(!1),this.__serverDomainIsValid=!1,this.__unwatchActiveRecipes(),TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Domain: "+this.__serverDomain+" is not loaded. Please make sure the server extension is activated.")):(this.setIsEnabled(!1),this.__serverDomainIsValid=!1,this.__unwatchActiveRecipes(),TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Domain: "+this.__serverDomain+" is not known. Please make sure the server extension is loaded and the domain name is correct."))}}__processAccessConfig(){var _b,_c,_d,_e;super.__processAccessConfig();let teachRecipe=TcHmi.Access.checkAccess(this,"teachRecipe");null===teachRecipe&&(teachRecipe=!1),null===(_b=this.__buttonTeach)||void 0===_b||_b.getElement()[0].classList.toggle("TcHmi_Controls_System_TcHmiControl-operate-disallowed",!teachRecipe),null===(_c=this.__buttonTeach)||void 0===_c||_c.setIsEnabled(teachRecipe);let activateRecipe=TcHmi.Access.checkAccess(this,"activateRecipe");null===activateRecipe&&(activateRecipe=!1),null===(_d=this.__buttonActivate)||void 0===_d||_d.getElement()[0].classList.toggle("TcHmi_Controls_System_TcHmiControl-operate-disallowed",!activateRecipe),null===(_e=this.__buttonActivate)||void 0===_e||_e.setIsEnabled(activateRecipe)}setServerDomain(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ServerDomain")),tchmi_equal(convertedValue,this.__serverDomain)||(this.__serverDomain=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ServerDomain"}),this.__processServerDomain())}getServerDomain(){return this.__serverDomain}__processServerDomain(){!1!==this.__isAttached&&(this.__unwatchActiveRecipes(),this.__serverDomainDestroyWatchCallback&&(this.__serverDomainDestroyWatchCallback(),this.__serverDomainDestroyWatchCallback=null),!TCHMI_DESIGNER&&this.__serverDomain&&(this.__serverDomainDestroyWatchCallback=TcHmi.Server.Domains.watch(this.__serverDomain,this.__onServerDomainWatchCallback())))}setServerInterval(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ServerInterval")),tchmi_equal(convertedValue,this.__serverInterval)||(this.__serverInterval=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ServerInterval"}),this.__processServerInterval())}getServerInterval(){return this.__serverInterval}__processServerInterval(){this.__unwatchActiveRecipes(),this.__watchActiveRecipes()}getSelectedRecipeFullName(){return this.__currentSelectionRecipe&&this.__currentSelectionRecipe.key?this.__currentSelectionRecipe.path?this.__currentSelectionRecipe.path+"::"+this.__currentSelectionRecipe.key:this.__currentSelectionRecipe.key:null}getSelectedRecipeName(){return this.__currentSelectionRecipe&&this.__currentSelectionRecipe.key?this.__currentSelectionRecipe.key:null}getSelectedRecipePath(){return this.__currentSelectionRecipe&&this.__currentSelectionRecipe.path?this.__currentSelectionRecipe.path:null}__processesActiveRecipe(){if(this.__currentSelectionRecipe){let fullPath;this.__currentSelectionRecipe&&this.__currentSelectionRecipe.path&&(fullPath||(fullPath=""),fullPath+=this.__currentSelectionRecipe.path),this.__currentSelectionRecipe&&this.__currentSelectionRecipe.key&&(fullPath?fullPath+="::":fullPath="",fullPath+=this.__currentSelectionRecipe.key),fullPath&&this.__currentActiveRecipes&&this.__currentActiveRecipes.indexOf(fullPath)>-1?this.__elementSelectDiv&&this.__elementSelectDiv.classList.add("TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-1-active"):this.__elementSelectDiv&&this.__elementSelectDiv.classList.remove("TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-1-active")}else this.__elementSelectDiv&&this.__elementSelectDiv.classList.remove("TcHmi_Controls_Beckhoff_TcHmiRecipeSelect-table-1-row-1-cell-1-active")}__watchActiveRecipes(){if(TCHMI_DESIGNER)return;if(!this.__isAttached)return;if(null!==this.__subscrIdGetActiveRecipes)return;if(!this.__currentSelectionRecipe)return;let domain=this.__serverDomain;domain||(domain="TcHmiRecipeManagement");let interval=this.__serverInterval;interval||(interval=0);let symbol=domain+".GetActiveRecipes",command={commandOptions:["SendErrorMessage","SendWriteValue"],symbol:symbol};if(this.__currentSelectionRecipe){let csrFQN=this.getSelectedRecipeFullName();csrFQN&&(command.writeValue=[csrFQN])}this.__subscrIdGetActiveRecipes=TcHmi.Server.subscribeEx([command],interval,{parallel:!0},data=>{if(data.error===TcHmi.Errors.NONE){let response=data.response;if(!response)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] "+domain+".GetActiveRecipes: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_RESPONSE_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_RESPONSE_MISSING],reason:"Missing response from server.",domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));if(response.error)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] "+domain+".GetActiveRecipes: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_RESPONSE_ERROR,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_RESPONSE_ERROR],reason:"Error in response from server with id: "+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect",errors:[response.error]})));let commands=response.commands;if(!commands)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] "+domain+".GetActiveRecipes: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_COMMANDS_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_COMMANDS_MISSING],reason:"Missing commands in response from server with id: "+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));let command=null;for(let i=0,ii=commands.length;i<ii;i++){if(command=commands[i],command.symbol===symbol){if(command.error)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] "+domain+".GetActiveRecipes: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_COMMAND_ERROR,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_COMMAND_ERROR],reason:'Error in command for symbol: "'+domain+'.GetActiveRecipes" in response from server with id: '+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect",errors:[command.error]})));break}command=null}if(!command)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] "+domain+".GetActiveRecipes: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_COMMAND_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_COMMAND_MISSING],reason:'Missing command for symbol: "'+symbol+'" in response from server with id: '+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));let rv=command.readValue;if(!rv)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] "+domain+".GetActiveRecipes: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_READVALUE_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_READVALUE_MISSING],reason:'Missing property: "readValue" in command for symbol: '+symbol+'" in response from server with id: '+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));this.__currentActiveRecipes=rv,this.__processesActiveRecipe()}})}__unwatchActiveRecipes(){null!==this.__subscrIdGetActiveRecipes&&(TcHmi.Server.unsubscribeEx(this.__subscrIdGetActiveRecipes,{parallel:!0}),this.__subscrIdGetActiveRecipes=null)}__watchCurrentSelectionFolderRecipes(){if(TCHMI_DESIGNER)return;if(!this.__isAttached)return;if(null!==this.__subscrIdCurrentSelectionFolderRecipes)return;let domain=this.__serverDomain;domain||(domain="TcHmiRecipeManagement");let interval=this.__serverInterval;interval||(interval=0);let path=null;this.__currentSelectionFolder&&(path="",this.__currentSelectionFolder.path&&(path+=this.__currentSelectionFolder.path+"::"),this.__currentSelectionFolder.key&&(path+=this.__currentSelectionFolder.key));let symbol=domain+".Config::recipeList";path&&(symbol+="::"+path),this.__subscrIdCurrentSelectionFolderRecipes=TcHmi.Server.subscribeEx([{commandOptions:["SendErrorMessage","SendWriteValue"],symbol:symbol}],interval,{parallel:!0},data=>{if(data.error===TcHmi.Errors.NONE){let response=data.response;if(!response)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Current folder recipe watching failed with error: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_RESPONSE_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_RESPONSE_MISSING],reason:"Missing response from server.",domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));if(response.error)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Current folder recipe watching failed with error: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_RESPONSE_ERROR,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_RESPONSE_ERROR],reason:"Error in response from server with id: "+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect",errors:[response.error]})));let commands=response.commands;if(!commands)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Current folder recipe watching failed with error: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_COMMANDS_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_COMMANDS_MISSING],reason:"Missing commands in response from server with id: "+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));let command=null;for(let i=0,ii=commands.length;i<ii;i++){if(command=commands[i],command.symbol===symbol){if(command.error&&512!==command.error.code)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Current folder recipe watching failed with error: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_COMMAND_ERROR,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_COMMAND_ERROR],reason:'Error in command for symbol: "'+symbol+'" in response from server with id: '+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect",errors:[command.error]})));command.error&&512===command.error.code&&(this.__currentSelectionFolder=null,this.__currentSelectionRecipe=null,this.__processSelection());break}command=null}if(!command)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Current folder recipe watching failed with error: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_COMMAND_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_COMMAND_MISSING],reason:'Missing command for symbol: "'+symbol+'" in response from server with id: '+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));let rv=command.readValue;if(!rv)return void(TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Current folder recipe watching failed with error: "+TcHmi.Log.buildMessage({code:TcHmi.Errors.E_SERVER_READVALUE_MISSING,message:TcHmi.Errors[TcHmi.Errors.E_SERVER_READVALUE_MISSING],reason:'Missing property: "readValue" in command for symbol: "'+symbol+'" in response from server with id: '+response.id,domain:"TcHmi.Controls.Beckhoff.TcHmiRecipeSelect"})));this.__currentSelectionRecipe&&this.__currentSelectionRecipe.key&&data&&rv&&!rv[this.__currentSelectionRecipe.key]&&(this.__currentSelectionRecipe=null,this.__processSelection())}else TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] Current folder recipe watching failed with error: "+TcHmi.Log.buildMessage(data.details))})}__unwatchCurrentSelectionFolderRecipes(){null!==this.__subscrIdCurrentSelectionFolderRecipes&&(TcHmi.Server.unsubscribeEx(this.__subscrIdCurrentSelectionFolderRecipes,{parallel:!0}),this.__subscrIdCurrentSelectionFolderRecipes=null)}__processSelection(){if(TCHMI_DESIGNER)return;this.__currentSelectionFolder&&this.__currentSelectionRecipe?this.__elementSelectDiv&&this.__currentSelectionRecipe.key&&(this.__removeLocalizedElement(this.__elementSelectDiv),this.__elementSelectDiv.innerText=this.__currentSelectionRecipe.key):this.__elementSelectDiv&&this.__addLocalizedElement(this.__elementSelectDiv,"Label_Text_Select");let breadcrumbItems=this.__breadcrumbItems;for(let i=0,ii=breadcrumbItems.length;i<ii;i++){let breadcrumbItem=breadcrumbItems[i];breadcrumbItem&&breadcrumbItem.breadcrumbElement&&breadcrumbItem.breadcrumbEventListenerClick&&breadcrumbItem.breadcrumbElement.removeEventListener("click",breadcrumbItem.breadcrumbEventListenerClick)}breadcrumbItems.splice(0,breadcrumbItems.length);let tempBreadcrumbElement=document.createElement("ul");tempBreadcrumbElement.innerHTML="<li><a>/</a></li>";let breadcrumbItem={type:TcHmiRecipeSelect.RecipeItemType.Folder,breadcrumbElement:tempBreadcrumbElement.firstElementChild};if(breadcrumbItem.breadcrumbEventListenerClick=this.__onBreadcrumbItemClicked(breadcrumbItem),breadcrumbItem.breadcrumbElement&&breadcrumbItem.breadcrumbElement.addEventListener("click",breadcrumbItem.breadcrumbEventListenerClick),breadcrumbItems.push(breadcrumbItem),this.__currentSelectionFolder&&this.__elementBreadcrumbList){for(;this.__elementBreadcrumbList.firstChild;)this.__elementBreadcrumbList.removeChild(this.__elementBreadcrumbList.firstChild);let path=this.__currentSelectionFolder.path,key=this.__currentSelectionFolder.key,partialPath="";if(path){let tokens=path.split("::");for(let i=0,ii=tokens.length;i<ii;i++){let token=tokens[i],tempBreadcrumbElement=document.createElement("ul");tempBreadcrumbElement.innerHTML="<li><a>"+token+"</a></li>";let breadcrumbItem={type:TcHmiRecipeSelect.RecipeItemType.Folder,path:partialPath,key:token,breadcrumbElement:tempBreadcrumbElement.firstElementChild};breadcrumbItem.breadcrumbEventListenerClick=this.__onBreadcrumbItemClicked(breadcrumbItem),breadcrumbItem.breadcrumbElement&&breadcrumbItem.breadcrumbElement.addEventListener("click",breadcrumbItem.breadcrumbEventListenerClick),breadcrumbItems.push(breadcrumbItem),partialPath.length>0?partialPath+="::"+token:partialPath+=token}}if(key){let tempBreadcrumbElement=document.createElement("ul");tempBreadcrumbElement.innerHTML="<li><a>"+key+"</a></li>";let breadcrumbItem={type:TcHmiRecipeSelect.RecipeItemType.Folder,path:partialPath,key:key,breadcrumbElement:tempBreadcrumbElement.firstElementChild};breadcrumbItem.breadcrumbEventListenerClick=this.__onBreadcrumbItemClicked(breadcrumbItem),breadcrumbItem.breadcrumbElement&&breadcrumbItem.breadcrumbElement.addEventListener("click",breadcrumbItem.breadcrumbEventListenerClick),breadcrumbItems.push(breadcrumbItem)}}if(this.__elementBreadcrumbList){let fragment=document.createDocumentFragment();for(let i=0,ii=breadcrumbItems.length;i<ii;i++){let breadcrumb=breadcrumbItems[i];breadcrumb.breadcrumbElement&&fragment.appendChild(breadcrumb.breadcrumbElement)}for(;this.__elementBreadcrumbList&&this.__elementBreadcrumbList.firstChild;)this.__elementBreadcrumbList.removeChild(this.__elementBreadcrumbList.firstChild);this.__elementBreadcrumbList.append(fragment),this.__elementBreadcrumbScrollContainer&&(this.__elementBreadcrumbScrollContainer.scrollLeft=this.__elementBreadcrumbScrollContainer.clientWidth+1024)}this.__processesActiveRecipe(),this.__unwatchActiveRecipes(),this.__watchActiveRecipes(),this.__unwatchCurrentSelectionFolderRecipes(),this.__watchCurrentSelectionFolderRecipes()}__displayTopMostSelectionFolder(folder,path){if(TCHMI_DESIGNER)return;if(!this.__elementTopMostSelection)return;if(!this.__elementTopMostSelectionList)return;if(!folder)return;let selectedRecipeChanged=!1;if(path){let pathNew,pathTokens=path.split("::"),key=pathTokens.pop();pathTokens.length>0&&(pathNew=pathTokens.join("::")),this.__currentSelectionFolderTemp={type:TcHmiRecipeSelect.RecipeItemType.Folder,path:pathNew,key:key,payload:folder}}else this.__currentSelectionFolderTemp={type:TcHmiRecipeSelect.RecipeItemType.Folder,payload:folder};for(;this.__elementTopMostSelectionList.firstChild;)this.__elementTopMostSelectionList.removeChild(this.__elementTopMostSelectionList.firstChild);let list=document.createElement("ul");this.__elementTopMostSelectionList.appendChild(list);let folders=[],recipes=[];for(let key in this.__currentSelectionFolderTemp.payload){let payload=this.__currentSelectionFolderTemp.payload[key];if(payload&&void 0!==payload.recipeTypeName){let tempDivListItem=document.createElement("div");tempDivListItem.innerHTML='<li class="TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_item TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_item_recipe">'+key+"</li>";let item={type:TcHmiRecipeSelect.RecipeItemType.Recipe,key:key,payload:payload,selectionElement:tempDivListItem.firstElementChild};path&&(item.path=path),item.selectionEventListenerClick=this.__onTopMostRecipeItemClicked(item),item.selectionEventListenerDoubleClick=this.__onTopMostRecipeItemDoubleClicked(item),item.selectionElement&&(item.selectionElement.addEventListener("click",item.selectionEventListenerClick),item.selectionElement.addEventListener("dblclick",item.selectionEventListenerDoubleClick),this.__currentSelectionRecipe&&this.__currentSelectionRecipe.path===item.path&&this.__currentSelectionRecipe.key===item.key&&(item.selectionElement.classList.add("TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selected"),this.__currentSelectionRecipe=item,selectedRecipeChanged=!0)),recipes.push(item)}else{let tempDivListItem=document.createElement("div");tempDivListItem.innerHTML='<li class="TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_item TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_item_folder">'+key+"</li>";let item={type:TcHmiRecipeSelect.RecipeItemType.Folder,key:key,payload:payload,selectionElement:tempDivListItem.firstElementChild};path&&(item.path=path),item.selectionEventListenerClick=this.__onTopMostRecipeItemClicked(item),item.selectionElement&&item.selectionElement.addEventListener("click",item.selectionEventListenerClick),folders.push(item)}}if(this.__currentSelectionFolderTemp.key){let tempDivListItem=document.createElement("div");tempDivListItem.innerHTML='<li class="TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_item TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selection_item_folder">..</li>';let pathTokens=path?path.split("::"):[];pathTokens.pop();let key=pathTokens.pop(),pathNew=pathTokens.join("::"),item={type:TcHmiRecipeSelect.RecipeItemType.Folder,key:key,path:pathNew,selectionElement:tempDivListItem.firstElementChild};item.selectionElement&&(list.append(item.selectionElement),item.selectionElement.addEventListener("click",this.__onTopMostRecipeItemClicked(item)))}for(let i=0,ii=folders.length;i<ii;i++){let folder=folders[i];folder.selectionElement&&list.append(folder.selectionElement)}for(let i=0,ii=recipes.length;i<ii;i++){let recipe=recipes[i];recipe.selectionElement&&list.append(recipe.selectionElement)}selectedRecipeChanged&&(TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipeFullName"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipeName"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipePath"}))}__openTopMostSelectionFolder(path){this.__serverDomainIsValid&&TcHmi.Server.RecipeManagement.listRecipesEx({path:path,domain:this.__serverDomain},null,data=>{data.error===TcHmi.Errors.NONE?data.value&&this.__displayTopMostSelectionFolder(data.value,path):TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] TcHmi.Server.RecipeManagement.listRecipesEx failed. "+TcHmi.Log.buildMessage(data.details))})}__onTopMostRecipeItemClicked(item){return e=>{var _b,_c,_d,_e,_f,_g;if(item.type===TcHmiRecipeSelect.RecipeItemType.Folder)item.path?this.__openTopMostSelectionFolder(item.path+"::"+item.key):item.key?this.__openTopMostSelectionFolder(item.key):this.__openTopMostSelectionFolder();else if(item.type===TcHmiRecipeSelect.RecipeItemType.Recipe){this.__currentSelectionRecipeTemp=item;for(let i=0,ii=null===(_d=null===(_c=null===(_b=null==item?void 0:item.selectionElement)||void 0===_b?void 0:_b.parentElement)||void 0===_c?void 0:_c.children)||void 0===_d?void 0:_d.length;i<ii;i++){let child=null===(_f=null===(_e=null==item?void 0:item.selectionElement)||void 0===_e?void 0:_e.parentElement)||void 0===_f?void 0:_f.children[i];null==child||child.classList.remove("TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selected")}null===(_g=null==item?void 0:item.selectionElement)||void 0===_g||_g.classList.add("TcHmi_Controls_Beckhoff_TcHmiRecipeSelect_topmost_selected")}}}__onTopMostRecipeItemDoubleClicked(item){return e=>{if(item.type===TcHmiRecipeSelect.RecipeItemType.Recipe){if(!this.__serverDomainIsValid)return;if(!this.getIsEnabled())return;if(!TcHmi.Access.checkAccess(this,"operate"))return;this.__currentSelectionFolder=this.__currentSelectionFolderTemp,this.__currentSelectionRecipe=this.__currentSelectionRecipeTemp,this.__processSelection(),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipeFullName"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipeName"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipePath"}),TcHmi.TopMostLayer.remove(this,$(this.__elementTopMostSelection))}}}__onSelectDivMouseDown(){return event=>{if(!this.getIsEnabled())return;if(!TcHmi.Access.checkAccess(this,"operate"))return;if(event&&0!==event.button)return;let path;this.__currentSelectionFolder&&this.__currentSelectionFolder.path&&this.__currentSelectionFolder.key?path=this.__currentSelectionFolder.path+"::"+this.__currentSelectionFolder.key:this.__currentSelectionFolder&&this.__currentSelectionFolder.key&&(path=this.__currentSelectionFolder.key),this.__topMostLayerOpened||(this.__topMostLayerOpened=!0,TcHmi.TopMostLayer.add(this,$(this.__elementTopMostSelection),{removeCb:data=>{this.__topMostLayerOpened=!1},centerHorizontal:!0,centerVertical:!0})),this.__openTopMostSelectionFolder(path)}}__onBreadcrumbItemClicked(item){return e=>{if(!this.__serverDomainIsValid)return;let path;item.path?path=item.path+"::"+item.key:item.key&&(path=item.key),this.__topMostLayerOpened||(this.__topMostLayerOpened=!0,TcHmi.TopMostLayer.add(this,$(this.__elementTopMostSelection),{removeCb:data=>{this.__topMostLayerOpened=!1},centerHorizontal:!0,centerVertical:!0})),this.__openTopMostSelectionFolder(path)}}__onBreadcrumbScrollingContainerMouseDown(){return event=>{this.__serverDomainIsValid&&this.getIsEnabled()&&TcHmi.Access.checkAccess(this,"operate")&&(event&&0!==event.button||(this.__breadcrumbScrollingMouseDown=!0))}}__onDocumentMouseUp(){return event=>{if(this.__serverDomainIsValid&&this.getIsEnabled()&&TcHmi.Access.checkAccess(this,"operate")&&(!event||0===event.button)){if(this.__elementBreadcrumbScrollContainer&&this.__breadcrumbScrollingMouseDown){(breadcrumbItems=>{setTimeout(()=>{for(let i=0,ii=breadcrumbItems.length;i<ii;i++){let breadcrumbItem=breadcrumbItems[i];breadcrumbItem&&breadcrumbItem.breadcrumbElement&&breadcrumbItem.breadcrumbEventListenerClick&&breadcrumbItem.breadcrumbElement.addEventListener("click",breadcrumbItem.breadcrumbEventListenerClick)}},300)})(this.__breadcrumbItems)}this.__breadcrumbScrollingMouseDown=!1}}}__onDocumentMouseMove(){return event=>{if(this.__serverDomainIsValid&&this.getIsEnabled()&&TcHmi.Access.checkAccess(this,"operate")&&(!event||0===event.button)&&this.__elementBreadcrumbScrollContainer&&this.__breadcrumbScrollingMouseDown){this.__elementBreadcrumbScrollContainer.scrollLeft=this.__elementBreadcrumbScrollContainer.scrollLeft+-event.movementX;let breadcrumbItems=this.__breadcrumbItems;for(let i=0,ii=breadcrumbItems.length;i<ii;i++){let breadcrumbItem=breadcrumbItems[i];breadcrumbItem&&breadcrumbItem.breadcrumbElement&&breadcrumbItem.breadcrumbEventListenerClick&&breadcrumbItem.breadcrumbElement.removeEventListener("click",breadcrumbItem.breadcrumbEventListenerClick)}}}}__onTopMostButtonOKPressed(){return(e,data)=>{this.__serverDomainIsValid&&this.getIsEnabled()&&TcHmi.Access.checkAccess(this,"operate")&&(this.__currentSelectionFolder=this.__currentSelectionFolderTemp,this.__currentSelectionRecipe=this.__currentSelectionRecipeTemp,this.__processSelection(),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipeFullName"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipeName"}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"SelectedRecipePath"}),TcHmi.TopMostLayer.remove(this,$(this.__elementTopMostSelection)))}}__onTopMostButtonCancelPressed(){return(e,data)=>{this.__serverDomainIsValid&&this.getIsEnabled()&&TcHmi.Access.checkAccess(this,"operate")&&TcHmi.TopMostLayer.remove(this,$(this.__elementTopMostSelection))}}__onButtonActivePressed(){return(e,data)=>{this.__serverDomainIsValid&&this.getIsEnabled()&&TcHmi.Access.checkAccess(this,"operate")&&TcHmi.Access.checkAccess(this,"activateRecipe")&&this.__currentSelectionRecipe&&this.__currentSelectionRecipe.key&&TcHmi.Server.RecipeManagement.activateEx(this.__currentSelectionRecipe.key,this.__currentSelectionRecipe.path?this.__currentSelectionRecipe.path:null,{domain:this.__serverDomain},null,data=>{data.error!==TcHmi.Errors.NONE&&TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] TcHmi.Server.RecipeManagement.activateEx failed. "+TcHmi.Log.buildMessage(data.details))})}}__onButtonTeachPressed(){return(e,data)=>{this.__serverDomainIsValid&&this.getIsEnabled()&&TcHmi.Access.checkAccess(this,"operate")&&TcHmi.Access.checkAccess(this,"teachRecipe")&&this.__currentSelectionRecipe&&this.__currentSelectionRecipe.key&&TcHmi.Server.RecipeManagement.teachEx(this.__currentSelectionRecipe.key,this.__currentSelectionRecipe.path?this.__currentSelectionRecipe.path:null,{domain:this.__serverDomain},null,data=>{data.error!==TcHmi.Errors.NONE&&TCHMI_CONSOLE_LOG_LEVEL>=1&&TcHmi.Log.errorEx("[Source=Control, Module="+this.__type+(__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN)!==this.__type?", Origin="+__classPrivateFieldGet(TcHmiRecipeSelect,_a,"f",_TcHmiRecipeSelect_tchmiFQN):"")+", Id="+this.getId()+"] TcHmi.Server.RecipeManagement.teachEx failed. "+TcHmi.Log.buildMessage(data.details))})}}}_TcHmiRecipeSelect_tchmiFQN={value:"TcHmi.Controls.Beckhoff."+(_a=TcHmiRecipeSelect).name},Beckhoff.TcHmiRecipeSelect=TcHmiRecipeSelect,function(TcHmiRecipeSelect){let RecipeItemType;!function(RecipeItemType){RecipeItemType[RecipeItemType.Invalid=0]="Invalid",RecipeItemType[RecipeItemType.Recipe=1]="Recipe",RecipeItemType[RecipeItemType.Folder=2]="Folder"}(RecipeItemType=TcHmiRecipeSelect.RecipeItemType||(TcHmiRecipeSelect.RecipeItemType={}))}(TcHmiRecipeSelect=Beckhoff.TcHmiRecipeSelect||(Beckhoff.TcHmiRecipeSelect={}))}(Controls.Beckhoff||(Controls.Beckhoff={}))}(TcHmi.Controls||(TcHmi.Controls={}))}(TcHmi||(TcHmi={})),TcHmi.Controls.registerEx("TcHmiRecipeSelect","TcHmi.Controls.Beckhoff",TcHmi.Controls.Beckhoff.TcHmiRecipeSelect);