diff --git a/www/js/app.js b/www/js/app.js index a4dd5c6..00ff5b3 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1,2 +1,2 @@ -"use strict";Array.prototype.remove=function(){for(var e,t,n=arguments,i=n.length;i&&this.length;)for(e=n[--i];-1!==(t=this.indexOf(e));)this.splice(t,1);return this},console.debug||(console.debug=console.log),"undefined"==typeof Number&&(console.log("define Number"),Number=function(e){return parseFloat(e)}),Object.assign||(Object.assign=$.extend);var $iframeDialog=null,configNotSaved=null,showConfig=null,defaults={},customPostInits={},FORBIDDEN_CHARS=/[\]\[*,;'"`<>\\\s?]/g,adapterRedirect=function(e,t){e&&setTimeout(function(){e+=document.location.pathname,e+=document.location.hash,document.location.href=e},t||5e3)},gMain=null;function detectIE(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(0td"),a=H.data[n.key];function s(e){return'
'+e+"
"}if(a){i.eq(0).css({overflow:"hidden","white-space":"nowrap"});var o=a.desc.indexOf("div>div").css("height: 22px !important"),u(2,a.keywords).attr("title",a.keywords),i.eq(3).html(a.installed),i.eq(4).html(a.version),u(5,a.license),u(6,a.install),H.initButtons(n.key),H.isCollapsed[a.group]&&(H.isCollapsed[a.group]=!1,H.main.saveConfig("adaptersIsCollapsed",JSON.stringify(H.isCollapsed)))}else{i.eq(0).css({"font-weight":"bold"}),i.eq(0).find("img").remove(),i.eq(0).find("span.fancytree-title").attr("style","padding-left: 0px !important");for(var c=0;c'+l+' / '+H.tree[c].children.length+"]",i.eq(1).html(s(''+l+" "+_("of")+' '+H.tree[c].children.length+" "+_("Adapters from this Group installed")));break}}function u(e,t){return i.eq(e).html(s(t))}},gridnav:{autofocusInput:!1,handleCursorKeys:!0},filter:{mode:"hide",autoApply:!0},collapse:function(e,t){H.isCollapsed[t.node.key]||(H.isCollapsed[t.node.key]=!0,H.main.saveConfig("adaptersIsCollapsed",JSON.stringify(H.isCollapsed)))}}),H.$tab.find("#btn_collapse_adapters").show().off("click").on("click",function(){H.$tab.find(".process-adapters").show(),setTimeout(function(){H.$grid.fancytree("getRootNode").visit(function(e){(!H.filterVals.length||e.match||e.subMatch)&&e.setExpanded(!1)}),H.$tab.find(".process-adapters").hide()},100)}),H.$tab.find("#btn_expand_adapters").show().off("click").on("click",function(){H.$tab.find(".process-adapters").show(),setTimeout(function(){H.$grid.fancytree("getRootNode").visit(function(e){(!H.filterVals.length||e.match||e.subMatch)&&e.setExpanded(!0)}),H.$tab.find(".process-adapters").hide()},100)}),H.$tab.find("#btn_list_adapters").show().off("click").on("click",function(){var e=H.$tab.find(".process-adapters");e.show(),H.isList=!H.isList,H.isList?(H.$tab.find("#btn_list_adapters").addClass("red lighten-3"),H.$tab.find("#btn_expand_adapters").hide(),H.$tab.find("#btn_collapse_adapters").hide(),$(this).attr("title",_("list"))):(H.$tab.find("#btn_list_adapters").removeClass("red lighten-3"),H.$tab.find("#btn_expand_adapters").show(),H.$tab.find("#btn_collapse_adapters").show(),$(this).attr("title",_("tree"))),H.main.saveConfig("adaptersIsList",H.isList),e.show(),setTimeout(function(){H._postInit(!0),e.hide()},200)})),H.isList?(H.$tab.find("#btn_list_adapters").addClass("red lighten-3").attr("title",_("tree")),H.$tab.find("#btn_expand_adapters").hide(),H.$tab.find("#btn_collapse_adapters").hide()):(H.$tab.find("#btn_list_adapters").removeClass("red lighten-3").attr("title",_("list")),H.$tab.find("#btn_expand_adapters").show(),H.$tab.find("#btn_collapse_adapters").show()),H.$tab.find(".filter-input").trigger("change")}function n(){H.$grid.hide(),H.$tiles.show(),H.$tab.find("#main-toolbar-table-types-btn").show(),H.$tab.find("#btn_list_adapters").hide(),H.$tab.find("#btn_collapse_adapters").hide(),H.$tab.find("#btn_expand_adapters").hide(),H.$tab.find(".filter-input").trigger("change")}function i(){H.onlyUpdatable?(H.$tab.find("#btn_filter_updates").addClass("red lighten-3"),H.$tab.find("#btn_upgrade_all").show()):(H.$tab.find("#btn_upgrade_all").hide(),H.$tab.find("#btn_filter_updates").removeClass("red lighten-3"))}function a(){H.main.config.expertMode?(H.$tab.find("#btn_adapters_expert_mode").addClass("red lighten-3"),H.$tab.find("#btn_upgrade_all").show()):(H.$tab.find("#btn_adapters_expert_mode").removeClass("red lighten-3"),i())}function B(){var t=!1;H.currentFilter?H.$tiles.find(".tile").each(function(){var e=$(this);(!H.currentType||e.hasClass("class-"+H.currentType))&&G({key:e.data("id")})?(t=!0,e.show()):e.hide()}):H.currentType?(H.$tiles.find(".tile").hide(),H.$tiles.find(".class-"+H.currentType).show(),H.$tiles.find(".tile").each(function(){if($(this).is(":visible"))return!(t=!0)})):H.$tiles.find(".tile").show().each(function(){if($(this).is(":visible"))return!(t=!0)}),t?H.$tiles.find(".filtered-out").hide():H.$tiles.find(".filtered-out").show()}function G(e){if(H.currentFilter){if(!H.data[e.key])return!1;var t=H.data[e.key].title;t&&"object"==typeof t&&(t=t[systemLang]||t.en);var n=H.data[e.key].desc;return n&&"object"==typeof n&&(n=n[systemLang]||n.en),!!(H.data[e.key].name&&-1!==H.data[e.key].name.toLowerCase().indexOf(H.currentFilter)||t&&-1!==t.toLowerCase().indexOf(H.currentFilter)||H.data[e.key].keywords&&-1!==H.data[e.key].keywords.toLowerCase().indexOf(H.currentFilter)||n&&-1!==n.toLowerCase().indexOf(H.currentFilter))}return!0}function F(e,t){var n="";if(t.news)for(var i in t.news)if(t.news.hasOwnProperty(i)){if(systemLang===i&&(n+=(n?"\n":"")+t.news[i]),"en"===i||"cn"===i)continue;if(i===e)break;n+=(n?"\n":"")+(t.news[i][systemLang]||t.news[i].en)}return n}function Z(e){if(!e)return"";var t;if(e instanceof Array){t={};for(var n=0;n'),i}this.curRepository=null,this.curRepoLastUpdate=null,this.curInstalled=null,this.curRepoLastHost=null,this.list=[],this.$tab=$("#tab-adapters"),this.$grid=this.$tab.find("#grid-adapters"),this.$tiles=this.$tab.find("#grid-adapters-tiles"),this.$installDialog=$("#dialog-install-url"),this.main=e,this.tree=[],this.data={},this.urls={},this.groupImages={"common adapters_group":"img/common.png",general_group:"img/common.png",hardware_group:"img/hardware.png",lighting_group:"img/hardware.png",energy_group:"img/hardware.png",household_group:"img/hardware.png","iot-systems_group":"img/hardware.png","climate-control_group":"img/hardware.png",infrastructure_group:"img/hardware.png",garden_group:"img/hardware.png",alarm_group:"img/hardware.png",script_group:"img/script.png",logic_group:"img/script.png",media_group:"img/media.png",multimedia_group:"img/media.png",communication_group:"img/communication.png",protocols_group:"img/communication.png",network_group:"img/communication.png",messaging_group:"img/communication.png",visualisation_group:"img/visualisation.png",visualization_group:"img/visualisation.png","visualization-icons_group":"img/visualisation.png","visualization-widgets_group":"img/visualisation.png",storage_group:"img/storage.png",weather_group:"img/weather.png",schedule_group:"img/schedule.png",vis_group:"img/vis.png","date-and-time_group":"img/service.png",geoposition_group:"img/service.png",utility_group:"img/service.png","misc-data_group":"img/service.png",service_group:"img/service.png","third-party_group":"img/service.png"},this.inited=!1,this.isList=!1,this.filterVals={length:0},this.onlyInstalled=!1,this.onlyUpdatable=!1,this.currentFilter="",this.currentType="",this.isCollapsed={},this.isTiles=!0,this.types={occ:"schedule"},this.prepare=function(){this.$tab.find("#btn_switch_adapters").off("click").on("click",function(){H.$tab.find(".process-adapters").show(),H.isTiles=!H.isTiles,H.isTiles?(H.$tab.removeClass("view-table").addClass("view-tiles"),$(this).find("i").text("view_list")):($(this).find("i").text("view_module"),H.$tab.removeClass("view-tiles").addClass("view-table")),H.main.saveConfig("adaptersIsTiles",H.isTiles),setTimeout(function(){H.isTiles?n():t(),H._postInit(!0),H.$tab.find(".process-adapters").hide()},50)}),this.$tab.find("#btn_filter_adapters").off("click").on("click",function(){H.$tab.find(".process-adapters").show(),H.onlyInstalled=!H.onlyInstalled,H.onlyInstalled?H.$tab.find("#btn_filter_adapters").addClass("red lighten-3"):H.$tab.find("#btn_filter_adapters").removeClass("red lighten-3"),H.main.saveConfig("adaptersOnlyInstalled",H.onlyInstalled),setTimeout(function(){H._postInit(!0),H.$tab.find(".process-adapters").hide()},50)}),this.$tab.find("#btn_filter_updates").off("click").on("click",function(){H.$tab.find(".process-adapters").show(),H.onlyUpdatable=!H.onlyUpdatable,i(),H.main.saveConfig("adaptersOnlyUpdatable",H.onlyUpdatable),setTimeout(function(){H._postInit(!0),H.$tab.find(".process-adapters").hide()},200)}),this.$tab.find("#btn_filter_custom_url").off("click").on("click",function(){var e,t='",n=[];for(e in H.urls)H.urls.hasOwnProperty(e)&&n.push(e);n.sort();for(var i=0;i'+n[i]+"")}H.$installDialog.find("#install-github-link").html(t).val(H.main.config.adaptersGithub||""),H.$installDialog.modal(),H.$installDialog.find(".btn-install").off("click").on("click",function(){var e,t,n;if(!H.$installDialog.find('a[href="#tabs-install-github"]').hasClass("active"))(e=H.$installDialog.find("#install-url-link").val()).startsWith("http")&&e.endsWith(".git")&&(e="git+"+e),t=H.$installDialog.find("#install-url-debug").prop("checked")?" --debug":"",n="";else{var i=H.$installDialog.find("#install-github-link").val().split(" ");e=i[0],t=H.$installDialog.find("#install-github-debug").prop("checked")?" --debug":"",n=" "+i[1]}e?H.main.cmdExec(null,'url "'+e+'"'+n+t,function(e){e||H.init(!0,!0)}):H.main.showError(_("Invalid link"))}),H.$installDialog.find("#install-github-link").select(),H.$installDialog.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),H.$installDialog.modal("open"),H.$installDialog.find(".tabs").mtabs({nShow:function(e){e&&H.main.saveConfig("adaptersInstallTab",$(e).attr("id"))}}),H.main.config.adaptersInstallTab&&!H.main.noSelect&&H.$installDialog.find(".tabs").mtabs("select",H.main.config.adaptersInstallTab)}),this.$tab.find("#btn_upgrade_all").off("click").on("click",function(){H.main.confirmMessage(_("Do you want to upgrade all adapters?"),_("Please confirm"),"help",function(e){e&&H.main.cmdExec(null,"upgrade",function(e){e||H._postInit(!0)})})}),this.$tab.find("#btn_adapters_expert_mode").on("click",function(){H.main.config.expertMode=!H.main.config.expertMode,H.main.saveConfig("expertMode",H.main.config.expertMode),H.updateExpertMode(),H.main.tabs.instances.updateExpertMode()}),H.main.config.expertMode&&H.$tab.find("#btn_adapters_expert_mode").addClass("red lighten-3"),this.$installDialog.find("#install-github-link").on("change",function(){H.main.saveConfig("adaptersGithub",$(this).val())}),this.$installDialog.find("#install-url-link").on("keyup",function(e){13===e.which&&H.$installDialog.find("#dialog-install-url-button").trigger("click")}),this.isTiles=void 0===this.main.config.adaptersIsTiles||null===this.main.config.adaptersIsTiles||this.main.config.adaptersIsTiles,this.isList=this.main.config.adaptersIsList||!1,this.onlyInstalled=this.main.config.adaptersOnlyInstalled||!1,this.onlyUpdatable=this.main.config.adaptersOnlyUpdatable||!1,this.currentFilter=this.main.config.adaptersCurrentFilter||"",this.currentType=this.main.config.adaptersCurrentType||"",this.currentOrder=this.main.config.adaptersCurrentOrder||"a-z",this.isCollapsed=this.main.config.adaptersIsCollapsed?JSON.parse(this.main.config.adaptersIsCollapsed):{},this.currentFilter?(this.$tab.find(".filter-input").addClass("input-not-empty").val(H.currentFilter),this.$tab.find(".filter-clear").show()):this.$tab.find(".filter-clear").hide(),this.onlyInstalled?this.$tab.find("#btn_filter_adapters").addClass("red lighten-3"):this.$tab.find("#btn_filter_adapters").removeClass("red lighten-3"),this.onlyUpdatable?this.$tab.find("#btn_filter_updates").addClass("red lighten-3"):this.$tab.find("#btn_filter_updates").removeClass("red lighten-3"),"ie"===this.main.browser&&this.main.browserVersion<=10&&(this.isTiles=!1,this.$tab.find("#btn_switch_adapters").hide()),a(),this.$tab.find("#btn_refresh_adapters").on("click",function(){H.init(!0,!0)}),this.$tab.find(".filter-input").on("keyup",function(){$(this).trigger("change")}).on("change",function(e){H.filterTimer&&clearTimeout(H.filterTimer),H.filterTimer=setTimeout(function(){H.filterTimer=null,H.currentFilter=H.$tab.find(".filter-input").val().toLowerCase(),e&&e.target&&$(e.target)[H.currentFilter?"addClass":"removeClass"]("input-not-empty"),H.currentFilter?H.$tab.find(".filter-clear").show():H.$tab.find(".filter-clear").hide(),H.main.saveConfig("adaptersCurrentFilter",H.currentFilter),H.isTiles?B():H.$grid.fancytree("getTree").filterNodes(G,!1)},400)}),this.$tab.find(".filter-clear").on("click",function(){H.$tab.find(".filter-input").val("").trigger("change")}),this.isTiles?(this.$tab.find("#btn_switch_adapters").find("i").text("view_list"),H.$tab.removeClass("view-table").addClass("view-tiles"),n()):(H.$tab.removeClass("view-tiles").addClass("view-table"),t())},this.updateExpertMode=function(){this.init(!0),a()},this.getAdaptersInfo=function(e,t,n,i){if(e){if(!i)throw"Callback cannot be null or undefined";t&&(!this.curRepoLastUpdate||1e3<(new Date).getTime()-this.curRepoLastUpdate)&&(this.curRepository=null,this.curInstalled=null),this.curRunning?this.curRunning.push(i):(this.curRepository&&this.curRepoLastHost===e||(this.curRepository=null,this.main.socket.emit("sendToHost",e,"getRepository",{repo:this.main.systemConfig.common.activeRepo,update:n},function(e){"permissionError"===e&&(console.error('May not read "getRepository"'),e={}),H.curRepository=e||{},H.curRepository&&H.curInstalled&&H.curRunning&&(H.curRepoLastUpdate=(new Date).getTime(),setTimeout(function(){for(var e=0;e'+e+'',t&&(e+=''),e+=""}c.sort(),H.tree=[],H.data={};for(var m=0;m';for(var w=0;w',b!==p&&(g+=''+p+"",b&&(g+=" ~ ")),b&&(g+=''+b+""),g+=""):g+='',g+=''+n.version+"",h=''+n.version+"",g+="",!y&&H.onlyUpdatable)continue}i=u(a=i,y,M,v);var j=(n.type||H.types[o]||"common adapters")+"_group";C=(C="object"==typeof n.desc?n.desc[systemLang]||n.desc.en:n.desc)||"",C+=W(j,o,H.main.states["system.adapter."+o+".upload"]?H.main.states["system.adapter."+o+".upload"].val:0);var N=n.titleLang||n.title;if(N="object"==typeof N?N[systemLang]||N.en:N,H.data[o]={image:f?'':"",icon:f||"",stat:e[o]?e[o].stat:0,name:o,title:(N||"").replace("yunkong2 Visualisation - ",""),desc:C,news:M,updatableError:v,keywords:n.keywords?n.keywords.join(" "):"",version:i,installed:g,rawVersion:a,instances:p,rawInstalled:h,versionDate:n.versionDate,updatable:y,bold:n.highlight||!1,install:''+(H.main.config.expertMode?'':"")+"'+(H.main.config.expertMode?'':""),group:j,license:n.license||"",licenseUrl:n.licenseUrl||""},n.type||console.log('"'+o+'": "common adapters",'),n.type&&H.types[o]&&console.log('Adapter "'+o+'" has own type. Remove from admin.'),H.isList)H.tree.push({icon:f,title:H.data[o].title||o,key:o});else{for(var T=-1,L=0;L':"",icon:n.extIcon,stat:n.stat,name:o,title:(N||"").replace("yunkong2 Visualisation - ",""),desc:C,keywords:n.keywords?n.keywords.join(" "):"",rawVersion:a,version:i,bold:n.highlight,installed:"",versionDate:n.versionDate,install:''+(H.main.config.expertMode?'':""),license:n.license||"",licenseUrl:n.licenseUrl||"",group:j},n.type||console.log('"'+o+'": "common adapters",'),n.type&&H.types[o]&&console.log('Adapter "'+o+'" has own type. Remove from admin.'),H.isList)H.tree.push({icon:n.extIcon,title:H.data[o].title||o,key:o});else{for(var D=-1,I=0;IH.data[t].stat?-1:H.data[e].statH.data[t].versionDate?-1:H.data[e].versionDate',z+='
',z+='
',z+='
',z+=' ',z+=' '+S.title+"",z+=' more_vert',z+='
    ',z+="
  • "+d["Available version:"]+' "+S.rawVersion+""+(S.updatable?'':"")+"
  • ",S.installed&&(z+="
  • "+d["Installed version"]+': '+S.rawInstalled+"
  • "),S.instances&&(z+="
  • "+_("Installed instances")+': '+S.instances+"
  • "),z+="
",z+="
",z+=' ',z+='
',z+=' close',z+="

"+S.desc+"

",z+='
',z+=S.install,z+="
",z+="
","popular"===H.currentOrder&&S.stat?z+='
'+S.stat+"
":"updated"===H.currentOrder&&S.versionDate&&(z+='
'+J(S.versionDate,d.today,d.yesterday,d["1 %d days ago"],d["2 %d days ago"],d["5 %d days ago"],l)+"
"),z+="
",z+=""}for(var Y in z+='
',z+='
',z+='
',z+='
',z+=' '+_("Filtered out")+"",z+="
",z+=' ',z+="
",z+="
",H.$tiles.html(z),H.data)H.data.hasOwnProperty(Y)&&H.initButtons(Y);for(var R='
  • '+d.all+"
  • \n",Q=0;Q'+_(A[Q])+"\n";var P=H.$tab.find("#main-toolbar-table-types");P.html(R),P.find(".main-toolbar-table-types-item").show().off("click").on("click",function(){H.currentType=$(this).data("type")||"",B(),H.$tab.find("#main-toolbar-table-types-btn").html(_(H.currentType||"all")),H.main.saveConfig("adaptersCurrentType",H.currentType)}),H.currentType&&!d[H.currentType]&&(d[H.currentType]=_(H.currentType)),H.$tab.find("#main-toolbar-table-types-btn").html(d[H.currentType||"all"]).dropdown({constrainWidth:!1,gutter:0}),(P=H.$tab.find("#main-toolbar-table-order")).find(".main-toolbar-table-order-item").off("click").on("click",function(){H.currentOrder=$(this).data("type")||"",H.$tab.find("#main-toolbar-table-order-btn").html(_(H.currentOrder||"a-z")),H.main.saveConfig("adaptersCurrentOrder",H.currentOrder),H._postInit()}),H.currentOrder&&!d[H.currentOrder]&&(d[H.currentOrder]=_(H.currentOrder)),H.$tab.find("#main-toolbar-table-order-btn").show().html(d[H.currentOrder||"a-z"]).dropdown({constrainWidth:!1,gutter:0}),B()}else{H.$tab.find("#main-toolbar-table-types-btn").hide(),H.$tab.find("#main-toolbar-table-order-btn").hide(),H.$grid.fancytree("getTree").reload(H.tree),H.$grid.find(".fancytree-icon").each(function(){$(this).attr("src")&&$(this).css({width:18,height:18}),$(this).on("hover",function(){var e='
    ',t=$(e);t.insertAfter($(this)),$(this).data("big",t[0]);var n=parseFloat(t.height()),i=Math.round($(this).position().top-(n-parseFloat($(this).height()))/2);n+i>(window.innerHeight||document.documentElement.clientHeight)&&(i=(window.innerHeight||document.documentElement.clientHeight)-n),t.css({top:i})},function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)})}),H.currentFilter&&H.$grid.fancytree("getTree").filterNodes(G,!1),H.sortTree(),H.enableColResize();var U=["tab-adapters-table-name","tab-adapters-table-description","tab-adapters-table-keywords","tab-adapters-table-installed","tab-adapters-table-available","tab-adapters-table-license","tab-adapters-table-install"];H.$grid.find("tbody tr").each(function(){var e=0;$(this).find("td").each(function(){$(this).addClass(U[e]),e++})})}H.$tab.find(".grid-main-div").removeClass("order-a-z order-popular order-updated").addClass(H.currentOrder?"order-"+H.currentOrder:""),H.$tab.find(".process-adapters").hide(),H.updateCounter(s)})):this.enableColResize(),this.restoreScroll()},this.saveScroll=function(){this.scrollTop=this.$tab.find(".grid-main-div").scrollTop()},this.restoreScroll=function(){this.scrollTop&&this.$tab.find(".grid-main-div").scrollTop(this.scrollTop)},this.updateCounter=function(e){if(void 0===e)this.getAdaptersInfo(this.main.currentHost,!1,!1,function(e,t){var n=0;for(var i in t)if(t.hasOwnProperty(i)){var a=t?t[i]:null;if(a&&!a.controller&&"hosts"!==i){var s="";e[i]&&e[i].version&&(s=e[i].version),a.version&&!H.main.upToDate(s,a.version)&&n++}}H.updateCounter(n)});else if(e){var t=$("#updates-for-adapters");t.length?t.text(e):$(''+e+"").appendTo('.admin-sidemenu-items[data-tab="tab-adapters"] a')}else $("#updates-for-adapters").remove()},this.init=function(e,t){this.inited&&!e||(this.main.objectsLoaded?(this.inited||(this.inited=!0,this.main.subscribeObjects("system.host.*"),this.main.subscribeStates("system.host.*")),this.main.tabs.hosts.getHosts(function(){H._postInit(e,t)})):setTimeout(function(){H.init(e,t)},250))},this.destroy=function(){this.inited&&(this.saveScroll(),this.inited=!1,this.main.unsubscribeObjects("system.host.*"),this.main.unsubscribeStates("system.host.*"))},this.initButtons=function(r){this.$tab.find('.adapter-install-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var s=$(this).attr("data-adapter-name"),e=$(this).attr("data-adapter-desc");!function(e,t,n){if(H.main.tabs.hosts.list.length<=1&&!H.main.config.expertMode)return n(!0,H.main.currentHost,"");var i=$("#dialog-add-instance");i.find(".dialog-add-instance-name").html(e),i.find(".dialog-add-description").html(t);for(var a="",s=0;s'+o.name+""}H.main.tabs.hosts.list.length<=1?i.find(".dialog-add-instance-host").addClass("disabled").prop("disabled",!0):i.find(".dialog-add-instance-host").removeClass("disabled").prop("disabled",!1),i.find(".dialog-add-instance-host").html(a).select();for(var r=-1,c=[],l=0;l'+_("auto")+"";for(var m=0;m'+m+"");i.find(".dialog-add-instance-number").html(a).select(),i.find(".dialog-add-install-btn").off("click").on("click",function(e){n&&(n(!0,i.find(".dialog-add-instance-host").val(),i.find(".dialog-add-instance-number").val()),n=null),i.find(".dialog-add-cancel-btn").off("click"),i.find(".dialog-add-instance-number").off("click")}),i.find(".dialog-add-cancel-btn").off("click").on("click",function(e){n&&(n(!1),n=null),i.find(".dialog-add-cancel-btn").off("click"),i.find(".dialog-add-instance-number").off("click")}),i.modal({dismissible:!1,complete:function(){i.find(".dialog-add-instance-name").html("")}}).modal("open")}(s,e,function(e,i,a){e&&H.getAdaptersInfo(i,!1,!1,function(e,t){var n=e[s];n||(n=t[s]),n&&(n.license&&"MIT"!==n.license?function(i,a){var s=$("#dialog-license");if(!H.data[i].installed&&H.data[i].licenseUrl){var o=setTimeout(function(){a(!(o=null))},1e4);"object"==typeof H.data[i].licenseUrl&&(H.data[i].licenseUrl=H.data[i].licenseUrl[systemLang]||H.data[i].licenseUrl.en),H.main.socket.emit("httpGet",H.data[i].licenseUrl,function(e,t,n){o&&(clearTimeout(o),o=null,!e&&n?(s.css({"z-index":200}),n=(n=n.toString().replace(/\r\n/g,"
    ")).replace(/\n/g,"
    "),s.find(".license_text").html(n),s.find(".license_agreement_name").text(_(" for %s",i)),s.modal({dismissible:!1,complete:function(){s.find(".license_text").html("")}}).modal("open"),s.find(".license_agree").off("click").on("click",function(e){a&&(a(!0),a=null),s.find(".license_agree").off("click"),s.find(".license_non_agree").off("click")}),s.find(".license_non_agree").off("click").on("click",function(e){a&&(a(!1),a=null),s.find(".license_agree").off("click"),s.find(".license_non_agree").off("click")})):(a&&a(!0),a=null))})}else a(!0)}(s,function(e){e&&H.main.cmdExec(null,"add "+s+" "+a+" --host "+i,function(e){e||H._postInit(!0)})}):H.main.cmdExec(null,"add "+s+" "+a+" --host "+i,function(e){e||H._postInit(!0)}))})})}),this.$tab.find('.adapter-delete-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var t=$(this).attr("data-adapter-name");H.main.confirmMessage(_("Are you sure you want to delete adapter %s?",t),_("Please confirm"),"help",function(e){e&&H.main.cmdExec(null,"del "+t,function(e){e||H._postInit(!0)})})}),this.$tab.find('.adapter-readme-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){H.main.navigate({tab:"adapters",dialog:"readme",params:$(this).data("adapter-name")})}),this.$tab.find('.adapter-update-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var e=$(this).attr("data-adapter-name");"admin"===e&&(H.main.waitForRestart=!0),H.main.cmdExec(null,"upgrade "+e,function(e){e||H._postInit(!0)})}),this.$tab.find('.adapter-upload-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var e=$(this).attr("data-adapter-name");H.main.cmdExec(null,"upload "+e,function(e){e||H._postInit(!0)})});var e=this.$tab.find('.adapter-update-custom-submit[data-adapter-name="'+r+'"]');e.off("click").on("click",function(){var e=[];if(H.main.objects["system.adapter."+r].common.news){var t=H.main.objects["system.adapter."+r].common.news;for(var n in t)t.hasOwnProperty(n)&&e.push(n)}else e.push(H.main.objects["system.adapter."+r].common.version);for(var i='
    ',a=0;a'+e[a]+' - "}i+="
    ";var o=$("#adapters-menu");o.length||((o=$('")).appendTo($(".materialize-dialogs").first()),o.modal()),o.data("trigger",this),o.find("p").html(i),o.find("h4").html(_("Versions of %s",r)),o.find(".adapters-versions-link").off("click").on("click",function(){o.modal("close");var e=$(this).data("adapter-name"),t=$(this).data("version");t&&e&&H.main.cmdExec(null,"upgrade "+e+"@"+t,function(e){e||H._postInit(!0)})}),o.modal("open")}),H.main.objects["system.adapter."+r]||e.hide()},this.objectChange=function(e,t){if(e.match(/^system\.adapter\.[a-zA-Z0-9-_]+$/)){if(t)-1===this.list.indexOf(e)&&this.list.push(e);else{var n=this.list.indexOf(e);-1!==n&&this.list.splice(n,1)}void 0!==this.$grid&&this.$grid[0]._isInited&&this.init(!0)}},this.stateChange=function(e,t){if(e&&t){var n=e.match(/^system\.adapter\.([\w\d-]+)\.upload$/);if(n){var i=this.$tab.find('.adapter-upload-progress[data-adapter-name="'+n[1]+'"]'),a=W(t.val);i.html(a).css({opacity:t.val?.7:0}),this.$tab.find('.group-upload-progress[data-adapter-group="'+i.data("adapter-group")+'"]').html(a).css({opacity:t.val?.7:0})}}}}function Config(e){var t=this;this.$dialog=$("#dialog-config"),this.$configFrame=this.$dialog.find("#config-iframe"),this.main=e,this.prepare=function(){$iframeDialog=this},this.init=function(){if(!this.inited){this.inited=!0;var e=this.main.navigateGetParams(),t=e.split(".");this.main.objects[e]&&this.main.objects[e].common&&this.main.objects[e].common.materialize?this.$configFrame.attr("src","adapter/"+t[2]+"/index_m.html?"+t[3]):this.$configFrame.attr("src","adapter/"+t[2]+"/?"+t[3]);var n=e.replace(/^system\.adapter\./,"");this.$dialog.data("name",n),this.$dialog.find(".title").html(_("Adapter configuration")+": "+n)}},this.allStored=function(){return!window.frames["config-iframe"].changed},this.close=function(){t.main.navigate()},this.destroy=function(){if(this.inited&&(this.inited=!1,this.$configFrame.attr("src",""),void 0!==showConfig&&showConfig&&showConfig.length)){var e=showConfig.shift();setTimeout(function(){t.main.navigate({tab:"instances",dialog:"config",params:e})},1e3)}}}function Customs(C){var m,g,h,f,L,D,I,k,O,E,z,A,x="__different__",S=this;function Y(e){if(e)S.historyTimeout&&clearTimeout(S.historyTimeout);else if(S.historyTimeout)return;S.historyTimeout=setTimeout(function(){S.historyTimeout=null,z&&S.loadHistoryTable(z.data("id"),!0)},e||5e3)}function R(t,n){$.ajax({headers:{Accept:"text/html"},cache:!0,url:"/adapter/"+t+"/custom_m.html",success:function(e){n(null,e)},error:function(e){$.ajax({headers:{Accept:"text/html"},cache:!0,url:"/adapter/"+t+"/custom.html",success:function(e){n(null,e)},error:function(e){n(e.responseText)}})}})}function Q(e){e.stopPropagation(),e.preventDefault();var t=S.$dialog.find("#customs-tabs"),c=t.data("ids");S.currentCustoms=null;var l=_(x);if(t.find("input, select").each(function(){var e=$(this).data("instance"),t=$(this).data("field");if(t){var n;if("checkbox"===$(this).attr("type")){if(this.indeterminate)return;n=$(this).prop("checked")}else n=$(this).val();if(n!==l){null===n&&(n=""),void 0===n&&(n=""),"false"===n&&(n=!1),"true"===n&&(n=!0);var i=parseFloat(n);n.toString().replace(/^\+/,"").replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1")===i.toString()&&(n=i);for(var a=0;a
    '+_("Settings for %s",j)+' '+_("active")+'
    '+$('script[data-template-name="'+v+'"]').html()+"
    ",L=$(T);this.defaults[v]={},L.find("input, select").each(function(){var e=$(this);e.attr("data-instance",v+"."+w);var t=e.attr("data-field"),n=e.attr("data-default");"true"===n&&(n=!0),"false"===n&&(n=!1),void 0!==n&&n.toString().replace(/\+/,"")===parseFloat(n).toString()&&(n=parseFloat(n)),S.defaults[v][t]=n,"enabled"===t&&e.on("click",function(e){e.stopPropagation(),$(this).prop("checked")})}),s.append(L),customPostInits.hasOwnProperty(v)&&"function"==typeof customPostInits[v]&&customPostInits[v](L,r[v+"."+w],S.main.objects["system.adapter."+v+"."+w],i,a)}s.find("input, select").each(function(){var e,n=$(this),t=n.data("instance"),i=t.split(".")[0],a=n.data("field");void 0!==r[t][a]?"checkbox"===n.attr("type")?r[t][a]===x?n[0].indeterminate=!0:n.prop("checked",r[t][a]):r[t][a]===x?("number"===n.attr("type")&&n.attr("type","text"),"SELECT"===n.prop("tagName").toUpperCase()?(n.prepend('"),n.val(o)):n.val("").attr("placeholder",o)):n.val(r[t][a]):(S.defaults[i]&&void 0!==S.defaults[i][a]&&(e=S.defaults[i][a]),void 0!==e&&("checkbox"===n.attr("type")?n.prop("checked",e):n.val(e)));"checkbox"===n.attr("type")?n.on("change",function(){if(S.$dialog.find(".dialog-system-buttons .btn-save").removeClass("disabled"),"enabled"===$(this).data("field")){var e=n.data("instance"),t=s.find('.activated[data-adapter="'+e+'"]');$(this).prop("checked")?t.css("opacity",1):t.css("opacity",0)}}):n.on("change",function(){S.$dialog.find(".dialog-system-buttons .btn-save").removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")})}),this.showCustomsData(1'+_("Loading...")+"");var n={aggregate:"none",instance:z.val(),from:!0,ack:!0,q:!0};L||(L=this.$dialog.find("#tab-customs-table .datepicker.date-from"),D=this.$dialog.find("#tab-customs-table .datepicker.date-to"),I=this.$dialog.find("#tab-customs-table .timepicker.time-from"),k=this.$dialog.find("#tab-customs-table .timepicker.time-to"));var d,i=L.val()?M.Datepicker.getInstance(L).toString("yyyy.mm.dd"):"",a=I.val(),s=D.val()?M.Datepicker.getInstance(D).toString("yyyy.mm.dd"):"",o=k.val(),r=!0;if(s?(r=!1,(s=new Date(s)).setHours(23),s.setMinutes(59),s.setSeconds(59),s.setMilliseconds(999)):s=new Date,o){var c=o.split(":");s.setHours(c[0]),s.setMinutes(c[1]),s.setSeconds(59),s.setMilliseconds(999),r=!1}if(s=s.getTime(),r&&(s+=1e4),n.end=s,i||a){if(i=new Date(i||s),a){var u=a.split(":");i.setHours(u[0]),i.setMinutes(u[1])}else i.setHours(0),i.setMinutes(0);i.setSeconds(0),i.setMilliseconds(0),n.start=i.getTime()}else n.count=50;l&&(d=new Date(s).toISOString()+"_"+(n.start?new Date(n.start):n.count+"points")+"_"+e+"__"+n.instance+".csv"),C.socket.emit("getHistory",e,n,function(r,c){setTimeout(function(){var e,t,n,i="value;acknowledged;from;timestamp;lastchanged;\n";if(r)console.error(r),m.html(''+r+"");else{var a="";if(c&&c.length){for(var s=c.length-1;0<=s;s--){var o=(c[s].from||"").replace("system.adapter.","").replace("system.","");a+=' '+c[s].val+" "+c[s].ack+" "+o+" "+C.formatDate(c[s].ts)+" "+C.formatDate(c[s].lc)+"\n",l&&(i+=c[s].val+";"+c[s].ack+";"+(o||"")+";"+(c[s].ts?new Date(c[s].ts).toISOString():"")+";"+(c[s].lc?new Date(c[s].lc).toISOString():"")+";\n")}f=c[c.length-1].ts}else a=''+_("No data")+"";m.html(a)}!function e(){$.fn.colResizable&&(g.is(":visible")?(g.data("inited")||((h=new IobListHeader("grid-history-header",{list:g,colWidthOffset:1,prefix:"log-filter"})).add("text","val"),h.add("text","ack"),h.add("text","from"),h.add("text","ts"),h.add("text","lc")),g.colResizable({liveDrag:!0,partialRefresh:!0,marginLeft:5,postbackSafe:!0,onResize:function(e){return h.syncHeader()}}),h.syncHeader()):setTimeout(function(){e()},200))}(),l&&(e=d,t=i,(n=document.createElement("a")).setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n))},0)})},this.loadHistoryChart=function(e){if(O||(O=this.$dialog.find("#tab-customs-chart .datepicker.date-from"),E=this.$dialog.find("#tab-customs-chart .datepicker.date-to")),e){for(var t=0,n=!1,i=!1,a=0;a"+u[v]+"\n")}if(y){z.data("id",n[0]).html(y).show().off("change").on("change",function(){S.main.saveConfig("object-history-table",z.val()),S.loadHistoryTable($(this).data("id"))}).select(),A.data("id",n[0]).html(y).show().off("change").on("change",function(){S.main.saveConfig("object-history-chart",A.val()),S.loadHistoryChart($(this).data("id"))}).select(),void 0!==this.main.config["object-history-table"]&&z.val(this.main.config["object-history-table"]),void 0!==this.main.config["object-history-chart"]&&A.val(this.main.config["object-history-chart"]),p.data("id",n[0]).show().off("click").on("click",function(){S.$dialog.find("#grid-history-body").html(""),S.loadHistoryTable($(this).data("id"))}),M.data("id",n[0]).show().off("click").on("click",function(){S.loadHistoryChart($(this).data("id"))}),b.data("id",n[0]).show().off("click").on("click",function(){S.loadHistoryTable($(this).data("id"),!1,!0)});var j=new Date;j.setDate(j.getDate()-1);for(var N={today:_("Today"),clear:_("Clear"),done:_("Ok"),months:[_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December")],monthsShort:[_("Jan"),_("Feb"),_("Mar"),_("Apr"),_("May"),_("Jun"),_("Jul"),_("Aug"),_("Sep"),_("Oct"),_("Nov"),_("Dec")],weekdaysShort:[_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat")],weekdays:[_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday")],weekdaysAbbrev:["S","M","T","W","T","F","S"]},T=0;T\n
    \n',"state"===i&&"common"===n&&"type"===s?a+='":"string"==typeof t[s]?a+='\n':"number"==typeof t[s]?a+='\n':"boolean"==typeof t[s]?a+='\n":a+='\n";var o=s;"common"===n&&systemDictionary["common_"+s]&&systemDictionary["common_"+s][systemLang]&&(o=_("common_"+s)),"boolean"==typeof t[s]?a+=""+o+"\n":a+="\n",a+='
    \n\n',a+="\n"}c.$dialog.find(e).html(a)}function n(e,t){var n=c.$dialog.find(e);n.find(".object-tab-edit-string").each(function(){t[$(this).data("attr")]=$(this).val()}),n.find(".object-tab-edit-number").each(function(){t[$(this).data("attr")]=parseFloat($(this).val())}),n.find(".object-tab-edit-boolean").each(function(){t[$(this).data("attr")]=$(this).prop("checked")});var i=null;if(n.find(".object-tab-edit-object").each(function(){try{t[$(this).data("attr")]=JSON.parse($(this).val())}catch(e){return i=$(this).data("attr"),!1}}),void 0!==t.write&&("false"!==t.write&&"0"!==t.write&&0!==t.write||(t.write=!1),"true"!==t.write&&"1"!==t.write&&1!==t.write||(t.write=!0)),void 0!==t.read&&("false"!==t.read&&"0"!==t.read&&0!==t.read||(t.read=!1),"true"!==t.read&&"1"!==t.read&&1!==t.read||(t.read=!0)),null===t.min&&delete t.min,void 0!==t.min){var a=parseFloat(t.min);a.toString()===t.min.toString()&&(t.min=a),"false"===t.min&&(t.min=!1),"true"===t.min&&(t.min=!0)}if(null===t.max&&delete t.max,void 0!==t.max){var s=parseFloat(t.max);s.toString()===t.max.toString()&&(t.max=s),"false"===t.max&&(t.max=!1),"true"===t.max&&(t.max=!0)}if(null===t.def&&delete t.def,void 0!==t.def){var o=parseFloat(t.def);o.toString()===t.def.toString()&&(t.def=o),"false"===t.def&&(t.def=!1),"true"===t.def&&(t.def=!0)}if(-1!==e.indexOf("common"))for(var r in t)t.hasOwnProperty(r)&&("true"===t[r]&&(t[r]=!0),"false"===t[r]&&(t[r]=!1),parseFloat(t[r]).toString()===t[r]&&(t[r]=parseFloat(t[r])));return i}function s(e,t,n){"boolean"==typeof t&&(n=t,t=3e3),c.main.showToast(c.$dialog,e,null,t,n)}this.$dialog=$("#dialog-editobject"),this.$dialogNewField=$("#dialog-new-field"),this.main=e,this.prepared=!1,this.inited=!1,this.$dialogSave=this.$dialog.find(".dialog-editobject-buttons .btn-save"),this.iconVal=null,this._prepare=function(){this.prepared||(this.prepared=!0,this.$dialogSave.on("click",function(){c.save()}),this.$dialog.find(".dialog-editobject-buttons .btn-cancel").on("click",function(){c.editor.setValue(""),c.$dialogSave.addClass("disabled"),c.main.navigate()}),this.$dialog.find(".btn-add-common").on("click",function(){c.$dialogNewField.find(".object-tab-new-icon").show(),c.$dialogNewField.modal("open");var e=c.$dialogNewField.find(".object-tab-new-name");e.data("type","common").focus(),e.hasClass("autocomplete")||(e.addClass("autocomplete"),e.mautocomplete({data:{type:null,desc:null,min:null,max:null,def:null,role:null,unit:null,read:null,write:null,states:null},minLength:0})),e.focus()}),this.$dialog.find(".btn-add-native").on("click",function(){c.$dialogNewField.find(".object-tab-new-icon").hide(),c.$dialogNewField.modal("open");var e=c.$dialogNewField.find(".object-tab-new-name");e.hasClass("autocomplete")&&(e.mautocomplete("destroy"),e.removeClass("autocomplete")),M.updateTextFields("#dialog-new-field"),e.data("type","native").focus()}),this.$dialogNewField.find(".object-tab-new-name").keypress(function(e){13===e.which&&c.$dialogNewField.find(".btn-add").trigger("click")}),this.editor||(this.editor=ace.edit("view-object-raw"),this.editor.getSession().setMode("ace/mode/json"),this.editor.$blockScrolling=!0,this.editor.getSession().on("change",function(){c.$dialogSave.removeClass("disabled")})),this.$dialogNewField.modal(),this.$dialog.find(".tabs").mtabs({onShow:function(e){if(e){var t=$(e).attr("id");if("object-tab-common"===t)s(_("Drop the icons here"));else if("object-tab-raw"===t){var n=c.saveFromTabs();if(!n)return!1;c.editor.setValue(JSON.stringify(n,null,2))}else if("object-tab-raw"===t){var i;try{i=JSON.parse(c.editor.getValue())}catch(e){return c.main.showMessage(e,_("Parse error"),"error_outline"),c.main.noSelect||c.$dialog.find(".tabs").mtabs("select","object-tab-raw"),!1}c.load(i)}return c.main.saveConfig("object-edit-active",t),!0}}}),this.$dialogNewField.find(".btn-add").on("click",function(e){e.preventDefault(),e.stopPropagation();var t=c.$dialogNewField.find(".object-tab-new-name"),n=t.data("type")||"common",i=t.val().trim(),a=c.saveFromTabs();i&&-1===i.indexOf(" ")?void 0===a[n][i]?(a[n][i]="",c.load(a),c.$dialogNewField.find(".object-tab-new-name").val(""),c.$dialogNewField.modal("close"),c.$dialogSave.removeClass("disabled")):c.main.showError(_("Field %s yet exists!",i)):c.main.showError(_("Invalid field name: %s",i))}),this.$dialogNewField.find(".btn-cancel").on("click",function(e){c.$dialogNewField.find(".object-tab-new-name").val("")}),this.$dialog.find(".edit-object-name").on("change",function(){c.$dialogSave.removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")}),this.$dialog.find(".edit-object-type").on("change",function(){c.$dialogSave.removeClass("disabled")}),this.$dialog.find(".object-tab-rights input").on("change",function(){c.$dialogSave.removeClass("disabled")}),installFileUpload(this.$dialog.find("#object-tab-common"),5e4,function(e,t){if(e)s(e,!0);else{if(!t.match(/^data:image\//))return void s(_("Unsupported image format"),!0);c.$dialogSave.removeClass("disabled"),c.iconVal=t;var n=c.$dialog.find(".icon-editor");n.find(".icon").show().html(''),n.find(".icon .treetable-icon").attr("src",t)}}),this.$dialog.find(".icon-editor .icon-upload").off("click").on("click",function(){c.$dialog.find(".drop-file").trigger("click")}),this.$dialog.find(".icon-editor .icon-clear").off("click").on("click",function(){c.iconVal&&(c.iconVal=null,c.$dialog.find(".icon-editor").hide().appendTo(c.$dialog),c.$dialogSave.removeClass("disabled"))}))},this.init=function(){if(this._prepare(),!this.inited){this.inited=!0;var e=c.main.navigateGetParams(),t=!!(e||"").match(/,def$/);e=e.replace(/,def$/,"");var n=this.main.objects[e];if(n){void 0===this.main.config["object-edit-active"]||c.main.noSelect||this.$dialog.find(".tabs").mtabs("select",this.main.config["object-edit-active"]);for(var i,a="",s=0;s'+(i||this.main.tabs.users.list[s])+"";for(this.$dialog.find(".object-tab-acl-owner").html(a),a="",s=0;s'+(i||this.main.tabs.users.groups[s])+"";this.$dialog.find(".object-tab-acl-group").html(a),this.load(n),t?this.$dialog.data("cb",function(n){"state"===n.type&&c.main.socket.emit("getState",n._id,function(e,t){t&&null!==t.val&&void 0!==t.val||c.main.socket.emit("setState",n._id,void 0===n.common.def?null:n.common.def,!0)})}):this.$dialog.data("cb",null),c.$dialogSave.addClass("disabled")}}},this.destroy=function(){this.inited&&(this.inited=!1)},this.load=function(e){if(e){e.common=e.common||{},e.native=e.native||{},e.acl=e.acl||{},this.$dialog.find(".title-id").text(e._id),this.$dialog.find(".edit-object-name").val(e.common?translateName(e.common.name):e._id),this.$dialog.find(".edit-object-type").val(e.type),this.$dialog.find(".object-tab-acl-owner").val(e.acl.owner||"system.user.admin"),this.$dialog.find(".object-tab-acl-group").val(e.acl.ownerGroup||"system.group.administrator"),this.$dialog.find(".icon-editor").hide().appendTo(this.$dialog),a(".object-tab-common-table",e.common||{},"common",e.type),a(".object-tab-native-table",e.native||{},"native",e.type),void 0!==e.common.icon?(this.iconVal=e.common.icon,this.$dialog.find(".object-tab-common-table").prepend(this.$dialog.find(".icon-editor").show()),this.$dialog.find(".icon-editor .icon").html(c.main.getIconFromObj(e))):this.iconVal=null,this.$dialog.find(".object-tab-field-delete").on("click",function(){var n=$(this).data("part"),i=$(this).data("attr");c.main.confirmMessage(_("Delete attribute"),_("Please confirm"),"error_outline",function(e){if(e){var t=c.saveFromTabs();delete t[n][i],c.load(t)}})}),e.acl=e.acl||{},void 0===e.acl.object&&(e.acl.object=1638),this.$dialog.find("#object-tab-acl-obj-owner-read").prop("checked",1024&e.acl.object),this.$dialog.find("#object-tab-acl-obj-owner-write").prop("checked",512&e.acl.object),this.$dialog.find("#object-tab-acl-obj-group-read").prop("checked",64&e.acl.object),this.$dialog.find("#object-tab-acl-obj-group-write").prop("checked",32&e.acl.object),this.$dialog.find("#object-tab-acl-obj-every-read").prop("checked",4&e.acl.object),this.$dialog.find("#object-tab-acl-obj-every-write").prop("checked",2&e.acl.object),"state"!==e.type?this.$dialog.find(".object-tab-acl-state").hide():(this.$dialog.find(".object-tab-acl-state").show(),void 0===e.acl.state&&(e.acl.state=1638),this.$dialog.find("#object-tab-acl-state-owner-read").prop("checked",1024&e.acl.state),this.$dialog.find("#object-tab-acl-state-owner-write").prop("checked",512&e.acl.state),this.$dialog.find("#object-tab-acl-state-group-read").prop("checked",64&e.acl.state),this.$dialog.find("#object-tab-acl-state-group-write").prop("checked",32&e.acl.state),this.$dialog.find("#object-tab-acl-state-every-read").prop("checked",4&e.acl.state),this.$dialog.find("#object-tab-acl-state-every-write").prop("checked",2&e.acl.state));var t=JSON.parse(JSON.stringify(e));if(this.editor.setValue(JSON.stringify(t,null,2)),t._id&&delete t._id,t.common&&delete t.common,t.type&&delete t.type,t.native&&delete t.native,t.acl&&delete t.acl,this.$dialog.find("#view-object-rest").val(JSON.stringify(t,null," ")),this.$dialog.find("select").select(),this.$dialog.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),this.$dialog.find("input").on("change",function(){c.$dialogSave.removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")}),this.$dialog.find("select").on("change",function(){c.$dialogSave.removeClass("disabled")}),this.$dialog.find("textarea").on("change",function(){c.$dialogSave.removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")}),void 0!==e.common.color){var n=Date.now(),i=this.$dialog.find('.object-tab-edit-string[data-attr="color"]').parent();i.prepend('color_lens'+_("Color")+""),i.colorpicker({component:".btn",color:i,container:!0}).colorpicker("setValue",e.common.color||"#fff").on("showPicker.colorpicker",function(){}).on("changeColor.colorpicker",function(e){100'+g.main.getIconFromObj(s[e][t])+p(s[e][t])+"");n&&(n+='
  • '),n+='
  • control_point'+_("custom group")+"
  • ",g.$gridEnum.find("#btn-new-group-"+i).html(n),g.$gridEnum.find('.btn-new-group-btn[data-target="btn-new-group-'+i+'"]').dropdown({constrainWidth:!1}),g.$gridEnum.find("#btn-new-group-"+i).find(".new-group-item").off("click").on("click",function(){var e=$(this).data("id"),t=$(this).data("enum");if(e){var n=t.replace(/[.#\\\/&?]+/g,"-");g.main.saveConfig("enums-active","enum-"+n),g.main.socket.emit("setObject",e,s[t][e],function(e){e&&g.main.showError(e)})}else v(null,t)})}else{for(t in a)a.hasOwnProperty(t)&&-1===g.list.indexOf(t)&&(n+='
  • '+g.main.getIconFromObj(a[t])+p(a[t])+"
  • ");n&&(n+='
  • '),n+='
  • control_point'+_("custom enum")+"
  • ",g.$gridEnum.find("#btn-new-enum").html(n),g.$gridEnum.find(".btn-new-enum-btn").dropdown({constrainWidth:!1}),g.$gridEnum.find(".new-enum-item").off("click").on("click",function(){var e=$(this).data("id");if(e){var t=e.replace(/[.#\\\/&?]+/g,"-");g.main.saveConfig("enums-active","enum-"+t),g.main.socket.emit("setObject",e,a[e],function(e){e&&g.main.showError(e)})}else v(null)})}}function p(e,t){var n;(n=t?e[t]:e)&&n.common&&n.common.name?n=translateName(n.common.name):n=(n=t.split(".").pop())[0].toUpperCase()+n.substring(1).toLowerCase();return n}function r(e,t,n){var i,a,s,o=g.main.objects[e],r=e.replace(/[.#\\\/&?]+/g,"-"),c='';c+='
      ';for(var l=0;l'+g.main.getIcon(g.list[l],null,null,"icon")+''+p(g.main.objects,g.list[l])+"

      "+g.list[l]+"


      ",d&&d.common&&d.common.members&&d.common.members.length)for(var m=0;m'+g.main.getIcon(i)+''+p(g.main.objects,i)+'close
    ');c+='edit',c+='delete',c+=""}c+="
    ",t.html(c),f(e),n&&t.find(".enum-collection").scrollTop(n),function(n){for(var e=g.$gridList.find('.enum-buttons[data-id="'+n+'"] .filter-input'),t={},i=0;i\n view_list\n note_add\n \n \n queue_play_next\n \n ');var t='
    ';t+='",t+="
    ";for(var a=0;a',t+="");var s={};e.find(".enum-collection").each(function(){s[$(this).data("id")]=$(this).scrollTop()});try{var o=g.$gridEnum.find(".tree-table-body .collection").find(".collection-item");try{o.droppable("instance")&&o.droppable("destroy")}catch(n){console.error(n)}}catch(n){}e.html(t),0tr.treetable-enum");e.droppable("instance")&&e.droppable("destroy")}catch(e){console.log(e)}g.$gridList.html("").removeClass("tree-table-tiles").addClass("tree-table-list"),g.$gridList.treeTable({objects:g.main.objects,root:"enum",columns:["title","name"],members:!0,colors:!0,icons:!0,widths:["calc(100% - 250px)","250px"],name:"enums",buttonsWidth:"40px",buttons:[{text:!1,icons:{primary:"ui-icon-trash"},click:function(t,e,n){g.main.objects[t]?"enum"===g.main.objects[t].type?e?g.main.confirmMessage(_("All sub-enums of %s will be deleted too?",t),null,"help",function(e){e&&g.main._delObjects(t,!0,function(e){e?b(_("Error: %s",e),!0):b(_("Deleted"))})}):g.main.confirmMessage(_("Are you sure to delete %s?",t),null,"help",function(e){e&&g.main._delObjects(t,!0,function(e){e?b(_("Error: %s",e),!0):b(_("Deleted"))})}):u(t,n):g.main.objects[n]&&"enum"===g.main.objects[n].type?u(t,n):b(_('Object "%s" does not exists. Update the page.',t))},width:26,height:20},{text:!1,icons:{primary:"ui-icon-pencil"},match:function(e){return g.main.objects[e]&&"enum"===g.main.objects[e].type},click:function(e,t,n){v(e)},width:26,height:20}],panelButtons:[{id:"tab-enums-btn-switch-tiles",title:_("change view mode"),icon:"view_module",click:function(){g.isTiles=!0,g.main.saveConfig("enumIsTiles",g.isTiles),setTimeout(function(){n()},50)}},{id:"tab-enums-list-new-enum",title:_("New enum"),icon:"note_add",click:function(){v(null)}},{id:"tab-enums-list-new-category",title:_("New category"),icon:"library_add",click:function(){v(null,g.enumEdit)}},{id:"tab-enums-list-edit",title:_("Edit"),icon:"edit",click:function(){w(!g.editMode)}}],onChange:function(e,t){if(e!==t){g.enumEdit=e;var n=g.main.objects[e];if(n&&"enum"===n.type)$("#tab-enums-list-new-enum").removeClass("disabled").attr("title",_("Create new enum, like %s","enum.newCategory")),2===e.split(".").length?g.$gridList.find("#tab-enums-list-new-category").removeClass("disabled").attr("title",_("Create new category, like %s",e+".newEnum")):g.$gridList.find("#tab-enums-list-new-category").addClass("disabled");else g.$gridList.find("#tab-enums-list-new-enum").addClass("disabled"),g.$gridList.find("#tab-enums-list-new-category").addClass("disabled")}},onReady:m}),g.$gridList.find(".tree-table-buttons a").addClass("btn-small"),g.$gridList.find("#tab-enums-list-new-enum").addClass("disabled"),g.$gridList.find("#tab-enums-list-new-category").addClass("disabled")}function l(t){if("enum"===g.main.objects[t].type){var e=function(e){for(var t=e.split("."),n=[],i=new RegExp("^"+e.replace(/\./g,"\\.")+"\\."),a=0;atr.treetable-enum").droppable({accept:".fancytree-type-draggable",over:function(e,t){if($(this).addClass("tab-accept-item"),$(this).hasClass("not-empty")&&!$(this).hasClass("expanded")){var n;$(this).data("tt-id");(n=$(this).data("timer"))&&clearTimeout(n),$(this).data("timer",setTimeout(function(){g.$gridList.treeTable("expand",$(this).data("tt-id"))},1e3))}},out:function(e,t){var n;$(this).removeClass("tab-accept-item"),(n=$(this).data("timer"))&&(clearTimeout(n),$(this).data("timer",null))},tolerance:"pointer",drop:function(e,t){$(this).removeClass("tab-accept-item"),i(t.draggable.data("id"),$(this).data("tt-id"))}}))}function y(e){if(g.editMode){var t=(e=e||g.$gridEnum.find(".tree-table-body .collection")).find(".collection-item");try{t.droppable("instance")&&t.droppable("destroy")}catch(e){console.error(e)}t.droppable({accept:".fancytree-type-draggable",over:function(e,t){$(this).addClass("tab-accept-item")},out:function(e,t){$(this).removeClass("tab-accept-item")},tolerance:"pointer",drop:function(e,t){$(this).removeClass("tab-accept-item"),i(t.draggable.data("id"),$(this).data("id"))}})}}function v(e,a){var i=!1,s=g.$gridEnum.find("#tab-enums-dialog-new"),o="",t="",n="",r="",c="",l="",d=!0;if(installFileUpload(s,5e4,function(e,t){if(e)b(e,!0);else{if(!t.match(/^data:image\//))return void b(_("Unsupported image format"),!0);s.find(".tab-enums-dialog-create").removeClass("disabled"),c=t,s.find(".tab-enums-dialog-new-icon").show().html(''),s.find(".tab-enums-dialog-new-icon img").attr("src",t),s.find(".tab-enums-dialog-new-icon-clear").show()}}),d=e?(g.main.objects[e]&&g.main.objects[e].common&&(t=translateName(g.main.objects[e].common.name),c=g.main.objects[e].common.icon,l=g.main.objects[e].common.color),n=o=e,s.find("#tab-enums-dialog-preserve-id").prop("checked",!0),!1):(s.find("#tab-enums-dialog-preserve-id").prop("checked",!1),!0),s.find(".tab-enums-dialog-new-title").text(_(a?"Create new category":n?"Rename":"Create new enum")),n){var u=n.split(".");u.length<=2&&(e=!0),n=u.pop(),a=u.join("."),r=n}s.find("#tab-enums-dialog-new-name").val(t).off("change").on("change",function(){var e=s.find("#tab-enums-dialog-new-id"),t=e.val(),n=$(this).val();n=n.replace(FORBIDDEN_CHARS,"_").replace(/\./g,"_").trim().toLowerCase(),!d||t&&i||(e.val(n),s.find("#tab-enums-dialog-new-preview").val((a||"enum")+"."+(n||"#")),M.updateTextFields("#tab-enums-dialog-new")),e.val()&&!e.val().match(/[.\s]/)?(s.find(".tab-enums-dialog-create").removeClass("disabled"),e.removeClass("wrong")):(s.find(".tab-enums-dialog-create").addClass("disabled"),e.addClass("wrong"))}).off("keyup").on("keyup",function(){$(this).trigger("change")}),s.find("#tab-enums-dialog-new-id").val(n).off("change").on("change",function(){if(!s.find("#tab-enums-dialog-preserve-id").prop("checked")){i=!0;var e=$(this).val();s.find("#tab-enums-dialog-new-preview").val((a||"enum")+"."+($(this).val()||"#")),M.updateTextFields("#tab-enums-dialog-new"),e&&!e.match(/[.\s]/)?(s.find(".tab-enums-dialog-create").removeClass("disabled"),$(this).removeClass("wrong")):(s.find(".tab-enums-dialog-create").addClass("disabled"),$(this).addClass("wrong"))}}).off("keyup").on("keyup",function(){$(this).trigger("change")}),s.find("#tab-enums-dialog-new-id").prop("disabled",!d),s.find(".tab-enums-dialog-create").addClass("disabled").off("click").text(_(o?"Change":"Create")).on("click",function(){var e,t,n,i;o?(s.find("#tab-enums-dialog-preserve-id").prop("checked")?(e="object"==typeof g.main.objects[o].common.name?g.main.objects[o].common.name:{en:o.split(".").pop()})[systemLang]=s.find("#tab-enums-dialog-new-name").val():e=s.find("#tab-enums-dialog-new-name").val(),h(o,a+"."+s.find("#tab-enums-dialog-new-id").val(),{name:e,icon:c,color:l},function(e){e?b(_("Error: %s",e),!0):b(_("Updated"))})):(t=(a||"enum")+"."+s.find("#tab-enums-dialog-new-id").val(),n={name:s.find("#tab-enums-dialog-new-name").val(),icon:c,color:l},i=function(e){e?b(_("Error: %s",e),!0,5e3):b(_("Updated"))},g.main.objects[t]?b(_("Name yet exists!"),!0):g.main.socket.emit("setObject",t,{_id:t,common:{name:n.name,members:[],icon:n.icon,color:n.color},type:"enum"},i))}),s.find("#tab-enums-dialog-new-preview").val((a||"enum")+"."+(n||"#")),c?(s.find(".tab-enums-dialog-new-icon").show().html(g.main.getIcon(o)),s.find(".tab-enums-dialog-new-icon-clear").show()):(s.find(".tab-enums-dialog-new-icon").hide(),s.find(".tab-enums-dialog-new-icon-clear").hide()),(l=l||!1)?s.find(".tab-enums-dialog-new-color").val(l):s.find(".tab-enums-dialog-new-color").val(),M.updateTextFields("#tab-enums-dialog-new"),g.main.showToast(s,_("Drop the icons here")),s.find(".tab-enums-dialog-new-upload").off("click").on("click",function(){s.find(".drop-file").trigger("click")}),s.find(".tab-enums-dialog-new-icon-clear").off("click").on("click",function(){c&&(c="",s.find(".tab-enums-dialog-new-icon").hide(),s.find(".tab-enums-dialog-create").removeClass("disabled"),s.find(".tab-enums-dialog-new-icon-clear").hide())}),s.find(".tab-enums-dialog-new-color-clear").off("click").on("click",function(){l&&(s.find(".tab-enums-dialog-create").removeClass("disabled"),s.find(".tab-enums-dialog-new-color-clear").hide(),s.find(".tab-enums-dialog-new-colorpicker").colorpicker({component:".btn",color:l,container:s.find(".tab-enums-dialog-new-colorpicker")}).colorpicker("setValue",""),l="")});var m=Date.now();try{s.find(".tab-enums-dialog-new-colorpicker").colorpicker("destroy")}catch(e){}s.find(".tab-enums-dialog-new-colorpicker").colorpicker({component:".btn",color:l,container:s.find(".tab-enums-dialog-new-colorpicker")}).colorpicker("setValue",l).on("showPicker.colorpicker",function(){var e=s.find(".modal-content");e[0].scrollTop=e[0].scrollHeight}).on("changeColor.colorpicker",function(e){100tr.treetable-enum");i.droppable("instance")&&i.droppable("destroy")}catch(e){console.error(e)}t.removeClass("red").addClass("blue"),g.$gridEnum.removeClass("tab-enums-edit")}}this.prepare=function(){this.isTiles=void 0===this.main.config.enumIsTiles||null===this.main.config.enumIsTiles||this.main.config.enumIsTiles},this._initObjectTree=function(){var e={objects:t.objects,noDialog:!0,draggable:["device","channel","state"],name:"enum-objects",expertModeRegEx:/^system\.|^yunkong2\.|^_|^[\w-]+$|^enum\.|^[\w-]+\.admin|^script\./,texts:{select:_("Select"),cancel:_("Cancel"),all:_("All"),id:_("ID"),ID:_("ID"),name:_("Name"),role:_("Role"),room:_("Room"),function:_("Function"),value:_("Value"),type:_("Type"),selectid:_("Select ID"),from:_("From"),lc:_("Last changed"),ts:_("Time stamp"),wait:_("Processing..."),ack:_("Acknowledged"),edit:_("Edit"),push:_("Trigger event"),ok:_("Ok"),with:_("With"),without:_("Without"),copyToClipboard:_("Copy to clipboard"),expertMode:_("Toggle expert mode"),refresh:_("Update"),sort:_("Sort alphabetically"),button:_("Settings"),noData:_("No data")},filter:{type:"state"},columns:["ID","name","type","role"]};o("init",e).selectId("show"),function(){var e=g.$gridEnum.find(".fancytree-container>tbody");try{e.sortable("instance")&&e.sortable("destroy")}catch(e){console.error(e)}g.$gridEnum.find(".fancytree-container>tbody").sortable({connectWith:"#tab-enums .tab-enums-list .tree-table-main.treetable",items:".fancytree-type-draggable",appendTo:g.$gridEnum,refreshPositions:!0,helper:function(e,t){return $('
    '+t.find(".fancytree-title").text()+"
    ")},zIndex:999990,revert:!1,scroll:!1,start:function(e,t){var n=t.item.prev();t.item.data("prev",n),g.$gridEnum.addClass("dragging")},stop:function(e,t){g.$gridEnum.removeClass("dragging")},update:function(e,t){var n=t.item.data("prev");n&&n.length?$(n).after(t.item):$(this).prepend(t.item)}}).disableSelection()}()},this._postInit=function(){void 0!==this.$gridList&&(this.main.objects["enum.rooms"]||(this.main.objects["enum.rooms"]={_id:"enum.rooms",common:{icon:"home",name:{en:"Rooms",de:"Räume",ru:"Комнаты",pt:"Quartos",nl:"Kamers",fr:"Pièces",it:"Camere",es:"Habitaciones",pl:"Pokoje"},desc:{en:"List of the rooms",de:"Liste der Räumen",ru:"Список комнат",pt:"Lista dos quartos",nl:"Lijst met kamers",fr:"Liste des chambres",it:"Elenco delle stanze",es:"Lista de las habitaciones",pl:"Lista pokoi"},members:[],dontDelete:!0},type:"enum",acl:{owner:"system.user.admin",ownerGroup:"system.group.administrator",permissions:1911}},g.main.socket.emit("setObject","enum.rooms",this.main.objects["enum.rooms"]),this.list.unshift("enum.rooms")),this.main.objects["enum.functions"]||(this.main.objects["enum.functions"]={_id:"enum.functions",common:{icon:"lightbulb_outline",name:{en:"Functions",de:"Funktionen",ru:"функции",pt:"Funções",nl:"functies",fr:"Les fonctions",it:"funzioni",es:"Funciones",pl:"Funkcje"},desc:{en:"List of the functions",de:"Liste der Funktionen",ru:"Список функций",pt:"Lista das funções",nl:"Lijst met functies",fr:"Liste des fonctions",it:"Elenco delle funzioni",es:"Lista de las funciones",pl:"Lista funkcji"},members:[],dontDelete:!0},type:"enum",acl:{owner:"system.user.admin",ownerGroup:"system.group.administrator",permissions:1911}},this.list.unshift("enum.functions"),g.main.socket.emit("setObject","enum.functions",this.main.objects["enum.functions"])),this.isTiles?n():c(),this.editMode?this._initObjectTree():o("destroy"))},this.init=function(e){this.inited&&!e||(this.main&&this.main.objectsLoaded?(this._postInit(),this.inited||(this.inited=!0,this.main.subscribeObjects("enum.*"))):setTimeout(function(){g.init(e)},250))},this.destroy=function(){this.inited&&(this.inited=!1,this.main.unsubscribeObjects("enum.*")),w(!1),this.$gridList.treeTable("destroy")},this.objectChange=function(e,t,n){if(e.match(/^enum\./)){if(t)-1===this.list.indexOf(e)&&this.list.push(e);else{var i=this.list.indexOf(e);-1!==i&&this.list.splice(i,1)}this.updateTimers&&clearTimeout(this.updateTimers),this.updateTimers=setTimeout(function(){g.updateTimers=null,g._postInit()},200)}this.$grid&&o("object",e,t,n)}}function Events(g){var h=this;this.main=g,this.$tab=$("#tab-events");var e,f,p,t,b,M="yunkong2.net"===location.hostname||"yunkong2.pro"===location.hostname,y={count:0,start:0,limit:500},n=null,v={list:[],mode:!1,counter:0,overflow:!1,$counterSpan:null},w={done:!1,timer:null};this.prepare=function(){t=this.$tab.find("#event-outer"),p=this.$tab.find("#event-table"),b=this.$tab.find("#event-pause"),e=this.$tab.find("#events-table-tr"),(f=new IobListHeader(e,{list:t,colWidthOffset:1,prefix:"event-filter"})).doFilter=i,f.add("combobox","type"),f.add("edit","id","ID"),f.add("edit","val","value"),f.add("combobox","ack","ack",[{val:"",name:"all"},{val:"true",name:"ack"},{val:"false",name:"not ack"}]),f.add("combobox","from","from"),f.add("text","ts"),f.add("text","lc"),Object.defineProperty(f,"getValues",{value:function(){f.ID.selectedVal=f.ID.selectedVal.toLocaleLowerCase(),"true"===f.ack.selectedVal&&(f.ack.selectedVal=!0),"false"===f.ack.selectedVal&&(f.ack.selectedVal=!1)},enumerateble:!1}),b.on("click",function(){h.pause()}),this.$tab.find("#event-clear").off("click").on("click",function(){y.count=0,y.start=0,h.$tab.find("#event-table").html("")})},this.init=function(){M?h.$tab.find("#grid-events").html(_("You can't see events via cloud")+'
    cloud_off').addClass("no-cloud-events"):f&&(this.inited||(!function e(){if(!$.fn.colResizable)return;t.is(":visible")?(t.colResizable({liveDrag:!0,partialRefresh:!0,marginLeft:5,postbackSafe:!0,onResize:function(e){return f.syncHeader()}}),f.syncHeader()):setTimeout(function(){e()},200)}(),this.inited=!0,this.main.subscribeObjects("*"),this.main.subscribeStates("*")))};var j=!(this.destroy=function(){this.inited&&(this.inited=!1,this.main.unsubscribeObjects("*"),this.main.unsubscribeStates("*"))});function N(){w.timer=null,$(window).trigger("resize.JColResizer")}function i(){n&&(clearTimeout(n),n=null),f.getValues&&f.getValues(),p&&p.find(".event-line").each(function(e){var t=!0,n=$(this);f.type.selectedVal&&!n.hasClass("event-type-"+f.type.selectedVal)?t=!1:f.from.selectedVal&&!n.hasClass("event-from-"+f.from.selectedVal)?t=!1:""===f.ack.selectedVal||n.hasClass("event-ack-"+f.ack.selectedVal)?f.ID.selectedVal&&-1===$(this).find("td.event-column-id").text().toLocaleLowerCase().indexOf(f.ID.selectedVal)?t=!1:""!==f.value.selectedVal&&-1===$(this).find("td.event-column-value").text().indexOf(f.value.selectedVal)&&(t=!1):t=!1,t?n.show():n.hide()})}this.add=function(e,t,n,i){if(!M){var a,s,o,r,c=i?"stateChange":n?"message":"objChange",l="";if(f&&(f.getValues&&f.getValues(),f.type.checkAddOption(c)),w.done||(w.timer||(w.timer=setTimeout(N,1e3)),20=h.limit){y.start++;var d=document.getElementById("event_"+y.start);d&&(d.outerHTML="")}else y.count++;n||i?i&&(t?(t.from=t.from||"",t.from=t.from.replace("system.adapter.",""),t.from=t.from.replace("system.",""),f&&f.from.checkAddOption(t.from,function(e){return{val:e.replace(/\./g,"-"),name:e}}),l=t.from,void 0!==(a=JSON.stringify(t.val))&&30'+a.substring(0,30)+"..."),s=t.ack?"true":"false",o=g.formatDate(t.ts),r=g.formatDate(t.lc)):(a="deleted",o=g.formatDate(new Date))):o=t?(void 0!==(a=JSON.stringify(t,"\n",2))&&30'+a.substring(0,30)+"..."),g.formatDate(t.ts)):(a="deleted",g.formatDate(new Date));var u=!0;f&&(f.type.selectedVal&&f.type.selectedVal!==c?u=!1:f.ID.selectedVal&&-1===e.toLocaleLowerCase().indexOf(f.ID.selectedVal)?u=!1:""!==f.value.selectedVal&&null!=a&&-1===a.indexOf(f.value.selectedVal)?u=!1:""!==f.ack.selectedVal&&f.ack.selectedVal!==s?u=!1:f.from.selectedVal&&f.from.selectedVal!==l&&(u=!1));var m='';m+=""+c+"",m+=''+e+"",isNaN(a)?m+=''+(a||"")+"":m+=''+(a||"")+"",m+=""+(s||"")+"",m+=""+(l||"")+"",m+=""+(o||"")+"",m+=""+(r||"")+"",m+="",v.mode?(v.list.push(m),v.counter++,v.counter>y.limit&&(v.overflow||(b.addClass("red lighten3").attr("title",_("Message buffer overflow. Losing oldest")),v.overflow=!0),v.list.shift()),v.$counterSpan.html(v.counter)):p&&(p.prepend(m),j||"#tab-events"!==window.location.hash&&"#events"!==window.location.hash||(f&&f.syncHeader(),j=!0))}},this.pause=function(){if(v.mode){v.mode=!1;for(var e=0;epause')}else b.addClass("yellow btn-pause-button-active"),v.$counterSpan=b,v.$counterSpan.html("0"),v.counter=0,v.mode=!0}}function fileHandler(e){e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files[0]:e.target.files[0],n=$(this).find(".drop-zone"),i=$(this).data("drop-zone-cb"),a=$(this).data("limit");if(t.size>(a||1e4))return i&&i(_("File is too big!")),n.hide(),!1;n.show();var s=new FileReader;s.onload=function(e){n.hide(),i&&i(null,e.target.result)},s.readAsDataURL(t)}function installFileUpload(e,t,n){if(void 0!==window.FileReader&&!e.data("installed")){e.data("installed",!0),e.prepend('');var i=e.find(".drop-zone");e[0].ondragover=function(){return i.off("click"),i.show(),!1},i[0].ondragleave=function(){return i.hide(),!1},i[0].ondrop=fileHandler.bind(e[0])}e.data("drop-zone-cb",n),e.data("limit",t),e.find(".drop-file").on("change",fileHandler.bind(e[0]))}function Hosts(s){var r=this;function n(e){var t=$("#dialog-host-update");if(e){var n=e.path,i=(n=n.replace(/\\/g,"/")).split("/");i.pop(),i.pop(),"linux"===e.platform||"darwin"===e.platform||"freebsd"===e.platform||"lin"===e.platform?t.find("#dialog-host-update-instructions").val("cd "+i.join("/")+"\nsudo yunkong2 stop\nsudo yunkong2 update\nsudo yunkong2 upgrade self\nsudo yunkong2 start"):t.find("#dialog-host-update-instructions").val("cd "+i.join("\\")+"\nyunkong2 stop\nyunkong2 update\nyunkong2 upgrade self\nyunkong2 start")}else t.find("#dialog-host-update-instructions").val("cd /opt/yunkong2\nsudo yunkong2 stop\nsudo yunkong2 update\nsudo yunkong2 upgrade self\nsudo yunkong2 start");t.data("inited")||(t.data("inited",!0),t.modal()),t.modal("open")}function i(e){if(e=(e||"").toLowerCase().trim()){var t=!1;r.$tab.find(".hosts-host").each(function(){-1!==$(this).data("host-filter").toLowerCase().indexOf(e)?($(this).show(),t=!0):$(this).hide()}),t?r.$tab.find(".hosts-host-filtered-out").hide():r.$tab.find(".hosts-host-filtered-out").show()}else r.$tab.find(".hosts-host").show(),r.$tab.find(".hosts-host-filtered-out").hide()}function a(e){var t=r.main.objects[r.list[e].id],n=r.main.states[t._id+".alive"]&&r.main.states[t._id+".alive"].val&&"null"!==r.main.states[t._id+".alive"].val;t.common=t.common||{},t.native=t.native||{};var i='';i+='
    ',i+=''+r.main.getHostIcon(t)+"",i+=''+t.common.hostname+"",i+=''+t.common.type+"";var a=t.common.titleLang||t.common.title;return"object"==typeof a&&(a=a[systemLang]||a.en),i+=''+a+"",i+=''+(t.native.os?t.native.os.platform:_("unknown"))+"",i+='',i+=''+t.common.installedVersion+"",r.main.states[t._id+".inputCount"]?i+='⇥'+r.main.states[t._id+".inputCount"].val+' / ↦'+r.main.states[t._id+".outputCount"].val+"":i+=' / ',i+='',i+=""}function o(e){var t,n=r.main.objects[r.list[e].id],i=r.main.states[n._id+".alive"]&&r.main.states[n._id+".alive"].val&&"null"!==r.main.states[n._id+".alive"].val;n.common=n.common||{},n.native=n.native||{},n.common.color&&(t=r.main.invertColor(n.common.color));var a='
    '+r.main.getHostIcon(n," ")+'
    '+n.common.hostname+'
    • '+r.words.Type+': '+n.common.type+'
    • '+r.words.Title+': '+n.common.title+'
    • '+r.words.OS+': '+(n.native.os?n.native.os.platform:_("unknown"))+'
    • '+r.words.Available+':
    • '+r.words.Installed+': '+n.common.installedVersion+"
    • ";return r.main.states[n._id+".inputCount"]?a+='
    • '+r.words.Events+': ⇥'+r.main.states[n._id+".inputCount"].val+' / ↦'+r.main.states[n._id+".outputCount"].val+"
    • ":a+='
    • '+r.words.Events+': /
    • ',a+='
    edit autorenew',n.common.hostname!==r.main.currentHost&&(a+=' delete'),a+='
    '}this.main=s,this.list=[],this.$tab=$("#tab-hosts"),this.$grid=this.$tab.find("#hosts"),this.$table=this.$tab.find("#grid-hosts"),this.inited=!1,this.isTiles=!0,this.words={},this.prepare=function(){this.isTiles=void 0===this.main.config.hostsIsTiles||null===this.main.config.hostsIsTiles||this.main.config.hostsIsTiles,"ie"===this.main.browser&&this.main.browserVersion<=10&&(this.isTiles=!1,this.$tab.find(".btn-switch-tiles").hide()),this.$tab.find(".btn-reload").attr("title",_("Update")).on("click",function(){r.init(!0)}),this.$tab.find(".btn-switch-tiles").off("click").on("click",function(){r.isTiles=!r.isTiles,r.isTiles?$(this).find("i").text("view_list"):$(this).find("i").text("view_module"),r.main.saveConfig("hostsIsTiles",r.isTiles),setTimeout(function(){r._postInit()},50)}),this.isTiles?this.$tab.find(".btn-switch-tiles").find("i").text("view_list"):this.$tab.find(".btn-switch-tiles").find("i").text("view_module"),this.$tab.find(".filter-clear").on("click",function(){r.$tab.find(".filter-input").val("").trigger("change")});var e=this.$tab.find(".filter-input");e.on("change",function(){var e=$(this).val();e?($(this).addClass("input-not-empty"),r.$tab.find(".filter-clear").show()):(r.$tab.find(".filter-clear").hide(),$(this).removeClass("input-not-empty")),r.main.saveConfig("hostsFilter",e),i(e)}).on("keyup",function(){r.filterTimeout&&clearTimeout(r.filterTimeout),r.filterTimeout=setTimeout(function(){r.$tab.find(".filter-input").trigger("change")},300)}),this.main.config.hostsFilter&&"{"!==this.main.config.hostsFilter[0]?(e.val(r.main.config.hostsFilter).addClass("input-not-empty"),this.$tab.find(".filter-clear").show()):this.$tab.find(".filter-clear").hide(),this.words.Title=_("Title"),this.words.OS=_("OS"),this.words.Available=_("Available"),this.words.Installed=_("Installed"),this.words.Events=_("Events"),this.words.Title=_("Title"),r.words.Type=_("Type")},this.initButtons=function(e){var t=e?'[data-host-id="'+e+'"]':"";this.$tab.find(".host-update-submit"+t).off("click").on("click",function(){r.main.cmdExec($(this).attr("data-host-name"),"upgrade self",function(e){e||r.init(!0)})}),this.$tab.find(".host-restart-submit"+t).off("click").on("click",function(){r.main.waitForRestart=!0,r.main.cmdExec($(this).attr("data-host-name"),"_restart")}),this.$tab.find(".host-delete"+t).off("click").on("click",function(){r.main.cmdExec(r.main.currentHost,"host remove "+$(this).attr("data-host-name"))}),this.$tab.find(".host-edit"+t).off("click").on("click",function(){!function(t){var n=$("#tab-host-dialog-edit"),e="",i="",a="";installFileUpload(n,5e4,function(e,t){if(e)r.main.showToast(n,e);else{if(!t.match(/^data:image\//))return void r.main.showToast(n,_("Unsupported image format"));n.find(".tab-host-dialog-ok").removeClass("disabled"),i=t,n.find(".tab-host-dialog-edit-icon").show().html(''),n.find(".tab-host-dialog-edit-icon img").attr("src",t),n.find(".tab-host-dialog-edit-icon-clear").show()}}),r.main.objects[t]&&r.main.objects[t].common&&("object"==typeof(e=r.main.objects[t].common.title)&&(e=e[systemLang]||e.en),i=r.main.objects[t].common.icon,a=r.main.objects[t].common.color);n.find("#tab-host-dialog-edit-title").val(e).off("change").on("change",function(){n.find(".tab-host-dialog-ok").removeClass("disabled")}).off("keyup").on("keyup",function(){$(this).trigger("change")}),n.find(".tab-host-dialog-ok").addClass("disabled").off("click").on("click",function(){var e=JSON.parse(JSON.stringify(r.main.objects[t]));e.common.title=n.find("#tab-host-dialog-edit-title").val(),e.common.icon=i,e.common.color=a,JSON.stringify(e)!==JSON.stringify(r.main.objects[t])?r.main.socket.emit("setObject",e._id,e,function(e){r.main.showToast(n,_("Updated"))}):r.main.showToast(n,_("Nothing changed"))}),i?(n.find(".tab-host-dialog-edit-icon").show().html(r.main.getIcon(t)),n.find(".tab-host-dialog-edit-icon-clear").show()):(n.find(".tab-host-dialog-edit-icon").hide(),n.find(".tab-host-dialog-edit-icon-clear").hide());(a=a||!1)?n.find(".tab-host-dialog-edit-color").val(a):n.find(".tab-host-dialog-edit-color").val();M.updateTextFields("#tab-host-dialog-edit"),r.main.showToast(n,_("Drop the icons here")),n.find(".tab-host-dialog-edit-upload").off("click").on("click",function(){n.find(".drop-file").trigger("click")}),n.find(".tab-host-dialog-edit-icon-clear").off("click").on("click",function(){i&&(i="",n.find(".tab-host-dialog-edit-icon").hide(),n.find(".tab-host-dialog-ok").removeClass("disabled"),n.find(".tab-host-dialog-edit-icon-clear").hide())}),n.find(".tab-host-dialog-edit-color-clear").off("click").on("click",function(){a&&(n.find(".tab-host-dialog-ok").removeClass("disabled"),n.find(".tab-host-dialog-edit-color-clear").hide(),n.find(".tab-host-dialog-edit-colorpicker").colorpicker({component:".btn",color:a,container:n.find(".tab-host-dialog-edit-colorpicker")}).colorpicker("setValue",""),a="")});var s=Date.now();try{n.find(".tab-host-dialog-edit-colorpicker").colorpicker("destroy")}catch(e){}n.find(".tab-host-dialog-edit-colorpicker").colorpicker({component:".btn",color:a,container:n.find(".tab-host-dialog-edit-colorpicker")}).colorpicker("setValue",a).on("showPicker.colorpicker",function(){var e=n.find(".modal-content");e[0].scrollTop=e[0].scrollHeight}).on("changeColor.colorpicker",function(e){100'+e+"").appendTo('.admin-sidemenu-items[data-tab="tab-hosts"] a')}else $("#updates-for-hosts").remove()},this._postInit=function(){if(void 0!==r.$grid){this.isTiles?function(){for(var e="",t=0;t
    '+_("Filtered out")+"
    ")}():function(){for(var e="",t=0;t'+_("Filtered out")+"")}(),i(this.$tab.find(".filter-input").val());var s=setTimeout(function(){console.warn("Timeout for repository"),s=null,r.initButtons()},2e3),e=r.main.currentHost;if(!e)for(var t=0;t↦'+t.val+"")):e.match(/^system\.host\..+\.inputCount$/)&&(e=e.substring(0,e.length-11),this.$tab.find('.host-in[data-host-id="'+e+'"]').html('↦'+t.val+""))}}function Instances(i){var p=this;function b(e,t,n,i,a){if("protocol"===n&&(n="secure"),"ip"===e)i=i.replace("%"+e+"%",location.hostname);else if("instance"===e)i=i.replace("%"+e+"%",a);else if(t){n.match(/^native_/)&&(n=n.substring(7));var s=t.native[n];"bind"!==e||s&&"0.0.0.0"!==s||(s=location.hostname),i="secure"===n?i.replace("%"+e+"%",s?"https":"http"):-1===i.indexOf("%"+e+"%")?i.replace("%native_"+e+"%",s):i.replace("%"+e+"%",s)}else i="secure"===n?i.replace("%"+e+"%","http"):-1===i.indexOf("%"+e+"%")?i.replace("%native_"+e+"%",""):i.replace("%"+e+"%","");return i}function o(e,t,n){var i,a,s,o=e.match(/%(\w+)%/g);if(o){for(a=o.length-1;0<=a;a--)s=(i=(i=o[a]).replace(/%/g,"")).split("_"),i.match(/^native_/)?(e=b(i,p.main.objects["system.adapter."+t+"."+n],i,e,n),o.splice(a,1)):1===s.length?(e=b(i,p.main.objects["system.adapter."+t+"."+n],s[0],e,n),o.splice(a,1)):s[0].match(/\.[0-9]+$/)&&(e=b(i,p.main.objects["system.adapter."+s[0]],s[1],e,n),o.splice(a,1));var r,c,l={},d=s[0];for(a=0;a',r+=''+_("Connected to host: ")+'',p.main.states[e+".connected"]&&p.main.states[e+".connected"].val?r+=''+_("true")+"":r+=_("false"),r+='',r+=''+_("Heartbeat: ")+'',p.main.states[e+".alive"]&&p.main.states[e+".alive"].val?r+=''+_("true")+"":r+=_("false"),r+="",p.main.states[n+"."+i+".info.connection"]||p.main.objects[n+"."+i+".info.connection"])r+=''+_("Connected to %s: ",n)+"",r+=(c=!!p.main.states[n+"."+i+".info.connection"]&&p.main.states[n+"."+i+".info.connection"].val)?!0===c?''+_("true")+"":''+c+"":_("false"),r+="";r+=""}else{var c;if(r='',r+='",p.main.states[n+"."+i+".info.connection"]||p.main.objects[n+"."+i+".info.connection"])r+='";r+="
    '+_("Connected to host: ")+'',p.main.states[e+".connected"]&&p.main.states[e+".connected"].val?r+=''+_("true")+"":(r+="daemon"===s.mode?''+_("false")+"":_("false"),o="daemon"===s.mode?"red":"blue"),r+='
    '+_("Heartbeat: ")+'',p.main.states[e+".alive"]&&p.main.states[e+".alive"].val?r+=''+_("true")+"":(r+="daemon"===s.mode?''+_("false")+"":_("false"),o="daemon"===s.mode?"red":"blue"),r+="
    '+_("Connected to %s: ",n)+"",(c=!!p.main.states[n+"."+i+".info.connection"]&&p.main.states[n+"."+i+".info.connection"].val)?r+=!0===c?''+_("true")+"":''+c+"":(o="red"===o?"red":"orange",r+=''+_("false")+""),r+="
    "}o="blue"===o?"":o,a.removeClass("led-red led-green led-orange led-blue").addClass("led-"+o).data("title",r),a.data("inited")||"gray"===o||(a.data("inited",!0),a.hover(function(){var e='
    '+$(this).data("title")+"
    ",t=$(e);t.insertAfter($(this)),$(this).data("big",t[0]);var n=parseFloat(t.height()),i=Math.round($(this).position().top-(n-parseFloat($(this).height()))/2);n+i>(window.innerHeight||document.documentElement.clientHeight)&&(i=(window.innerHeight||document.documentElement.clientHeight)-n),i<0&&(i=0),t.css({top:i}).on("click",function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)})},function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)}).on("click",function(){$(this).trigger("hover")}))}function r(){for(var e=p.main.states["system.host."+p.main.currentHost+".memRss"],t=1,n=e?e.val:0,i=0;i'+n+"");var r=_("%s processes",t),c=p.$tab.find("#running_processes");r!==c.text()&&c.html(''+r+"")}function c(){p.main.states["system.host."+p.main.currentHost+".memAvailable"]?p.memState="memAvailable":p.main.states["system.host."+p.main.currentHost+".freemem"]&&(p.memState="freemem");var e=p.main.states["system.host."+p.main.currentHost+"."+p.memState];if(e){p.totalmem=p.totalmem||p.main.objects["system.host."+p.main.currentHost].native.hardware.totalmem/1048576;var t=Math.round(e.val/p.totalmem*100),n=p.$tab.find("#freeMem"),i=tdp(e.val);i!==n.text()&&(n.html(''+i+""),p.$tab.find("#freeMemPercent").html(''+t+"%"))}else p.$tab.find(".free-mem-label").hide()}function l(){var e=p.main.states["system.host."+p.main.currentHost+".diskSize"],t=p.main.states["system.host."+p.main.currentHost+".diskFree"],n=p.main.states["system.host."+p.main.currentHost+".diskWarning"];if(t&&t.val&&e&&e.val){n=n?parseFloat(n.val):5;var i=p.$tab.find("#diskFree"),a=Math.round(t.val/e.val*1e3)/10;i.html(''+a+""),i.parent().attr("title",_("Size: %s, Free: %s",p.main.formatBytes(1024*e.val*1024),p.main.formatBytes(1024*t.val*1024)))}else p.$tab.find(".tab-instances-info-disk").hide()}function M(e){var t,n=p.main.objects[e]&&p.main.objects[e].common||{};return t=n.enabled&&"daemon"===n.mode&&p.main.states[e+".memRss"]?(t=p.main.states[e+".memRss"].val,t=parseFloat(t)||0,n.memoryLimitMB&&n.memoryLimitMB<=t?''+t.toFixed(1)+" MB":t.toFixed(1)+" MB"):""}function d(e,t,n,i){var a,s=p.main.objects[t]&&p.main.objects[t].common||{},o=t.split("."),r=o[2],c=o[3];if("tile"===n)a=i?"":'
    ',a+=i?"":"
    ";else{a=i?"":'';var l=s.localLinks||s.localLink||"",d=l?p.replaceInLink(l,r,c):"";l&&(l="object"==typeof d?'':''),a+='
    ',a+=""+(s.icon?l+'':"")+(l?"
    ":"")+"",a+=''+r+"."+c+"";var u=s.onlyWWW||s.enabled;a+='',a+=''+(d?'':"")+"";var m=s.titleLang||s.title;if("object"==typeof m&&(m=m[systemLang]||m.en),a+=''+(m||"")+"",1'+(s.host||"")+""}a+=''+("schedule"===s.mode&&s.schedule||"")+"",p.main.config.expertMode&&(a+=''+(s.restartSchedule||"")+"",a+=''+(s.loglevel||"")+"",a+=''+(s.memoryLimitMB||"")+"",u&&p.main.states[t+".inputCount"]&&p.main.states[t+".outputCount"]?a+='⇥'+p.main.states[t+".inputCount"].val+' / ↦'+p.main.states[t+".outputCount"].val+"":a+=' / '),a+=''+M(t)+"",a+=i?"":""}i?p.$tab.find('.instance-adapter[data-instance-id="'+t+'"]').html(a):e.append(a),p.initButtons(t,d),f(t),p.$tab.find('.instance-editable[data-instance-id="'+t+'"]').on("click",y).addClass("select-id-quick-edit"),p.$tab.find('.instance-schedule[data-instance-id="'+t+'"]').each(function(){$(this).find("button").length||($(this).append(''),$(this).find("button").on("click",function(){var n=$(this).data("name"),i=$(this).data("instance-id");!function(e,t){e=(e||"").replace(/"/g,"").replace(/'/g,"");try{setupCron(e,t)}catch(e){alert(_("Cannot parse value as cron"))}}(p.main.objects[i].common[n]||"",function(e){if(null!==e){var t={common:{}};t.common[n]=e,p.main.socket.emit("extendObject",i,t,function(e){e&&p.main.showError(e)})}})}))}),p.$tab.find('.instance-name[data-instance-id="'+t+'"]').on("click",function(){var e=p.$tab.find('.instance-settings[data-instance-id="'+$(this).data("instance-id")+'"]');e.hasClass("small-button-empty")||e.trigger("click")}).css("cursor","pointer")}function u(e){void 0===e&&(e=p.$tab.find(".instances-filter").val());var t=[];if(e)for(var n=new RegExp(e),i=0;i';for(var u=0;u'+(m[1]||m[0])+""}c+=""}c=c||'';var g=null;t.html(c+'
    ');var h=n?t.find("select"):t.find("input");t.find(".select-id-quick-edit-cancel").off("click").on("click",function(e){g&&clearTimeout(g),g=null,e.preventDefault(),e.stopPropagation(),t.html(o).off("click").on("click",y).addClass("select-id-quick-edit").css("text-align",r)}),t.find(".select-id-quick-edit-ok").off("click").on("click",function(){t.trigger("blur")}),h.val(s),h.blur(function(){g&&clearTimeout(g),g=setTimeout(function(){g=null;var n=$(this).val();s=JSON.stringify(n)!==JSON.stringify(s)?(p.main.socket.emit("getObject",i,function(e,t){t?(t.common=t.common||{},t.common[a]=n,"title"===a&&t.common.titleLang&&delete t.common.titleLang,p.main.socket.emit("setObject",t._id,t,function(e){e&&p.main.showError(e)})):console.log("Object "+i+" does not exist: "+e)}),''+s+""):o,t.html(s).off("click").on("click",y).addClass("select-id-quick-edit").css("text-align",r)}.bind(this),100)}).on("keyup",function(e){13===e.which&&$(this).trigger("blur"),27===e.which&&(void 0===s&&(s=""),t.html(s).off("click").on("click",y).addClass("select-id-quick-edit").css("text-align",r))}),"object"==typeof e&&(e.preventDefault(),e.stopPropagation()),setTimeout(function(){h.focus()},100)}this.$tab=$("#tab-instances"),this.$grid=$("#grid-instances"),this.$gridHead=$("#grid-instances-head"),this.inited=!1,this.main=i,this.list=[],this.hostsText=null,this.filterHost=!1,this.memState="memAvailable",window.tdp||(window.tdp=function(e,t){return isNaN(e)?"":e.toFixed(t||0).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,".")}),this.replaceInLink=function(e,t,n){if("object"!=typeof e)return o(e,t,n);var i,a=JSON.parse(JSON.stringify(e));for(var s in a)a.hasOwnProperty(s)&&(a[s]=o(a[s],t,n),i||(i=a[s]));return a.__first=i,a},this.prepare=function(){var e=p.$tab.find(".instances-filter"),t=p.$tab.find(".instances-filter-clear");e.on("change",function(){var e=$(this).val();e?($(this).addClass("input-not-empty"),t.show()):($(this).removeClass("input-not-empty"),t.hide()),p.main.saveConfig("instancesFilter",e),u(e)}).on("keyup",function(){p.filterTimeout&&clearTimeout(p.filterTimeout),p.filterTimeout=setTimeout(function(){e.trigger("change")},300)}),p.main.config.instancesFilter&&"{"!==p.main.config.instancesFilter[0]?(e.addClass("input-not-empty").val(p.main.config.instancesFilter),t.show()):t.hide(),p.$tab.find(".btn-instances-expert-mode").on("click",function(){p.main.config.expertMode=!p.main.config.expertMode,p.main.saveConfig("expertMode",p.main.config.expertMode),p.updateExpertMode(),p.main.tabs.adapters.updateExpertMode()}),p.main.config.expertMode&&p.$tab.find(".btn-instances-expert-mode").addClass("red lighten-3"),p.$tab.find(".btn-instances-reload").on("click",function(){p.init(!0,!0)}),t.on("click",function(){e.val("").trigger("change")}),this.$tab.find(".btn-instances-host").off("click").on("click",function(){p.filterHost=!p.filterHost,p.filterHost?p.$tab.find(".btn-instances-host").addClass("red lighten-3"):p.$tab.find(".btn-instances-host").removeClass("red lighten-3"),p.main.saveConfig("instancesFilterHost",p.filterHost),setTimeout(function(){u()},50)}),this.filterHost=this.main.config.instancesFilterHost||!1,this.filterHost?this.$tab.find(".btn-instances-host").addClass("red lighten-3"):this.$tab.find(".btn-instances-host").removeClass("red lighten-3")},this.updateExpertMode=function(){p.init(!0),p.main.config.expertMode?p.$tab.find(".btn-instances-expert-mode").addClass("red lighten-3"):p.$tab.find(".btn-instances-expert-mode").removeClass("red lighten-3")},this.replaceLink=function(n,i,a,s){var o;(n=n.replace(/%/g,"")).match(/^native_/)&&(n=n.substring(7)),-1===n.indexOf("_")?o=[i+"."+a,n]:(o=n.split("_"))[0].match(/\.[0-9]+$/)||(o[0]+=".0"),"protocol"===o[1]&&(o[1]="secure"),"instance"!==n?this.main.socket.emit("getObject","system.adapter."+o[0],function(e,t){t&&setTimeout(function(){var e;(e=s?p.$tab.find("#"+s).data("src"):p.$tab.find("#a_"+i+"_"+a).attr("href"))&&(e="secure"===o[1]?e.replace("%"+n+"%",t.native[o[1]]?"https":"http"):-1===e.indexOf("%"+n+"%")?e.replace("%native_"+n+"%",t.native[o[1]]):e.replace("%"+n+"%",t.native[o[1]]),s?p.$tab.find("#"+s).data("src",e):p.$tab.find("#a_"+i+"_"+a).attr("href",e))},0)}):setTimeout(function(){var e;e=(e=s?p.$tab.find("#"+s).data("src"):p.$tab.find("#a_"+i+"_"+a).attr("href")).replace("%instance%",a),s?p.$tab.find("#"+s).data("src",e):p.$tab.find("#a_"+i+"_"+a).attr("href",e)},0)},this._replaceLink=function(n,i,a,s,o){var r;(i=i.replace(/%/g,"")).match(/^native_/)&&(i=i.substring(7)),-1===i.indexOf("_")?r=[a+"."+s,i]:(r=i.split("_"))[0].match(/\.[0-9]+$/)||(r[0]+=".0"),"protocol"===r[1]&&(r[1]="secure"),this.main.socket.emit("getObject","system.adapter."+r[0],function(e,t){n=t&&n?"secure"===r[1]?n.replace("%"+i+"%",t.native[r[1]]?"https":"http"):-1===n.indexOf("%"+i+"%")?n.replace("%native_"+i+"%",t.native[r[1]]):n.replace("%"+i+"%",t.native[r[1]]):(console.log("Cannot get link "+r[1]),n.replace("%"+i+"%","")),setTimeout(function(){o(n,a,s)},0)})},this._replaceLinks=function(e,t,n,i,a){if(!e)return a(e,t,n,i);var s=e.match(/%(\w+)%/g);return s?"%ip%"===s[0]?(e=e.replace("%ip%",location.hostname),void this._replaceLinks(e,t,n,i,a)):"%instance%"===s[0]?(e=e.replace("%instance%",n),void this._replaceLinks(e,t,n,i,a)):void this._replaceLink(e,s[0],t,n,function(e,t,n){this._replaceLinks(e,t,n,i,a)}.bind(this)):a(e,t,n,i)},this._postInit=function(e,t){if(this.main.currentHost&&void 0!==this.$grid&&(!this.$grid.data("inited")||e)){this.$grid.data("inited",!0),this.list.sort();for(var n=[],i=this.list.length-1;0<=i;i--)this.main.objects[this.list[i]]&&this.main.objects[this.list[i]].common&&!this.main.objects[this.list[i]].common.localLink&&!this.main.objects[this.list[i]].common.localLinks&&this.main.objects[this.list[i]].common.noConfig&&(n.push(this.list[i]),this.list.splice(i,1));for(this.list.sort(),n.sort(),i=0;i",o+=''+_("instance")+"",o+='',o+='',o+=''+_("actions")+"",o+=''+_("title")+"",1'+_("host")+""),o+=''+_("schedule_group")+"",p.main.config.expertMode&&(o+=''+_("restart")+"",o+=''+_("loglevel")+"",o+=''+_("memlimit")+"",o+=''+_("events")+""),o+=''+_("RAM usage")+"",p.$gridHead.html(o),this.$grid.html("");for(var a=Date.now(),s=0;s'+_("Filtered out")+""),p.$tab.find("#currentHost").html(this.main.currentHost),1'+s+"")}else"outputCount"===i?p.$tab.find('.instance-out[data-instance-id="'+e+'"]').html('↦'+t.val+""):"inputCount"===i&&p.$tab.find('.instance-in[data-instance-id="'+e+'"]').html('⇥'+t.val+"");if(-1!==this.list.indexOf(e))return void("alive"!==i&&"connected"!==i||f(e));e="system.adapter."+n[0]+"."+n[1],-1!==this.list.indexOf(e)&&"connection"===i&&f(e)}}},this.objectChange=function(e,t,n){if(e.match(/^system\.adapter\.[-\w]+\.[0-9]+$/))if(t)-1===this.list.indexOf(e)?(this.list.push(e),this.updateTimer&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){p.updateTimer=null,p.init(!0)},200),t.common.noConfig||setTimeout(function(){-1===window.location.hash.indexOf("/config/")&&p.main.navigate({tab:"instances",dialog:"config",params:e})},2e3)):-1!==e.indexOf(".web.")?(this.updateTimer&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){p.updateTimer=null,p.init(!0)},200)):this.$grid.find('.instance-adapter[data-instance-id="'+e+'"]').html(d(this.$grid,e,this.main.config.instanceForm,!0));else{var i=this.list.indexOf(e);-1!==i&&(this.list.splice(i,1),this.$grid.find('.instance-adapter[data-instance-id="'+e+'"]').remove())}else e.match(/^system\.host\.[-\w]+$/)&&(this.updateTimer&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){p.updateTimer=null,p.init(!0)},200))},this.initButtons=function(e,t){e=e?'[data-instance-id="'+e+'"]':"";var n=p.$grid.find(".instance-edit"+e).off("click").on("click",function(){p.onEdit($(this).attr("data-instance-id"))});n.find(".ui-button-icon-primary").length||n.attr("title",_("edit")),(n=p.$grid.find(".instance-settings"+e).off("click").on("click",function(){p.main.navigate({tab:"instances",dialog:"config",params:$(this).data("instance-id")})})).each(function(){var e=$(this).attr("data-instance-id");i.objects[e]&&i.objects[e].common&&i.objects[e].common.noConfig&&$(this).addClass("disabled")}),n=p.$grid.find(".instance-reload"+e).off("click").on("click",function(){p.main.socket.emit("extendObject",$(this).attr("data-instance-id"),{},function(e){e&&p.main.showError(e)})}),n=p.$grid.find(".instance-del"+e).off("click").on("click",function(){var t=$(this).attr("data-instance-id");if(p.main.objects[t]&&p.main.objects[t].common&&p.main.objects[t].common.host){var e=t.replace(/^system\.adapter\./,"");p.main.confirmMessage(_("Are you sure you want to delete the instance %s?",e),null,"help",function(e){e&&p.main.cmdExec(p.main.objects[t].common.host,"del "+t.replace("system.adapter.",""),function(e){e||p.main.tabs.adapters.init(!0)})})}}),n=p.$grid.find(".instance-issue"+e).off("click").on("click",function(){p.main.navigate({tab:"instances",dialog:"issue",params:$(this).data("instance-id")})}),p.$grid.find(".instance-image"+e).each(function(){$(this).data("installed")||($(this).data("installed",!0),$(this).hover(function(){var e='
    ',t=$(e);t.insertAfter($(this)),$(this).data("big",t[0]);var n=parseFloat(t.height()),i=Math.round($(this).position().top-(n-parseFloat($(this).height()))/2);n+i>(window.innerHeight||document.documentElement.clientHeight)&&(i=(window.innerHeight||document.documentElement.clientHeight)-n),i<0&&(i=0),t.css({top:i})},function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)}))}),(n=p.$grid.find(".instance-stop-run"+e).off("click").on("click",function(){var e=$(this).attr("data-instance-id");$(this).addClass("disabled"),p.main.socket.emit("extendObject",e,{common:{enabled:!p.main.objects[e].common.enabled}},function(e){e&&p.main.showError(e)})})).find(".ui-button-icon-primary").length||n.each(function(){var e=$(this).attr("data-instance-id");p.main.objects[e].common.enabled?n.addClass("instance-running").attr("title",_("Activated. Click to stop.")).find("i").html("pause"):n.removeClass("instance-running").attr("title",_("Deactivated. Click to start.")).find("i").html("play_arrow")}),n=p.$grid.find(".instance-web"+e).off("click").on("click",function(){var e=$(this).data("link");if("object"==typeof e){var t="";for(var n in e)if(e.hasOwnProperty(n)&&"__first"!==n){var i=e[n].match(/^https?:\/\/[-.\w]+:(\d+)\/?/),a=e[n].match(/^https:\/\//);t+='"}t+='";var s=$("#instances-menu");s.data("inited")&&s.menu("destroy");var o=$(this).position();s.html(t),s.data("inited")||(s.data("inited",!0),s.mouseleave(function(){$(this).hide()})),s.menu().css({left:o.left,top:o.top}).show(),s.find(".instances-menu-link").off("click").on("click",function(){$(this).data("link")&&window.open($(this).data("link"),$(this).data("instance-id")),$("#instances-menu").hide()})}else window.open($(this).data("link"),$(this).data("instance-id"))}),"object"==typeof t&&n.data("link",t)},this.resize=function(e,t){}}function Intro(e){var L=this;function t(e){var t=Math.floor(e/86400);e%=86400;var n=Math.floor(e/3600);n<10&&(n="0"+n),e%=3600;var i=Math.floor(e/60);i<10&&(i="0"+i),e%=60,(e=Math.floor(e))<10&&(e="0"+e);var a="";return t&&(a+=t+" "+_("daysShortText")+" "),a+=n+":"+i+":"+e}this.$tab=$("#tab-intro"),this.$tiles=this.$tab.find(".tab-intro-cards"),this.main=e,this.inited=!1,this.$template=$("#intro-template");var d={Uptime:t,"System uptime":t,RAM:function(e){var t=Math.floor(e/1073741824*10)/10;e%=1073741824;var n=Math.floor(e/1048576*10)/10,i="";return i+=1");$(this).append(t),t.val($(this).data("clippy")),t.trigger("select"),document.execCommand("copy"),t.remove(),e.preventDefault(),e.stopPropagation(),L.main.showToast(L.$tiles,_("copied"))}function C(e){var t,c=L.$template.clone();if(c.removeAttr("id"),c.addClass("card-system-info"),c.find(".btn-small").addClass("disabled"),c.find(".card-titles").text(e.name),c.find(".btn-card-enabled").data("host",e.id),!1===L.main.systemConfig.common.intro[e.id]){if(!L.$tab.hasClass("edit-active"))return null;c.addClass("card-disabled").find(".btn-card-enabled").removeClass("blue").addClass("gray").find("i").text("close")}L.main.objects[e.id]&&L.main.objects[e.id].common&&(t=L.main.objects[e.id].common.icon),c.find(".card-image-img").attr("src",t||"img/no-image.png"),c.find(".card-content-text").html('
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ');var l=setTimeout(function(){l&&(l=null,c.find(".btn-small").addClass("disabled"),c.find(".card-content-text").html(_("offline")))},6e3);return d["Disk size"]=d["Disk size"]||L.main.formatBytes,d["Disk free"]=d["Disk size"]||L.main.formatBytes,L.main.socket.emit("sendToHost",e.id,"getHostInfo",null,function(e){clearTimeout(l),l=null,"permissionError"===e?console.error('May not read "getHostInfo"'):e?c.find(".btn-small").removeClass("disabled"):console.error('Cannot read "getHostInfo"');var t=L.main.states["system.host."+L.main.currentHost+".diskWarning"];t=t?parseFloat(t.val):5;var n=0"+_(a)+": ",i+=''+(d[a]?d[a](e[a]):e[a]||" --")+"");n&&(i+="
  • "+_("Disk free")+": ",i+=''+(d["Disk free"]?d["Disk free"](e["Disk free"]):e["Disk free"]||" --")+"
  • ",i+="
  • "+_("Disk size")+": ",i+=''+(d["Disk size"]?d["Disk size"](e["Disk size"]):e["Disk size"]||" --")+"
  • "),i+=""}i+="",c.find(".card-content-text").replaceWith($(i)),i='
    '+_("Info")+'
    content_copyclose';var s=[];if(e){for(var o in i+="
      ",e)if(e.hasOwnProperty(o)){i+="
    • "+_(o)+": ";var r=d[o]?d[o](e[o]):e[o];s.push(o+": "+r),i+="Disk free"===o&&n?''+r+"
    • ":''+r+""}i+="
    "}i+="
    ",c.find(".card-reveal").replaceWith($(i)),L.$tab.hasClass("edit-active")?c.find(".btn-small").hide():c.find(".btn-info").data("clippy",s.join("\r\n")).on("click",u)}),c}function D(e,t,n,i,a,s,o){var r=L.$template.clone();r.removeAttr("id");var c=a.replace(/^https?:\/\//,""),l=c.indexOf("/");if(-1!==l&&(c=c.substring(0,l)),"admin"===e&&c===location.host)return null;if("web"===e)return null;if("vis-web-admin"!==e&&e.match(/^vis-/))return null;if(e.match(/^icons-/))return null;if(i&&i.noIntro)return null;r.find(".btn-card-enabled").data("instance",e+"."+t+(n&&n.name?"."+n.name:"")).data("web",s),o?r.on("click",function(){L.$tab.hasClass("edit-active")||window.open($(this).find(".url").attr("href"))}):r.addClass("card-disabled").find(".btn-card-enabled").removeClass("blue").addClass("gray").find("i").text("close"),r.find(".url").attr("href","object"==typeof a?a._first:a||"").text(c+(s?" ("+s+")":"")),r.find(".card-image-img").attr("src",i.icon?"adapter/"+e+"/"+i.icon:"img/no-image.png"),n&&n.color&&r.find(".card-image").css("background",n.color);var d=n&&n.name||i.titleLang||i.title;"object"==typeof d&&(d=d[systemLang]||d.en),r.find(".card-titles").text(d||e);var u=i.desc;return"object"==typeof u&&(u=u[systemLang]||u.en),r.find(".card-content-text").text(u||""),r}function n(e,i){!function(e,t){var n,i,a,s=JSON.parse(JSON.stringify(e)),o=[];s.sort(function(e,t){return e=L.main.objects[e]&&L.main.objects[e].common,t=(t=L.main.objects[t]&&L.main.objects[t].common)||{},void 0===(e=e||{}).order&&void 0===t.order?e.name.toLowerCase()>t.name.toLowerCase()?1:e.name.toLowerCase()t.order?1:e.ordert.name.toLowerCase()?1:e.name.toLowerCase()\n \n');$.getJSON("https://api.github.com/repos/"+i[3]+"/"+i[4]+"/issues",function(e){var t=!1;for(var n in r.empty(),e)if(e.hasOwnProperty(n)){if("remove"===n)break;var i=e[n];if(!i.hasOwnProperty("pull_request")){t=!0;var a=$("#issueTable").children().clone(!0,!0);a.find(".collapsible-header-title").text(i.title),a.find(".goto").attr("href",i.html_url),a.find(".user").text(i.user.login),a.find(".form-row").html((new showdown.Converter).makeHtml(i.body).replace(/src="/g,'class="responsive-img" src="'));var s=new Date(new Date(i.created_at));if(a.find(".created").text(s.toLocaleDateString(systemLang,{weekday:"short",year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),0'+i.labels[o].name+"")}r.append(a),0}}t||r.append($('
  • '+_("No bug")+"

  • "))}).done(a.$dialogIssue.find(".collapsible").collapsible())}a.$dialogIssue.data("name",t),a.$dialogIssue.find(".title").html(_("Known bugs for")+": "+t),a.$dialogIssue.find(".dialog-system-buttons .btn-add").attr("href","https://github.com/"+i[3]+"/"+i[4]+"/issues/new"),a.$dialogIssue.find(".dialog-system-buttons .btn-cancel").off("click").on("click",function(e){e.stopPropagation(),e.preventDefault(),a.main.navigate()})}},this.destroy=function(){this.inited&&(this.$dialogIssue.find(".collapsible").collapsible("destroy"),this.inited=!1)}}function Logs(t){var c=this;this.main=t,this.$tab=$("#tab-logs");var s,l,o,d,r={count:0,start:0,limit:2e3},u={host:"",severity:"",message:""},m={list:[],mode:!1,counter:0,overflow:!1,$counterSpan:null};this.prepare=function(){l=this.$tab.find("#log-outer"),s=this.$tab.find("#log-table"),o=this.$tab.find("#log-pause"),(d=new IobListHeader("log-outer-header",{list:l,colWidthOffset:1,prefix:"log-filter"})).doFilter=c.filter,d.add("combobox","from","host"),d.add("text","Time"),d.add("combobox","","severity",[{val:"",name:"debug"},{val:"silly",name:"silly"},{val:"info",name:"info"},{val:"warn",name:"warn"},{val:"error",name:"error"}]).$filter.attr("title",_("severity")),d.add("edit","Message","message"),this.$tab.find("#log-clear-on-disk").on("click",function(){c.main.confirmMessage(_("Log file will be deleted. Are you sure?"),null,null,function(e){e&&c.main.socket.emit("sendToHost",t.currentHost,"delLogs",null,function(e){e?c.main.showError(e):c.clear()})})}).addClass("ui-state-error"),this.$tab.find("#log-refresh").on("click",function(){c.clear()}),o.attr("title",_("Pause output")).on("click",function(){c.pause()}),m.$counterSpan=o.find("ui-button-text"),this.$tab.find("#log-clear").on("click",function(){c.clear(!1)}),$("#log-copy-text").on("click",function(){$(this).hide().html("")}),this.$tab.find("#log-copy").on("click",function(){var e=''+_("copy note")+"";$("#log-copy-text").show().html(e+'
    '+s.html()+"
    ");for(var t=c.$tab.find("#log-copy-table").find(".log-column-4"),n=0;n'+a+"")}t.sort();for(var s=0;s'+o+"")}c.$tab.find("#log-files-btn").show().dropdown(),c.$tab.find("#log-files").html(n).find("a").on("click",function(){var e=$(this).data("value");e&&($(this).val(""),window.open(e,"_blank").focus())})}else c.$tab.find("#log-files").hide(),c.$tab.find("#log-files-btn").hide()})},0)})}else setTimeout(function(){c.init(e)},100)},this.destroy=function(){this.inited&&(this.inited=!1,this.main.subscribeLogs(!1))},this.add=function(e){if(s){if(e.message.substring(0,e.from.length)===e.from&&(e.message=e.message.substring(e.from.length+1)),m.mode)return m.list.push(e),m.counter++,m.counter>r.limit&&(m.overflow||(o.addClass("ui-state-error").attr("title",_("Message buffer overflow. Losing oldest")),m.overflow=!0),m.list.shift()),void m.$counterSpan.html(tdp(m.counter));if(r.count>=r.limit){var t=document.getElementById("log-line-"+(r.start+1));t&&(t.outerHTML=""),r.start++}else r.count++;e.from&&d&&d.host.checkAddOption(e.from,function(e){return{val:e.replace(/\./g,"-"),name:e}});var n="",i=e.from?e.from.replace(/\./g,"-"):"";u.host&&u.host!==i&&(n="display: none"),!n&&u.severity&&("debug"===u.severity&&"silly"===e.severity?n="display: none":"info"!==u.severity||"debug"!==e.severity&&"silly"!==e.severity?"warn"===u.severity&&"warn"!==e.severity&&"error"!==e.severity?n="display: none":"error"===u.severity&&"error"!==e.severity&&(n="display: none"):n="display: none"),!n&&u.message&&-1===e.message.indexOf(u.message)&&(n="display: none"),"error"===e.severity&&(c.$tabLogs=c.$tabLogs||$('a[href="#tab-logs"]'),c.$tabLogs.addClass("errorLog"));var a='';a+=''+(e.from||"")+"",a+=''+this.main.formatDate(e.ts)+"",a+=''+e.severity+"",a+=''+e.message.substring(0,200).replace(/&/g,"&").replace(//g,">")+"",s.prepend(a)}},this.filter=function(){u.host=d.host.val(),u.message=d.message.val(),u.severity=d.severity.val(),"error"===u.severity?(l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").hide(),l.find(".log-severity-info").hide(),l.find(".log-severity-warn").hide()):("warn"===u.severity?(l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").hide(),l.find(".log-severity-info").hide()):("info"===u.severity?(l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").hide()):("silly"===u.severity?l.find(".log-severity-silly").show():l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").show()),l.find(".log-severity-info").show()),l.find(".log-severity-warn").show()),l.find(".log-severity-error").show(),(u.host||u.message)&&l.find(".log-line").each(function(){u.host&&!$(this).hasClass("log-from-"+u.host)?$(this).hide():u.message&&-1===$(this).html().indexOf(u.message)&&$(this).hide()})},this.clear=function(e){void 0===e&&(e=!0),s.html(""),r.count=0,r.start=0,c.$tabLogs=c.$tabLogs||$('a[href="#tab-logs"]'),c.$tabLogs.removeClass("errorLog"),e&&setTimeout(function(){c.init(e)},0)},this.pause=function(){if(m.mode){m.mode=!1;for(var e=0;epause')}else o.addClass("yellow btn-pause-button-active"),m.$counterSpan=o,m.$counterSpan.html("0"),m.counter=0,m.mode=!0}}function Issue(e){var a=this;this.$dialog=$("#dialog-issue"),this.main=e,this.prepare=function(){},this.init=function(){if(!this.inited){this.inited=!0,showdown.setFlavor("github");var e=this.main.navigateGetParams(),t=e.replace(/^system\.adapter\./,""),n=this.main.objects[e];if(n&&n.common&&n.common.extIcon){var i=n.common.extIcon.split("/"),r=$("#result-issue");r.html('
    \n \n
    ');$.getJSON("https://api.github.com/repos/"+i[3]+"/"+i[4]+"/issues",function(e){var t=!1;for(var n in r.empty(),e)if(e.hasOwnProperty(n)){if("remove"===n)break;var i=e[n];if(!i.hasOwnProperty("pull_request")){t=!0;var a=$("#issueTable").children().clone(!0,!0);a.find(".collapsible-header-title").text(i.title),a.find(".goto").attr("href",i.html_url),a.find(".user").text(i.user.login),a.find(".form-row").html((new showdown.Converter).makeHtml(i.body).replace(/src="/g,'class="responsive-img" src="'));var s=new Date(new Date(i.created_at));if(a.find(".created").text(s.toLocaleDateString(systemLang,{weekday:"short",year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),0'+i.labels[o].name+"")}r.append(a),0}}t||r.append($('
  • '+_("No bug")+"

  • "))}).done(a.$dialog.find(".collapsible").collapsible())}a.$dialog.data("name",t),a.$dialog.find(".title").html(_("Known bugs for")+": "+t),a.$dialog.find(".dialog-system-buttons .btn-add").attr("href","https://github.com/"+i[3]+"/"+i[4]+"/issues/new"),a.$dialog.find(".dialog-system-buttons .btn-cancel").off("click").on("click",function(e){e.stopPropagation(),e.preventDefault(),a.main.navigate()})}},this.destroy=function(){this.inited&&(this.$dialog.find(".collapsible").collapsible("destroy"),this.inited=!1)}}function Objects(e){var c=this;this.$grid=$("#grid-objects"),this.subscribes={},this.main=e;var o=function(){if(c.$grid&&c.$grid.selectId)return o=c.$grid.selectId.bind(c.$grid),c.$grid.selectId.apply(c.$grid,arguments)};function r(t,e,n){for(var i=c.main.tabs.enums.list,a=[],s=0;s').show():o.$divLogo.html("").hide(),c(n.readme),c(n.changeLog),c(n.license),n.readme.length?n.readme=r(n.readme.join("\n"),t):n.readme="",n.changeLog.length?n.changeLog=r(n.changeLog.join("\n"),t):delete n.changeLog,n.license.length?(n.license[0]="## "+n.license[0],n.license=r(n.license.join("\n"),t)):delete n.license,n}(e,i.substring(0,i.lastIndexOf("/")+1));o.$divReadme.html(n.readme),n.changeLog?(o.$divChangeLog.html(n.changeLog),o.$tabs.find(".tab-changelog").show()):(o.$divChangeLog.html(""),o.$tabs.find(".tab-changelog").hide()),n.license?(o.$divLicense.html(n.license),o.$tabs.find(".tab-license").show()):(o.$divLicense.html(""),o.$tabs.find(".tab-license").hide())}).done(function(){o.$divReadme.on("click",".md-link",function(e){e.stopPropagation(),e.preventDefault(),o.fillDiv($(this).data("url"))}),o.$divReadme.on("click",".goto-link",function(e){e.stopPropagation(),e.preventDefault();var t=$($(this).data("goto"));t.length&&o.$divReadme.animate({scrollTop:o.$divReadme.scrollTop()-o.$divReadme.offset().top+t.offset().top},2e3)})})},this.destroy=function(){this.inited&&(localStorage.removeItem("original-md-url"),this.inited=!1)}}function initMap(){gMain.dialogs.system.mapLoaded=!0,gMain.dialogs.system.updateMap(!0)}function System(s){var a,o,r,c,l=this;this.$dialog=$("#dialog-system"),this.main=s,this.systemRepos=null,this.systemCerts=null;var d=!(this.mapLoaded=!1);function u(e,t){if(t.length<700&&(-1!==t.indexOf("/")||-1!==t.indexOf("\\")))return t;if(t.length<"-----BEGIN CERTIFICATE-----==-----END CERTIFICATE-----".length)return h(_('Invalid certificate "%s". To short.',e),!0),"";var n=[];if("-----BEGIN RSA PRIVATE KEY-----"===t.substring(0,"-----BEGIN RSA PRIVATE KEY-----".length)){if("-----END RSA PRIVATE KEY-----"!==t.substring(t.length-"-----END RSA PRIVATE KEY-----".length))return h(_('Certificate "%s" must end with "-----END RSA PRIVATE KEY-----".',e),!0),"";for(t=(t=(t=t.substring("-----BEGIN RSA PRIVATE KEY-----".length)).substring(0,t.length-"-----END RSA PRIVATE KEY-----".length)).replace(/\s/g,"");t.length;)n.push(t.substring(0,64)),t=t.substring(64);return"-----BEGIN RSA PRIVATE KEY-----\r\n"+n.join("\r\n")+"\r\n-----END RSA PRIVATE KEY-----\r\n"}if("-----BEGIN PRIVATE KEY-----"===t.substring(0,"-----BEGIN PRIVATE KEY-----".length)){if("-----END PRIVATE KEY-----"!==t.substring(t.length-"-----END PRIVATE KEY-----".length))return h(_('Certificate "%s" must end with "-----BEGIN PRIVATE KEY-----".',e),!0),"";for(t=(t=(t=t.substring("-----BEGIN PRIVATE KEY-----".length)).substring(0,t.length-"-----END PRIVATE KEY-----".length)).replace(/\s/g,"");t.length;)n.push(t.substring(0,64)),t=t.substring(64);return"-----BEGIN PRIVATE KEY-----\r\n"+n.join("\r\n")+"\r\n-----END PRIVATE KEY-----\r\n"}if("-----BEGIN CERTIFICATE-----"!==t.substring(0,"-----BEGIN CERTIFICATE-----".length))return h(_('Certificate "%s" must start with "-----BEGIN CERTIFICATE-----".',e),!0),"";if("-----END CERTIFICATE-----"!==t.substring(t.length-"-----END CERTIFICATE-----".length))return h(_('Certificate "%s" must end with "-----END CERTIFICATE-----".',e),!0),"";for(var i=t.split("-----END CERTIFICATE-----"),a=i.length-1;0<=a;a--)if(i[a].replace(/[\r\n|\r|\n]+/,"").trim()){for(t=(t=(t=i[a]).substring("-----BEGIN CERTIFICATE-----".length)).replace(/\s/g,""),n=[];t.length;)n.push(t.substring(0,64)),t=t.substring(64);i[a]="-----BEGIN CERTIFICATE-----\r\n"+n.join("\r\n")+"\r\n-----END CERTIFICATE-----\r\n"}else i.splice(a,1);return i.join("")}function m(e,t){for(var n,i=table2values("tab-system-certs"),a=[],s=0;s'+i[a].name+""),t===i[a].name&&(n=!0);n&&e.val(t);e.select()}()}}),l.systemRepos.nonEdit&&l.systemRepos.nonEdit.native&&l.systemRepos.nonEdit.native.repositories){var i=l.$dialog.find("#grid-repos");i.find("input").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),i.find("select").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),i.find(".btn-floating").each(function(){$(this).addClass("disabled")}),l.$dialog.find("#tab-system-repo .table-button-add").addClass("disabled")}}else l.$dialog.find("#tab-system-repo").html(_("permissionError"))}function h(e,t,n){l.main.showToast(l.$dialog.find("#tab-system-certs"),e,null,n,t)}function f(){var n=l.main.systemConfig.common,i=!1,a=!1;!function(){l.main.systemConfig.common.defaultNewAcl=l.main.systemConfig.common.defaultNewAcl||{};var e=l.main.systemConfig.common.defaultNewAcl,t=JSON.stringify(e);e.object=0,e.object|=l.$dialog.find("#tab-system-acl-obj-owner-read").prop("checked")?1024:0,e.object|=l.$dialog.find("#tab-system-acl-obj-owner-write").prop("checked")?512:0,e.object|=l.$dialog.find("#tab-system-acl-obj-group-read").prop("checked")?64:0,e.object|=l.$dialog.find("#tab-system-acl-obj-group-write").prop("checked")?32:0,e.object|=l.$dialog.find("#tab-system-acl-obj-every-read").prop("checked")?4:0,e.object|=l.$dialog.find("#tab-system-acl-obj-every-write").prop("checked")?2:0,e.owner=l.$dialog.find("#tab-system-acl-owner").val(),e.ownerGroup=l.$dialog.find("#tab-system-acl-group").val(),e.state=0,e.state|=l.$dialog.find("#tab-system-acl-state-owner-read").prop("checked")?1024:0,e.state|=l.$dialog.find("#tab-system-acl-state-owner-write").prop("checked")?512:0,e.state|=l.$dialog.find("#tab-system-acl-state-group-read").prop("checked")?64:0,e.state|=l.$dialog.find("#tab-system-acl-state-group-write").prop("checked")?32:0,e.state|=l.$dialog.find("#tab-system-acl-state-every-read").prop("checked")?4:0,e.state|=l.$dialog.find("#tab-system-acl-state-every-write").prop("checked")?2:0,e.file=0,e.file|=l.$dialog.find("#tab-system-acl-file-owner-read").prop("checked")?1024:0,e.file|=l.$dialog.find("#tab-system-acl-file-owner-write").prop("checked")?512:0,e.file|=l.$dialog.find("#tab-system-acl-file-group-read").prop("checked")?64:0,e.file|=l.$dialog.find("#tab-system-acl-file-group-write").prop("checked")?32:0,e.file|=l.$dialog.find("#tab-system-acl-file-every-read").prop("checked")?4:0,e.file|=l.$dialog.find("#tab-system-acl-file-every-write").prop("checked")?2:0,JSON.stringify(e)}(),l.$dialog.find(".system-settings.value").each(function(){var e=$(this),t=e.attr("id");t&&(t=t.substring("system_".length),"checkbox"===e.attr("type")?n[t]=e.prop("checked"):("language"===t&&n.language!==e.val()&&(i=!0),"activeRepo"===t&&n.activeRepo!==e.val()&&(a=!0),n[t]=e.val(),"isFloatComma"===t&&(n[t]="true"===n[t]||!0===n[t])))});var e={};if(l.systemRepos){for(var t in l.systemRepos.native.repositories)l.systemRepos.native.repositories.hasOwnProperty(t)&&"object"==typeof l.systemRepos.native.repositories[t]&&l.systemRepos.native.repositories[t].json&&(e[l.systemRepos.native.repositories[t].link]=l.systemRepos.native.repositories[t].json);l.systemRepos.native.repositories={}}var s=table2values("tab-system-repo");if(l.systemRepos){for(var o=null,r=0;r'+n+"");else l.$dialog.find("#tab-system-repo").html(_("permissionError"));l.$dialog.find("#diagMode").val(l.main.systemConfig.common.diag).on("change",function(){l.main.socket.emit("sendToHost",l.main.currentHost,"getDiagData",$(this).val(),function(e){l.$dialog.find("#diagSample").html(JSON.stringify(e,null,2))})}).trigger("change");var i=l.$dialog.find("#system_defaultHistory");i.html('');for(var a=0;a'+s.instances[a].substring("system.adapter.".length)+"");r=l.main.systemConfig.common.longitude,c=l.main.systemConfig.common.latitude,o||(o=!0,d?(l.mapLoaded=!0,$.ajax({url:"lib/js/ol.js",dataType:"script",cache:!0}).done(function(){setTimeout(l.updateMap,500)}),$.ajax({url:"lib/css/ol.css",success:function(e){$("head").append("")}})):$.ajax({url:"https://maps.googleapis.com/maps/api/js?key=AIzaSyCIrBRZfZAE_0C1OplAUy7OXhiWLoZc3eY&signed_in=true&callback=initMap",dataType:"script",cache:!0})),l.$dialog.find(".system-settings.value").each(function(){var e=$(this),t=e.attr("id");t&&(t=t.substring("system_".length),"checkbox"===e.attr("type")?e.prop("checked",l.main.systemConfig.common[t]):"isFloatComma"===t?e.val(l.main.systemConfig.common[t]?"true":"false"):e.val(l.main.systemConfig.common[t]),l.main.systemConfig.nonEdit&&l.main.systemConfig.nonEdit.common&&void 0!==l.main.systemConfig.nonEdit.common[t]&&(e.addClass("disabled"),e.prop("disabled",!0)))}),l.$dialog.find("#system_latitude").off("change").on("change",function(){c=$(this).val(),l.updateMap()}).off("keyup").on("keyup",function(){$(this).trigger("change")}),l.$dialog.find("#system_longitude").off("change").on("change",function(){r=$(this).val(),l.updateMap()}).off("keyup").on("keyup",function(){$(this).trigger("change")}),l.systemCerts.native.letsEncrypt||(l.systemCerts.native.letsEncrypt={path:"letsencrypt"}),l.$dialog.find(".system-le-settings.value").each(function(){var e=$(this),t=e.data("name");l.systemCerts&&l.systemCerts.native.letsEncrypt&&("checkbox"===e.attr("type")?e.prop("checked",l.systemCerts.native.letsEncrypt[t]):e.val(l.systemCerts.native.letsEncrypt[t])),l.systemCerts.nonEdit&&l.systemCerts.nonEdit.native&&l.systemCerts.nonEdit.native.letsEncrypt&&void 0!==l.systemCerts.nonEdit.native.letsEncrypt[t]&&(e.addClass("disabled"),e.prop("disabled",!0))}),l.$dialog.find("#tabs-system").find(".tabs").mtabs({onShow:function(e){e&&p($(e).attr("id"))}}),l.$dialog.find(".dialog-system-buttons .btn-save").off("click").on("click",f),l.$dialog.find(".dialog-system-buttons .btn-cancel").off("click").on("click",function(){l.main.navigate()}),g(),function(){l.main.systemConfig.common.defaultNewAcl=l.main.systemConfig.common.defaultNewAcl||{};for(var e,t=l.main.systemConfig.common.defaultNewAcl,n="",i=0;i'+(e||l.main.tabs.users.list[i])+"";for(l.$dialog.find("#tab-system-acl-owner").html(n).val(t.owner||"system.user.admin"),n="",i=0;i'+(e||l.main.tabs.users.groups[i])+"";l.$dialog.find("#tab-system-acl-group").html(n).val(t.ownerGroup||"system.group.administrator"),void 0===t.object&&(t.object=1636),l.$dialog.find("#tab-system-acl-obj-owner-read").prop("checked",1024&t.object),l.$dialog.find("#tab-system-acl-obj-owner-write").prop("checked",512&t.object),l.$dialog.find("#tab-system-acl-obj-group-read").prop("checked",64&t.object),l.$dialog.find("#tab-system-acl-obj-group-write").prop("checked",32&t.object),l.$dialog.find("#tab-system-acl-obj-every-read").prop("checked",4&t.object),l.$dialog.find("#tab-system-acl-obj-every-write").prop("checked",2&t.object),void 0===t.state&&(t.state=1636),l.$dialog.find("#tab-system-acl-state-owner-read").prop("checked",1024&t.state),l.$dialog.find("#tab-system-acl-state-owner-write").prop("checked",512&t.state),l.$dialog.find("#tab-system-acl-state-group-read").prop("checked",64&t.state),l.$dialog.find("#tab-system-acl-state-group-write").prop("checked",32&t.state),l.$dialog.find("#tab-system-acl-state-every-read").prop("checked",4&t.state),l.$dialog.find("#tab-system-acl-state-every-write").prop("checked",2&t.state),void 0===t.file&&(t.file=1636),l.$dialog.find("#tab-system-acl-file-owner-read").prop("checked",1024&t.file),l.$dialog.find("#tab-system-acl-file-owner-write").prop("checked",512&t.file),l.$dialog.find("#tab-system-acl-file-group-read").prop("checked",64&t.file),l.$dialog.find("#tab-system-acl-file-group-write").prop("checked",32&t.file),l.$dialog.find("#tab-system-acl-file-every-read").prop("checked",4&t.file),l.$dialog.find("#tab-system-acl-file-every-write").prop("checked",2&t.file),l.$dialog.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")})}(),function(){var e,t=l.$dialog.find("#tab-system-certs");if(l.systemCerts&&l.systemCerts.native.certificates){var n=[];for(var i in l.systemCerts.native.certificates)l.systemCerts.native.certificates.hasOwnProperty(i)&&n.push({name:i,certificate:(e=l.systemCerts.native.certificates[i],e.replace(/(?:\\[rn]|[\r\n]+)+/g,""))});if(values2table("tab-system-certs",n,{onChange:function(e){l.$dialog.find(".btn-save").removeClass("disabled")}}),l.systemCerts.nonEdit&&l.systemCerts.nonEdit.native&&l.systemCerts.nonEdit.native.certificates){var a=l.$dialog.find("#grid-certs");a.find("input").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),a.find("select").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),a.find(".btn-floating").each(function(){$(this).addClass("disabled")})}}else t.html(_("permissionError"));installFileUpload(t,1e4,function(e,t){if(e)h(e,!0);else{try{t=atob(t.split(",")[1])}catch(e){return void h(_("Cannot read file!"),!0)}if(-1!==(t=t.replace(/(\r\n|\n|\r)/gm,"")).indexOf("BEGIN RSA PRIVATE KEY"))m("private",t);else if(-1!==t.indexOf("BEGIN PRIVATE KEY"))m("private",t);else if(-1!==t.indexOf("BEGIN CERTIFICATE")){for(var n=t.split("-----END CERTIFICATE-----"),i=0,a=0;a'),c.find(".tab-dialog-new-icon .treetable-icon").attr("src",t),c.find(".tab-dialog-new-icon-clear").show()}}),"string"==typeof e&&(g.main.objects[e]&&g.main.objects[e].common&&(l.name=g.main.objects[e].common.name,l.icon=g.main.objects[e].common.icon,l.color=g.main.objects[e].common.color,l.desc=g.main.objects[e].common.desc,(o="group"===g.main.objects[e].type)&&(l.acl=g.main.objects[e].common.acl)),d=e,l.id=e),c.find(".tab-dialog-new-title").text(!0===e?_("Create new group"):l.id?_("Change"):_("Create new user")),l.id){var t=l.id.split(".");l.id=t.pop(),s=t.join(".")}c.find("#tab-users-dialog-new-name").val(translateName(l.name)).off("change").on("change",function(){var e=g.$grid.find("#tab-users-dialog-new-id"),t=e.val(),n=$(this).val();n=n.trim().replace(FORBIDDEN_CHARS,"_").replace(/\./g,"_").toLowerCase(),t&&a||!(o&&"administrator"!==t&&"user"!==t||!o&&"admin"!==t)||(e.val(n),i=n,c.find("#tab-users-dialog-new-preview").val(s+"."+(n||"#")),M.updateTextFields("#tab-users-dialog-new")),b(c)}).off("keyup").on("keyup",function(){$(this).trigger("change")}),c.find("#tab-users-dialog-new-desc").val(l.desc).off("change").on("change",function(){b(c)}).off("keyup").on("keyup",function(){$(this).trigger("change")}),i=l.id,c.find("#tab-users-dialog-new-id").val(l.id).off("change").on("change",function(){var e=$(this).val();i!==e&&(a=!0,i=e,c.find("#tab-users-dialog-new-preview").val(s+"."+(e||"#")),M.updateTextFields("#tab-users-dialog-new"),b(c))}).off("keyup").on("keyup",function(){$(this).trigger("change")}),c.find(".tab-dialog-create").addClass("disabled").off("click").text(_(d?"Change":"Create")).on("click",function(e){var n;l.name=c.find("#tab-users-dialog-new-name").val(),l.id=c.find("#tab-users-dialog-new-id").val(),l.desc=c.find("#tab-users-dialog-new-desc").val(),o?(n=l.acl,g.$grid.find(".edit-group-permissions").each(function(){var e=$(this).data("type"),t=$(this).data("operation");n[e]=n[e]||{},n[e][t]=$(this).prop("checked")}),function(i,a,s){if("system.group.administrator"===a&&"administrator"!==s.id)return i.stopPropagation(),u(_('Cannot change name of "%s"',"administrator"),!0);if("system.group.user"===a&&"user"!==s.id)return i.stopPropagation(),u(_('Cannot change name of "%s"',"user"),!0);if(!s.id)return i.stopPropagation(),u(_("ID may not be empty"),!0);if(a)if("system.group."+s.id!==a){if(g.main.objects["system.group."+s.id])return i.stopPropagation(),u(_("ID yet exists"),!0);g.main.socket.emit("getObject",a,function(e,t){if(e)h(_("Cannot change group: ")+e,!0);else{var n=s.id;t.common.name=s.name,t.common.color=s.color,t.common.icon=s.icon,t.common.desc=s.desc,delete s.id,g.main.socket.emit("delObject",a,function(e){e?(h(_("Cannot rename group: ")+e,!0),i.stopPropagation()):g.main.socket.emit("setObject",n,t,function(e){e?h(_("Cannot change group: ")+e,!0):h(_("Updated"))})})}})}else delete s.id,g.main.socket.emit("extendObject",a,{common:s},function(e,t){e?h(_("Cannot change group: ")+e,!0):h(_("Updated"))});else{if(!s.id)return i.stopPropagation(),u(_("ID may not be empty"),!0);g.main.socket.emit("addGroup",s.id,s.desc,null,function(e,t){e?h(_("Cannot create group: ")+e,!0):g.main.socket.emit("extendObject",t._id,{common:s},function(e){e?h(_("Cannot add group: ")+e,!0):h(_("Created"))})})}}(e,d,l)):(delete l.acl,r(e,d,l))}),c.find("#tab-users-dialog-new-preview").val(s+"."+(l.id||"#")),l.icon?(c.find(".tab-dialog-new-icon").show().html(g.main.getIcon(d)),c.find(".tab-dialog-new-icon-clear").show()):(c.find(".tab-dialog-new-icon").hide(),c.find(".tab-dialog-new-icon-clear").hide()),l.color=l.color||!1,l.color?c.find(".tab-dialog-new-color").val(l.color):c.find(".tab-dialog-new-color").val(),u(_("Drop the icons here")),c.find(".tab-dialog-new-upload").off("click").on("click",function(){c.find(".drop-file").trigger("click")}),c.find(".tab-dialog-new-icon-clear").off("click").on("click",function(){l.icon&&(l.icon="",c.find(".tab-dialog-new-icon").hide(),c.find(".tab-dialog-new-icon-clear").hide(),b(c))}),c.find(".tab-dialog-new-color-clear").off("click").on("click",function(){l.color&&(b(c),c.find(".tab-dialog-new-color-clear").hide(),c.find(".tab-dialog-new-colorpicker").colorpicker({component:".btn",color:l.color,container:c.find(".tab-dialog-new-colorpicker")}).colorpicker("setValue",""),l.color="")});var n=Date.now();try{c.find(".tab-dialog-new-colorpicker").colorpicker("destroy")}catch(e){}c.find(".tab-dialog-new-colorpicker").colorpicker({component:".btn",color:l.color,container:c.find(".tab-dialog-new-colorpicker")}).colorpicker("setValue",l.color).on("showPicker.colorpicker",function(){var e=c.find(".modal-content");e[0].scrollTop=e[0].scrollHeight}).on("changeColor.colorpicker",function(e){100'+_(a+" permissions")+"",i+='';for(var s=0;s"+t[s]+"":i+="";i+="",i+="";for(var o=0;o'}else i+="";i+=""}i+="",c.find("#tab-users-dialog-new-rights").html(i),c.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),c.find('input[type="checkbox"]').off("change").on("change",function(){b(c)}),m(d,l.acl),M.updateTextFields("#tab-users-dialog-new")}),c.find("ul.tabs .tab-dialog-new-tabs").show()):(c.find("ul.tabs .tab-dialog-new-tabs").each(function(){$(this).find('a[href="#tab-users-dialog-new-rights"]').length&&$(this).hide()}),M.updateTextFields("#tab-users-dialog-new")),c.find("ul.tabs").mtabs(),g.main.noSelect||c.find("ul.tabs").mtabs("select","tab-users-dialog-new-main"),c.modal().modal("open")}function t(){g.list.sort(),g.groups.sort();var e="";e+='
      ';for(var t=function(e,t){for(var n={},i=0;i'+g.main.getIcon(c)+l+'close'}var d="",u=!1;a.color&&(d="background: "+a.color+"; ",g.main.invertColor(a.color)&&(u=!0,d+="color: white;"));var m=a.desc;"object"==typeof m&&(m=m[systemLang]||m.en),e+='
    • ',e+=" "+(g.main.getIcon(g.list[n],null,null,"icon")||''),e+=''+i+"",e+="

      "+g.list[n]+((m?" ("+m+")":"")||"")+"

      ",e+=' '+(a.enabled?"check_box":"check_box_outline_blank")+"",e+=' edit',e+=' delete
      ',e+=s||"",e+="
    • "}e+="
    ",g.$gridUsers.html(e),g.$grid.find("#tab-users-btn-new-user").on("click",function(){y(!1)}),g.$gridUsers.find(".tab-users-enabled-user").on("click",function(){var e=$(this).data("user");if("system.user.admin"===e)return h(_("Cannot disable admin!"),!0),!1;var t=$(this),n=g.main.objects[e]&&g.main.objects[e].common&&g.main.objects[e].common.enabled;n=!n,g.main.socket.emit("extendObject",e,{common:{enabled:n}},function(e){e?h(_("Cannot modify user!")+e,!0):(h(_("Updated")),t.find("i").text(n?"check_box":"check_box_outline_blank"))})}),g.$gridUsers.find(".delete-content").off("click").on("click",function(){var t=$(this).data("user");$(this).hasClass("disabled")||(g.main.objects[t]&&"user"===g.main.objects[t].type?g.main.confirmMessage(_("Are you sure to delete %s?",t),null,"help",function(e){e&&p(t)}):h(_('Object "%s" does not exists. Update the page.',t),!0))}),g.$gridUsers.find(".edit-content").on("click",function(){y($(this).data("user"))}),g.$gridUsers.find(".tab-users-remove-group").on("click",function(){var i=$(this).data("user"),e=$(this).data("group");g.main.socket.emit("getObject",e,function(e,t){if(t&&t.common&&t.common.members){var n=t.common.members.indexOf(i);-1!==n?(t.common.members.splice(n,1),g.main.socket.emit("setObject",t._id,t,function(e){e?h(_("Error: %s",e),!0):h(_("Removed"))})):h(_("%s is not in the list"),!0)}})})}function n(){var e="";e+='
      ';for(var t=0;t'+g.main.getIcon(c)+r+'close'}var l="",d=!1;i.color&&(l="background: "+i.color+"; ",g.main.invertColor(i.color)&&(d=!0,l+="color: white;"));var u=i.desc;"object"==typeof u&&(u=u[systemLang]||u.en),e+='
    • ',e+=" "+(g.main.getIcon(g.groups[t],null,null,"icon")||''),e+=' '+n+"",e+="

      "+g.groups[t]+((u?" ("+u+")":"")||"")+"

      ",e+=' edit',e+=' delete
      ',e+=a||"",e+="
    • "}e+="
    ",g.$gridGroups.html(e),g.$grid.find("#tab-users-btn-new-group").on("click",function(){y(!0)}),g.$gridGroups.find(".delete-content").on("click",function(){var n=$(this).data("group");$(this).hasClass("disabled")||(g.main.objects[n]&&"group"===g.main.objects[n].type?g.main.confirmMessage(_("Are you sure to delete %s?",n),null,"help",function(e){var t;e&&(t=n,g.main.objects[t]&&"group"===g.main.objects[t].type?g.main.objects[t].common&&g.main.objects[t].common.dontDelete?h(_("Object may not be deleted"),!0):g.main.socket.emit("delObject",t,function(e){e?h(_("Group may not be deleted: %s",e),!0):h(_("Group deleted"))}):h(_("Invalid object: %s",t),!0))}):h(_('Object "%s" does not exists. Update the page.',n),!0))}),g.$gridGroups.find(".edit-content").on("click",function(){y($(this).data("group"))}),g.$gridGroups.find(".tab-users-remove-user").on("click",function(){var i=$(this).data("user"),e=$(this).data("group");g.main.socket.emit("getObject",e,function(e,t){if(t&&t.common&&t.common.members){var n=t.common.members.indexOf(i);if(-1!==n){if(t.common.members.splice(n,1),!t._id)return void console.error("INVLAID ID");g.main.socket.emit("setObject",t._id,t,function(e){e?h(_("Error: %s",e),!0):h(_("Removed"))})}else h(_("%s is not in the list"),!0)}})})}this.groups=[],this.list=[],this.$grid=$("#tab-users"),this.$gridUsers=this.$grid.find(".tab-users-list-users .tab-users-body"),this.$gridGroups=this.$grid.find(".tab-users-list-groups .tab-users-body"),this.main=e,this.aclGroups=null,this.prepare=function(){},this._postInit=function(){var e;t(),g.$gridUsers.find("ul").sortable({connectWith:"#tab-users .tab-users-list-groups .treetable",items:".users-type-draggable",appendTo:g.$gridUsers,refreshPositions:!0,helper:function(e,t){return $('
    '+t.find(".treetable-icon-empty+span").text()+"
    ")},zIndex:999990,revert:!1,scroll:!1,start:function(e,t){var n=t.item.prev();t.item.data("prev",n),g.$grid.addClass("dragging")},stop:function(e,t){g.$grid.removeClass("dragging")},update:function(e,t){var n=t.item.data("prev");n&&n.length?$(n).after(t.item):$(this).prepend(t.item)}}).disableSelection(),n(),(e=g.$gridGroups.find("ul>li")).droppable("instance")&&e.droppable("destroy"),e.droppable({accept:".users-type-draggable",over:function(e,t){if($(this).addClass("tab-accept-item"),$(this).hasClass("not-empty")&&!$(this).hasClass("expanded")){var n,i=$(this).data("tt-id");(n=$(this).data("timer"))&&clearTimeout(n),$(this).data("timer",setTimeout(function(){g.$gridGroups.treeTable("expand",i)},1e3))}},out:function(e,t){var n;$(this).removeClass("tab-accept-item"),(n=$(this).data("timer"))&&(clearTimeout(n),$(this).data("timer",null))},tolerance:"pointer",drop:function(e,t){$(this).removeClass("tab-accept-item");var n=t.draggable.data("tt-id"),i=$(this).data("tt-id");g.main.socket.emit("getObject",i,function(e,t){t&&t.common&&(t.common.members=t.common.members||[],-1===t.common.members.indexOf(n)?(t.common.members.push(n),t.common.members.sort(),g.main.socket.emit("setObject",t._id,t,function(e){e?h(_("Error: %s",e),!0):h(_("%s added to %s",n,t._id))})):h(_("Is yet in the list")))})}})},this.init=function(e){this.inited&&!e||(void 0!==this.$gridUsers&&this._postInit(),this.inited||(h(_("You can drag&drop users to groups"),5e3),this.inited=!0,this.main.subscribeObjects("system.user.*"),this.main.subscribeObjects("system.group.*")))},this.destroy=function(){this.inited&&(this.inited=!1,this.main.unsubscribeObjects("system.user.*"),this.main.unsubscribeObjects("system.group.*"))},this.objectChange=function(e,t,n){if(e.match(/^system\.user\./)){if(t)-1===this.list.indexOf(e)&&this.list.push(e);else{var i=this.list.indexOf(e);-1!==i&&this.list.splice(i,1)}this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){g.timer=null,g._postInit()},200)}else if(e.match(/^system\.group\./)){if(t)-1===this.groups.indexOf(e)&&this.groups.push(e);else{var a=this.groups.indexOf(e);-1!==a&&this.groups.splice(a,1)}this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){g.timer=null,g._postInit()},200)}}}!function(C){C(document).ready(function(){var e=location.pathname+"socket.io";location.pathname.match(/^\/admin\//)&&(e="/socket.io");var s,y={},v={objects:{},states:{},currentHost:"",currentTab:null,currentDialog:null,currentUser:"",subscribesStates:{},subscribesObjects:{},subscribesLogs:0,socket:io.connect("/",{path:e}),systemConfig:null,instances:null,objectsLoaded:!1,waitForRestart:!1,tabs:null,dialogs:{},selectId:null,config:{},ignoreJSupdate:!1,addEventMessage:function(e,t,n,i){g.events.add(e,t,n,i)},saveConfig:function(e,t){e&&(v.config[e]=t),"undefined"!=typeof storage&&storage.set("adminConfig",JSON.stringify(v.config))},saveTabs:function(){this.socket.emit("setObject","system.config",this.systemConfig,function(e){e&&this.showError(e)})},upToDate:function(e,t){return e=e.split("."),t=t.split("."),e[0]=parseInt(e[0],10),t[0]=parseInt(t[0],10),!(e[0]>t[0])&&(e[0]!==t[0]||(e[1]=parseInt(e[1],10),t[1]=parseInt(t[1],10),!(e[1]>t[1])&&(e[1]!==t[1]||(e[2]=parseInt(e[2],10),t[2]=parseInt(t[2],10),e[2]<=t[2]))))},cmdExec:function(e,t,n){e=e||v.currentHost,c.val(""),l.modal("open"),s="$ ./yunkong2 "+t,l.data("finished",!1).find(".btn").html(_("In background")),l.find(".command").html(s),l.find(".progress-dont-close").removeClass("disabled"),p.find(".button-command").removeClass("error").addClass("in-progress"),l.data("max",null),l.data("error",""),h.addClass("indeterminate").removeClass("determinate"),t.match(/^upload /)?l.find(".progress-text").html(_("Upload started...")).removeClass("error"):t.match(/^del [-_\w\d]+\.[\d]+$/)?l.find(".progress-text").html(_("Removing of instance...")).removeClass("error"):t.match(/^del /)?l.find(".progress-text").html(_("Removing of adapter...")).removeClass("error"):t.match(/^url /)?l.find(".progress-text").html(_("Install or update from URL...")).removeClass("error"):t.match(/^add /)?l.find(".progress-text").html(_("Add instance...")).removeClass("error"):l.find(".progress-text").html(_("Started...")).removeClass("error"),c.val(s),r=Math.floor(268435454*Math.random())+1,o=n,v.socket.emit("cmdExec",e,r,t,function(e){e?(s+="\n"+_(e),c.val(s),o=null,n(e)):n&&n()})},confirmMessage:function(e,t,n,i,a){if("function"==typeof i)a=i,m.find(".modal-footer").html(''+_("Ok")+''+_("Cancel")+""),m.find(".modal-footer .modal-action").on("click",function(){var e=m.data("callback");e&&e(C(this).data("result"))});else if("object"==typeof i){for(var s="",o=i.length-1;0<=o;o--)s+=''+i[o]+"";m.find(".modal-footer").html(s),m.find(".modal-footer .modal-action").on("click",function(){var e=m.data("callback");e&&e(C(this).data("id"))})}m.find(".dialog-title").text(t||_("Please confirm")),n?m.find(".dialog-icon").show().html(n):m.find(".dialog-icon").hide(),m.find(".dialog-text").html(e),m.data("callback",a),m.modal("open")},showMessage:function(e,t,n){u.find(".dialog-title").text(t||_("Message")),n?u.find(".dialog-icon").show().html(n):u.find(".dialog-icon").hide(),u.find(".dialog-text").html(e),u.modal("open")},showError:function(e){v.showMessage(_(e),_("Error"),"error_outline")},showToast:function(e,t,n,i,a,s){e&&e instanceof jQuery&&(e=e[0]),"string"==typeof(s=s||[])&&(s=[s]),a&&s.push("dropZone-error"),M.toast({parentSelector:e||C("body")[0],html:t+(n?''+n+"":""),displayLength:i||3e3,classes:s})},formatDate:function(e,t){if(!e)return"";var n,i=typeof e;return"string"===i?t?e.substring(8):e:("object"!==i&&(e=e<9466812e5?new Date(1e3*e):new Date(e)),t?i=(n=e.getDate())<10?"0"+n:n:(i=e.getFullYear(),i+=(n=e.getMonth()+1)<10?"-0"+n:"-"+n,i+=(n=e.getDate())<10?"-0"+n:"-"+n),i+=(n=e.getHours())<10?" 0"+n:" "+n,i+=(n=e.getMinutes())<10?":0"+n:":"+n,i+=(n=e.getSeconds())<10?":0"+n:":"+n,i+=(n=e.getMilliseconds())<10?".00"+n:n<100?".0"+n:"."+n)},updateWizard:function(){var e=C("#button-wizard");v.objects["system.adapter.discovery.0"]?(e.data("inited")||(e.data("inited",!0),e.on("click",function(){v.navigate({tab:"instances",dialog:"config",params:"system.adapter.discovery.0"})}).attr("title",_("Device discovery"))),e.show(),!v.systemConfig.common.wizard&&v.systemConfig.common.licenseConfirmed&&e.trigger("click")):e.hide()},getUser:function(){if(v.currentUser){if(v.objects[v.currentUser]){var e=v.objects[v.currentUser],t="";if(t=e&&e.common&&e.common.name?translateName(e.common.name):(t=v.currentUser.replace(/^system\.user\./))[0].toUpperCase()+t.substring(1).toLowerCase(),e&&e.common&&e.common.icon){var n={};n[v.currentUser]=e,C("#current-user-icon").html(v.getIcon(v.currentUser,null,n))}else C("#current-user-icon").html('account_circle');C("#current-user").html(t);for(var i=[],a=0;aone object or all children of %s too?',t),null,"help_outline",[_("_All"),_("Only one"),_("Cancel")],function(e){0===e?v._delObjects(t,!0,n):1===e&&v._delObjects(t,!1,n)}):v.confirmMessage(_("Are you sure to delete %s?",t),null,"help_outline",function(e){e&&v._delObjects(t,!0,n)}):i&&i.children?v.confirmMessage(_("Are you sure to delete all children of %s?",t),null,"help_outline",function(e){e&&v._delObjects(t,!0,n)}):v.showMessage(_('Object "%s" does not exists. Update the page.',t),_("Error"),"help_outline",function(e){e&&v._delObjects(t,!0,n)})}},g={hosts:new Hosts(gMain=v),objects:new Objects(v),adapters:new Adapters(v),instances:new Instances(v),users:new Users(v),enums:new Enums(v),events:new Events(v),logs:new Logs(v),states:null,intro:new Intro(v)};"undefined"!=typeof States&&(g.states=new States(v)),v.instances=g.instances.list,v.tabs=g,v.dialogs={system:new System(v),customs:new Customs(v),config:new Config(v),editobject:new EditObject(v),issue:new Issue(v),readme:new Readme(v)};var o=null,r=null,c=C("#stdout"),l=C("#dialog-command"),d=C("#dialog-license-main"),u=C("#dialog-message"),m=C("#dialog-confirm"),h=l.find(".progress div"),f=C("#admin_sidemenu_menu"),p=C("#admin_sidemenu_main"),t=!0;if("ontouchstart"in window||navigator.maxTouchPoints||C("body").addClass("desktop-screen"),-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Android")?(C("body").addClass("safari"),v.browser="safari",v.noSelect=!0):detectIE()&&(C("body").addClass("ie"),v.browser="ie",v.browserVersion=detectIE(),v.noSelect=!0,C("#host-adapters-btn").css("margin-top","10px")),"undefined"!=typeof storage)try{v.config=storage.get("adminConfig"),v.config?v.config=JSON.parse(v.config):v.config={}}catch(e){console.log("Cannot load edit config"),v.config={}}function b(e){C("#admin_sidemenu_dialog").html(""),C("html").off("click",b)}function w(){if(function(){var e="",i=[];C(".admin-tab").each(function(){var e=C(this).attr("id");v.systemConfig.common.tabs&&-1===v.systemConfig.common.tabs.indexOf(e)||i.push({line:'
  • '+(L[e]&&L[e].icon?''+L[e].icon+"":'live_help')+_(C(this).data("name"))+"
  • ",id:e})}),C(".tab-custom").each(function(){var e=C(this).attr("id");if(!v.systemConfig.common.tabs||-1!==v.systemConfig.common.tabs.indexOf(e)){var t;if(L[e]&&L[e].icon)t=L[e].icon;else{var n="system.adapter."+e.substring(4);v.objects[n]&&v.objects[n].adminTab&&v.objects[n]["fa-icon"]&&(t=v.objects[n]["fa-icon"])}i.push({line:'
  • '+(t?''+t+"":'live_help')+C(this).data("name")+"
  • ",id:e})}}),i.sort(function(e,t){return L[e.id]||L[t.id]?L[e.id]?L[t.id]?L[e.id].orderL[t.id].order?1:0:-1:1:0});for(var t=0;t
      ';for(var s in y){var o=y[s],r="chk-"+s;a+="
    • '+_(o)+""}a+="
    ",t.append(a),t.find(".chk-tab").off("change").on("change",function(e){var t=C(this).attr("id").substr(4);if(C(this).prop("checked"))v.systemConfig.common.tabs.push(t);else{var n=v.systemConfig.common.tabs.indexOf(t);-1!==t&&v.systemConfig.common.tabs.splice(n,1)}v.saveTabs(),j()}),t.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=C(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")})}),v.updateWizard(),C("#button-logout").on("click",function(){window.location.href="/logout/"}),window.onhashchange=function(){v.navigateDo()},v.navigateDo(),C("#events_threshold").on("click",function(){v.socket.emit("eventsThreshold",!1)})}function j(){var n=[],e=[];y={};for(var t=0;t'+m+"\n",C("#"+d).length)C("#"+d).hide().appendTo(C("body"));else{var f='
    ';C(f).hide().appendTo(C("body")),C("#"+d).find(".iframe-in-tab").on("load",function(){var e=C(this).contents().find("body>header");e&&e.length||(e=C(this).contents().find("head")),e&&e.length&&e.append('')})}}}if(C(".tab-custom").each(function(){-1===n.indexOf(C(this).attr("id"))&&C("#"+C(this).attr("id")).remove()}),v.systemConfig.common.tabs||(v.systemConfig.common.tabs=n),C(".link-replace").length){var p=0,b=setTimeout(function(){b=null,w()},100);C(".link-replace").each(function(){p++,v.tabs.instances._replaceLinks(C(this).data("src"),C(this).data("adapter"),C(this).data("instance"),C(this).attr("id"),function(e,t,n,i){C("#"+i).data("src",e).removeClass("link-replace"),--p||b&&(clearTimeout(b),b=null,w())})})}else w()}function N(a){v.socket.emit("getAllObjects",function(e,i){e?window.alert(_(e)):setTimeout(function(){var e;for(var t in v.objects=i,v.objects)v.objects.hasOwnProperty(t)&&"_design"!==t.slice(0,7)&&("instance"===(e=v.objects[t]).type&&v.instances.push(t),"enum"===e.type&&g.enums.list.push(t),"user"===e.type&&g.users.list.push(t),"group"===e.type&&g.users.groups.push(t),"adapter"===e.type&&g.adapters.list.push(t),"host"===e.type&&g.hosts.addHost(e),e.common&&e.common.history&&(e.common.custom=JSON.parse(JSON.stringify(e.common.history)),delete e.common.history));for(var n in v.objectsLoaded=!0,v.initHostsList(!0),j(),v.dialogs)v.dialogs.hasOwnProperty(n)&&"function"==typeof v.dialogs[n].prepare&&v.dialogs[n].prepare();!function n(i,a){a=a||0,i&&a'+a.icon+"";var s;n="instance"===e.type?"/adapter/"+e.common.name+"/"+e.common.icon:e._id.match(/^system\.adapter\./)?(s=e._id.split(".",3),"/"===a.icon[0]?s[2]+=a.icon:s[2]+="/"+a.icon,"/adapter/"+s[2]):(s=e._id.split(".",2),"/"===a.icon[0]?s[0]+=a.icon:s[0]+="/"+a.icon,"/adapter/"+s[0])}i=e.type}return{icon:n,alt:i}}v.initHostsList=function(e){var t=C("#host-adapters");if(!e||!t.data("inited")){t.data("inited",!0),v.currentHost=v.currentHost||v.config.currentHost||"";for(var n,i=[],a=0;a'+v.getHostIcon(v.objects[v.tabs.hosts.list[a].id],"imgHost left")+v.tabs.hosts.list[a].name+""),v.currentHost||(v.currentHost=v.tabs.hosts.list[a].name),v.currentHost===v.tabs.hosts.list[a].name&&(n=v.tabs.hosts.list[a].id);t.html(i);var s=C("#host-adapters-btn").show();s.text(_("Host:")+" "+v.currentHost).dropdown(),v.objects[n]&&v.objects[n].common&&v.objects[n].common.color,s.append(C(v.getHostIcon(v.objects[n],"imgHost left"))),v.tabs.hosts.list.length<2?s.addClass("disabled"):s.removeClass("disabled"),t.find("a").on("click",function(){var e=C(this).data("value"),t="system.host."+e+".alive";v.states[t]&&v.states[t].val&&"null"!==v.states[t].val?(v.currentHost=e,C("#host-adapters-btn").text(_("Host:")+" "+v.currentHost).append(C(this).find(".imgHost").clone()),console.log(v.currentTab),L["tab-"+v.currentTab]&&L["tab-"+v.currentTab].host&&(v.tabs[v.currentTab]&&"function"==typeof v.tabs[v.currentTab].destroy&&v.tabs[v.currentTab].destroy(),v.tabs[v.currentTab]&&"function"==typeof v.tabs[v.currentTab].init&&v.tabs[v.currentTab].init()),v.saveConfig("currentHost",v.currentHost)):v.showMessage(_("Host %s is offline",C(this).val()))})}},v.resubscribeStates=function(){for(var e in v.subscribesStates)v.subscribesStates.hasOwnProperty(e)&&v.subscribesStates[e]&&(console.debug("Re-Subscribe: "+e),v.socket.emit("subscribe",e))},v.resubscribeObjects=function(){for(var e in v.subscribesObjects)v.subscribesObjects.hasOwnProperty(e)&&v.subscribesObjects[e]&&v.socket.emit("subscribeObjects",e)},v.resubscribeLogs=function(){v.subscribesLogs&&(console.debug("Subscribe LOG"),v.socket.emit("requireLog",!0))},v.subscribeStates=function(e){if(e)if("object"==typeof e)for(var t=0;tiframe");d.attr("src")&&(console.log("clear"),d.attr("src",""))}}if(v.currentTab=n,o.hide().appendTo("body"),i||(r.addClass("admin-sidemenu-body-content").show().appendTo(s),o=r),g[n]&&"function"==typeof g[n].init&&g[n].init(),r.length&&(c=r.data("src")))if(-1===c.indexOf("%")){var u=r.find(">iframe");u.length&&!u.attr("src")&&u.attr("src",c)}else f.data("problem-link","tab-"+n)}var m=f.find('.admin-sidemenu-items[data-tab="tab-'+n+'"]');f.find(".admin-sidemenu-items").not(m).removeClass("admin-sidemenu-active"),m.addClass("admin-sidemenu-active"),L["tab-"+n]&&L["tab-"+n].host?C("#host-adapters-btn").css("opacity",1):C("#host-adapters-btn").css("opacity",.3),document.title=n+" - yunkong2",v.currentDialog!==i&&(v.dialogs[v.currentDialog]&&"function"==typeof v.dialogs[v.currentDialog].destroy&&v.dialogs[v.currentDialog].destroy(),(v.currentDialog=i)&&v.dialogs[i]?("function"==typeof v.dialogs[i].init&&v.dialogs[i].init(a?a.split(","):void 0),g[v.currentTab]&&g[v.currentTab].saveScroll&&g[v.currentTab].saveScroll(),o.hide().appendTo("body"),C("#dialog-"+i).addClass("admin-sidemenu-body-content").show().appendTo(s)):o.attr("id")!==r.attr("id")&&(o.hide().appendTo("body"),r.addClass("admin-sidemenu-body-content").show().appendTo(s),g[v.currentTab]&&g[v.currentTab].restoreScroll&&g[v.currentTab].restoreScroll()))}})},v.getIconFromObj=function(e,t,n){var i="",a="";if(e&&e.common)if(e.common.icon){var s=T(e);i=s.icon,a=s.alt}else t=t||"lib/css/fancytree/","device"===e.type?(i=t+"device.png",a="device"):"channel"===e.type?(i=t+"channel.png",a="channel"):"state"===e.type&&(i=t+"state.png",a="state");return i?''+(a||':""},v.getIcon=function(e,t,n,i){return v.getIconFromObj((n||v.objects)[e],t,i)},v.getHostIcon=function(e,t){var n="",i="";if(e&&e.common&&e.common.icon){var a=T(e);n=a.icon,i=a.alt}return''+(i=i||'},v.formatBytes=function(e){if(Math.abs(e)<1024)return e+" B";for(var t=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],n=-1;e/=1024,++n,1024<=Math.abs(e)&&n'+t.admin.styles+"")}}if(v.systemConfig&&v.systemConfig.common&&v.systemConfig.common.tabs){var i=v.systemConfig.common.tabs.indexOf("tab-log");-1!==i&&(v.systemConfig.common.tabs[i]="tab-logs")}v.socket.emit("getObject","system.repositories",function(e,t){v.dialogs.system.systemRepos=t,v.socket.emit("getObject","system.certificates",function(e,t){setTimeout(function(){if(v.dialogs.system.systemCerts=t,"permissionError"===a)v.systemConfig={common:{language:systemLang},error:"permissionError"};else if(!a&&v.systemConfig&&v.systemConfig.common){if(systemLang=v.systemConfig.common.language||systemLang,v.systemConfig.common.city=v.systemConfig.common.city||"",v.systemConfig.common.country=v.systemConfig.common.country||"",v.systemConfig.common.longitude=v.systemConfig.common.longitude||"",v.systemConfig.common.latitude=v.systemConfig.common.latitude||"",!v.systemConfig.common.licenseConfirmed){var n=(v.systemConfig.common.language||window.navigator.userLanguage||window.navigator.language||"").substring(0,2);"en"!==n&&(n="cn"),systemLang=n,d.find(".license_text").html(license[n]||license.en),d.find(".license_checkbox").prop("checked",!1),d.find(".license_language").data("licenseConfirmed",!1).val(n).on("change",function(){n=C(this).val(),d.find(".license_language_label").html(translateWord("Select language",n)),d.find(".license_text").html(license[n]||license.en),d.find(".license_checkbox").html(translateWord("license_checkbox",n)),d.find(".license_agree .translate").html(translateWord("agree",n)),d.find(".license_non_agree .translate").html(translateWord("not agree",n)),d.find(".license_terms").html(translateWord("License terms",n)),d.find(".license_agreement_label").html(translateWord("license agreement",n))}).select(),d.find(".license_diag").on("change",function(){C(this).prop("checked")?d.find(".license_agree").removeClass("disabled"):d.find(".license_agree").addClass("disabled")}),d.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=C(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),d.modal({dismissible:!1,complete:function(){d.find(".license_text").html(""),location.reload()}}).modal("open"),d.find(".license_agree").addClass("disabled").off("click").on("click",function(e){e.preventDefault(),e.stopPropagation(),v.socket.emit("getObject","system.config",function(e,t){!e&&t?(t.common=t.common||{},t.common.licenseConfirmed=!0,t.common.language=n,v.socket.emit("setObject","system.config",t,function(e){e&&v.showError(e),d.modal("close"),d.find(".license_agree").off("click"),d.find(".license_non_agree").off("click")})):v.showError(_("Cannot confirm: "+e))})}),d.find(".license_non_agree").off("click").on("click",function(e){location.reload()})}}else v.systemConfig={type:"config",common:{name:"system.config",city:"",country:"",longitude:"",latitude:"",language:"",tempUnit:"°C",currency:"",dateFormat:"DD.MM.YYYY",isFloatComma:!0,licenseConfirmed:!1,defaultHistory:"",tabs:["tab-intro","tab-adapters","tab-instances","tab-objects","tab-logs","tab-scenes","tab-javascript","tab-text2command-0"]}},v.systemConfig.common.language=window.navigator.userLanguage||window.navigator.language,"en"!==v.systemConfig.common.language&&(v.systemConfig.common.language="cn");for(var e in translateCron(),translateAll(),"function"==typeof initGridLanguage&&initGridLanguage(v.systemConfig.common.language),l.modal({dismissible:!1}),u.modal(),m.modal({dismissible:!1}),l.find(".progress-show-more").off("change").on("change",function(){var e=C(this).prop("checked");v.saveConfig("progressMore",e),e?l.find(".textarea").show():l.find(".textarea").hide()}),void 0===v.config.progressClose&&(v.config.progressClose=!0),l.find(".progress-dont-close input").on("change",function(){v.saveConfig("progressClose",C(this).prop("checked"))}),l.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=C(this).prev();e.parent().parent().hasClass("switch")||e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),l.find(".progress-dont-close input").prop("checked",v.config.progressClose),l.find(".progress-show-more").prop("checked",!!v.config.progressMore).trigger("change"),l.find(".btn").on("click",function(){l.data("finished")?p.find(".button-command").hide():p.find(".button-command").show()}),p.find(".button-command").on("click",function(){l.modal("open")}),g)g.hasOwnProperty(e)&&g[e]&&"function"==typeof g[e].prepare&&g[e].prepare();var i;i=N,g.states&&g.states.clear(),v.socket.emit("getStates",function(e,t){v.states=t,"function"==typeof i&&setTimeout(function(){i()},0)})},0)})})})})):(v.resubscribeStates(),v.resubscribeObjects(),v.resubscribeLogs()),v.waitForRestart&&location.reload()}),v.socket.on("disconnect",function(){C("#connecting").show()}),v.socket.on("reconnect",function(){C("#connecting").hide(),v.waitForRestart&&location.reload()}),v.socket.on("repoUpdated",function(){setTimeout(function(){g.adapters.init(!0)},0)}),v.socket.on("reauthenticate",function(){location.reload()})})}(jQuery);var license={en:'The MIT License (MIT)

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    ',de:'MIT-Lizenz (MIT)

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der zugehörigen Dokumentationen (die "Software") erhält, die Erlaubnis erteilt, sie uneingeschränkt zu benutzen, inklusive und ohne Ausnahme dem Recht, sie zu verwenden, kopieren, ändern, fusionieren, verlegen, verbreiten, unterlizenzieren und/oder zu verkaufen, und Personen, die diese Software erhalten, diese Rechte zu geben, unter den folgenden Bedingungen:
    Der obige Urheberrechtsvermerk und dieser Erlaubnisvermerk sind in allen Kopien oder Teilkopien der Software beizulegen.
    DIE SOFTWARE WIRD OHNE JEDE AUSDRÜCKLICHE ODER IMPLIZIERTE GARANTIE BEREITGESTELLT, EINSCHLIESSLICH DER GARANTIE ZUR BENUTZUNG FÜR DEN VORGESEHENEN ODER EINEM BESTIMMTEN ZWECK SOWIE JEGLICHER RECHTSVERLETZUNG, JEDOCH NICHT DARAUF BESCHRÄNKT. IN KEINEM FALL SIND DIE AUTOREN ODER COPYRIGHTINHABER FÜR JEGLICHEN SCHADEN ODER SONSTIGE ANSPRÜCHE HAFTBAR ZU MACHEN, OB INFOLGE DER ERFÜLLUNG EINES VERTRAGES, EINES DELIKTES ODER ANDERS IM ZUSAMMENHANG MIT DER SOFTWARE ODER SONSTIGER VERWENDUNG DER SOFTWARE ENTSTANDEN.',ru:"Лицензия MIT

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (в дальнейшем именуемыми «Программное Обеспечение»), безвозмездно использовать Программное Обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, добавление, публикацию, распространение, сублицензирование и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется данное Программное Обеспечение, при соблюдении следующих условий:
    Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части данного Программного Обеспечения.
    ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ ПРАВ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ, ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫМИ ДЕЙСТВИЯМИ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.",it:'Licenza MIT

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Si concede gratuitamente l\'autorizzazione, a chiunque ottenga una copia di questo software e dei file di documentazione associati (il "Software"), di dare opera al Software senza restrizioni, compresi senza limitazione i diritti di utilizzare, copiare, modificare, unire, pubblicare, distribuire, concedere in sublicenza ovvero vendere copie del Software, e di consentire alle persone a cui il Software è fornito di fare altrettanto, posto che siano rispettate le seguenti condizioni:
    l\'avviso di copyright unitamente a questo avviso di licenza devono essere sempre inclusi in tutte le copie o parti sostanziali del Software.
    IL SOFTWARE VIENE FORNITO "COSÌ COM\'È" SENZA GARANZIE DI ALCUN TIPO, ESPLICITE O IMPLICITE, COMPRESE, MA NON SOLO, LE GARANZIE DI COMMERCIABILITÀ, IDONEITÀ AD UN PARTICOLARE SCOPO E NON VIOLAZIONE DI DIRITTI ALTRUI. IN NESSUN CASO GLI AUTORI DEL SOFTWARE O I TITOLARI DEL COPYRIGHT POTRANNO ESSERE RITENUTI RESPONSABILI DI RECLAMI, DANNI O ALTRE RESPONSABILITÀ, DERIVANTI DA O COLLEGATI A CONTRATTO, ILLECITO CIVILE O IN ALTRA RELAZIONE CON IL SOFTWARE O CON IL SUO UTILIZZO O CON ALTRE OPERAZIONI DEL SOFTWARE.',fr:'Licence MIT

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    ',pt:'Licença MIT

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    ',nl:'MIT-licentie

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    ',es:'Licencia MIT

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Se concede permiso, de forma gratuita, a cualquier persona que obtenga una copia de este software y de los archivos de documentación asociados (el "Software"), para utilizar el Software sin restricción, incluyendo sin limitación los derechos a usar, copiar, modificar, fusionar, publicar, distribuir, sublicenciar, y/o vender copias del Software, y a permitir a las personas a las que se les proporcione el Software a hacer lo mismo, sujeto a las siguientes condiciones:
    El aviso de copyright anterior y este aviso de permiso se incluirán en todas las copias o partes sustanciales del Software.
    EL SOFTWARE SE PROPORCIONA "TAL CUAL", SIN GARANTÍA DE NINGÚN TIPO, EXPRESA O IMPLÍCITA, INCLUYENDO PERO NO LIMITADO A GARANTÍAS DE COMERCIALIZACIÓN, IDONEIDAD PARA UN PROPÓSITO PARTICULAR Y NO INFRACCIÓN. EN NINGÚN CASO LOS AUTORES O TITULARES DEL COPYRIGHT SERÁN RESPONSABLES DE NINGUNA RECLAMACIÓN, DAÑOS U OTRAS RESPONSABILIDADES, YA SEA EN UNA ACCIÓN DE CONTRATO, AGRAVIO O CUALQUIER OTRO MOTIVO, QUE SURJA DE O EN CONEXIÓN CON EL SOFTWARE O EL USO U OTRO TIPO DE ACCIONES EN EL SOFTWARE.',pl:'Licencja MIT

    Copyright © 2014-2018 bluefox, 2014 hobbyquaker

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    '},addAll2FilterCombobox=!1;function IobListHeader(e,h){if(!(this instanceof IobListHeader))return new IobListHeader(e,h);var f,a,p;void 0===h&&(h={}),void 0===h.colWidthOffset&&(h.colWidthOffset=0),"TABLE"===(p="object"==typeof e?$(e):$("#"+e))[0].tagName&&(p=p.find("tr:first")),e=p[0];var n,b=this;b.selectIdOffset=[],p.html(""),this.setList=function(e){var t;(t="string"==typeof e?("#"!==e[0]&&(e="#"+e),$(e)):e)&&t.length&&("TD"!==t[0].tagName&&"TH"!==t[0].tagName&&((t=t.find(">thead>tr:first>th,>thead>tr:first>td")).length||(t=e.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td"))),a=t)},h.list&&this.setList(h.list),this.syncHeader=function(){if("object"==typeof a){var e=function(){a.each(function(e,t){if(!(e>=a.length-1)){var n=$(t).width(),i=b.selectIdOffset[e]||0;n+i&&$(f[e]).width(Math.round(n+i))}}),a.length&&!b.selectIdOffset.length&&(b.selectIdOffset[0]=0,a.each(function(e,t){var n=$(a[e]).offset().left;n&&(b.selectIdOffset[e]=n-$(f[e]).offset().left)}),e())};e()}},$(window).on("resize",function(e,t){n&&clearTimeout(n),n=setTimeout(b.syncHeader.bind(b),100)}),this.doFilter=function(){},b.ids=[],b.add=function(t,m,e,n){void 0===e&&(e=m);var i,a,s=!(i=e)||a&&"#"===i[0]?i:(h.prefix&&i.substr(0,h.prefix.length)!==h.prefix&&(i=h.prefix+"-"+i),(a?"#":"")+i);m=_(m);var o="";switch(t){case"combobox":o=' ';break;case"edit":o=' ';break;case"text":o=''+m+""}p.append(""+o+"");var r="#"+s,g=$(r),c=b[e]={$filter:g,val:g.val.bind(g),selectedVal:g.val()||""};if(b.ids.push(e),"combobox"===t&&(c.options=[],c.checkAddOption=function(e,t,n){if(-1===this.options.indexOf(e)){this.options.push(e),this.options.sort();for(var i,a,s=g.val(),o=n?"":(i=m,a=s,addAll2FilterCombobox&&(i=i?_(i)+" ("+_("all")+")":_("all")),'"),r=0,c=this.options.length;r"+t+""}},n))for(var l=0;lclose'),g.on("change",function(e){d&&clearTimeout(d),c.selectedVal=g.val(),d=setTimeout(b.doFilter,"combobox"!==t?400:0),c.selectedVal?g.parent().addClass("filter-active"):g.parent().removeClass("filter-active")}).on("keyup",function(e){13===e.which?b.doFilter():g.trigger("change")}),f=p.find(">th"),c}}function values2table(r,c,e){"object"==typeof r&&(e=c,c=r,r="");var l=e&&e.maxRaw||null,d=e&&e.onChange||null,u=e&&e.onReady||null;c=c||[];var o,s=[],m=(o=r?$("#"+r):$("body")).find(".table-button-add");if(m.data("raw",c.length),l&&m.data("maxRaw",l),m.data("inited")||(m.data("inited",!0),m.on("click",function(){if(!m.data("maxRaw")||m.data("raw")';for(var a=0;a';else if("select"===s[a].type.substring(0,6)){f+=("multiple"===s[a].type.substring(7,16)?'"}else f+='';if(g[a]){p="text-align: center; "+(g[a].style||"")+(g[a].tdstyle||"");for(var v=0;v':f+='';g[a].class&&(t+=' class="'+g[a].class+'" ')}p.length||b.length?t+=' style="'+p+b+'">'+f+"":t+=">"+f+""}t+=""}var w=h.find(".table-lines");w.length||(h.append(''),w=h.find(".table-lines")),w.html(t),w.find(".values-input").each(function(){var e=$(this),t=e.attr("type"),n=e.data("name"),i=e.data("index");e.data("old-value",c[i][n]),"checkbox"===t?e.prop("checked",c[i][n]):e.val(c[i][n])}),w.find("a[data-command]").each(function(){var e=$(this).data("command");"delete"===e?$(this).on("click",function(){var e=$(this).data("index"),t=c[e];c.splice(e,1),d&&d(),setTimeout(function(){"function"==typeof tableEvents&&tableEvents(e,t,"delete"),values2table(r,c,d,u,l)},100),m.data("maxRaw")&&m.data("raw",m.data("raw")-1)}).addClass("red").find(".material-icons").html("delete"):"up"===e?$(this).on("click",function(){var e=$(this).data("index"),t=c[e];c.splice(e,1),c.splice(e-1,0,t),d&&d(),setTimeout(function(){values2table(e,c,d,u,l)},100)}).find("i").html("arrow_upward"):"down"===e?$(this).on("click",function(){var e=$(this).data("index"),t=c[e];c.splice(e,1),c.splice(e+1,0,t),d&&d(),setTimeout(function(){values2table(e,c,d,u,l)},100)}).find("i").html("arrow_downward"):"pair"===e?$(this).on("click",function(){if("function"==typeof tableEvents){var e=$(this).data("index"),t=c[e];tableEvents(e,t,"pair")}}).attr("title",_("pair")).find("i").html("insert_link"):"unpair"===e&&$(this).on("click",function(){if("function"==typeof tableEvents){var e=$(this).data("index"),t=c[e];tableEvents(e,t,"unpair")}}).attr("title",_("unpair")).find("i").html("not_interested")}),w.find(".values-input").on("change.adaptersettings",function(){var e=$(this).data("index"),t=$(this).data("name");"checkbox"===$(this).attr("type")?($(this).prop("checked").toString()!==$(this).data("old-value")&&d&&d(t,e),c[e][t]=$(this).prop("checked")):($(this).val()!==$(this).data("old-value")&&d&&d(t,e),c[e][t]=$(this).val())}).on("keyup",function(){$(this).trigger("change.adaptersettings")})}"function"==typeof u&&u()}function table2values(e){var t;t=e?$("#"+e):$("body");var n=[];t.find(".table-values th").each(function(){var e=$(this).data("name");e?n.push(e):n.push("___ignore___")});var i=[],a=0;return t.find(".table-lines tr").each(function(){i[a]={},$(this).find("td").each(function(){var e=$(this).find("input");if(e.length){var t=e.data("name");"checkbox"===e.attr("type")?i[a][t]=e.prop("checked"):i[a][t]=e.val()}var n=$(this).find("select");if(n.length){t=n.data("name");i[a][t]=n.val()||""}}),a++}),i}var systemLang="en",systemDictionary={};function translateWord(e,t,n){if(!e)return"";if(t=t||systemLang,(n=n||systemDictionary)[e=e.toString()]){var i=n[e][t];if(i)return i;if("en"!==t&&(i=n[e].en))return i}else"string"!=typeof e||e.match(/_tooltip$/)?"string"!=typeof e&&console.warn("Trying to translate non-text:"+e):console.log('"'+e+'": {"en": "'+e+'", "cn": "'+e+'"},');return e}function translateAll(e,i,a){i=i||systemLang,a=a||systemDictionary,e||(e="body");var t=$(e);t.find(".translate").each(function(e){var t=$(this).attr("data-lang");t||(t=$(this).html(),$(this).attr("data-lang",t));var n=translateWord(t,i,a);n&&$(this).html(n)}),t.find(".translateV").each(function(e){var t=$(this).attr("data-lang-value");t||(t=$(this).attr("value"),$(this).attr("data-lang-value",t));var n=translateWord(t,i,a);n&&$(this).attr("value",n)}),t.find(".translateT").each(function(e){var t=$(this).attr("data-lang-title");t||(t=$(this).attr("title"),$(this).attr("data-lang-title",t));var n=translateWord(t,i,a);n&&$(this).attr("title",n)}),t.find(".translateP").each(function(e){var t=$(this).attr("data-lang-placeholder");t||(t=$(this).attr("placeholder"),$(this).attr("data-lang-placeholder",t));var n=translateWord(t,i,a);n&&$(this).attr("placeholder",n)})}function translateName(e){return e&&"object"==typeof e?e[systemLang]||e.en:e}var _=function(e,t,n,i){var a=(e=translateWord(e)).indexOf("%s");return-1===a||-1===(a=(e=e.replace("%s",t)).indexOf("%s"))||-1!==(a=(e=e.replace("%s",n)).indexOf("%s"))&&(e=e.replace("%s",i)),e};!function(X){if(!X.fn.treeTable){var t={init:function(e){e.imgPath=e.imgPath||"lib/css/fancytree/";for(var t=0;t';n+='
      ';for(var i=e.rows,a=0;a'+(d?"":'')+''+l+""}n+="
    ";var u=X(this),m=X(n);u.find(".treetablelist-buttons").remove(),u.find(".treetable-list").remove(),u.find(".tree-table-buttons").remove(),u.find(".tree-table-main").remove(),u.prepend(m);var g=X(m).find(".treetablelist-buttons"),h=X(m).find(".treetable-list");h.sortable({cancel:".treetable-list-folder",axis:"y"}).data("options",e);var f=this;g.find(".treetable-list-btn-ok").button({icons:{primary:"ui-icon-check"},text:!1}).css({width:24,height:24}).on("click",function(){var i="",a=[];h.find("li").each(function(){var e=X(this).data("id");if(X(this).hasClass("treetable-list-folder"))i=e;else{var t=e.split("."),n=t.pop();t.join(".")!==i&&a.push({oldId:e,newId:i+"."+n})}}),function t(n,i,a){if(i&&i.length){var e=i.shift();n.moveId&&n.moveId(e.oldId,e.newId,function(e){setTimeout(function(){t(n,i,a)},50)})}else a&&a()}(e,a,function(){p.call(f,e)})}),g.find(".treetable-list-btn-cancel").button({icons:{primary:"ui-icon-cancel"},text:!1}).css({width:24,height:24}).on("click",function(){p.call(f,e)})}function ne(e,t,n){var i="",a="",s=e&&e.common;if(s)if(s.icon){if(s.icon.match(/^data:image\//))i=s.icon;else{if(-1===s.icon.indexOf("."))return''+s.icon+"";var o;i="instance"===e.type?"/adapter/"+e.common.name+"/"+e.common.icon:e._id.match(/^system\.adapter\./)?(o=e._id.split(".",3),"/"===e.common.icon[0]?o[2]+=e.common.icon:o[2]+="/"+e.common.icon,"/adapter/"+o[2]):(o=e._id.split(".",2),"/"===e.common.icon[0]?o[0]+=e.common.icon:o[0]+="/"+e.common.icon,"/adapter/"+o[0])}a=e.type}else t=t||"lib/css/fancytree/","device"===e.type?(i=t+"device.png",a="device"):"channel"===e.type?(i=t+"channel.png",a="channel"):"state"===e.type&&(i=t+"state.png",a="state");return i?''+a+'':""}function p(i){var e="",t=window.M&&window.M.toast?"a":"button";if(i.panelButtons){e+='
    ';for(var n=0;n",window.M&&window.M.toast&&(e+=''+(i.panelButtons[n].icon||"")+""),e+="";i.moveId&&(e+="<"+t+' class="btn-floating waves-effect waves-light blue treetable-sort" title="'+_("reorder")+'">',window.M&&window.M.toast&&(e+='import_export'),e+=""),e+="
    "}e+='
    ',e+=" ",e+=' ';for(var a=0;a",e+=' ',e+=' ',e+=" "):e+=" "+_(i.columns[a])+"";i.buttons&&(e+=" "),e+=" ",e+="",e+="";var s=[],o=i.root?new RegExp("^"+i.root.replace(/\./g,"\\.")+"\\."):null,r=-1!==i.columns.indexOf("instance")?[]:null;for(var c in i.objects){var l;if(i.objects.hasOwnProperty(c))if(r&&"instance"===i.objects[c].type&&(l=c.match(/^system\.adapter\.javascript\.(\d+)$/))&&r.push(l[1]),!o||o.test(c)){var d=i.objects[c].common,u={id:c,parent:null,_class:"treetable-"+i.objects[c].type};"channel"===i.objects[c].type&&(u.folder=!0);for(var m=0;mt.id?1:e.id',s[O].children&&s[O].children.length&&(e+=''+s[O].children.length+"")):e+='"}if(i.buttons){e+='"}e+=""}e+="";var U=X(this),H=X(e);U.find("span:first-child").remove(),U.find(".treetablelist-buttons").remove(),U.find(".treetable-list").remove(),U.find(".tree-table-buttons").remove(),U.find(".tree-table-main").remove(),U.prepend(H),i.rows=s;var B=X(H[1]).find(">table"),G=X(H[0]);B.data("options",i),B.treetable({expandable:!0,clickableNodeNames:!0,expanderTemplate:"",indenterTemplate:'',onNodeExpand:q,onNodeCollapse:ee,stringCollapse:_("collapse"),stringExpand:_("expand")});var F=B.find("tbody");if(F.on("click","tr",function(){X(".selected").not(this).removeClass("selected"),X(this).addClass("selected");var e=X(this).parent().parent().data("options"),t=X(this).data("tt-id");e.onChange&&e.onChange(X(this).data("tt-id"),e.oldId),e.oldId=t}),i.buttons)for(var Z=0;Z"%s"?',en:'Are you sure to delete "%s"?'},'Are you sure to delete all children of %s?':{cn:'确定删除 %s 的全部子项?',en:'Are you sure to delete all children of %s?'},"Are you sure to delete all children of %s?":{cn:'你确定删除 "%s"全部的子项目?',en:'Are you sure to delete "%s" and all children?'},"Are you sure to delete script %s?":{cn:"你确定删除脚本 '%s'?",en:"Are you sure to delete script '%s'?"},"Are you sure you want to delete adapter %s?":{cn:"你确定删除适配器: %s?",en:"Are you sure you want to delete adapter %s?"},"Are you sure you want to delete the instance %s?":{cn:"你确定要删除这个实例: %s?",en:"Are you sure you want to delete the instance %s?"},"Are you sure?":{cn:"你确定吗?",en:"Are you sure?"},"Are you sure? Changes are not saved.":{cn:"数据没有保存,你确定啊吗?",en:"Are you sure? Changes are not saved."},Aug:{cn:"Aug",en:"Aug"},August:{cn:"August",en:"August"},Available:{cn:"Available",en:"Available"},"Available version:":{cn:"Available version",en:"Available version"},CPUs:{cn:"CPUs",en:"CPUs"},Calendar:{cn:"Calendar",en:"Calendar"},Cancel:{cn:"取消",en:"Cancel"},"Cannot create user: ":{cn:"不能创建 用户: ",en:"Cannot create user: "},"Cannot delete user: ":{cn:"不能删除用户: ",en:"Cannot delete user: "},"Cannot disable admin!":{cn:"不能停用管理员!",en:"Cannot disable admin!"},"Cannot read file!":{cn:"无法读取文件!",en:"Cannot read file!"},"Cannot read version from NPM":{cn:"Could not read version from NPM",en:"Could not read version from NPM"},"Cannot set password: ":{cn:"不能设置密码: ",en:"Cannot set password: "},Certificates:{cn:"证书",en:"Certificates"},Change:{cn:"修改",en:"Change"},Changelog:{cn:"Change log",en:"Change log"},Channel:{cn:"Channel",en:"Channel"},Chart:{cn:"Chart",en:"Chart"},"Chart for %s":{cn:"Chart for %s",en:"Chart for %s"},"Check all":{cn:"检查所有",en:"Check all"},China:{cn:"中国",en:"China"},"City:":{cn:"城市",en:"City"},Clear:{cn:"清除",en:"Clear"},"Clear list":{cn:"清除",en:"Clear list"},"Clear log":{cn:"清除",en:"Clear log"},"Clear on disk permanent":{cn:"Clear on disk permanent",en:"Clear on disk permanent"},"Click do activate events again, or just wait one minute":{cn:"Click do activate events again, or just wait one minute",en:"Click do activate events again, or just wait one minute"},"Click on icon":{cn:"Click on icon to open a link",en:"Click on icon to open a link"},Close:{cn:"关闭",en:"close"},"Collapse all nodes":{cn:"收起全部",en:"Collapse all nodes"},Color:{cn:"颜色",en:"Color"},"Configuration not saved.":{cn:"配置信息没有存储.",en:"Configuration not saved."},"Connected to %s: ":{cn:"Connected to %s: ",en:"Connected to %s: "},"Connected to host: ":{cn:"Connected to host: ",en:"Connected to host: "},"Copy log":{cn:"复制",en:"Copy log"},"Copy to clipboard":{cn:"拷贝",en:"Copy to clipboard"},"Country:":{cn:"国家/地区",en:"Country"},Create:{cn:"创建",en:"Create"},"Create new category":{cn:"Create new category",en:"Create new category"},"Create new category, like %s":{cn:"Create new category, like %s",en:"Create new category, like %s"},"Create new enum":{cn:"创建新的枚举",en:"Create new enum"},"Create new enum, like %s":{cn:"Create new enum, like %s",en:"Create new enum, like %s"},"Create new group":{cn:"Create new group",en:"Create new group"},"Create new user":{cn:"创建新用户",en:"Create new user"},Created:{cn:"Created",en:"Created"},Croatia:{cn:"Croatia",en:"Croatia"},"Cron expression":{cn:"Cron expression",en:"Cron expression"},"Currency:":{cn:"货币",en:"Currency"},Custom:{cn:"自定义",en:"Custom"},D$ecember:{cn:"D$ecember",en:"D$ecember"},"DD.MM.YY":{cn:"DD.MM.YY",en:"DD.MM.YY"},"DD.MM.YYYY":{cn:"DD.MM.YYYY",en:"DD.MM.YYYY"},"DD/MM/YYYY":{cn:"DD/MM/YYYY",en:"DD/MM/YYYY"},"Date From":{cn:"Date From",en:"Date From"},"Date To":{cn:"Date To",en:"Date To"},"Date format:":{cn:"时间格式",en:"Date format"},"Deactivated. Click to start.":{cn:"Deactivated. Click to start.",en:"Deactivated. Click to start."},"Debug outputs:":{cn:"调试输出",en:"Debug outputs"},Dec:{cn:"Dec",en:"Dec"},December:{cn:"December",en:"December"},"Default ACL":{cn:"缺省 ACL",en:"Default ACL"},"Default history instance:":{cn:"缺省的数据记录实例",en:"Default history instance"},"Delete attribute":{cn:"删除",en:"Delete attribute"},"Delete category":{cn:"删除",en:"Delete category"},"Delete enum":{cn:"删除",en:"Delete enum"},"Delete member":{cn:"删除",en:"Delete member"},"Delete object":{cn:"删除",en:"Delete object"},Denmark:{cn:"Denmark",en:"Denmark"},Description:{cn:"说明",en:"Description"},Device:{cn:"Device",en:"Device"},"Device discovery":{cn:"Device discovery",en:"Device discovery"},"Disk free":{cn:"磁盘空闲",en:"Disk free"},"Disk free:":{cn:"磁盘空闲:",en:"Disk free:"},"Disk size":{cn:"磁盘大小",en:"Disk size"},'Do you want to delete just one object or all children of %s too?':{cn:'Do you want to delete just one object or all children of %s too?',en:'Do you want to delete just one object or all children of %s too?'},"Do you want to upgrade all adapters?":{cn:"Do you want to upgrade all adapters?",en:"Do you want to upgrade all adapters?"},"Domains:":{cn:"Domains",en:"Domains"},Dominica:{cn:"Dominica",en:"Dominica"},"Done with error: %s":{cn:"Done with error: %s",en:"Done with error: %s"},"Download log":{cn:"下载",en:"Download log"},"Drop the files here":{cn:"拖放文件到这里",en:"Drop the files here"},"Drop the icons here":{cn:"拖放图标文件到这里",en:"Drop the icons here"},Ecuador:{cn:"Ecuador",en:"Ecuador"},Edit:{cn:"编辑",en:"Edit"},"Edit category":{cn:"编辑 category",en:"Edit category"},"Edit enum":{cn:"编辑 enum",en:"Edit enum"},"Edit in dialog":{cn:"编辑 in dialog",en:"Edit in dialog"},"Edit object":{cn:"编辑 object",en:"Edit object"},Egypt:{cn:"Egypt",en:"Egypt"},"El Salvador":{cn:"El Salvador",en:"El Salvador"},"Email for account:":{cn:"Email for account",en:"Email for account"},Enums:{cn:"枚举",en:"Enums"},Error:{cn:"错误",en:"Error"},Event:{cn:"类型",en:"Type"},Events:{cn:"事件",en:"Events"},Everyone:{cn:"Everyone",en:"Everyone"},"Expand all nodes":{cn:"Expand all nodes",en:"Expand all nodes"},"Failed to open JSON File":{cn:"Failed to open JSON file",en:"Failed to open JSON file"},"Falkland Islands (Malvinas)":{cn:"Falkland Islands (Malvinas)",en:"Falkland Islands (Malvinas)"},"Faroe Islands":{cn:"Faroe Islands",en:"Faroe Islands"},Feb:{cn:"Feb",en:"Feb"},February:{cn:"February",en:"February"},"File is too big!":{cn:"File is too big!",en:"File is too big!"},"File rights":{cn:"File rights",en:"File rights"},"Filter:":{cn:"查找",en:"Filter"},"Filtered out":{cn:"Everything is filtered out",en:"Everything is filtered out"},"Find coordinates...":{cn:"Find coordinates...",en:"Find coordinates..."},"Float divider:":{cn:"小数点",en:"Float divider"},"Free RAM:":{cn:"空闲:",en:"Free:"},Fri:{cn:"Fri",en:"Fri"},From:{cn:"From: ",en:"From: "},"From github":{cn:"软件仓库",en:"From github"},Function:{cn:"Function",en:"Function"},"Generated ID:":{cn:"Generated ID",en:"Generated ID"},"Go to Github...":{cn:"Go to Github...",en:"Go to Github..."},Group:{cn:"Group",en:"Group"},Groups:{cn:"Groups",en:"Groups"},"Has no permission to %s %s %s":{cn:"Has no permission to %s %s %s",en:"Has no permission to %s %s %s"},"Heard and Mc Donald Islands":{cn:"Heard and Mc Donald Islands",en:"Heard and Mc Donald Islands"},"Heartbeat: ":{cn:"心跳: ",en:"Heartbeat: "},"Hong Kong":{cn:"中国香港",en:"Hong Kong"},Host:{cn:"Host",en:"Host"},"Host %s is offline":{cn:"Host %s is offline",en:"Host %s is offline"},"Host:":{cn:"Host",en:"Host"},Hosts:{cn:"Hosts",en:"Hosts"},ID:{cn:"ID",en:"ID"},"Icon upload":{cn:"Icon upload",en:"Icon upload"},"In background":{cn:"后台运行",en:"In background"},Info:{cn:"信息",en:"Info"},Insert:{cn:"插入",en:"Insert"},Install:{cn:"安装",en:"Install"},"Install adapter from URL":{cn:"安装或升级",en:"Install or update the adapter from URL"},"Install adapter from github":{cn:"软件仓库安装或升级",en:"Install or update the adapter from Github"},"Install from custom URL":{cn:"自定义 URL 安装",en:"Install from custom URL"},"Install or update from URL...":{cn:"正在安装...",en:"Install or update from URL..."},"Installation counter":{cn:"Installations counter",en:"Installations counter"},"Installations counter":{cn:"Installations counter",en:"Installations counter"},Installed:{cn:"已安装",en:"Installed"},"Installed from group":{cn:"Installed from group",en:"Installed from group"},"Installed instances":{cn:"已安装的实例",en:"Installed instances"},"Installed version":{cn:"已安装版本",en:"Installed version"},Instances:{cn:"实例",en:"Instances"},Instructions:{cn:"指令",en:"Instructions"},Intro:{cn:"总览",en:"Overview"},"Invalid version of %s":{cn:"Invalid version of %s",en:"Invalid version of %s"},"Invalid version of %s. Required %s":{cn:"Invalid version of %s. Required %s",en:"Invalid version of %s. Required %s"},"Is yet in the list":{cn:"已经在列表中",en:"It's already in the list"},Jan:{cn:"Jan",en:"Jan"},January:{cn:"January",en:"January"},Jul:{cn:"七月",en:"Jul"},July:{cn:"July",en:"July"},Jun:{cn:"Jun",en:"Jun"},June:{cn:"June",en:"June"},"Known bugs for":{cn:"Known bugs for",en:"Known bugs for"},"Last changed":{cn:"上次修改",en:"Last changed"},"Last update":{cn:"上次更新",en:"Last update"},"Latitude:":{cn:"纬度",en:"Latitude"},"Let's Encrypt settings":{cn:"Let's Encrypt settings",en:"Let's Encrypt settings"},"Let's encrypt SSL":{cn:"Let's encrypt SSL",en:"Let's encrypt SSL"},License:{cn:"许可",en:"License"},"License terms":{cn:"许可条款",en:"License terms"},"Listen on all IPs":{cn:"Listen on all IPs",en:"Listen on all IPs"},"Loading...":{cn:"正在加载...",en:"Loading..."},Log:{cn:"日志",en:"Log"},"Log file will be deleted. Are you sure?":{cn:"日志文件将被删除,你确定吗?",en:"Log file will be deleted. Are you sure?"},"Log size:":{cn:"文件大小",en:"Log size"},"Login timeout(sec):":{cn:"登录超时 (秒)",en:"Login timeout (sec)"},Logout:{cn:"退出",en:"Logout"},"Longitude:":{cn:"经度",en:"Longitude"},MB:{cn:"Mb",en:"Mb"},Main:{cn:"Main",en:"Main"},"Main settings":{cn:"主设置",en:"Main settings"},"Manually created":{cn:"手工创建",en:"Manually created"},Mar:{cn:"三月",en:"Mar"},March:{cn:"三月",en:"March"},Members:{cn:"Members",en:"Members"},Message:{cn:"消息",en:"Message"},"Message buffer overflow. Losing oldest":{cn:"Message buffer overflow. Losing oldest.",en:"Message buffer overflow. Losing oldest."},Model:{cn:"Model",en:"Model"},Mon:{cn:"Mon",en:"Mon"},NPM:{cn:"NPM",en:"NPM"},Name:{cn:"名称",en:"Name"},"Name:":{cn:"名称",en:"Name"},New:{cn:"新建",en:"New"},"New category":{cn:"新类别",en:"New category"},"New enum":{cn:"新类别",en:"New enum"},"New group":{cn:"新群组",en:"New group"},"New object":{cn:"新对象",en:"New object"},"New objekt":{cn:"新对象",en:"New object"},"New user":{cn:"新用户",en:"New user"},"No data":{cn:"暂无数据",en:"No data"},"No states selected!":{cn:"No states selected!",en:"No states selected!"},"No version of %s":{cn:"No version of %s",en:"No version of %s"},"Node.js":{cn:"Node.js",en:"Node.js"},Norway:{cn:"Norway",en:"Norway"},"Not exists":{cn:"不存在",en:"Does not exist"},"Note:":{cn:"Note",en:"Note"},Nov:{cn:"十一月",en:"Nov"},November:{cn:"十一月",en:"November"},OS:{cn:"OS",en:"OS"},'Object "%s" does not exists. Update the page.':{cn:'Object "%s" 不存在,请刷新.',en:'Object "%s" does not exist. Update the page.'},"Object may not be deleted":{cn:"对象不能被删除",en:"Object may not be deleted"},"Object rights":{cn:"对象权限",en:"Object rights"},Objects:{cn:"对象",en:"Objects"},Oct:{cn:"十月",en:"Oct"},October:{cn:"十月",en:"October"},Ok:{cn:"确认",en:"Ok"},"Only one":{cn:"Only one",en:"Only one"},"Open original":{cn:"在新标签中打开",en:"Open on new tab"},Owner:{cn:"Owner",en:"Owner"},"Owner group":{cn:"Owner group",en:"Owner group"},"Owner user":{cn:"Owner user",en:"Owner user"},Parent:{cn:"Parent",en:"Parent"},"Parse error":{cn:"Parse error",en:"Parse error"},Password:{cn:"密码",en:"Password"},"Password and confirmation are not equal!":{cn:"Password and confirmation are not equal!",en:"Password and confirmation are not equal!"},"Password cannot be empty!":{cn:"密码不能为空!",en:"Password cannot be empty!"},"Password repeat":{cn:"Password repeat",en:"Password repeat"},"Path to storage:":{cn:"存储路径",en:"Path to storage"},"Pause output":{cn:"暂停输出",en:"Pause output"},Platform:{cn:"平台",en:"Platform"},"Please confirm":{cn:"请确认",en:"Please confirm"},"Port to check the domain:":{cn:"Port to check the domain",en:"Port to check the domain"},"Preserve ID":{cn:"Preserve ID",en:"Preserve ID"},Preview:{cn:"Preview",en:"Preview"},"Processing...":{cn:"处理中...",en:"Processing..."},RAM:{cn:"内存",en:"RAM"},"RAM total usage:":{cn:"总内存使用:",en:"Total RAM usage:"},"RAM usage":{cn:"使用内存",en:"RAM usage"},"Rebuild tree":{cn:"重建",en:"Rebuild tree"},"Recently updated":{cn:"Recently updated",en:"Recently updated"},"Refresh log":{cn:"刷新",en:"Refresh log"},Removed:{cn:"已删除",en:"Removed"},"Removing of adapter...":{cn:"Removing of adapter...",en:"Removing of adapter..."},"Removing of instance...":{cn:"Removing of instance...",en:"Removing of instance..."},Rename:{cn:"重命名",en:"Rename"},Repositories:{cn:"软件仓库",en:"Repositories"},Rights:{cn:"权限",en:"Access rights"},Role:{cn:"角色",en:"Role"},Room:{cn:"场景",en:"Room"},"Running: ":{cn:"Running: ",en:"Running: "},"Sao Tome and Principe":{cn:"Sao Tome and Principe",en:"Sao Tome and Principe"},Sat:{cn:"星期六",en:"Sat"},Save:{cn:"保存",en:"Save"},"Save Objecttree as JSON File":{cn:"Save objects tree as JSON file",en:"Save objects tree as JSON file"},"Save Objecttree is not possible":{cn:"Saving the objects tree is not possible",en:"Saving the objects tree is not possible"},"Save configuration":{cn:"保存配置",en:"Save configuration"},Script:{cn:"脚本",en:"Script"},Scripts:{cn:"脚本",en:"Scripts"},Select:{cn:"Select",en:"Select"},"Select ID":{cn:"Select ID",en:"Select ID"},"Select adapter:":{cn:"选择适配器",en:"Select adapter"},"Select language":{cn:"选择语言",en:"Select language"},"Select options":{cn:"选项",en:"Select options"},"Sent data:":{cn:"Sent data",en:"Sent data"},Sep:{cn:"九月",en:"Sep"},September:{cn:"九月",en:"September"},Set:{cn:"Set",en:"Set"},"Set CRON":{cn:"Set",en:"Set"},"Set CRON schedule for restarts":{cn:"Set CRON schedule for restarts",en:"Set CRON schedule for restarts"},Settings:{cn:"设置",en:"Settings"},"Settings for %s":{cn:"Settings for %s",en:"Settings for %s"},Seychelles:{cn:"Seychelles",en:"Seychelles"},"Show instances only for current host":{cn:"Show instances only for current host",en:"Show instances only for current host"},"Show values of instance":{cn:"Show values of instance",en:"Show values of instance"},"Show...":{cn:"显示...",en:"Show..."},"Size: %s, Available: %s":{cn:"大小: %s, 剩余: %s"},"Some data are not stored. Discard?":{cn:"有一些修改了的配置信息没有保存. 确认码?",en:"Some data are not stored. Discard?"},"Sort alphabetically":{cn:"Sort alphabetically by name",en:"Sort alphabetically by name"},"Started...":{cn:"Started...",en:"Started..."},State:{cn:"Datapoint",en:"Datapoint"},"State type":{cn:"State type",en:"State type"},States:{cn:"状态",en:"States"},"States rights":{cn:"状态权限",en:"States rights"},Statistics:{cn:"统计",en:"Statistics"},"Statistics:":{cn:"统计",en:"Statistics"},"Storage of %s":{cn:'Storage of %s',en:'Storage of %s'},"Storage of %s states":{cn:'Storage of %s states',en:'Storage of %s states'},"Success!":{cn:"成功!",en:"Success!"},Suggestion:{cn:"推荐",en:"Recommendation"},Sun:{cn:"星期天",en:"Sun"},System:{cn:"系统",en:"System"},"System language:":{cn:"语言",en:"System language"},"System settings":{cn:"系统设置",en:"System settings"},"System uptime":{cn:"System uptime",en:"System uptime"},Table:{cn:"Table",en:"Table"},Taiwan:{cn:"中国台湾",en:"Taiwan"},"Temperature units:":{cn:"温度单位",en:"Temperature units"},'This version of node.js "%s" on "%s" is deprecated. Please install node.js 6, 8 or newer':{cn:'yunkong2 supports the LTS versions 6, 8, 10 or newer of node.js. Please update your version ("%s") on host "%s" to one of the supported versions. We recommend to use Node.js 6.',en:'yunkong2 supports the LTS versions 6, 8, 10 or newer of node.js. Please update your version ("%s") on host "%s" to one of the supported versions. We recommend to use Node.js 6.'},Thu:{cn:"Thu",en:"Thu"},Time:{cn:"Time",en:"Time"},"Time From":{cn:"Time From",en:"Time From"},"Time To":{cn:"Time To",en:"Time To"},"Time stamp":{cn:"Time stamp",en:"Time stamp"},Title:{cn:"标题",en:"Title"},To:{cn:"To",en:"To"},Today:{cn:"今日",en:"Today"},"Toggle expert mode":{cn:"切换模式",en:"Toggle expert mode"},"Toggle states view":{cn:"切换状态视图",en:"Toggle the states view"},"Too many events":{cn:"Too many events",en:"Too many events"},"Total count in group":{cn:"Total count in group",en:"Total count in group"},"Trigger event":{cn:"触发事件",en:"Trigger event"},Type:{cn:"Type",en:"Type"},"URL or file path:":{cn:"URL或安装包路径",en:"URL or file path"},"Unknown file format!":{cn:"Unknown file format!",en:"Unknown file format!"},"Unsupported image format":{cn:"Unsupported image format",en:"Unsupported image format"},Update:{cn:"更新",en:"Update"},"Update objects":{cn:"更新",en:"Update objects"},"Update states":{cn:"更新",en:"Update states"},Updated:{cn:"已更新",en:"Updated"},"Upgrade all adapters":{cn:"升级所有适配器",en:"Upgrade all adapters"},Upload:{cn:"文件上传",en:"File upload"},"Upload admin started":{cn:"Upload of configuration is started",en:"Upload of configuration is started"},"Upload started...":{cn:"上传开始...",en:"Upload started..."},Uptime:{cn:"Uptime",en:"Uptime"},Uruguay:{cn:"Uruguay",en:"Uruguay"},"Use Lets Encrypt certificates:":{cn:"Use Let's Encrypt certificates",en:"Use Let's Encrypt certificates"},"Use this instance for automatic update:":{cn:"Use this instance for automatic update",en:"Use this instance for automatic update"},User:{cn:"用户",en:"User"},"User deleted":{cn:"用户以删除",en:"User deleted"},"User does not exist":{cn:"这个用户不存在",en:"User does not exist"},"User yet exists":{cn:"这个用户已经存在",en:"User already exists"},Users:{cn:"用户",en:"Users"},Value:{cn:"Value",en:"Value"},"Values of %s":{cn:"Values of %s",en:"Values of %s"},"Vatican City State":{cn:"Vatican City State",en:"Vatican City State"},Wed:{cn:"Wed",en:"Wed"},With:{cn:"With",en:"With"},Without:{cn:"Without",en:"Without"},"You are going to add new instance: ":{cn:"You are going to add new instance: ",en:"You are going to add new instance: "},"You can check changelog here":{cn:'You can check the changelog here',en:'You can check the changelog here'},"You can drag&drop the devices, channels and states to enums":{cn:"You can drag&drop the devices, channels and states to enums",en:"You can drag&drop the devices, channels and states to enums"},"You can drag&drop users to groups":{cn:"You can drag&drop users to groups",en:"You can drag&drop users to groups"},"You can't see events via cloud":{cn:"You can't see events via cloud",en:"You can't see events via cloud"},"Your home":{cn:"Your home",en:"Your home"},_All:{cn:"全部",en:"All"},"_Toggle expert mode":{cn:"切换模式",en:"Toggle expert mode"},__different__:{cn:"different",en:"different"},"a-z":{cn:"a-z",en:"a-z"},ack:{cn:"ack",en:"ack"},actions:{cn:"actions",en:"actions"},active:{cn:"active",en:"active"},"adapter with updates":{cn:"adapters with updates",en:"adapters with updates"},"adapters count":{cn:"适配器数",en:"adapters count"},add:{cn:"添加",en:"Add"},"add children":{cn:"添加子节点",en:"add children"},"add instance":{cn:"添加实例",en:"add instance"},"add repository":{cn:"添加仓库",en:"add repository"},agree:{cn:"同意",en:"agree"},alarm_group:{cn:"Alarm",en:"Alarm"},alive:{cn:"alive",en:"alive"},all:{cn:"all",en:"all"},alpha:{cn:"alpha",en:"alpha"},array:{cn:"array",en:"array"},auto:{cn:"auto",en:"auto"},available:{cn:"最新",en:"available"},beta:{cn:"beta",en:"beta"},boolean:{cn:"boolean",en:"boolean"},bug:{cn:"bugtracker",en:"bugtracker"},cancel:{cn:"取消",en:"Cancel"},cert_path_note:{cn:"You can use an absolute path to the certificate, like '/opt/certs/cert.pem', or just upload it per drag&drop",en:"You can use an absolute path to the certificate, like '/opt/certs/cert.pem', or just upload it per drag&drop"},certificate:{cn:"certificate",en:"certificate"},"change view mode":{cn:"模式",en:"change view mode"},channel:{cn:"channel",en:"channel"},clear:{cn:"清除",en:"clear"},"climate-control_group":{cn:"Climate Control",en:"Climate Control"},"close on ready":{cn:"完成后自动关闭",en:"close on ready"},collapse:{cn:"收起",en:"collapse"},"collapse all":{cn:"收起",en:"collapse all"},comma:{cn:"comma",en:"comma"},"command execution":{cn:"执行命令 ",en:"Command execution"},common:{cn:"公共",en:"common"},"common adapters_group":{cn:"公共",en:"Common"},common_color:{cn:"颜色",en:"color"},common_def:{cn:"缺省值",en:"default value"},common_desc:{cn:"说明",en:"description"},common_icon:{cn:"图标",en:"icon"},common_max:{cn:"最大值",en:"max value"},common_min:{cn:"最小值",en:"minimal value"},common_read:{cn:"允许读",en:"read allowed"},common_role:{cn:"角色",en:"role"},common_states:{cn:"预定义值",en:"predefined values"},common_type:{cn:"类型",en:"type"},common_unit:{cn:"量度单位",en:"measure unit"},common_write:{cn:"允许写",en:"write allowed"},communication_group:{cn:"通信",en:"Communication"},config:{cn:"设置",en:"Settings"},"config instance":{cn:"配置实例",en:"config instance"},"confirm password":{cn:"密码确认",en:"Confirm password"},connected:{cn:"已连接",en:"connected"},copy:{cn:"复制",en:"copy"},"copy note":{cn:"Press Ctrl+A and Ctrl+C to copy the log to the clipboard and click with the mouse anywhere to close.",en:"Press Ctrl+A and Ctrl+C to copy the log to the clipboard and click with the mouse anywhere to close."},"create operation":{cn:"创建",en:"create"},"custom enum":{cn:"自定义枚举",en:"?ustom enum"},"custom group":{cn:"自定义群组",en:"Custom group"},daemon:{cn:"daemon",en:"daemon"},"date-and-time_group":{cn:"日期和时间",en:"Date and Time"},daysShortText:{cn:"d.",en:"d."},debug:{cn:"debug",en:"debug"},delete:{cn:"删除",en:"delete"},"delete adapter":{cn:"删除",en:"delete adapter"},"delete group":{cn:"删除",en:"delete group"},"delete instance":{cn:"删除",en:"delete instance"},"delete operation":{cn:"删除",en:"delete"},"delete script":{cn:"删除",en:"delete script"},"delete user":{cn:"删除",en:"delete user"},desc:{cn:"desc",en:"desc"},description:{cn:"说明",en:"Description"},device:{cn:"device",en:"device"},"diag-note":{cn:"We worked hard to create this project. In return we expect from you some usage statistics.
    Every time the adapter list is updated, the anonymized statistics are sent. We respect your privacy, so no private information will be transmitted.
    Thank you!",en:"We worked hard to create this project. In return we expect from you some usage statistics.
    Every time the adapter list is updated, the anonymized statistics are sent. We respect your privacy, so no private information will be transmitted.
    Thank you!"},edit:{cn:"编辑",en:"edit"},"edit enum":{cn:"编辑",en:"edit enum"},"edit file":{cn:"编辑",en:"edit file"},"edit group":{cn:"编辑",en:"edit group"},"edit instance":{cn:"编辑",en:"edit instance"},"edit script":{cn:"编辑",en:"edit script"},"edit user":{cn:"修改",en:"edit user"},"edit value":{cn:"编辑",en:"Edit value"},enabled:{cn:"enabled",en:"enabled"},energy_group:{cn:"能源",en:"Energy"},engine:{cn:"engine",en:"engine"},"engine type":{cn:"engine type",en:"engine type"},error:{cn:"错误",en:"error"},events:{cn:"events",en:"events"},"execute operation":{cn:"Execute operation",en:"Execute operation"},expand:{cn:"展开",en:"expand"},"expand all":{cn:"展开所有",en:"expand all"},extended:{cn:"extended",en:"extended"},false:{cn:"false",en:"false"},"file permissions":{cn:"文件许可",en:"File permissions"},from:{cn:"来自",en:"from"},garden_group:{cn:"农业",en:"Garden"},general_group:{cn:"基本",en:"General"},geoposition_group:{cn:"地理位置",en:"Geo position"},groups:{cn:"groups",en:"groups"},hardware_group:{cn:"硬件",en:"Hardware"},history:{cn:"数据",en:"history"},"history data":{cn:"数据",en:"history data"},host:{cn:"主机",en:"host"},household_group:{cn:"Household",en:"Household"},"http operation":{cn:"http",en:"http"},id:{cn:"ID",en:"ID"},info:{cn:"信息",en:"info"},infrastructure_group:{cn:"环境",en:"Infrastructure"},install:{cn:"安装",en:"install"},"install specific version":{cn:"安装指定版本",en:"Install a specific version"},installed:{cn:"已安装",en:"installed"},"installed adapters":{cn:"Filter adapters with existing instances",en:"Filter adapters with existing instances"},instance:{cn:"实例",en:"instance"},"instance number":{cn:"Desired instance number",en:"Desired instance number"},"yunkong2 Enums":{cn:"yunkong2 enums",en:"yunkong2 enums"},"yunkong2 States":{cn:"yunkong2 states",en:"yunkong2 states"},"yunkong2 adapter instances":{cn:"yunkong2 adapter instances",en:"yunkong2 adapter instances"},"yunkong2 adapter scripts":{cn:"yunkong2 adapter scripts",en:"yunkong2 adapter scripts"},"yunkong2 adapters":{cn:"yunkong2 adapters",en:"yunkong2 adapters"},"yunkong2 certificates":{cn:"yunkong2 certificates",en:"yunkong2 certificates"},"yunkong2 groups":{cn:"yunkong2 groups",en:"yunkong2 groups"},"yunkong2 hosts":{cn:"yunkong2 hosts",en:"yunkong2 hosts"},"yunkong2 repositories":{cn:"yunkong2 repositories",en:"yunkong2 repositories"},"yunkong2 users":{cn:"yunkong2 users",en:"yunkong2 users"},"iot-system_group":{cn:"物联网",en:"IoT systems"},"iot-systems_group":{cn:"物联网系统",en:"IoT Systems"},keywords:{cn:"关键字",en:"keywords"},lc:{cn:"Last change",en:"Last change"},less:{cn:"精简",en:"less"},letsnecrypt_help:{cn:'This are settings for Let\'s Encrypt account. To get the free certificates for your domain. You can read more here.',en:'This are settings for Let\'s Encrypt account. To get the free certificates for your domain. You can read more here.'},letsnecrypt_help_domains:{cn:"E.g: 'example.com, www.example.com'",en:"E.g: 'example.com, www.example.com'"},letsnecrypt_help_email:{cn:"Please use your email address. It will be used for your account.",en:"Please use your email address. It will be used for your account."},letsnecrypt_help_path:{cn:"Directory name where the certificates will be stored. This is always relative to configuration directory",en:"Directory name where the certificates will be stored. This is always relative to configuration directory"},license:{cn:"许可",en:"license"},"license agreement":{cn:"许可协议",en:"license agreement"},"license not agree":{cn:"不同意!",en:"Do not agree with the license!"},license_checkbox:{cn:"同意全部的许可条款",en:"I agree with the collection of anonymous statistics.
    (This can be disabled in settings)"},lighting_group:{cn:"照明",en:"Lighting"},link:{cn:"link",en:"link"},list:{cn:"list",en:"list"},"list operation":{cn:"list elements",en:"list elements"},logic_group:{cn:"逻辑",en:"Logic"},loglevel:{cn:"loglevel",en:"loglevel"},media_group:{cn:"媒体",en:"Media"},members:{cn:"members",en:"members"},memlimit:{cn:"RAM limit",en:"RAM limit"},message:{cn:"消息",en:"message"},messaging_group:{cn:"信使",en:"Messaging"},"misc-data_group":{cn:"Misc. data",en:"Misc. data"},mixed:{cn:"mixed",en:"mixed"},mode:{cn:"mode",en:"mode"},more:{cn:"详细",en:"more"},multi:{cn:"multistate",en:"multistate"},multimedia_group:{cn:"多媒体",en:"Multimedia"},name:{cn:"名称",en:"name"},native:{cn:"原生",en:"native"},network_group:{cn:"网络",en:"Network"},"new certificate":{cn:"new certificate",en:"new certificate"},"new group":{cn:"new group",en:"new group"},"new script":{cn:"new script",en:"new script"},"new user":{cn:"新建用户",en:"new user"},newObject:{cn:"New object",en:"New object"},"no-city":{cn:"no city",en:"no city"},"node-red":{cn:"node-red",en:"node-red"},none:{cn:"none",en:"none"},normal:{cn:"normal",en:"normal"},"not ack":{cn:"not ack",en:"not ack"},"not agree":{cn:"不同意",en:"not agree"},"npm error":{cn:"npm error",en:"npm error"},number:{cn:"number",en:"number"},object:{cn:"object",en:"object"},"object permissions":{cn:"Object permissions",en:"Object permissions"},of:{cn:"/",en:"of"},ok:{cn:"确定",en:"Ok"},"open web page":{cn:"Open web page of adapter",en:"Open web page of adapter"},os:{cn:"OS",en:"operating system"},"other permissions":{cn:"Other permissions",en:"Other permissions"},"parent name":{cn:"parent name",en:"parent name"},password:{cn:"密码",en:"Password"},permissionError:{cn:"Permission error",en:"Permission error"},planned:{cn:"planned",en:"planned"},platform:{cn:"平台",en:"platform"},point:{cn:"point",en:"point"},process:{cn:"process",en:"process"},protocols_group:{cn:"协议",en:"Protocols"},raw:{cn:"Raw (开发)",en:"Raw (experts only)"},read:{cn:"read",en:"read"},"read operation":{cn:"read",en:"read"},readme:{cn:"readme",en:"readme"},reload:{cn:"刷新",en:"reload"},"reload instance":{cn:"reload instance",en:"reload instance"},rest:{cn:"复位 (read only)",en:"rest (read only)"},restart:{cn:"自动重启",en:"auto restart"},"restart script":{cn:"重启脚本",en:"restart script"},role:{cn:"角色",en:"role"},save:{cn:"保存",en:"save"},schedule_group:{cn:"计划",en:"Schedule"},script_group:{cn:"逻辑和脚本",en:"Scripts and Logic"},"select member by double click":{cn:"select member by double clicking",en:"select member by double clicking"},"sendto operation":{cn:"Send-to operation",en:"Send-to operation"},service_group:{cn:"Maintenance",en:"Maintenance"},severity:{cn:"安防",en:"severity"},stable:{cn:"stable",en:"stable"},state:{cn:"state",en:"state"},"state permissions":{cn:"状态许可",en:"State permissions"},storage_group:{cn:"存储",en:"Storage"},string:{cn:"string",en:"string"},subscribe:{cn:"subscribe",en:"subscribe"},switch:{cn:"switch",en:"switch"},terminal:{cn:"Terminal",en:"Terminal"},"third-party_group":{cn:"第三方",en:"Third party"},"this adapter does not allow multiple instances":{cn:"这个适配器不允许运行多个实例",en:"This adapter does not allow multiple instances"},title:{cn:"标题",en:"title"},today:{cn:"今日",en:"today"},true:{cn:"true",en:"true"},ts:{cn:"时间",en:"Timestamp"},type:{cn:"type",en:"type"},unit:{cn:"unit",en:"unit"},update:{cn:"更新",en:"update"},"update adapter information":{cn:"update adapter information",en:"update adapter information"},"update-part1":{cn:"Because yunkong2 runs on many very different platforms, only manual updating is possible at the moment. To start the manual update, please go to your controller via console and execute the following:",en:"Because yunkong2 runs on many very different platforms, only manual updating is possible at the moment. To start the manual update, please go to your controller via console and execute the following:"},updated:{cn:"已更新",en:"updated"},updates:{cn:"updates",en:"updates"},upload:{cn:"上传",en:"Upload"},"user permissions":{cn:"用户权限",en:"user permissions"},users:{cn:"用户",en:"users"},"users permissions":{cn:"用户权限",en:"User permissions"},utility_group:{cn:"公用",en:"Utility"},val:{cn:"val",en:"val"},value:{cn:"value",en:"value"},"value.from":{cn:"Changed from",en:"Changed from"},"value.lc":{cn:"Last change",en:"Last change"},"value.q":{cn:"Quality code",en:"Quality code"},"value.ts":{cn:"Timestamp",en:"Timestamp"},"value.val":{cn:"value",en:"value"},version:{cn:"版本",en:"version"},vis_group:{cn:"yunkong2.vis",en:"yunkong2.vis"},visualisation_group:{cn:"可视化",en:"Visualisation"},"visualization-icons_group":{cn:"可视化 图标",en:"Visualization Icons"},"visualization-widgets_group":{cn:"可视化 部件",en:"Visualization Widgets"},visualization_group:{cn:"可视化",en:"Visualisation"},warn:{cn:"warn",en:"warn"},weather_group:{cn:"气候",en:"Weather"},wetty:{cn:"Wetty",en:"Wetty"},write:{cn:"write",en:"write"},"write operation":{cn:"write",en:"write"},yesterday:{cn:"昨天",en:"yesterday"},"%s object(s) processed":{cn:"%s objects were processed",en:"%s objects were processed"},"%s was imported":{cn:"%s was imported",en:"%s was imported"},"Ignore warning":{cn:"Ignore warning",en:"Ignore warning"},Filter:{cn:"Filter",en:"Filter"},Afghanistan:{cn:"Afghanistan",en:"Afghanistan"},Albania:{cn:"Albania",en:"Albania"},Algeria:{cn:"Algeria",en:"Algeria"},"American Samoa":{cn:"American Samoa",en:"American Samoa"},Andorra:{cn:"Andorra",en:"Andorra"},Angola:{cn:"Angola",en:"Angola"},Anguilla:{cn:"Anguilla",en:"Anguilla"},Antarctica:{cn:"Antarctica",en:"Antarctica"},"Antigua and Barbuda":{cn:"Antigua and Barbuda",en:"Antigua and Barbuda"},Argentina:{cn:"Argentina",en:"Argentina"},Armenia:{cn:"Armenia",en:"Armenia"},Aruba:{cn:"Aruba",en:"Aruba"},Australia:{cn:"Australia",en:"Australia"},Austria:{cn:"Austria",en:"Austria"},"Authentication was deactivated":{cn:"Authentication was deactivated",en:"Authentication was deactivated"},Azerbaijan:{cn:"Azerbaijan",en:"Azerbaijan"},Background:{cn:"Background",en:"Background"},"Background color of the login screen":{cn:"Background color of the login screen",en:"Background color of the login screen"},"Background image":{cn:"Background image",en:"Background image"},Bahamas:{cn:"Bahamas",en:"Bahamas"},Bahrain:{cn:"Bahrain",en:"Bahrain"},Bangladesh:{cn:"Bangladesh",en:"Bangladesh"},Barbados:{cn:"Barbados",en:"Barbados"},Belarus:{cn:"Belarus",en:"Belarus"},Belgium:{cn:"Belgium",en:"Belgium"},Belize:{cn:"Belize",en:"Belize"},Benin:{cn:"Benin",en:"Benin"},Bermuda:{cn:"Bermuda",en:"Bermuda"},Bhutan:{cn:"Bhutan",en:"Bhutan"},Bolivia:{cn:"Bolivia",en:"Bolivia"},"Bosnia and Herzegovina":{cn:"Bosnia and Herzegovina",en:"Bosnia and Herzegovina"},Botswana:{cn:"Botswana",en:"Botswana"},"Bouvet Island":{cn:"Bouvet Island",en:"Bouvet Island"},Brazil:{cn:"Brazil",en:"Brazil"},"British Indian Ocean Territory":{cn:"British Indian Ocean Territory",en:"British Indian Ocean Territory"},"Brunei Darussalam":{cn:"Brunei Darussalam",en:"Brunei Darussalam"},Bulgaria:{cn:"Bulgaria",en:"Bulgaria"},"Burkina Faso":{cn:"Burkina Faso",en:"Burkina Faso"},Burundi:{cn:"Burundi",en:"Burundi"},Cambodia:{cn:"Cambodia",en:"Cambodia"},Cameroon:{cn:"Cameroon",en:"Cameroon"},Canada:{cn:"Canada",en:"Canada"},"Cape Verde":{cn:"Cape Verde",en:"Cape Verde"},"Cayman Islands":{cn:"Cayman Islands",en:"Cayman Islands"},"Central African Republic":{cn:"Central African Republic",en:"Central African Republic"},Chad:{cn:"Chad",en:"Chad"},Chile:{cn:"Chile",en:"Chile"},"Christmas Island":{cn:"Christmas Island",en:"Christmas Island"},"Cocos Islands":{cn:"Cocos Islands",en:"Cocos Islands"},Colombia:{cn:"Colombia",en:"Colombia"},Comoros:{cn:"Comoros",en:"Comoros"},Congo:{cn:"Congo",en:"Congo"},"Cook Islands":{cn:"Cook Islands",en:"Cook Islands"},"Costa Rica":{cn:"Costa Rica",en:"Costa Rica"},Cuba:{cn:"Cuba",en:"Cuba"},Cyprus:{cn:"Cyprus",en:"Cyprus"},"Czech Republic":{cn:"Czech Republic",en:"Czech Republic"},"Disable authentication":{cn:"Disable authentication",en:"Disable authentication"},Djibouti:{cn:"Djibouti",en:"Djibouti"},"Dominican Republic":{cn:"Dominican Republic",en:"Dominican Republic"},"East Timor":{cn:"East Timor",en:"East Timor"},"Enabled:":{cn:"Enabled",en:"Enabled"},"Equatorial Guinea":{cn:"Equatorial Guinea",en:"Equatorial Guinea"},Eritrea:{cn:"Eritrea",en:"Eritrea"},Estonia:{cn:"Estonia",en:"Estonia"},Ethiopia:{cn:"Ethiopia",en:"Ethiopia"},Fiji:{cn:"Fiji",en:"Fiji"},Finland:{cn:"Finland",en:"Finland"},France:{cn:"France",en:"France"},"French Guiana":{cn:"French Guiana",en:"French Guiana"},"French Polynesia":{cn:"French Polynesia",en:"French Polynesia"},"French Southern Territories":{cn:"French Southern Territories",en:"French Southern Territories"},Gabon:{cn:"Gabon",en:"Gabon"},Gambia:{cn:"Gambia",en:"Gambia"},Georgia:{cn:"Georgia",en:"Georgia"},Germany:{cn:"Germany",en:"Germany"},Ghana:{cn:"Ghana",en:"Ghana"},Gibraltar:{cn:"Gibraltar",en:"Gibraltar"},Greece:{cn:"Greece",en:"Greece"},Greenland:{cn:"Greenland",en:"Greenland"},Grenada:{cn:"Grenada",en:"Grenada"},Guadeloupe:{cn:"Guadeloupe",en:"Guadeloupe"},Guam:{cn:"Guam",en:"Guam"},Guatemala:{cn:"Guatemala",en:"Guatemala"},Guernsey:{cn:"Guernsey",en:"Guernsey"},Guinea:{cn:"Guinea",en:"Guinea"},"Guinea-Bissau":{cn:"Guinea-Bissau",en:"Guinea-Bissau"},Guyana:{cn:"Guyana",en:"Guyana"},Haiti:{cn:"Haiti",en:"Haiti"},Honduras:{cn:"Honduras",en:"Honduras"},Hungary:{cn:"Hungary",en:"Hungary"},Iceland:{cn:"Iceland",en:"Iceland"},India:{cn:"India",en:"India"},Indonesia:{cn:"Indonesia",en:"Indonesia"},Iran:{cn:"Iran",en:"Iran"},Iraq:{cn:"Iraq",en:"Iraq"},Ireland:{cn:"Ireland",en:"Ireland"},"Isle of Man":{cn:"Isle of Man",en:"Isle of Man"},Israel:{cn:"Israel",en:"Israel"},Italy:{cn:"Italy",en:"Italy"},"Ivory Coast":{cn:"Ivory Coast",en:"Ivory Coast"},Jamaica:{cn:"Jamaica",en:"Jamaica"},Japan:{cn:"Japan",en:"Japan"},Jersey:{cn:"Jersey",en:"Jersey"},Jordan:{cn:"Jordan",en:"Jordan"},Kazakhstan:{cn:"Kazakhstan",en:"Kazakhstan"},Kenya:{cn:"Kenya",en:"Kenya"},Kiribati:{cn:"Kiribati",en:"Kiribati"},Korea:{cn:"Korea",en:"Korea"},Kosovo:{cn:"Kosovo",en:"Kosovo"},Kuwait:{cn:"Kuwait",en:"Kuwait"},Kyrgyzstan:{cn:"Kyrgyzstan",en:"Kyrgyzstan"},"Lao People's Democratic Republic":{cn:"Lao People's Democratic Republic",en:"Lao People's Democratic Republic"},Latvia:{cn:"Latvia",en:"Latvia"},Lebanon:{cn:"Lebanon",en:"Lebanon"},Lesotho:{cn:"Lesotho",en:"Lesotho"},Liberia:{cn:"Liberia",en:"Liberia"},"Libyan Arab Jamahiriya":{cn:"Libyan Arab Jamahiriya",en:"Libyan Arab Jamahiriya"},Liechtenstein:{cn:"Liechtenstein",en:"Liechtenstein"},Lithuania:{cn:"Lithuania",en:"Lithuania"},Luxembourg:{cn:"Luxembourg",en:"Luxembourg"},Macau:{cn:"Macau",en:"Macau"},Macedonia:{cn:"Macedonia",en:"Macedonia"},Madagascar:{cn:"Madagascar",en:"Madagascar"},Mai:{cn:"Mai",en:"Mai"},Malawi:{cn:"Malawi",en:"Malawi"},Malaysia:{cn:"Malaysia",en:"Malaysia"},Maldives:{cn:"Maldives",en:"Maldives"},Mali:{cn:"Mali",en:"Mali"},Malta:{cn:"Malta",en:"Malta"},"Marshall Islands":{cn:"Marshall Islands",en:"Marshall Islands"},Martinique:{cn:"Martinique",en:"Martinique"},Mauritania:{cn:"Mauritania",en:"Mauritania"},Mauritius:{cn:"Mauritius",en:"Mauritius"},Mayotte:{cn:"Mayotte",en:"Mayotte"},Mexico:{cn:"Mexico",en:"Mexico"},Micronesia:{cn:"Micronesia",en:"Micronesia"},Moldova:{cn:"Moldova",en:"Moldova"},Monaco:{cn:"Monaco",en:"Monaco"},Mongolia:{cn:"Mongolia",en:"Mongolia"},Montenegro:{cn:"Montenegro",en:"Montenegro"},Montserrat:{cn:"Montserrat",en:"Montserrat"},Morocco:{cn:"Morocco",en:"Morocco"},Mozambique:{cn:"Mozambique",en:"Mozambique"},Myanmar:{cn:"Myanmar",en:"Myanmar"},Namibia:{cn:"Namibia",en:"Namibia"},Nauru:{cn:"Nauru",en:"Nauru"},Nepal:{cn:"Nepal",en:"Nepal"},Netherlands:{cn:"Netherlands",en:"Netherlands"},"Netherlands Antilles":{cn:"Netherlands Antilles",en:"Netherlands Antilles"},"New Caledonia":{cn:"New Caledonia",en:"New Caledonia"},"New Zealand":{cn:"New Zealand",en:"New Zealand"},Nicaragua:{cn:"Nicaragua",en:"Nicaragua"},Niger:{cn:"Niger",en:"Niger"},Nigeria:{cn:"Nigeria",en:"Nigeria"},Niue:{cn:"Niue",en:"Niue"},"Norfolk Island":{cn:"Norfolk Island",en:"Norfolk Island"},"Northern Mariana Islands":{cn:"Northern Mariana Islands",en:"Northern Mariana Islands"},Oman:{cn:"Oman",en:"Oman"},Pakistan:{cn:"Pakistan",en:"Pakistan"},Palau:{cn:"Palau",en:"Palau"},Palestine:{cn:"Palestine",en:"Palestine"},Panama:{cn:"Panama",en:"Panama"},"Papua New Guinea":{cn:"Papua New Guinea",en:"Papua New Guinea"},Paraguay:{cn:"Paraguay",en:"Paraguay"},Peru:{cn:"Peru",en:"Peru"},Philippines:{cn:"Philippines",en:"Philippines"},Pitcairn:{cn:"Pitcairn",en:"Pitcairn"},Poland:{cn:"Poland",en:"Poland"},Popular:{cn:"Popular",en:"Popular"},"Popular first":{cn:"Popular first",en:"Popular first"},Portugal:{cn:"Portugal",en:"Portugal"},"Puerto Rico":{cn:"Puerto Rico",en:"Puerto Rico"},Qatar:{cn:"Qatar",en:"Qatar"},Reunion:{cn:"Reunion",en:"Reunion"},Romania:{cn:"Romania",en:"Romania"},"Russian Federation":{cn:"Russian Federation",en:"Russian Federation"},Rwanda:{cn:"Rwanda",en:"Rwanda"},"Saint Kitts and Nevis":{cn:"Saint Kitts and Nevis",en:"Saint Kitts and Nevis"},"Saint Lucia":{cn:"Saint Lucia",en:"Saint Lucia"},"Saint Vincent and the Grenadines":{cn:"Saint Vincent and the Grenadines",en:"Saint Vincent and the Grenadines"},Samoa:{cn:"Samoa",en:"Samoa"},"San Marino":{cn:"San Marino",en:"San Marino"},"Saudi Arabia":{cn:"Saudi Arabia",en:"Saudi Arabia"},Senegal:{cn:"Senegal",en:"Senegal"},Serbia:{cn:"Serbia",en:"Serbia"},Slovakia:{cn:"Slovakia",en:"Slovakia"},Slovenia:{cn:"Slovenia",en:"Slovenia"},"Solomon Islands":{cn:"Solomon Islands",en:"Solomon Islands"},Somalia:{cn:"Somalia",en:"Somalia"},"South Africa":{cn:"South Africa",en:"South Africa"},"South Georgia South Sandwich Islands":{cn:"South Georgia South Sandwich Islands",en:"South Georgia South Sandwich Islands"},Spain:{cn:"Spain",en:"Spain"},Speed:{cn:"Speed",en:"Speed"},"Sri Lanka":{cn:"Sri Lanka",en:"Sri Lanka"},"St. Helena":{cn:"St. Helena",en:"St. Helena"},"St. Pierre and Miquelon":{cn:"St. Pierre and Miquelon",en:"St. Pierre and Miquelon"},Sudan:{cn:"Sudan",en:"Sudan"},Suriname:{cn:"Suriname",en:"Suriname"},"Svalbard and Jan Mayen Islands":{cn:"Svalbard and Jan Mayen Islands",en:"Svalbard and Jan Mayen Islands"},Swaziland:{cn:"Swaziland",en:"Swaziland"},Sweden:{cn:"Sweden",en:"Sweden"},Switzerland:{cn:"Switzerland",en:"Switzerland"},"Syrian Arab Republic":{cn:"Syrian Arab Republic",en:"Syrian Arab Republic"},Tajikistan:{cn:"Tajikistan",en:"Tajikistan"},Tanzania:{cn:"Tanzania",en:"Tanzania"},Thailand:{cn:"Thailand",en:"Thailand"},Togo:{cn:"Togo",en:"Togo"},Tokelau:{cn:"Tokelau",en:"Tokelau"},Tonga:{cn:"Tonga",en:"Tonga"},"Trinidad and Tobago":{cn:"Trinidad and Tobago",en:"Trinidad and Tobago"},Tue:{cn:"Tue",en:"Tue"},Tunisia:{cn:"Tunisia",en:"Tunisia"},Turkey:{cn:"Turkey",en:"Turkey"},Turkmenistan:{cn:"Turkmenistan",en:"Turkmenistan"},"Turks and Caicos Islands":{cn:"Turks and Caicos Islands",en:"Turks and Caicos Islands"},Tuvalu:{cn:"Tuvalu",en:"Tuvalu"},Uganda:{cn:"Uganda",en:"Uganda"},Ukraine:{cn:"Ukraine",en:"Ukraine"},"Uncheck All":{cn:"Uncheck All",en:"Uncheck All"},"United Arab Emirates":{cn:"United Arab Emirates",en:"United Arab Emirates"},"United Kingdom":{cn:"United Kingdom",en:"United Kingdom"},"United States":{cn:"United States",en:"United States"},"United States minor outlying islands":{cn:"United States minor outlying islands",en:"United States minor outlying islands"},Unsecure_Auth:{cn:"The password will be sent via unsecure connection. To protect your passwords enable the secure connection (HTTPS)!",en:"The password will be sent via unsecure connection. To protect your passwords enable the secure connection (HTTPS)!"},Uzbekistan:{cn:"Uzbekistan",en:"Uzbekistan"},Vanuatu:{cn:"Vanuatu",en:"Vanuatu"},Venezuela:{cn:"Venezuela",en:"Venezuela"},Vietnam:{cn:"Vietnam",en:"Vietnam"},"Virgin Islands (British)":{cn:"Virgin Islands (British)",en:"Virgin Islands (British)"},"Virgin Islands (U.S.)":{cn:"Virgin Islands (U.S.)",en:"Virgin Islands (U.S.)"},"Wallis and Futuna Islands":{cn:"Wallis and Futuna Islands",en:"Wallis and Futuna Islands"},"Warning!":{cn:"Warning!",en:"Warning!"},"Western Sahara":{cn:"Western Sahara",en:"Western Sahara"},Yemen:{cn:"Yemen",en:"Yemen"},Zaire:{cn:"Zaire",en:"Zaire"},Zambia:{cn:"Zambia",en:"Zambia"},Zimbabwe:{cn:"Zimbabwe",en:"Zimbabwe"},silly:{cn:"silly",en:"silly"},"Sierra Leone":{en:"Sierra Leone"},Singapore:{en:"Singapore"},"Size: %s, Free: %s":{en:"Size: %s, Available: %s"},"edit enums":{en:"Edit enumerations for"},"place here":{en:"place the files here"},popular:{en:"popular"}}; +"use strict";Array.prototype.remove=function(){for(var e,t,n=arguments,i=n.length;i&&this.length;)for(e=n[--i];-1!==(t=this.indexOf(e));)this.splice(t,1);return this},console.debug||(console.debug=console.log),"undefined"==typeof Number&&(console.log("define Number"),Number=function(e){return parseFloat(e)}),Object.assign||(Object.assign=$.extend);var $iframeDialog=null,configNotSaved=null,showConfig=null,defaults={},customPostInits={},FORBIDDEN_CHARS=/[\]\[*,;'"`<>\\\s?]/g,adapterRedirect=function(e,t){e&&setTimeout(function(){e+=document.location.pathname,e+=document.location.hash,document.location.href=e},t||5e3)},gMain=null;function detectIE(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(0td"),a=H.data[n.key];function s(e){return'
    '+e+"
    "}if(a){i.eq(0).css({overflow:"hidden","white-space":"nowrap"});var o=a.desc.indexOf("div>div").css("height: 22px !important"),u(2,a.keywords).attr("title",a.keywords),i.eq(3).html(a.installed),i.eq(4).html(a.version),u(5,a.license),u(6,a.install),H.initButtons(n.key),H.isCollapsed[a.group]&&(H.isCollapsed[a.group]=!1,H.main.saveConfig("adaptersIsCollapsed",JSON.stringify(H.isCollapsed)))}else{i.eq(0).css({"font-weight":"bold"}),i.eq(0).find("img").remove(),i.eq(0).find("span.fancytree-title").attr("style","padding-left: 0px !important");for(var c=0;c'+l+' / '+H.tree[c].children.length+"]",i.eq(1).html(s(''+l+" "+_("of")+' '+H.tree[c].children.length+" "+_("Adapters from this Group installed")));break}}function u(e,t){return i.eq(e).html(s(t))}},gridnav:{autofocusInput:!1,handleCursorKeys:!0},filter:{mode:"hide",autoApply:!0},collapse:function(e,t){H.isCollapsed[t.node.key]||(H.isCollapsed[t.node.key]=!0,H.main.saveConfig("adaptersIsCollapsed",JSON.stringify(H.isCollapsed)))}}),H.$tab.find("#btn_collapse_adapters").show().off("click").on("click",function(){H.$tab.find(".process-adapters").show(),setTimeout(function(){H.$grid.fancytree("getRootNode").visit(function(e){(!H.filterVals.length||e.match||e.subMatch)&&e.setExpanded(!1)}),H.$tab.find(".process-adapters").hide()},100)}),H.$tab.find("#btn_expand_adapters").show().off("click").on("click",function(){H.$tab.find(".process-adapters").show(),setTimeout(function(){H.$grid.fancytree("getRootNode").visit(function(e){(!H.filterVals.length||e.match||e.subMatch)&&e.setExpanded(!0)}),H.$tab.find(".process-adapters").hide()},100)}),H.$tab.find("#btn_list_adapters").show().off("click").on("click",function(){var e=H.$tab.find(".process-adapters");e.show(),H.isList=!H.isList,H.isList?(H.$tab.find("#btn_list_adapters").addClass("red lighten-3"),H.$tab.find("#btn_expand_adapters").hide(),H.$tab.find("#btn_collapse_adapters").hide(),$(this).attr("title",_("list"))):(H.$tab.find("#btn_list_adapters").removeClass("red lighten-3"),H.$tab.find("#btn_expand_adapters").show(),H.$tab.find("#btn_collapse_adapters").show(),$(this).attr("title",_("tree"))),H.main.saveConfig("adaptersIsList",H.isList),e.show(),setTimeout(function(){H._postInit(!0),e.hide()},200)})),H.isList?(H.$tab.find("#btn_list_adapters").addClass("red lighten-3").attr("title",_("tree")),H.$tab.find("#btn_expand_adapters").hide(),H.$tab.find("#btn_collapse_adapters").hide()):(H.$tab.find("#btn_list_adapters").removeClass("red lighten-3").attr("title",_("list")),H.$tab.find("#btn_expand_adapters").show(),H.$tab.find("#btn_collapse_adapters").show()),H.$tab.find(".filter-input").trigger("change")}function n(){H.$grid.hide(),H.$tiles.show(),H.$tab.find("#main-toolbar-table-types-btn").show(),H.$tab.find("#btn_list_adapters").hide(),H.$tab.find("#btn_collapse_adapters").hide(),H.$tab.find("#btn_expand_adapters").hide(),H.$tab.find(".filter-input").trigger("change")}function i(){H.onlyUpdatable?(H.$tab.find("#btn_filter_updates").addClass("red lighten-3"),H.$tab.find("#btn_upgrade_all").show()):(H.$tab.find("#btn_upgrade_all").hide(),H.$tab.find("#btn_filter_updates").removeClass("red lighten-3"))}function a(){H.main.config.expertMode?(H.$tab.find("#btn_adapters_expert_mode").addClass("red lighten-3"),H.$tab.find("#btn_upgrade_all").show()):(H.$tab.find("#btn_adapters_expert_mode").removeClass("red lighten-3"),i())}function B(){var t=!1;H.currentFilter?H.$tiles.find(".tile").each(function(){var e=$(this);(!H.currentType||e.hasClass("class-"+H.currentType))&&G({key:e.data("id")})?(t=!0,e.show()):e.hide()}):H.currentType?(H.$tiles.find(".tile").hide(),H.$tiles.find(".class-"+H.currentType).show(),H.$tiles.find(".tile").each(function(){if($(this).is(":visible"))return!(t=!0)})):H.$tiles.find(".tile").show().each(function(){if($(this).is(":visible"))return!(t=!0)}),t?H.$tiles.find(".filtered-out").hide():H.$tiles.find(".filtered-out").show()}function G(e){if(H.currentFilter){if(!H.data[e.key])return!1;var t=H.data[e.key].title;t&&"object"==typeof t&&(t=t[systemLang]||t.en);var n=H.data[e.key].desc;return n&&"object"==typeof n&&(n=n[systemLang]||n.en),!!(H.data[e.key].name&&-1!==H.data[e.key].name.toLowerCase().indexOf(H.currentFilter)||t&&-1!==t.toLowerCase().indexOf(H.currentFilter)||H.data[e.key].keywords&&-1!==H.data[e.key].keywords.toLowerCase().indexOf(H.currentFilter)||n&&-1!==n.toLowerCase().indexOf(H.currentFilter))}return!0}function F(e,t){var n="";if(t.news)for(var i in t.news)if(t.news.hasOwnProperty(i)){if(systemLang===i&&(n+=(n?"\n":"")+t.news[i]),"en"===i||"cn"===i)continue;if(i===e)break;n+=(n?"\n":"")+(t.news[i][systemLang]||t.news[i].en)}return n}function Z(e){if(!e)return"";var t;if(e instanceof Array){t={};for(var n=0;n
    ',!E&&i.colors&&s[O].color&&(e+='
    '),!E&&i.icons&&(e+=ne(i.objects[s[O].id],i.imgPath)||'
     
    '),"enabled"===z)e+='";else if("groups"===z)for(var S=0;S'+ne(i.objects[$],null,"")+s[O].groups[S].name+""}else if("instance"===z)if(void 0!==s[O].instance&&1';for(var Y=0;Y"+r[Y]+"";e+=k+=""}else e+=""+(void 0===s[O].instance?"":s[O].instance)+"";else if("icon"===z)e+=ne(i.objects[s[O].id],i.imgPath);else{var R=s[O][z]||"";R&&"object"==typeof R&&R.en&&(R=R[systemLang]||R.en),e+=""+R+""}e+="
    ';for(var Q="",P=0;P ':(Q+="<"+t+' data-id="'+s[O].id+'" class="select-button-'+P+' select-button-custom td-button" style="margin-right: 3px;" data-parent="'+s[O].parent+'" data-children="'+!!s[O].realChildren+'" title="'+(i.buttons[P].title||"")+'">',window.M&&window.M.toast&&(Q+=''+(i.buttons[P].icon||"")+""),Q+="");e+=Q+"
    '),i}this.curRepository=null,this.curRepoLastUpdate=null,this.curInstalled=null,this.curRepoLastHost=null,this.list=[],this.$tab=$("#tab-adapters"),this.$grid=this.$tab.find("#grid-adapters"),this.$tiles=this.$tab.find("#grid-adapters-tiles"),this.$installDialog=$("#dialog-install-url"),this.main=e,this.tree=[],this.data={},this.urls={},this.groupImages={"common adapters_group":"img/common.png",general_group:"img/common.png",hardware_group:"img/hardware.png",lighting_group:"img/hardware.png",energy_group:"img/hardware.png",household_group:"img/hardware.png","iot-systems_group":"img/hardware.png","climate-control_group":"img/hardware.png",infrastructure_group:"img/hardware.png",garden_group:"img/hardware.png",alarm_group:"img/hardware.png",script_group:"img/script.png",logic_group:"img/script.png",media_group:"img/media.png",multimedia_group:"img/media.png",communication_group:"img/communication.png",protocols_group:"img/communication.png",network_group:"img/communication.png",messaging_group:"img/communication.png",visualisation_group:"img/visualisation.png",visualization_group:"img/visualisation.png","visualization-icons_group":"img/visualisation.png","visualization-widgets_group":"img/visualisation.png",storage_group:"img/storage.png",weather_group:"img/weather.png",schedule_group:"img/schedule.png",vis_group:"img/vis.png","date-and-time_group":"img/service.png",geoposition_group:"img/service.png",utility_group:"img/service.png","misc-data_group":"img/service.png",service_group:"img/service.png","third-party_group":"img/service.png"},this.inited=!1,this.isList=!1,this.filterVals={length:0},this.onlyInstalled=!1,this.onlyUpdatable=!1,this.currentFilter="",this.currentType="",this.isCollapsed={},this.isTiles=!0,this.types={occ:"schedule"},this.prepare=function(){this.$tab.find("#btn_switch_adapters").off("click").on("click",function(){H.$tab.find(".process-adapters").show(),H.isTiles=!H.isTiles,H.isTiles?(H.$tab.removeClass("view-table").addClass("view-tiles"),$(this).find("i").text("view_list")):($(this).find("i").text("view_module"),H.$tab.removeClass("view-tiles").addClass("view-table")),H.main.saveConfig("adaptersIsTiles",H.isTiles),setTimeout(function(){H.isTiles?n():t(),H._postInit(!0),H.$tab.find(".process-adapters").hide()},50)}),this.$tab.find("#btn_filter_adapters").off("click").on("click",function(){H.$tab.find(".process-adapters").show(),H.onlyInstalled=!H.onlyInstalled,H.onlyInstalled?H.$tab.find("#btn_filter_adapters").addClass("red lighten-3"):H.$tab.find("#btn_filter_adapters").removeClass("red lighten-3"),H.main.saveConfig("adaptersOnlyInstalled",H.onlyInstalled),setTimeout(function(){H._postInit(!0),H.$tab.find(".process-adapters").hide()},50)}),this.$tab.find("#btn_filter_updates").off("click").on("click",function(){H.$tab.find(".process-adapters").show(),H.onlyUpdatable=!H.onlyUpdatable,i(),H.main.saveConfig("adaptersOnlyUpdatable",H.onlyUpdatable),setTimeout(function(){H._postInit(!0),H.$tab.find(".process-adapters").hide()},200)}),this.$tab.find("#btn_filter_custom_url").off("click").on("click",function(){var e,t='",n=[];for(e in H.urls)H.urls.hasOwnProperty(e)&&n.push(e);n.sort();for(var i=0;i'+n[i]+"")}H.$installDialog.find("#install-github-link").html(t).val(H.main.config.adaptersGithub||""),H.$installDialog.modal(),H.$installDialog.find(".btn-install").off("click").on("click",function(){var e,t,n;if(!H.$installDialog.find('a[href="#tabs-install-github"]').hasClass("active"))(e=H.$installDialog.find("#install-url-link").val()).startsWith("http")&&e.endsWith(".git")&&(e="git+"+e),t=H.$installDialog.find("#install-url-debug").prop("checked")?" --debug":"",n="";else{var i=H.$installDialog.find("#install-github-link").val().split(" ");e=i[0],t=H.$installDialog.find("#install-github-debug").prop("checked")?" --debug":"",n=" "+i[1]}e?H.main.cmdExec(null,'url "'+e+'"'+n+t,function(e){e||H.init(!0,!0)}):H.main.showError(_("Invalid link"))}),H.$installDialog.find("#install-github-link").select(),H.$installDialog.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),H.$installDialog.modal("open"),H.$installDialog.find(".tabs").mtabs({nShow:function(e){e&&H.main.saveConfig("adaptersInstallTab",$(e).attr("id"))}}),H.main.config.adaptersInstallTab&&!H.main.noSelect&&H.$installDialog.find(".tabs").mtabs("select",H.main.config.adaptersInstallTab)}),this.$tab.find("#btn_upgrade_all").off("click").on("click",function(){H.main.confirmMessage(_("Do you want to upgrade all adapters?"),_("Please confirm"),"help",function(e){e&&H.main.cmdExec(null,"upgrade",function(e){e||H._postInit(!0)})})}),this.$tab.find("#btn_adapters_expert_mode").on("click",function(){H.main.config.expertMode=!H.main.config.expertMode,H.main.saveConfig("expertMode",H.main.config.expertMode),H.updateExpertMode(),H.main.tabs.instances.updateExpertMode()}),H.main.config.expertMode&&H.$tab.find("#btn_adapters_expert_mode").addClass("red lighten-3"),this.$installDialog.find("#install-github-link").on("change",function(){H.main.saveConfig("adaptersGithub",$(this).val())}),this.$installDialog.find("#install-url-link").on("keyup",function(e){13===e.which&&H.$installDialog.find("#dialog-install-url-button").trigger("click")}),this.isTiles=void 0===this.main.config.adaptersIsTiles||null===this.main.config.adaptersIsTiles||this.main.config.adaptersIsTiles,this.isList=this.main.config.adaptersIsList||!1,this.onlyInstalled=this.main.config.adaptersOnlyInstalled||!1,this.onlyUpdatable=this.main.config.adaptersOnlyUpdatable||!1,this.currentFilter=this.main.config.adaptersCurrentFilter||"",this.currentType=this.main.config.adaptersCurrentType||"",this.currentOrder=this.main.config.adaptersCurrentOrder||"a-z",this.isCollapsed=this.main.config.adaptersIsCollapsed?JSON.parse(this.main.config.adaptersIsCollapsed):{},this.currentFilter?(this.$tab.find(".filter-input").addClass("input-not-empty").val(H.currentFilter),this.$tab.find(".filter-clear").show()):this.$tab.find(".filter-clear").hide(),this.onlyInstalled?this.$tab.find("#btn_filter_adapters").addClass("red lighten-3"):this.$tab.find("#btn_filter_adapters").removeClass("red lighten-3"),this.onlyUpdatable?this.$tab.find("#btn_filter_updates").addClass("red lighten-3"):this.$tab.find("#btn_filter_updates").removeClass("red lighten-3"),"ie"===this.main.browser&&this.main.browserVersion<=10&&(this.isTiles=!1,this.$tab.find("#btn_switch_adapters").hide()),a(),this.$tab.find("#btn_refresh_adapters").on("click",function(){H.init(!0,!0)}),this.$tab.find(".filter-input").on("keyup",function(){$(this).trigger("change")}).on("change",function(e){H.filterTimer&&clearTimeout(H.filterTimer),H.filterTimer=setTimeout(function(){H.filterTimer=null,H.currentFilter=H.$tab.find(".filter-input").val().toLowerCase(),e&&e.target&&$(e.target)[H.currentFilter?"addClass":"removeClass"]("input-not-empty"),H.currentFilter?H.$tab.find(".filter-clear").show():H.$tab.find(".filter-clear").hide(),H.main.saveConfig("adaptersCurrentFilter",H.currentFilter),H.isTiles?B():H.$grid.fancytree("getTree").filterNodes(G,!1)},400)}),this.$tab.find(".filter-clear").on("click",function(){H.$tab.find(".filter-input").val("").trigger("change")}),this.isTiles?(this.$tab.find("#btn_switch_adapters").find("i").text("view_list"),H.$tab.removeClass("view-table").addClass("view-tiles"),n()):(H.$tab.removeClass("view-tiles").addClass("view-table"),t())},this.updateExpertMode=function(){this.init(!0),a()},this.getAdaptersInfo=function(e,t,n,i){if(e){if(!i)throw"Callback cannot be null or undefined";t&&(!this.curRepoLastUpdate||1e3<(new Date).getTime()-this.curRepoLastUpdate)&&(this.curRepository=null,this.curInstalled=null),this.curRunning?this.curRunning.push(i):(this.curRepository&&this.curRepoLastHost===e||(this.curRepository=null,this.main.socket.emit("sendToHost",e,"getRepository",{repo:this.main.systemConfig.common.activeRepo,update:n},function(e){"permissionError"===e&&(console.error('May not read "getRepository"'),e={}),H.curRepository=e||{},H.curRepository&&H.curInstalled&&H.curRunning&&(H.curRepoLastUpdate=(new Date).getTime(),setTimeout(function(){for(var e=0;e'+e+'',t&&(e+=''),e+=""}c.sort(),H.tree=[],H.data={};for(var m=0;m';for(var w=0;w',b!==p&&(g+=''+p+"",b&&(g+=" ~ ")),b&&(g+=''+b+""),g+=""):g+='',g+=''+n.version+"",h=''+n.version+"",g+="",!y&&H.onlyUpdatable)continue}i=u(a=i,y,M,v);var j=(n.type||H.types[o]||"common adapters")+"_group";C=(C="object"==typeof n.desc?n.desc[systemLang]||n.desc.en:n.desc)||"",C+=W(j,o,H.main.states["system.adapter."+o+".upload"]?H.main.states["system.adapter."+o+".upload"].val:0);var L=n.titleLang||n.title;if(L="object"==typeof L?L[systemLang]||L.en:L,H.data[o]={image:f?'':"",icon:f||"",stat:e[o]?e[o].stat:0,name:o,title:(L||"").replace("yunkong2 Visualisation - ",""),desc:C,news:M,updatableError:v,keywords:n.keywords?n.keywords.join(" "):"",version:i,installed:g,rawVersion:a,instances:p,rawInstalled:h,versionDate:n.versionDate,updatable:y,bold:n.highlight||!1,install:''+(H.main.config.expertMode?'':"")+"'+(H.main.config.expertMode?'':""),group:j,license:n.license||"",licenseUrl:n.licenseUrl||""},n.type||console.log('"'+o+'": "common adapters",'),n.type&&H.types[o]&&console.log('Adapter "'+o+'" has own type. Remove from admin.'),H.isList)H.tree.push({icon:f,title:H.data[o].title||o,key:o});else{for(var N=-1,T=0;T':"",icon:n.extIcon,stat:n.stat,name:o,title:(L||"").replace("yunkong2 Visualisation - ",""),desc:C,keywords:n.keywords?n.keywords.join(" "):"",rawVersion:a,version:i,bold:n.highlight,installed:"",versionDate:n.versionDate,install:''+(H.main.config.expertMode?'':""),license:n.license||"",licenseUrl:n.licenseUrl||"",group:j},n.type||console.log('"'+o+'": "common adapters",'),n.type&&H.types[o]&&console.log('Adapter "'+o+'" has own type. Remove from admin.'),H.isList)H.tree.push({icon:n.extIcon,title:H.data[o].title||o,key:o});else{for(var D=-1,I=0;IH.data[t].stat?-1:H.data[e].statH.data[t].versionDate?-1:H.data[e].versionDate',O+='
    ',O+='
    ',O+='
    ',O+=' ',O+=' '+S.title+"",O+=' more_vert',O+='
      ',O+="
    • "+d["Available version:"]+' "+S.rawVersion+""+(S.updatable?'':"")+"
    • ",S.installed&&(O+="
    • "+d["Installed version"]+': '+S.rawInstalled+"
    • "),S.instances&&(O+="
    • "+_("Installed instances")+': '+S.instances+"
    • "),O+="
    ",O+="
    ",O+=' ',O+='
    ',O+=' close',O+="

    "+S.desc+"

    ",O+='
    ',O+=S.install,O+="
    ",O+="
    ","popular"===H.currentOrder&&S.stat?O+='
    '+S.stat+"
    ":"updated"===H.currentOrder&&S.versionDate&&(O+='
    '+J(S.versionDate,d.today,d.yesterday,d["1 %d days ago"],d["2 %d days ago"],d["5 %d days ago"],l)+"
    "),O+="
    ",O+="
    "}for(var Y in O+='
    ',O+='
    ',O+='
    ',O+='
    ',O+=' '+_("Filtered out")+"",O+="
    ",O+=' ',O+="
    ",O+="
    ",H.$tiles.html(O),H.data)H.data.hasOwnProperty(Y)&&H.initButtons(Y);for(var Q='
  • '+d.all+"
  • \n",P=0;P'+_(A[P])+"\n";var U=H.$tab.find("#main-toolbar-table-types");U.html(Q),U.find(".main-toolbar-table-types-item").show().off("click").on("click",function(){H.currentType=$(this).data("type")||"",B(),H.$tab.find("#main-toolbar-table-types-btn").html(_(H.currentType||"all")),H.main.saveConfig("adaptersCurrentType",H.currentType)}),H.currentType&&!d[H.currentType]&&(d[H.currentType]=_(H.currentType)),H.$tab.find("#main-toolbar-table-types-btn").html(d[H.currentType||"all"]).dropdown({constrainWidth:!1,gutter:0}),(U=H.$tab.find("#main-toolbar-table-order")).find(".main-toolbar-table-order-item").off("click").on("click",function(){H.currentOrder=$(this).data("type")||"",H.$tab.find("#main-toolbar-table-order-btn").html(_(H.currentOrder||"a-z")),H.main.saveConfig("adaptersCurrentOrder",H.currentOrder),H._postInit()}),H.currentOrder&&!d[H.currentOrder]&&(d[H.currentOrder]=_(H.currentOrder)),H.$tab.find("#main-toolbar-table-order-btn").show().html(d[H.currentOrder||"a-z"]).dropdown({constrainWidth:!1,gutter:0}),B()}else{H.$tab.find("#main-toolbar-table-types-btn").hide(),H.$tab.find("#main-toolbar-table-order-btn").hide(),H.$grid.fancytree("getTree").reload(H.tree),H.$grid.find(".fancytree-icon").each(function(){$(this).attr("src")&&$(this).css({width:18,height:18}),$(this).on("hover",function(){var e='
    ',t=$(e);t.insertAfter($(this)),$(this).data("big",t[0]);var n=parseFloat(t.height()),i=Math.round($(this).position().top-(n-parseFloat($(this).height()))/2);n+i>(window.innerHeight||document.documentElement.clientHeight)&&(i=(window.innerHeight||document.documentElement.clientHeight)-n),t.css({top:i})},function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)})}),H.currentFilter&&H.$grid.fancytree("getTree").filterNodes(G,!1),H.sortTree(),H.enableColResize();var R=["tab-adapters-table-name","tab-adapters-table-description","tab-adapters-table-keywords","tab-adapters-table-installed","tab-adapters-table-available","tab-adapters-table-license","tab-adapters-table-install"];H.$grid.find("tbody tr").each(function(){var e=0;$(this).find("td").each(function(){$(this).addClass(R[e]),e++})})}H.$tab.find(".grid-main-div").removeClass("order-a-z order-popular order-updated").addClass(H.currentOrder?"order-"+H.currentOrder:""),H.$tab.find(".process-adapters").hide(),H.updateCounter(s)})):this.enableColResize(),this.restoreScroll()},this.saveScroll=function(){this.scrollTop=this.$tab.find(".grid-main-div").scrollTop()},this.restoreScroll=function(){this.scrollTop&&this.$tab.find(".grid-main-div").scrollTop(this.scrollTop)},this.updateCounter=function(e){if(void 0===e)this.getAdaptersInfo(this.main.currentHost,!1,!1,function(e,t){var n=0;for(var i in t)if(t.hasOwnProperty(i)){var a=t?t[i]:null;if(a&&!a.controller&&"hosts"!==i){var s="";e[i]&&e[i].version&&(s=e[i].version),a.version&&!H.main.upToDate(s,a.version)&&n++}}H.updateCounter(n)});else if(e){var t=$("#updates-for-adapters");t.length?t.text(e):$(''+e+"").appendTo('.admin-sidemenu-items[data-tab="tab-adapters"] a')}else $("#updates-for-adapters").remove()},this.init=function(e,t){this.inited&&!e||(this.main.objectsLoaded?(this.inited||(this.inited=!0,this.main.subscribeObjects("system.host.*"),this.main.subscribeStates("system.host.*")),this.main.tabs.hosts.getHosts(function(){H._postInit(e,t)})):setTimeout(function(){H.init(e,t)},250))},this.destroy=function(){this.inited&&(this.saveScroll(),this.inited=!1,this.main.unsubscribeObjects("system.host.*"),this.main.unsubscribeStates("system.host.*"))},this.initButtons=function(r){this.$tab.find('.adapter-install-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var s=$(this).attr("data-adapter-name"),e=$(this).attr("data-adapter-desc");!function(e,t,n){if(H.main.tabs.hosts.list.length<=1&&!H.main.config.expertMode)return n(!0,H.main.currentHost,"");var i=$("#dialog-add-instance");i.find(".dialog-add-instance-name").html(e),i.find(".dialog-add-description").html(t);for(var a="",s=0;s'+o.name+""}H.main.tabs.hosts.list.length<=1?i.find(".dialog-add-instance-host").addClass("disabled").prop("disabled",!0):i.find(".dialog-add-instance-host").removeClass("disabled").prop("disabled",!1),i.find(".dialog-add-instance-host").html(a).select();for(var r=-1,c=[],l=0;l'+_("auto")+"";for(var m=0;m'+m+"");i.find(".dialog-add-instance-number").html(a).select(),i.find(".dialog-add-install-btn").off("click").on("click",function(e){n&&(n(!0,i.find(".dialog-add-instance-host").val(),i.find(".dialog-add-instance-number").val()),n=null),i.find(".dialog-add-cancel-btn").off("click"),i.find(".dialog-add-instance-number").off("click")}),i.find(".dialog-add-cancel-btn").off("click").on("click",function(e){n&&(n(!1),n=null),i.find(".dialog-add-cancel-btn").off("click"),i.find(".dialog-add-instance-number").off("click")}),i.modal({dismissible:!1,complete:function(){i.find(".dialog-add-instance-name").html("")}}).modal("open")}(s,e,function(e,i,a){e&&H.getAdaptersInfo(i,!1,!1,function(e,t){var n=e[s];n||(n=t[s]),n&&(n.license&&"MIT"!==n.license?function(i,a){var s=$("#dialog-license");if(!H.data[i].installed&&H.data[i].licenseUrl){var o=setTimeout(function(){a(!(o=null))},1e4);"object"==typeof H.data[i].licenseUrl&&(H.data[i].licenseUrl=H.data[i].licenseUrl[systemLang]||H.data[i].licenseUrl.en),H.main.socket.emit("httpGet",H.data[i].licenseUrl,function(e,t,n){o&&(clearTimeout(o),o=null,!e&&n?(s.css({"z-index":200}),n=(n=n.toString().replace(/\r\n/g,"
    ")).replace(/\n/g,"
    "),s.find(".license_text").html(n),s.find(".license_agreement_name").text(_(" for %s",i)),s.modal({dismissible:!1,complete:function(){s.find(".license_text").html("")}}).modal("open"),s.find(".license_agree").off("click").on("click",function(e){a&&(a(!0),a=null),s.find(".license_agree").off("click"),s.find(".license_non_agree").off("click")}),s.find(".license_non_agree").off("click").on("click",function(e){a&&(a(!1),a=null),s.find(".license_agree").off("click"),s.find(".license_non_agree").off("click")})):(a&&a(!0),a=null))})}else a(!0)}(s,function(e){e&&H.main.cmdExec(null,"add "+s+" "+a+" --host "+i,function(e){e||H._postInit(!0)})}):H.main.cmdExec(null,"add "+s+" "+a+" --host "+i,function(e){e||H._postInit(!0)}))})})}),this.$tab.find('.adapter-delete-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var t=$(this).attr("data-adapter-name");H.main.confirmMessage(_("Are you sure you want to delete adapter %s?",t),_("Please confirm"),"help",function(e){e&&H.main.cmdExec(null,"del "+t,function(e){e||H._postInit(!0)})})}),this.$tab.find('.adapter-readme-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){H.main.navigate({tab:"adapters",dialog:"readme",params:$(this).data("adapter-name")})}),this.$tab.find('.adapter-update-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var e=$(this).attr("data-adapter-name");"admin"===e&&(H.main.waitForRestart=!0),H.main.cmdExec(null,"upgrade "+e,function(e){e||H._postInit(!0)})}),this.$tab.find('.adapter-upload-submit[data-adapter-name="'+r+'"]').off("click").on("click",function(){var e=$(this).attr("data-adapter-name");H.main.cmdExec(null,"upload "+e,function(e){e||H._postInit(!0)})});var e=this.$tab.find('.adapter-update-custom-submit[data-adapter-name="'+r+'"]');e.off("click").on("click",function(){var e=[];if(H.main.objects["system.adapter."+r].common.news){var t=H.main.objects["system.adapter."+r].common.news;for(var n in t)t.hasOwnProperty(n)&&e.push(n)}else e.push(H.main.objects["system.adapter."+r].common.version);for(var i='
    ',a=0;a'+e[a]+' - "}i+="
    ";var o=$("#adapters-menu");o.length||((o=$('")).appendTo($(".materialize-dialogs").first()),o.modal()),o.data("trigger",this),o.find("p").html(i),o.find("h4").html(_("Versions of %s",r)),o.find(".adapters-versions-link").off("click").on("click",function(){o.modal("close");var e=$(this).data("adapter-name"),t=$(this).data("version");t&&e&&H.main.cmdExec(null,"upgrade "+e+"@"+t,function(e){e||H._postInit(!0)})}),o.modal("open")}),H.main.objects["system.adapter."+r]||e.hide()},this.objectChange=function(e,t){if(e.match(/^system\.adapter\.[a-zA-Z0-9-_]+$/)){if(t)-1===this.list.indexOf(e)&&this.list.push(e);else{var n=this.list.indexOf(e);-1!==n&&this.list.splice(n,1)}void 0!==this.$grid&&this.$grid[0]._isInited&&this.init(!0)}},this.stateChange=function(e,t){if(e&&t){var n=e.match(/^system\.adapter\.([\w\d-]+)\.upload$/);if(n){var i=this.$tab.find('.adapter-upload-progress[data-adapter-name="'+n[1]+'"]'),a=W(t.val);i.html(a).css({opacity:t.val?.7:0}),this.$tab.find('.group-upload-progress[data-adapter-group="'+i.data("adapter-group")+'"]').html(a).css({opacity:t.val?.7:0})}}}}function Config(e){var t=this;this.$dialog=$("#dialog-config"),this.$configFrame=this.$dialog.find("#config-iframe"),this.main=e,this.prepare=function(){$iframeDialog=this},this.init=function(){if(!this.inited){this.inited=!0;var e=this.main.navigateGetParams(),t=e.split(".");this.main.objects[e]&&this.main.objects[e].common&&this.main.objects[e].common.materialize?this.$configFrame.attr("src","adapter/"+t[2]+"/index_m.html?"+t[3]):this.$configFrame.attr("src","adapter/"+t[2]+"/?"+t[3]);var n=e.replace(/^system\.adapter\./,"");this.$dialog.data("name",n),this.$dialog.find(".title").html(_("Adapter configuration")+": "+n)}},this.allStored=function(){return!window.frames["config-iframe"].changed},this.close=function(){t.main.navigate()},this.destroy=function(){if(this.inited&&(this.inited=!1,this.$configFrame.attr("src",""),void 0!==showConfig&&showConfig&&showConfig.length)){var e=showConfig.shift();setTimeout(function(){t.main.navigate({tab:"instances",dialog:"config",params:e})},1e3)}}}function Customs(C){var m,g,h,f,T,D,I,k,z,x,O,A,E="__different__",S=this;function Y(e){if(e)S.historyTimeout&&clearTimeout(S.historyTimeout);else if(S.historyTimeout)return;S.historyTimeout=setTimeout(function(){S.historyTimeout=null,O&&S.loadHistoryTable(O.data("id"),!0)},e||5e3)}function Q(t,n){$.ajax({headers:{Accept:"text/html"},cache:!0,url:"/adapter/"+t+"/custom_m.html",success:function(e){n(null,e)},error:function(e){$.ajax({headers:{Accept:"text/html"},cache:!0,url:"/adapter/"+t+"/custom.html",success:function(e){n(null,e)},error:function(e){n(e.responseText)}})}})}function P(e){e.stopPropagation(),e.preventDefault();var t=S.$dialog.find("#customs-tabs"),c=t.data("ids");S.currentCustoms=null;var l=_(E);if(t.find("input, select").each(function(){var e=$(this).data("instance"),t=$(this).data("field");if(t){var n;if("checkbox"===$(this).attr("type")){if(this.indeterminate)return;n=$(this).prop("checked")}else n=$(this).val();if(n!==l){null===n&&(n=""),void 0===n&&(n=""),"false"===n&&(n=!1),"true"===n&&(n=!0);var i=parseFloat(n);n.toString().replace(/^\+/,"").replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1")===i.toString()&&(n=i);for(var a=0;a
    '+_("Settings for %s",j)+' '+_("active")+'
    '+$('script[data-template-name="'+v+'"]').html()+"
    ",T=$(N);this.defaults[v]={},T.find("input, select").each(function(){var e=$(this);e.attr("data-instance",v+"."+w);var t=e.attr("data-field"),n=e.attr("data-default");"true"===n&&(n=!0),"false"===n&&(n=!1),void 0!==n&&n.toString().replace(/\+/,"")===parseFloat(n).toString()&&(n=parseFloat(n)),S.defaults[v][t]=n,"enabled"===t&&e.on("click",function(e){e.stopPropagation(),$(this).prop("checked")})}),s.append(T),customPostInits.hasOwnProperty(v)&&"function"==typeof customPostInits[v]&&customPostInits[v](T,r[v+"."+w],S.main.objects["system.adapter."+v+"."+w],i,a)}s.find("input, select").each(function(){var e,n=$(this),t=n.data("instance"),i=t.split(".")[0],a=n.data("field");void 0!==r[t][a]?"checkbox"===n.attr("type")?r[t][a]===E?n[0].indeterminate=!0:n.prop("checked",r[t][a]):r[t][a]===E?("number"===n.attr("type")&&n.attr("type","text"),"SELECT"===n.prop("tagName").toUpperCase()?(n.prepend('"),n.val(o)):n.val("").attr("placeholder",o)):n.val(r[t][a]):(S.defaults[i]&&void 0!==S.defaults[i][a]&&(e=S.defaults[i][a]),void 0!==e&&("checkbox"===n.attr("type")?n.prop("checked",e):n.val(e)));"checkbox"===n.attr("type")?n.on("change",function(){if(S.$dialog.find(".dialog-system-buttons .btn-save").removeClass("disabled"),"enabled"===$(this).data("field")){var e=n.data("instance"),t=s.find('.activated[data-adapter="'+e+'"]');$(this).prop("checked")?t.css("opacity",1):t.css("opacity",0)}}):n.on("change",function(){S.$dialog.find(".dialog-system-buttons .btn-save").removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")})}),this.showCustomsData(1'+_("Loading...")+"");var n={aggregate:"none",instance:O.val(),from:!0,ack:!0,q:!0};T||(T=this.$dialog.find("#tab-customs-table .datepicker.date-from"),D=this.$dialog.find("#tab-customs-table .datepicker.date-to"),I=this.$dialog.find("#tab-customs-table .timepicker.time-from"),k=this.$dialog.find("#tab-customs-table .timepicker.time-to"));var d,i=T.val()?M.Datepicker.getInstance(T).toString("yyyy.mm.dd"):"",a=I.val(),s=D.val()?M.Datepicker.getInstance(D).toString("yyyy.mm.dd"):"",o=k.val(),r=!0;if(s?(r=!1,(s=new Date(s)).setHours(23),s.setMinutes(59),s.setSeconds(59),s.setMilliseconds(999)):s=new Date,o){var c=o.split(":");s.setHours(c[0]),s.setMinutes(c[1]),s.setSeconds(59),s.setMilliseconds(999),r=!1}if(s=s.getTime(),r&&(s+=1e4),n.end=s,i||a){if(i=new Date(i||s),a){var u=a.split(":");i.setHours(u[0]),i.setMinutes(u[1])}else i.setHours(0),i.setMinutes(0);i.setSeconds(0),i.setMilliseconds(0),n.start=i.getTime()}else n.count=50;l&&(d=new Date(s).toISOString()+"_"+(n.start?new Date(n.start):n.count+"points")+"_"+e+"__"+n.instance+".csv"),C.socket.emit("getHistory",e,n,function(r,c){setTimeout(function(){var e,t,n,i="value;acknowledged;from;timestamp;lastchanged;\n";if(r)console.error(r),m.html(''+r+"");else{var a="";if(c&&c.length){for(var s=c.length-1;0<=s;s--){var o=(c[s].from||"").replace("system.adapter.","").replace("system.","");a+=' '+c[s].val+" "+c[s].ack+" "+o+" "+C.formatDate(c[s].ts)+" "+C.formatDate(c[s].lc)+"\n",l&&(i+=c[s].val+";"+c[s].ack+";"+(o||"")+";"+(c[s].ts?new Date(c[s].ts).toISOString():"")+";"+(c[s].lc?new Date(c[s].lc).toISOString():"")+";\n")}f=c[c.length-1].ts}else a=''+_("No data")+"";m.html(a)}!function e(){$.fn.colResizable&&(g.is(":visible")?(g.data("inited")||((h=new IobListHeader("grid-history-header",{list:g,colWidthOffset:1,prefix:"log-filter"})).add("text","val"),h.add("text","ack"),h.add("text","from"),h.add("text","ts"),h.add("text","lc")),g.colResizable({liveDrag:!0,partialRefresh:!0,marginLeft:5,postbackSafe:!0,onResize:function(e){return h.syncHeader()}}),h.syncHeader()):setTimeout(function(){e()},200))}(),l&&(e=d,t=i,(n=document.createElement("a")).setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n))},0)})},this.loadHistoryChart=function(e){if(z||(z=this.$dialog.find("#tab-customs-chart .datepicker.date-from"),x=this.$dialog.find("#tab-customs-chart .datepicker.date-to")),e){for(var t=0,n=!1,i=!1,a=0;a"+u[v]+"\n")}if(y){O.data("id",n[0]).html(y).show().off("change").on("change",function(){S.main.saveConfig("object-history-table",O.val()),S.loadHistoryTable($(this).data("id"))}).select(),A.data("id",n[0]).html(y).show().off("change").on("change",function(){S.main.saveConfig("object-history-chart",A.val()),S.loadHistoryChart($(this).data("id"))}).select(),void 0!==this.main.config["object-history-table"]&&O.val(this.main.config["object-history-table"]),void 0!==this.main.config["object-history-chart"]&&A.val(this.main.config["object-history-chart"]),p.data("id",n[0]).show().off("click").on("click",function(){S.$dialog.find("#grid-history-body").html(""),S.loadHistoryTable($(this).data("id"))}),M.data("id",n[0]).show().off("click").on("click",function(){S.loadHistoryChart($(this).data("id"))}),b.data("id",n[0]).show().off("click").on("click",function(){S.loadHistoryTable($(this).data("id"),!1,!0)});var j=new Date;j.setDate(j.getDate()-1);for(var L={today:_("Today"),clear:_("Clear"),done:_("Ok"),months:[_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December")],monthsShort:[_("Jan"),_("Feb"),_("Mar"),_("Apr"),_("May"),_("Jun"),_("Jul"),_("Aug"),_("Sep"),_("Oct"),_("Nov"),_("Dec")],weekdaysShort:[_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat")],weekdays:[_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday")],weekdaysAbbrev:["S","M","T","W","T","F","S"]},N=0;N\n
    \n',"state"===i&&"common"===n&&"type"===s?a+='":"string"==typeof t[s]?a+='\n':"number"==typeof t[s]?a+='\n':"boolean"==typeof t[s]?a+='\n":a+='\n";var o=s;"common"===n&&systemDictionary["common_"+s]&&systemDictionary["common_"+s][systemLang]&&(o=_("common_"+s)),"boolean"==typeof t[s]?a+=""+o+"\n":a+="\n",a+='
    \n\n',a+="\n"}c.$dialog.find(e).html(a)}function n(e,t){var n=c.$dialog.find(e);n.find(".object-tab-edit-string").each(function(){t[$(this).data("attr")]=$(this).val()}),n.find(".object-tab-edit-number").each(function(){t[$(this).data("attr")]=parseFloat($(this).val())}),n.find(".object-tab-edit-boolean").each(function(){t[$(this).data("attr")]=$(this).prop("checked")});var i=null;if(n.find(".object-tab-edit-object").each(function(){try{t[$(this).data("attr")]=JSON.parse($(this).val())}catch(e){return i=$(this).data("attr"),!1}}),void 0!==t.write&&("false"!==t.write&&"0"!==t.write&&0!==t.write||(t.write=!1),"true"!==t.write&&"1"!==t.write&&1!==t.write||(t.write=!0)),void 0!==t.read&&("false"!==t.read&&"0"!==t.read&&0!==t.read||(t.read=!1),"true"!==t.read&&"1"!==t.read&&1!==t.read||(t.read=!0)),null===t.min&&delete t.min,void 0!==t.min){var a=parseFloat(t.min);a.toString()===t.min.toString()&&(t.min=a),"false"===t.min&&(t.min=!1),"true"===t.min&&(t.min=!0)}if(null===t.max&&delete t.max,void 0!==t.max){var s=parseFloat(t.max);s.toString()===t.max.toString()&&(t.max=s),"false"===t.max&&(t.max=!1),"true"===t.max&&(t.max=!0)}if(null===t.def&&delete t.def,void 0!==t.def){var o=parseFloat(t.def);o.toString()===t.def.toString()&&(t.def=o),"false"===t.def&&(t.def=!1),"true"===t.def&&(t.def=!0)}if(-1!==e.indexOf("common"))for(var r in t)t.hasOwnProperty(r)&&("true"===t[r]&&(t[r]=!0),"false"===t[r]&&(t[r]=!1),parseFloat(t[r]).toString()===t[r]&&(t[r]=parseFloat(t[r])));return i}function s(e,t,n){"boolean"==typeof t&&(n=t,t=3e3),c.main.showToast(c.$dialog,e,null,t,n)}this.$dialog=$("#dialog-editobject"),this.$dialogNewField=$("#dialog-new-field"),this.main=e,this.prepared=!1,this.inited=!1,this.$dialogSave=this.$dialog.find(".dialog-editobject-buttons .btn-save"),this.iconVal=null,this._prepare=function(){this.prepared||(this.prepared=!0,this.$dialogSave.on("click",function(){c.save()}),this.$dialog.find(".dialog-editobject-buttons .btn-cancel").on("click",function(){c.editor.setValue(""),c.$dialogSave.addClass("disabled"),c.main.navigate()}),this.$dialog.find(".btn-add-common").on("click",function(){c.$dialogNewField.find(".object-tab-new-icon").show(),c.$dialogNewField.modal("open");var e=c.$dialogNewField.find(".object-tab-new-name");e.data("type","common").focus(),e.hasClass("autocomplete")||(e.addClass("autocomplete"),e.mautocomplete({data:{type:null,desc:null,min:null,max:null,def:null,role:null,unit:null,read:null,write:null,states:null},minLength:0})),e.focus()}),this.$dialog.find(".btn-add-native").on("click",function(){c.$dialogNewField.find(".object-tab-new-icon").hide(),c.$dialogNewField.modal("open");var e=c.$dialogNewField.find(".object-tab-new-name");e.hasClass("autocomplete")&&(e.mautocomplete("destroy"),e.removeClass("autocomplete")),M.updateTextFields("#dialog-new-field"),e.data("type","native").focus()}),this.$dialogNewField.find(".object-tab-new-name").keypress(function(e){13===e.which&&c.$dialogNewField.find(".btn-add").trigger("click")}),this.editor||(this.editor=ace.edit("view-object-raw"),this.editor.getSession().setMode("ace/mode/json"),this.editor.$blockScrolling=!0,this.editor.getSession().on("change",function(){c.$dialogSave.removeClass("disabled")})),this.$dialogNewField.modal(),this.$dialog.find(".tabs").mtabs({onShow:function(e){if(e){var t=$(e).attr("id");if("object-tab-common"===t)s(_("Drop the icons here"));else if("object-tab-raw"===t){var n=c.saveFromTabs();if(!n)return!1;c.editor.setValue(JSON.stringify(n,null,2))}else if("object-tab-raw"===t){var i;try{i=JSON.parse(c.editor.getValue())}catch(e){return c.main.showMessage(e,_("Parse error"),"error_outline"),c.main.noSelect||c.$dialog.find(".tabs").mtabs("select","object-tab-raw"),!1}c.load(i)}return c.main.saveConfig("object-edit-active",t),!0}}}),this.$dialogNewField.find(".btn-add").on("click",function(e){e.preventDefault(),e.stopPropagation();var t=c.$dialogNewField.find(".object-tab-new-name"),n=t.data("type")||"common",i=t.val().trim(),a=c.saveFromTabs();i&&-1===i.indexOf(" ")?void 0===a[n][i]?(a[n][i]="",c.load(a),c.$dialogNewField.find(".object-tab-new-name").val(""),c.$dialogNewField.modal("close"),c.$dialogSave.removeClass("disabled")):c.main.showError(_("Field %s yet exists!",i)):c.main.showError(_("Invalid field name: %s",i))}),this.$dialogNewField.find(".btn-cancel").on("click",function(e){c.$dialogNewField.find(".object-tab-new-name").val("")}),this.$dialog.find(".edit-object-name").on("change",function(){c.$dialogSave.removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")}),this.$dialog.find(".edit-object-type").on("change",function(){c.$dialogSave.removeClass("disabled")}),this.$dialog.find(".object-tab-rights input").on("change",function(){c.$dialogSave.removeClass("disabled")}),installFileUpload(this.$dialog.find("#object-tab-common"),5e4,function(e,t){if(e)s(e,!0);else{if(!t.match(/^data:image\//))return void s(_("Unsupported image format"),!0);c.$dialogSave.removeClass("disabled"),c.iconVal=t;var n=c.$dialog.find(".icon-editor");n.find(".icon").show().html(''),n.find(".icon .treetable-icon").attr("src",t)}}),this.$dialog.find(".icon-editor .icon-upload").off("click").on("click",function(){c.$dialog.find(".drop-file").trigger("click")}),this.$dialog.find(".icon-editor .icon-clear").off("click").on("click",function(){c.iconVal&&(c.iconVal=null,c.$dialog.find(".icon-editor").hide().appendTo(c.$dialog),c.$dialogSave.removeClass("disabled"))}))},this.init=function(){if(this._prepare(),!this.inited){this.inited=!0;var e=c.main.navigateGetParams(),t=!!(e||"").match(/,def$/);e=e.replace(/,def$/,"");var n=this.main.objects[e];if(n){void 0===this.main.config["object-edit-active"]||c.main.noSelect||this.$dialog.find(".tabs").mtabs("select",this.main.config["object-edit-active"]);for(var i,a="",s=0;s'+(i||this.main.tabs.users.list[s])+"";for(this.$dialog.find(".object-tab-acl-owner").html(a),a="",s=0;s'+(i||this.main.tabs.users.groups[s])+"";this.$dialog.find(".object-tab-acl-group").html(a),this.load(n),t?this.$dialog.data("cb",function(n){"state"===n.type&&c.main.socket.emit("getState",n._id,function(e,t){t&&null!==t.val&&void 0!==t.val||c.main.socket.emit("setState",n._id,void 0===n.common.def?null:n.common.def,!0)})}):this.$dialog.data("cb",null),c.$dialogSave.addClass("disabled")}}},this.destroy=function(){this.inited&&(this.inited=!1)},this.load=function(e){if(e){e.common=e.common||{},e.native=e.native||{},e.acl=e.acl||{},this.$dialog.find(".title-id").text(e._id),this.$dialog.find(".edit-object-name").val(e.common?translateName(e.common.name):e._id),this.$dialog.find(".edit-object-type").val(e.type),this.$dialog.find(".object-tab-acl-owner").val(e.acl.owner||"system.user.admin"),this.$dialog.find(".object-tab-acl-group").val(e.acl.ownerGroup||"system.group.administrator"),this.$dialog.find(".icon-editor").hide().appendTo(this.$dialog),a(".object-tab-common-table",e.common||{},"common",e.type),a(".object-tab-native-table",e.native||{},"native",e.type),void 0!==e.common.icon?(this.iconVal=e.common.icon,this.$dialog.find(".object-tab-common-table").prepend(this.$dialog.find(".icon-editor").show()),this.$dialog.find(".icon-editor .icon").html(c.main.getIconFromObj(e))):this.iconVal=null,this.$dialog.find(".object-tab-field-delete").on("click",function(){var n=$(this).data("part"),i=$(this).data("attr");c.main.confirmMessage(_("Delete attribute"),_("Please confirm"),"error_outline",function(e){if(e){var t=c.saveFromTabs();delete t[n][i],c.load(t)}})}),e.acl=e.acl||{},void 0===e.acl.object&&(e.acl.object=1638),this.$dialog.find("#object-tab-acl-obj-owner-read").prop("checked",1024&e.acl.object),this.$dialog.find("#object-tab-acl-obj-owner-write").prop("checked",512&e.acl.object),this.$dialog.find("#object-tab-acl-obj-group-read").prop("checked",64&e.acl.object),this.$dialog.find("#object-tab-acl-obj-group-write").prop("checked",32&e.acl.object),this.$dialog.find("#object-tab-acl-obj-every-read").prop("checked",4&e.acl.object),this.$dialog.find("#object-tab-acl-obj-every-write").prop("checked",2&e.acl.object),"state"!==e.type?this.$dialog.find(".object-tab-acl-state").hide():(this.$dialog.find(".object-tab-acl-state").show(),void 0===e.acl.state&&(e.acl.state=1638),this.$dialog.find("#object-tab-acl-state-owner-read").prop("checked",1024&e.acl.state),this.$dialog.find("#object-tab-acl-state-owner-write").prop("checked",512&e.acl.state),this.$dialog.find("#object-tab-acl-state-group-read").prop("checked",64&e.acl.state),this.$dialog.find("#object-tab-acl-state-group-write").prop("checked",32&e.acl.state),this.$dialog.find("#object-tab-acl-state-every-read").prop("checked",4&e.acl.state),this.$dialog.find("#object-tab-acl-state-every-write").prop("checked",2&e.acl.state));var t=JSON.parse(JSON.stringify(e));if(this.editor.setValue(JSON.stringify(t,null,2)),t._id&&delete t._id,t.common&&delete t.common,t.type&&delete t.type,t.native&&delete t.native,t.acl&&delete t.acl,this.$dialog.find("#view-object-rest").val(JSON.stringify(t,null," ")),this.$dialog.find("select").select(),this.$dialog.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),this.$dialog.find("input").on("change",function(){c.$dialogSave.removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")}),this.$dialog.find("select").on("change",function(){c.$dialogSave.removeClass("disabled")}),this.$dialog.find("textarea").on("change",function(){c.$dialogSave.removeClass("disabled")}).on("keyup",function(){$(this).trigger("change")}),void 0!==e.common.color){var n=Date.now(),i=this.$dialog.find('.object-tab-edit-string[data-attr="color"]').parent();i.prepend('color_lens'+_("Color")+""),i.colorpicker({component:".btn",color:i,container:!0}).colorpicker("setValue",e.common.color||"#fff").on("showPicker.colorpicker",function(){}).on("changeColor.colorpicker",function(e){100'+g.main.getIconFromObj(s[e][t])+p(s[e][t])+"");n&&(n+='
  • '),n+='
  • control_point'+_("custom group")+"
  • ",g.$gridEnum.find("#btn-new-group-"+i).html(n),g.$gridEnum.find('.btn-new-group-btn[data-target="btn-new-group-'+i+'"]').dropdown({constrainWidth:!1}),g.$gridEnum.find("#btn-new-group-"+i).find(".new-group-item").off("click").on("click",function(){var e=$(this).data("id"),t=$(this).data("enum");if(e){var n=t.replace(/[.#\\\/&?]+/g,"-");g.main.saveConfig("enums-active","enum-"+n),g.main.socket.emit("setObject",e,s[t][e],function(e){e&&g.main.showError(e)})}else v(null,t)})}else{for(t in a)a.hasOwnProperty(t)&&-1===g.list.indexOf(t)&&(n+='
  • '+g.main.getIconFromObj(a[t])+p(a[t])+"
  • ");n&&(n+='
  • '),n+='
  • control_point'+_("custom enum")+"
  • ",g.$gridEnum.find("#btn-new-enum").html(n),g.$gridEnum.find(".btn-new-enum-btn").dropdown({constrainWidth:!1}),g.$gridEnum.find(".new-enum-item").off("click").on("click",function(){var e=$(this).data("id");if(e){var t=e.replace(/[.#\\\/&?]+/g,"-");g.main.saveConfig("enums-active","enum-"+t),g.main.socket.emit("setObject",e,a[e],function(e){e&&g.main.showError(e)})}else v(null)})}}function p(e,t){var n;(n=t?e[t]:e)&&n.common&&n.common.name?n=translateName(n.common.name):n=(n=t.split(".").pop())[0].toUpperCase()+n.substring(1).toLowerCase();return n}function r(e,t,n){var i,a,s,o=g.main.objects[e],r=e.replace(/[.#\\\/&?]+/g,"-"),c='';c+='
      ';for(var l=0;l'+g.main.getIcon(g.list[l],null,null,"icon")+''+p(g.main.objects,g.list[l])+"

      "+g.list[l]+"


      ",d&&d.common&&d.common.members&&d.common.members.length)for(var m=0;m'+g.main.getIcon(i)+''+p(g.main.objects,i)+'close
    ');c+='edit',c+='delete',c+=""}c+="
    ",t.html(c),f(e),n&&t.find(".enum-collection").scrollTop(n),function(n){for(var e=g.$gridList.find('.enum-buttons[data-id="'+n+'"] .filter-input'),t={},i=0;i\n view_list\n note_add\n \n \n queue_play_next\n \n ');var t='
    ';t+='",t+="
    ";for(var a=0;a',t+="");var s={};e.find(".enum-collection").each(function(){s[$(this).data("id")]=$(this).scrollTop()});try{var o=g.$gridEnum.find(".tree-table-body .collection").find(".collection-item");try{o.droppable("instance")&&o.droppable("destroy")}catch(n){console.error(n)}}catch(n){}e.html(t),0tr.treetable-enum");e.droppable("instance")&&e.droppable("destroy")}catch(e){console.log(e)}g.$gridList.html("").removeClass("tree-table-tiles").addClass("tree-table-list"),g.$gridList.treeTable({objects:g.main.objects,root:"enum",columns:["title","name"],members:!0,colors:!0,icons:!0,widths:["calc(100% - 250px)","250px"],name:"enums",buttonsWidth:"40px",buttons:[{text:!1,icons:{primary:"ui-icon-trash"},click:function(t,e,n){g.main.objects[t]?"enum"===g.main.objects[t].type?e?g.main.confirmMessage(_("All sub-enums of %s will be deleted too?",t),null,"help",function(e){e&&g.main._delObjects(t,!0,function(e){e?b(_("Error: %s",e),!0):b(_("Deleted"))})}):g.main.confirmMessage(_("Are you sure to delete %s?",t),null,"help",function(e){e&&g.main._delObjects(t,!0,function(e){e?b(_("Error: %s",e),!0):b(_("Deleted"))})}):u(t,n):g.main.objects[n]&&"enum"===g.main.objects[n].type?u(t,n):b(_('Object "%s" does not exists. Update the page.',t))},width:26,height:20},{text:!1,icons:{primary:"ui-icon-pencil"},match:function(e){return g.main.objects[e]&&"enum"===g.main.objects[e].type},click:function(e,t,n){v(e)},width:26,height:20}],panelButtons:[{id:"tab-enums-btn-switch-tiles",title:_("change view mode"),icon:"view_module",click:function(){g.isTiles=!0,g.main.saveConfig("enumIsTiles",g.isTiles),setTimeout(function(){n()},50)}},{id:"tab-enums-list-new-enum",title:_("New enum"),icon:"note_add",click:function(){v(null)}},{id:"tab-enums-list-new-category",title:_("New category"),icon:"library_add",click:function(){v(null,g.enumEdit)}},{id:"tab-enums-list-edit",title:_("Edit"),icon:"edit",click:function(){w(!g.editMode)}}],onChange:function(e,t){if(e!==t){g.enumEdit=e;var n=g.main.objects[e];if(n&&"enum"===n.type)$("#tab-enums-list-new-enum").removeClass("disabled").attr("title",_("Create new enum, like %s","enum.newCategory")),2===e.split(".").length?g.$gridList.find("#tab-enums-list-new-category").removeClass("disabled").attr("title",_("Create new category, like %s",e+".newEnum")):g.$gridList.find("#tab-enums-list-new-category").addClass("disabled");else g.$gridList.find("#tab-enums-list-new-enum").addClass("disabled"),g.$gridList.find("#tab-enums-list-new-category").addClass("disabled")}},onReady:m}),g.$gridList.find(".tree-table-buttons a").addClass("btn-small"),g.$gridList.find("#tab-enums-list-new-enum").addClass("disabled"),g.$gridList.find("#tab-enums-list-new-category").addClass("disabled")}function l(t){if("enum"===g.main.objects[t].type){var e=function(e){for(var t=e.split("."),n=[],i=new RegExp("^"+e.replace(/\./g,"\\.")+"\\."),a=0;atr.treetable-enum").droppable({accept:".fancytree-type-draggable",over:function(e,t){if($(this).addClass("tab-accept-item"),$(this).hasClass("not-empty")&&!$(this).hasClass("expanded")){var n;$(this).data("tt-id");(n=$(this).data("timer"))&&clearTimeout(n),$(this).data("timer",setTimeout(function(){g.$gridList.treeTable("expand",$(this).data("tt-id"))},1e3))}},out:function(e,t){var n;$(this).removeClass("tab-accept-item"),(n=$(this).data("timer"))&&(clearTimeout(n),$(this).data("timer",null))},tolerance:"pointer",drop:function(e,t){$(this).removeClass("tab-accept-item"),i(t.draggable.data("id"),$(this).data("tt-id"))}}))}function y(e){if(g.editMode){var t=(e=e||g.$gridEnum.find(".tree-table-body .collection")).find(".collection-item");try{t.droppable("instance")&&t.droppable("destroy")}catch(e){console.error(e)}t.droppable({accept:".fancytree-type-draggable",over:function(e,t){$(this).addClass("tab-accept-item")},out:function(e,t){$(this).removeClass("tab-accept-item")},tolerance:"pointer",drop:function(e,t){$(this).removeClass("tab-accept-item"),i(t.draggable.data("id"),$(this).data("id"))}})}}function v(e,a){var i=!1,s=g.$gridEnum.find("#tab-enums-dialog-new"),o="",t="",n="",r="",c="",l="",d=!0;if(installFileUpload(s,5e4,function(e,t){if(e)b(e,!0);else{if(!t.match(/^data:image\//))return void b(_("Unsupported image format"),!0);s.find(".tab-enums-dialog-create").removeClass("disabled"),c=t,s.find(".tab-enums-dialog-new-icon").show().html(''),s.find(".tab-enums-dialog-new-icon img").attr("src",t),s.find(".tab-enums-dialog-new-icon-clear").show()}}),d=e?(g.main.objects[e]&&g.main.objects[e].common&&(t=translateName(g.main.objects[e].common.name),c=g.main.objects[e].common.icon,l=g.main.objects[e].common.color),n=o=e,s.find("#tab-enums-dialog-preserve-id").prop("checked",!0),!1):(s.find("#tab-enums-dialog-preserve-id").prop("checked",!1),!0),s.find(".tab-enums-dialog-new-title").text(_(a?"Create new category":n?"Rename":"Create new enum")),n){var u=n.split(".");u.length<=2&&(e=!0),n=u.pop(),a=u.join("."),r=n}s.find("#tab-enums-dialog-new-name").val(t).off("change").on("change",function(){var e=s.find("#tab-enums-dialog-new-id"),t=e.val(),n=$(this).val();n=n.replace(FORBIDDEN_CHARS,"_").replace(/\./g,"_").trim().toLowerCase(),!d||t&&i||(e.val(n),s.find("#tab-enums-dialog-new-preview").val((a||"enum")+"."+(n||"#")),M.updateTextFields("#tab-enums-dialog-new")),e.val()&&!e.val().match(/[.\s]/)?(s.find(".tab-enums-dialog-create").removeClass("disabled"),e.removeClass("wrong")):(s.find(".tab-enums-dialog-create").addClass("disabled"),e.addClass("wrong"))}).off("keyup").on("keyup",function(){$(this).trigger("change")}),s.find("#tab-enums-dialog-new-id").val(n).off("change").on("change",function(){if(!s.find("#tab-enums-dialog-preserve-id").prop("checked")){i=!0;var e=$(this).val();s.find("#tab-enums-dialog-new-preview").val((a||"enum")+"."+($(this).val()||"#")),M.updateTextFields("#tab-enums-dialog-new"),e&&!e.match(/[.\s]/)?(s.find(".tab-enums-dialog-create").removeClass("disabled"),$(this).removeClass("wrong")):(s.find(".tab-enums-dialog-create").addClass("disabled"),$(this).addClass("wrong"))}}).off("keyup").on("keyup",function(){$(this).trigger("change")}),s.find("#tab-enums-dialog-new-id").prop("disabled",!d),s.find(".tab-enums-dialog-create").addClass("disabled").off("click").text(_(o?"Change":"Create")).on("click",function(){var e,t,n,i;o?(s.find("#tab-enums-dialog-preserve-id").prop("checked")?(e="object"==typeof g.main.objects[o].common.name?g.main.objects[o].common.name:{en:o.split(".").pop()})[systemLang]=s.find("#tab-enums-dialog-new-name").val():e=s.find("#tab-enums-dialog-new-name").val(),h(o,a+"."+s.find("#tab-enums-dialog-new-id").val(),{name:e,icon:c,color:l},function(e){e?b(_("Error: %s",e),!0):b(_("Updated"))})):(t=(a||"enum")+"."+s.find("#tab-enums-dialog-new-id").val(),n={name:s.find("#tab-enums-dialog-new-name").val(),icon:c,color:l},i=function(e){e?b(_("Error: %s",e),!0,5e3):b(_("Updated"))},g.main.objects[t]?b(_("Name yet exists!"),!0):g.main.socket.emit("setObject",t,{_id:t,common:{name:n.name,members:[],icon:n.icon,color:n.color},type:"enum"},i))}),s.find("#tab-enums-dialog-new-preview").val((a||"enum")+"."+(n||"#")),c?(s.find(".tab-enums-dialog-new-icon").show().html(g.main.getIcon(o)),s.find(".tab-enums-dialog-new-icon-clear").show()):(s.find(".tab-enums-dialog-new-icon").hide(),s.find(".tab-enums-dialog-new-icon-clear").hide()),(l=l||!1)?s.find(".tab-enums-dialog-new-color").val(l):s.find(".tab-enums-dialog-new-color").val(),M.updateTextFields("#tab-enums-dialog-new"),g.main.showToast(s,_("Drop the icons here")),s.find(".tab-enums-dialog-new-upload").off("click").on("click",function(){s.find(".drop-file").trigger("click")}),s.find(".tab-enums-dialog-new-icon-clear").off("click").on("click",function(){c&&(c="",s.find(".tab-enums-dialog-new-icon").hide(),s.find(".tab-enums-dialog-create").removeClass("disabled"),s.find(".tab-enums-dialog-new-icon-clear").hide())}),s.find(".tab-enums-dialog-new-color-clear").off("click").on("click",function(){l&&(s.find(".tab-enums-dialog-create").removeClass("disabled"),s.find(".tab-enums-dialog-new-color-clear").hide(),s.find(".tab-enums-dialog-new-colorpicker").colorpicker({component:".btn",color:l,container:s.find(".tab-enums-dialog-new-colorpicker")}).colorpicker("setValue",""),l="")});var m=Date.now();try{s.find(".tab-enums-dialog-new-colorpicker").colorpicker("destroy")}catch(e){}s.find(".tab-enums-dialog-new-colorpicker").colorpicker({component:".btn",color:l,container:s.find(".tab-enums-dialog-new-colorpicker")}).colorpicker("setValue",l).on("showPicker.colorpicker",function(){var e=s.find(".modal-content");e[0].scrollTop=e[0].scrollHeight}).on("changeColor.colorpicker",function(e){100tr.treetable-enum");i.droppable("instance")&&i.droppable("destroy")}catch(e){console.error(e)}t.removeClass("red").addClass("blue"),g.$gridEnum.removeClass("tab-enums-edit")}}this.prepare=function(){this.isTiles=void 0===this.main.config.enumIsTiles||null===this.main.config.enumIsTiles||this.main.config.enumIsTiles},this._initObjectTree=function(){var e={objects:t.objects,noDialog:!0,draggable:["device","channel","state"],name:"enum-objects",expertModeRegEx:/^system\.|^yunkong2\.|^_|^[\w-]+$|^enum\.|^[\w-]+\.admin|^script\./,texts:{select:_("Select"),cancel:_("Cancel"),all:_("All"),id:_("ID"),ID:_("ID"),name:_("Name"),role:_("Role"),room:_("Room"),function:_("Function"),value:_("Value"),type:_("Type"),selectid:_("Select ID"),from:_("From"),lc:_("Last changed"),ts:_("Time stamp"),wait:_("Processing..."),ack:_("Acknowledged"),edit:_("Edit"),push:_("Trigger event"),ok:_("Ok"),with:_("With"),without:_("Without"),copyToClipboard:_("Copy to clipboard"),expertMode:_("Toggle expert mode"),refresh:_("Update"),sort:_("Sort alphabetically"),button:_("Settings"),noData:_("No data")},filter:{type:"state"},columns:["ID","name","type","role"]};o("init",e).selectId("show"),function(){var e=g.$gridEnum.find(".fancytree-container>tbody");try{e.sortable("instance")&&e.sortable("destroy")}catch(e){console.error(e)}g.$gridEnum.find(".fancytree-container>tbody").sortable({connectWith:"#tab-enums .tab-enums-list .tree-table-main.treetable",items:".fancytree-type-draggable",appendTo:g.$gridEnum,refreshPositions:!0,helper:function(e,t){return $('
    '+t.find(".fancytree-title").text()+"
    ")},zIndex:999990,revert:!1,scroll:!1,start:function(e,t){var n=t.item.prev();t.item.data("prev",n),g.$gridEnum.addClass("dragging")},stop:function(e,t){g.$gridEnum.removeClass("dragging")},update:function(e,t){var n=t.item.data("prev");n&&n.length?$(n).after(t.item):$(this).prepend(t.item)}}).disableSelection()}()},this._postInit=function(){void 0!==this.$gridList&&(this.main.objects["enum.rooms"]||(this.main.objects["enum.rooms"]={_id:"enum.rooms",common:{icon:"home",name:{en:"Rooms",cn:"场景"},desc:{en:"List of the rooms"},members:[],dontDelete:!0},type:"enum",acl:{owner:"system.user.admin",ownerGroup:"system.group.administrator",permissions:1911}},g.main.socket.emit("setObject","enum.rooms",this.main.objects["enum.rooms"]),this.list.unshift("enum.rooms")),this.main.objects["enum.functions"]||(this.main.objects["enum.functions"]={_id:"enum.functions",common:{icon:"lightbulb_outline",name:{en:"Functions",cn:"功能"},desc:{en:"List of the functions"},members:[],dontDelete:!0},type:"enum",acl:{owner:"system.user.admin",ownerGroup:"system.group.administrator",permissions:1911}},this.list.unshift("enum.functions"),g.main.socket.emit("setObject","enum.functions",this.main.objects["enum.functions"])),this.isTiles?n():c(),this.editMode?this._initObjectTree():o("destroy"))},this.init=function(e){this.inited&&!e||(this.main&&this.main.objectsLoaded?(this._postInit(),this.inited||(this.inited=!0,this.main.subscribeObjects("enum.*"))):setTimeout(function(){g.init(e)},250))},this.destroy=function(){this.inited&&(this.inited=!1,this.main.unsubscribeObjects("enum.*")),w(!1),this.$gridList.treeTable("destroy")},this.objectChange=function(e,t,n){if(e.match(/^enum\./)){if(t)-1===this.list.indexOf(e)&&this.list.push(e);else{var i=this.list.indexOf(e);-1!==i&&this.list.splice(i,1)}this.updateTimers&&clearTimeout(this.updateTimers),this.updateTimers=setTimeout(function(){g.updateTimers=null,g._postInit()},200)}this.$grid&&o("object",e,t,n)}}function Events(g){var h=this;this.main=g,this.$tab=$("#tab-events");var e,f,p,t,b,M="yunkong2.net"===location.hostname||"yunkong2.pro"===location.hostname,y={count:0,start:0,limit:500},n=null,v={list:[],mode:!1,counter:0,overflow:!1,$counterSpan:null},w={done:!1,timer:null};this.prepare=function(){t=this.$tab.find("#event-outer"),p=this.$tab.find("#event-table"),b=this.$tab.find("#event-pause"),e=this.$tab.find("#events-table-tr"),(f=new IobListHeader(e,{list:t,colWidthOffset:1,prefix:"event-filter"})).doFilter=i,f.add("combobox","type"),f.add("edit","id","ID"),f.add("edit","val","value"),f.add("combobox","ack","ack",[{val:"",name:"all"},{val:"true",name:"ack"},{val:"false",name:"not ack"}]),f.add("combobox","from","from"),f.add("text","ts"),f.add("text","lc"),Object.defineProperty(f,"getValues",{value:function(){f.ID.selectedVal=f.ID.selectedVal.toLocaleLowerCase(),"true"===f.ack.selectedVal&&(f.ack.selectedVal=!0),"false"===f.ack.selectedVal&&(f.ack.selectedVal=!1)},enumerateble:!1}),b.on("click",function(){h.pause()}),this.$tab.find("#event-clear").off("click").on("click",function(){y.count=0,y.start=0,h.$tab.find("#event-table").html("")})},this.init=function(){M?h.$tab.find("#grid-events").html(_("You can't see events via cloud")+'
    cloud_off').addClass("no-cloud-events"):f&&(this.inited||(!function e(){if(!$.fn.colResizable)return;t.is(":visible")?(t.colResizable({liveDrag:!0,partialRefresh:!0,marginLeft:5,postbackSafe:!0,onResize:function(e){return f.syncHeader()}}),f.syncHeader()):setTimeout(function(){e()},200)}(),this.inited=!0,this.main.subscribeObjects("*"),this.main.subscribeStates("*")))};var j=!(this.destroy=function(){this.inited&&(this.inited=!1,this.main.unsubscribeObjects("*"),this.main.unsubscribeStates("*"))});function L(){w.timer=null,$(window).trigger("resize.JColResizer")}function i(){n&&(clearTimeout(n),n=null),f.getValues&&f.getValues(),p&&p.find(".event-line").each(function(e){var t=!0,n=$(this);f.type.selectedVal&&!n.hasClass("event-type-"+f.type.selectedVal)?t=!1:f.from.selectedVal&&!n.hasClass("event-from-"+f.from.selectedVal)?t=!1:""===f.ack.selectedVal||n.hasClass("event-ack-"+f.ack.selectedVal)?f.ID.selectedVal&&-1===$(this).find("td.event-column-id").text().toLocaleLowerCase().indexOf(f.ID.selectedVal)?t=!1:""!==f.value.selectedVal&&-1===$(this).find("td.event-column-value").text().indexOf(f.value.selectedVal)&&(t=!1):t=!1,t?n.show():n.hide()})}this.add=function(e,t,n,i){if(!M){var a,s,o,r,c=i?"stateChange":n?"message":"objChange",l="";if(f&&(f.getValues&&f.getValues(),f.type.checkAddOption(c)),w.done||(w.timer||(w.timer=setTimeout(L,1e3)),20=h.limit){y.start++;var d=document.getElementById("event_"+y.start);d&&(d.outerHTML="")}else y.count++;n||i?i&&(t?(t.from=t.from||"",t.from=t.from.replace("system.adapter.",""),t.from=t.from.replace("system.",""),f&&f.from.checkAddOption(t.from,function(e){return{val:e.replace(/\./g,"-"),name:e}}),l=t.from,void 0!==(a=JSON.stringify(t.val))&&30'+a.substring(0,30)+"..."),s=t.ack?"true":"false",o=g.formatDate(t.ts),r=g.formatDate(t.lc)):(a="deleted",o=g.formatDate(new Date))):o=t?(void 0!==(a=JSON.stringify(t,"\n",2))&&30'+a.substring(0,30)+"..."),g.formatDate(t.ts)):(a="deleted",g.formatDate(new Date));var u=!0;f&&(f.type.selectedVal&&f.type.selectedVal!==c?u=!1:f.ID.selectedVal&&-1===e.toLocaleLowerCase().indexOf(f.ID.selectedVal)?u=!1:""!==f.value.selectedVal&&null!=a&&-1===a.indexOf(f.value.selectedVal)?u=!1:""!==f.ack.selectedVal&&f.ack.selectedVal!==s?u=!1:f.from.selectedVal&&f.from.selectedVal!==l&&(u=!1));var m='';m+=""+c+"",m+=''+e+"",isNaN(a)?m+=''+(a||"")+"":m+=''+(a||"")+"",m+=""+(s||"")+"",m+=""+(l||"")+"",m+=""+(o||"")+"",m+=""+(r||"")+"",m+="",v.mode?(v.list.push(m),v.counter++,v.counter>y.limit&&(v.overflow||(b.addClass("red lighten3").attr("title",_("Message buffer overflow. Losing oldest")),v.overflow=!0),v.list.shift()),v.$counterSpan.html(v.counter)):p&&(p.prepend(m),j||"#tab-events"!==window.location.hash&&"#events"!==window.location.hash||(f&&f.syncHeader(),j=!0))}},this.pause=function(){if(v.mode){v.mode=!1;for(var e=0;epause')}else b.addClass("yellow btn-pause-button-active"),v.$counterSpan=b,v.$counterSpan.html("0"),v.counter=0,v.mode=!0}}function fileHandler(e){e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files[0]:e.target.files[0],n=$(this).find(".drop-zone"),i=$(this).data("drop-zone-cb"),a=$(this).data("limit");if(t.size>(a||1e4))return i&&i(_("File is too big!")),n.hide(),!1;n.show();var s=new FileReader;s.onload=function(e){n.hide(),i&&i(null,e.target.result)},s.readAsDataURL(t)}function installFileUpload(e,t,n){if(void 0!==window.FileReader&&!e.data("installed")){e.data("installed",!0),e.prepend('');var i=e.find(".drop-zone");e[0].ondragover=function(){return i.off("click"),i.show(),!1},i[0].ondragleave=function(){return i.hide(),!1},i[0].ondrop=fileHandler.bind(e[0])}e.data("drop-zone-cb",n),e.data("limit",t),e.find(".drop-file").on("change",fileHandler.bind(e[0]))}function Hosts(s){var r=this;function n(e){var t=$("#dialog-host-update");if(e){var n=e.path,i=(n=n.replace(/\\/g,"/")).split("/");i.pop(),i.pop(),"linux"===e.platform||"darwin"===e.platform||"freebsd"===e.platform||"lin"===e.platform?t.find("#dialog-host-update-instructions").val("cd "+i.join("/")+"\nsudo yunkong2 stop\nsudo yunkong2 update\nsudo yunkong2 upgrade self\nsudo yunkong2 start"):t.find("#dialog-host-update-instructions").val("cd "+i.join("\\")+"\nyunkong2 stop\nyunkong2 update\nyunkong2 upgrade self\nyunkong2 start")}else t.find("#dialog-host-update-instructions").val("cd /opt/yunkong2\nsudo yunkong2 stop\nsudo yunkong2 update\nsudo yunkong2 upgrade self\nsudo yunkong2 start");t.data("inited")||(t.data("inited",!0),t.modal()),t.modal("open")}function i(e){if(e=(e||"").toLowerCase().trim()){var t=!1;r.$tab.find(".hosts-host").each(function(){-1!==$(this).data("host-filter").toLowerCase().indexOf(e)?($(this).show(),t=!0):$(this).hide()}),t?r.$tab.find(".hosts-host-filtered-out").hide():r.$tab.find(".hosts-host-filtered-out").show()}else r.$tab.find(".hosts-host").show(),r.$tab.find(".hosts-host-filtered-out").hide()}function a(e){var t=r.main.objects[r.list[e].id],n=r.main.states[t._id+".alive"]&&r.main.states[t._id+".alive"].val&&"null"!==r.main.states[t._id+".alive"].val;t.common=t.common||{},t.native=t.native||{};var i='';i+='
    ',i+=''+r.main.getHostIcon(t)+"",i+=''+t.common.hostname+"",i+=''+t.common.type+"";var a=t.common.titleLang||t.common.title;return"object"==typeof a&&(a=a[systemLang]||a.en),i+=''+a+"",i+=''+(t.native.os?t.native.os.platform:_("unknown"))+"",i+='',i+=''+t.common.installedVersion+"",r.main.states[t._id+".inputCount"]?i+='⇥'+r.main.states[t._id+".inputCount"].val+' / ↦'+r.main.states[t._id+".outputCount"].val+"":i+=' / ',i+='',i+=""}function o(e){var t,n=r.main.objects[r.list[e].id],i=r.main.states[n._id+".alive"]&&r.main.states[n._id+".alive"].val&&"null"!==r.main.states[n._id+".alive"].val;n.common=n.common||{},n.native=n.native||{},n.common.color&&(t=r.main.invertColor(n.common.color));var a='
    '+r.main.getHostIcon(n," ")+'
    '+n.common.hostname+'
    • '+r.words.Type+': '+n.common.type+'
    • '+r.words.Title+': '+n.common.title+'
    • '+r.words.OS+': '+(n.native.os?n.native.os.platform:_("unknown"))+'
    • '+r.words.Available+':
    • '+r.words.Installed+': '+n.common.installedVersion+"
    • ";return r.main.states[n._id+".inputCount"]?a+='
    • '+r.words.Events+': ⇥'+r.main.states[n._id+".inputCount"].val+' / ↦'+r.main.states[n._id+".outputCount"].val+"
    • ":a+='
    • '+r.words.Events+': /
    • ',a+='
    edit autorenew',n.common.hostname!==r.main.currentHost&&(a+=' delete'),a+='
    '}this.main=s,this.list=[],this.$tab=$("#tab-hosts"),this.$grid=this.$tab.find("#hosts"),this.$table=this.$tab.find("#grid-hosts"),this.inited=!1,this.isTiles=!0,this.words={},this.prepare=function(){this.isTiles=void 0===this.main.config.hostsIsTiles||null===this.main.config.hostsIsTiles||this.main.config.hostsIsTiles,"ie"===this.main.browser&&this.main.browserVersion<=10&&(this.isTiles=!1,this.$tab.find(".btn-switch-tiles").hide()),this.$tab.find(".btn-reload").attr("title",_("Update")).on("click",function(){r.init(!0)}),this.$tab.find(".btn-switch-tiles").off("click").on("click",function(){r.isTiles=!r.isTiles,r.isTiles?$(this).find("i").text("view_list"):$(this).find("i").text("view_module"),r.main.saveConfig("hostsIsTiles",r.isTiles),setTimeout(function(){r._postInit()},50)}),this.isTiles?this.$tab.find(".btn-switch-tiles").find("i").text("view_list"):this.$tab.find(".btn-switch-tiles").find("i").text("view_module"),this.$tab.find(".filter-clear").on("click",function(){r.$tab.find(".filter-input").val("").trigger("change")});var e=this.$tab.find(".filter-input");e.on("change",function(){var e=$(this).val();e?($(this).addClass("input-not-empty"),r.$tab.find(".filter-clear").show()):(r.$tab.find(".filter-clear").hide(),$(this).removeClass("input-not-empty")),r.main.saveConfig("hostsFilter",e),i(e)}).on("keyup",function(){r.filterTimeout&&clearTimeout(r.filterTimeout),r.filterTimeout=setTimeout(function(){r.$tab.find(".filter-input").trigger("change")},300)}),this.main.config.hostsFilter&&"{"!==this.main.config.hostsFilter[0]?(e.val(r.main.config.hostsFilter).addClass("input-not-empty"),this.$tab.find(".filter-clear").show()):this.$tab.find(".filter-clear").hide(),this.words.Title=_("Title"),this.words.OS=_("OS"),this.words.Available=_("Available"),this.words.Installed=_("Installed"),this.words.Events=_("Events"),this.words.Title=_("Title"),r.words.Type=_("Type")},this.initButtons=function(e){var t=e?'[data-host-id="'+e+'"]':"";this.$tab.find(".host-update-submit"+t).off("click").on("click",function(){r.main.cmdExec($(this).attr("data-host-name"),"upgrade self",function(e){e||r.init(!0)})}),this.$tab.find(".host-restart-submit"+t).off("click").on("click",function(){r.main.waitForRestart=!0,r.main.cmdExec($(this).attr("data-host-name"),"_restart")}),this.$tab.find(".host-delete"+t).off("click").on("click",function(){r.main.cmdExec(r.main.currentHost,"host remove "+$(this).attr("data-host-name"))}),this.$tab.find(".host-edit"+t).off("click").on("click",function(){!function(t){var n=$("#tab-host-dialog-edit"),e="",i="",a="";installFileUpload(n,5e4,function(e,t){if(e)r.main.showToast(n,e);else{if(!t.match(/^data:image\//))return void r.main.showToast(n,_("Unsupported image format"));n.find(".tab-host-dialog-ok").removeClass("disabled"),i=t,n.find(".tab-host-dialog-edit-icon").show().html(''),n.find(".tab-host-dialog-edit-icon img").attr("src",t),n.find(".tab-host-dialog-edit-icon-clear").show()}}),r.main.objects[t]&&r.main.objects[t].common&&("object"==typeof(e=r.main.objects[t].common.title)&&(e=e[systemLang]||e.en),i=r.main.objects[t].common.icon,a=r.main.objects[t].common.color);n.find("#tab-host-dialog-edit-title").val(e).off("change").on("change",function(){n.find(".tab-host-dialog-ok").removeClass("disabled")}).off("keyup").on("keyup",function(){$(this).trigger("change")}),n.find(".tab-host-dialog-ok").addClass("disabled").off("click").on("click",function(){var e=JSON.parse(JSON.stringify(r.main.objects[t]));e.common.title=n.find("#tab-host-dialog-edit-title").val(),e.common.icon=i,e.common.color=a,JSON.stringify(e)!==JSON.stringify(r.main.objects[t])?r.main.socket.emit("setObject",e._id,e,function(e){r.main.showToast(n,_("Updated"))}):r.main.showToast(n,_("Nothing changed"))}),i?(n.find(".tab-host-dialog-edit-icon").show().html(r.main.getIcon(t)),n.find(".tab-host-dialog-edit-icon-clear").show()):(n.find(".tab-host-dialog-edit-icon").hide(),n.find(".tab-host-dialog-edit-icon-clear").hide());(a=a||!1)?n.find(".tab-host-dialog-edit-color").val(a):n.find(".tab-host-dialog-edit-color").val();M.updateTextFields("#tab-host-dialog-edit"),r.main.showToast(n,_("Drop the icons here")),n.find(".tab-host-dialog-edit-upload").off("click").on("click",function(){n.find(".drop-file").trigger("click")}),n.find(".tab-host-dialog-edit-icon-clear").off("click").on("click",function(){i&&(i="",n.find(".tab-host-dialog-edit-icon").hide(),n.find(".tab-host-dialog-ok").removeClass("disabled"),n.find(".tab-host-dialog-edit-icon-clear").hide())}),n.find(".tab-host-dialog-edit-color-clear").off("click").on("click",function(){a&&(n.find(".tab-host-dialog-ok").removeClass("disabled"),n.find(".tab-host-dialog-edit-color-clear").hide(),n.find(".tab-host-dialog-edit-colorpicker").colorpicker({component:".btn",color:a,container:n.find(".tab-host-dialog-edit-colorpicker")}).colorpicker("setValue",""),a="")});var s=Date.now();try{n.find(".tab-host-dialog-edit-colorpicker").colorpicker("destroy")}catch(e){}n.find(".tab-host-dialog-edit-colorpicker").colorpicker({component:".btn",color:a,container:n.find(".tab-host-dialog-edit-colorpicker")}).colorpicker("setValue",a).on("showPicker.colorpicker",function(){var e=n.find(".modal-content");e[0].scrollTop=e[0].scrollHeight}).on("changeColor.colorpicker",function(e){100'+e+"").appendTo('.admin-sidemenu-items[data-tab="tab-hosts"] a')}else $("#updates-for-hosts").remove()},this._postInit=function(){if(void 0!==r.$grid){this.isTiles?function(){for(var e="",t=0;t
    '+_("Filtered out")+"
    ")}():function(){for(var e="",t=0;t'+_("Filtered out")+"")}(),i(this.$tab.find(".filter-input").val());var s=setTimeout(function(){console.warn("Timeout for repository"),s=null,r.initButtons()},2e3),e=r.main.currentHost;if(!e)for(var t=0;t↦'+t.val+"")):e.match(/^system\.host\..+\.inputCount$/)&&(e=e.substring(0,e.length-11),this.$tab.find('.host-in[data-host-id="'+e+'"]').html('↦'+t.val+""))}}function Instances(i){var p=this;function b(e,t,n,i,a){if("protocol"===n&&(n="secure"),"ip"===e)i=i.replace("%"+e+"%",location.hostname);else if("instance"===e)i=i.replace("%"+e+"%",a);else if(t){n.match(/^native_/)&&(n=n.substring(7));var s=t.native[n];"bind"!==e||s&&"0.0.0.0"!==s||(s=location.hostname),i="secure"===n?i.replace("%"+e+"%",s?"https":"http"):-1===i.indexOf("%"+e+"%")?i.replace("%native_"+e+"%",s):i.replace("%"+e+"%",s)}else i="secure"===n?i.replace("%"+e+"%","http"):-1===i.indexOf("%"+e+"%")?i.replace("%native_"+e+"%",""):i.replace("%"+e+"%","");return i}function o(e,t,n){var i,a,s,o=e.match(/%(\w+)%/g);if(o){for(a=o.length-1;0<=a;a--)s=(i=(i=o[a]).replace(/%/g,"")).split("_"),i.match(/^native_/)?(e=b(i,p.main.objects["system.adapter."+t+"."+n],i,e,n),o.splice(a,1)):1===s.length?(e=b(i,p.main.objects["system.adapter."+t+"."+n],s[0],e,n),o.splice(a,1)):s[0].match(/\.[0-9]+$/)&&(e=b(i,p.main.objects["system.adapter."+s[0]],s[1],e,n),o.splice(a,1));var r,c,l={},d=s[0];for(a=0;a',r+=''+_("Connected to host: ")+'',p.main.states[e+".connected"]&&p.main.states[e+".connected"].val?r+=''+_("true")+"":r+=_("false"),r+='',r+=''+_("Heartbeat: ")+'',p.main.states[e+".alive"]&&p.main.states[e+".alive"].val?r+=''+_("true")+"":r+=_("false"),r+="",p.main.states[n+"."+i+".info.connection"]||p.main.objects[n+"."+i+".info.connection"])r+=''+_("Connected to %s: ",n)+"",r+=(c=!!p.main.states[n+"."+i+".info.connection"]&&p.main.states[n+"."+i+".info.connection"].val)?!0===c?''+_("true")+"":''+c+"":_("false"),r+="";r+=""}else{var c;if(r='',r+='",p.main.states[n+"."+i+".info.connection"]||p.main.objects[n+"."+i+".info.connection"])r+='";r+="
    '+_("Connected to host: ")+'',p.main.states[e+".connected"]&&p.main.states[e+".connected"].val?r+=''+_("true")+"":(r+="daemon"===s.mode?''+_("false")+"":_("false"),o="daemon"===s.mode?"red":"blue"),r+='
    '+_("Heartbeat: ")+'',p.main.states[e+".alive"]&&p.main.states[e+".alive"].val?r+=''+_("true")+"":(r+="daemon"===s.mode?''+_("false")+"":_("false"),o="daemon"===s.mode?"red":"blue"),r+="
    '+_("Connected to %s: ",n)+"",(c=!!p.main.states[n+"."+i+".info.connection"]&&p.main.states[n+"."+i+".info.connection"].val)?r+=!0===c?''+_("true")+"":''+c+"":(o="red"===o?"red":"orange",r+=''+_("false")+""),r+="
    "}o="blue"===o?"":o,a.removeClass("led-red led-green led-orange led-blue").addClass("led-"+o).data("title",r),a.data("inited")||"gray"===o||(a.data("inited",!0),a.hover(function(){var e='
    '+$(this).data("title")+"
    ",t=$(e);t.insertAfter($(this)),$(this).data("big",t[0]);var n=parseFloat(t.height()),i=Math.round($(this).position().top-(n-parseFloat($(this).height()))/2);n+i>(window.innerHeight||document.documentElement.clientHeight)&&(i=(window.innerHeight||document.documentElement.clientHeight)-n),i<0&&(i=0),t.css({top:i}).on("click",function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)})},function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)}).on("click",function(){$(this).trigger("hover")}))}function r(){for(var e=p.main.states["system.host."+p.main.currentHost+".memRss"],t=1,n=e?e.val:0,i=0;i'+n+"");var r=_("%s processes",t),c=p.$tab.find("#running_processes");r!==c.text()&&c.html(''+r+"")}function c(){p.main.states["system.host."+p.main.currentHost+".memAvailable"]?p.memState="memAvailable":p.main.states["system.host."+p.main.currentHost+".freemem"]&&(p.memState="freemem");var e=p.main.states["system.host."+p.main.currentHost+"."+p.memState];if(e){p.totalmem=p.totalmem||p.main.objects["system.host."+p.main.currentHost].native.hardware.totalmem/1048576;var t=Math.round(e.val/p.totalmem*100),n=p.$tab.find("#freeMem"),i=tdp(e.val);i!==n.text()&&(n.html(''+i+""),p.$tab.find("#freeMemPercent").html(''+t+"%"))}else p.$tab.find(".free-mem-label").hide()}function l(){var e=p.main.states["system.host."+p.main.currentHost+".diskSize"],t=p.main.states["system.host."+p.main.currentHost+".diskFree"],n=p.main.states["system.host."+p.main.currentHost+".diskWarning"];if(t&&t.val&&e&&e.val){n=n?parseFloat(n.val):5;var i=p.$tab.find("#diskFree"),a=Math.round(t.val/e.val*1e3)/10;i.html(''+a+""),i.parent().attr("title",_("Size: %s, Free: %s",p.main.formatBytes(1024*e.val*1024),p.main.formatBytes(1024*t.val*1024)))}else p.$tab.find(".tab-instances-info-disk").hide()}function M(e){var t,n=p.main.objects[e]&&p.main.objects[e].common||{};return t=n.enabled&&"daemon"===n.mode&&p.main.states[e+".memRss"]?(t=p.main.states[e+".memRss"].val,t=parseFloat(t)||0,n.memoryLimitMB&&n.memoryLimitMB<=t?''+t.toFixed(1)+" MB":t.toFixed(1)+" MB"):""}function d(e,t,n,i){var a,s=p.main.objects[t]&&p.main.objects[t].common||{},o=t.split("."),r=o[2],c=o[3];if("tile"===n)a=i?"":'
    ',a+=i?"":"
    ";else{a=i?"":'';var l=s.localLinks||s.localLink||"",d=l?p.replaceInLink(l,r,c):"";l&&(l="object"==typeof d?'':''),a+='
    ',a+=""+(s.icon?l+'':"")+(l?"
    ":"")+"",a+=''+r+"."+c+"";var u=s.onlyWWW||s.enabled;a+='',a+=''+(d?'':"")+"";var m=s.titleLang||s.title;if("object"==typeof m&&(m=m[systemLang]||m.en),a+=''+(m||"")+"",1'+(s.host||"")+""}a+=''+("schedule"===s.mode&&s.schedule||"")+"",p.main.config.expertMode&&(a+=''+(s.restartSchedule||"")+"",a+=''+(s.loglevel||"")+"",a+=''+(s.memoryLimitMB||"")+"",u&&p.main.states[t+".inputCount"]&&p.main.states[t+".outputCount"]?a+='⇥'+p.main.states[t+".inputCount"].val+' / ↦'+p.main.states[t+".outputCount"].val+"":a+=' / '),a+=''+M(t)+"",a+=i?"":""}i?p.$tab.find('.instance-adapter[data-instance-id="'+t+'"]').html(a):e.append(a),p.initButtons(t,d),f(t),p.$tab.find('.instance-editable[data-instance-id="'+t+'"]').on("click",y).addClass("select-id-quick-edit"),p.$tab.find('.instance-schedule[data-instance-id="'+t+'"]').each(function(){$(this).find("button").length||($(this).append(''),$(this).find("button").on("click",function(){var n=$(this).data("name"),i=$(this).data("instance-id");!function(e,t){e=(e||"").replace(/"/g,"").replace(/'/g,"");try{setupCron(e,t)}catch(e){alert(_("Cannot parse value as cron"))}}(p.main.objects[i].common[n]||"",function(e){if(null!==e){var t={common:{}};t.common[n]=e,p.main.socket.emit("extendObject",i,t,function(e){e&&p.main.showError(e)})}})}))}),p.$tab.find('.instance-name[data-instance-id="'+t+'"]').on("click",function(){var e=p.$tab.find('.instance-settings[data-instance-id="'+$(this).data("instance-id")+'"]');e.hasClass("small-button-empty")||e.trigger("click")}).css("cursor","pointer")}function u(e){void 0===e&&(e=p.$tab.find(".instances-filter").val());var t=[];if(e)for(var n=new RegExp(e),i=0;i';for(var u=0;u'+(m[1]||m[0])+""}c+=""}c=c||'';var g=null;t.html(c+'
    ');var h=n?t.find("select"):t.find("input");t.find(".select-id-quick-edit-cancel").off("click").on("click",function(e){g&&clearTimeout(g),g=null,e.preventDefault(),e.stopPropagation(),t.html(o).off("click").on("click",y).addClass("select-id-quick-edit").css("text-align",r)}),t.find(".select-id-quick-edit-ok").off("click").on("click",function(){t.trigger("blur")}),h.val(s),h.blur(function(){g&&clearTimeout(g),g=setTimeout(function(){g=null;var n=$(this).val();s=JSON.stringify(n)!==JSON.stringify(s)?(p.main.socket.emit("getObject",i,function(e,t){t?(t.common=t.common||{},t.common[a]=n,"title"===a&&t.common.titleLang&&delete t.common.titleLang,p.main.socket.emit("setObject",t._id,t,function(e){e&&p.main.showError(e)})):console.log("Object "+i+" does not exist: "+e)}),''+s+""):o,t.html(s).off("click").on("click",y).addClass("select-id-quick-edit").css("text-align",r)}.bind(this),100)}).on("keyup",function(e){13===e.which&&$(this).trigger("blur"),27===e.which&&(void 0===s&&(s=""),t.html(s).off("click").on("click",y).addClass("select-id-quick-edit").css("text-align",r))}),"object"==typeof e&&(e.preventDefault(),e.stopPropagation()),setTimeout(function(){h.focus()},100)}this.$tab=$("#tab-instances"),this.$grid=$("#grid-instances"),this.$gridHead=$("#grid-instances-head"),this.inited=!1,this.main=i,this.list=[],this.hostsText=null,this.filterHost=!1,this.memState="memAvailable",window.tdp||(window.tdp=function(e,t){return isNaN(e)?"":e.toFixed(t||0).replace(".",",").replace(/\B(?=(\d{3})+(?!\d))/g,".")}),this.replaceInLink=function(e,t,n){if("object"!=typeof e)return o(e,t,n);var i,a=JSON.parse(JSON.stringify(e));for(var s in a)a.hasOwnProperty(s)&&(a[s]=o(a[s],t,n),i||(i=a[s]));return a.__first=i,a},this.prepare=function(){var e=p.$tab.find(".instances-filter"),t=p.$tab.find(".instances-filter-clear");e.on("change",function(){var e=$(this).val();e?($(this).addClass("input-not-empty"),t.show()):($(this).removeClass("input-not-empty"),t.hide()),p.main.saveConfig("instancesFilter",e),u(e)}).on("keyup",function(){p.filterTimeout&&clearTimeout(p.filterTimeout),p.filterTimeout=setTimeout(function(){e.trigger("change")},300)}),p.main.config.instancesFilter&&"{"!==p.main.config.instancesFilter[0]?(e.addClass("input-not-empty").val(p.main.config.instancesFilter),t.show()):t.hide(),p.$tab.find(".btn-instances-expert-mode").on("click",function(){p.main.config.expertMode=!p.main.config.expertMode,p.main.saveConfig("expertMode",p.main.config.expertMode),p.updateExpertMode(),p.main.tabs.adapters.updateExpertMode()}),p.main.config.expertMode&&p.$tab.find(".btn-instances-expert-mode").addClass("red lighten-3"),p.$tab.find(".btn-instances-reload").on("click",function(){p.init(!0,!0)}),t.on("click",function(){e.val("").trigger("change")}),this.$tab.find(".btn-instances-host").off("click").on("click",function(){p.filterHost=!p.filterHost,p.filterHost?p.$tab.find(".btn-instances-host").addClass("red lighten-3"):p.$tab.find(".btn-instances-host").removeClass("red lighten-3"),p.main.saveConfig("instancesFilterHost",p.filterHost),setTimeout(function(){u()},50)}),this.filterHost=this.main.config.instancesFilterHost||!1,this.filterHost?this.$tab.find(".btn-instances-host").addClass("red lighten-3"):this.$tab.find(".btn-instances-host").removeClass("red lighten-3")},this.updateExpertMode=function(){p.init(!0),p.main.config.expertMode?p.$tab.find(".btn-instances-expert-mode").addClass("red lighten-3"):p.$tab.find(".btn-instances-expert-mode").removeClass("red lighten-3")},this.replaceLink=function(n,i,a,s){var o;(n=n.replace(/%/g,"")).match(/^native_/)&&(n=n.substring(7)),-1===n.indexOf("_")?o=[i+"."+a,n]:(o=n.split("_"))[0].match(/\.[0-9]+$/)||(o[0]+=".0"),"protocol"===o[1]&&(o[1]="secure"),"instance"!==n?this.main.socket.emit("getObject","system.adapter."+o[0],function(e,t){t&&setTimeout(function(){var e;(e=s?p.$tab.find("#"+s).data("src"):p.$tab.find("#a_"+i+"_"+a).attr("href"))&&(e="secure"===o[1]?e.replace("%"+n+"%",t.native[o[1]]?"https":"http"):-1===e.indexOf("%"+n+"%")?e.replace("%native_"+n+"%",t.native[o[1]]):e.replace("%"+n+"%",t.native[o[1]]),s?p.$tab.find("#"+s).data("src",e):p.$tab.find("#a_"+i+"_"+a).attr("href",e))},0)}):setTimeout(function(){var e;e=(e=s?p.$tab.find("#"+s).data("src"):p.$tab.find("#a_"+i+"_"+a).attr("href")).replace("%instance%",a),s?p.$tab.find("#"+s).data("src",e):p.$tab.find("#a_"+i+"_"+a).attr("href",e)},0)},this._replaceLink=function(n,i,a,s,o){var r;(i=i.replace(/%/g,"")).match(/^native_/)&&(i=i.substring(7)),-1===i.indexOf("_")?r=[a+"."+s,i]:(r=i.split("_"))[0].match(/\.[0-9]+$/)||(r[0]+=".0"),"protocol"===r[1]&&(r[1]="secure"),this.main.socket.emit("getObject","system.adapter."+r[0],function(e,t){n=t&&n?"secure"===r[1]?n.replace("%"+i+"%",t.native[r[1]]?"https":"http"):-1===n.indexOf("%"+i+"%")?n.replace("%native_"+i+"%",t.native[r[1]]):n.replace("%"+i+"%",t.native[r[1]]):(console.log("Cannot get link "+r[1]),n.replace("%"+i+"%","")),setTimeout(function(){o(n,a,s)},0)})},this._replaceLinks=function(e,t,n,i,a){if(!e)return a(e,t,n,i);var s=e.match(/%(\w+)%/g);return s?"%ip%"===s[0]?(e=e.replace("%ip%",location.hostname),void this._replaceLinks(e,t,n,i,a)):"%instance%"===s[0]?(e=e.replace("%instance%",n),void this._replaceLinks(e,t,n,i,a)):void this._replaceLink(e,s[0],t,n,function(e,t,n){this._replaceLinks(e,t,n,i,a)}.bind(this)):a(e,t,n,i)},this._postInit=function(e,t){if(this.main.currentHost&&void 0!==this.$grid&&(!this.$grid.data("inited")||e)){this.$grid.data("inited",!0),this.list.sort();for(var n=[],i=this.list.length-1;0<=i;i--)this.main.objects[this.list[i]]&&this.main.objects[this.list[i]].common&&!this.main.objects[this.list[i]].common.localLink&&!this.main.objects[this.list[i]].common.localLinks&&this.main.objects[this.list[i]].common.noConfig&&(n.push(this.list[i]),this.list.splice(i,1));for(this.list.sort(),n.sort(),i=0;i",o+=''+_("instance")+"",o+='',o+='',o+=''+_("actions")+"",o+=''+_("title")+"",1'+_("host")+""),o+=''+_("schedule_group")+"",p.main.config.expertMode&&(o+=''+_("restart")+"",o+=''+_("loglevel")+"",o+=''+_("memlimit")+"",o+=''+_("events")+""),o+=''+_("RAM usage")+"",p.$gridHead.html(o),this.$grid.html("");for(var a=Date.now(),s=0;s'+_("Filtered out")+""),p.$tab.find("#currentHost").html(this.main.currentHost),1'+s+"")}else"outputCount"===i?p.$tab.find('.instance-out[data-instance-id="'+e+'"]').html('↦'+t.val+""):"inputCount"===i&&p.$tab.find('.instance-in[data-instance-id="'+e+'"]').html('⇥'+t.val+"");if(-1!==this.list.indexOf(e))return void("alive"!==i&&"connected"!==i||f(e));e="system.adapter."+n[0]+"."+n[1],-1!==this.list.indexOf(e)&&"connection"===i&&f(e)}}},this.objectChange=function(e,t,n){if(e.match(/^system\.adapter\.[-\w]+\.[0-9]+$/))if(t)-1===this.list.indexOf(e)?(this.list.push(e),this.updateTimer&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){p.updateTimer=null,p.init(!0)},200),t.common.noConfig||setTimeout(function(){-1===window.location.hash.indexOf("/config/")&&p.main.navigate({tab:"instances",dialog:"config",params:e})},2e3)):-1!==e.indexOf(".web.")?(this.updateTimer&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){p.updateTimer=null,p.init(!0)},200)):this.$grid.find('.instance-adapter[data-instance-id="'+e+'"]').html(d(this.$grid,e,this.main.config.instanceForm,!0));else{var i=this.list.indexOf(e);-1!==i&&(this.list.splice(i,1),this.$grid.find('.instance-adapter[data-instance-id="'+e+'"]').remove())}else e.match(/^system\.host\.[-\w]+$/)&&(this.updateTimer&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(function(){p.updateTimer=null,p.init(!0)},200))},this.initButtons=function(e,t){e=e?'[data-instance-id="'+e+'"]':"";var n=p.$grid.find(".instance-edit"+e).off("click").on("click",function(){p.onEdit($(this).attr("data-instance-id"))});n.find(".ui-button-icon-primary").length||n.attr("title",_("edit")),(n=p.$grid.find(".instance-settings"+e).off("click").on("click",function(){p.main.navigate({tab:"instances",dialog:"config",params:$(this).data("instance-id")})})).each(function(){var e=$(this).attr("data-instance-id");i.objects[e]&&i.objects[e].common&&i.objects[e].common.noConfig&&$(this).addClass("disabled")}),n=p.$grid.find(".instance-reload"+e).off("click").on("click",function(){p.main.socket.emit("extendObject",$(this).attr("data-instance-id"),{},function(e){e&&p.main.showError(e)})}),n=p.$grid.find(".instance-del"+e).off("click").on("click",function(){var t=$(this).attr("data-instance-id");if(p.main.objects[t]&&p.main.objects[t].common&&p.main.objects[t].common.host){var e=t.replace(/^system\.adapter\./,"");p.main.confirmMessage(_("Are you sure you want to delete the instance %s?",e),null,"help",function(e){e&&p.main.cmdExec(p.main.objects[t].common.host,"del "+t.replace("system.adapter.",""),function(e){e||p.main.tabs.adapters.init(!0)})})}}),n=p.$grid.find(".instance-issue"+e).off("click").on("click",function(){p.main.navigate({tab:"instances",dialog:"issue",params:$(this).data("instance-id")})}),p.$grid.find(".instance-image"+e).each(function(){$(this).data("installed")||($(this).data("installed",!0),$(this).hover(function(){var e='
    ',t=$(e);t.insertAfter($(this)),$(this).data("big",t[0]);var n=parseFloat(t.height()),i=Math.round($(this).position().top-(n-parseFloat($(this).height()))/2);n+i>(window.innerHeight||document.documentElement.clientHeight)&&(i=(window.innerHeight||document.documentElement.clientHeight)-n),i<0&&(i=0),t.css({top:i})},function(){var e=$(this).data("big");$(e).remove(),$(this).data("big",void 0)}))}),(n=p.$grid.find(".instance-stop-run"+e).off("click").on("click",function(){var e=$(this).attr("data-instance-id");$(this).addClass("disabled"),p.main.socket.emit("extendObject",e,{common:{enabled:!p.main.objects[e].common.enabled}},function(e){e&&p.main.showError(e)})})).find(".ui-button-icon-primary").length||n.each(function(){var e=$(this).attr("data-instance-id");p.main.objects[e].common.enabled?n.addClass("instance-running").attr("title",_("Activated. Click to stop.")).find("i").html("pause"):n.removeClass("instance-running").attr("title",_("Deactivated. Click to start.")).find("i").html("play_arrow")}),n=p.$grid.find(".instance-web"+e).off("click").on("click",function(){var e=$(this).data("link");if("object"==typeof e){var t="";for(var n in e)if(e.hasOwnProperty(n)&&"__first"!==n){var i=e[n].match(/^https?:\/\/[-.\w]+:(\d+)\/?/),a=e[n].match(/^https:\/\//);t+='"}t+='";var s=$("#instances-menu");s.data("inited")&&s.menu("destroy");var o=$(this).position();s.html(t),s.data("inited")||(s.data("inited",!0),s.mouseleave(function(){$(this).hide()})),s.menu().css({left:o.left,top:o.top}).show(),s.find(".instances-menu-link").off("click").on("click",function(){$(this).data("link")&&window.open($(this).data("link"),$(this).data("instance-id")),$("#instances-menu").hide()})}else window.open($(this).data("link"),$(this).data("instance-id"))}),"object"==typeof t&&n.data("link",t)},this.resize=function(e,t){}}function Intro(e){var T=this;function t(e){var t=Math.floor(e/86400);e%=86400;var n=Math.floor(e/3600);n<10&&(n="0"+n),e%=3600;var i=Math.floor(e/60);i<10&&(i="0"+i),e%=60,(e=Math.floor(e))<10&&(e="0"+e);var a="";return t&&(a+=t+" "+_("daysShortText")+" "),a+=n+":"+i+":"+e}this.$tab=$("#tab-intro"),this.$tiles=this.$tab.find(".tab-intro-cards"),this.main=e,this.inited=!1,this.$template=$("#intro-template");var d={Uptime:t,"System uptime":t,RAM:function(e){var t=Math.floor(e/1073741824*10)/10;e%=1073741824;var n=Math.floor(e/1048576*10)/10,i="";return i+=1");$(this).append(t),t.val($(this).data("clippy")),t.trigger("select"),document.execCommand("copy"),t.remove(),e.preventDefault(),e.stopPropagation(),T.main.showToast(T.$tiles,_("copied"))}function C(e){var t,c=T.$template.clone();if(c.removeAttr("id"),c.addClass("card-system-info"),c.find(".btn-small").addClass("disabled"),c.find(".card-titles").text(e.name),c.find(".btn-card-enabled").data("host",e.id),!1===T.main.systemConfig.common.intro[e.id]){if(!T.$tab.hasClass("edit-active"))return null;c.addClass("card-disabled").find(".btn-card-enabled").removeClass("blue").addClass("gray").find("i").text("close")}T.main.objects[e.id]&&T.main.objects[e.id].common&&(t=T.main.objects[e.id].common.icon),c.find(".card-image-img").attr("src",t||"img/no-image.png"),c.find(".card-content-text").html('
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ');var l=setTimeout(function(){l&&(l=null,c.find(".btn-small").addClass("disabled"),c.find(".card-content-text").html(_("offline")))},6e3);return d["Disk size"]=d["Disk size"]||T.main.formatBytes,d["Disk free"]=d["Disk size"]||T.main.formatBytes,T.main.socket.emit("sendToHost",e.id,"getHostInfo",null,function(e){clearTimeout(l),l=null,"permissionError"===e?console.error('May not read "getHostInfo"'):e?c.find(".btn-small").removeClass("disabled"):console.error('Cannot read "getHostInfo"');var t=T.main.states["system.host."+T.main.currentHost+".diskWarning"];t=t?parseFloat(t.val):5;var n=0"+_(a)+": ",i+=''+(d[a]?d[a](e[a]):e[a]||" --")+"");n&&(i+="
  • "+_("Disk free")+": ",i+=''+(d["Disk free"]?d["Disk free"](e["Disk free"]):e["Disk free"]||" --")+"
  • ",i+="
  • "+_("Disk size")+": ",i+=''+(d["Disk size"]?d["Disk size"](e["Disk size"]):e["Disk size"]||" --")+"
  • "),i+=""}i+="",c.find(".card-content-text").replaceWith($(i)),i='
    '+_("Info")+'
    content_copyclose';var s=[];if(e){for(var o in i+="
      ",e)if(e.hasOwnProperty(o)){i+="
    • "+_(o)+": ";var r=d[o]?d[o](e[o]):e[o];s.push(o+": "+r),i+="Disk free"===o&&n?''+r+"
    • ":''+r+""}i+="
    "}i+="
    ",c.find(".card-reveal").replaceWith($(i)),T.$tab.hasClass("edit-active")?c.find(".btn-small").hide():c.find(".btn-info").data("clippy",s.join("\r\n")).on("click",u)}),c}function D(e,t,n,i,a,s,o){var r=T.$template.clone();r.removeAttr("id");var c=a.replace(/^https?:\/\//,""),l=c.indexOf("/");if(-1!==l&&(c=c.substring(0,l)),"admin"===e&&c===location.host)return null;if("web"===e)return null;if("vis-web-admin"!==e&&e.match(/^vis-/))return null;if(e.match(/^icons-/))return null;if(i&&i.noIntro)return null;r.find(".btn-card-enabled").data("instance",e+"."+t+(n&&n.name?"."+n.name:"")).data("web",s),o?r.on("click",function(){T.$tab.hasClass("edit-active")||window.open($(this).find(".url").attr("href"))}):r.addClass("card-disabled").find(".btn-card-enabled").removeClass("blue").addClass("gray").find("i").text("close"),r.find(".url").attr("href","object"==typeof a?a._first:a||"").text(c+(s?" ("+s+")":"")),r.find(".card-image-img").attr("src",i.icon?"adapter/"+e+"/"+i.icon:"img/no-image.png"),n&&n.color&&r.find(".card-image").css("background",n.color);var d=n&&n.name||i.titleLang||i.title;"object"==typeof d&&(d=d[systemLang]||d.en),r.find(".card-titles").text(d||e);var u=i.desc;return"object"==typeof u&&(u=u[systemLang]||u.en),r.find(".card-content-text").text(u||""),r}function n(e,i){!function(e,t){var n,i,a,s=JSON.parse(JSON.stringify(e)),o=[];s.sort(function(e,t){return e=T.main.objects[e]&&T.main.objects[e].common,t=(t=T.main.objects[t]&&T.main.objects[t].common)||{},void 0===(e=e||{}).order&&void 0===t.order?e.name.toLowerCase()>t.name.toLowerCase()?1:e.name.toLowerCase()t.order?1:e.ordert.name.toLowerCase()?1:e.name.toLowerCase()\n \n');$.getJSON("https://api.github.com/repos/"+i[3]+"/"+i[4]+"/issues",function(e){var t=!1;for(var n in r.empty(),e)if(e.hasOwnProperty(n)){if("remove"===n)break;var i=e[n];if(!i.hasOwnProperty("pull_request")){t=!0;var a=$("#issueTable").children().clone(!0,!0);a.find(".collapsible-header-title").text(i.title),a.find(".goto").attr("href",i.html_url),a.find(".user").text(i.user.login),a.find(".form-row").html((new showdown.Converter).makeHtml(i.body).replace(/src="/g,'class="responsive-img" src="'));var s=new Date(new Date(i.created_at));if(a.find(".created").text(s.toLocaleDateString(systemLang,{weekday:"short",year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),0'+i.labels[o].name+"")}r.append(a),0}}t||r.append($('
  • '+_("No bug")+"

  • "))}).done(a.$dialogIssue.find(".collapsible").collapsible())}a.$dialogIssue.data("name",t),a.$dialogIssue.find(".title").html(_("Known bugs for")+": "+t),a.$dialogIssue.find(".dialog-system-buttons .btn-add").attr("href","https://github.com/"+i[3]+"/"+i[4]+"/issues/new"),a.$dialogIssue.find(".dialog-system-buttons .btn-cancel").off("click").on("click",function(e){e.stopPropagation(),e.preventDefault(),a.main.navigate()})}},this.destroy=function(){this.inited&&(this.$dialogIssue.find(".collapsible").collapsible("destroy"),this.inited=!1)}}function Logs(t){var c=this;this.main=t,this.$tab=$("#tab-logs");var s,l,o,d,r={count:0,start:0,limit:2e3},u={host:"",severity:"",message:""},m={list:[],mode:!1,counter:0,overflow:!1,$counterSpan:null};this.prepare=function(){l=this.$tab.find("#log-outer"),s=this.$tab.find("#log-table"),o=this.$tab.find("#log-pause"),(d=new IobListHeader("log-outer-header",{list:l,colWidthOffset:1,prefix:"log-filter"})).doFilter=c.filter,d.add("combobox","from","host"),d.add("text","Time"),d.add("combobox","","severity",[{val:"",name:"debug"},{val:"silly",name:"silly"},{val:"info",name:"info"},{val:"warn",name:"warn"},{val:"error",name:"error"}]).$filter.attr("title",_("severity")),d.add("edit","Message","message"),this.$tab.find("#log-clear-on-disk").on("click",function(){c.main.confirmMessage(_("Log file will be deleted. Are you sure?"),null,null,function(e){e&&c.main.socket.emit("sendToHost",t.currentHost,"delLogs",null,function(e){e?c.main.showError(e):c.clear()})})}).addClass("ui-state-error"),this.$tab.find("#log-refresh").on("click",function(){c.clear()}),o.attr("title",_("Pause output")).on("click",function(){c.pause()}),m.$counterSpan=o.find("ui-button-text"),this.$tab.find("#log-clear").on("click",function(){c.clear(!1)}),$("#log-copy-text").on("click",function(){$(this).hide().html("")}),this.$tab.find("#log-copy").on("click",function(){var e=''+_("copy note")+"";$("#log-copy-text").show().html(e+'
    '+s.html()+"
    ");for(var t=c.$tab.find("#log-copy-table").find(".log-column-4"),n=0;n'+a+"")}t.sort();for(var s=0;s'+o+"")}c.$tab.find("#log-files-btn").show().dropdown(),c.$tab.find("#log-files").html(n).find("a").on("click",function(){var e=$(this).data("value");e&&($(this).val(""),window.open(e,"_blank").focus())})}else c.$tab.find("#log-files").hide(),c.$tab.find("#log-files-btn").hide()})},0)})}else setTimeout(function(){c.init(e)},100)},this.destroy=function(){this.inited&&(this.inited=!1,this.main.subscribeLogs(!1))},this.add=function(e){if(s){if(e.message.substring(0,e.from.length)===e.from&&(e.message=e.message.substring(e.from.length+1)),m.mode)return m.list.push(e),m.counter++,m.counter>r.limit&&(m.overflow||(o.addClass("ui-state-error").attr("title",_("Message buffer overflow. Losing oldest")),m.overflow=!0),m.list.shift()),void m.$counterSpan.html(tdp(m.counter));if(r.count>=r.limit){var t=document.getElementById("log-line-"+(r.start+1));t&&(t.outerHTML=""),r.start++}else r.count++;e.from&&d&&d.host.checkAddOption(e.from,function(e){return{val:e.replace(/\./g,"-"),name:e}});var n="",i=e.from?e.from.replace(/\./g,"-"):"";u.host&&u.host!==i&&(n="display: none"),!n&&u.severity&&("debug"===u.severity&&"silly"===e.severity?n="display: none":"info"!==u.severity||"debug"!==e.severity&&"silly"!==e.severity?"warn"===u.severity&&"warn"!==e.severity&&"error"!==e.severity?n="display: none":"error"===u.severity&&"error"!==e.severity&&(n="display: none"):n="display: none"),!n&&u.message&&-1===e.message.indexOf(u.message)&&(n="display: none"),"error"===e.severity&&(c.$tabLogs=c.$tabLogs||$('a[href="#tab-logs"]'),c.$tabLogs.addClass("errorLog"));var a='';a+=''+(e.from||"")+"",a+=''+this.main.formatDate(e.ts)+"",a+=''+e.severity+"",a+=''+e.message.substring(0,200).replace(/&/g,"&").replace(//g,">")+"",s.prepend(a)}},this.filter=function(){u.host=d.host.val(),u.message=d.message.val(),u.severity=d.severity.val(),"error"===u.severity?(l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").hide(),l.find(".log-severity-info").hide(),l.find(".log-severity-warn").hide()):("warn"===u.severity?(l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").hide(),l.find(".log-severity-info").hide()):("info"===u.severity?(l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").hide()):("silly"===u.severity?l.find(".log-severity-silly").show():l.find(".log-severity-silly").hide(),l.find(".log-severity-debug").show()),l.find(".log-severity-info").show()),l.find(".log-severity-warn").show()),l.find(".log-severity-error").show(),(u.host||u.message)&&l.find(".log-line").each(function(){u.host&&!$(this).hasClass("log-from-"+u.host)?$(this).hide():u.message&&-1===$(this).html().indexOf(u.message)&&$(this).hide()})},this.clear=function(e){void 0===e&&(e=!0),s.html(""),r.count=0,r.start=0,c.$tabLogs=c.$tabLogs||$('a[href="#tab-logs"]'),c.$tabLogs.removeClass("errorLog"),e&&setTimeout(function(){c.init(e)},0)},this.pause=function(){if(m.mode){m.mode=!1;for(var e=0;epause')}else o.addClass("yellow btn-pause-button-active"),m.$counterSpan=o,m.$counterSpan.html("0"),m.counter=0,m.mode=!0}}function Issue(e){var a=this;this.$dialog=$("#dialog-issue"),this.main=e,this.prepare=function(){},this.init=function(){if(!this.inited){this.inited=!0,showdown.setFlavor("github");var e=this.main.navigateGetParams(),t=e.replace(/^system\.adapter\./,""),n=this.main.objects[e];if(n&&n.common&&n.common.extIcon){var i=n.common.extIcon.split("/"),r=$("#result-issue");r.html('
    \n \n
    ');$.getJSON("https://api.github.com/repos/"+i[3]+"/"+i[4]+"/issues",function(e){var t=!1;for(var n in r.empty(),e)if(e.hasOwnProperty(n)){if("remove"===n)break;var i=e[n];if(!i.hasOwnProperty("pull_request")){t=!0;var a=$("#issueTable").children().clone(!0,!0);a.find(".collapsible-header-title").text(i.title),a.find(".goto").attr("href",i.html_url),a.find(".user").text(i.user.login),a.find(".form-row").html((new showdown.Converter).makeHtml(i.body).replace(/src="/g,'class="responsive-img" src="'));var s=new Date(new Date(i.created_at));if(a.find(".created").text(s.toLocaleDateString(systemLang,{weekday:"short",year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),0'+i.labels[o].name+"")}r.append(a),0}}t||r.append($('
  • '+_("No bug")+"

  • "))}).done(a.$dialog.find(".collapsible").collapsible())}a.$dialog.data("name",t),a.$dialog.find(".title").html(_("Known bugs for")+": "+t),a.$dialog.find(".dialog-system-buttons .btn-add").attr("href","https://github.com/"+i[3]+"/"+i[4]+"/issues/new"),a.$dialog.find(".dialog-system-buttons .btn-cancel").off("click").on("click",function(e){e.stopPropagation(),e.preventDefault(),a.main.navigate()})}},this.destroy=function(){this.inited&&(this.$dialog.find(".collapsible").collapsible("destroy"),this.inited=!1)}}function Objects(e){var c=this;this.$grid=$("#grid-objects"),this.subscribes={},this.main=e;var o=function(){if(c.$grid&&c.$grid.selectId)return o=c.$grid.selectId.bind(c.$grid),c.$grid.selectId.apply(c.$grid,arguments)};function r(t,e,n){for(var i=c.main.tabs.enums.list,a=[],s=0;s').show():o.$divLogo.html("").hide(),c(n.readme),c(n.changeLog),c(n.license),n.readme.length?n.readme=r(n.readme.join("\n"),t):n.readme="",n.changeLog.length?n.changeLog=r(n.changeLog.join("\n"),t):delete n.changeLog,n.license.length?(n.license[0]="## "+n.license[0],n.license=r(n.license.join("\n"),t)):delete n.license,n}(e,i.substring(0,i.lastIndexOf("/")+1));o.$divReadme.html(n.readme),n.changeLog?(o.$divChangeLog.html(n.changeLog),o.$tabs.find(".tab-changelog").show()):(o.$divChangeLog.html(""),o.$tabs.find(".tab-changelog").hide()),n.license?(o.$divLicense.html(n.license),o.$tabs.find(".tab-license").show()):(o.$divLicense.html(""),o.$tabs.find(".tab-license").hide())}).done(function(){o.$divReadme.on("click",".md-link",function(e){e.stopPropagation(),e.preventDefault(),o.fillDiv($(this).data("url"))}),o.$divReadme.on("click",".goto-link",function(e){e.stopPropagation(),e.preventDefault();var t=$($(this).data("goto"));t.length&&o.$divReadme.animate({scrollTop:o.$divReadme.scrollTop()-o.$divReadme.offset().top+t.offset().top},2e3)})})},this.destroy=function(){this.inited&&(localStorage.removeItem("original-md-url"),this.inited=!1)}}function initMap(){gMain.dialogs.system.mapLoaded=!0,gMain.dialogs.system.updateMap(!0)}function System(s){var a,o,r,c,l=this;this.$dialog=$("#dialog-system"),this.main=s,this.systemRepos=null,this.systemCerts=null;var d=!(this.mapLoaded=!1);function u(e,t){if(t.length<700&&(-1!==t.indexOf("/")||-1!==t.indexOf("\\")))return t;if(t.length<"-----BEGIN CERTIFICATE-----==-----END CERTIFICATE-----".length)return h(_('Invalid certificate "%s". To short.',e),!0),"";var n=[];if("-----BEGIN RSA PRIVATE KEY-----"===t.substring(0,"-----BEGIN RSA PRIVATE KEY-----".length)){if("-----END RSA PRIVATE KEY-----"!==t.substring(t.length-"-----END RSA PRIVATE KEY-----".length))return h(_('Certificate "%s" must end with "-----END RSA PRIVATE KEY-----".',e),!0),"";for(t=(t=(t=t.substring("-----BEGIN RSA PRIVATE KEY-----".length)).substring(0,t.length-"-----END RSA PRIVATE KEY-----".length)).replace(/\s/g,"");t.length;)n.push(t.substring(0,64)),t=t.substring(64);return"-----BEGIN RSA PRIVATE KEY-----\r\n"+n.join("\r\n")+"\r\n-----END RSA PRIVATE KEY-----\r\n"}if("-----BEGIN PRIVATE KEY-----"===t.substring(0,"-----BEGIN PRIVATE KEY-----".length)){if("-----END PRIVATE KEY-----"!==t.substring(t.length-"-----END PRIVATE KEY-----".length))return h(_('Certificate "%s" must end with "-----BEGIN PRIVATE KEY-----".',e),!0),"";for(t=(t=(t=t.substring("-----BEGIN PRIVATE KEY-----".length)).substring(0,t.length-"-----END PRIVATE KEY-----".length)).replace(/\s/g,"");t.length;)n.push(t.substring(0,64)),t=t.substring(64);return"-----BEGIN PRIVATE KEY-----\r\n"+n.join("\r\n")+"\r\n-----END PRIVATE KEY-----\r\n"}if("-----BEGIN CERTIFICATE-----"!==t.substring(0,"-----BEGIN CERTIFICATE-----".length))return h(_('Certificate "%s" must start with "-----BEGIN CERTIFICATE-----".',e),!0),"";if("-----END CERTIFICATE-----"!==t.substring(t.length-"-----END CERTIFICATE-----".length))return h(_('Certificate "%s" must end with "-----END CERTIFICATE-----".',e),!0),"";for(var i=t.split("-----END CERTIFICATE-----"),a=i.length-1;0<=a;a--)if(i[a].replace(/[\r\n|\r|\n]+/,"").trim()){for(t=(t=(t=i[a]).substring("-----BEGIN CERTIFICATE-----".length)).replace(/\s/g,""),n=[];t.length;)n.push(t.substring(0,64)),t=t.substring(64);i[a]="-----BEGIN CERTIFICATE-----\r\n"+n.join("\r\n")+"\r\n-----END CERTIFICATE-----\r\n"}else i.splice(a,1);return i.join("")}function m(e,t){for(var n,i=table2values("tab-system-certs"),a=[],s=0;s'+i[a].name+""),t===i[a].name&&(n=!0);n&&e.val(t);e.select()}()}}),l.systemRepos.nonEdit&&l.systemRepos.nonEdit.native&&l.systemRepos.nonEdit.native.repositories){var i=l.$dialog.find("#grid-repos");i.find("input").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),i.find("select").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),i.find(".btn-floating").each(function(){$(this).addClass("disabled")}),l.$dialog.find("#tab-system-repo .table-button-add").addClass("disabled")}}else l.$dialog.find("#tab-system-repo").html(_("permissionError"))}function h(e,t,n){l.main.showToast(l.$dialog.find("#tab-system-certs"),e,null,n,t)}function f(){var n=l.main.systemConfig.common,i=!1,a=!1;!function(){l.main.systemConfig.common.defaultNewAcl=l.main.systemConfig.common.defaultNewAcl||{};var e=l.main.systemConfig.common.defaultNewAcl,t=JSON.stringify(e);e.object=0,e.object|=l.$dialog.find("#tab-system-acl-obj-owner-read").prop("checked")?1024:0,e.object|=l.$dialog.find("#tab-system-acl-obj-owner-write").prop("checked")?512:0,e.object|=l.$dialog.find("#tab-system-acl-obj-group-read").prop("checked")?64:0,e.object|=l.$dialog.find("#tab-system-acl-obj-group-write").prop("checked")?32:0,e.object|=l.$dialog.find("#tab-system-acl-obj-every-read").prop("checked")?4:0,e.object|=l.$dialog.find("#tab-system-acl-obj-every-write").prop("checked")?2:0,e.owner=l.$dialog.find("#tab-system-acl-owner").val(),e.ownerGroup=l.$dialog.find("#tab-system-acl-group").val(),e.state=0,e.state|=l.$dialog.find("#tab-system-acl-state-owner-read").prop("checked")?1024:0,e.state|=l.$dialog.find("#tab-system-acl-state-owner-write").prop("checked")?512:0,e.state|=l.$dialog.find("#tab-system-acl-state-group-read").prop("checked")?64:0,e.state|=l.$dialog.find("#tab-system-acl-state-group-write").prop("checked")?32:0,e.state|=l.$dialog.find("#tab-system-acl-state-every-read").prop("checked")?4:0,e.state|=l.$dialog.find("#tab-system-acl-state-every-write").prop("checked")?2:0,e.file=0,e.file|=l.$dialog.find("#tab-system-acl-file-owner-read").prop("checked")?1024:0,e.file|=l.$dialog.find("#tab-system-acl-file-owner-write").prop("checked")?512:0,e.file|=l.$dialog.find("#tab-system-acl-file-group-read").prop("checked")?64:0,e.file|=l.$dialog.find("#tab-system-acl-file-group-write").prop("checked")?32:0,e.file|=l.$dialog.find("#tab-system-acl-file-every-read").prop("checked")?4:0,e.file|=l.$dialog.find("#tab-system-acl-file-every-write").prop("checked")?2:0,JSON.stringify(e)}(),l.$dialog.find(".system-settings.value").each(function(){var e=$(this),t=e.attr("id");t&&(t=t.substring("system_".length),"checkbox"===e.attr("type")?n[t]=e.prop("checked"):("language"===t&&n.language!==e.val()&&(i=!0),"activeRepo"===t&&n.activeRepo!==e.val()&&(a=!0),n[t]=e.val(),"isFloatComma"===t&&(n[t]="true"===n[t]||!0===n[t])))});var e={};if(l.systemRepos){for(var t in l.systemRepos.native.repositories)l.systemRepos.native.repositories.hasOwnProperty(t)&&"object"==typeof l.systemRepos.native.repositories[t]&&l.systemRepos.native.repositories[t].json&&(e[l.systemRepos.native.repositories[t].link]=l.systemRepos.native.repositories[t].json);l.systemRepos.native.repositories={}}var s=table2values("tab-system-repo");if(l.systemRepos){for(var o=null,r=0;r'+n+"");else l.$dialog.find("#tab-system-repo").html(_("permissionError"));l.$dialog.find("#diagMode").val(l.main.systemConfig.common.diag).on("change",function(){l.main.socket.emit("sendToHost",l.main.currentHost,"getDiagData",$(this).val(),function(e){l.$dialog.find("#diagSample").html(JSON.stringify(e,null,2))})}).trigger("change");var i=l.$dialog.find("#system_defaultHistory");i.html('');for(var a=0;a'+s.instances[a].substring("system.adapter.".length)+"");r=l.main.systemConfig.common.longitude,c=l.main.systemConfig.common.latitude,o||(o=!0,d?(l.mapLoaded=!0,$.ajax({url:"lib/js/ol.js",dataType:"script",cache:!0}).done(function(){setTimeout(l.updateMap,500)}),$.ajax({url:"lib/css/ol.css",success:function(e){$("head").append("")}})):$.ajax({url:"https://maps.googleapis.com/maps/api/js?key=AIzaSyCIrBRZfZAE_0C1OplAUy7OXhiWLoZc3eY&signed_in=true&callback=initMap",dataType:"script",cache:!0})),l.$dialog.find(".system-settings.value").each(function(){var e=$(this),t=e.attr("id");t&&(t=t.substring("system_".length),"checkbox"===e.attr("type")?e.prop("checked",l.main.systemConfig.common[t]):"isFloatComma"===t?e.val(l.main.systemConfig.common[t]?"true":"false"):e.val(l.main.systemConfig.common[t]),l.main.systemConfig.nonEdit&&l.main.systemConfig.nonEdit.common&&void 0!==l.main.systemConfig.nonEdit.common[t]&&(e.addClass("disabled"),e.prop("disabled",!0)))}),l.$dialog.find("#system_latitude").off("change").on("change",function(){c=$(this).val(),l.updateMap()}).off("keyup").on("keyup",function(){$(this).trigger("change")}),l.$dialog.find("#system_longitude").off("change").on("change",function(){r=$(this).val(),l.updateMap()}).off("keyup").on("keyup",function(){$(this).trigger("change")}),l.systemCerts.native.letsEncrypt||(l.systemCerts.native.letsEncrypt={path:"letsencrypt"}),l.$dialog.find(".system-le-settings.value").each(function(){var e=$(this),t=e.data("name");l.systemCerts&&l.systemCerts.native.letsEncrypt&&("checkbox"===e.attr("type")?e.prop("checked",l.systemCerts.native.letsEncrypt[t]):e.val(l.systemCerts.native.letsEncrypt[t])),l.systemCerts.nonEdit&&l.systemCerts.nonEdit.native&&l.systemCerts.nonEdit.native.letsEncrypt&&void 0!==l.systemCerts.nonEdit.native.letsEncrypt[t]&&(e.addClass("disabled"),e.prop("disabled",!0))}),l.$dialog.find("#tabs-system").find(".tabs").mtabs({onShow:function(e){e&&p($(e).attr("id"))}}),l.$dialog.find(".dialog-system-buttons .btn-save").off("click").on("click",f),l.$dialog.find(".dialog-system-buttons .btn-cancel").off("click").on("click",function(){l.main.navigate()}),g(),function(){l.main.systemConfig.common.defaultNewAcl=l.main.systemConfig.common.defaultNewAcl||{};for(var e,t=l.main.systemConfig.common.defaultNewAcl,n="",i=0;i'+(e||l.main.tabs.users.list[i])+"";for(l.$dialog.find("#tab-system-acl-owner").html(n).val(t.owner||"system.user.admin"),n="",i=0;i'+(e||l.main.tabs.users.groups[i])+"";l.$dialog.find("#tab-system-acl-group").html(n).val(t.ownerGroup||"system.group.administrator"),void 0===t.object&&(t.object=1636),l.$dialog.find("#tab-system-acl-obj-owner-read").prop("checked",1024&t.object),l.$dialog.find("#tab-system-acl-obj-owner-write").prop("checked",512&t.object),l.$dialog.find("#tab-system-acl-obj-group-read").prop("checked",64&t.object),l.$dialog.find("#tab-system-acl-obj-group-write").prop("checked",32&t.object),l.$dialog.find("#tab-system-acl-obj-every-read").prop("checked",4&t.object),l.$dialog.find("#tab-system-acl-obj-every-write").prop("checked",2&t.object),void 0===t.state&&(t.state=1636),l.$dialog.find("#tab-system-acl-state-owner-read").prop("checked",1024&t.state),l.$dialog.find("#tab-system-acl-state-owner-write").prop("checked",512&t.state),l.$dialog.find("#tab-system-acl-state-group-read").prop("checked",64&t.state),l.$dialog.find("#tab-system-acl-state-group-write").prop("checked",32&t.state),l.$dialog.find("#tab-system-acl-state-every-read").prop("checked",4&t.state),l.$dialog.find("#tab-system-acl-state-every-write").prop("checked",2&t.state),void 0===t.file&&(t.file=1636),l.$dialog.find("#tab-system-acl-file-owner-read").prop("checked",1024&t.file),l.$dialog.find("#tab-system-acl-file-owner-write").prop("checked",512&t.file),l.$dialog.find("#tab-system-acl-file-group-read").prop("checked",64&t.file),l.$dialog.find("#tab-system-acl-file-group-write").prop("checked",32&t.file),l.$dialog.find("#tab-system-acl-file-every-read").prop("checked",4&t.file),l.$dialog.find("#tab-system-acl-file-every-write").prop("checked",2&t.file),l.$dialog.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")})}(),function(){var e,t=l.$dialog.find("#tab-system-certs");if(l.systemCerts&&l.systemCerts.native.certificates){var n=[];for(var i in l.systemCerts.native.certificates)l.systemCerts.native.certificates.hasOwnProperty(i)&&n.push({name:i,certificate:(e=l.systemCerts.native.certificates[i],e.replace(/(?:\\[rn]|[\r\n]+)+/g,""))});if(values2table("tab-system-certs",n,{onChange:function(e){l.$dialog.find(".btn-save").removeClass("disabled")}}),l.systemCerts.nonEdit&&l.systemCerts.nonEdit.native&&l.systemCerts.nonEdit.native.certificates){var a=l.$dialog.find("#grid-certs");a.find("input").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),a.find("select").each(function(){$(this).prop("disabled",!0).addClass("disabled")}),a.find(".btn-floating").each(function(){$(this).addClass("disabled")})}}else t.html(_("permissionError"));installFileUpload(t,1e4,function(e,t){if(e)h(e,!0);else{try{t=atob(t.split(",")[1])}catch(e){return void h(_("Cannot read file!"),!0)}if(-1!==(t=t.replace(/(\r\n|\n|\r)/gm,"")).indexOf("BEGIN RSA PRIVATE KEY"))m("private",t);else if(-1!==t.indexOf("BEGIN PRIVATE KEY"))m("private",t);else if(-1!==t.indexOf("BEGIN CERTIFICATE")){for(var n=t.split("-----END CERTIFICATE-----"),i=0,a=0;a'),c.find(".tab-dialog-new-icon .treetable-icon").attr("src",t),c.find(".tab-dialog-new-icon-clear").show()}}),"string"==typeof e&&(g.main.objects[e]&&g.main.objects[e].common&&(l.name=g.main.objects[e].common.name,l.icon=g.main.objects[e].common.icon,l.color=g.main.objects[e].common.color,l.desc=g.main.objects[e].common.desc,(o="group"===g.main.objects[e].type)&&(l.acl=g.main.objects[e].common.acl)),d=e,l.id=e),c.find(".tab-dialog-new-title").text(!0===e?_("Create new group"):l.id?_("Change"):_("Create new user")),l.id){var t=l.id.split(".");l.id=t.pop(),s=t.join(".")}c.find("#tab-users-dialog-new-name").val(translateName(l.name)).off("change").on("change",function(){var e=g.$grid.find("#tab-users-dialog-new-id"),t=e.val(),n=$(this).val();n=n.trim().replace(FORBIDDEN_CHARS,"_").replace(/\./g,"_").toLowerCase(),t&&a||!(o&&"administrator"!==t&&"user"!==t||!o&&"admin"!==t)||(e.val(n),i=n,c.find("#tab-users-dialog-new-preview").val(s+"."+(n||"#")),M.updateTextFields("#tab-users-dialog-new")),b(c)}).off("keyup").on("keyup",function(){$(this).trigger("change")}),c.find("#tab-users-dialog-new-desc").val(l.desc).off("change").on("change",function(){b(c)}).off("keyup").on("keyup",function(){$(this).trigger("change")}),i=l.id,c.find("#tab-users-dialog-new-id").val(l.id).off("change").on("change",function(){var e=$(this).val();i!==e&&(a=!0,i=e,c.find("#tab-users-dialog-new-preview").val(s+"."+(e||"#")),M.updateTextFields("#tab-users-dialog-new"),b(c))}).off("keyup").on("keyup",function(){$(this).trigger("change")}),c.find(".tab-dialog-create").addClass("disabled").off("click").text(_(d?"Change":"Create")).on("click",function(e){var n;l.name=c.find("#tab-users-dialog-new-name").val(),l.id=c.find("#tab-users-dialog-new-id").val(),l.desc=c.find("#tab-users-dialog-new-desc").val(),o?(n=l.acl,g.$grid.find(".edit-group-permissions").each(function(){var e=$(this).data("type"),t=$(this).data("operation");n[e]=n[e]||{},n[e][t]=$(this).prop("checked")}),function(i,a,s){if("system.group.administrator"===a&&"administrator"!==s.id)return i.stopPropagation(),u(_('Cannot change name of "%s"',"administrator"),!0);if("system.group.user"===a&&"user"!==s.id)return i.stopPropagation(),u(_('Cannot change name of "%s"',"user"),!0);if(!s.id)return i.stopPropagation(),u(_("ID may not be empty"),!0);if(a)if("system.group."+s.id!==a){if(g.main.objects["system.group."+s.id])return i.stopPropagation(),u(_("ID yet exists"),!0);g.main.socket.emit("getObject",a,function(e,t){if(e)h(_("Cannot change group: ")+e,!0);else{var n=s.id;t.common.name=s.name,t.common.color=s.color,t.common.icon=s.icon,t.common.desc=s.desc,delete s.id,g.main.socket.emit("delObject",a,function(e){e?(h(_("Cannot rename group: ")+e,!0),i.stopPropagation()):g.main.socket.emit("setObject",n,t,function(e){e?h(_("Cannot change group: ")+e,!0):h(_("Updated"))})})}})}else delete s.id,g.main.socket.emit("extendObject",a,{common:s},function(e,t){e?h(_("Cannot change group: ")+e,!0):h(_("Updated"))});else{if(!s.id)return i.stopPropagation(),u(_("ID may not be empty"),!0);g.main.socket.emit("addGroup",s.id,s.desc,null,function(e,t){e?h(_("Cannot create group: ")+e,!0):g.main.socket.emit("extendObject",t._id,{common:s},function(e){e?h(_("Cannot add group: ")+e,!0):h(_("Created"))})})}}(e,d,l)):(delete l.acl,r(e,d,l))}),c.find("#tab-users-dialog-new-preview").val(s+"."+(l.id||"#")),l.icon?(c.find(".tab-dialog-new-icon").show().html(g.main.getIcon(d)),c.find(".tab-dialog-new-icon-clear").show()):(c.find(".tab-dialog-new-icon").hide(),c.find(".tab-dialog-new-icon-clear").hide()),l.color=l.color||!1,l.color?c.find(".tab-dialog-new-color").val(l.color):c.find(".tab-dialog-new-color").val(),u(_("Drop the icons here")),c.find(".tab-dialog-new-upload").off("click").on("click",function(){c.find(".drop-file").trigger("click")}),c.find(".tab-dialog-new-icon-clear").off("click").on("click",function(){l.icon&&(l.icon="",c.find(".tab-dialog-new-icon").hide(),c.find(".tab-dialog-new-icon-clear").hide(),b(c))}),c.find(".tab-dialog-new-color-clear").off("click").on("click",function(){l.color&&(b(c),c.find(".tab-dialog-new-color-clear").hide(),c.find(".tab-dialog-new-colorpicker").colorpicker({component:".btn",color:l.color,container:c.find(".tab-dialog-new-colorpicker")}).colorpicker("setValue",""),l.color="")});var n=Date.now();try{c.find(".tab-dialog-new-colorpicker").colorpicker("destroy")}catch(e){}c.find(".tab-dialog-new-colorpicker").colorpicker({component:".btn",color:l.color,container:c.find(".tab-dialog-new-colorpicker")}).colorpicker("setValue",l.color).on("showPicker.colorpicker",function(){var e=c.find(".modal-content");e[0].scrollTop=e[0].scrollHeight}).on("changeColor.colorpicker",function(e){100'+_(a+" permissions")+"",i+='';for(var s=0;s"+t[s]+"":i+="";i+="",i+="";for(var o=0;o'}else i+="";i+=""}i+="",c.find("#tab-users-dialog-new-rights").html(i),c.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=$(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),c.find('input[type="checkbox"]').off("change").on("change",function(){b(c)}),m(d,l.acl),M.updateTextFields("#tab-users-dialog-new")}),c.find("ul.tabs .tab-dialog-new-tabs").show()):(c.find("ul.tabs .tab-dialog-new-tabs").each(function(){$(this).find('a[href="#tab-users-dialog-new-rights"]').length&&$(this).hide()}),M.updateTextFields("#tab-users-dialog-new")),c.find("ul.tabs").mtabs(),g.main.noSelect||c.find("ul.tabs").mtabs("select","tab-users-dialog-new-main"),c.modal().modal("open")}function t(){g.list.sort(),g.groups.sort();var e="";e+='
      ';for(var t=function(e,t){for(var n={},i=0;i'+g.main.getIcon(c)+l+'close'}var d="",u=!1;a.color&&(d="background: "+a.color+"; ",g.main.invertColor(a.color)&&(u=!0,d+="color: white;"));var m=a.desc;"object"==typeof m&&(m=m[systemLang]||m.en),e+='
    • ',e+=" "+(g.main.getIcon(g.list[n],null,null,"icon")||''),e+=''+i+"",e+="

      "+g.list[n]+((m?" ("+m+")":"")||"")+"

      ",e+=' '+(a.enabled?"check_box":"check_box_outline_blank")+"",e+=' edit',e+=' delete
      ',e+=s||"",e+="
    • "}e+="
    ",g.$gridUsers.html(e),g.$grid.find("#tab-users-btn-new-user").on("click",function(){y(!1)}),g.$gridUsers.find(".tab-users-enabled-user").on("click",function(){var e=$(this).data("user");if("system.user.admin"===e)return h(_("Cannot disable admin!"),!0),!1;var t=$(this),n=g.main.objects[e]&&g.main.objects[e].common&&g.main.objects[e].common.enabled;n=!n,g.main.socket.emit("extendObject",e,{common:{enabled:n}},function(e){e?h(_("Cannot modify user!")+e,!0):(h(_("Updated")),t.find("i").text(n?"check_box":"check_box_outline_blank"))})}),g.$gridUsers.find(".delete-content").off("click").on("click",function(){var t=$(this).data("user");$(this).hasClass("disabled")||(g.main.objects[t]&&"user"===g.main.objects[t].type?g.main.confirmMessage(_("Are you sure to delete %s?",t),null,"help",function(e){e&&p(t)}):h(_('Object "%s" does not exists. Update the page.',t),!0))}),g.$gridUsers.find(".edit-content").on("click",function(){y($(this).data("user"))}),g.$gridUsers.find(".tab-users-remove-group").on("click",function(){var i=$(this).data("user"),e=$(this).data("group");g.main.socket.emit("getObject",e,function(e,t){if(t&&t.common&&t.common.members){var n=t.common.members.indexOf(i);-1!==n?(t.common.members.splice(n,1),g.main.socket.emit("setObject",t._id,t,function(e){e?h(_("Error: %s",e),!0):h(_("Removed"))})):h(_("%s is not in the list"),!0)}})})}function n(){var e="";e+='
      ';for(var t=0;t'+g.main.getIcon(c)+r+'close'}var l="",d=!1;i.color&&(l="background: "+i.color+"; ",g.main.invertColor(i.color)&&(d=!0,l+="color: white;"));var u=i.desc;"object"==typeof u&&(u=u[systemLang]||u.en),e+='
    • ',e+=" "+(g.main.getIcon(g.groups[t],null,null,"icon")||''),e+=' '+n+"",e+="

      "+g.groups[t]+((u?" ("+u+")":"")||"")+"

      ",e+=' edit',e+=' delete
      ',e+=a||"",e+="
    • "}e+="
    ",g.$gridGroups.html(e),g.$grid.find("#tab-users-btn-new-group").on("click",function(){y(!0)}),g.$gridGroups.find(".delete-content").on("click",function(){var n=$(this).data("group");$(this).hasClass("disabled")||(g.main.objects[n]&&"group"===g.main.objects[n].type?g.main.confirmMessage(_("Are you sure to delete %s?",n),null,"help",function(e){var t;e&&(t=n,g.main.objects[t]&&"group"===g.main.objects[t].type?g.main.objects[t].common&&g.main.objects[t].common.dontDelete?h(_("Object may not be deleted"),!0):g.main.socket.emit("delObject",t,function(e){e?h(_("Group may not be deleted: %s",e),!0):h(_("Group deleted"))}):h(_("Invalid object: %s",t),!0))}):h(_('Object "%s" does not exists. Update the page.',n),!0))}),g.$gridGroups.find(".edit-content").on("click",function(){y($(this).data("group"))}),g.$gridGroups.find(".tab-users-remove-user").on("click",function(){var i=$(this).data("user"),e=$(this).data("group");g.main.socket.emit("getObject",e,function(e,t){if(t&&t.common&&t.common.members){var n=t.common.members.indexOf(i);if(-1!==n){if(t.common.members.splice(n,1),!t._id)return void console.error("INVLAID ID");g.main.socket.emit("setObject",t._id,t,function(e){e?h(_("Error: %s",e),!0):h(_("Removed"))})}else h(_("%s is not in the list"),!0)}})})}this.groups=[],this.list=[],this.$grid=$("#tab-users"),this.$gridUsers=this.$grid.find(".tab-users-list-users .tab-users-body"),this.$gridGroups=this.$grid.find(".tab-users-list-groups .tab-users-body"),this.main=e,this.aclGroups=null,this.prepare=function(){},this._postInit=function(){var e;t(),g.$gridUsers.find("ul").sortable({connectWith:"#tab-users .tab-users-list-groups .treetable",items:".users-type-draggable",appendTo:g.$gridUsers,refreshPositions:!0,helper:function(e,t){return $('
    '+t.find(".treetable-icon-empty+span").text()+"
    ")},zIndex:999990,revert:!1,scroll:!1,start:function(e,t){var n=t.item.prev();t.item.data("prev",n),g.$grid.addClass("dragging")},stop:function(e,t){g.$grid.removeClass("dragging")},update:function(e,t){var n=t.item.data("prev");n&&n.length?$(n).after(t.item):$(this).prepend(t.item)}}).disableSelection(),n(),(e=g.$gridGroups.find("ul>li")).droppable("instance")&&e.droppable("destroy"),e.droppable({accept:".users-type-draggable",over:function(e,t){if($(this).addClass("tab-accept-item"),$(this).hasClass("not-empty")&&!$(this).hasClass("expanded")){var n,i=$(this).data("tt-id");(n=$(this).data("timer"))&&clearTimeout(n),$(this).data("timer",setTimeout(function(){g.$gridGroups.treeTable("expand",i)},1e3))}},out:function(e,t){var n;$(this).removeClass("tab-accept-item"),(n=$(this).data("timer"))&&(clearTimeout(n),$(this).data("timer",null))},tolerance:"pointer",drop:function(e,t){$(this).removeClass("tab-accept-item");var n=t.draggable.data("tt-id"),i=$(this).data("tt-id");g.main.socket.emit("getObject",i,function(e,t){t&&t.common&&(t.common.members=t.common.members||[],-1===t.common.members.indexOf(n)?(t.common.members.push(n),t.common.members.sort(),g.main.socket.emit("setObject",t._id,t,function(e){e?h(_("Error: %s",e),!0):h(_("%s added to %s",n,t._id))})):h(_("Is yet in the list")))})}})},this.init=function(e){this.inited&&!e||(void 0!==this.$gridUsers&&this._postInit(),this.inited||(h(_("You can drag&drop users to groups"),5e3),this.inited=!0,this.main.subscribeObjects("system.user.*"),this.main.subscribeObjects("system.group.*")))},this.destroy=function(){this.inited&&(this.inited=!1,this.main.unsubscribeObjects("system.user.*"),this.main.unsubscribeObjects("system.group.*"))},this.objectChange=function(e,t,n){if(e.match(/^system\.user\./)){if(t)-1===this.list.indexOf(e)&&this.list.push(e);else{var i=this.list.indexOf(e);-1!==i&&this.list.splice(i,1)}this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){g.timer=null,g._postInit()},200)}else if(e.match(/^system\.group\./)){if(t)-1===this.groups.indexOf(e)&&this.groups.push(e);else{var a=this.groups.indexOf(e);-1!==a&&this.groups.splice(a,1)}this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){g.timer=null,g._postInit()},200)}}}!function(C){C(document).ready(function(){var e=location.pathname+"socket.io";location.pathname.match(/^\/admin\//)&&(e="/socket.io");var s,y={},v={objects:{},states:{},currentHost:"",currentTab:null,currentDialog:null,currentUser:"",subscribesStates:{},subscribesObjects:{},subscribesLogs:0,socket:io.connect("/",{path:e}),systemConfig:null,instances:null,objectsLoaded:!1,waitForRestart:!1,tabs:null,dialogs:{},selectId:null,config:{},ignoreJSupdate:!1,addEventMessage:function(e,t,n,i){g.events.add(e,t,n,i)},saveConfig:function(e,t){e&&(v.config[e]=t),"undefined"!=typeof storage&&storage.set("adminConfig",JSON.stringify(v.config))},saveTabs:function(){this.socket.emit("setObject","system.config",this.systemConfig,function(e){e&&this.showError(e)})},upToDate:function(e,t){return e=e.split("."),t=t.split("."),e[0]=parseInt(e[0],10),t[0]=parseInt(t[0],10),!(e[0]>t[0])&&(e[0]!==t[0]||(e[1]=parseInt(e[1],10),t[1]=parseInt(t[1],10),!(e[1]>t[1])&&(e[1]!==t[1]||(e[2]=parseInt(e[2],10),t[2]=parseInt(t[2],10),e[2]<=t[2]))))},cmdExec:function(e,t,n){e=e||v.currentHost,c.val(""),l.modal("open"),s="$ ./yunkong2 "+t,l.data("finished",!1).find(".btn").html(_("In background")),l.find(".command").html(s),l.find(".progress-dont-close").removeClass("disabled"),p.find(".button-command").removeClass("error").addClass("in-progress"),l.data("max",null),l.data("error",""),h.addClass("indeterminate").removeClass("determinate"),t.match(/^upload /)?l.find(".progress-text").html(_("Upload started...")).removeClass("error"):t.match(/^del [-_\w\d]+\.[\d]+$/)?l.find(".progress-text").html(_("Removing of instance...")).removeClass("error"):t.match(/^del /)?l.find(".progress-text").html(_("Removing of adapter...")).removeClass("error"):t.match(/^url /)?l.find(".progress-text").html(_("Install or update from URL...")).removeClass("error"):t.match(/^add /)?l.find(".progress-text").html(_("Add instance...")).removeClass("error"):l.find(".progress-text").html(_("Started...")).removeClass("error"),c.val(s),r=Math.floor(268435454*Math.random())+1,o=n,v.socket.emit("cmdExec",e,r,t,function(e){e?(s+="\n"+_(e),c.val(s),o=null,n(e)):n&&n()})},confirmMessage:function(e,t,n,i,a){if("function"==typeof i)a=i,m.find(".modal-footer").html(''+_("Ok")+''+_("Cancel")+""),m.find(".modal-footer .modal-action").on("click",function(){var e=m.data("callback");e&&e(C(this).data("result"))});else if("object"==typeof i){for(var s="",o=i.length-1;0<=o;o--)s+=''+i[o]+"";m.find(".modal-footer").html(s),m.find(".modal-footer .modal-action").on("click",function(){var e=m.data("callback");e&&e(C(this).data("id"))})}m.find(".dialog-title").text(t||_("Please confirm")),n?m.find(".dialog-icon").show().html(n):m.find(".dialog-icon").hide(),m.find(".dialog-text").html(e),m.data("callback",a),m.modal("open")},showMessage:function(e,t,n){u.find(".dialog-title").text(t||_("Message")),n?u.find(".dialog-icon").show().html(n):u.find(".dialog-icon").hide(),u.find(".dialog-text").html(e),u.modal("open")},showError:function(e){v.showMessage(_(e),_("Error"),"error_outline")},showToast:function(e,t,n,i,a,s){e&&e instanceof jQuery&&(e=e[0]),"string"==typeof(s=s||[])&&(s=[s]),a&&s.push("dropZone-error"),M.toast({parentSelector:e||C("body")[0],html:t+(n?''+n+"":""),displayLength:i||3e3,classes:s})},formatDate:function(e,t){if(!e)return"";var n,i=typeof e;return"string"===i?t?e.substring(8):e:("object"!==i&&(e=e<9466812e5?new Date(1e3*e):new Date(e)),t?i=(n=e.getDate())<10?"0"+n:n:(i=e.getFullYear(),i+=(n=e.getMonth()+1)<10?"-0"+n:"-"+n,i+=(n=e.getDate())<10?"-0"+n:"-"+n),i+=(n=e.getHours())<10?" 0"+n:" "+n,i+=(n=e.getMinutes())<10?":0"+n:":"+n,i+=(n=e.getSeconds())<10?":0"+n:":"+n,i+=(n=e.getMilliseconds())<10?".00"+n:n<100?".0"+n:"."+n)},updateWizard:function(){var e=C("#button-wizard");v.objects["system.adapter.discovery.0"]?(e.data("inited")||(e.data("inited",!0),e.on("click",function(){v.navigate({tab:"instances",dialog:"config",params:"system.adapter.discovery.0"})}).attr("title",_("Device discovery"))),e.show(),!v.systemConfig.common.wizard&&v.systemConfig.common.licenseConfirmed&&e.trigger("click")):e.hide()},getUser:function(){if(v.currentUser){if(v.objects[v.currentUser]){var e=v.objects[v.currentUser],t="";if(t=e&&e.common&&e.common.name?translateName(e.common.name):(t=v.currentUser.replace(/^system\.user\./))[0].toUpperCase()+t.substring(1).toLowerCase(),e&&e.common&&e.common.icon){var n={};n[v.currentUser]=e,C("#current-user-icon").html(v.getIcon(v.currentUser,null,n))}else C("#current-user-icon").html('account_circle');C("#current-user").html(t);for(var i=[],a=0;aone object or all children of %s too?',t),null,"help_outline",[_("_All"),_("Only one"),_("Cancel")],function(e){0===e?v._delObjects(t,!0,n):1===e&&v._delObjects(t,!1,n)}):v.confirmMessage(_("Are you sure to delete %s?",t),null,"help_outline",function(e){e&&v._delObjects(t,!0,n)}):i&&i.children?v.confirmMessage(_("Are you sure to delete all children of %s?",t),null,"help_outline",function(e){e&&v._delObjects(t,!0,n)}):v.showMessage(_('Object "%s" does not exists. Update the page.',t),_("Error"),"help_outline",function(e){e&&v._delObjects(t,!0,n)})}},g={hosts:new Hosts(gMain=v),objects:new Objects(v),adapters:new Adapters(v),instances:new Instances(v),users:new Users(v),enums:new Enums(v),events:new Events(v),logs:new Logs(v),states:null,intro:new Intro(v)};"undefined"!=typeof States&&(g.states=new States(v)),v.instances=g.instances.list,v.tabs=g,v.dialogs={system:new System(v),customs:new Customs(v),config:new Config(v),editobject:new EditObject(v),issue:new Issue(v),readme:new Readme(v)};var o=null,r=null,c=C("#stdout"),l=C("#dialog-command"),d=C("#dialog-license-main"),u=C("#dialog-message"),m=C("#dialog-confirm"),h=l.find(".progress div"),f=C("#admin_sidemenu_menu"),p=C("#admin_sidemenu_main"),t=!0;if("ontouchstart"in window||navigator.maxTouchPoints||C("body").addClass("desktop-screen"),-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Android")?(C("body").addClass("safari"),v.browser="safari",v.noSelect=!0):detectIE()&&(C("body").addClass("ie"),v.browser="ie",v.browserVersion=detectIE(),v.noSelect=!0,C("#host-adapters-btn").css("margin-top","10px")),"undefined"!=typeof storage)try{v.config=storage.get("adminConfig"),v.config?v.config=JSON.parse(v.config):v.config={}}catch(e){console.log("Cannot load edit config"),v.config={}}function b(e){C("#admin_sidemenu_dialog").html(""),C("html").off("click",b)}function w(){if(function(){var e="",i=[];C(".admin-tab").each(function(){var e=C(this).attr("id");v.systemConfig.common.tabs&&-1===v.systemConfig.common.tabs.indexOf(e)||i.push({line:'
  • '+(T[e]&&T[e].icon?''+T[e].icon+"":'live_help')+_(C(this).data("name"))+"
  • ",id:e})}),C(".tab-custom").each(function(){var e=C(this).attr("id");if(!v.systemConfig.common.tabs||-1!==v.systemConfig.common.tabs.indexOf(e)){var t;if(T[e]&&T[e].icon)t=T[e].icon;else{var n="system.adapter."+e.substring(4);v.objects[n]&&v.objects[n].adminTab&&v.objects[n]["fa-icon"]&&(t=v.objects[n]["fa-icon"])}i.push({line:'
  • '+(t?''+t+"":'live_help')+C(this).data("name")+"
  • ",id:e})}}),i.sort(function(e,t){return T[e.id]||T[t.id]?T[e.id]?T[t.id]?T[e.id].orderT[t.id].order?1:0:-1:1:0});for(var t=0;t
      ';for(var s in y){var o=y[s],r="chk-"+s;a+="
    • '+_(o)+""}a+="
    ",t.append(a),t.find(".chk-tab").off("change").on("change",function(e){var t=C(this).attr("id").substr(4);if(C(this).prop("checked"))v.systemConfig.common.tabs.push(t);else{var n=v.systemConfig.common.tabs.indexOf(t);-1!==t&&v.systemConfig.common.tabs.splice(n,1)}v.saveTabs(),j()}),t.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=C(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")})}),v.updateWizard(),C("#button-logout").on("click",function(){window.location.href="/logout/"}),window.onhashchange=function(){v.navigateDo()},v.navigateDo(),C("#events_threshold").on("click",function(){v.socket.emit("eventsThreshold",!1)})}function j(){var n=[],e=[];y={};for(var t=0;t'+m+"\n",C("#"+d).length)C("#"+d).hide().appendTo(C("body"));else{var f='
    ';C(f).hide().appendTo(C("body")),C("#"+d).find(".iframe-in-tab").on("load",function(){var e=C(this).contents().find("body>header");e&&e.length||(e=C(this).contents().find("head")),e&&e.length&&e.append('')})}}}if(C(".tab-custom").each(function(){-1===n.indexOf(C(this).attr("id"))&&C("#"+C(this).attr("id")).remove()}),v.systemConfig.common.tabs||(v.systemConfig.common.tabs=n),C(".link-replace").length){var p=0,b=setTimeout(function(){b=null,w()},100);C(".link-replace").each(function(){p++,v.tabs.instances._replaceLinks(C(this).data("src"),C(this).data("adapter"),C(this).data("instance"),C(this).attr("id"),function(e,t,n,i){C("#"+i).data("src",e).removeClass("link-replace"),--p||b&&(clearTimeout(b),b=null,w())})})}else w()}function L(a){v.socket.emit("getAllObjects",function(e,i){e?window.alert(_(e)):setTimeout(function(){var e;for(var t in v.objects=i,v.objects)v.objects.hasOwnProperty(t)&&"_design"!==t.slice(0,7)&&("instance"===(e=v.objects[t]).type&&v.instances.push(t),"enum"===e.type&&g.enums.list.push(t),"user"===e.type&&g.users.list.push(t),"group"===e.type&&g.users.groups.push(t),"adapter"===e.type&&g.adapters.list.push(t),"host"===e.type&&g.hosts.addHost(e),e.common&&e.common.history&&(e.common.custom=JSON.parse(JSON.stringify(e.common.history)),delete e.common.history));for(var n in v.objectsLoaded=!0,v.initHostsList(!0),j(),v.dialogs)v.dialogs.hasOwnProperty(n)&&"function"==typeof v.dialogs[n].prepare&&v.dialogs[n].prepare();!function n(i,a){a=a||0,i&&a'+a.icon+"";var s;n="instance"===e.type?"/adapter/"+e.common.name+"/"+e.common.icon:e._id.match(/^system\.adapter\./)?(s=e._id.split(".",3),"/"===a.icon[0]?s[2]+=a.icon:s[2]+="/"+a.icon,"/adapter/"+s[2]):(s=e._id.split(".",2),"/"===a.icon[0]?s[0]+=a.icon:s[0]+="/"+a.icon,"/adapter/"+s[0])}i=e.type}return{icon:n,alt:i}}v.initHostsList=function(e){var t=C("#host-adapters");if(!e||!t.data("inited")){t.data("inited",!0),v.currentHost=v.currentHost||v.config.currentHost||"";for(var n,i=[],a=0;a'+v.getHostIcon(v.objects[v.tabs.hosts.list[a].id],"imgHost left")+v.tabs.hosts.list[a].name+""),v.currentHost||(v.currentHost=v.tabs.hosts.list[a].name),v.currentHost===v.tabs.hosts.list[a].name&&(n=v.tabs.hosts.list[a].id);t.html(i);var s=C("#host-adapters-btn").show();s.text(_("Host:")+" "+v.currentHost).dropdown(),v.objects[n]&&v.objects[n].common&&v.objects[n].common.color,s.append(C(v.getHostIcon(v.objects[n],"imgHost left"))),v.tabs.hosts.list.length<2?s.addClass("disabled"):s.removeClass("disabled"),t.find("a").on("click",function(){var e=C(this).data("value"),t="system.host."+e+".alive";v.states[t]&&v.states[t].val&&"null"!==v.states[t].val?(v.currentHost=e,C("#host-adapters-btn").text(_("Host:")+" "+v.currentHost).append(C(this).find(".imgHost").clone()),console.log(v.currentTab),T["tab-"+v.currentTab]&&T["tab-"+v.currentTab].host&&(v.tabs[v.currentTab]&&"function"==typeof v.tabs[v.currentTab].destroy&&v.tabs[v.currentTab].destroy(),v.tabs[v.currentTab]&&"function"==typeof v.tabs[v.currentTab].init&&v.tabs[v.currentTab].init()),v.saveConfig("currentHost",v.currentHost)):v.showMessage(_("Host %s is offline",C(this).val()))})}},v.resubscribeStates=function(){for(var e in v.subscribesStates)v.subscribesStates.hasOwnProperty(e)&&v.subscribesStates[e]&&(console.debug("Re-Subscribe: "+e),v.socket.emit("subscribe",e))},v.resubscribeObjects=function(){for(var e in v.subscribesObjects)v.subscribesObjects.hasOwnProperty(e)&&v.subscribesObjects[e]&&v.socket.emit("subscribeObjects",e)},v.resubscribeLogs=function(){v.subscribesLogs&&(console.debug("Subscribe LOG"),v.socket.emit("requireLog",!0))},v.subscribeStates=function(e){if(e)if("object"==typeof e)for(var t=0;tiframe");d.attr("src")&&(console.log("clear"),d.attr("src",""))}}if(v.currentTab=n,o.hide().appendTo("body"),i||(r.addClass("admin-sidemenu-body-content").show().appendTo(s),o=r),g[n]&&"function"==typeof g[n].init&&g[n].init(),r.length&&(c=r.data("src")))if(-1===c.indexOf("%")){var u=r.find(">iframe");u.length&&!u.attr("src")&&u.attr("src",c)}else f.data("problem-link","tab-"+n)}var m=f.find('.admin-sidemenu-items[data-tab="tab-'+n+'"]');f.find(".admin-sidemenu-items").not(m).removeClass("admin-sidemenu-active"),m.addClass("admin-sidemenu-active"),T["tab-"+n]&&T["tab-"+n].host?C("#host-adapters-btn").css("opacity",1):C("#host-adapters-btn").css("opacity",.3),document.title=n+" - yunkong2",v.currentDialog!==i&&(v.dialogs[v.currentDialog]&&"function"==typeof v.dialogs[v.currentDialog].destroy&&v.dialogs[v.currentDialog].destroy(),(v.currentDialog=i)&&v.dialogs[i]?("function"==typeof v.dialogs[i].init&&v.dialogs[i].init(a?a.split(","):void 0),g[v.currentTab]&&g[v.currentTab].saveScroll&&g[v.currentTab].saveScroll(),o.hide().appendTo("body"),C("#dialog-"+i).addClass("admin-sidemenu-body-content").show().appendTo(s)):o.attr("id")!==r.attr("id")&&(o.hide().appendTo("body"),r.addClass("admin-sidemenu-body-content").show().appendTo(s),g[v.currentTab]&&g[v.currentTab].restoreScroll&&g[v.currentTab].restoreScroll()))}})},v.getIconFromObj=function(e,t,n){var i="",a="";if(e&&e.common)if(e.common.icon){var s=N(e);i=s.icon,a=s.alt}else t=t||"lib/css/fancytree/","device"===e.type?(i=t+"device.png",a="device"):"channel"===e.type?(i=t+"channel.png",a="channel"):"state"===e.type&&(i=t+"state.png",a="state");return i?''+(a||':""},v.getIcon=function(e,t,n,i){return v.getIconFromObj((n||v.objects)[e],t,i)},v.getHostIcon=function(e,t){var n="",i="";if(e&&e.common&&e.common.icon){var a=N(e);n=a.icon,i=a.alt}return''+(i=i||'},v.formatBytes=function(e){if(Math.abs(e)<1024)return e+" B";for(var t=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],n=-1;e/=1024,++n,1024<=Math.abs(e)&&n'+t.admin.styles+"")}}if(v.systemConfig&&v.systemConfig.common&&v.systemConfig.common.tabs){var i=v.systemConfig.common.tabs.indexOf("tab-log");-1!==i&&(v.systemConfig.common.tabs[i]="tab-logs")}v.socket.emit("getObject","system.repositories",function(e,t){v.dialogs.system.systemRepos=t,v.socket.emit("getObject","system.certificates",function(e,t){setTimeout(function(){if(v.dialogs.system.systemCerts=t,"permissionError"===a)v.systemConfig={common:{language:systemLang},error:"permissionError"};else if(!a&&v.systemConfig&&v.systemConfig.common){if(systemLang=v.systemConfig.common.language||systemLang,v.systemConfig.common.city=v.systemConfig.common.city||"",v.systemConfig.common.country=v.systemConfig.common.country||"",v.systemConfig.common.longitude=v.systemConfig.common.longitude||"",v.systemConfig.common.latitude=v.systemConfig.common.latitude||"",!v.systemConfig.common.licenseConfirmed){var n=(v.systemConfig.common.language||window.navigator.userLanguage||window.navigator.language||"").substring(0,2);"en"!==n&&(n="cn"),systemLang=n,d.find(".license_text").html(license[n]||license.en),d.find(".license_checkbox").prop("checked",!1),d.find(".license_language").data("licenseConfirmed",!1).val(n).on("change",function(){n=C(this).val(),d.find(".license_language_label").html(translateWord("Select language",n)),d.find(".license_text").html(license[n]||license.en),d.find(".license_checkbox").html(translateWord("license_checkbox",n)),d.find(".license_agree .translate").html(translateWord("agree",n)),d.find(".license_non_agree .translate").html(translateWord("not agree",n)),d.find(".license_terms").html(translateWord("License terms",n)),d.find(".license_agreement_label").html(translateWord("license agreement",n))}).select(),d.find(".license_diag").on("change",function(){C(this).prop("checked")?d.find(".license_agree").removeClass("disabled"):d.find(".license_agree").addClass("disabled")}),d.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=C(this).prev();e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),d.modal({dismissible:!1,complete:function(){d.find(".license_text").html(""),location.reload()}}).modal("open"),d.find(".license_agree").addClass("disabled").off("click").on("click",function(e){e.preventDefault(),e.stopPropagation(),v.socket.emit("getObject","system.config",function(e,t){!e&&t?(t.common=t.common||{},t.common.licenseConfirmed=!0,t.common.language=n,v.socket.emit("setObject","system.config",t,function(e){e&&v.showError(e),d.modal("close"),d.find(".license_agree").off("click"),d.find(".license_non_agree").off("click")})):v.showError(_("Cannot confirm: "+e))})}),d.find(".license_non_agree").off("click").on("click",function(e){location.reload()})}}else v.systemConfig={type:"config",common:{name:"system.config",city:"",country:"",longitude:"",latitude:"",language:"",tempUnit:"°C",currency:"",dateFormat:"DD.MM.YYYY",isFloatComma:!0,licenseConfirmed:!1,defaultHistory:"",tabs:["tab-intro","tab-adapters","tab-instances","tab-objects","tab-logs","tab-scenes","tab-javascript","tab-text2command-0"]}},v.systemConfig.common.language=window.navigator.userLanguage||window.navigator.language,"en"!==v.systemConfig.common.language&&(v.systemConfig.common.language="cn");for(var e in translateCron(),translateAll(),"function"==typeof initGridLanguage&&initGridLanguage(v.systemConfig.common.language),l.modal({dismissible:!1}),u.modal(),m.modal({dismissible:!1}),l.find(".progress-show-more").off("change").on("change",function(){var e=C(this).prop("checked");v.saveConfig("progressMore",e),e?l.find(".textarea").show():l.find(".textarea").hide()}),void 0===v.config.progressClose&&(v.config.progressClose=!0),l.find(".progress-dont-close input").on("change",function(){v.saveConfig("progressClose",C(this).prop("checked"))}),l.find('input[type="checkbox"]+span').off("click").on("click",function(){var e=C(this).prev();e.parent().parent().hasClass("switch")||e.prop("disabled")||e.prop("checked",!e.prop("checked")).trigger("change")}),l.find(".progress-dont-close input").prop("checked",v.config.progressClose),l.find(".progress-show-more").prop("checked",!!v.config.progressMore).trigger("change"),l.find(".btn").on("click",function(){l.data("finished")?p.find(".button-command").hide():p.find(".button-command").show()}),p.find(".button-command").on("click",function(){l.modal("open")}),g)g.hasOwnProperty(e)&&g[e]&&"function"==typeof g[e].prepare&&g[e].prepare();var i;i=L,g.states&&g.states.clear(),v.socket.emit("getStates",function(e,t){v.states=t,"function"==typeof i&&setTimeout(function(){i()},0)})},0)})})})})):(v.resubscribeStates(),v.resubscribeObjects(),v.resubscribeLogs()),v.waitForRestart&&location.reload()}),v.socket.on("disconnect",function(){C("#connecting").show()}),v.socket.on("reconnect",function(){C("#connecting").hide(),v.waitForRestart&&location.reload()}),v.socket.on("repoUpdated",function(){setTimeout(function(){g.adapters.init(!0)},0)}),v.socket.on("reauthenticate",function(){location.reload()})})}(jQuery);var license={en:'The MIT License (MIT)

    Copyright © 2014-2018 spacen

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    ',cn:'The MIT License (MIT)

    Copyright © 2014-2018 spacen

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    '},addAll2FilterCombobox=!1;function IobListHeader(e,h){if(!(this instanceof IobListHeader))return new IobListHeader(e,h);var f,a,p;void 0===h&&(h={}),void 0===h.colWidthOffset&&(h.colWidthOffset=0),"TABLE"===(p="object"==typeof e?$(e):$("#"+e))[0].tagName&&(p=p.find("tr:first")),e=p[0];var n,b=this;b.selectIdOffset=[],p.html(""),this.setList=function(e){var t;(t="string"==typeof e?("#"!==e[0]&&(e="#"+e),$(e)):e)&&t.length&&("TD"!==t[0].tagName&&"TH"!==t[0].tagName&&((t=t.find(">thead>tr:first>th,>thead>tr:first>td")).length||(t=e.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td"))),a=t)},h.list&&this.setList(h.list),this.syncHeader=function(){if("object"==typeof a){var e=function(){a.each(function(e,t){if(!(e>=a.length-1)){var n=$(t).width(),i=b.selectIdOffset[e]||0;n+i&&$(f[e]).width(Math.round(n+i))}}),a.length&&!b.selectIdOffset.length&&(b.selectIdOffset[0]=0,a.each(function(e,t){var n=$(a[e]).offset().left;n&&(b.selectIdOffset[e]=n-$(f[e]).offset().left)}),e())};e()}},$(window).on("resize",function(e,t){n&&clearTimeout(n),n=setTimeout(b.syncHeader.bind(b),100)}),this.doFilter=function(){},b.ids=[],b.add=function(t,m,e,n){void 0===e&&(e=m);var i,a,s=!(i=e)||a&&"#"===i[0]?i:(h.prefix&&i.substr(0,h.prefix.length)!==h.prefix&&(i=h.prefix+"-"+i),(a?"#":"")+i);m=_(m);var o="";switch(t){case"combobox":o=' ';break;case"edit":o=' ';break;case"text":o=''+m+""}p.append(""+o+"");var r="#"+s,g=$(r),c=b[e]={$filter:g,val:g.val.bind(g),selectedVal:g.val()||""};if(b.ids.push(e),"combobox"===t&&(c.options=[],c.checkAddOption=function(e,t,n){if(-1===this.options.indexOf(e)){this.options.push(e),this.options.sort();for(var i,a,s=g.val(),o=n?"":(i=m,a=s,addAll2FilterCombobox&&(i=i?_(i)+" ("+_("all")+")":_("all")),'"),r=0,c=this.options.length;r"+t+""}},n))for(var l=0;lclose'),g.on("change",function(e){d&&clearTimeout(d),c.selectedVal=g.val(),d=setTimeout(b.doFilter,"combobox"!==t?400:0),c.selectedVal?g.parent().addClass("filter-active"):g.parent().removeClass("filter-active")}).on("keyup",function(e){13===e.which?b.doFilter():g.trigger("change")}),f=p.find(">th"),c}}function values2table(r,c,e){"object"==typeof r&&(e=c,c=r,r="");var l=e&&e.maxRaw||null,d=e&&e.onChange||null,u=e&&e.onReady||null;c=c||[];var o,s=[],m=(o=r?$("#"+r):$("body")).find(".table-button-add");if(m.data("raw",c.length),l&&m.data("maxRaw",l),m.data("inited")||(m.data("inited",!0),m.on("click",function(){if(!m.data("maxRaw")||m.data("raw")';for(var a=0;a';else if("select"===s[a].type.substring(0,6)){f+=("multiple"===s[a].type.substring(7,16)?'"}else f+='';if(g[a]){p="text-align: center; "+(g[a].style||"")+(g[a].tdstyle||"");for(var v=0;v':f+='';g[a].class&&(t+=' class="'+g[a].class+'" ')}p.length||b.length?t+=' style="'+p+b+'">'+f+"":t+=">"+f+""}t+=""}var w=h.find(".table-lines");w.length||(h.append(''),w=h.find(".table-lines")),w.html(t),w.find(".values-input").each(function(){var e=$(this),t=e.attr("type"),n=e.data("name"),i=e.data("index");e.data("old-value",c[i][n]),"checkbox"===t?e.prop("checked",c[i][n]):e.val(c[i][n])}),w.find("a[data-command]").each(function(){var e=$(this).data("command");"delete"===e?$(this).on("click",function(){var e=$(this).data("index"),t=c[e];c.splice(e,1),d&&d(),setTimeout(function(){"function"==typeof tableEvents&&tableEvents(e,t,"delete"),values2table(r,c,d,u,l)},100),m.data("maxRaw")&&m.data("raw",m.data("raw")-1)}).addClass("red").find(".material-icons").html("delete"):"up"===e?$(this).on("click",function(){var e=$(this).data("index"),t=c[e];c.splice(e,1),c.splice(e-1,0,t),d&&d(),setTimeout(function(){values2table(e,c,d,u,l)},100)}).find("i").html("arrow_upward"):"down"===e?$(this).on("click",function(){var e=$(this).data("index"),t=c[e];c.splice(e,1),c.splice(e+1,0,t),d&&d(),setTimeout(function(){values2table(e,c,d,u,l)},100)}).find("i").html("arrow_downward"):"pair"===e?$(this).on("click",function(){if("function"==typeof tableEvents){var e=$(this).data("index"),t=c[e];tableEvents(e,t,"pair")}}).attr("title",_("pair")).find("i").html("insert_link"):"unpair"===e&&$(this).on("click",function(){if("function"==typeof tableEvents){var e=$(this).data("index"),t=c[e];tableEvents(e,t,"unpair")}}).attr("title",_("unpair")).find("i").html("not_interested")}),w.find(".values-input").on("change.adaptersettings",function(){var e=$(this).data("index"),t=$(this).data("name");"checkbox"===$(this).attr("type")?($(this).prop("checked").toString()!==$(this).data("old-value")&&d&&d(t,e),c[e][t]=$(this).prop("checked")):($(this).val()!==$(this).data("old-value")&&d&&d(t,e),c[e][t]=$(this).val())}).on("keyup",function(){$(this).trigger("change.adaptersettings")})}"function"==typeof u&&u()}function table2values(e){var t;t=e?$("#"+e):$("body");var n=[];t.find(".table-values th").each(function(){var e=$(this).data("name");e?n.push(e):n.push("___ignore___")});var i=[],a=0;return t.find(".table-lines tr").each(function(){i[a]={},$(this).find("td").each(function(){var e=$(this).find("input");if(e.length){var t=e.data("name");"checkbox"===e.attr("type")?i[a][t]=e.prop("checked"):i[a][t]=e.val()}var n=$(this).find("select");if(n.length){t=n.data("name");i[a][t]=n.val()||""}}),a++}),i}var systemLang="en",systemDictionary={};function translateWord(e,t,n){if(!e)return"";if(t=t||systemLang,(n=n||systemDictionary)[e=e.toString()]){var i=n[e][t];if(i)return i;if("en"!==t&&(i=n[e].en))return i}else"string"!=typeof e||e.match(/_tooltip$/)?"string"!=typeof e&&console.warn("Trying to translate non-text:"+e):console.log('"'+e+'": {"en": "'+e+'", "cn": "'+e+'"},');return e}function translateAll(e,i,a){i=i||systemLang,a=a||systemDictionary,e||(e="body");var t=$(e);t.find(".translate").each(function(e){var t=$(this).attr("data-lang");t||(t=$(this).html(),$(this).attr("data-lang",t));var n=translateWord(t,i,a);n&&$(this).html(n)}),t.find(".translateV").each(function(e){var t=$(this).attr("data-lang-value");t||(t=$(this).attr("value"),$(this).attr("data-lang-value",t));var n=translateWord(t,i,a);n&&$(this).attr("value",n)}),t.find(".translateT").each(function(e){var t=$(this).attr("data-lang-title");t||(t=$(this).attr("title"),$(this).attr("data-lang-title",t));var n=translateWord(t,i,a);n&&$(this).attr("title",n)}),t.find(".translateP").each(function(e){var t=$(this).attr("data-lang-placeholder");t||(t=$(this).attr("placeholder"),$(this).attr("data-lang-placeholder",t));var n=translateWord(t,i,a);n&&$(this).attr("placeholder",n)})}function translateName(e){return e&&"object"==typeof e?e[systemLang]||e.en:e}var _=function(e,t,n,i){var a=(e=translateWord(e)).indexOf("%s");return-1===a||-1===(a=(e=e.replace("%s",t)).indexOf("%s"))||-1!==(a=(e=e.replace("%s",n)).indexOf("%s"))&&(e=e.replace("%s",i)),e};!function(X){if(!X.fn.treeTable){var t={init:function(e){e.imgPath=e.imgPath||"lib/css/fancytree/";for(var t=0;t';n+='
      ';for(var i=e.rows,a=0;a'+(d?"":'')+''+l+""}n+="
    ";var u=X(this),m=X(n);u.find(".treetablelist-buttons").remove(),u.find(".treetable-list").remove(),u.find(".tree-table-buttons").remove(),u.find(".tree-table-main").remove(),u.prepend(m);var g=X(m).find(".treetablelist-buttons"),h=X(m).find(".treetable-list");h.sortable({cancel:".treetable-list-folder",axis:"y"}).data("options",e);var f=this;g.find(".treetable-list-btn-ok").button({icons:{primary:"ui-icon-check"},text:!1}).css({width:24,height:24}).on("click",function(){var i="",a=[];h.find("li").each(function(){var e=X(this).data("id");if(X(this).hasClass("treetable-list-folder"))i=e;else{var t=e.split("."),n=t.pop();t.join(".")!==i&&a.push({oldId:e,newId:i+"."+n})}}),function t(n,i,a){if(i&&i.length){var e=i.shift();n.moveId&&n.moveId(e.oldId,e.newId,function(e){setTimeout(function(){t(n,i,a)},50)})}else a&&a()}(e,a,function(){p.call(f,e)})}),g.find(".treetable-list-btn-cancel").button({icons:{primary:"ui-icon-cancel"},text:!1}).css({width:24,height:24}).on("click",function(){p.call(f,e)})}function ne(e,t,n){var i="",a="",s=e&&e.common;if(s)if(s.icon){if(s.icon.match(/^data:image\//))i=s.icon;else{if(-1===s.icon.indexOf("."))return''+s.icon+"";var o;i="instance"===e.type?"/adapter/"+e.common.name+"/"+e.common.icon:e._id.match(/^system\.adapter\./)?(o=e._id.split(".",3),"/"===e.common.icon[0]?o[2]+=e.common.icon:o[2]+="/"+e.common.icon,"/adapter/"+o[2]):(o=e._id.split(".",2),"/"===e.common.icon[0]?o[0]+=e.common.icon:o[0]+="/"+e.common.icon,"/adapter/"+o[0])}a=e.type}else t=t||"lib/css/fancytree/","device"===e.type?(i=t+"device.png",a="device"):"channel"===e.type?(i=t+"channel.png",a="channel"):"state"===e.type&&(i=t+"state.png",a="state");return i?''+a+'':""}function p(i){var e="",t=window.M&&window.M.toast?"a":"button";if(i.panelButtons){e+='
    ';for(var n=0;n",window.M&&window.M.toast&&(e+=''+(i.panelButtons[n].icon||"")+""),e+="";i.moveId&&(e+="<"+t+' class="btn-floating waves-effect waves-light blue treetable-sort" title="'+_("reorder")+'">',window.M&&window.M.toast&&(e+='import_export'),e+=""),e+="
    "}e+='
    ',e+=" ",e+=' ';for(var a=0;a",e+=' ',e+=' ',e+=" "):e+=" "+_(i.columns[a])+"";i.buttons&&(e+=" "),e+=" ",e+="",e+="";var s=[],o=i.root?new RegExp("^"+i.root.replace(/\./g,"\\.")+"\\."):null,r=-1!==i.columns.indexOf("instance")?[]:null;for(var c in i.objects){var l;if(i.objects.hasOwnProperty(c))if(r&&"instance"===i.objects[c].type&&(l=c.match(/^system\.adapter\.javascript\.(\d+)$/))&&r.push(l[1]),!o||o.test(c)){var d=i.objects[c].common,u={id:c,parent:null,_class:"treetable-"+i.objects[c].type};"channel"===i.objects[c].type&&(u.folder=!0);for(var m=0;mt.id?1:e.id',s[z].children&&s[z].children.length&&(e+=''+s[z].children.length+"")):e+='"}if(i.buttons){e+='"}e+=""}e+="";var R=X(this),H=X(e);R.find("span:first-child").remove(),R.find(".treetablelist-buttons").remove(),R.find(".treetable-list").remove(),R.find(".tree-table-buttons").remove(),R.find(".tree-table-main").remove(),R.prepend(H),i.rows=s;var B=X(H[1]).find(">table"),G=X(H[0]);B.data("options",i),B.treetable({expandable:!0,clickableNodeNames:!0,expanderTemplate:"",indenterTemplate:'',onNodeExpand:q,onNodeCollapse:ee,stringCollapse:_("collapse"),stringExpand:_("expand")});var F=B.find("tbody");if(F.on("click","tr",function(){X(".selected").not(this).removeClass("selected"),X(this).addClass("selected");var e=X(this).parent().parent().data("options"),t=X(this).data("tt-id");e.onChange&&e.onChange(X(this).data("tt-id"),e.oldId),e.oldId=t}),i.buttons)for(var Z=0;Z"%s"?',en:'Are you sure to delete "%s"?'},'Are you sure to delete all children of %s?':{cn:'确定删除 %s 的全部子项?',en:'Are you sure to delete all children of %s?'},"Are you sure to delete all children of %s?":{cn:'你确定删除 "%s"全部的子项目?',en:'Are you sure to delete "%s" and all children?'},"Are you sure to delete script %s?":{cn:"你确定删除脚本 '%s'?",en:"Are you sure to delete script '%s'?"},"Are you sure you want to delete adapter %s?":{cn:"你确定删除适配器: %s?",en:"Are you sure you want to delete adapter %s?"},"Are you sure you want to delete the instance %s?":{cn:"你确定要删除这个实例: %s?",en:"Are you sure you want to delete the instance %s?"},"Are you sure?":{cn:"你确定吗?",en:"Are you sure?"},"Are you sure? Changes are not saved.":{cn:"数据没有保存,你确定啊吗?",en:"Are you sure? Changes are not saved."},Aug:{cn:"Aug",en:"Aug"},August:{cn:"August",en:"August"},Available:{cn:"Available",en:"Available"},"Available version:":{cn:"Available version",en:"Available version"},CPUs:{cn:"CPUs",en:"CPUs"},Calendar:{cn:"Calendar",en:"Calendar"},Cancel:{cn:"取消",en:"Cancel"},"Cannot create user: ":{cn:"不能创建 用户: ",en:"Cannot create user: "},"Cannot delete user: ":{cn:"不能删除用户: ",en:"Cannot delete user: "},"Cannot disable admin!":{cn:"不能停用管理员!",en:"Cannot disable admin!"},"Cannot read file!":{cn:"无法读取文件!",en:"Cannot read file!"},"Cannot read version from NPM":{cn:"Could not read version from NPM",en:"Could not read version from NPM"},"Cannot set password: ":{cn:"不能设置密码: ",en:"Cannot set password: "},Certificates:{cn:"证书",en:"Certificates"},Change:{cn:"修改",en:"Change"},Changelog:{cn:"Change log",en:"Change log"},Channel:{cn:"Channel",en:"Channel"},Chart:{cn:"Chart",en:"Chart"},"Chart for %s":{cn:"Chart for %s",en:"Chart for %s"},"Check all":{cn:"检查所有",en:"Check all"},China:{cn:"中国",en:"China"},"City:":{cn:"城市",en:"City"},Clear:{cn:"清除",en:"Clear"},"Clear list":{cn:"清除",en:"Clear list"},"Clear log":{cn:"清除",en:"Clear log"},"Clear on disk permanent":{cn:"Clear on disk permanent",en:"Clear on disk permanent"},"Click do activate events again, or just wait one minute":{cn:"Click do activate events again, or just wait one minute",en:"Click do activate events again, or just wait one minute"},"Click on icon":{cn:"Click on icon to open a link",en:"Click on icon to open a link"},Close:{cn:"关闭",en:"close"},"Collapse all nodes":{cn:"收起全部",en:"Collapse all nodes"},Color:{cn:"颜色",en:"Color"},"Configuration not saved.":{cn:"配置信息没有存储.",en:"Configuration not saved."},"Connected to %s: ":{cn:"Connected to %s: ",en:"Connected to %s: "},"Connected to host: ":{cn:"Connected to host: ",en:"Connected to host: "},"Copy log":{cn:"复制",en:"Copy log"},"Copy to clipboard":{cn:"拷贝",en:"Copy to clipboard"},"Country:":{cn:"国家/地区",en:"Country"},Create:{cn:"创建",en:"Create"},"Create new category":{cn:"Create new category",en:"Create new category"},"Create new category, like %s":{cn:"Create new category, like %s",en:"Create new category, like %s"},"Create new enum":{cn:"创建新的枚举",en:"Create new enum"},"Create new enum, like %s":{cn:"Create new enum, like %s",en:"Create new enum, like %s"},"Create new group":{cn:"Create new group",en:"Create new group"},"Create new user":{cn:"创建新用户",en:"Create new user"},Created:{cn:"Created",en:"Created"},Croatia:{cn:"Croatia",en:"Croatia"},"Cron expression":{cn:"Cron expression",en:"Cron expression"},"Currency:":{cn:"货币",en:"Currency"},Custom:{cn:"自定义",en:"Custom"},D$ecember:{cn:"D$ecember",en:"D$ecember"},"DD.MM.YY":{cn:"DD.MM.YY",en:"DD.MM.YY"},"DD.MM.YYYY":{cn:"DD.MM.YYYY",en:"DD.MM.YYYY"},"DD/MM/YYYY":{cn:"DD/MM/YYYY",en:"DD/MM/YYYY"},"Date From":{cn:"Date From",en:"Date From"},"Date To":{cn:"Date To",en:"Date To"},"Date format:":{cn:"时间格式",en:"Date format"},"Deactivated. Click to start.":{cn:"Deactivated. Click to start.",en:"Deactivated. Click to start."},"Debug outputs:":{cn:"调试输出",en:"Debug outputs"},Dec:{cn:"Dec",en:"Dec"},December:{cn:"December",en:"December"},"Default ACL":{cn:"缺省 ACL",en:"Default ACL"},"Default history instance:":{cn:"缺省的数据记录实例",en:"Default history instance"},"Delete attribute":{cn:"删除",en:"Delete attribute"},"Delete category":{cn:"删除",en:"Delete category"},"Delete enum":{cn:"删除",en:"Delete enum"},"Delete member":{cn:"删除",en:"Delete member"},"Delete object":{cn:"删除",en:"Delete object"},Denmark:{cn:"Denmark",en:"Denmark"},Description:{cn:"说明",en:"Description"},Device:{cn:"Device",en:"Device"},"Device discovery":{cn:"Device discovery",en:"Device discovery"},"Disk free":{cn:"磁盘空闲",en:"Disk free"},"Disk free:":{cn:"磁盘空闲:",en:"Disk free:"},"Disk size":{cn:"磁盘大小",en:"Disk size"},'Do you want to delete just one object or all children of %s too?':{cn:'Do you want to delete just one object or all children of %s too?',en:'Do you want to delete just one object or all children of %s too?'},"Do you want to upgrade all adapters?":{cn:"Do you want to upgrade all adapters?",en:"Do you want to upgrade all adapters?"},"Domains:":{cn:"Domains",en:"Domains"},Dominica:{cn:"Dominica",en:"Dominica"},"Done with error: %s":{cn:"Done with error: %s",en:"Done with error: %s"},"Download log":{cn:"下载",en:"Download log"},"Drop the files here":{cn:"拖放文件到这里",en:"Drop the files here"},"Drop the icons here":{cn:"拖放图标文件到这里",en:"Drop the icons here"},Ecuador:{cn:"Ecuador",en:"Ecuador"},Edit:{cn:"编辑",en:"Edit"},"Edit category":{cn:"编辑 category",en:"Edit category"},"Edit enum":{cn:"编辑 enum",en:"Edit enum"},"Edit in dialog":{cn:"编辑 in dialog",en:"Edit in dialog"},"Edit object":{cn:"编辑 object",en:"Edit object"},Egypt:{cn:"Egypt",en:"Egypt"},"El Salvador":{cn:"El Salvador",en:"El Salvador"},"Email for account:":{cn:"Email for account",en:"Email for account"},Enums:{cn:"枚举",en:"Enums"},Error:{cn:"错误",en:"Error"},Event:{cn:"类型",en:"Type"},Events:{cn:"事件",en:"Events"},Everyone:{cn:"Everyone",en:"Everyone"},"Expand all nodes":{cn:"Expand all nodes",en:"Expand all nodes"},"Failed to open JSON File":{cn:"Failed to open JSON file",en:"Failed to open JSON file"},"Falkland Islands (Malvinas)":{cn:"Falkland Islands (Malvinas)",en:"Falkland Islands (Malvinas)"},"Faroe Islands":{cn:"Faroe Islands",en:"Faroe Islands"},Feb:{cn:"Feb",en:"Feb"},February:{cn:"February",en:"February"},"File is too big!":{cn:"File is too big!",en:"File is too big!"},"File rights":{cn:"File rights",en:"File rights"},"Filter:":{cn:"查找",en:"Filter"},"Filtered out":{cn:"Everything is filtered out",en:"Everything is filtered out"},"Find coordinates...":{cn:"Find coordinates...",en:"Find coordinates..."},"Float divider:":{cn:"小数点",en:"Float divider"},"Free RAM:":{cn:"空闲:",en:"Free:"},Fri:{cn:"Fri",en:"Fri"},From:{cn:"From: ",en:"From: "},"From github":{cn:"软件仓库",en:"From github"},Function:{cn:"Function",en:"Function"},"Generated ID:":{cn:"Generated ID",en:"Generated ID"},"Go to Github...":{cn:"Go to Github...",en:"Go to Github..."},Group:{cn:"Group",en:"Group"},Groups:{cn:"Groups",en:"Groups"},"Has no permission to %s %s %s":{cn:"Has no permission to %s %s %s",en:"Has no permission to %s %s %s"},"Heard and Mc Donald Islands":{cn:"Heard and Mc Donald Islands",en:"Heard and Mc Donald Islands"},"Heartbeat: ":{cn:"心跳: ",en:"Heartbeat: "},"Hong Kong":{cn:"中国香港",en:"Hong Kong"},Host:{cn:"Host",en:"Host"},"Host %s is offline":{cn:"Host %s is offline",en:"Host %s is offline"},"Host:":{cn:"Host",en:"Host"},Hosts:{cn:"Hosts",en:"Hosts"},ID:{cn:"ID",en:"ID"},"Icon upload":{cn:"Icon upload",en:"Icon upload"},"In background":{cn:"后台运行",en:"In background"},Info:{cn:"信息",en:"Info"},Insert:{cn:"插入",en:"Insert"},Install:{cn:"安装",en:"Install"},"Install adapter from URL":{cn:"安装或升级",en:"Install or update the adapter from URL"},"Install adapter from github":{cn:"软件仓库安装或升级",en:"Install or update the adapter from Github"},"Install from custom URL":{cn:"自定义 URL 安装",en:"Install from custom URL"},"Install or update from URL...":{cn:"正在安装...",en:"Install or update from URL..."},"Installation counter":{cn:"Installations counter",en:"Installations counter"},"Installations counter":{cn:"Installations counter",en:"Installations counter"},Installed:{cn:"已安装",en:"Installed"},"Installed from group":{cn:"Installed from group",en:"Installed from group"},"Installed instances":{cn:"已安装的实例",en:"Installed instances"},"Installed version":{cn:"已安装版本",en:"Installed version"},Instances:{cn:"实例",en:"Instances"},Instructions:{cn:"指令",en:"Instructions"},Intro:{cn:"总览",en:"Overview"},"Invalid version of %s":{cn:"Invalid version of %s",en:"Invalid version of %s"},"Invalid version of %s. Required %s":{cn:"Invalid version of %s. Required %s",en:"Invalid version of %s. Required %s"},"Is yet in the list":{cn:"已经在列表中",en:"It's already in the list"},Jan:{cn:"Jan",en:"Jan"},January:{cn:"January",en:"January"},Jul:{cn:"七月",en:"Jul"},July:{cn:"July",en:"July"},Jun:{cn:"Jun",en:"Jun"},June:{cn:"June",en:"June"},"Known bugs for":{cn:"Known bugs for",en:"Known bugs for"},"Last changed":{cn:"上次修改",en:"Last changed"},"Last update":{cn:"上次更新",en:"Last update"},"Latitude:":{cn:"纬度",en:"Latitude"},"Let's Encrypt settings":{cn:"Let's Encrypt settings",en:"Let's Encrypt settings"},"Let's encrypt SSL":{cn:"Let's encrypt SSL",en:"Let's encrypt SSL"},License:{cn:"许可",en:"License"},"License terms":{cn:"许可条款",en:"License terms"},"Listen on all IPs":{cn:"Listen on all IPs",en:"Listen on all IPs"},"Loading...":{cn:"正在加载...",en:"Loading..."},Log:{cn:"日志",en:"Log"},"Log file will be deleted. Are you sure?":{cn:"日志文件将被删除,你确定吗?",en:"Log file will be deleted. Are you sure?"},"Log size:":{cn:"文件大小",en:"Log size"},"Login timeout(sec):":{cn:"登录超时 (秒)",en:"Login timeout (sec)"},Logout:{cn:"退出",en:"Logout"},"Longitude:":{cn:"经度",en:"Longitude"},MB:{cn:"Mb",en:"Mb"},Main:{cn:"Main",en:"Main"},"Main settings":{cn:"主设置",en:"Main settings"},"Manually created":{cn:"手工创建",en:"Manually created"},Mar:{cn:"三月",en:"Mar"},March:{cn:"三月",en:"March"},Members:{cn:"Members",en:"Members"},Message:{cn:"消息",en:"Message"},"Message buffer overflow. Losing oldest":{cn:"Message buffer overflow. Losing oldest.",en:"Message buffer overflow. Losing oldest."},Model:{cn:"Model",en:"Model"},Mon:{cn:"Mon",en:"Mon"},NPM:{cn:"NPM",en:"NPM"},Name:{cn:"名称",en:"Name"},"Name:":{cn:"名称",en:"Name"},New:{cn:"新建",en:"New"},"New category":{cn:"新类别",en:"New category"},"New enum":{cn:"新类别",en:"New enum"},"New group":{cn:"新群组",en:"New group"},"New object":{cn:"新对象",en:"New object"},"New objekt":{cn:"新对象",en:"New object"},"New user":{cn:"新用户",en:"New user"},"No data":{cn:"暂无数据",en:"No data"},"No states selected!":{cn:"No states selected!",en:"No states selected!"},"No version of %s":{cn:"No version of %s",en:"No version of %s"},"Node.js":{cn:"Node.js",en:"Node.js"},Norway:{cn:"Norway",en:"Norway"},"Not exists":{cn:"不存在",en:"Does not exist"},"Note:":{cn:"Note",en:"Note"},Nov:{cn:"十一月",en:"Nov"},November:{cn:"十一月",en:"November"},OS:{cn:"OS",en:"OS"},'Object "%s" does not exists. Update the page.':{cn:'Object "%s" 不存在,请刷新.',en:'Object "%s" does not exist. Update the page.'},"Object may not be deleted":{cn:"对象不能被删除",en:"Object may not be deleted"},"Object rights":{cn:"对象权限",en:"Object rights"},Objects:{cn:"对象",en:"Objects"},Oct:{cn:"十月",en:"Oct"},October:{cn:"十月",en:"October"},Ok:{cn:"确认",en:"Ok"},"Only one":{cn:"Only one",en:"Only one"},"Open original":{cn:"在新标签中打开",en:"Open on new tab"},Owner:{cn:"Owner",en:"Owner"},"Owner group":{cn:"Owner group",en:"Owner group"},"Owner user":{cn:"Owner user",en:"Owner user"},Parent:{cn:"Parent",en:"Parent"},"Parse error":{cn:"Parse error",en:"Parse error"},Password:{cn:"密码",en:"Password"},"Password and confirmation are not equal!":{cn:"Password and confirmation are not equal!",en:"Password and confirmation are not equal!"},"Password cannot be empty!":{cn:"密码不能为空!",en:"Password cannot be empty!"},"Password repeat":{cn:"Password repeat",en:"Password repeat"},"Path to storage:":{cn:"存储路径",en:"Path to storage"},"Pause output":{cn:"暂停输出",en:"Pause output"},Platform:{cn:"平台",en:"Platform"},"Please confirm":{cn:"请确认",en:"Please confirm"},"Port to check the domain:":{cn:"Port to check the domain",en:"Port to check the domain"},"Preserve ID":{cn:"Preserve ID",en:"Preserve ID"},Preview:{cn:"Preview",en:"Preview"},"Processing...":{cn:"处理中...",en:"Processing..."},RAM:{cn:"内存",en:"RAM"},"RAM total usage:":{cn:"总内存使用:",en:"Total RAM usage:"},"RAM usage":{cn:"使用内存",en:"RAM usage"},"Rebuild tree":{cn:"重建",en:"Rebuild tree"},"Recently updated":{cn:"Recently updated",en:"Recently updated"},"Refresh log":{cn:"刷新",en:"Refresh log"},Removed:{cn:"已删除",en:"Removed"},"Removing of adapter...":{cn:"Removing of adapter...",en:"Removing of adapter..."},"Removing of instance...":{cn:"Removing of instance...",en:"Removing of instance..."},Rename:{cn:"重命名",en:"Rename"},Repositories:{cn:"软件仓库",en:"Repositories"},Rights:{cn:"权限",en:"Access rights"},Role:{cn:"角色",en:"Role"},Room:{cn:"场景",en:"Room"},"Running: ":{cn:"Running: ",en:"Running: "},"Sao Tome and Principe":{cn:"Sao Tome and Principe",en:"Sao Tome and Principe"},Sat:{cn:"星期六",en:"Sat"},Save:{cn:"保存",en:"Save"},"Save Objecttree as JSON File":{cn:"Save objects tree as JSON file",en:"Save objects tree as JSON file"},"Save Objecttree is not possible":{cn:"Saving the objects tree is not possible",en:"Saving the objects tree is not possible"},"Save configuration":{cn:"保存配置",en:"Save configuration"},Script:{cn:"脚本",en:"Script"},Scripts:{cn:"脚本",en:"Scripts"},Select:{cn:"Select",en:"Select"},"Select ID":{cn:"Select ID",en:"Select ID"},"Select adapter:":{cn:"选择适配器",en:"Select adapter"},"Select language":{cn:"选择语言",en:"Select language"},"Select options":{cn:"选项",en:"Select options"},"Sent data:":{cn:"Sent data",en:"Sent data"},Sep:{cn:"九月",en:"Sep"},September:{cn:"九月",en:"September"},Set:{cn:"Set",en:"Set"},"Set CRON":{cn:"Set",en:"Set"},"Set CRON schedule for restarts":{cn:"Set CRON schedule for restarts",en:"Set CRON schedule for restarts"},Settings:{cn:"设置",en:"Settings"},"Settings for %s":{cn:"Settings for %s",en:"Settings for %s"},Seychelles:{cn:"Seychelles",en:"Seychelles"},"Show instances only for current host":{cn:"Show instances only for current host",en:"Show instances only for current host"},"Show values of instance":{cn:"Show values of instance",en:"Show values of instance"},"Show...":{cn:"显示...",en:"Show..."},"Size: %s, Available: %s":{cn:"大小: %s, 剩余: %s"},"Some data are not stored. Discard?":{cn:"有一些修改了的配置信息没有保存. 确认码?",en:"Some data are not stored. Discard?"},"Sort alphabetically":{cn:"Sort alphabetically by name",en:"Sort alphabetically by name"},"Started...":{cn:"Started...",en:"Started..."},State:{cn:"Datapoint",en:"Datapoint"},"State type":{cn:"State type",en:"State type"},States:{cn:"状态",en:"States"},"States rights":{cn:"状态权限",en:"States rights"},Statistics:{cn:"统计",en:"Statistics"},"Statistics:":{cn:"统计",en:"Statistics"},"Storage of %s":{cn:'Storage of %s',en:'Storage of %s'},"Storage of %s states":{cn:'Storage of %s states',en:'Storage of %s states'},"Success!":{cn:"成功!",en:"Success!"},Suggestion:{cn:"推荐",en:"Recommendation"},Sun:{cn:"星期天",en:"Sun"},System:{cn:"系统",en:"System"},"System language:":{cn:"语言",en:"System language"},"System settings":{cn:"系统设置",en:"System settings"},"System uptime":{cn:"System uptime",en:"System uptime"},Table:{cn:"Table",en:"Table"},Taiwan:{cn:"中国台湾",en:"Taiwan"},"Temperature units:":{cn:"温度单位",en:"Temperature units"},'This version of node.js "%s" on "%s" is deprecated. Please install node.js 6, 8 or newer':{cn:'yunkong2 supports the LTS versions 6, 8, 10 or newer of node.js. Please update your version ("%s") on host "%s" to one of the supported versions. We recommend to use Node.js 6.',en:'yunkong2 supports the LTS versions 6, 8, 10 or newer of node.js. Please update your version ("%s") on host "%s" to one of the supported versions. We recommend to use Node.js 6.'},Thu:{cn:"Thu",en:"Thu"},Time:{cn:"Time",en:"Time"},"Time From":{cn:"Time From",en:"Time From"},"Time To":{cn:"Time To",en:"Time To"},"Time stamp":{cn:"Time stamp",en:"Time stamp"},Title:{cn:"标题",en:"Title"},To:{cn:"To",en:"To"},Today:{cn:"今日",en:"Today"},"Toggle expert mode":{cn:"切换模式",en:"Toggle expert mode"},"Toggle states view":{cn:"切换状态视图",en:"Toggle the states view"},"Too many events":{cn:"Too many events",en:"Too many events"},"Total count in group":{cn:"Total count in group",en:"Total count in group"},"Trigger event":{cn:"触发事件",en:"Trigger event"},Type:{cn:"Type",en:"Type"},"URL or file path:":{cn:"URL或安装包路径",en:"URL or file path"},"Unknown file format!":{cn:"Unknown file format!",en:"Unknown file format!"},"Unsupported image format":{cn:"Unsupported image format",en:"Unsupported image format"},Update:{cn:"更新",en:"Update"},"Update objects":{cn:"更新",en:"Update objects"},"Update states":{cn:"更新",en:"Update states"},Updated:{cn:"已更新",en:"Updated"},"Upgrade all adapters":{cn:"升级所有适配器",en:"Upgrade all adapters"},Upload:{cn:"文件上传",en:"File upload"},"Upload admin started":{cn:"Upload of configuration is started",en:"Upload of configuration is started"},"Upload started...":{cn:"上传开始...",en:"Upload started..."},Uptime:{cn:"Uptime",en:"Uptime"},Uruguay:{cn:"Uruguay",en:"Uruguay"},"Use Lets Encrypt certificates:":{cn:"Use Let's Encrypt certificates",en:"Use Let's Encrypt certificates"},"Use this instance for automatic update:":{cn:"Use this instance for automatic update",en:"Use this instance for automatic update"},User:{cn:"用户",en:"User"},"User deleted":{cn:"用户以删除",en:"User deleted"},"User does not exist":{cn:"这个用户不存在",en:"User does not exist"},"User yet exists":{cn:"这个用户已经存在",en:"User already exists"},Users:{cn:"用户",en:"Users"},Value:{cn:"Value",en:"Value"},"Values of %s":{cn:"Values of %s",en:"Values of %s"},"Vatican City State":{cn:"Vatican City State",en:"Vatican City State"},Wed:{cn:"Wed",en:"Wed"},With:{cn:"With",en:"With"},Without:{cn:"Without",en:"Without"},"You are going to add new instance: ":{cn:"You are going to add new instance: ",en:"You are going to add new instance: "},"You can check changelog here":{cn:'You can check the changelog here',en:'You can check the changelog here'},"You can drag&drop the devices, channels and states to enums":{cn:"You can drag&drop the devices, channels and states to enums",en:"You can drag&drop the devices, channels and states to enums"},"You can drag&drop users to groups":{cn:"You can drag&drop users to groups",en:"You can drag&drop users to groups"},"You can't see events via cloud":{cn:"You can't see events via cloud",en:"You can't see events via cloud"},"Your home":{cn:"Your home",en:"Your home"},_All:{cn:"全部",en:"All"},"_Toggle expert mode":{cn:"切换模式",en:"Toggle expert mode"},__different__:{cn:"different",en:"different"},"a-z":{cn:"a-z",en:"a-z"},ack:{cn:"ack",en:"ack"},actions:{cn:"actions",en:"actions"},active:{cn:"active",en:"active"},"adapter with updates":{cn:"adapters with updates",en:"adapters with updates"},"adapters count":{cn:"适配器数",en:"adapters count"},add:{cn:"添加",en:"Add"},"add children":{cn:"添加子节点",en:"add children"},"add instance":{cn:"添加实例",en:"add instance"},"add repository":{cn:"添加仓库",en:"add repository"},agree:{cn:"同意",en:"agree"},alarm_group:{cn:"Alarm",en:"Alarm"},alive:{cn:"alive",en:"alive"},all:{cn:"all",en:"all"},alpha:{cn:"alpha",en:"alpha"},array:{cn:"array",en:"array"},auto:{cn:"auto",en:"auto"},available:{cn:"最新",en:"available"},beta:{cn:"beta",en:"beta"},boolean:{cn:"boolean",en:"boolean"},bug:{cn:"bugtracker",en:"bugtracker"},cancel:{cn:"取消",en:"Cancel"},cert_path_note:{cn:"You can use an absolute path to the certificate, like '/opt/certs/cert.pem', or just upload it per drag&drop",en:"You can use an absolute path to the certificate, like '/opt/certs/cert.pem', or just upload it per drag&drop"},certificate:{cn:"certificate",en:"certificate"},"change view mode":{cn:"模式",en:"change view mode"},channel:{cn:"channel",en:"channel"},clear:{cn:"清除",en:"clear"},"climate-control_group":{cn:"Climate Control",en:"Climate Control"},"close on ready":{cn:"完成后自动关闭",en:"close on ready"},collapse:{cn:"收起",en:"collapse"},"collapse all":{cn:"收起",en:"collapse all"},comma:{cn:"comma",en:"comma"},"command execution":{cn:"执行命令 ",en:"Command execution"},common:{cn:"公共",en:"common"},"common adapters_group":{cn:"公共",en:"Common"},common_color:{cn:"颜色",en:"color"},common_def:{cn:"缺省值",en:"default value"},common_desc:{cn:"说明",en:"description"},common_icon:{cn:"图标",en:"icon"},common_max:{cn:"最大值",en:"max value"},common_min:{cn:"最小值",en:"minimal value"},common_read:{cn:"允许读",en:"read allowed"},common_role:{cn:"角色",en:"role"},common_states:{cn:"预定义值",en:"predefined values"},common_type:{cn:"类型",en:"type"},common_unit:{cn:"量度单位",en:"measure unit"},common_write:{cn:"允许写",en:"write allowed"},communication_group:{cn:"通信",en:"Communication"},config:{cn:"设置",en:"Settings"},"config instance":{cn:"配置实例",en:"config instance"},"confirm password":{cn:"密码确认",en:"Confirm password"},connected:{cn:"已连接",en:"connected"},copy:{cn:"复制",en:"copy"},"copy note":{cn:"Press Ctrl+A and Ctrl+C to copy the log to the clipboard and click with the mouse anywhere to close.",en:"Press Ctrl+A and Ctrl+C to copy the log to the clipboard and click with the mouse anywhere to close."},"create operation":{cn:"创建",en:"create"},"custom enum":{cn:"自定义枚举",en:"?ustom enum"},"custom group":{cn:"自定义群组",en:"Custom group"},daemon:{cn:"daemon",en:"daemon"},"date-and-time_group":{cn:"日期和时间",en:"Date and Time"},daysShortText:{cn:"d.",en:"d."},debug:{cn:"debug",en:"debug"},delete:{cn:"删除",en:"delete"},"delete adapter":{cn:"删除",en:"delete adapter"},"delete group":{cn:"删除",en:"delete group"},"delete instance":{cn:"删除",en:"delete instance"},"delete operation":{cn:"删除",en:"delete"},"delete script":{cn:"删除",en:"delete script"},"delete user":{cn:"删除",en:"delete user"},desc:{cn:"desc",en:"desc"},description:{cn:"说明",en:"Description"},device:{cn:"device",en:"device"},"diag-note":{cn:"We worked hard to create this project. In return we expect from you some usage statistics.
    Every time the adapter list is updated, the anonymized statistics are sent. We respect your privacy, so no private information will be transmitted.
    Thank you!",en:"We worked hard to create this project. In return we expect from you some usage statistics.
    Every time the adapter list is updated, the anonymized statistics are sent. We respect your privacy, so no private information will be transmitted.
    Thank you!"},edit:{cn:"编辑",en:"edit"},"edit enum":{cn:"编辑",en:"edit enum"},"edit file":{cn:"编辑",en:"edit file"},"edit group":{cn:"编辑",en:"edit group"},"edit instance":{cn:"编辑",en:"edit instance"},"edit script":{cn:"编辑",en:"edit script"},"edit user":{cn:"修改",en:"edit user"},"edit value":{cn:"编辑",en:"Edit value"},enabled:{cn:"enabled",en:"enabled"},energy_group:{cn:"能源",en:"Energy"},engine:{cn:"engine",en:"engine"},"engine type":{cn:"engine type",en:"engine type"},error:{cn:"错误",en:"error"},events:{cn:"events",en:"events"},"execute operation":{cn:"Execute operation",en:"Execute operation"},expand:{cn:"展开",en:"expand"},"expand all":{cn:"展开所有",en:"expand all"},extended:{cn:"extended",en:"extended"},false:{cn:"false",en:"false"},"file permissions":{cn:"文件许可",en:"File permissions"},from:{cn:"来自",en:"from"},garden_group:{cn:"农业",en:"Garden"},general_group:{cn:"基本",en:"General"},geoposition_group:{cn:"地理位置",en:"Geo position"},groups:{cn:"groups",en:"groups"},hardware_group:{cn:"硬件",en:"Hardware"},history:{cn:"数据",en:"history"},"history data":{cn:"数据",en:"history data"},host:{cn:"主机",en:"host"},household_group:{cn:"Household",en:"Household"},"http operation":{cn:"http",en:"http"},id:{cn:"ID",en:"ID"},info:{cn:"信息",en:"info"},infrastructure_group:{cn:"环境",en:"Infrastructure"},install:{cn:"安装",en:"install"},"install specific version":{cn:"安装指定版本",en:"Install a specific version"},installed:{cn:"已安装",en:"installed"},"installed adapters":{cn:"Filter adapters with existing instances",en:"Filter adapters with existing instances"},instance:{cn:"实例",en:"instance"},"instance number":{cn:"Desired instance number",en:"Desired instance number"},"yunkong2 Enums":{cn:"yunkong2 enums",en:"yunkong2 enums"},"yunkong2 States":{cn:"yunkong2 states",en:"yunkong2 states"},"yunkong2 adapter instances":{cn:"yunkong2 adapter instances",en:"yunkong2 adapter instances"},"yunkong2 adapter scripts":{cn:"yunkong2 adapter scripts",en:"yunkong2 adapter scripts"},"yunkong2 adapters":{cn:"yunkong2 adapters",en:"yunkong2 adapters"},"yunkong2 certificates":{cn:"yunkong2 certificates",en:"yunkong2 certificates"},"yunkong2 groups":{cn:"yunkong2 groups",en:"yunkong2 groups"},"yunkong2 hosts":{cn:"yunkong2 hosts",en:"yunkong2 hosts"},"yunkong2 repositories":{cn:"yunkong2 repositories",en:"yunkong2 repositories"},"yunkong2 users":{cn:"yunkong2 users",en:"yunkong2 users"},"iot-system_group":{cn:"物联网",en:"IoT systems"},"iot-systems_group":{cn:"物联网系统",en:"IoT Systems"},keywords:{cn:"关键字",en:"keywords"},lc:{cn:"Last change",en:"Last change"},less:{cn:"精简",en:"less"},letsnecrypt_help:{cn:'This are settings for Let\'s Encrypt account. To get the free certificates for your domain. You can read more here.',en:'This are settings for Let\'s Encrypt account. To get the free certificates for your domain. You can read more here.'},letsnecrypt_help_domains:{cn:"E.g: 'example.com, www.example.com'",en:"E.g: 'example.com, www.example.com'"},letsnecrypt_help_email:{cn:"Please use your email address. It will be used for your account.",en:"Please use your email address. It will be used for your account."},letsnecrypt_help_path:{cn:"Directory name where the certificates will be stored. This is always relative to configuration directory",en:"Directory name where the certificates will be stored. This is always relative to configuration directory"},license:{cn:"许可",en:"license"},"license agreement":{cn:"许可协议",en:"license agreement"},"license not agree":{cn:"不同意!",en:"Do not agree with the license!"},license_checkbox:{cn:"同意全部的许可条款",en:"I agree with the collection of anonymous statistics.
    (This can be disabled in settings)"},lighting_group:{cn:"照明",en:"Lighting"},link:{cn:"link",en:"link"},list:{cn:"list",en:"list"},"list operation":{cn:"list elements",en:"list elements"},logic_group:{cn:"逻辑",en:"Logic"},loglevel:{cn:"loglevel",en:"loglevel"},media_group:{cn:"媒体",en:"Media"},members:{cn:"members",en:"members"},memlimit:{cn:"RAM limit",en:"RAM limit"},message:{cn:"消息",en:"message"},messaging_group:{cn:"信使",en:"Messaging"},"misc-data_group":{cn:"Misc. data",en:"Misc. data"},mixed:{cn:"mixed",en:"mixed"},mode:{cn:"mode",en:"mode"},more:{cn:"详细",en:"more"},multi:{cn:"multistate",en:"multistate"},multimedia_group:{cn:"多媒体",en:"Multimedia"},name:{cn:"名称",en:"name"},native:{cn:"原生",en:"native"},network_group:{cn:"网络",en:"Network"},"new certificate":{cn:"new certificate",en:"new certificate"},"new group":{cn:"new group",en:"new group"},"new script":{cn:"new script",en:"new script"},"new user":{cn:"新建用户",en:"new user"},newObject:{cn:"New object",en:"New object"},"no-city":{cn:"no city",en:"no city"},"node-red":{cn:"node-red",en:"node-red"},none:{cn:"none",en:"none"},normal:{cn:"normal",en:"normal"},"not ack":{cn:"not ack",en:"not ack"},"not agree":{cn:"不同意",en:"not agree"},"npm error":{cn:"npm error",en:"npm error"},number:{cn:"number",en:"number"},object:{cn:"object",en:"object"},"object permissions":{cn:"Object permissions",en:"Object permissions"},of:{cn:"/",en:"of"},ok:{cn:"确定",en:"Ok"},"open web page":{cn:"Open web page of adapter",en:"Open web page of adapter"},os:{cn:"OS",en:"operating system"},"other permissions":{cn:"Other permissions",en:"Other permissions"},"parent name":{cn:"parent name",en:"parent name"},password:{cn:"密码",en:"Password"},permissionError:{cn:"Permission error",en:"Permission error"},planned:{cn:"planned",en:"planned"},platform:{cn:"平台",en:"platform"},point:{cn:"point",en:"point"},process:{cn:"process",en:"process"},protocols_group:{cn:"协议",en:"Protocols"},raw:{cn:"Raw (开发)",en:"Raw (experts only)"},read:{cn:"read",en:"read"},"read operation":{cn:"read",en:"read"},readme:{cn:"readme",en:"readme"},reload:{cn:"刷新",en:"reload"},"reload instance":{cn:"reload instance",en:"reload instance"},rest:{cn:"复位 (read only)",en:"rest (read only)"},restart:{cn:"自动重启",en:"auto restart"},"restart script":{cn:"重启脚本",en:"restart script"},role:{cn:"角色",en:"role"},save:{cn:"保存",en:"save"},schedule_group:{cn:"计划",en:"Schedule"},script_group:{cn:"逻辑和脚本",en:"Scripts and Logic"},"select member by double click":{cn:"select member by double clicking",en:"select member by double clicking"},"sendto operation":{cn:"Send-to operation",en:"Send-to operation"},service_group:{cn:"Maintenance",en:"Maintenance"},severity:{cn:"安防",en:"severity"},stable:{cn:"stable",en:"stable"},state:{cn:"state",en:"state"},"state permissions":{cn:"状态许可",en:"State permissions"},storage_group:{cn:"存储",en:"Storage"},string:{cn:"string",en:"string"},subscribe:{cn:"subscribe",en:"subscribe"},switch:{cn:"switch",en:"switch"},terminal:{cn:"Terminal",en:"Terminal"},"third-party_group":{cn:"第三方",en:"Third party"},"this adapter does not allow multiple instances":{cn:"这个适配器不允许运行多个实例",en:"This adapter does not allow multiple instances"},title:{cn:"标题",en:"title"},today:{cn:"今日",en:"today"},true:{cn:"true",en:"true"},ts:{cn:"时间",en:"Timestamp"},type:{cn:"type",en:"type"},unit:{cn:"unit",en:"unit"},update:{cn:"更新",en:"update"},"update adapter information":{cn:"update adapter information",en:"update adapter information"},"update-part1":{cn:"Because yunkong2 runs on many very different platforms, only manual updating is possible at the moment. To start the manual update, please go to your controller via console and execute the following:",en:"Because yunkong2 runs on many very different platforms, only manual updating is possible at the moment. To start the manual update, please go to your controller via console and execute the following:"},updated:{cn:"已更新",en:"updated"},updates:{cn:"updates",en:"updates"},upload:{cn:"上传",en:"Upload"},"user permissions":{cn:"用户权限",en:"user permissions"},users:{cn:"用户",en:"users"},"users permissions":{cn:"用户权限",en:"User permissions"},utility_group:{cn:"公用",en:"Utility"},val:{cn:"val",en:"val"},value:{cn:"value",en:"value"},"value.from":{cn:"Changed from",en:"Changed from"},"value.lc":{cn:"Last change",en:"Last change"},"value.q":{cn:"Quality code",en:"Quality code"},"value.ts":{cn:"Timestamp",en:"Timestamp"},"value.val":{cn:"value",en:"value"},version:{cn:"版本",en:"version"},vis_group:{cn:"yunkong2.vis",en:"yunkong2.vis"},visualisation_group:{cn:"可视化",en:"Visualisation"},"visualization-icons_group":{cn:"可视化 图标",en:"Visualization Icons"},"visualization-widgets_group":{cn:"可视化 部件",en:"Visualization Widgets"},visualization_group:{cn:"可视化",en:"Visualisation"},warn:{cn:"warn",en:"warn"},weather_group:{cn:"气候",en:"Weather"},wetty:{cn:"Wetty",en:"Wetty"},write:{cn:"write",en:"write"},"write operation":{cn:"write",en:"write"},yesterday:{cn:"昨天",en:"yesterday"},"%s object(s) processed":{cn:"%s objects were processed",en:"%s objects were processed"},"%s was imported":{cn:"%s was imported",en:"%s was imported"},"Ignore warning":{cn:"Ignore warning",en:"Ignore warning"},Filter:{cn:"Filter",en:"Filter"},Afghanistan:{cn:"Afghanistan",en:"Afghanistan"},Albania:{cn:"Albania",en:"Albania"},Algeria:{cn:"Algeria",en:"Algeria"},"American Samoa":{cn:"American Samoa",en:"American Samoa"},Andorra:{cn:"Andorra",en:"Andorra"},Angola:{cn:"Angola",en:"Angola"},Anguilla:{cn:"Anguilla",en:"Anguilla"},Antarctica:{cn:"Antarctica",en:"Antarctica"},"Antigua and Barbuda":{cn:"Antigua and Barbuda",en:"Antigua and Barbuda"},Argentina:{cn:"Argentina",en:"Argentina"},Armenia:{cn:"Armenia",en:"Armenia"},Aruba:{cn:"Aruba",en:"Aruba"},Australia:{cn:"Australia",en:"Australia"},Austria:{cn:"Austria",en:"Austria"},"Authentication was deactivated":{cn:"Authentication was deactivated",en:"Authentication was deactivated"},Azerbaijan:{cn:"Azerbaijan",en:"Azerbaijan"},Background:{cn:"Background",en:"Background"},"Background color of the login screen":{cn:"Background color of the login screen",en:"Background color of the login screen"},"Background image":{cn:"Background image",en:"Background image"},Bahamas:{cn:"Bahamas",en:"Bahamas"},Bahrain:{cn:"Bahrain",en:"Bahrain"},Bangladesh:{cn:"Bangladesh",en:"Bangladesh"},Barbados:{cn:"Barbados",en:"Barbados"},Belarus:{cn:"Belarus",en:"Belarus"},Belgium:{cn:"Belgium",en:"Belgium"},Belize:{cn:"Belize",en:"Belize"},Benin:{cn:"Benin",en:"Benin"},Bermuda:{cn:"Bermuda",en:"Bermuda"},Bhutan:{cn:"Bhutan",en:"Bhutan"},Bolivia:{cn:"Bolivia",en:"Bolivia"},"Bosnia and Herzegovina":{cn:"Bosnia and Herzegovina",en:"Bosnia and Herzegovina"},Botswana:{cn:"Botswana",en:"Botswana"},"Bouvet Island":{cn:"Bouvet Island",en:"Bouvet Island"},Brazil:{cn:"Brazil",en:"Brazil"},"British Indian Ocean Territory":{cn:"British Indian Ocean Territory",en:"British Indian Ocean Territory"},"Brunei Darussalam":{cn:"Brunei Darussalam",en:"Brunei Darussalam"},Bulgaria:{cn:"Bulgaria",en:"Bulgaria"},"Burkina Faso":{cn:"Burkina Faso",en:"Burkina Faso"},Burundi:{cn:"Burundi",en:"Burundi"},Cambodia:{cn:"Cambodia",en:"Cambodia"},Cameroon:{cn:"Cameroon",en:"Cameroon"},Canada:{cn:"Canada",en:"Canada"},"Cape Verde":{cn:"Cape Verde",en:"Cape Verde"},"Cayman Islands":{cn:"Cayman Islands",en:"Cayman Islands"},"Central African Republic":{cn:"Central African Republic",en:"Central African Republic"},Chad:{cn:"Chad",en:"Chad"},Chile:{cn:"Chile",en:"Chile"},"Christmas Island":{cn:"Christmas Island",en:"Christmas Island"},"Cocos Islands":{cn:"Cocos Islands",en:"Cocos Islands"},Colombia:{cn:"Colombia",en:"Colombia"},Comoros:{cn:"Comoros",en:"Comoros"},Congo:{cn:"Congo",en:"Congo"},"Cook Islands":{cn:"Cook Islands",en:"Cook Islands"},"Costa Rica":{cn:"Costa Rica",en:"Costa Rica"},Cuba:{cn:"Cuba",en:"Cuba"},Cyprus:{cn:"Cyprus",en:"Cyprus"},"Czech Republic":{cn:"Czech Republic",en:"Czech Republic"},"Disable authentication":{cn:"Disable authentication",en:"Disable authentication"},Djibouti:{cn:"Djibouti",en:"Djibouti"},"Dominican Republic":{cn:"Dominican Republic",en:"Dominican Republic"},"East Timor":{cn:"East Timor",en:"East Timor"},"Enabled:":{cn:"Enabled",en:"Enabled"},"Equatorial Guinea":{cn:"Equatorial Guinea",en:"Equatorial Guinea"},Eritrea:{cn:"Eritrea",en:"Eritrea"},Estonia:{cn:"Estonia",en:"Estonia"},Ethiopia:{cn:"Ethiopia",en:"Ethiopia"},Fiji:{cn:"Fiji",en:"Fiji"},Finland:{cn:"Finland",en:"Finland"},France:{cn:"France",en:"France"},"French Guiana":{cn:"French Guiana",en:"French Guiana"},"French Polynesia":{cn:"French Polynesia",en:"French Polynesia"},"French Southern Territories":{cn:"French Southern Territories",en:"French Southern Territories"},Gabon:{cn:"Gabon",en:"Gabon"},Gambia:{cn:"Gambia",en:"Gambia"},Georgia:{cn:"Georgia",en:"Georgia"},Germany:{cn:"Germany",en:"Germany"},Ghana:{cn:"Ghana",en:"Ghana"},Gibraltar:{cn:"Gibraltar",en:"Gibraltar"},Greece:{cn:"Greece",en:"Greece"},Greenland:{cn:"Greenland",en:"Greenland"},Grenada:{cn:"Grenada",en:"Grenada"},Guadeloupe:{cn:"Guadeloupe",en:"Guadeloupe"},Guam:{cn:"Guam",en:"Guam"},Guatemala:{cn:"Guatemala",en:"Guatemala"},Guernsey:{cn:"Guernsey",en:"Guernsey"},Guinea:{cn:"Guinea",en:"Guinea"},"Guinea-Bissau":{cn:"Guinea-Bissau",en:"Guinea-Bissau"},Guyana:{cn:"Guyana",en:"Guyana"},Haiti:{cn:"Haiti",en:"Haiti"},Honduras:{cn:"Honduras",en:"Honduras"},Hungary:{cn:"Hungary",en:"Hungary"},Iceland:{cn:"Iceland",en:"Iceland"},India:{cn:"India",en:"India"},Indonesia:{cn:"Indonesia",en:"Indonesia"},Iran:{cn:"Iran",en:"Iran"},Iraq:{cn:"Iraq",en:"Iraq"},Ireland:{cn:"Ireland",en:"Ireland"},"Isle of Man":{cn:"Isle of Man",en:"Isle of Man"},Israel:{cn:"Israel",en:"Israel"},Italy:{cn:"Italy",en:"Italy"},"Ivory Coast":{cn:"Ivory Coast",en:"Ivory Coast"},Jamaica:{cn:"Jamaica",en:"Jamaica"},Japan:{cn:"Japan",en:"Japan"},Jersey:{cn:"Jersey",en:"Jersey"},Jordan:{cn:"Jordan",en:"Jordan"},Kazakhstan:{cn:"Kazakhstan",en:"Kazakhstan"},Kenya:{cn:"Kenya",en:"Kenya"},Kiribati:{cn:"Kiribati",en:"Kiribati"},Korea:{cn:"Korea",en:"Korea"},Kosovo:{cn:"Kosovo",en:"Kosovo"},Kuwait:{cn:"Kuwait",en:"Kuwait"},Kyrgyzstan:{cn:"Kyrgyzstan",en:"Kyrgyzstan"},"Lao People's Democratic Republic":{cn:"Lao People's Democratic Republic",en:"Lao People's Democratic Republic"},Latvia:{cn:"Latvia",en:"Latvia"},Lebanon:{cn:"Lebanon",en:"Lebanon"},Lesotho:{cn:"Lesotho",en:"Lesotho"},Liberia:{cn:"Liberia",en:"Liberia"},"Libyan Arab Jamahiriya":{cn:"Libyan Arab Jamahiriya",en:"Libyan Arab Jamahiriya"},Liechtenstein:{cn:"Liechtenstein",en:"Liechtenstein"},Lithuania:{cn:"Lithuania",en:"Lithuania"},Luxembourg:{cn:"Luxembourg",en:"Luxembourg"},Macau:{cn:"Macau",en:"Macau"},Macedonia:{cn:"Macedonia",en:"Macedonia"},Madagascar:{cn:"Madagascar",en:"Madagascar"},Mai:{cn:"Mai",en:"Mai"},Malawi:{cn:"Malawi",en:"Malawi"},Malaysia:{cn:"Malaysia",en:"Malaysia"},Maldives:{cn:"Maldives",en:"Maldives"},Mali:{cn:"Mali",en:"Mali"},Malta:{cn:"Malta",en:"Malta"},"Marshall Islands":{cn:"Marshall Islands",en:"Marshall Islands"},Martinique:{cn:"Martinique",en:"Martinique"},Mauritania:{cn:"Mauritania",en:"Mauritania"},Mauritius:{cn:"Mauritius",en:"Mauritius"},Mayotte:{cn:"Mayotte",en:"Mayotte"},Mexico:{cn:"Mexico",en:"Mexico"},Micronesia:{cn:"Micronesia",en:"Micronesia"},Moldova:{cn:"Moldova",en:"Moldova"},Monaco:{cn:"Monaco",en:"Monaco"},Mongolia:{cn:"Mongolia",en:"Mongolia"},Montenegro:{cn:"Montenegro",en:"Montenegro"},Montserrat:{cn:"Montserrat",en:"Montserrat"},Morocco:{cn:"Morocco",en:"Morocco"},Mozambique:{cn:"Mozambique",en:"Mozambique"},Myanmar:{cn:"Myanmar",en:"Myanmar"},Namibia:{cn:"Namibia",en:"Namibia"},Nauru:{cn:"Nauru",en:"Nauru"},Nepal:{cn:"Nepal",en:"Nepal"},Netherlands:{cn:"Netherlands",en:"Netherlands"},"Netherlands Antilles":{cn:"Netherlands Antilles",en:"Netherlands Antilles"},"New Caledonia":{cn:"New Caledonia",en:"New Caledonia"},"New Zealand":{cn:"New Zealand",en:"New Zealand"},Nicaragua:{cn:"Nicaragua",en:"Nicaragua"},Niger:{cn:"Niger",en:"Niger"},Nigeria:{cn:"Nigeria",en:"Nigeria"},Niue:{cn:"Niue",en:"Niue"},"Norfolk Island":{cn:"Norfolk Island",en:"Norfolk Island"},"Northern Mariana Islands":{cn:"Northern Mariana Islands",en:"Northern Mariana Islands"},Oman:{cn:"Oman",en:"Oman"},Pakistan:{cn:"Pakistan",en:"Pakistan"},Palau:{cn:"Palau",en:"Palau"},Palestine:{cn:"Palestine",en:"Palestine"},Panama:{cn:"Panama",en:"Panama"},"Papua New Guinea":{cn:"Papua New Guinea",en:"Papua New Guinea"},Paraguay:{cn:"Paraguay",en:"Paraguay"},Peru:{cn:"Peru",en:"Peru"},Philippines:{cn:"Philippines",en:"Philippines"},Pitcairn:{cn:"Pitcairn",en:"Pitcairn"},Poland:{cn:"Poland",en:"Poland"},Popular:{cn:"Popular",en:"Popular"},"Popular first":{cn:"Popular first",en:"Popular first"},Portugal:{cn:"Portugal",en:"Portugal"},"Puerto Rico":{cn:"Puerto Rico",en:"Puerto Rico"},Qatar:{cn:"Qatar",en:"Qatar"},Reunion:{cn:"Reunion",en:"Reunion"},Romania:{cn:"Romania",en:"Romania"},"Russian Federation":{cn:"Russian Federation",en:"Russian Federation"},Rwanda:{cn:"Rwanda",en:"Rwanda"},"Saint Kitts and Nevis":{cn:"Saint Kitts and Nevis",en:"Saint Kitts and Nevis"},"Saint Lucia":{cn:"Saint Lucia",en:"Saint Lucia"},"Saint Vincent and the Grenadines":{cn:"Saint Vincent and the Grenadines",en:"Saint Vincent and the Grenadines"},Samoa:{cn:"Samoa",en:"Samoa"},"San Marino":{cn:"San Marino",en:"San Marino"},"Saudi Arabia":{cn:"Saudi Arabia",en:"Saudi Arabia"},Senegal:{cn:"Senegal",en:"Senegal"},Serbia:{cn:"Serbia",en:"Serbia"},Slovakia:{cn:"Slovakia",en:"Slovakia"},Slovenia:{cn:"Slovenia",en:"Slovenia"},"Solomon Islands":{cn:"Solomon Islands",en:"Solomon Islands"},Somalia:{cn:"Somalia",en:"Somalia"},"South Africa":{cn:"South Africa",en:"South Africa"},"South Georgia South Sandwich Islands":{cn:"South Georgia South Sandwich Islands",en:"South Georgia South Sandwich Islands"},Spain:{cn:"Spain",en:"Spain"},Speed:{cn:"Speed",en:"Speed"},"Sri Lanka":{cn:"Sri Lanka",en:"Sri Lanka"},"St. Helena":{cn:"St. Helena",en:"St. Helena"},"St. Pierre and Miquelon":{cn:"St. Pierre and Miquelon",en:"St. Pierre and Miquelon"},Sudan:{cn:"Sudan",en:"Sudan"},Suriname:{cn:"Suriname",en:"Suriname"},"Svalbard and Jan Mayen Islands":{cn:"Svalbard and Jan Mayen Islands",en:"Svalbard and Jan Mayen Islands"},Swaziland:{cn:"Swaziland",en:"Swaziland"},Sweden:{cn:"Sweden",en:"Sweden"},Switzerland:{cn:"Switzerland",en:"Switzerland"},"Syrian Arab Republic":{cn:"Syrian Arab Republic",en:"Syrian Arab Republic"},Tajikistan:{cn:"Tajikistan",en:"Tajikistan"},Tanzania:{cn:"Tanzania",en:"Tanzania"},Thailand:{cn:"Thailand",en:"Thailand"},Togo:{cn:"Togo",en:"Togo"},Tokelau:{cn:"Tokelau",en:"Tokelau"},Tonga:{cn:"Tonga",en:"Tonga"},"Trinidad and Tobago":{cn:"Trinidad and Tobago",en:"Trinidad and Tobago"},Tue:{cn:"Tue",en:"Tue"},Tunisia:{cn:"Tunisia",en:"Tunisia"},Turkey:{cn:"Turkey",en:"Turkey"},Turkmenistan:{cn:"Turkmenistan",en:"Turkmenistan"},"Turks and Caicos Islands":{cn:"Turks and Caicos Islands",en:"Turks and Caicos Islands"},Tuvalu:{cn:"Tuvalu",en:"Tuvalu"},Uganda:{cn:"Uganda",en:"Uganda"},Ukraine:{cn:"Ukraine",en:"Ukraine"},"Uncheck All":{cn:"Uncheck All",en:"Uncheck All"},"United Arab Emirates":{cn:"United Arab Emirates",en:"United Arab Emirates"},"United Kingdom":{cn:"United Kingdom",en:"United Kingdom"},"United States":{cn:"United States",en:"United States"},"United States minor outlying islands":{cn:"United States minor outlying islands",en:"United States minor outlying islands"},Unsecure_Auth:{cn:"The password will be sent via unsecure connection. To protect your passwords enable the secure connection (HTTPS)!",en:"The password will be sent via unsecure connection. To protect your passwords enable the secure connection (HTTPS)!"},Uzbekistan:{cn:"Uzbekistan",en:"Uzbekistan"},Vanuatu:{cn:"Vanuatu",en:"Vanuatu"},Venezuela:{cn:"Venezuela",en:"Venezuela"},Vietnam:{cn:"Vietnam",en:"Vietnam"},"Virgin Islands (British)":{cn:"Virgin Islands (British)",en:"Virgin Islands (British)"},"Virgin Islands (U.S.)":{cn:"Virgin Islands (U.S.)",en:"Virgin Islands (U.S.)"},"Wallis and Futuna Islands":{cn:"Wallis and Futuna Islands",en:"Wallis and Futuna Islands"},"Warning!":{cn:"Warning!",en:"Warning!"},"Western Sahara":{cn:"Western Sahara",en:"Western Sahara"},Yemen:{cn:"Yemen",en:"Yemen"},Zaire:{cn:"Zaire",en:"Zaire"},Zambia:{cn:"Zambia",en:"Zambia"},Zimbabwe:{cn:"Zimbabwe",en:"Zimbabwe"},silly:{cn:"silly",en:"silly"},"Sierra Leone":{en:"Sierra Leone"},Singapore:{en:"Singapore"},"Size: %s, Free: %s":{en:"Size: %s, Available: %s"},"edit enums":{en:"Edit enumerations for"},"place here":{en:"place the files here"},popular:{en:"popular"}}; //# sourceMappingURL=app.js.map diff --git a/www/js/app.js.map b/www/js/app.js.map index 12e97dd..ea37471 100644 --- a/www/js/app.js.map +++ b/www/js/app.js.map @@ -1 +1 @@ -{"version":3,"sources":["admin.js","adminAdapters.js","adminConfig.js","adminCustoms.js","adminEditObject.js","adminEnums.js","adminEvents.js","adminFileUtils.js","adminHosts.js","adminInstances.js","adminIntro.js","adminIssue.js","adminLogs.js","adminMenuEdit.js","adminObjects.js","adminReadme.js","adminSystem.js","adminUsers.js","license.js","listHeader.js","tableEditor.js","translate.js","treeTable.js","words.js"],"names":["Array","prototype","remove","what","ax","a","arguments","L","length","this","indexOf","splice","console","debug","log","Number","obj","parseFloat","Object","assign","$","extend","$iframeDialog","configNotSaved","showConfig","defaults","customPostInits","FORBIDDEN_CHARS","adapterRedirect","redirect","timeout","setTimeout","document","location","pathname","hash","href","gMain","detectIE","ua","window","navigator","userAgent","msie","parseInt","substring","rv","edge","Adapters","main","that","prepareTable","$grid","show","$tiles","html","hide","$tab","find","data","fancytree","extensions","checkbox","strings","noData","_","table","indentation","currentId","filter","onSuccess","sortTree","source","tree","renderColumns","event","node","$tdList","tr","key","ellipsis","txt","eq","css","overflow","white-space","idx","desc","substr","attr","position","font-weight","bold","setHtml","keywords","installed","version","license","install","initButtons","isCollapsed","group","saveConfig","JSON","stringify","c","k","children","no","gridnav","autofocusInput","handleCursorKeys","mode","autoApply","collapse","off","on","visit","filterVals","match","subMatch","setExpanded","$processAdapters","isList","addClass","removeClass","_postInit","trigger","prepareTiles","onOnlyUpdatableChanged","onlyUpdatable","onExpertmodeChanged","config","expertMode","filterTiles","anyVisible","currentFilter","each","$this","currentType","hasClass","customFilter","is","title","systemLang","en","name","toLowerCase","getNews","actualVersion","adapter","text","news","v","hasOwnProperty","checkDependencies","dependencies","adapters","b","semver","satisfies","objects","currentHost","common","installedVersion","getInterval","time","todayText","yesterdayText","x1DayAgoText","x2DaysAgoText","x5DaysAgoText","now","Date","interval","getTime","days","Math","floor","getDate","replace","t","tt","showUploadProgress","percent","curRepository","curRepoLastUpdate","curInstalled","curRepoLastHost","list","$installDialog","urls","groupImages","common adapters_group","general_group","hardware_group","lighting_group","energy_group","household_group","iot-systems_group","climate-control_group","infrastructure_group","garden_group","alarm_group","script_group","logic_group","media_group","multimedia_group","communication_group","protocols_group","network_group","messaging_group","visualisation_group","visualization_group","visualization-icons_group","visualization-widgets_group","storage_group","weather_group","schedule_group","vis_group","date-and-time_group","geoposition_group","utility_group","misc-data_group","service_group","third-party_group","inited","onlyInstalled","isTiles","types","occ","prepare","url","order","push","sort","o","user","val","adaptersGithub","modal","startsWith","endsWith","prop","parts","split","cmdExec","exitCode","init","showError","select","$input","prev","mtabs","nShow","tab","adaptersInstallTab","noSelect","confirmMessage","result","updateExpertMode","tabs","instances","which","undefined","adaptersIsTiles","adaptersIsList","adaptersOnlyInstalled","adaptersOnlyUpdatable","adaptersCurrentFilter","adaptersCurrentType","currentOrder","adaptersCurrentOrder","adaptersIsCollapsed","parse","browser","browserVersion","filterTimer","clearTimeout","target","filterNodes","getAdaptersInfo","host","update","updateRepo","callback","curRunning","socket","emit","repo","systemConfig","activeRepo","_repository","error","_installed","enableColResize","fn","colResizable","liveDrag","sortChildren","c1","c2","inst1","ret","t1","titleLang","t2","repository","installedList","rawVersion","adaptersToUpdate","listInstalled","listNonInstalled","nowObj","localTexts","add instance","upload","Available version:","Active instances","Installed version","readme","delete adapter","install specific version","all","Last update","Installations counter","today","yesterday","1 %d days ago","2 %d days ago","5 %d days ago","controller","versionDate","nogit","meta","getVersionString","updatable","updatableError","color","tmp","getVersionClass","i","rawInstalled","icon","extIcon","_instances","_enabled","upToDate","z","enabled","type","states","image","stat","join","highlight","licenseUrl","iGroup","jj","folder","expanded","igroup","j","akeys","keys","newData","u","ad","tTypes","g","$types","dropdown","constrainWidth","gutter","reload","width","height","round","left","$big","insertAfter","h","top","innerHeight","documentElement","clientHeight","big","classes","updateCounter","restoreScroll","saveScroll","scrollTop","counter","$updates","appendTo","objectsLoaded","subscribeObjects","subscribeStates","hosts","getHosts","destroy","unsubscribeObjects","unsubscribeStates","$dialogAddInstance","min","used","index","m","e","dismissible","complete","showAddInstanceDialog","$dialogLicense","response","body","z-index","toString","showLicenseDialog","isAgree","navigate","dialog","params","aName","waitForRestart","$button","versions","id","menu","nnews","$adaptersMenu","first","objectChange","_isInited","stateChange","state","$adapter","opacity","Config","$dialog","$configFrame","navigateGetParams","materialize","allStored","frames","changed","close","configId","shift","Customs","$table","$outer","hdr","lastHistoryTimeStamp","$tableDateFrom","$tableDateTo","$tableTimeFrom","$tableTimeTo","$chartDateFrom","$chartDateTo","$historyTableInstance","$historyChartInstance","STR_DIFFERENT","updateTable","delay","historyTimeout","loadHistoryTable","getCustomTemplate","ajax","headers","Accept","cache","success","_data","jqXHR","responseText","onButtonSave","stopPropagation","preventDefault","$tabs","ids","currentCustoms","wordDifferent","instance","field","indeterminate","f","custom","_default","found","custom_","inst","setCustoms","loadHistoryChart","initTab","customEnabled","check","supportCustoms","initCustomsTabs","$customTabs","collapsed","commons","role","sett","_attr","img","def","append","toUpperCase","prepend","$headerActive","showCustomsData","translateAll","collapsible","onOpenEnd","el","_collapsed","pos","onCloseEnd","M","updateTextFields","resizeHistory","isSilent","isDownload","request","aggregate","from","ack","q","fileName","dateFrom","Datepicker","getInstance","timeFrom","dateTo","timeTo","empty","setHours","setMinutes","setSeconds","setMilliseconds","end","part__","start","count","toISOString","err","res","filename","element","csv","ts","formatDate","lc","installColResize","IobListHeader","colWidthOffset","prefix","add","partialRefresh","marginLeft","postbackSafe","onResize","syncHeader","createElement","setAttribute","encodeURIComponent","style","display","appendChild","click","removeChild","port","chart","isSecure","native","secure","$chart","linkTemplate","hostname","encodeURI","isFloatComma","pop","showMessage","$iFrame","_ids","isUpdate","warn","$historyTableInstanceBtn","$historyTableDownloadBtn","$historyChartInstanceBtn","insta","setDate","i18n","clear","done","months","monthsShort","weekdaysShort","weekdays","weekdaysAbbrev","n","datepicker","defaultDate","showDaysInNextAndPreviousMonths","minYear","maxYear","setDefaultDate","firstDay","onSelect","date","timepicker","defaultTime","twelveHour","doneText","clearText","cancelText","autoClose","onShow","EditObject","loadObjectFields","selector","object","part","objectType","systemDictionary","saveObjectFields","$htmlId","write","read","max","d","duration","isError","showToast","$dialogNewField","prepared","$dialogSave","iconVal","_prepare","save","editor","setValue","$name","focus","mautocomplete","unit","minLength","keypress","ace","edit","getSession","setMode","$blockScrolling","saveFromTabs","_obj","getValue","load","trim","installFileUpload","isSetDefaultState","users","translateName","groups","_id","acl","owner","ownerGroup","getIconFromObj","$color","parent","colorpicker","component","container","toHex","saveFromRaw","cb","Enums","$gridEnum","$gridList","updateTimers","editMode","tasks","standardEnums","enum.rooms","cn","members","dontDelete","enum.functions","enum.favorites","standardGroups","enum.rooms.living_room","enum.rooms.sleeping_room","enum.rooms.kitchen","enum.rooms.office","enum.rooms.nursery","enum.rooms.wc","enum.rooms.garage","enum.functions.light","enum.functions.blinds","enum.functions.weather","enum.functions.heating","enum.functions.backlight","enum.functions.household","enum.functions.audio","enum.functions.security","selectId","bind","apply","enumRename","oldId","newId","newCommon","task","_enumRename","nondeletable","len","_rev","prepareNewEnum","getName","createOrEditEnum","drawEnum","$page","se","invertColor","getIcon","$filter","eid","$btn","limit","initFilter","drawEnumsTiles","$tableBody","$items","droppable","deleteEnum","removeMember","switchEditMode","drawEnumsTable","setupDroppableTiles","treeTable","root","columns","colors","icons","widths","buttonsWidth","buttons","primary","_delObjects","panelButtons","enumEdit","onChange","onReady","setupDroppableTable","items","regex","RegExp","test","getEnumsChildren","addMember","$treetable","accept","over","ui","timer","out","tolerance","drop","draggable","$collection","parentId","idChanged","nameVal","idVal","originalIdVal","colorVal","isIdEditable","$id","$modal","scrollHeight","isEnabled","$editButton","_initObjectTree","_$items","$trs","enumIsTiles","settings","noDialog","expertModeRegEx","texts","cancel","ID","room","function","value","selectid","wait","ok","with","without","copyToClipboard","refresh","button","sortable","connectWith","refreshPositions","helper","$target","zIndex","revert","scroll","$prev","item","stop","after","disableSelection","setupDraggable","de","ru","pt","nl","fr","it","es","pl","permissions","unshift","action","Events","$header","$pause","isRemote","pause","$counterSpan","columnResizeInit","doFilter","filterEvents","defineProperty","selectedVal","toLocaleLowerCase","enumerateble","widthSet","updateResizersHeight","getValues","isShow","stateOrObj","isMessage","isState","checkAddOption","getElementById","outerHTML","visible","isNaN","fileHandler","file","dataTransfer","files","$dz","size","reader","FileReader","onload","evt","readAsDataURL","$dropZone","ondragover","ondragleave","ondrop","Hosts","showUpdateInfo","path","platform","applyFilter","someVisible","showOneHostRow","alive","getHostIcon","os","showOneHostTile","words","hostsIsTiles","$hostsFilter","filterTimeout","hostsFilter","titleVal","editHost","infoTimeout","hostsToUpdate","availableVersion","showHostsTile","showHostsTable","runningVersion","addHost","addr","hardware","networkInterfaces","eth","num","internal","address","initHostsList","updateTimer","Instances","getLinkVar","_var","link","resolveLink","vars","links","adptr","firtsLink","updateLed","instanceId","$led","webExtension","webInstance","hover","calculateTotalRam","processes","mem","$totalRam","$running_processes","calculateFreeMem","memState","totalmem","$freeMem","strVal","tdp","calculateDiskMem","diskSize","diskFree","diskWarning","$diskFree","formatBytes","calculateRam","memoryLimitMB","toFixed","showOneAdapter","rootElem","form","justContent","localLinks","localLink","replaceInLink","__first","isRun","onlyWWW","noConfig","hostsText","schedule","restartSchedule","loglevel","onQuickEditField","_instanceId","setupCron","alert","showCronDialog","newValue","invisible","reg","filterHost","_isShow","options","oldVal","innerHTML","textAlign","opt","blur","$gridHead","x","nachkomma","$filterClear","instancesFilter","instancesFilterHost","replaceLink","elem","_replaceLink","_replaceLinks","arg","showTip","l","instanceForm","getInstances","last","$mem","$e","onEdit","_link","https","$instancesMenu","mouseleave","open","resize","Intro","formatSeconds","seconds","hours","minutes","$template","formatInfo","Uptime","System uptime","RAM","bytes","GB","MB","Speed","mhz","Disk size","Disk free","execCommand","buildInfoCard","$card","clone","removeAttr","intro","hasWarning","replaceWith","clippy","item_","formatted","buildOneCard","welcomeScreen","web","urlText","noIntro","_first","showTiles","$cards","editActive","aa","aaa","welcomeUrl","welcomeScreenPro","getCards","values","actual","updateConfig","startkey","endkey","doc","rows","updateTimeout","Issue","$dialogIssue","showdown","setFlavor","getJSON","bug","issue","$issueElement","html_url","login","Converter","makeHtml","issueDate","created_at","toLocaleDateString","weekday","year","month","day","hour","minute","second","labels","Logs","filters","severity","message","lines","doSubscribe","line","charCodeAt","subscribeLogs","reverse","ll","name_","$tabLogs","isReload","Objects","subscribes","syncEnum","enumName","newArray","enums","toCheck","_syncEnum","enumIds","enumId","requestStates","pattern","unsubscribeAll","loadObjects","objs","$dialogNewObject","stype","reinit","dialogs","customs","stats","useValues","useHistory","showButtonsForNotExistingObjects","expand","editDialog","States","toggleValues","expandedCallback","childrenCount","hasStates","subscribe","collapsedCallback","unsubscribe","material-icon","delObject","history.0","input","addEventListener","r","contents","json","readAsText","handleFileSelect","map","search","quickEdit","quickEditCallback","oldValue","newAck","typ","customButtonFilter","subscribeAll","Readme","md2html","mainUrl","trimArr","$divReadme","$divChangeLog","$divLicense","$divLogo","adapterName","localStorage","getItem","setItem","fillDiv","removeItem","get","orgUrl","logo","changeLog","splitReadMe","lastIndexOf","$elemId","animate","offset","initMap","system","mapLoaded","updateMap","System","mapTimer","mapInited","longitude","latitude","systemRepos","systemCerts","useOpenLayers","string2cert","str","p","addCert","table2values","newText","certificate","values2table","initRepoGrid","repositories","$system_activeRepo","selectedRepo","isFound","updateRepoListSelect","nonEdit","$repos","languageChanged","activeRepoChanged","defaultNewAcl","old","finishEditingRights","language","diag","certificates","letsEncrypt","toast","label","immediately","ol","point","proj","fromLonLat","OSM","markerSource","Vector","markerStyle","Style","Icon","anchor","anchorXUnits","anchorYUnits","src","oMap","Map","layers","layer","Tile","view","View","center","zoom","marker","Feature","geometry","geom","Point","addFeature","lonLat","toLonLat","coordinate","getView","getZoom","setGeometry","setView","google","maps","lat","lng","Marker","$system_defaultHistory","dataType","initRights","cert","atob","_m","initCertsGrid","errRepo","errCerts","certs","errConfig","Users","synchronizeUser","userId","userGroups","showMessageInDialog","firstUpper","deleteUser","delUserFromGroups","updateUser","password","passwordRep","oldObj","shortId","getUserGroups","idShort","fillAcl","gg","aclGroups","operation","checkValidId","createOrEdit","isGroupOrId","prevId","isGroup","updateGroup","ops","pp","buildUserList","usersGroups","getUsersGroups","tGroups","gId","gName","inverted","$gridUsers","buildGroupsList","tUsers","uName","uId","$gridGroups","ready","stdout","allTabs","currentTab","currentDialog","currentUser","subscribesStates","subscribesObjects","subscribesLogs","io","connect","ignoreJSupdate","addEventMessage","events","storage","set","saveTabs","_new","cmd","$stdout","$dialogCommand","$adminSideMain","$dialogCommandProgress","activeCmdId","random","cmdCallback","$dialogConfirm","tButtons","$dialogMessage","jQuery","parentSelector","displayLength","dateObj","justTime","getFullYear","getMonth","getHours","getMinutes","getSeconds","getMilliseconds","updateWizard","$wizard","wizard","licenseConfirmed","getUser","auth","_lastTimer","monitor","_timer","_delObject","idOrList","isArray","doIt","rootId","isAll","$tree","leaf","logs","editobject","$adminSideMenu","firstConnect","maxTouchPoints","globalClickHandler","initHtmlTabs","elements","tabsInfo","adminTab","toggleClass","initSideNav","tabsInited","$menu","panelSelector","$panel","$iframe","currentHash","navigateDo","$versionBtn","offs","tid","initTabs","onhashchange","addTabs","instanceObj","singleton","materializeTab","buttonName","isReplace","materilizeTab","div","countLink","loadTimeout","getObjects","slice","history","checkNodeJsVersions","major","ignoreConfigUpdate","getIconHtml","alt","isCommon","isFirstInit","$selHosts","curId","$selBtn","resubscribeStates","resubscribeObjects","resubscribeLogs","patterns","s","isSubscribe","navigateCheckDialog","decodeURI","decodeURIComponent","$adminBody","$actualTab","$oldPanel","$iframe_","not","imgPath","abs","units","hex","tab-intro","tab-adapters","tab-instances","tab-objects","tab-enums","tab-logs","tab-scenes","tab-events","tab-users","tab-javascript","tab-text2command-0","tab-text2command-1","tab-text2command-2","tab-node-red-0","tab-node-red-1","tab-node-red-2","tab-hosts","tab-fullcalendar-0","tab-fullcalendar-1","tab-fullcalendar-2","$backButton","isActive","vendor","admin","noCustomInstall","sideNavUser","sideNavMenu","header","rules","styles","city","country","userLanguage","translateWord","tempUnit","currency","dateFormat","defaultHistory","translateCron","initGridLanguage","progressClose","progressMore","addAll2FilterCombobox","$headerThs","$listTds","tagName","resizeTimer","selectIdOffset","setList","_list","$tds","y","selectOptions","fis","fisId","noAll","option","addOption","eventFilterTimeout","$btnClear","divId","maxRaw","$div","names","$add","getEnums","trRooms","nnames","trFuncs","class","readOnly","tdstyle","vals","btn","idName","$lines","command","tableEvents","$select","lang","dictionary","$selector","transText","arg1","arg2","arg3","methods","buildTable","call","Storage","exIDs","treetable","row","reInit","_elem","_$table","method","nodeExpand","nodeCollapse","buildList","noButtons","parents","current","isNotFolder","$dlg","$buttons","$list","axis","currentFolder","processMoveTasks","moveId","buttonTag","ch","rootEx","_class","engine","ppp","realChildren","mm","ccommon","ccb","vval","instSelect","aattr","ii","vall","buttonsStyle","$treeTable","expandable","clickableNodeNames","expanderTemplate","indenterTemplate","onNodeExpand","onNodeCollapse","stringCollapse","stringExpand","$tbody","zz","$zz","word","branch","isOneVisible","nameFilter"," for %s","%s added to %s","%s processes","(without prefix)","A-Z","Access control","Access control list","Acknowledged","Activated. Click to stop.","Active repository:","Adapter configuration","Adapter settings for %s states","Adapters from this Group installed","Add","Add Objecttree from JSON File","Add certificate from file","Add instance...","Add member","Add new child object to selected parent","Add new field","Add new issue","Add new object: ","Add new object: %s","Address:","Admin is not enabled in cloud settings!","Administrator","All","Apr","April","Architecture","Are you sure to delete %s?","Are you sure to delete all children of %s?","Are you sure to delete all children of %s?","Are you sure to delete script %s?","Are you sure you want to delete adapter %s?","Are you sure you want to delete the instance %s?","Are you sure?","Are you sure? Changes are not saved.","Aug","August","Available","CPUs","Calendar","Cancel","Cannot create user: ","Cannot delete user: ","Cannot disable admin!","Cannot read file!","Cannot read version from NPM","Cannot set password: ","Certificates","Change","Changelog","Channel","Chart","Chart for %s","Check all","China","City:","Clear","Clear list","Clear log","Clear on disk permanent","Click do activate events again, or just wait one minute","Click on icon","Close","Collapse all nodes","Color","Configuration not saved.","Connected to %s: ","Connected to host: ","Copy log","Copy to clipboard","Country:","Create","Create new category","Create new category, like %s","Create new enum","Create new enum, like %s","Create new group","Create new user","Created","Croatia","Cron expression","Currency:","Custom","D$ecember","DD.MM.YY","DD.MM.YYYY","DD/MM/YYYY","Date From","Date To","Date format:","Deactivated. Click to start.","Debug outputs:","Dec","December","Default ACL","Default history instance:","Delete attribute","Delete category","Delete enum","Delete member","Delete object","Denmark","Description","Device","Device discovery","Disk free:","Do you want to delete just one object or all children of %s too?","Do you want to upgrade all adapters?","Domains:","Dominica","Done with error: %s","Download log","Drop the files here","Drop the icons here","Ecuador","Edit","Edit category","Edit enum","Edit in dialog","Edit object","Egypt","El Salvador","Email for account:","Error","Event","Everyone","Expand all nodes","Failed to open JSON File","Falkland Islands (Malvinas)","Faroe Islands","Feb","February","File is too big!","File rights","Filter:","Filtered out","Find coordinates...","Float divider:","Free RAM:","Fri","From","From github","Function","Generated ID:","Go to Github...","Group","Groups","Has no permission to %s %s %s","Heard and Mc Donald Islands","Heartbeat: ","Hong Kong","Host","Host %s is offline","Host:","Icon upload","In background","Info","Insert","Install","Install adapter from URL","Install adapter from github","Install from custom URL","Install or update from URL...","Installation counter","Installed","Installed from group","Installed instances","Instructions","Invalid version of %s","Invalid version of %s. Required %s","Is yet in the list","Jan","January","Jul","July","Jun","June","Known bugs for","Last changed","Latitude:","Let's Encrypt settings","Let's encrypt SSL","License","License terms","Listen on all IPs","Loading...","Log","Log file will be deleted. Are you sure?","Log size:","Login timeout(sec):","Logout","Longitude:","Main","Main settings","Manually created","Mar","March","Members","Message","Message buffer overflow. Losing oldest","Model","Mon","NPM","Name","Name:","New","New category","New enum","New group","New object","New objekt","New user","No data","No states selected!","No version of %s","Node.js","Norway","Not exists","Note:","Nov","November","OS","Object \"%s\" does not exists. Update the page.","Object may not be deleted","Object rights","Oct","October","Ok","Only one","Open original","Owner","Owner group","Owner user","Parent","Parse error","Password","Password and confirmation are not equal!","Password cannot be empty!","Password repeat","Path to storage:","Pause output","Platform","Please confirm","Port to check the domain:","Preserve ID","Preview","Processing...","RAM total usage:","RAM usage","Rebuild tree","Recently updated","Refresh log","Removed","Removing of adapter...","Removing of instance...","Rename","Repositories","Rights","Role","Room","Running: ","Sao Tome and Principe","Sat","Save","Save Objecttree as JSON File","Save Objecttree is not possible","Save configuration","Script","Scripts","Select","Select ID","Select adapter:","Select language","Select options","Sent data:","Sep","September","Set","Set CRON","Set CRON schedule for restarts","Settings","Settings for %s","Seychelles","Show instances only for current host","Show values of instance","Show...","Size: %s, Available: %s","Some data are not stored. Discard?","Sort alphabetically","Started...","State","State type","States rights","Statistics","Statistics:","Storage of %s","Storage of %s states","Success!","Suggestion","Sun","System language:","System settings","Table","Taiwan","Temperature units:","This version of node.js \"%s\" on \"%s\" is deprecated. Please install node.js 6, 8 or newer","Thu","Time","Time From","Time To","Time stamp","Title","To","Today","Toggle expert mode","Toggle states view","Too many events","Total count in group","Trigger event","Type","URL or file path:","Unknown file format!","Unsupported image format","Update","Update objects","Update states","Updated","Upgrade all adapters","Upload","Upload admin started","Upload started...","Uruguay","Use Lets Encrypt certificates:","Use this instance for automatic update:","User","User deleted","User does not exist","User yet exists","Value","Values of %s","Vatican City State","Wed","With","Without","You are going to add new instance: ","You can check changelog here","You can drag&drop the devices, channels and states to enums","You can drag&drop users to groups","You can't see events via cloud","Your home","_All","_Toggle expert mode","__different__","a-z","actions","active","adapter with updates","adapters count","add children","add repository","agree","alpha","array","auto","available","beta","boolean","cert_path_note","change view mode","channel","close on ready","collapse all","comma","command execution","common_color","common_def","common_desc","common_icon","common_max","common_min","common_read","common_role","common_states","common_type","common_unit","common_write","config instance","confirm password","connected","copy","copy note","create operation","custom enum","custom group","daemon","daysShortText","delete","delete group","delete instance","delete operation","delete script","delete user","description","device","diag-note","edit enum","edit file","edit group","edit instance","edit script","edit user","edit value","engine type","execute operation","expand all","extended","false","file permissions","history data","http operation","info","installed adapters","instance number","yunkong2 Enums","yunkong2 States","yunkong2 adapter instances","yunkong2 adapter scripts","yunkong2 adapters","yunkong2 certificates","yunkong2 groups","yunkong2 hosts","yunkong2 repositories","yunkong2 users","iot-system_group","less","letsnecrypt_help","letsnecrypt_help_domains","letsnecrypt_help_email","letsnecrypt_help_path","license agreement","license not agree","license_checkbox","list operation","memlimit","mixed","more","multi","new certificate","new group","new script","new user","newObject","no-city","node-red","none","normal","not ack","not agree","npm error","number","object permissions","of","open web page","other permissions","parent name","permissionError","planned","process","raw","read operation","reload instance","rest","restart","restart script","select member by double click","sendto operation","stable","state permissions","string","switch","terminal","this adapter does not allow multiple instances","true","update adapter information","update-part1","updated","updates","user permissions","users permissions","value.from","value.lc","value.q","value.ts","value.val","wetty","write operation","%s object(s) processed","%s was imported","Ignore warning","Filter","Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Authentication was deactivated","Azerbaijan","Background","Background color of the login screen","Background image","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","Christmas Island","Cocos Islands","Colombia","Comoros","Congo","Cook Islands","Costa Rica","Cuba","Cyprus","Czech Republic","Disable authentication","Djibouti","Dominican Republic","East Timor","Enabled:","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Ivory Coast","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Korea","Kosovo","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Mai","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","Northern Mariana Islands","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Popular","Popular first","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia South Sandwich Islands","Spain","Sri Lanka","St. Helena","St. Pierre and Miquelon","Sudan","Suriname","Svalbard and Jan Mayen Islands","Swaziland","Sweden","Switzerland","Syrian Arab Republic","Tajikistan","Tanzania","Thailand","Togo","Tokelau","Tonga","Trinidad and Tobago","Tue","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","Uncheck All","United Arab Emirates","United Kingdom","United States","United States minor outlying islands","Unsecure_Auth","Uzbekistan","Vanuatu","Venezuela","Vietnam","Virgin Islands (British)","Virgin Islands (U.S.)","Wallis and Futuna Islands","Warning!","Western Sahara","Yemen","Zaire","Zambia","Zimbabwe","silly","Sierra Leone","Singapore","Size: %s, Free: %s","edit enums","place here","popular"],"mappings":"AAgBA,aAIAA,MAAAC,UAAAC,OAAA,WAKA,IAJA,IAAAC,EAGAC,EAFAC,EAAAC,UACAC,EAAAF,EAAAG,OAEAD,GAAAE,KAAAD,QAEA,IADAL,EAAAE,IAAAE,IACA,KAAAH,EAAAK,KAAAC,QAAAP,KACAM,KAAAE,OAAAP,EAAA,GAGA,OAAAK,MAGAG,QAAAC,QACAD,QAAAC,MAAAD,QAAAE,KAEA,oBAAAC,SACAH,QAAAE,IAAA,iBACAC,OAAA,SAAAC,GACA,OAAAC,WAAAD,KAGAE,OAAAC,SACAD,OAAAC,OAAAC,EAAAC,QAIA,IAAAC,cAAA,KACAC,eAAA,KACAC,WAAA,KACAC,SAAA,GACAC,gBAAA,GACAC,gBAAA,uBAGAC,gBAAA,SAAAC,EAAAC,GACAD,GACAE,WAAA,WACAF,GAAAG,SAAAC,SAAAC,SACAL,GAAAG,SAAAC,SAAAE,KACAH,SAAAC,SAAAG,KAAAP,GACAC,GAAA,MAGAO,MAAA,KAEA,SAAAC,WACA,IAAAC,EAAAC,OAAAC,UAAAC,UAEAC,EAAAJ,EAAA7B,QAAA,SACA,GAAA,EAAAiC,EAEA,OAAAC,SAAAL,EAAAM,UAAAF,EAAA,EAAAJ,EAAA7B,QAAA,IAAAiC,IAAA,IAIA,GAAA,EADAJ,EAAA7B,QAAA,YACA,CAEA,IAAAoC,EAAAP,EAAA7B,QAAA,OACA,OAAAkC,SAAAL,EAAAM,UAAAC,EAAA,EAAAP,EAAA7B,QAA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,GAAA,wBACAmlE,iBAAA,CAAAxjD,GAAA,iBAAA3hB,GAAA,kBACAolE,gBAAA,CAAAzjD,GAAA,gBAAA3hB,GAAA,iBACAqlE,uCAAA,CAAA1jD,GAAA,uCAAA3hB,GAAA,wCACAslE,cAAA,CAAA3jD,GAAA,qHAAA3hB,GAAA,sHACAulE,WAAA,CAAA5jD,GAAA,aAAA3hB,GAAA,cACAwlE,QAAA,CAAA7jD,GAAA,UAAA3hB,GAAA,WACAylE,UAAA,CAAA9jD,GAAA,YAAA3hB,GAAA,aACA0lE,QAAA,CAAA/jD,GAAA,UAAA3hB,GAAA,WACA2lE,2BAAA,CAAAhkD,GAAA,2BAAA3hB,GAAA,4BACA4lE,wBAAA,CAAAjkD,GAAA,wBAAA3hB,GAAA,yBACA6lE,4BAAA,CAAAlkD,GAAA,4BAAA3hB,GAAA,6BACA8lE,WAAA,CAAAnkD,GAAA,WAAA3hB,GAAA,YACA+lE,iBAAA,CAAApkD,GAAA,iBAAA3hB,GAAA,kBACAgmE,MAAA,CAAArkD,GAAA,QAAA3hB,GAAA,SACAimE,MAAA,CAAAtkD,GAAA,QAAA3hB,GAAA,SACAkmE,OAAA,CAAAvkD,GAAA,SAAA3hB,GAAA,UACAmmE,SAAA,CAAAxkD,GAAA,WAAA3hB,GAAA,YACAomE,MAAA,CAAAzkD,GAAA,QAAA3hB,GAAA,SACAqmE,eAAA,CAAArmE,GAAA,gBACAsmE,UAAA,CAAAtmE,GAAA,aACAumE,qBAAA,CAAAvmE,GAAA,2BACAwmE,aAAA,CAAAxmE,GAAA,yBACAymE,aAAA,CAAAzmE,GAAA,wBACA0mE,QAAA,CAAA1mE,GAAA","file":"app.js","sourcesContent":["/* jshint -W097 */\n/* jshint strict:true */\n/* jslint vars: true */\n/* global io:false */\n/* global jQuery:false */\n/* jslint browser:true */\n/* jshint browser:true */\n/* global _ */\n/* global ace */\n/* global console */\n/* global alert */\n/* global confirm */\n/* global systemLang: true */\n/* global license */\n/* global translateAll */\n/* global initGridLanguage */\n'use strict';\n\n//if (typeof Worker === 'undefined') alert('your browser does not support WebWorkers :-(');\n\nArray.prototype.remove = function () {\n var what;\n var a = arguments;\n var L = a.length;\n var ax;\n while (L && this.length) {\n what = a[--L];\n while ((ax = this.indexOf(what)) !== -1) {\n this.splice(ax, 1);\n }\n }\n return this;\n};\n// for IE\nif (!console.debug) {\n console.debug = console.log;\n}\nif (typeof Number === 'undefined') {\n console.log('define Number');\n Number = function (obj) {\n return parseFloat(obj);\n }\n}\nif (!Object.assign) {\n Object.assign = $.extend;\n}\n\n\nvar $iframeDialog = null; // used in adapter settings window\nvar configNotSaved = null; // used in adapter settings window\nvar showConfig = null; // used in adapter settings window\nvar defaults = {};\nvar customPostInits = {};\nvar FORBIDDEN_CHARS = /[\\]\\[*,;'\"`<>\\\\\\s?]/g;\n\n// used in adapter settings window\nvar adapterRedirect = function (redirect, timeout) {\n if (redirect) {\n setTimeout(function () {\n redirect += document.location.pathname;\n redirect += document.location.hash;\n document.location.href = redirect;\n }, timeout || 5000);\n }\n};\nvar gMain = null; // for google maps\n\nfunction detectIE() {\n var ua = window.navigator.userAgent;\n\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = ua.indexOf('rv:');\n return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n}\n\n(function ($) {\n$(document).ready(function () {\n var path = location.pathname + 'socket.io';\n if (location.pathname.match(/^\\/admin\\//)) {\n path = '/socket.io';\n }\n\n var allTabs = {};\n\n var main = {\n objects: {},\n states: {},\n currentHost: '',\n currentTab: null,\n currentDialog: null,\n currentUser: '',\n subscribesStates: {},\n subscribesObjects: {},\n subscribesLogs: 0,\n socket: io.connect('/', {path: path}),\n systemConfig: null,\n instances: null,\n objectsLoaded: false,\n waitForRestart: false,\n tabs: null,\n dialogs: {},\n selectId: null,\n config: {},\n ignoreJSupdate: false, // set to true after some global script updated and till system.adapter.javascript.x updated\n addEventMessage: function (id, stateOrObj, isMessage, isState) {\n // cannot directly use tabs.events.add, because to init time not available.\n tabs.events.add(id, stateOrObj, isMessage, isState);\n },\n saveConfig: function (attr, value) {\n if (attr) main.config[attr] = value;\n\n if (typeof storage !== 'undefined') {\n storage.set('adminConfig', JSON.stringify(main.config));\n }\n },\n saveTabs: function () {\n this.socket.emit ('setObject', 'system.config', this.systemConfig, function (err) {\n if (err) {\n this.showError (err);\n }\n })\n },\n\n // Helper methods\n upToDate: function (_new, old) {\n _new = _new.split('.');\n old = old.split('.');\n _new[0] = parseInt(_new[0], 10);\n old[0] = parseInt(old[0], 10);\n if (_new[0] > old[0]) {\n return false;\n } else if (_new[0] === old[0]) {\n _new[1] = parseInt(_new[1], 10);\n old[1] = parseInt(old[1], 10);\n if (_new[1] > old[1]) {\n return false;\n } else if (_new[1] === old[1]) {\n _new[2] = parseInt(_new[2], 10);\n old[2] = parseInt(old[2], 10);\n return (_new[2] <= old[2]);\n } else {\n return true;\n }\n } else {\n return true;\n }\n },\n\n // Methods\n cmdExec: function (host, cmd, callback) {\n host = host || main.currentHost;\n $stdout.val('');\n\n $dialogCommand.modal('open');\n\n stdout = '$ ./yunkong2 ' + cmd;\n $dialogCommand.data('finished', false).find('.btn').html(_('In background'));\n $dialogCommand.find('.command').html(stdout);\n $dialogCommand.find('.progress-dont-close').removeClass('disabled');\n $adminSideMain.find('.button-command').removeClass('error').addClass('in-progress');\n $dialogCommand.data('max', null);\n $dialogCommand.data('error', '');\n $dialogCommandProgress.addClass('indeterminate').removeClass('determinate');\n\n if (cmd.match(/^upload /)) {\n $dialogCommand.find('.progress-text').html(_('Upload started...')).removeClass('error');\n } else if (cmd.match(/^del [-_\\w\\d]+\\.[\\d]+$/)) {\n $dialogCommand.find('.progress-text').html(_('Removing of instance...')).removeClass('error');\n } else if (cmd.match(/^del /)) {\n $dialogCommand.find('.progress-text').html(_('Removing of adapter...')).removeClass('error');\n } else if (cmd.match(/^url /)) {\n $dialogCommand.find('.progress-text').html(_('Install or update from URL...')).removeClass('error');\n } else if (cmd.match(/^add /)) {\n $dialogCommand.find('.progress-text').html(_('Add instance...')).removeClass('error');\n } else{\n $dialogCommand.find('.progress-text').html(_('Started...')).removeClass('error');\n }\n\n $stdout.val(stdout);\n // generate the unique id to coordinate the outputs\n activeCmdId = Math.floor(Math.random() * 0xFFFFFFE) + 1;\n cmdCallback = callback;\n main.socket.emit('cmdExec', host, activeCmdId, cmd, function (err) {\n if (err) {\n stdout += '\\n' + _(err);\n $stdout.val(stdout);\n cmdCallback = null;\n callback(err);\n } else {\n if (callback) callback();\n }\n });\n },\n confirmMessage: function (message, title, icon, buttons, callback) {\n // if standard buttons\n if (typeof buttons === 'function') {\n callback = buttons;\n $dialogConfirm.find('.modal-footer').html(\n '' + _('Ok') + '' +\n '' + _('Cancel') + '');\n $dialogConfirm.find('.modal-footer .modal-action').on('click', function () {\n var cb = $dialogConfirm.data('callback');\n cb && cb($(this).data('result'));\n });\n } else if (typeof buttons === 'object') {\n var tButtons = '';\n for (var b = buttons.length - 1; b >= 0; b--) {\n tButtons += '' + buttons[b] + '';\n }\n $dialogConfirm.find('.modal-footer').html(tButtons);\n $dialogConfirm.find('.modal-footer .modal-action').on('click', function () {\n var cb = $dialogConfirm.data('callback');\n cb && cb($(this).data('id'));\n });\n }\n\n $dialogConfirm.find('.dialog-title').text(title || _('Please confirm'));\n if (icon) {\n $dialogConfirm.find('.dialog-icon')\n .show()\n .html(icon);\n } else {\n $dialogConfirm.find('.dialog-icon').hide();\n }\n $dialogConfirm.find('.dialog-text').html(message);\n $dialogConfirm.data('callback', callback);\n $dialogConfirm.modal('open');\n },\n showMessage: function (message, title, icon) {\n $dialogMessage.find('.dialog-title').text(title || _('Message'));\n if (icon) {\n $dialogMessage.find('.dialog-icon')\n .show()\n .html(icon);\n } else {\n $dialogMessage.find('.dialog-icon').hide();\n }\n $dialogMessage.find('.dialog-text').html(message);\n $dialogMessage.modal('open');\n },\n showError: function (error) {\n main.showMessage(_(error), _('Error'), 'error_outline');\n },\n showToast: function (parent, message, icon, duration, isError, classes) {\n if (parent && parent instanceof jQuery) {\n parent = parent[0];\n }\n classes = classes || [];\n\n if (typeof classes === 'string') {\n classes = [classes];\n }\n isError && classes.push('dropZone-error');\n\n M.toast({\n parentSelector: parent || $('body')[0],\n html: message + (icon ? '' + icon + '' : ''),\n displayLength: duration || 3000,\n classes: classes\n });\n },\n formatDate: function (dateObj, justTime) {\n //return dateObj.getFullYear() + '-' +\n // (\"0\" + (dateObj.getMonth() + 1).toString(10)).slice(-2) + '-' +\n // (\"0\" + (dateObj.getDate()).toString(10)).slice(-2) + ' ' +\n // (\"0\" + (dateObj.getHours()).toString(10)).slice(-2) + ':' +\n // (\"0\" + (dateObj.getMinutes()).toString(10)).slice(-2) + ':' +\n // (\"0\" + (dateObj.getSeconds()).toString(10)).slice(-2);\n // Following implementation is 5 times faster\n if (!dateObj) return '';\n var text = typeof dateObj;\n if (text === 'string') {\n if (justTime) {\n return dateObj.substring(8);\n } else {\n return dateObj;\n }\n }\n // if less 2000.01.01 00:00:00\n if (text !== 'object') dateObj = dateObj < 946681200000 ? new Date(dateObj * 1000) : new Date(dateObj);\n\n var v;\n if (!justTime) {\n text = dateObj.getFullYear();\n v = dateObj.getMonth() + 1;\n if (v < 10) {\n text += '-0' + v;\n } else {\n text += '-' + v;\n }\n\n v = dateObj.getDate();\n if (v < 10) {\n text += '-0' + v;\n } else {\n text += '-' + v;\n }\n } else {\n v = dateObj.getDate();\n if (v < 10) {\n text = '0' + v;\n } else {\n text = v;\n }\n }\n\n v = dateObj.getHours();\n if (v < 10) {\n text += ' 0' + v;\n } else {\n text += ' ' + v;\n }\n v = dateObj.getMinutes();\n if (v < 10) {\n text += ':0' + v;\n } else {\n text += ':' + v;\n }\n\n v = dateObj.getSeconds();\n if (v < 10) {\n text += ':0' + v;\n } else {\n text += ':' + v;\n }\n\n v = dateObj.getMilliseconds();\n if (v < 10) {\n text += '.00' + v;\n } else if (v < 100) {\n text += '.0' + v;\n } else {\n text += '.' + v;\n }\n\n return text;\n },\n /*initSelectId: function () {\n if (main.selectId) return main.selectId;\n main.selectId = $('#dialog-select-member').selectId('init', {\n objects: main.objects,\n states: main.states,\n filter: {type: 'state'},\n name: 'admin-select-member',\n texts: {\n select: _('Select'),\n cancel: _('Cancel'),\n all: _('All'),\n id: _('ID'),\n name: _('Name'),\n role: _('Role'),\n room: _('Room'),\n value: _('Value'),\n selectid: _('Select ID'),\n from: _('From'),\n lc: _('Last changed'),\n ts: _('Time stamp'),\n wait: _('Processing...'),\n ack: _('Acknowledged')\n },\n columns: ['image', 'name', 'role', 'room', 'value']\n });\n return main.selectId;\n },*/\n updateWizard: function () {\n var $wizard = $('#button-wizard');\n if (main.objects['system.adapter.discovery.0']) {\n if (!$wizard.data('inited')) {\n $wizard.data('inited', true);\n $wizard/*.button({\n icons: {primary: ' ui-icon-search'},\n text: false\n })*/.on('click', function () {\n // open configuration dialog\n main.navigate({\n tab: 'instances',\n dialog: 'config',\n params: 'system.adapter.discovery.0'\n });\n }).attr('title', _('Device discovery'));\n }\n $wizard.show();\n\n // Show wizard dialog\n if (!main.systemConfig.common.wizard && main.systemConfig.common.licenseConfirmed) {\n $wizard.trigger('click');\n }\n } else {\n $wizard.hide();\n }\n },\n getUser: function () {\n if (!main.currentUser) {\n main.socket.emit('authEnabled', function (auth, user) {\n main.currentUser = 'system.user.' + user;\n if (!auth) {\n $('#button-logout').remove();\n } else {\n main._lastTimer = (new Date()).getTime();\n monitor();\n }\n });\n } else if (main.objects[main.currentUser]) {\n var obj = main.objects[main.currentUser];\n var name = '';\n if (!obj || !obj.common || !obj.common.name) {\n name = main.currentUser.replace(/^system\\.user\\./);\n name = name[0].toUpperCase() + name.substring(1).toLowerCase();\n } else {\n name = translateName(obj.common.name);\n }\n if (obj && obj.common && obj.common.icon) {\n var objs = {};\n objs[main.currentUser] = obj;\n $('#current-user-icon').html(main.getIcon(main.currentUser, null, objs));\n } else {\n $('#current-user-icon').html('account_circle');\n }\n $('#current-user').html(name);\n var groups = [];\n for (var i = 0; i < tabs.users.groups.length; i++) {\n var group = main.objects[tabs.users.groups[i]];\n if (group && group.common && group.common.members && group.common.members.indexOf(main.currentUser) !== -1) {\n groups.push(_(translateName(group.common.name)));\n }\n }\n $('#current-group').html(groups.join(', '));\n }\n },\n\n // Delete objects\n _delObject: function (idOrList, callback) {\n var id;\n if (!Array.isArray(idOrList)) {\n if (typeof idOrList !== 'string') return callback && callback('invalid idOrList parameter');\n idOrList = [idOrList];\n }\n\n function doIt() {\n if (idOrList.length === 0) {\n return callback && setTimeout(callback, 0, null, id);\n }\n id = idOrList.pop();\n if (main.objects[id] && main.objects[id].common && (main.objects[id].common['object-non-deletable'] || main.objects[id].common.dontDelete)) {\n main.showMessage (_ ('Cannot delete \"%s\" because not allowed', id), '', 'notifications');\n setTimeout(doIt, 0);\n } else {\n var obj = main.objects[id];\n main.socket.emit('delObject', id, function (err) {\n if (err && err !== 'Not exists') {\n main.showError (err);\n return callback(err);\n }\n if (obj && obj.type === 'state') {\n main.socket.emit ('delState', id, function (err) {\n if (err && err !== 'Not exists') {\n main.showError (err);\n return callback(err);\n }\n setTimeout(doIt, 0);\n });\n } else {\n setTimeout(doIt, 0);\n }\n });\n }\n }\n doIt();\n },\n /*_delObject_old: function (idOrList, callback) {*\n var id;\n if (typeof idOrList === 'object') {\n if (!idOrList || !idOrList.length) {\n if (callback) callback(null);\n return;\n }\n id = idOrList.pop();\n } else {\n id = idOrList;\n }\n\n if (main.objects[id] && main.objects[id].common && (main.objects[id].common['object-non-deletable'] || main.objects[id].common.dontDelete)) {\n main.showMessage(_('Cannot delete \"%s\" because not allowed', id), '', 'notice');\n if (typeof idOrList === 'object') {\n setTimeout(function () {\n this._delObject(idOrList, callback);\n }.bind(this), 0);\n } else {\n if (callback) {\n setTimeout(function () {\n callback(null, idOrList);\n }, 0);\n }\n }\n } else {\n var obj = main.objects[id];\n main.socket.emit('delObject', id, function (err) {\n if (err && err !=='Not exists') {\n main.showError(err);\n return;\n }\n if (obj && obj.type === 'state') {\n main.socket.emit('delState', id, function (err) {\n if (err && err !=='Not exists') {\n main.showError(err);\n return;\n }\n if (typeof idOrList === 'object') {\n setTimeout(function () {\n this._delObject(idOrList, callback);\n }.bind(this), 0);\n } else {\n if (callback) {\n setTimeout(function () {\n callback(null, idOrList);\n }, 0);\n }\n }\n }.bind(this));\n } else {\n if (typeof idOrList === 'object') {\n setTimeout(function () {\n this._delObject(idOrList, callback);\n }.bind(this), 0);\n } else {\n if (callback) {\n setTimeout(function () {\n callback(null, idOrList);\n }, 0);\n }\n }\n }\n }.bind(this));\n }\n },*/\n _delObjects: function (rootId, isAll, callback) {\n if (!isAll) {\n this._delObject(rootId, callback);\n } else {\n var list = [];\n for (var id in main.objects) {\n if (main.objects.hasOwnProperty(id) && id.substring(0, rootId.length + 1) === rootId + '.') {\n list.push(id);\n }\n }\n list.push(rootId);\n list.sort();\n\n this._delObject(list, function () {\n if (callback) callback();\n });\n }\n },\n delObject: function ($tree, id, callback) {\n var leaf = $tree ? $tree.selectId('getTreeInfo', id) : null;\n if (main.objects[id]) {\n if (leaf && leaf.children) {\n // ask if only object must be deleted or just this one\n main.confirmMessage(_('Do you want to delete just one object or all children of %s too?', id), null, 'help_outline', [_('_All'), _('Only one'), _('Cancel')], function (result) {\n // If all\n if (result === 0) {\n main._delObjects(id, true, callback);\n } else\n // if only one object\n if (result === 1) {\n main._delObjects(id, false, callback);\n } // else do nothing\n });\n } else {\n main.confirmMessage(_('Are you sure to delete %s?', id), null, 'help_outline', function (result) {\n // If all\n if (result) main._delObjects(id, true, callback);\n });\n }\n } else if (leaf && leaf.children) {\n main.confirmMessage(_('Are you sure to delete all children of %s?', id), null, 'help_outline', function (result) {\n // If all\n if (result) main._delObjects(id, true, callback);\n });\n } else {\n main.showMessage(_('Object \"%s\" does not exists. Update the page.', id), _('Error'), 'help_outline', function (result) {\n // If all\n if (result) main._delObjects(id, true, callback);\n });\n }\n }\n };\n\n gMain = main; // for google maps\n\n var tabs = {\n hosts: new Hosts(main), // must be first to read the list of hosts\n objects: new Objects(main),\n adapters: new Adapters(main),\n instances: new Instances(main),\n users: new Users(main),\n //groups: new Groups(main),\n enums: new Enums(main),\n events: new Events(main),\n logs: new Logs(main),\n states: null,\n intro: new Intro(main)\n };\n\n if (typeof States !== 'undefined') {\n tabs.states = new States(main);\n }\n\n main.instances = tabs.instances.list;\n main.tabs = tabs;\n main.dialogs = {\n system: new System(main),\n customs: new Customs(main),\n config: new Config(main),\n editobject: new EditObject(main),\n issue: new Issue(main),\n readme: new Readme(main)\n };\n\n var stdout;\n var cmdCallback = null;\n var activeCmdId = null;\n var $stdout = $('#stdout');\n\n var $dialogCommand = $('#dialog-command');\n var $dialogLicense = $('#dialog-license-main');\n var $dialogMessage = $('#dialog-message');\n var $dialogConfirm = $('#dialog-confirm');\n var $dialogCommandProgress = $dialogCommand.find('.progress div');\n\n var $adminSideMenu = $('#admin_sidemenu_menu');\n var $adminSideMain = $('#admin_sidemenu_main');\n\n var firstConnect = true;\n\n // detect touch devices\n if (!('ontouchstart' in window || navigator.maxTouchPoints)) {\n $('body').addClass('desktop-screen');\n }\n if (navigator.userAgent.indexOf('Safari') !== -1 &&\n navigator.userAgent.indexOf('Chrome') === -1 &&\n navigator.userAgent.indexOf('Android') === -1) {\n $('body').addClass('safari');\n main.browser = 'safari';\n main.noSelect = true;\n } else if (detectIE()) {\n $('body').addClass('ie');\n // workaround\n main.browser = 'ie';\n main.browserVersion = detectIE();\n main.noSelect = true;\n $('#host-adapters-btn').css('margin-top', '10px');\n }\n\n // Read all positions, selected widgets for every view,\n // Selected view, selected menu page,\n // Selected widget or view page\n // Selected filter\n if (typeof storage !== 'undefined') {\n try {\n main.config = storage.get('adminConfig');\n if (main.config) {\n main.config = JSON.parse(main.config);\n } else {\n main.config = {};\n }\n } catch (e) {\n console.log('Cannot load edit config');\n main.config = {};\n }\n }\n\n function globalClickHandler(event){\n $('#admin_sidemenu_dialog').html('');\n $('html').off('click', globalClickHandler);\n }\n\n function initHtmlButtons() {\n main.socket.emit('getVersion', function (err, version) {\n\t\t\tvar $versionBtn = $('.button-version');\n\t if (!$versionBtn.hasClass('vendor')) {\n\t $versionBtn.text('yunkong2.admin ' + version);\n\t }\n });\n\n $('.choose-tabs-config-button').off('click').on('click', function(event) {\n var $dialog = $('#admin_sidemenu_dialog');\n var html = $dialog.html();\n if (html) {\n $dialog.html('');\n // disable global handler\n $('html').off('click', globalClickHandler);\n return;\n }\n setTimeout(function () {\n // enable global handler\n $('html').on('click', globalClickHandler);\n }, 100);\n var $e = $(event.target);\n var offs = $e.offset();\n offs.top += $e.height() - 2;\n\n var text =\n '' + // style=\"overflow: visible; z-index: 999; \">'\n '
    ' +\n '
      ';\n\n var $lis = $adminSideMenu;\n for (var tid in allTabs) {\n var name = allTabs[tid];\n var found = $adminSideMenu.find('.admin-sidemenu-items[data-tab=\"' + tid + '\"]').length;\n // TABS\n /*$adminSideMenu.each(function (i, e) {\n if (tid === $(e).attr('aria-controls')) {\n found = $(e);\n return false;\n }\n });*/\n var id = 'chk-' + tid;\n text +=\n '
    • ' +\n '' + _(name) + '';\n }\n text += '' +\n '
    ' +\n '
    ' +\n '
    ';\n $dialog.append(text);\n\n $dialog.find('.chk-tab').off('change').on('change', function (event) {\n var id = $(this).attr('id').substr(4);\n if ($(this).prop('checked')) {\n main.systemConfig.common.tabs.push(id);\n } else {\n var pos = main.systemConfig.common.tabs.indexOf(id);\n if (id !== -1) {\n main.systemConfig.common.tabs.splice(pos, 1);\n }\n }\n main.saveTabs();\n initTabs();\n });\n // workaround for materialize checkbox problem\n $dialog.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n });\n\n main.updateWizard();\n\n $('#button-logout').on('click', function () {\n window.location.href = '/logout/';\n });\n\n window.onhashchange = function () {\n main.navigateDo();\n };\n main.navigateDo();\n }\n\n function initHtmlTabs() {\n // jQuery UI initializations\n initSideNav();\n\n if (!main.tabsInited) {\n main.tabsInited = true;\n\n initHtmlButtons();\n\n $('#events_threshold').on('click', function () {\n main.socket.emit('eventsThreshold', false);\n });\n } else {\n var $menu = $adminSideMenu;\n var panelSelector = $menu.data('problem-link');\n if (panelSelector) {\n var $panel = $(panelSelector);\n // Init source for iframe\n if ($panel.length) {\n var link = $panel.data('src');\n if (link && link.indexOf('%') === -1) {\n var $iframe = $panel.find('iframe');\n if ($iframe.length && !$iframe.attr('src')) {\n $iframe.attr('src', link);\n $menu.data('problem-link', null);\n }\n }\n }\n }\n // show current tab\n main.currentHash = null;\n main.navigateDo();\n }\n }\n\n function initTabs() {\n // extract all additional instances\n var text = '';\n var list = [];\n var addTabs = [];\n\n allTabs = {};\n for (var i = 0; i < main.instances.length; i++) {\n var instance = main.instances[i];\n var instanceObj = main.objects[instance];\n if (!instanceObj.common || !instanceObj.common.adminTab) continue;\n if (instanceObj.common.adminTab.singleton) {\n var isFound = false;\n var inst1 = instance.replace(/\\.(\\d+)$/, '.');\n for (var j = 0; j < addTabs.length; j++) {\n var inst2 = addTabs[j].replace(/\\.(\\d+)$/, '.');\n if (inst1 === inst2) {\n isFound = true;\n break;\n }\n }\n if (!isFound) addTabs.push(instance);\n } else {\n addTabs.push(instance);\n }\n }\n\n // Build the standard tabs together\n $('.admin-tab').each(function () {\n var $this = $(this);\n var id = $this.attr('id');\n list.push(id);\n allTabs[id] = $this.data('name');\n });\n\n // Look for adapter tabs\n for (var a = 0; a < addTabs.length; a++) {\n var tab = main.objects[addTabs[a]];\n var name = 'tab-' + tab.common.name;\n\n var link = tab.common.adminTab.link || '/adapter/' + tab.common.name + '/tab.html';\n if (tab.common.materializeTab) {\n link = tab.common.adminTab.link || '/adapter/' + tab.common.name + '/tab_m.html';\n }\n\n var parts = addTabs[a].split('.');\n var buttonName;\n\n if (tab.common.adminTab.name) {\n if (typeof tab.common.adminTab.name === 'object') {\n if (tab.common.adminTab.name[systemLang]) {\n buttonName = tab.common.adminTab.name[systemLang];\n } else if (tab.common.adminTab.name.en) {\n buttonName = _(tab.common.adminTab.name.en);\n } else {\n buttonName = _(tab.common.name);\n }\n } else {\n buttonName = _(tab.common.adminTab.name);\n }\n } else {\n buttonName = _(tab.common.name);\n }\n\n // if (main.objects[addTabs[a]].common.adminTab.name) {\n // if (typeof main.objects[addTabs[a]].common.adminTab.name === 'object') {\n // if (main.objects[addTabs[a]].common.adminTab.name[systemLang]) {\n // buttonName = main.objects[addTabs[a]].common.adminTab.name[systemLang];\n // } else if (main.objects[addTabs[a]].common.adminTab.name.en) {\n // buttonName = _(main.objects[addTabs[a]].common.adminTab.name.en);\n // } else {\n // buttonName = _(main.objects[addTabs[a]].common.name);\n // }\n // } else {\n // buttonName = _(main.objects[addTabs[a]].common.adminTab.name);\n // }\n // } else {\n // buttonName = _(main.objects[addTabs[a]].common.name);\n // }\n\n if (!tab.common.adminTab.singleton) {\n if (link.indexOf('?') !== -1) {\n link += '&instance=' + parts[3];\n } else {\n link += '?instance=' + parts[3];\n }\n buttonName += '.' + parts[3];\n name += '-' + parts[3];\n } else {\n parts[3] = 0;\n }\n\n list.push(name);\n allTabs[name] = buttonName;\n\n if (!main.systemConfig.common.tabs || main.systemConfig.common.tabs.indexOf(name) !==-1) {\n var isReplace = false;\n if (!link) {\n link = '/adapter/' + parts[2] + '/tab.html';\n if (tab.common.materilizeTab) {\n link = '/adapter/' + parts[2] + '/tab_m.html';\n }\n } else {\n // convert \"http://%ip%:%port%\" to \"http://localhost:1880\"\n /*main.tabs.instances._replaceLinks(link, parts[2], parts[3], name, function (link, adapter, instance, arg) {\n $('#' + arg).data('src', link);\n });*/\n isReplace = link.indexOf('%') !== -1;\n }\n\n text += '
  • ' + buttonName + '
  • \\n';\n\n // noinspection JSJQueryEfficiency\n if (!$('#' + name).length) {\n var div = '
    ' +\n '
    ';\n $(div).hide().appendTo($('body'));\n\n // TODO: temporary, until other tab will be adapted\n $('#' + name).find ('.iframe-in-tab').on('load', function () {\n var elem = $ (this).contents ().find('body>header');\n if (!elem || !elem.length) elem = $(this).contents ().find('head');\n if (elem && elem.length) elem.append('');\n });\n } else {\n $('#' + name).hide().appendTo($('body'));\n }\n } else {\n $('#' + name).hide().appendTo($('body'));\n }\n }\n $('.tab-custom').each(function () {\n if (list.indexOf($(this).attr('id')) === -1) {\n $('#' + $(this).attr('id')).remove();\n }\n });\n\n if (!main.systemConfig.common.tabs) main.systemConfig.common.tabs = list;\n\n if ($('.link-replace').length) {\n var countLink = 0;\n\n // If some objects cannot be read => go by timeout\n var loadTimeout = setTimeout(function() {\n loadTimeout = null;\n initHtmlTabs(/*showTabs*/);\n }, 100);\n\n $('.link-replace').each(function () {\n // convert \"http://%ip%:%port%\" to \"http://localhost:1880\"\n countLink++;\n main.tabs.instances._replaceLinks($(this).data('src'), $(this).data('adapter'), $(this).data('instance'), $(this).attr('id'), function (link, adapter, instance, arg) {\n $('#' + arg).data('src', link).removeClass('link-replace');\n if (!--countLink) {\n if (loadTimeout) {\n clearTimeout(loadTimeout);\n loadTimeout = null;\n initHtmlTabs(/*showTabs*/);\n }\n }\n });\n });\n } else {\n initHtmlTabs();\n }\n }\n\n main.initHostsList = function (isFirstInit) {\n // fill the host list (select) on adapter tab\n var $selHosts = $('#host-adapters');\n if (isFirstInit && $selHosts.data('inited')) {\n return\n }\n\n $selHosts.data('inited', true);\n\n main.currentHost = main.currentHost || main.config.currentHost || '';\n\n var lines = [];\n var color;\n var curId;\n for (var i = 0; i < main.tabs.hosts.list.length; i++) {\n lines.push('
  • ' + main.getHostIcon(main.objects[main.tabs.hosts.list[i].id], 'imgHost left') + main.tabs.hosts.list[i].name + '
  • ');\n if (!main.currentHost) {\n main.currentHost = main.tabs.hosts.list[i].name;\n }\n if (main.currentHost === main.tabs.hosts.list[i].name) {\n curId = main.tabs.hosts.list[i].id;\n }\n }\n $selHosts.html(lines);\n\n var $selBtn = $('#host-adapters-btn').show();\n $selBtn\n .text(_('Host:') + ' ' + main.currentHost)\n .dropdown();\n\n if (main.objects[curId] && main.objects[curId].common) {\n color = main.objects[curId].common.color;\n }\n\n $selBtn.append($(main.getHostIcon(main.objects[curId], 'imgHost left')));\n if (color) {\n // set color of button\n }\n\n if (main.tabs.hosts.list.length < 2) {\n $selBtn.addClass('disabled');\n } else {\n $selBtn.removeClass('disabled');\n }\n\n // host selector\n $selHosts.find('a').on('click', function () {\n var val = $(this).data('value');\n var id = 'system.host.' + val + '.alive';\n if (!main.states[id] || !main.states[id].val || main.states[id].val === 'null') {\n main.showMessage(_('Host %s is offline', $(this).val()));\n return;\n }\n\n main.currentHost = val;\n\n $('#host-adapters-btn')\n .text(_('Host:') + ' ' + main.currentHost)\n .append($(this).find('.imgHost').clone());\n // destroy current view and load anew\n console.log(main.currentTab);\n if (tabsInfo['tab-' + main.currentTab] && tabsInfo['tab-' + main.currentTab].host) {\n // destroy actual tab\n if (main.tabs[main.currentTab] && typeof main.tabs[main.currentTab].destroy === 'function') {\n main.tabs[main.currentTab].destroy();\n }\n\n // init new tab\n if (main.tabs[main.currentTab] && typeof main.tabs[main.currentTab].init === 'function') {\n main.tabs[main.currentTab].init();\n }\n }\n\n main.saveConfig('currentHost', main.currentHost);\n });\n };\n\n // Use the function for this because it must be done after the language was read\n function initAllDialogs() {\n // todo delete it because jqgrid does not used any more\n if (typeof initGridLanguage === 'function') {\n initGridLanguage(main.systemConfig.common.language);\n }\n\n $dialogCommand.modal({\n dismissible: false\n });\n $dialogMessage.modal();\n $dialogConfirm.modal({\n dismissible: false\n });\n\n $dialogCommand.find('.progress-show-more').off('change').on('change', function () {\n var val = $(this).prop('checked');\n main.saveConfig('progressMore', val);\n if (val) {\n $dialogCommand.find('.textarea').show();\n } else {\n $dialogCommand.find('.textarea').hide();\n }\n });\n if (main.config.progressClose === undefined) {\n main.config.progressClose = true;\n }\n $dialogCommand.find('.progress-dont-close input').on('change', function () {\n main.saveConfig('progressClose', $(this).prop('checked'));\n });\n // workaround for materialize checkbox problem\n $dialogCommand.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n // ignore switch\n if ($input.parent().parent().hasClass('switch')) return;\n\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n $dialogCommand.find('.progress-dont-close input').prop('checked', main.config.progressClose);\n $dialogCommand.find('.progress-show-more').prop('checked', !!main.config.progressMore).trigger('change');\n $dialogCommand.find('.btn').on('click', function () {\n if ($dialogCommand.data('finished')) {\n $adminSideMain.find('.button-command').hide();\n } else {\n $adminSideMain.find('.button-command').show();\n }\n });\n\n $adminSideMain.find('.button-command').on('click', function () {\n $dialogCommand.modal('open');\n });\n }\n\n function checkNodeJsVersions(hosts, index) {\n index = index || 0;\n if (hosts && index < hosts.length) {\n main.socket.emit('sendToHost', hosts[index].name, 'getHostInfo', null, function (result) {\n if (result && result['Node.js']) {\n var major = parseInt(result['Node.js'].split('.').shift().replace('v', ''), 10);\n if (major < 6 || major === 7 || major === 9 ) { // we allow 6, 8 and 10+\n main.showMessage(_('This version of node.js \"%s\" on \"%s\" is deprecated. Please install node.js 6, 8 or newer', result['Node.js'], hosts[index].name), _('Suggestion'), 'error_outline');\n }\n }\n setTimeout(function () {\n checkNodeJsVersions(hosts, index + 1);\n }, 100);\n });\n }\n }\n\n // ----------------------------- Objects show and Edit ------------------------------------------------\n function getObjects(callback) {\n main.socket.emit('getAllObjects', function (err, res) {\n if (err) {\n // following errors are possible\n // permissionError\n // Admin is not enabled in cloud settings!\n window.alert(_(err));\n return;\n }\n\n setTimeout(function () {\n var obj;\n main.objects = res;\n for (var id in main.objects) {\n if (!main.objects.hasOwnProperty(id) || id.slice(0, 7) === '_design') continue;\n\n obj = main.objects[id];\n\n if (obj.type === 'instance') main.instances.push(id);\n if (obj.type === 'enum') tabs.enums.list.push(id);\n if (obj.type === 'user') tabs.users.list.push(id);\n if (obj.type === 'group') tabs.users.groups.push(id);\n if (obj.type === 'adapter') tabs.adapters.list.push(id);\n if (obj.type === 'host') tabs.hosts.addHost(obj);\n\n // convert obj.history into obj.custom\n if (obj.common && obj.common.history) {\n obj.common.custom = JSON.parse(JSON.stringify(obj.common.history));\n delete obj.common.history;\n }\n }\n main.objectsLoaded = true;\n main.initHostsList(true);\n\n initTabs();\n // init dialogs\n for (var dialog in main.dialogs) {\n if (main.dialogs.hasOwnProperty(dialog) && typeof main.dialogs[dialog].prepare === 'function') {\n main.dialogs[dialog].prepare();\n }\n }\n\n // Detect node.js version\n checkNodeJsVersions(tabs.hosts.list);\n\n main.getUser();\n\n if (typeof callback === 'function') callback();\n }, 0);\n });\n }\n // ----------------------------- States show and Edit ------------------------------------------------\n\n function getStates(callback) {\n if (tabs.states) tabs.states.clear();\n main.socket.emit('getStates', function (err, res) {\n main.states = res;\n if (typeof callback === 'function') {\n setTimeout(function () {\n callback();\n }, 0);\n }\n });\n }\n\n function stateChange(id, state) {\n id = id ? id.replace(/\\s/g, '_') : '';\n\n if (!id || !id.match(/\\.messagebox$/)) {\n if (tabs.states) {\n tabs.states.stateChange(id, state);\n }\n tabs.objects.stateChange(id, state);\n tabs.hosts.stateChange(id, state);\n\n // Update alive and connected of main.instances\n tabs.instances.stateChange(id, state);\n tabs.adapters.stateChange(id, state);\n main.dialogs.customs.stateChange(id, state);\n\n if (main.selectId) {\n main.selectId.selectId('state', id, state);\n }\n main.addEventMessage(id, state, false, true);\n } else {\n main.addEventMessage(id, state, true, true);\n }\n }\n\n function objectChange(id, obj) {\n //var changed = false;\n //var oldObj = null;\n var action = 'update';\n\n // update main.objects cache\n if (obj) {\n if (obj._rev && main.objects[id]) main.objects[id]._rev = obj._rev;\n if (!main.objects[id]) {\n action = 'add';\n }\n if (action === 'add' || JSON.stringify(main.objects[id]) !== JSON.stringify(obj)) {\n main.objects[id] = obj;\n }\n } else if (main.objects[id]) {\n action = 'delete';\n delete main.objects[id];\n }\n\n // update to event table\n main.addEventMessage(id, obj, false, false);\n\n tabs.objects.objectChange(id, obj, action);\n\n main.selectId && main.selectId.selectId('object', id, obj, action);\n\n tabs.enums.objectChange(id, obj, action);\n tabs.intro.objectChange(id, obj, action);\n\n // If system config updated\n if (id === 'system.config') {\n // Check language\n if (main.systemConfig.common.language !== obj.common.language) {\n window.location.reload();\n }\n\n main.systemConfig = obj;\n initTabs();\n }\n\n if (id === 'system.adapter.discovery.0') {\n main.updateWizard();\n }\n\n if (id.match(/^system\\.host\\.[-\\w]+$/)) {\n main.initHostsList();\n }\n\n tabs.instances.objectChange(id, obj, action);\n\n if (id.match(/^script\\.js\\.global\\..*/)) {\n main.ignoreJSupdate = true;\n }\n\n if (obj && id.match(/^system\\.adapter\\.[\\w-]+\\.[0-9]+$/)) {\n if (obj.common &&\n obj.common.adminTab &&\n !obj.common.adminTab.ignoreConfigUpdate\n ) {\n // one exception for javascript. To able work with global scripts normally\n if (!id.match(/^system\\.adapter\\.javascript\\.[0-9]+$/) || !main.ignoreJSupdate) {\n initTabs();\n } else {\n main.ignoreJSupdate = false;\n }\n }\n\n if (obj && obj.type === 'instance' && obj.common.supportCustoms) {\n // Update all states if customs enabled or disabled\n tabs.objects.reinit();\n }\n }\n\n tabs.hosts.objectChange(id, obj, action);\n\n // Update users\n tabs.users.objectChange(id, obj, action);\n\n // update user in side menu\n if (id === main.currentUser) {\n main.getUser();\n }\n }\n\n function monitor() {\n if (main._timer) return;\n var ts = (new Date()).getTime();\n if (ts - main._lastTimer > 30000) {\n // It seems, that PC was in a sleep => Reload page to request authentication anew\n location.reload();\n } else {\n main._lastTimer = ts;\n }\n main._timer = setTimeout(function () {\n main._timer = null;\n monitor();\n }, 10000);\n }\n\n // ---------------------------- Subscribes ---------------------------------------------\n main.resubscribeStates = function () {\n for (var pattern in main.subscribesStates) {\n if (main.subscribesStates.hasOwnProperty(pattern) && main.subscribesStates[pattern]) {\n console.debug('Re-Subscribe: ' + pattern);\n main.socket.emit('subscribe', pattern);\n }\n }\n };\n\n main.resubscribeObjects = function () {\n for (var pattern in main.subscribesObjects) {\n if (main.subscribesObjects.hasOwnProperty(pattern) && main.subscribesObjects[pattern]) {\n main.socket.emit('subscribeObjects', pattern);\n }\n }\n };\n\n main.resubscribeLogs = function () {\n if (main.subscribesLogs) {\n console.debug('Subscribe LOG');\n main.socket.emit('requireLog', true);\n }\n };\n\n main.subscribeStates = function (patterns) {\n if (!patterns) return;\n if (typeof patterns === 'object') {\n for (var s = 0; s < patterns.length; s++) {\n main.subscribesStates[patterns[s]] = main.subscribesStates[patterns[s]] || 0;\n main.subscribesStates[patterns[s]]++;\n if (main.subscribesStates[patterns[s]] === 1) {\n console.debug('Subscribe: ' + patterns[s]);\n main.socket.emit('subscribe', patterns[s]);\n }\n }\n } else {\n main.subscribesStates[patterns] = main.subscribesStates[patterns] || 0;\n main.subscribesStates[patterns]++;\n if (main.subscribesStates[patterns] === 1) {\n console.debug('Subscribe: ' + patterns);\n main.socket.emit('subscribe', patterns);\n }\n }\n };\n\n main.unsubscribeStates = function (patterns) {\n if (!patterns) return;\n if (typeof patterns === 'object') {\n for (var s = 0; s < patterns.length; s++) {\n if (main.subscribesStates[patterns[s]]) {\n main.subscribesStates[patterns[s]]--;\n }\n if (main.subscribesStates[patterns[s]] === 0) {\n console.debug('Unsibscribe: ' + patterns[s]);\n main.socket.emit('unsubscribe', patterns[s]);\n delete main.subscribesStates[patterns[s]];\n }\n }\n } else {\n if (main.subscribesStates[patterns]) {\n main.subscribesStates[patterns]--;\n }\n if (main.subscribesStates[patterns] === 0) {\n console.debug('Unsibscribe: ' + patterns);\n main.socket.emit('unsubscribe', patterns);\n delete main.subscribesStates[patterns];\n }\n }\n };\n\n main.subscribeObjects = function (patterns) {\n if (!patterns) return;\n if (typeof patterns === 'object') {\n for (var s = 0; s < patterns.length; s++) {\n main.subscribesObjects[patterns[s]] = main.subscribesObjects[patterns[s]] || 0;\n main.subscribesObjects[patterns[s]]++;\n if (main.subscribesObjects[patterns[s]] === 1) {\n main.socket.emit('subscribeObjects', patterns[s]);\n }\n }\n } else {\n main.subscribesObjects[patterns] = main.subscribesObjects[patterns] || 0;\n main.subscribesObjects[patterns]++;\n if (main.subscribesObjects[patterns] === 1) {\n main.socket.emit('subscribeObjects', patterns);\n }\n }\n };\n\n main.unsubscribeObjects = function (patterns) {\n if (!patterns) return;\n if (typeof patterns === 'object') {\n for (var s = 0; s < patterns.length; s++) {\n if (main.subscribesObjects[patterns[s]]) {\n main.subscribesObjects[patterns[s]]--;\n }\n if (main.subscribesObjects[patterns[s]] === 0) {\n main.socket.emit('unsubscribeObjects', patterns[s]);\n delete main.subscribesObjects[patterns[s]];\n }\n }\n } else {\n if (main.subscribesObjects[patterns]) {\n main.subscribesObjects[patterns]--;\n }\n if (main.subscribesObjects[patterns] === 0) {\n main.socket.emit('unsubscribeObjects', patterns);\n delete main.subscribesObjects[patterns];\n }\n }\n };\n\n main.subscribeLogs = function (isSubscribe) {\n if (isSubscribe) {\n main.subscribesLogs++;\n if (main.subscribesLogs === 1) {\n console.debug('Subscribe Logs');\n main.socket.emit('requireLog', true);\n }\n } else {\n main.subscribesLogs--;\n if (main.subscribesLogs <= 0) {\n main.subscribesLogs = 0;\n console.debug('Unsubscribe Logs');\n main.socket.emit('requireLog', false);\n }\n }\n };\n\n // ---------------------------- Navigation ---------------------------------------------\n main.navigateCheckDialog = function (callback) {\n if (main.currentDialog && main.dialogs[main.currentDialog] && typeof main.dialogs[main.currentDialog].allStored === 'function') {\n if (main.dialogs[main.currentDialog].allStored() === false) {\n return main.confirmMessage(_('Some data are not stored. Discard?'), _('Please confirm'), null, function (result) {\n callback(!result);\n });\n }\n } else {\n if (configNotSaved) {\n return main.confirmMessage(_('Some data are not stored. Discard?'), _('Please confirm'), null, function (result) {\n callback(!result);\n });\n }\n }\n callback(false);\n };\n\n main.navigateGetParams = function () {\n var parts = decodeURI(window.location.hash).split('/');\n return parts[2] ? decodeURIComponent(parts[2]) : null;\n };\n\n main.navigate = function (options) {\n if (!options) {\n options = {};\n }\n if (typeof options === 'string') {\n options = {\n tab: options,\n dialog: '',\n params: ''\n };\n }\n\n // get actual tab\n if (!options.tab) {\n var parts = decodeURI(window.location.hash).split('/');\n options.tab = parts[0].replace(/^#/, '').replace(/^tab-/, '');\n }\n\n window.location.hash = '#tab-' + encodeURIComponent(options.tab) + (options.dialog ? '/' + options.dialog + (options.params ? '/' + encodeURIComponent(options.params) : '') : '');\n };\n\n // Router\n main.navigateDo = function () {\n // ignore if hash not changed\n if (window.location.hash === main.currentHash) {\n return;\n }\n // if config dialog opened and has some unsaved data\n main.navigateCheckDialog(function (err) {\n if (!err) {\n configNotSaved = null;\n main.currentHash = window.location.hash;\n // hash has following structure => #tabName/dialogName/ids\n var parts = main.currentHash.split('/');\n var tab = parts[0].replace(/^#/, '').replace(/^tab-/, '');\n var dialog = parts[1];\n var params = decodeURIComponent(parts[2]);\n\n // set default page\n if (!tab || tab === '!') {\n if (!main.systemConfig.common.tabs || main.systemConfig.common.tabs.indexOf('tab-intro') !== -1) {\n tab = 'intro';\n } else if (main.systemConfig.common.tabs.indexOf('tab-adapters') !== -1) {\n tab = 'adapters';\n } else {\n tab = main.systemConfig.common.tabs[0].replace(/^#/, '').replace(/^tab-/, '');\n }\n }\n // do tab is not found\n\n var $adminBody = $('.admin-sidemenu-body');\n var $actualTab = $adminBody.find('.admin-sidemenu-body-content');\n var $panel = $('#tab-' + tab);\n\n $adminBody.find('.admin-preloader').remove();\n\n if (!$panel.length) {\n tab = 'intro';\n }\n\n // if tab was changed\n if (main.currentTab !== tab || !$actualTab.length) {\n var link;\n // destroy actual tab\n if (main.currentTab && tabs[main.currentTab] && typeof tabs[main.currentTab].destroy === 'function') {\n tabs[main.currentTab].destroy();\n } else if (main.currentTab) {\n var $oldPanel = $('#tab-' + main.currentTab);\n // destroy current iframe\n if ($oldPanel.length && (link = $oldPanel.data('src'))) {\n var $iframe_ = $oldPanel.find('>iframe');\n if ($iframe_.attr('src')) {\n console.log('clear');\n $iframe_.attr('src', '');\n }\n }\n }\n main.currentTab = tab;\n\n $actualTab.hide().appendTo('body');\n if (!dialog) {\n $panel.addClass('admin-sidemenu-body-content').show().appendTo($adminBody);\n $actualTab = $panel;\n }\n\n // init new tab\n if (tabs[tab] && typeof tabs[tab].init === 'function') {\n tabs[tab].init();\n }\n\n // if iframe like node-red\n if ($panel.length && (link = $panel.data('src'))) {\n if (link.indexOf('%') === -1) {\n var $iframe = $panel.find('>iframe');\n if ($iframe.length && !$iframe.attr('src')) {\n $iframe.attr('src', link);\n }\n } else {\n $adminSideMenu.data('problem-link', 'tab-' + tab);\n }\n }\n }\n\n // select menu element\n var $tab = $adminSideMenu.find('.admin-sidemenu-items[data-tab=\"tab-' + tab + '\"]');\n $adminSideMenu.find('.admin-sidemenu-items').not($tab).removeClass('admin-sidemenu-active');\n $tab.addClass('admin-sidemenu-active');\n\n if (tabsInfo['tab-' + tab] && tabsInfo['tab-' + tab].host) {\n $('#host-adapters-btn').css('opacity', 1);\n } else {\n $('#host-adapters-btn').css('opacity', 0.3);\n }\n document.title = tab + ' - yunkong2';\n // if some dialog opened or must be shown\n if (main.currentDialog !== dialog) {\n // destroy it\n if (main.dialogs[main.currentDialog] && typeof main.dialogs[main.currentDialog].destroy === 'function') {\n main.dialogs[main.currentDialog].destroy();\n }\n main.currentDialog = dialog;\n if (dialog && main.dialogs[dialog]) {\n if (typeof main.dialogs[dialog].init === 'function') {\n main.dialogs[dialog].init(params ? params.split(',') : undefined);\n }\n tabs[main.currentTab] && tabs[main.currentTab].saveScroll && tabs[main.currentTab].saveScroll();\n $actualTab.hide().appendTo('body');\n $('#dialog-' + dialog).addClass('admin-sidemenu-body-content').show().appendTo($adminBody);\n } else if ($actualTab.attr('id') !== $panel.attr('id')) {\n $actualTab.hide().appendTo('body');\n $panel.addClass('admin-sidemenu-body-content').show().appendTo($adminBody);\n tabs[main.currentTab] && tabs[main.currentTab].restoreScroll && tabs[main.currentTab].restoreScroll();\n }\n }\n } else {\n // restore hash link\n window.location.hash = main.currentHash || '';\n }\n });\n };\n\n function getIconHtml(obj, classes) {\n var icon;\n var alt;\n var isCommon = obj && obj.common;\n\n if (isCommon.icon) {\n if (!isCommon.icon.match(/^data:image\\//)) {\n if (isCommon.icon.indexOf('.') !== -1) {\n var instance;\n if (obj.type === 'instance') {\n icon = '/adapter/' + obj.common.name + '/' + obj.common.icon;\n } else if (obj._id.match(/^system\\.adapter\\./)) {\n instance = obj._id.split('.', 3);\n if (isCommon.icon[0] === '/') {\n instance[2] += isCommon.icon;\n } else {\n instance[2] += '/' + isCommon.icon;\n }\n icon = '/adapter/' + instance[2];\n } else {\n instance = obj._id.split('.', 2);\n if (isCommon.icon[0] === '/') {\n instance[0] += isCommon.icon;\n } else {\n instance[0] += '/' + isCommon.icon;\n }\n icon = '/adapter/' + instance[0];\n }\n } else {\n return '' + isCommon.icon + '';\n }\n\n } else {\n icon = isCommon.icon;\n }\n alt = obj.type;\n }\n return {icon: icon, alt: alt}\n }\n\n main.getIconFromObj = function (obj, imgPath, classes) {\n var icon = '';\n var alt = '';\n if (obj && obj.common) {\n if (obj.common.icon) {\n var result = getIconHtml(obj);\n icon = result.icon;\n alt = result.alt;\n } else {\n imgPath = imgPath || 'lib/css/fancytree/';\n if (obj.type === 'device') {\n icon = imgPath + 'device.png';\n alt = 'device';\n } else if (obj.type === 'channel') {\n icon = imgPath + 'channel.png';\n alt = 'channel';\n } else if (obj.type === 'state') {\n icon = imgPath + 'state.png';\n alt = 'state';\n }\n }\n }\n\n if (icon) return '\"'';\n return '';\n };\n\n // static, just used from many places\n main.getIcon = function(id, imgPath, objects, classes) {\n return main.getIconFromObj((objects || main.objects)[id], imgPath, classes);\n };\n\n main.getHostIcon = function (obj, classes) {\n var icon = '';\n var alt = '';\n\n if (obj && obj.common && obj.common.icon) {\n var result = getIconHtml(obj);\n icon = result.icon;\n alt = result.alt;\n }\n icon = icon || 'img/no-image.png';\n alt = alt || '';\n\n return '\"'';\n };\n\n main.formatBytes = function (bytes) {\n if (Math.abs(bytes) < 1024) {\n return bytes + ' B';\n }\n var units = ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];\n var u = -1;\n do {\n bytes /= 1024;\n ++u;\n } while (Math.abs(bytes) >= 1024 && u < units.length - 1);\n return bytes.toFixed(1) + ' ' + units[u];\n };\n\n // https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color\n main.invertColor = function (hex) {\n if (hex.indexOf('#') === 0) {\n hex = hex.slice(1);\n }\n // convert 3-digit hex to 6-digits.\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n if (hex.length !== 6) {\n return false;\n }\n var r = parseInt(hex.slice(0, 2), 16),\n g = parseInt(hex.slice(2, 4), 16),\n b = parseInt(hex.slice(4, 6), 16);\n // http://stackoverflow.com/a/3943023/112731\n return (r * 0.299 + g * 0.587 + b * 0.114) <= 186;\n };\n\n var tabsInfo = {\n 'tab-intro': {order: 1, icon: 'apps'},\n 'tab-adapters': {order: 2, icon: 'store', host: true},\n 'tab-instances': {order: 3, icon: 'subtitles', host: true},\n 'tab-objects': {order: 4, icon: 'view_list'},\n 'tab-enums': {order: 5, icon: 'art_track'},\n 'tab-logs': {order: 6, icon: 'view_headline', host: true},\n 'tab-scenes': {order: 7, icon: 'subscriptions'},\n 'tab-events': {order: 8, icon: 'flash_on'},\n 'tab-users': {order: 10, icon: 'person_outline'},\n 'tab-javascript': {order: 11, icon: 'code'},\n 'tab-text2command-0': {order: 12, icon: 'ac_unit'},\n 'tab-text2command-1': {order: 12, icon: 'ac_unit'},\n 'tab-text2command-2': {order: 12, icon: 'ac_unit'},\n 'tab-node-red-0': {order: 20, icon: 'device_hub'},\n 'tab-node-red-1': {order: 21, icon: 'device_hub'},\n 'tab-node-red-2': {order: 22, icon: 'device_hub'},\n 'tab-hosts': {order: 100, icon: 'storage'},\n 'tab-fullcalendar-0': {order: 30, icon: 'perm_contact_calendar'},\n 'tab-fullcalendar-1': {order: 31, icon: 'perm_contact_calendar'},\n 'tab-fullcalendar-2': {order: 32, icon: 'perm_contact_calendar'}\n };\n\n function initSideNav() {\n var lines = '';\n\n var elements = [];\n $('.admin-tab').each(function () {\n var id = $(this).attr('id');\n if (!main.systemConfig.common.tabs || main.systemConfig.common.tabs.indexOf(id) !== -1) {\n elements.push({\n line: '
  • ' +\n (tabsInfo[id] && tabsInfo[id].icon ? '' + tabsInfo[id].icon + '' : 'live_help') +\n _($(this).data('name')) + '
  • ',\n id: id\n });\n }\n });\n $('.tab-custom').each(function () {\n var id = $(this).attr('id');\n if (!main.systemConfig.common.tabs || main.systemConfig.common.tabs.indexOf(id) !== -1) {\n var icon;\n if (tabsInfo[id] && tabsInfo[id].icon) {\n icon = tabsInfo[id].icon;\n } else {\n var _id = 'system.adapter.' + id.substring(4);\n if (main.objects[_id] && main.objects[_id].adminTab && main.objects[_id]['fa-icon']) {\n icon = main.objects[_id]['fa-icon'];\n }\n }\n\n elements.push({\n line: '
  • ' +\n (icon ? '' + icon + '' : 'live_help') +\n $(this).data('name') + '
  • ',\n id: id\n });\n }\n });\n\n elements.sort(function (a, b) {\n if (!tabsInfo[a.id] && !tabsInfo[b.id]) return 0;\n if (!tabsInfo[a.id]) return 1;\n if (!tabsInfo[b.id]) return -1;\n if (tabsInfo[a.id].order < tabsInfo[b.id].order) return -1;\n if (tabsInfo[a.id].order > tabsInfo[b.id].order) return 1;\n return 0;\n });\n\n for (var e = 0; e < elements.length; e++) {\n lines += elements[e].line;\n }\n $adminSideMenu.find('.admin-sidemenu-menu').html(lines);\n\n $('.admin-sidemenu-close').off('click').on('click', function () {\n $adminSideMain.toggleClass('admin-sidemenu-closed');\n $adminSideMenu.toggleClass('admin-sidemenu-closed');\n $('.admin-sidemenu-close i').toggleClass('hide');\n\n setTimeout(function () {\n //resizeGrids();\n $(window).trigger('resize');\n }, 400);\n });\n\n $('.admin-sidemenu-items').off('click').on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n window.location.hash = '#' + $(this).data('tab');\n });\n $('.admin-sidemenu-items a').off('click').on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n window.location.hash = '#' + $(this).parent().data('tab');\n });\n\n // Show if update available\n tabs.hosts.updateCounter();\n tabs.adapters.updateCounter();\n }\n\n // ---------------------------- Socket.io methods ---------------------------------------------\n main.socket.on('log', function (message) {\n tabs.logs.add(message);\n });\n main.socket.on('error', function (error) {\n console.log(error);\n });\n main.socket.on('permissionError', function (err) {\n main.showMessage(_('Has no permission to %s %s %s', err.operation, err.type, (err.id || '')));\n });\n main.socket.on('stateChange', function (id, obj) {\n setTimeout(stateChange, 0, id, obj);\n });\n main.socket.on('objectChange', function (id, obj) {\n setTimeout(objectChange, 0, id, obj);\n });\n main.socket.on('cmdStdout', function (_id, text) {\n if (activeCmdId === _id) {\n var m = text.match(/^upload \\[(\\d+)]/);\n if (m) {\n if ($dialogCommand.data('max') === null) {\n $dialogCommand.data('max', parseInt(m[1], 10));\n $dialogCommandProgress.removeClass('indeterminate').addClass('determinate');\n }\n var max = $dialogCommand.data('max');\n var value = parseInt(m[1], 10);\n $dialogCommandProgress.css('width', (100 - Math.round((value / max) * 100)) + '%');\n } else {\n m = text.match(/^got [-_:\\/\\\\.\\w\\d]+\\/admin$/);\n if (m) {\n // upload of admin\n $dialogCommand.find('.progress-text').html(_('Upload admin started'));\n $dialogCommand.data('max', null);\n } else {\n // got ..../www\n m = text.match(/^got [-_:\\/\\\\.\\w\\d]+\\/www$/);\n if (m) {\n // upload of www\n $dialogCommand.find('.progress-text').html(_('Upload www started'));\n $dialogCommand.data('max', null);\n } else {\n\n }\n }\n }\n\n stdout += '\\n' + text;\n $stdout.val(stdout);\n $stdout.scrollTop($stdout[0].scrollHeight - $stdout.height());\n }\n });\n main.socket.on('cmdStderr', function (_id, text) {\n if (activeCmdId === _id) {\n if (!$dialogCommand.data('error')) {\n $dialogCommand.data('error', text);\n }\n stdout += '\\nERROR: ' + text;\n $stdout.val(stdout);\n $stdout.scrollTop($stdout[0].scrollHeight - $stdout.height());\n }\n });\n main.socket.on('cmdExit', function (_id, exitCode) {\n if (activeCmdId === _id) {\n\n exitCode = parseInt(exitCode, 10);\n stdout += '\\n' + (exitCode !== 0 ? 'ERROR: ' : '') + 'process exited with code ' + exitCode;\n $stdout.val(stdout);\n $stdout.scrollTop($stdout[0].scrollHeight - $stdout.height());\n\n $dialogCommand.find('.progress-dont-close').addClass('disabled');\n $dialogCommandProgress.removeClass('indeterminate').css({'width': '100%'});\n $dialogCommand.find('.btn').html(_('Close'));\n $dialogCommand.data('finished', true);\n $dialogCommand.data('max', true);\n var $backButton = $adminSideMain.find('.button-command');\n $backButton.removeClass('in-progress');\n\n if (!exitCode) {\n $dialogCommand.find('.progress-text').html(_('Success!'));\n $backButton.hide();\n if ($dialogCommand.find('.progress-dont-close input').prop('checked')) {\n setTimeout(function () {\n $dialogCommand.modal('close');\n }, 1500);\n }\n } else {\n var error = $dialogCommand.data('error');\n if (error) {\n var m = error.match(/error: (.*)$/);\n if (m) {\n error = m[1];\n }\n\n $dialogCommand.find('.progress-text').html(_('Done with error: %s', _(error))).addClass('error');\n } else {\n $dialogCommand.find('.progress-text').html(_('Done with error')).addClass('error');\n }\n $backButton.addClass('error');\n $backButton.show();\n }\n if (cmdCallback) {\n cmdCallback(exitCode);\n cmdCallback = null;\n }\n }\n });\n main.socket.on('eventsThreshold', function (isActive) {\n if (isActive) {\n $('#events_threshold').show();\n } else {\n $('#events_threshold').hide();\n }\n });\n main.socket.on('connect', function () {\n $('#connecting').hide();\n if (firstConnect) {\n firstConnect = false;\n\n main.getUser();\n\n main.socket.emit('getUserPermissions', function (err, acl) {\n main.acl = acl;\n // Read system configuration\n main.socket.emit('getObject', 'system.config', function (errConfig, data) {\n main.systemConfig = data;\n\n // set logo and set branding\n if (data && data.native && data.native.vendor) {\n var vendor = data.native.vendor;\n if (vendor.icon) {\n $('.admin-sidemenu-header .button-icon img').attr('src', data.native.vendor.icon);\n }\n if (vendor.name) {\n $('.admin-sidemenu-header .button-version').html(data.native.vendor.name).addClass('vendor');\n }\n if (vendor.admin && vendor.admin.noCustomInstall) {\n $('#btn_filter_custom_url').hide();\n }\n if (vendor.admin && vendor.admin.css) {\n if (vendor.admin.css.sideNavUser) {\n $('.side-nav .user-view').css(vendor.admin.css.sideNavUser);\n }\n if (vendor.admin.css.sideNavMenu) {\n $('.side-nav').css(vendor.admin.css.sideNavMenu);\n }\n if (vendor.admin.css.header) {\n $adminSideMain.find('.admin-sidemenu-header nav').css(vendor.admin.css.header);\n }\n // apply rules\n if (vendor.admin.css.rules) {\n for (var r = 0; r < vendor.admin.css.rules.length; r++) {\n $(vendor.admin.css.rules[r].selector).css(vendor.admin.css.rules[r].css);\n }\n }\n if (vendor.admin.styles) {\n $('head').append('');\n }\n }\n }\n\n // rename log => logs (back compatibility)\n if (main.systemConfig && main.systemConfig.common && main.systemConfig.common.tabs) {\n var pos = main.systemConfig.common.tabs.indexOf('tab-log');\n if (pos !== -1) {\n main.systemConfig.common.tabs[pos] = 'tab-logs';\n }\n }\n\n main.socket.emit('getObject', 'system.repositories', function (errRepo, repo) {\n main.dialogs.system.systemRepos = repo;\n main.socket.emit('getObject', 'system.certificates', function (errCerts, certs) {\n setTimeout(function () {\n main.dialogs.system.systemCerts = certs;\n if (errConfig === 'permissionError') {\n main.systemConfig = {common: {language: systemLang}, error: 'permissionError'};\n } else {\n if (!errConfig && main.systemConfig && main.systemConfig.common) {\n systemLang = main.systemConfig.common.language || systemLang;\n main.systemConfig.common.city = main.systemConfig.common.city || '';\n main.systemConfig.common.country = main.systemConfig.common.country || '';\n main.systemConfig.common.longitude = main.systemConfig.common.longitude || '';\n main.systemConfig.common.latitude = main.systemConfig.common.latitude || '';\n\n if (!main.systemConfig.common.licenseConfirmed) {\n // Show license agreement\n var language = (main.systemConfig.common.language || window.navigator.userLanguage || window.navigator.language || '').substring(0, 2);\n if (language !== 'en') language = 'cn';\n\n systemLang = language;\n\n $dialogLicense.find('.license_text').html(license[language] || license.en);\n\n $dialogLicense.find('.license_checkbox').prop('checked', false);\n\n // on language change\n $dialogLicense.find('.license_language')\n .data('licenseConfirmed', false)\n .val(language)\n .on('change', function () {\n language = $(this).val();\n $dialogLicense.find('.license_language_label').html(translateWord('Select language', language));\n $dialogLicense.find('.license_text').html(license[language] || license.en);\n $dialogLicense.find('.license_checkbox').html(translateWord('license_checkbox', language));\n $dialogLicense.find('.license_agree .translate').html(translateWord('agree', language));\n $dialogLicense.find('.license_non_agree .translate').html(translateWord('not agree', language));\n $dialogLicense.find('.license_terms').html(translateWord('License terms', language));\n $dialogLicense.find('.license_agreement_label').html(translateWord('license agreement', language));\n }).select();\n\n $dialogLicense.find('.license_diag').on('change', function () {\n if ($(this).prop('checked')) {\n $dialogLicense.find('.license_agree').removeClass('disabled');\n } else {\n $dialogLicense.find('.license_agree').addClass('disabled');\n }\n });\n\n // workaround for materialize checkbox problem\n $dialogLicense.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n\n $dialogLicense.modal({\n dismissible: false,\n complete: function () {\n $dialogLicense.find('.license_text').html('');\n location.reload();\n }\n }).modal('open');\n\n $dialogLicense.find('.license_agree').addClass('disabled').off('click').on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n main.socket.emit('getObject', 'system.config', function (err, obj) {\n if (err || !obj) {\n main.showError(_('Cannot confirm: ' + err));\n return;\n }\n obj.common = obj.common || {};\n obj.common.licenseConfirmed = true;\n obj.common.language = language;\n main.socket.emit('setObject', 'system.config', obj, function (err) {\n if (err) {\n main.showError(err);\n }\n $dialogLicense.modal('close');\n $dialogLicense.find('.license_agree').off('click');\n $dialogLicense.find('.license_non_agree').off('click');\n });\n });\n });\n $dialogLicense.find('.license_non_agree').off('click').on('click', function (e) {\n location.reload();\n });\n }\n } else {\n main.systemConfig = {\n type: 'config',\n common: {\n name: 'system.config',\n city: '', // City for weather\n country: '', // Country for weather\n longitude: '', // longitude for javascript\n latitude: '', // longitude for javascript\n language: '', // Default language for adapters. Adapters can use different values.\n tempUnit: '°C', // Default temperature units.\n currency: '', // Default currency sign.\n dateFormat: 'DD.MM.YYYY', // Default date format.\n isFloatComma: true, // Default float divider ('.' - false, ',' - true)\n licenseConfirmed: false, // If license agreement confirmed,\n defaultHistory: '', // Default history instance\n tabs: [ // Show by default only these tabs\n 'tab-intro',\n 'tab-adapters',\n 'tab-instances',\n 'tab-objects',\n 'tab-logs',\n 'tab-scenes',\n 'tab-javascript',\n 'tab-text2command-0'\n ]\n }\n };\n main.systemConfig.common.language = window.navigator.userLanguage || window.navigator.language;\n\n if (main.systemConfig.common.language !== 'en' ) {\n main.systemConfig.common.language = 'cn';\n }\n }\n }\n\n translateCron();\n translateAll();\n\n // Here we go!\n initAllDialogs();\n // call prepare\n for (var t in tabs) {\n if (tabs.hasOwnProperty(t) && tabs[t] && typeof tabs[t].prepare === 'function') {\n tabs[t].prepare();\n }\n }\n // TABS\n // resizeGrids();\n\n getStates(getObjects);\n }, 0);\n });\n });\n });\n });\n } else {\n main.resubscribeStates();\n main.resubscribeObjects();\n main.resubscribeLogs();\n }\n if (main.waitForRestart) {\n location.reload();\n }\n });\n main.socket.on('disconnect', function () {\n $('#connecting').show();\n });\n main.socket.on('reconnect', function () {\n $('#connecting').hide();\n if (main.waitForRestart) {\n location.reload();\n }\n });\n main.socket.on('repoUpdated', function () {\n setTimeout(function () {\n tabs.adapters.init(true);\n }, 0);\n });\n main.socket.on('reauthenticate', function () {\n location.reload();\n });\n\n /*function resizeGrids() {\n var x = $(window).width();\n var y = $(window).height();\n if (x < 720) {\n x = 720;\n }\n if (y < 480) {\n y = 480;\n }\n for (var tab in tabs.events) {\n if (tabs.events.hasOwnProperty(tab) && tabs[tab] && tabs[tab].resize) {\n tabs[tab].resize(x, y);\n }\n }\n }\n\n $(window).resize(resizeGrids);\n */\n});\n})(jQuery);\n","function Adapters(main) {\n 'use strict';\n\n var that = this;\n\n this.curRepository = null;\n this.curRepoLastUpdate = null;\n this.curInstalled = null;\n this.curRepoLastHost = null;\n\n this.list = [];\n this.$tab = $('#tab-adapters');\n this.$grid = this.$tab.find('#grid-adapters');\n this.$tiles = this.$tab.find('#grid-adapters-tiles');\n this.$installDialog = $('#dialog-install-url');\n this.main = main;\n this.tree = [];\n this.data = {};\n this.urls = {};\n this.groupImages = {\n 'common adapters_group': 'img/common.png',\n 'general_group': 'img/common.png',\n 'hardware_group': 'img/hardware.png',\n 'lighting_group': 'img/hardware.png',\n 'energy_group': 'img/hardware.png',\n 'household_group': 'img/hardware.png',\n 'iot-systems_group': 'img/hardware.png',\n 'climate-control_group': 'img/hardware.png',\n 'infrastructure_group': 'img/hardware.png',\n 'garden_group': 'img/hardware.png',\n 'alarm_group': 'img/hardware.png',\n 'script_group': 'img/script.png',\n 'logic_group': 'img/script.png',\n 'media_group': 'img/media.png',\n 'multimedia_group': 'img/media.png',\n 'communication_group': 'img/communication.png',\n 'protocols_group': 'img/communication.png',\n 'network_group': 'img/communication.png',\n 'messaging_group': 'img/communication.png',\n 'visualisation_group': 'img/visualisation.png',\n 'visualization_group': 'img/visualisation.png',\n 'visualization-icons_group': 'img/visualisation.png',\n 'visualization-widgets_group': 'img/visualisation.png',\n 'storage_group': 'img/storage.png',\n 'weather_group': 'img/weather.png',\n 'schedule_group': 'img/schedule.png',\n 'vis_group': 'img/vis.png',\n 'date-and-time_group': 'img/service.png',\n 'geoposition_group': 'img/service.png',\n 'utility_group': 'img/service.png',\n 'misc-data_group': 'img/service.png',\n 'service_group': 'img/service.png',\n 'third-party_group': 'img/service.png'\n };\n this.inited = false;\n\n this.isList = false;\n this.filterVals = {length: 0};\n this.onlyInstalled = false;\n this.onlyUpdatable = false;\n this.currentFilter = '';\n this.currentType = '';\n this.isCollapsed = {};\n this.isTiles = true;\n\n this.types = {\n occ: 'schedule'\n };\n\n function getVersionClass(version) {\n if (version) {\n var tmp = version.split ('.');\n if (tmp[0] === '0' && tmp[1] === '0' && tmp[2] === '0') {\n version = 'planned';\n } else if (tmp[0] === '0' && tmp[1] === '0') {\n version = 'alpha';\n } else if (tmp[0] === '0') {\n version = 'beta'\n } else if (version === 'npm error') {\n version = 'error';\n } else {\n version = 'stable';\n }\n }\n return version;\n }\n\n function prepareTable() {\n that.$grid.show();\n that.$tiles.html('').hide();\n that.$tab.find('#main-toolbar-table-types-btn').hide();\n\n if (!that.$grid.data('inited')) {\n that.$grid.data('inited', true);\n that.$grid.fancytree({\n extensions: ['table', 'gridnav', 'filter', 'themeroller'],\n checkbox: false,\n strings: {\n noData: _('No data')\n },\n table: {\n indentation: 5 // indent 20px per node level\n },\n show: function (currentId, filter, onSuccess) {\n that.sortTree();\n },\n source: that.tree,\n renderColumns: function(event, data) {\n var node = data.node;\n var $tdList = $(node.tr).find('>td');\n var obj = that.data[node.key];\n\n function ellipsis(txt) {\n return '
    ' + txt + '
    ';\n }\n\n if (!obj) {\n $tdList.eq(0).css({'font-weight': 'bold'});\n $tdList.eq(0).find('img').remove();\n $tdList.eq(0).find('span.fancytree-title').attr('style', 'padding-left: 0px !important');\n\n // Calculate total count of adapter and count of installed adapter\n for (var c = 0; c < that.tree.length; c++) {\n if (that.tree[c].key === node.key) {\n $tdList.eq(1).html(that.tree[c].desc || '').css({'overflow': 'hidden', 'white-space': 'nowrap', position: 'relative'});\n var installed = 0;\n for (var k = 0; k < that.tree[c].children.length; k++) {\n if (that.data[that.tree[c].children[k].key].installed) installed++;\n }\n that.tree[c].installed = installed;\n node.data.installed = installed;\n var title;\n //if (!that.onlyInstalled && !that.onlyUpdatable) {\n title = '[' + installed + ' / ' + that.tree[c].children.length + ']';\n $tdList.eq(1).html(ellipsis('' + installed + ' ' + _('of') + ' ' + that.tree[c].children.length + ' ' + _('Adapters from this Group installed')));\n break;\n }\n }\n return;\n }\n\n $tdList.eq(0).css({'overflow': 'hidden', 'white-space': 'nowrap'});\n\n function setHtml(no, html) {\n return $tdList.eq(no).html(ellipsis(html));\n }\n\n var idx = obj.desc.indexOf('= 0 ? obj.desc.substr(0, idx) : obj.desc;\n $tdList.eq(1).html(ellipsis(obj.desc))\n .attr('title', desc)\n .css({'white-space': 'nowrap', position: 'relative', 'font-weight': obj.bold ? 'bold' : null}).find('>div>div')\n .css('height: 22px !important')\n ;\n\n setHtml(2, obj.keywords).attr('title', obj.keywords);\n\n $tdList.eq(3).html(obj.installed);\n $tdList.eq(4).html(obj.version); //.css({ position: 'relative'});\n\n // setHtml(5, obj.platform);// actually there is only one platform\n setHtml(5, obj.license);\n setHtml(6, obj.install);\n\n that.initButtons(node.key);\n // If we render this element, that means it is expanded\n if (that.isCollapsed[obj.group]) {\n that.isCollapsed[obj.group] = false;\n that.main.saveConfig('adaptersIsCollapsed', JSON.stringify(that.isCollapsed));\n }\n },\n gridnav: {\n autofocusInput: false,\n handleCursorKeys: true\n },\n filter: {\n mode: 'hide',\n autoApply: true\n },\n collapse: function(event, data) {\n if (that.isCollapsed[data.node.key]) return;\n that.isCollapsed[data.node.key] = true;\n that.main.saveConfig('adaptersIsCollapsed', JSON.stringify(that.isCollapsed));\n }\n });\n\n that.$tab.find('#btn_collapse_adapters').show().off('click').on('click', function () {\n that.$tab.find('.process-adapters').show();\n setTimeout(function () {\n that.$grid.fancytree('getRootNode').visit(function (node) {\n if (!that.filterVals.length || node.match || node.subMatch) node.setExpanded(false);\n });\n that.$tab.find('.process-adapters').hide();\n }, 100);\n });\n\n that.$tab.find('#btn_expand_adapters').show().off('click').on('click', function () {\n that.$tab.find('.process-adapters').show();\n setTimeout(function () {\n that.$grid.fancytree('getRootNode').visit(function (node) {\n if (!that.filterVals.length || node.match || node.subMatch)\n node.setExpanded(true);\n });\n that.$tab.find('.process-adapters').hide();\n }, 100);\n });\n\n that.$tab.find('#btn_list_adapters').show().off('click').on('click', function () {\n var $processAdapters = that.$tab.find('.process-adapters');\n $processAdapters.show();\n that.isList = !that.isList;\n if (that.isList) {\n that.$tab.find('#btn_list_adapters').addClass('red lighten-3');\n that.$tab.find('#btn_expand_adapters').hide();\n that.$tab.find('#btn_collapse_adapters').hide();\n $(this).attr('title', _('list'));\n } else {\n that.$tab.find('#btn_list_adapters').removeClass('red lighten-3');\n that.$tab.find('#btn_expand_adapters').show();\n that.$tab.find('#btn_collapse_adapters').show();\n $(this).attr('title', _('tree'));\n }\n that.main.saveConfig('adaptersIsList', that.isList);\n $processAdapters.show();\n\n setTimeout(function () {\n that._postInit(true);\n $processAdapters.hide();\n }, 200);\n });\n } else {\n that.$tab.find('#btn_collapse_adapters').show();\n that.$tab.find('#btn_expand_adapters').show();\n that.$tab.find('#btn_list_adapters').show();\n }\n\n if (that.isList) {\n that.$tab.find('#btn_list_adapters').addClass('red lighten-3').attr('title', _('tree'));\n that.$tab.find('#btn_expand_adapters').hide();\n that.$tab.find('#btn_collapse_adapters').hide();\n } else {\n that.$tab.find('#btn_list_adapters').removeClass('red lighten-3').attr('title', _('list'));\n that.$tab.find('#btn_expand_adapters').show();\n that.$tab.find('#btn_collapse_adapters').show();\n }\n\n that.$tab.find('.filter-input').trigger('change');\n }\n\n function prepareTiles() {\n that.$grid.hide();\n that.$tiles.show();\n that.$tab.find('#main-toolbar-table-types-btn').show();\n that.$tab.find('#btn_list_adapters').hide();\n that.$tab.find('#btn_collapse_adapters').hide();\n that.$tab.find('#btn_expand_adapters').hide();\n that.$tab.find('.filter-input').trigger('change');\n }\n\n function onOnlyUpdatableChanged() {\n if (that.onlyUpdatable) {\n that.$tab.find('#btn_filter_updates').addClass('red lighten-3');\n that.$tab.find('#btn_upgrade_all').show();\n } else {\n that.$tab.find('#btn_upgrade_all').hide();\n that.$tab.find('#btn_filter_updates').removeClass('red lighten-3');\n }\n }\n\n function onExpertmodeChanged() {\n if (that.main.config.expertMode) {\n that.$tab.find('#btn_adapters_expert_mode').addClass('red lighten-3');\n that.$tab.find('#btn_upgrade_all').show();\n } else {\n that.$tab.find('#btn_adapters_expert_mode').removeClass('red lighten-3');\n onOnlyUpdatableChanged();\n }\n }\n\n function filterTiles() {\n var anyVisible = false;\n // filter\n if (that.currentFilter) {\n that.$tiles.find('.tile').each(function () {\n var $this = $(this);\n if (that.currentType && !$this.hasClass('class-' + that.currentType)) {\n $this.hide();\n return;\n }\n\n if (customFilter({key: $this.data('id')})) {\n anyVisible = true;\n $this.show();\n } else {\n $this.hide();\n }\n });\n } else {\n if (!that.currentType) {\n that.$tiles.find('.tile')\n .show()\n .each(function () {\n if ($(this).is(':visible')) {\n anyVisible = true;\n return false;\n }\n });\n } else {\n that.$tiles.find('.tile').hide();\n that.$tiles.find('.class-' + that.currentType).show();\n that.$tiles.find('.tile').each(function () {\n if ($(this).is(':visible')) {\n anyVisible = true;\n return false;\n }\n });\n }\n }\n\n if (anyVisible) {\n that.$tiles.find('.filtered-out').hide();\n } else {\n that.$tiles.find('.filtered-out').show();\n }\n }\n\n this.prepare = function () {\n this.$tab.find('#btn_switch_adapters').off('click').on('click', function () {\n that.$tab.find('.process-adapters').show();\n that.isTiles = !that.isTiles;\n\n if (that.isTiles) {\n that.$tab.removeClass('view-table').addClass('view-tiles');\n $(this).find('i').text('view_list');\n } else {\n $(this).find('i').text('view_module');\n that.$tab.removeClass('view-tiles').addClass('view-table');\n }\n\n that.main.saveConfig('adaptersIsTiles', that.isTiles);\n\n setTimeout(function () {\n if (that.isTiles) {\n prepareTiles();\n } else {\n prepareTable();\n }\n that._postInit(true);\n that.$tab.find('.process-adapters').hide();\n }, 50);\n });\n\n this.$tab.find('#btn_filter_adapters').off('click').on('click', function () {\n that.$tab.find('.process-adapters').show();\n that.onlyInstalled = !that.onlyInstalled;\n if (that.onlyInstalled) {\n that.$tab.find('#btn_filter_adapters').addClass('red lighten-3');\n } else {\n that.$tab.find('#btn_filter_adapters').removeClass('red lighten-3');\n }\n that.main.saveConfig('adaptersOnlyInstalled', that.onlyInstalled);\n\n setTimeout(function () {\n that._postInit(true);\n that.$tab.find('.process-adapters').hide();\n }, 50);\n });\n\n this.$tab.find('#btn_filter_updates').off('click').on('click', function () {\n that.$tab.find('.process-adapters').show();\n that.onlyUpdatable = !that.onlyUpdatable;\n onOnlyUpdatableChanged();\n\n that.main.saveConfig('adaptersOnlyUpdatable', that.onlyUpdatable);\n\n setTimeout(function () {\n that._postInit(true);\n that.$tab.find('.process-adapters').hide();\n }, 200);\n });\n\n this.$tab.find('#btn_filter_custom_url')\n .off('click')\n .on('click', function () {\n // prepare adapters\n var text = '';\n var order = [];\n var url;\n for (url in that.urls) {\n if (that.urls.hasOwnProperty(url)) {\n order.push(url);\n }\n }\n order.sort();\n\n for (var o = 0; o < order.length; o++) {\n var user = that.urls[order[o]].match(/\\.com\\/([-_$§A-Za-z0-9]+)\\/([-._$§A-Za-z0-9]+)\\//);\n if (user && user.length >= 2 && (that.main.config.expertMode || order[o].indexOf('js-controller') === -1)) {\n text += '';\n }\n }\n that.$installDialog.find('#install-github-link').html(text).val(that.main.config.adaptersGithub || '');\n\n that.$installDialog.modal();\n\n that.$installDialog.find('.btn-install').off('click').on('click', function () {\n var isCustom = !that.$installDialog.find('a[href=\"#tabs-install-github\"]').hasClass('active');//!!that.$installDialog.find('#tabs-install').tabs('option', 'active');\n var url;\n var debug;\n var adapter;\n if (isCustom) {\n url = that.$installDialog.find('#install-url-link').val();\n \n if (url.startsWith(\"http\") && url.endsWith(\".git\")) url = \"git+\" + url;\n \n debug = that.$installDialog.find('#install-url-debug').prop('checked') ? ' --debug' : '';\n adapter = '';\n } else {\n var parts = that.$installDialog.find('#install-github-link').val().split(' ');\n url = parts[0];\n debug = that.$installDialog.find('#install-github-debug').prop('checked') ? ' --debug' : '';\n adapter = ' ' + parts[1];\n }\n\n if (!url) {\n that.main.showError(_('Invalid link'));\n return;\n }\n\n that.main.cmdExec(null, 'url \"' + url + '\"' + adapter + debug, function (exitCode) {\n if (!exitCode) {\n that.init(true, true);\n }\n });\n });\n that.$installDialog.find('#install-github-link').select();\n // workaround for materialize checkbox problem\n that.$installDialog.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n that.$installDialog.modal('open');\n that.$installDialog.find('.tabs').mtabs({\n nShow: function (tab) {\n if (!tab) return;\n that.main.saveConfig('adaptersInstallTab', $(tab).attr('id'));\n }\n });\n\n if (that.main.config.adaptersInstallTab && !that.main.noSelect) {\n that.$installDialog.find('.tabs').mtabs('select', that.main.config.adaptersInstallTab);\n }\n });\n\n this.$tab.find('#btn_upgrade_all').off('click').on('click', function () {\n that.main.confirmMessage(_('Do you want to upgrade all adapters?'), _('Please confirm'), 'help', function (result) {\n if (result) {\n that.main.cmdExec(null, 'upgrade', function (exitCode) {\n if (!exitCode) that._postInit(true);\n });\n }\n });\n });\n\n this.$tab.find('#btn_adapters_expert_mode').on('click', function () {\n that.main.config.expertMode = !that.main.config.expertMode;\n that.main.saveConfig('expertMode', that.main.config.expertMode);\n that.updateExpertMode();\n that.main.tabs.instances.updateExpertMode();\n });\n\n if (that.main.config.expertMode) {\n that.$tab.find('#btn_adapters_expert_mode').addClass('red lighten-3');\n }\n\n // save last selected adapter\n this.$installDialog.find('#install-github-link').on('change', function () {\n that.main.saveConfig('adaptersGithub', $(this).val());\n });\n this.$installDialog.find('#install-url-link').on('keyup', function (event) {\n if (event.which === 13) {\n that.$installDialog.find('#dialog-install-url-button').trigger('click');\n }\n });\n\n // Load settings\n this.isTiles = (this.main.config.adaptersIsTiles !== undefined && this.main.config.adaptersIsTiles !== null) ? this.main.config.adaptersIsTiles : true;\n this.isList = this.main.config.adaptersIsList || false;\n this.onlyInstalled = this.main.config.adaptersOnlyInstalled || false;\n this.onlyUpdatable = this.main.config.adaptersOnlyUpdatable || false;\n this.currentFilter = this.main.config.adaptersCurrentFilter || '';\n this.currentType = this.main.config.adaptersCurrentType || '';\n this.currentOrder = this.main.config.adaptersCurrentOrder || 'a-z';\n this.isCollapsed = this.main.config.adaptersIsCollapsed ? JSON.parse(this.main.config.adaptersIsCollapsed) : {};\n if (this.currentFilter) {\n this.$tab.find('.filter-input').addClass('input-not-empty').val(that.currentFilter);\n this.$tab.find('.filter-clear').show();\n } else {\n this.$tab.find('.filter-clear').hide();\n }\n\n if (this.onlyInstalled) {\n this.$tab.find('#btn_filter_adapters').addClass('red lighten-3');\n } else {\n this.$tab.find('#btn_filter_adapters').removeClass('red lighten-3');\n }\n\n if (this.onlyUpdatable) {\n this.$tab.find('#btn_filter_updates').addClass('red lighten-3');\n } else {\n this.$tab.find('#btn_filter_updates').removeClass('red lighten-3');\n }\n\n // fix for IE\n if (this.main.browser === 'ie' && this.main.browserVersion <= 10) {\n this.isTiles = false;\n this.$tab.find('#btn_switch_adapters').hide();\n }\n\n onExpertmodeChanged();\n\n this.$tab.find('#btn_refresh_adapters').on('click', function () {\n that.init(true, true);\n });\n\n // add filter processing\n this.$tab.find('.filter-input').on('keyup', function () {\n $(this).trigger('change');\n }).on('change', function (event) {\n if (that.filterTimer) {\n clearTimeout(that.filterTimer);\n }\n that.filterTimer = setTimeout(function () {\n that.filterTimer = null;\n that.currentFilter = that.$tab.find('.filter-input').val().toLowerCase();\n event && event.target && $(event.target)[that.currentFilter ? 'addClass' : 'removeClass']('input-not-empty');\n if (that.currentFilter) {\n that.$tab.find('.filter-clear').show();\n } else {\n that.$tab.find('.filter-clear').hide();\n }\n\n that.main.saveConfig('adaptersCurrentFilter', that.currentFilter);\n if (that.isTiles) {\n filterTiles();\n } else {\n that.$grid.fancytree('getTree').filterNodes(customFilter, false);\n }\n }, 400);\n });\n\n this.$tab.find('.filter-clear').on('click', function () {\n that.$tab.find('.filter-input').val('').trigger('change');\n });\n\n if (this.isTiles) {\n this.$tab.find('#btn_switch_adapters').find('i').text('view_list');\n that.$tab.removeClass('view-table').addClass('view-tiles');\n prepareTiles();\n } else {\n that.$tab.removeClass('view-tiles').addClass('view-table');\n prepareTable();\n }\n };\n\n this.updateExpertMode = function () {\n this.init(true);\n onExpertmodeChanged();\n };\n\n function customFilter(node) {\n //if (node.parent && node.parent.match) return true;\n\n if (that.currentFilter) {\n if (!that.data[node.key]) return false;\n\n var title = that.data[node.key].title;\n if (title && typeof title === 'object') {\n title = title[systemLang] || title.en;\n }\n var desc = that.data[node.key].desc;\n if (desc && typeof desc === 'object') {\n desc = desc[systemLang] || desc.en;\n }\n\n if ((that.data[node.key].name && that.data[node.key].name.toLowerCase().indexOf(that.currentFilter) !== -1) ||\n (title && title.toLowerCase().indexOf(that.currentFilter) !== -1) ||\n (that.data[node.key].keywords && that.data[node.key].keywords.toLowerCase().indexOf(that.currentFilter) !== -1) ||\n (desc && desc.toLowerCase().indexOf(that.currentFilter) !== -1)){\n return true;\n } else {\n return false;\n }\n } else {\n return true;\n }\n }\n\n this.getAdaptersInfo = function (host, update, updateRepo, callback) {\n if (!host) return;\n\n if (!callback) throw 'Callback cannot be null or undefined';\n if (update) {\n // Do not update too often\n if (!this.curRepoLastUpdate || ((new Date()).getTime() - this.curRepoLastUpdate > 1000)) {\n this.curRepository = null;\n this.curInstalled = null;\n }\n }\n\n if (this.curRunning) {\n this.curRunning.push(callback);\n return;\n }\n\n if (!this.curRepository || this.curRepoLastHost !== host) {\n this.curRepository = null;\n this.main.socket.emit('sendToHost', host, 'getRepository', {repo: this.main.systemConfig.common.activeRepo, update: updateRepo}, function (_repository) {\n if (_repository === 'permissionError') {\n console.error('May not read \"getRepository\"');\n _repository = {};\n }\n\n that.curRepository = _repository || {};\n if (that.curRepository && that.curInstalled && that.curRunning) {\n that.curRepoLastUpdate = (new Date()).getTime();\n setTimeout(function () {\n for (var c = 0; c < that.curRunning.length; c++) {\n that.curRunning[c](that.curRepository, that.curInstalled);\n }\n that.curRunning = null;\n }, 0);\n }\n });\n }\n if (!this.curInstalled || this.curRepoLastHost !== host) {\n this.curInstalled = null;\n this.main.socket.emit('sendToHost', host, 'getInstalled', null, function (_installed) {\n if (_installed === 'permissionError') {\n console.error('May not read \"getInstalled\"');\n _installed = {};\n }\n\n that.curInstalled = _installed || {};\n if (that.curRepository && that.curInstalled) {\n that.curRepoLastUpdate = (new Date()).getTime();\n setTimeout(function () {\n for (var c = 0; c < that.curRunning.length; c++) {\n that.curRunning[c](that.curRepository, that.curInstalled);\n }\n that.curRunning = null;\n }, 0);\n }\n });\n }\n\n this.curRepoLastHost = host;\n\n if (this.curInstalled && this.curRepository) {\n setTimeout(function () {\n if (that.curRunning) {\n for (var c = 0; c < that.curRunning.length; c++) {\n that.curRunning[c](that.curRepository, that.curInstalled);\n }\n that.curRunning = null;\n }\n if (callback) callback(that.curRepository, that.curInstalled);\n }, 0);\n } else {\n this.curRunning = [callback];\n }\n };\n\n this.enableColResize = function () {\n if (!$.fn.colResizable) return;\n if (this.$grid.is(':visible')) {\n this.$grid.colResizable({liveDrag: true});\n }\n };\n\n function getNews(actualVersion, adapter) {\n var text = '';\n if (adapter.news) {\n for (var v in adapter.news) {\n if (adapter.news.hasOwnProperty(v)) {\n if (systemLang === v) text += (text ? '\\n' : '') + adapter.news[v];\n if (v === 'en' || v === 'cn') continue;\n if (v === actualVersion) break;\n text += (text ? '\\n' : '') + (adapter.news[v][systemLang] || adapter.news[v].en);\n }\n }\n }\n return text;\n }\n\n function checkDependencies(dependencies) {\n if (!dependencies) return '';\n // like [{\"js-controller\": \">=0.10.1\"}]\n var adapters;\n if (dependencies instanceof Array) {\n adapters = {};\n for (var a = 0; a < dependencies.length; a++) {\n if (typeof dependencies[a] === 'string') continue;\n for (var b in dependencies[a]) {\n if (dependencies[a].hasOwnProperty(b)) {\n adapters[b] = dependencies[a][b];\n }\n }\n }\n } else {\n adapters = dependencies;\n }\n\n for (var adapter in adapters) {\n if (adapters.hasOwnProperty(adapter)) {\n if (adapter === 'js-controller') {\n if (!semver.satisfies(that.main.objects['system.host.' + that.main.currentHost].common.installedVersion, adapters[adapter])) return _('Invalid version of %s. Required %s', adapter, adapters[adapter]);\n } else {\n if (!that.main.objects['system.adapter.' + adapter] || !that.main.objects['system.adapter.' + adapter].common || !that.main.objects['system.adapter.' + adapter].common.installedVersion) return _('No version of %s', adapter);\n if (!semver.satisfies(that.main.objects['system.adapter.' + adapter].common.installedVersion, adapters[adapter])) return _('Invalid version of %s', adapter);\n }\n }\n }\n return '';\n }\n\n this.sortTree = function() {\n function sort(c1, c2) {\n //var d1 = that.data[c1.key], d2 = that.data[c1.key];\n var inst1 = c1.data.installed || 0, inst2 = c2.data.installed || 0;\n var ret = inst2 - inst1;\n if (ret) return ret;\n var t1 = c1.titleLang || c1.title || '';\n if (typeof t1 === 'object') {\n t1 = t1[systemLang] || t1.en;\n }\n var t2 = c2.titleLang || c2.title || '';\n if (typeof t2 === 'object') {\n t2 = t2[systemLang] || t2.en;\n }\n\n t1 = t1.toLowerCase();\n t2 = t2.toLowerCase();\n if (t1 > t2) return 1;\n if (t1 < t2) return -1;\n return 0;\n }\n that.$grid.fancytree('getRootNode').sortChildren(sort, true);\n };\n\n function getInterval(time, todayText, yesterdayText, x1DayAgoText, x2DaysAgoText, x5DaysAgoText, now) {\n now = now || Date.now();\n if (!time) return '';\n if (typeof time === 'string' || typeof time === 'number') {\n time = new Date(time);\n }\n var interval = now.getTime() - time.getTime();\n var days = Math.floor(interval / (24 * 3600000));\n if (days === 0) {\n if (now.getDate() === time.getDate()) {\n return todayText;\n } else {\n return yesterdayText;\n }\n } else if (days === 1) {\n if (now.getDate() - time.getDate() === 1) {\n return yesterdayText;\n } else {\n return x2DaysAgoText.replace('%d', days + 1);\n }\n } else {\n var t = days % 10;\n var tt = days % 100;\n // 2, 3, 4, 22, 23, 24, 32, 33, 34, 111, ...x2, x3, h4\n if ((tt < 10 || tt > 20) && t >= 2 && t <= 4) {\n return x2DaysAgoText.replace('%d', days);\n } else\n // 1, 21, 31, 41, 121....\n if ((tt < 10 || tt > 20) && t === 1) {\n return x1DayAgoText.replace('%d', days);\n } else {\n return x5DaysAgoText.replace('%d', days);\n }\n }\n }\n\n this._postInit = function (update, updateRepo) {\n if (typeof this.$grid !== 'undefined') {\n\n that.$tab.find('.process-adapters').show();\n\n this.$grid.find('tbody').html('');\n\n this.getAdaptersInfo(this.main.currentHost, update, updateRepo, function (repository, installedList) {\n var obj;\n var version;\n var rawVersion;\n var adapter;\n var adaptersToUpdate = 0;\n\n var listInstalled = [];\n var listNonInstalled = [];\n var nowObj = new Date();\n var localTexts = {\n 'add instance': _('add instance'),\n 'update': _('update'),\n 'upload': _('upload'),\n 'Available version:': _('Available version:'),\n 'Active instances': _('Active instances'),\n 'Installed version': _('Installed version'),\n 'readme': _('readme'),\n 'delete adapter': _('delete adapter'),\n 'install specific version': _('install specific version'),\n 'all': _('all'),\n 'Last update': _('Last update'),\n 'Installations counter': _('Installation counter'),\n 'today': _('today'),\n 'yesterday': _('yesterday'),\n '1 %d days ago': _('1 %d days ago'),\n '2 %d days ago': _('2 %d days ago'),\n '5 %d days ago': _('5 %d days ago')\n };\n\n if (installedList) {\n for (adapter in installedList) {\n if (!installedList.hasOwnProperty(adapter)) continue;\n obj = installedList[adapter];\n if (!obj || obj.controller || adapter === 'hosts') continue;\n listInstalled.push(adapter);\n }\n listInstalled.sort();\n }\n\n that.urls = {};\n // List of adapters for repository\n for (adapter in repository) {\n if (!repository.hasOwnProperty(adapter)) continue;\n if (installedList && installedList[adapter] && !installedList[adapter].versionDate) {\n installedList[adapter].versionDate = repository[adapter].versionDate;\n }\n\n // it is not possible to install this adapter from git\n if (!repository[adapter].nogit) {\n that.urls[adapter] = repository[adapter].meta;\n }\n obj = repository[adapter];\n if (!obj || obj.controller) continue;\n version = '';\n if (installedList && installedList[adapter]) continue;\n listNonInstalled.push(adapter);\n }\n listNonInstalled.sort();\n\n function getVersionString(version, updatable, news, updatableError) {\n //var span = getVersionSpan(version);\n var color = getVersionClass(version);\n var title = color + '\\n\\r' + (news || '');\n //version = '
    ',!x&&i.colors&&s[z].color&&(e+='
    '),!x&&i.icons&&(e+=ne(i.objects[s[z].id],i.imgPath)||'
     
    '),"enabled"===O)e+='";else if("groups"===O)for(var E=0;E'+ne(i.objects[S],null,"")+s[z].groups[E].name+""}else if("instance"===O)if(void 0!==s[z].instance&&1';for(var Y=0;Y"+r[Y]+"";e+=k+=""}else e+=""+(void 0===s[z].instance?"":s[z].instance)+"";else if("icon"===O)e+=ne(i.objects[s[z].id],i.imgPath);else{var Q=s[z][O]||"";Q&&"object"==typeof Q&&Q.en&&(Q=Q[systemLang]||Q.en),e+=""+Q+""}e+="
    ';for(var P="",U=0;U ':(P+="<"+t+' data-id="'+s[z].id+'" class="select-button-'+U+' select-button-custom td-button" style="margin-right: 3px;" data-parent="'+s[z].parent+'" data-children="'+!!s[z].realChildren+'" title="'+(i.buttons[U].title||"")+'">',window.M&&window.M.toast&&(P+=''+(i.buttons[U].icon||"")+""),P+="");e+=P+"
    ' +\n version = //'
    ' +\n '
    ' +\n '' +\n '' +\n '
    ' + version + '';\n if (updatable) { //xxx\n version += '';\n }\n version += '
    ';\n return version;\n }\n\n that.tree = [];\n that.data = {};\n\n // list of the installed adapters\n for (var i = 0; i < listInstalled.length; i++) {\n adapter = listInstalled[i];\n\n obj = installedList ? installedList[adapter] : null;\n\n if (!obj || obj.controller || adapter === 'hosts') continue;\n var installed = '';\n var rawInstalled = '';\n var icon = obj.icon;\n version = '';\n\n if (repository[adapter] && repository[adapter].version) version = repository[adapter].version;\n\n if (repository[adapter] && repository[adapter].extIcon) icon = repository[adapter].extIcon;\n\n var _instances = 0;\n var _enabled = 0;\n if (obj.version) {\n var news = '';\n var updatable = false;\n var updatableError = '';\n if (!that.main.upToDate(version, obj.version)) {\n news = getNews(obj.version, repository[adapter]);\n // check if version is compatible with current adapters and js-controller\n updatable = true;\n updatableError = checkDependencies(repository[adapter].dependencies);\n adaptersToUpdate++;\n }\n // TODO: move style to class\n installed = '' +\n '';\n\n // Show information about installed and enabled instances\n for (var z = 0; z < that.main.instances.length; z++) {\n if (that.main.objects[that.main.instances[z]] &&\n that.main.objects[that.main.instances[z]].common.name === adapter) {\n _instances++;\n if (that.main.objects[that.main.instances[z]].common.enabled) _enabled++;\n }\n }\n\n\n if (_instances) {\n // TODO: move style to class\n installed += '';\n } else {\n // TODO: move style to class\n installed += '';\n }\n // TODO: move style to class\n installed += '';\n rawInstalled = '' + obj.version + '';\n\n //tmp = installed.split('.');\n // if (updatable) { //xxx\n // //TODO\n // // installed += '';\n // // version = version.replace('class=\"', 'class=\"updateReady ');\n // // $('a[href=\"#tab-adapters\"]').addClass('updateReady');\n // } else if (that.onlyUpdatable) {\n // continue;\n // }\n\n installed += '
    ';\n if (_enabled !== _instances) {\n installed += '' + _instances + '';\n if (_enabled) installed += ' ~ ';\n }\n if (_enabled) installed += '' + _enabled + '';\n installed += '' + obj.version + '
    ';\n if (!updatable && that.onlyUpdatable) continue;\n }\n rawVersion = version;\n version = getVersionString(version, updatable, news, updatableError);\n\n var group = (obj.type || that.types[adapter] || 'common adapters') + '_group';\n var desc = (typeof obj.desc === 'object') ? (obj.desc[systemLang] || obj.desc.en) : obj.desc;\n desc = desc || '';\n desc += showUploadProgress(group, adapter, that.main.states['system.adapter.' + adapter + '.upload'] ? that.main.states['system.adapter.' + adapter + '.upload'].val : 0);\n var title = obj.titleLang || obj.title;\n title = (typeof title === 'object') ? (title[systemLang] || title.en) : title;\n\n that.data[adapter] = {\n image: icon ? '' : '',\n icon: icon || '',\n stat: repository[adapter] ? repository[adapter].stat : 0,\n name: adapter,\n title: (title || '').replace('yunkong2 Visualisation - ', ''),\n desc: desc,\n news: news,\n updatableError: updatableError,\n keywords: obj.keywords ? obj.keywords.join(' ') : '',\n version: version,\n installed: installed,\n rawVersion: rawVersion,\n instances: _instances,\n rawInstalled: rawInstalled,\n versionDate: obj.versionDate,\n updatable: updatable,\n bold: obj.highlight || false,\n install: '' +\n '' +\n ((that.main.config.expertMode) ? '' : '') +\n '' +\n ((that.main.config.expertMode) ? '' : ''),\n // platform: obj.platform, actually there is only one platform\n group: group,\n license: obj.license || '',\n licenseUrl: obj.licenseUrl || ''\n };\n\n if (!obj.type) console.log('\"' + adapter + '\": \"common adapters\",');\n if (obj.type && that.types[adapter]) console.log('Adapter \"' + adapter + '\" has own type. Remove from admin.');\n\n if (!that.isList) {\n var iGroup = -1;\n for (var jj = 0; jj < that.tree.length; jj++) {\n if (that.tree[jj].key === that.data[adapter].group) {\n iGroup = jj;\n break;\n }\n }\n if (iGroup < 0) {\n if (!localTexts[that.data[adapter].group]) localTexts[that.data[adapter].group] = _(that.data[adapter].group);\n that.tree.push({\n title: localTexts[that.data[adapter].group],\n desc: showUploadProgress(group),\n key: that.data[adapter].group,\n folder: true,\n expanded: !that.isCollapsed[that.data[adapter].group],\n children: [],\n icon: that.groupImages[that.data[adapter].group]\n });\n iGroup = that.tree.length - 1;\n }\n that.tree[iGroup].children.push({\n icon: icon,\n title: that.data[adapter].title || adapter,\n key: adapter\n });\n } else {\n that.tree.push({\n icon: icon,\n title: that.data[adapter].title || adapter,\n key: adapter\n });\n }\n }\n //that.sortTree();\n\n if (!that.onlyInstalled && !that.onlyUpdatable) {\n for (i = 0; i < listNonInstalled.length; i++) {\n adapter = listNonInstalled[i];\n\n obj = repository[adapter];\n if (!obj || obj.controller) continue;\n version = '';\n if (installedList && installedList[adapter]) continue;\n\n if (obj && obj.version) {\n version = obj.version;\n rawVersion = version;\n version = getVersionString(version);\n }\n\n var group = (obj.type || that.types[adapter] || 'common adapters') + '_group';\n var desc = (typeof obj.desc === 'object') ? (obj.desc[systemLang] || obj.desc.en) : obj.desc;\n desc = desc || '';\n desc += showUploadProgress(group, adapter, that.main.states['system.adapter.' + adapter + '.upload'] ? that.main.states['system.adapter.' + adapter + '.upload'].val : 0);\n\n title = obj.titleLang || obj.title;\n title = (typeof title === 'object') ? (title[systemLang] || title.en) : title;\n\n that.data[adapter] = {\n image: obj.extIcon ? '' : '',\n icon: obj.extIcon,\n stat: obj.stat,\n name: adapter,\n title: (title || '').replace('yunkong2 Visualisation - ', ''),\n desc: desc,\n keywords: obj.keywords ? obj.keywords.join(' ') : '',\n rawVersion: rawVersion,\n version: version,\n bold: obj.highlight,\n installed: '',\n versionDate: obj.versionDate,\n install: '' +\n '' +\n '' +\n ((that.main.config.expertMode) ? '' : ''),\n // TODO do not show adapters not for this platform\n // platform: obj.platform, // actually there is only one platform\n license: obj.license || '',\n licenseUrl: obj.licenseUrl || '',\n group: group\n };\n\n if (!obj.type) console.log('\"' + adapter + '\": \"common adapters\",');\n if (obj.type && that.types[adapter]) console.log('Adapter \"' + adapter + '\" has own type. Remove from admin.');\n\n if (!that.isList) {\n var igroup = -1;\n for (var j = 0; j < that.tree.length; j++){\n if (that.tree[j].key === that.data[adapter].group) {\n igroup = j;\n break;\n }\n }\n if (igroup < 0) {\n if (!localTexts[that.data[adapter].group]) localTexts[that.data[adapter].group] = _(that.data[adapter].group);\n that.tree.push({\n title: localTexts[that.data[adapter].group],\n key: that.data[adapter].group,\n folder: true,\n expanded: !that.isCollapsed[that.data[adapter].group],\n children: [],\n icon: that.groupImages[that.data[adapter].group]\n });\n igroup = that.tree.length - 1;\n }\n that.tree[igroup].children.push({\n title: that.data[adapter].title || adapter,\n icon: obj.extIcon,\n desc: showUploadProgress(group),\n key: adapter\n });\n } else {\n that.tree.push({\n icon: obj.extIcon,\n title: that.data[adapter].title || adapter,\n key: adapter\n });\n }\n }\n }\n\n if (that.currentOrder === 'popular' || that.currentOrder === 'updated') {\n var akeys = Object.keys(that.data);\n\n if (that.currentOrder === 'popular') {\n akeys.sort(function (a, b) {\n if (that.data[a].stat > that.data[b].stat) return -1;\n if (that.data[a].stat < that.data[b].stat) return 1;\n return 0;\n });\n } else if (that.currentOrder === 'updated') {\n akeys.sort(function (a, b) {\n if (that.data[a].versionDate && !that.data[b].versionDate) return -1;\n if (!that.data[a].versionDate && that.data[b].versionDate) return 1;\n if (that.data[a].versionDate > that.data[b].versionDate) return -1;\n if (that.data[a].versionDate < that.data[b].versionDate) return 1;\n if (a > b) return -1;\n if (a < b) return 1;\n return 0;\n });\n }\n var newData = {};\n for (var u = 0; u < akeys.length; u++) {\n newData[akeys[u]] = that.data[akeys[u]];\n }\n that.data = newData;\n }\n\n // build tiles\n if (that.isTiles && (that.main.browser !== 'ie' || that.main.browserVersion > 10)) {\n var text = '';\n var types = [];\n for (var a in that.data) {\n if (!that.data.hasOwnProperty(a)) continue;\n var ad = that.data[a];\n if (types.indexOf(ad.group) === -1) {\n types.push(ad.group);\n }\n// text += '
    ';\n// text += '
    ';\n// text += '
    ' + ad.title + '
    ';\n// if (that.currentOrder === 'popular' && ad.stat) {\n// text += '
    ' + ad.stat + '
    ';\n// } else if (that.currentOrder === 'updated' && ad.versionDate) {\n// text += '
    ' + getInterval(ad.versionDate, localTexts['today'], localTexts['yesterday'], localTexts['1 %d days ago'], localTexts['2 %d days ago'], localTexts['5 %d days ago'], nowObj) + '
    ';\n// }\n// text += '
    ';\n// text += '
    ';\n// text += ' ';\n// text += '
    ' + ad.desc + '
    ';\n// text += '
    ';\n// text += '
    ';\n// text += '
    ' + ad.version + (ad.installed ? '' + ad.rawInstalled : '') + '
    ';\n// text += '
    ' + ad.install + '
    ';\n// text += '
    ';\n// text += '
    ';\n\n text += '
    ';\n text += '
    ';\n text += '
    ';\n text += '
    ';\n text += ' ';\n text += ' ' + ad.title + '';\n text += ' more_vert';\n text += '
      ';\n text += '
    • ' + localTexts['Available version:'] + ' ' + ad.rawVersion + '' +\n (ad.updatable ? '' : '') +\n '
    • ';\n if (ad.installed) {\n text += '
    • ' + localTexts['Installed version'] + ': '+ ad.rawInstalled + '
    • ';\n }\n if (ad.instances) {\n text += '
    • ' + _('Installed instances') + ': ' + ad.instances + '
    • ';\n }\n text += '
    ';\n text += '
    ';\n text += '
    ';\n text += '
    ';\n text += ' close';\n text += '

    ' + ad.desc + '

    ';\n text += '
    ';\n text += ad.install;\n text += '
    ';\n text += '
    ';\n\n if (that.currentOrder === 'popular' && ad.stat) {\n text += '
    ' + ad.stat + '
    ';\n } else if (that.currentOrder === 'updated' && ad.versionDate) {\n text += '
    ' + getInterval(ad.versionDate, localTexts['today'], localTexts['yesterday'], localTexts['1 %d days ago'], localTexts['2 %d days ago'], localTexts['5 %d days ago'], nowObj) + '
    ';\n }\n\n\n text += '
    ';\n text += '
    ';\n }\n\n\n // Add filtered out tile\n text += '
    ';\n text += '
    ';\n text += '
    ';\n text += '
    ';\n //text += ' ';\n text += ' ' + _('Filtered out') + '';\n text += '
    ';\n text += '
    ';\n text += '
    ';\n text += '
    ';\n\n that.$tiles.html(text);\n // init buttons\n for (var b in that.data) {\n if (that.data.hasOwnProperty(b)) {\n that.initButtons(b);\n }\n }\n\n var tTypes = '
  • ' + localTexts['all'] + '
  • \\n';\n for (var g = 0; g < types.length; g++) {\n tTypes += '
  • ' + _(types[g]) + '
  • \\n';\n }\n var $types = that.$tab.find('#main-toolbar-table-types');\n $types.html(tTypes);\n $types.find('.main-toolbar-table-types-item').show().off('click').on('click', function () {\n that.currentType = $(this).data('type') || '';\n filterTiles();\n that.$tab.find('#main-toolbar-table-types-btn').html(_(that.currentType || 'all'));\n that.main.saveConfig('adaptersCurrentType', that.currentType);\n });\n if (that.currentType && !localTexts[that.currentType]) localTexts[that.currentType] = _(that.currentType);\n that.$tab.find('#main-toolbar-table-types-btn').html(localTexts[that.currentType || 'all']).dropdown({\n constrainWidth: false, // Does not change width of dropdown to that of the activator\n // hover: true, // Activate on hover\n gutter: 0\n });\n\n $types = that.$tab.find('#main-toolbar-table-order');\n $types.find('.main-toolbar-table-order-item').off('click').on('click', function () {\n that.currentOrder = $(this).data('type') || '';\n //filterTiles();\n that.$tab.find('#main-toolbar-table-order-btn').html(_(that.currentOrder || 'a-z'));\n that.main.saveConfig('adaptersCurrentOrder', that.currentOrder);\n that._postInit();\n });\n if (that.currentOrder && !localTexts[that.currentOrder]) localTexts[that.currentOrder] = _(that.currentOrder);\n that.$tab.find('#main-toolbar-table-order-btn').show().html(localTexts[that.currentOrder || 'a-z']).dropdown({\n constrainWidth: false, // Does not change width of dropdown to that of the activator\n // hover: true, // Activate on hover\n gutter: 0\n });\n\n filterTiles();\n } else {\n that.$tab.find('#main-toolbar-table-types-btn').hide();\n that.$tab.find('#main-toolbar-table-order-btn').hide();\n // build tree\n that.$grid.fancytree('getTree').reload(that.tree);\n that.$grid.find('.fancytree-icon').each(function () {\n if ($(this).attr('src')) {\n $(this).css({width: 18, height: 18});\n }\n\n $(this).on('hover', function () {\n var text = '
    ';\n var $big = $(text);\n $big.insertAfter($(this));\n $(this).data('big', $big[0]);\n var h = parseFloat($big.height());\n var top = Math.round($(this).position().top - ((h - parseFloat($(this).height())) / 2));\n if (h + top > (window.innerHeight || document.documentElement.clientHeight)) {\n top = (window.innerHeight || document.documentElement.clientHeight) - h;\n }\n $big.css({top: top});\n\n }, function () {\n var big = $(this).data('big');\n $(big).remove();\n $(this).data('big', undefined);\n });\n });\n\n if (that.currentFilter) {\n that.$grid.fancytree('getTree').filterNodes(customFilter, false);\n }\n\n that.sortTree();\n that.enableColResize();\n var classes = [\n 'tab-adapters-table-name',\n 'tab-adapters-table-description',\n 'tab-adapters-table-keywords',\n 'tab-adapters-table-installed',\n 'tab-adapters-table-available',\n 'tab-adapters-table-license',\n 'tab-adapters-table-install'\n ];\n that.$grid.find('tbody tr').each(function () {\n var i = 0;\n $(this).find('td').each(function () {\n $(this).addClass(classes[i]);\n i++;\n });\n })\n }\n that.$tab.find('.grid-main-div').removeClass('order-a-z order-popular order-updated').addClass(that.currentOrder ? 'order-' + that.currentOrder : '');\n that.$tab.find('.process-adapters').hide();\n that.updateCounter(adaptersToUpdate);\n });\n } else {\n this.enableColResize();\n }\n this.restoreScroll();\n };\n this.saveScroll = function () {\n this.scrollTop = this.$tab.find('.grid-main-div').scrollTop();\n };\n this.restoreScroll = function () {\n if (this.scrollTop) {\n this.$tab.find('.grid-main-div').scrollTop(this.scrollTop);\n }\n };\n\n this.updateCounter = function (counter) {\n if (counter === undefined) {\n this.getAdaptersInfo(this.main.currentHost, false, false, function (repository, installedList) {\n var adaptersToUpdate = 0;\n\n for (var adapter in installedList) {\n if (!installedList.hasOwnProperty(adapter)) continue;\n var obj = installedList ? installedList[adapter] : null;\n if (!obj || obj.controller || adapter === 'hosts') continue;\n\n var version = '';\n if (repository[adapter] && repository[adapter].version) version = repository[adapter].version;\n\n if (obj.version && !that.main.upToDate(version, obj.version)) {\n adaptersToUpdate++;\n }\n }\n that.updateCounter(adaptersToUpdate);\n });\n } else if (counter) {\n var $updates = $('#updates-for-adapters');\n if ($updates.length) {\n $updates.text(counter);\n } else {\n $('' + counter + '').appendTo('.admin-sidemenu-items[data-tab=\"tab-adapters\"] a');\n }\n } else {\n $('#updates-for-adapters').remove();\n }\n };\n\n // ----------------------------- Adapters show and Edit ------------------------------------------------\n this.init = function (update, updateRepo) {\n if (this.inited && !update) {\n return;\n }\n\n if (!this.main.objectsLoaded) {\n setTimeout(function () {\n that.init(update, updateRepo);\n }, 250);\n return;\n }\n\n // update info\n // Required is list of hosts and repository (done in getAdaptersInfo)\n if (!this.inited) {\n this.inited = true;\n this.main.subscribeObjects('system.host.*');\n this.main.subscribeStates('system.host.*');\n }\n this.main.tabs.hosts.getHosts(function () {\n that._postInit(update, updateRepo);\n });\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.saveScroll();\n this.inited = false;\n this.main.unsubscribeObjects('system.host.*');\n this.main.unsubscribeStates('system.host.*');\n }\n };\n\n function showAddInstanceDialog(adapter, desc, callback) {\n if (that.main.tabs.hosts.list.length <= 1 && !that.main.config.expertMode) {\n return callback(true, that.main.currentHost, '');\n }\n\n var $dialogAddInstance = $('#dialog-add-instance');\n $dialogAddInstance.find('.dialog-add-instance-name').html(adapter);\n $dialogAddInstance.find('.dialog-add-description').html(desc);\n\n // fill the hosts\n var text = '';\n for (var h = 0; h < that.main.tabs.hosts.list.length; h++) {\n var host = that.main.tabs.hosts.list[h];\n text += '';\n }\n\n if (that.main.tabs.hosts.list.length <= 1) {\n $dialogAddInstance.find('.dialog-add-instance-host').addClass('disabled').prop('disabled', true);\n } else {\n $dialogAddInstance.find('.dialog-add-instance-host').removeClass('disabled').prop('disabled', false);\n }\n $dialogAddInstance.find('.dialog-add-instance-host').html(text).select();\n\n // find free instance numbers\n var min = -1;\n var used = [];\n for (var i = 0; i < that.main.tabs.instances.list.length; i++) {\n var parts = that.main.tabs.instances.list[i].split('.');\n if (parts[parts.length - 2] === adapter) {\n var index = parseInt(parts[parts.length - 1], 10);\n used.push(index);\n if (index > min) {\n min = index;\n }\n }\n }\n min += 10;\n text = '';\n for (var m = 0; m < min; m++) {\n if (used.indexOf(m) !== -1) continue;\n text += '';\n }\n $dialogAddInstance.find('.dialog-add-instance-number').html(text).select();\n $dialogAddInstance.find('.dialog-add-install-btn').off('click').on('click', function (e) {\n if (callback) {\n callback(true, $dialogAddInstance.find('.dialog-add-instance-host').val(), $dialogAddInstance.find('.dialog-add-instance-number').val());\n callback = null;\n }\n $dialogAddInstance.find('.dialog-add-cancel-btn').off('click');\n $dialogAddInstance.find('.dialog-add-instance-number').off('click');\n });\n\n $dialogAddInstance.find('.dialog-add-cancel-btn').off('click').on('click', function (e) {\n if (callback) {\n callback(false);\n callback = null;\n }\n $dialogAddInstance.find('.dialog-add-cancel-btn').off('click');\n $dialogAddInstance.find('.dialog-add-instance-number').off('click');\n });\n $dialogAddInstance.modal({\n dismissible: false,\n complete: function () {\n $dialogAddInstance.find('.dialog-add-instance-name').html('');\n }\n }).modal('open');\n }\n\n function showLicenseDialog(adapter, callback) {\n var $dialogLicense = $('#dialog-license');\n // Is adapter installed\n if (that.data[adapter].installed || !that.data[adapter].licenseUrl) {\n callback(true);\n return;\n }\n\n var timeout = setTimeout(function () {\n timeout = null;\n callback(true);\n }, 10000);\n\n if (typeof that.data[adapter].licenseUrl === 'object') {\n that.data[adapter].licenseUrl = that.data[adapter].licenseUrl[systemLang] || that.data[adapter].licenseUrl.en;\n }\n\n\n that.main.socket.emit('httpGet', that.data[adapter].licenseUrl, function (error, response, body) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n\n if (!error && body) {\n $dialogLicense.css({'z-index': 200});\n body = body.toString().replace(/\\r\\n/g, '
    ');\n body = body.replace(/\\n/g, '
    ');\n $dialogLicense.find('.license_text').html(body);\n $dialogLicense.find('.license_agreement_name').text(_(' for %s', adapter));\n\n $dialogLicense.modal({\n dismissible: false,\n complete: function () {\n $dialogLicense.find('.license_text').html('');\n }\n }).modal('open');\n\n $dialogLicense.find('.license_agree').off('click').on('click', function (e) {\n if (callback) {\n callback(true);\n callback = null;\n }\n $dialogLicense.find('.license_agree').off('click');\n $dialogLicense.find('.license_non_agree').off('click');\n });\n\n $dialogLicense.find('.license_non_agree').off('click').on('click', function (e) {\n if (callback) {\n callback(false);\n callback = null;\n }\n $dialogLicense.find('.license_agree').off('click');\n $dialogLicense.find('.license_non_agree').off('click');\n });\n } else {\n callback && callback(true);\n callback = null;\n }\n }\n });\n }\n\n this.initButtons = function (adapter) {\n this.$tab.find('.adapter-install-submit[data-adapter-name=\"' + adapter + '\"]').off('click').on('click', function () {\n var adapter = $(this).attr('data-adapter-name');\n var desc = $(this).attr('data-adapter-desc');\n\n // show config dialog\n showAddInstanceDialog(adapter, desc, function (result, host, index) {\n if (!result) return;\n\n that.getAdaptersInfo(host, false, false, function (repo, installed) {\n var obj = repo[adapter];\n\n if (!obj) obj = installed[adapter];\n\n if (!obj) return;\n\n if (obj.license && obj.license !== 'MIT') {\n // Show license dialog!\n showLicenseDialog(adapter, function (isAgree) {\n if (isAgree) {\n that.main.cmdExec(null, 'add ' + adapter + ' ' + index + ' --host ' + host, function (exitCode) {\n if (!exitCode) that._postInit(true);\n });\n }\n });\n } else {\n that.main.cmdExec(null, 'add ' + adapter + ' ' + index + ' --host ' + host, function (exitCode) {\n if (!exitCode) that._postInit(true);\n });\n }\n });\n });\n });\n\n this.$tab.find('.adapter-delete-submit[data-adapter-name=\"' + adapter + '\"]').off('click').on('click', function () {\n var name = $(this).attr('data-adapter-name');\n that.main.confirmMessage(_('Are you sure you want to delete adapter %s?', name), _('Please confirm'), 'help', function (result) {\n if (result) {\n that.main.cmdExec(null, 'del ' + name, function (exitCode) {\n if (!exitCode) that._postInit(true);\n });\n }\n });\n });\n\n this.$tab.find('.adapter-readme-submit[data-adapter-name=\"' + adapter + '\"]').off('click').on('click', function () {\n that.main.navigate({\n tab: 'adapters',\n dialog: 'readme',\n params: $(this).data('adapter-name')\n });\n });\n\n this.$tab.find('.adapter-update-submit[data-adapter-name=\"' + adapter + '\"]').off('click').on('click', function () {\n var aName = $(this).attr('data-adapter-name');\n if (aName === 'admin') that.main.waitForRestart = true;\n\n that.main.cmdExec(null, 'upgrade ' + aName, function (exitCode) {\n if (!exitCode) that._postInit(true);\n });\n });\n\n this.$tab.find('.adapter-upload-submit[data-adapter-name=\"' + adapter + '\"]').off('click').on('click', function () {\n var aName = $(this).attr('data-adapter-name');\n\n that.main.cmdExec(null, 'upload ' + aName, function (exitCode) {\n if (!exitCode) that._postInit(true);\n });\n });\n\n var $button = this.$tab.find('.adapter-update-custom-submit[data-adapter-name=\"' + adapter + '\"]');\n $button.off('click').on('click', function () {\n var versions = [];\n if (that.main.objects['system.adapter.' + adapter].common.news) {\n var news = that.main.objects['system.adapter.' + adapter].common.news;\n for (var id in news) {\n if (news.hasOwnProperty(id)) {\n versions.push(id);\n }\n }\n } else {\n versions.push(that.main.objects['system.adapter.' + adapter].common.version);\n }\n var menu = '
    ';\n for (var v = 0; v < versions.length; v++) {\n var nnews = (news[versions[v]] ? news[versions[v]][systemLang] || news[versions[v]].en : '');\n menu += '' + versions[v] + ' - ';\n }\n menu += '
    ';\n\n var $adaptersMenu = $('#adapters-menu');\n if (!$adaptersMenu.length) {\n //$adaptersMenu = $('
    ');\n $adaptersMenu = $('
    ' +\n '

    Modal Header

    ');\n $adaptersMenu.appendTo($('.materialize-dialogs').first());\n $adaptersMenu.modal();\n }\n $adaptersMenu.data('trigger', this);\n\n $adaptersMenu.find('p').html(menu);\n $adaptersMenu.find('h4').html(_('Versions of %s', adapter));\n\n $adaptersMenu.find('.adapters-versions-link').off('click').on('click', function () {\n //if ($(this).data('link')) window.open($(this).data('link'), $(this).data('instance-id'));\n $adaptersMenu.modal('close');\n var adapter = $(this).data('adapter-name');\n var version = $(this).data('version');\n if (version && adapter) {\n that.main.cmdExec(null, 'upgrade ' + adapter + '@' + version, function (exitCode) {\n if (!exitCode) that._postInit(true);\n });\n }\n });\n\n /*$(this).dropdown({\n onCloseEnd: function () {\n var $adaptersMenu = $('#adapters-menu');\n var trigger = $adaptersMenu.data('trigger');\n $(trigger).dropdown('close').dropdown('destroy');\n $adaptersMenu.data('trigger', null).hide();\n $adaptersMenu.remove();\n }\n }).dropdown('open');*/\n $adaptersMenu.modal('open');\n\n\n // does not work... must be fixed.\n //$adaptersMenu.find('.tooltipped').tooltip();\n });\n\n if (!that.main.objects['system.adapter.' + adapter]) {\n $button.hide();//addClass('disabled');\n }\n };\n\n this.objectChange = function (id, obj) {\n // Update Adapter Table\n if (id.match(/^system\\.adapter\\.[a-zA-Z0-9-_]+$/)) {\n if (obj) {\n if (this.list.indexOf(id) === -1) this.list.push(id);\n } else {\n var j = this.list.indexOf(id);\n if (j !== -1) {\n this.list.splice(j, 1);\n }\n }\n\n if (typeof this.$grid !== 'undefined' && this.$grid[0]._isInited) {\n this.init(true);\n }\n }\n };\n\n function showUploadProgress(group, adapter, percent) {\n var text = '';\n var opened;\n if (adapter || typeof group === 'string') {\n if (adapter) {\n // text += '
    ';\n opened = true;\n } else {\n percent = group;\n group = null;\n }\n //percent = 80;\n if (percent) {\n text +=\n '' +\n '' +\n '' +\n '' +\n '' +\n '
    '\n ;\n }\n //text += percent ? '
    ' : '';\n\n if (opened) {\n //text += '
    ';\n }\n return text;\n }\n\n this.stateChange = function (id, state) {\n if (id && state) {\n var adapter = id.match(/^system\\.adapter\\.([\\w\\d-]+)\\.upload$/);\n if (adapter) {\n var $adapter = this.$tab.find('.adapter-upload-progress[data-adapter-name=\"' + adapter[1] + '\"]');\n var text = showUploadProgress(state.val);\n $adapter.html(text).css({opacity: state.val ? 0.7 : 0});\n this.$tab.find('.group-upload-progress[data-adapter-group=\"' + $adapter.data('adapter-group') + '\"]').html(text).css({opacity: state.val ? 0.7 : 0});\n }\n }\n };\n}\n","function Config(main) {\n 'use strict';\n var that = this;\n this.$dialog = $('#dialog-config');\n this.$configFrame = this.$dialog.find('#config-iframe');\n this.main = main;\n\n this.prepare = function () {\n // id = 'system.adapter.NAME.X'\n $iframeDialog = this;\n };\n\n this.init = function () {\n if (this.inited) return;\n\n this.inited = true;\n\n\n var id = this.main.navigateGetParams();\n\n var parts = id.split('.');\n if (this.main.objects[id] && this.main.objects[id].common && this.main.objects[id].common.materialize) {\n this.$configFrame.attr('src', 'adapter/' + parts[2] + '/index_m.html?' + parts[3]);\n } else {\n this.$configFrame.attr('src', 'adapter/' + parts[2] + '/?' + parts[3]);\n }\n\n var name = id.replace(/^system\\.adapter\\./, '');\n this.$dialog.data('name', name);\n this.$dialog.find('.title').html(_('Adapter configuration') + ': ' + name);\n };\n\n this.allStored = function () {\n return !window.frames['config-iframe'].changed;\n };\n\n // this function is called by the configuration code in iFrame\n this.close = function () {\n that.main.navigate();\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.inited = false;\n this.$configFrame.attr('src', '');\n\n // If after wizard some configurations must be shown\n if (typeof showConfig !== 'undefined' && showConfig && showConfig.length) {\n var configId = showConfig.shift();\n setTimeout(function () {\n that.main.navigate({\n tab: 'instances',\n dialog: 'config',\n params: configId\n });\n }, 1000);\n }\n }\n }\n}","function Customs(main) {\n 'use strict';\n\n var STR_DIFFERENT = '__different__';\n var that = this;\n this.main = main;\n this.$dialog = $('#dialog-customs');\n this.customEnabled = null;\n this.currentCustoms = null; // Id of the currently shown customs dialog\n\n var $table;\n var $outer;\n var hdr;\n var lastHistoryTimeStamp;\n\n var $tableDateFrom;\n var $tableDateTo;\n var $tableTimeFrom;\n var $tableTimeTo;\n\n var $chartDateFrom;\n var $chartDateTo;\n var $chartTimeFrom;\n var $chartTimeTo;\n\n var $historyTableInstance;\n var $historyChartInstance;\n\n // ----------------------------- CUSTOMS ------------------------------------------------\n this.check = function () {\n var found = false;\n for (var u = 0; u < this.main.instances.length; u++) {\n if (this.main.objects[this.main.instances[u]].common &&\n (this.main.objects[this.main.instances[u]].common.type === 'storage' || this.main.objects[this.main.instances[u]].common.supportCustoms) &&\n this.main.objects[this.main.instances[u]].common.enabled) {\n if (this.customEnabled !== null && this.customEnabled !== true) {\n this.customEnabled = true;\n // update customs buttons\n if (this.inited) {\n this.init(null, true);\n }\n } else {\n this.customEnabled = true;\n }\n found = true;\n return;\n }\n }\n if (this.customEnabled !== null && this.customEnabled !== false) {\n this.customEnabled = false;\n // update custom button\n if (this.inited) {\n this.init(null, true);\n }\n } else {\n this.customEnabled = false;\n }\n };\n\n this.stateChange = function (id /*, state */) {\n if (this.currentCustoms === id) {\n updateTable();\n }\n };\n\n this.initCustomsTabs = function (ids, instances) {\n var $customTabs = this.$dialog.find('#customs-tabs');\n ids = ids || [];\n $customTabs.html('');\n var wordDifferent = _(STR_DIFFERENT);\n this.defaults = {};\n var collapsed = this.main.config['object-customs-collapsed'];\n collapsed = collapsed ? collapsed.split(',') : [];\n\n var commons = {};\n var type = null;\n var role = null;\n // calculate common settings\n for (var i = 0; i < instances.length; i++) {\n var inst = instances[i].replace(/^system\\.adapter\\./, '');\n commons[inst] = {};\n for (var id = 0; id < ids.length; id++) {\n var custom = main.objects[ids[id]].common.custom;\n var sett = custom ? custom[inst] : null;\n\n if (main.objects[ids[id]].common) {\n if (type === null) {\n type = main.objects[ids[id]].common.type;\n } else if (type !== '' && type !== main.objects[ids[id]].common.type) {\n type = '';\n }\n if (role === null) {\n role = main.objects[ids[id]].common.role;\n } else if (role !== '' && role !== main.objects[ids[id]].common.role) {\n role = '';\n }\n }\n\n if (sett) {\n for (var _attr in sett) {\n if (!sett.hasOwnProperty(_attr)) continue;\n if (commons[inst][_attr] === undefined) {\n commons[inst][_attr] = sett[_attr];\n } else if (commons[inst][_attr] !== sett[_attr]) {\n commons[inst][_attr] = STR_DIFFERENT;\n }\n }\n } else {\n var a = inst.split('.')[0];\n var _default = null;\n // Try to get default values\n if (defaults[a]) {\n if (typeof defaults[a] === 'function') {\n _default = defaults[a](that.main.objects[ids[id]], that.main.objects['system.adapter.' + inst]);\n } else {\n _default = defaults[a];\n }\n } else {\n _default = this.defaults[a];\n }\n\n for (var attr in _default) {\n if (!_default.hasOwnProperty(attr)) continue;\n if (commons[inst][attr] === undefined) {\n commons[inst][attr] = _default[attr];\n } else if (commons[inst][attr] !== _default[attr]) {\n commons[inst][attr] = STR_DIFFERENT;\n }\n }\n }\n }\n }\n\n // add all tabs to div\n for (var j = 0; j < instances.length; j++) {\n // try to find settings\n var parts = instances[j].split('.');\n var adapter = parts[2];\n var instance = parts[3];\n var data = adapter + '.' + instance;\n var img = this.main.objects['system.adapter.' + adapter].common.icon;\n img = '/adapter/' + adapter + '/' + img;\n var tab =\n '
  • ' +\n '
    ' +\n ' ' + _('Settings for %s', data) +\n ' ' + _('active') + '' +\n '
    ' +\n '
    ' +\n $('script[data-template-name=\"' + adapter + '\"]').html() +\n '
    ' +\n '
  • ';\n\n var $tab = $(tab);\n this.defaults[adapter] = {};\n // set values\n $tab.find('input, select').each(function() {\n var $this = $(this);\n $this.attr('data-instance', adapter + '.' + instance);\n var field = $this.attr('data-field');\n var def = $this.attr('data-default');\n if (def === 'true') def = true;\n if (def === 'false') def = false;\n if (def !== undefined && def.toString().replace(/\\+/, '') === parseFloat(def).toString()) {\n def = parseFloat(def);\n }\n\n that.defaults[adapter][field] = def;\n if (field === 'enabled') {\n $this.on('click', function (event) {\n event.stopPropagation();\n if ($(this).prop('checked')) {\n\n } else {\n\n }\n });\n }\n });\n\n $customTabs.append($tab);\n // post init => add custom logic\n if (customPostInits.hasOwnProperty(adapter) && typeof customPostInits[adapter] === 'function') {\n customPostInits[adapter]($tab, commons[adapter + '.' + instance], that.main.objects['system.adapter.' + adapter + '.' + instance], type, role);\n }\n }\n\n // set values\n $customTabs.find('input, select').each(function() {\n var $this = $(this);\n var instance = $this.data('instance');\n var adapter = instance.split('.')[0];\n var attr = $this.data('field');\n\n if (commons[instance][attr] !== undefined) {\n if ($this.attr('type') === 'checkbox') {\n if (commons[instance][attr] === STR_DIFFERENT) {\n /*$('').insertBefore($this);\n $this.hide().attr('data-field', '').data('field', '');*/\n $this[0].indeterminate = true;\n } else {\n $this.prop('checked', commons[instance][attr]);\n }\n } else {\n if (commons[instance][attr] === STR_DIFFERENT) {\n if ($this.attr('type') === 'number') {\n $this.attr('type', 'text');\n }\n if ($this.prop('tagName').toUpperCase() === 'SELECT'){\n $this.prepend('');\n $this.val(wordDifferent);\n } else {\n $this.val('').attr('placeholder', wordDifferent);\n }\n } else {\n $this.val(commons[instance][attr]);\n }\n }\n } else {\n var def;\n if (that.defaults[adapter] && that.defaults[adapter][attr] !== undefined) {\n def = that.defaults[adapter][attr];\n }\n if (def !== undefined) {\n if ($this.attr('type') === 'checkbox') {\n $this.prop('checked', def);\n } else {\n $this.val(def);\n }\n }\n }\n\n if ($this.attr('type') === 'checkbox') {\n $this.on('change', function () {\n that.$dialog.find('.dialog-system-buttons .btn-save').removeClass('disabled');\n if ($(this).data('field') === 'enabled') {\n var instance = $this.data('instance');\n var $headerActive = $customTabs.find('.activated[data-adapter=\"' + instance + '\"]');\n if ($(this).prop('checked')) {\n $headerActive.css('opacity', 1);\n } else {\n $headerActive.css('opacity', 0);\n }\n }\n });\n } else {\n $this.on('change', function () {\n that.$dialog.find('.dialog-system-buttons .btn-save').removeClass('disabled');\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n }\n });\n\n this.showCustomsData(ids.length > 1 ? null : ids[0]);\n this.$dialog.find('.dialog-system-buttons .btn-save').addClass('disabled');\n translateAll('#dialog-customs');\n var $collapsible = that.$dialog.find('.collapsible');\n $collapsible.collapsible({\n onOpenEnd: function (el) {\n // store settings\n var _collapsed = that.main.config['object-customs-collapsed'];\n _collapsed = _collapsed ? _collapsed.split(',') : [];\n var id = $(el).data('adapter');\n var pos = _collapsed.indexOf(id);\n if (pos !== -1) _collapsed.splice(pos, 1);\n that.main.saveConfig('object-customs-collapsed', _collapsed.join(','));\n },\n onCloseEnd: function (el) {\n // store settings\n var _collapsed = that.main.config['object-customs-collapsed'];\n _collapsed = _collapsed ? _collapsed.split(',') : [];\n var id = $(el).data('adapter');\n var pos = _collapsed.indexOf(id);\n if (pos === -1) _collapsed.push(id);\n that.main.saveConfig('object-customs-collapsed', _collapsed.join(','));\n }\n });\n\n that.$dialog.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();//.addClass('filled-in');\n if (!$input.prop('disabled')) {\n if ($input[0].indeterminate) {\n $input[0].indeterminate = false;\n $input.prop('checked', true).trigger('change');\n } else {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n }\n });\n $customTabs.find('select').select();\n M.updateTextFields('#dialog-customs');\n\n this.resizeHistory();\n };\n\n function installColResize() {\n if (!$.fn.colResizable) return;\n if ($outer.is(':visible')) {\n if (!$outer.data('inited')) {\n hdr = new IobListHeader('grid-history-header', {list: $outer, colWidthOffset: 1, prefix: 'log-filter'});\n\n // todo define somehow the width of every column\n hdr.add('text', 'val');\n hdr.add('text', 'ack');\n hdr.add('text', 'from');\n hdr.add('text', 'ts');\n hdr.add('text', 'lc');\n }\n\n // Fix somehow, that columns have different widths\n $outer.colResizable({\n liveDrag: true,\n\n partialRefresh: true,\n marginLeft: 5,\n postbackSafe:true,\n\n onResize: function (event) {\n return hdr.syncHeader();\n }\n });\n\n hdr.syncHeader();\n } else {\n setTimeout(function () {\n installColResize();\n }, 200)\n }\n }\n\n function updateTable(delay) {\n // Load data again from adapter\n if (delay) {\n if (that.historyTimeout) {\n clearTimeout(that.historyTimeout)\n }\n } else if (that.historyTimeout) {\n return;\n }\n\n that.historyTimeout = setTimeout(function () {\n that.historyTimeout = null;\n if ($historyTableInstance) {\n that.loadHistoryTable($historyTableInstance.data('id'), true);\n }\n }, delay || 5000);\n }\n\n function download(filename, text) {\n var element = document.createElement('a');\n element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));\n element.setAttribute('download', filename);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n this.loadHistoryTable = function (id, isSilent, isDownload) {\n $outer = $outer || that.$dialog.find('#grid-history');\n $table = $table || that.$dialog.find('#grid-history-body');\n\n if (!isSilent) {\n $table.html('' + _('Loading...') + '');\n }\n\n var request = {\n aggregate: 'none',\n instance: $historyTableInstance.val(),\n from: true,\n ack: true,\n q: true\n };\n\n if (!$tableDateFrom) {\n $tableDateFrom = this.$dialog.find('#tab-customs-table .datepicker.date-from');\n $tableDateTo = this.$dialog.find('#tab-customs-table .datepicker.date-to');\n $tableTimeFrom = this.$dialog.find('#tab-customs-table .timepicker.time-from');\n $tableTimeTo = this.$dialog.find('#tab-customs-table .timepicker.time-to');\n }\n\n var dateFrom = $tableDateFrom.val() ? M.Datepicker.getInstance($tableDateFrom).toString('yyyy.mm.dd') : '';\n var timeFrom = $tableTimeFrom.val();\n var dateTo = $tableDateTo.val() ? M.Datepicker.getInstance($tableDateTo).toString('yyyy.mm.dd') : '';\n var timeTo = $tableTimeTo.val();\n var empty = true;\n if (dateTo) {\n dateTo = new Date(dateTo);\n empty = false;\n dateTo.setHours(23);\n dateTo.setMinutes(59);\n dateTo.setSeconds(59);\n dateTo.setMilliseconds(999);\n } else {\n dateTo = new Date();\n }\n if (timeTo) {\n var parts = timeTo.split(':');\n dateTo.setHours(parts[0]);\n dateTo.setMinutes(parts[1]);\n dateTo.setSeconds(59);\n dateTo.setMilliseconds(999);\n empty = false;\n }\n dateTo = dateTo.getTime();\n if (empty) dateTo += 10000;\n request.end = dateTo;\n\n if (dateFrom || timeFrom) {\n dateFrom = new Date(dateFrom || dateTo);\n if (timeFrom) {\n var part__ = timeFrom.split(':');\n dateFrom.setHours(part__[0]);\n dateFrom.setMinutes(part__[1]);\n } else {\n dateFrom.setHours(0);\n dateFrom.setMinutes(0);\n }\n dateFrom.setSeconds(0);\n dateFrom.setMilliseconds(0);\n request.start = dateFrom.getTime();\n } else {\n request.count = 50;\n }\n var fileName;\n if (isDownload) {\n fileName = new Date(dateTo).toISOString() + '_' + (request.start ? new Date(request.start) : request.count + 'points') + '_' + id + '__' + request.instance + '.csv';\n }\n\n\n main.socket.emit('getHistory', id, request, function (err, res) {\n setTimeout(function () {\n var csv = 'value;acknowledged;from;timestamp;lastchanged;\\n';\n if (!err) {\n var text = '';\n if (res && res.length) {\n for (var i = res.length - 1; i >= 0; i--) {\n var from = (res[i].from || '').replace('system.adapter.', '').replace('system.', '');\n text += ' lastHistoryTimeStamp ? 'highlight' : '') + '\">' +\n ' ' + res[i].val + '' +\n ' ' + res[i].ack + '' +\n ' ' + from + '' +\n ' ' + main.formatDate(res[i].ts) + '' +\n ' ' + main.formatDate(res[i].lc) + '' +\n '\\n';\n\n if (isDownload) {\n csv += res[i].val + ';' + res[i].ack + ';' + (from || '') + ';' + (res[i].ts ? new Date(res[i].ts).toISOString() : '') + ';' + (res[i].lc ? new Date(res[i].lc).toISOString() : '') + ';\\n';\n }\n }\n lastHistoryTimeStamp = res[res.length - 1].ts;\n } else {\n text = '' + _('No data') + ''\n }\n $table.html(text);\n } else {\n console.error(err);\n $table.html('' + err + '');\n }\n installColResize();\n if (isDownload) {\n download(fileName, csv);\n }\n }, 0);\n });\n };\n\n this.loadHistoryChart = function (id) {\n if (!$chartDateFrom) {\n $chartDateFrom = this.$dialog.find('#tab-customs-chart .datepicker.date-from');\n $chartDateTo = this.$dialog.find('#tab-customs-chart .datepicker.date-to');\n }\n\n if (id) {\n var port = 0;\n var chart = false;\n var isSecure = false;\n for (var i = 0; i < this.main.instances.length; i++) {\n if (this.main.objects[main.instances[i]].common.name === 'flot' && this.main.objects[this.main.instances[i]].common.enabled) {\n chart = 'flot';\n } else\n if (!chart && this.main.objects[main.instances[i]].common.name === 'rickshaw' && this.main.objects[this.main.instances[i]].common.enabled) {\n chart = 'rickshaw';\n } else\n if (this.main.objects[this.main.instances[i]].common.name === 'web' && this.main.objects[this.main.instances[i]].common.enabled) {\n port = this.main.objects[this.main.instances[i]].native.port;\n isSecure = this.main.objects[this.main.instances[i]].native.secure;\n }\n if (chart === 'flot' && port) break;\n }\n var $chart = this.$dialog.find('#iframe-history-chart');\n\n var linkTemplate = 'http{isSecure}://{hostname}:{port}/{chart}/index.html?range=1440&zoom=true&axeX=lines&axeY=inside&hoverDetail=true&aggregate=onchange&chartType=step&live=30&instance={instance}&l%5B0%5D%5Bid%5D={id}&l%5B0%5D%5Boffset%5D=0&l%5B0%5D%5Baggregate%5D=minmax&l%5B0%5D%5Bcolor%5D=%231868a8&l%5B0%5D%5Bthickness%5D=1&l%5B0%5D%5Bshadowsize%5D=1&l%5B0%5D%5Bsmoothing%5D=0&l%5B0%5D%5BafterComma%5D=0&l%5B0%5D%5BignoreNull%5D=false&aggregateType=step&aggregateSpan=300&relativeEnd=now&timeType=relative&noBorder=noborder&bg=rgba(0%2C0%2C0%2C0)&timeFormat=%25H%3A%25M&useComma={comma}&noedit=false&animation=0';\n linkTemplate = linkTemplate.replace('{isSecure}', (isSecure ? 's' : ''));\n linkTemplate = linkTemplate.replace('{hostname}', location.hostname);\n linkTemplate = linkTemplate.replace('{port}', port);\n linkTemplate = linkTemplate.replace('{chart}', chart);\n linkTemplate = linkTemplate.replace('{instance}', that.$dialog.find('#tab-customs-chart .select-instance').val());\n linkTemplate = linkTemplate.replace('{id}', encodeURI(id));\n linkTemplate = linkTemplate.replace('{comma}', that.main.systemConfig && that.main.systemConfig.common && that.main.systemConfig.isFloatComma);\n\n // find out\n $chart.attr('src', linkTemplate);//'http' + (isSecure ? 's' : '') + '://' + location.hostname + ':' + port + '/' + chart + '/index.html?range=1440&zoom=true&axeX=lines&axeY=inside&_ids=' + encodeURI(id) + '&width=' + ($chart.width() - 50) + '&hoverDetail=true&height=' + ($chart.height() - 50) + '&aggregate=onchange&chartType=step&live=30&instance=' + that.$dialog.find('#tab-customs-chart .select-instance').val());\n } else {\n this.$dialog.find('#iframe-history-chart').attr('src', '');\n }\n };\n\n this.showCustomsData = function (id) {\n var $tabs = this.$dialog.find('#tabs-customs');\n\n var port = 0;\n var chart = false;\n\n initTab('tab-customs-settings');\n\n if (id) {\n $tabs.data('id', id);\n\n // Check if chart enabled and set\n for (var i = 0; i < main.instances.length; i++) {\n if (main.objects[main.instances[i]].common.name === 'flot' && main.objects[main.instances[i]].common.enabled) {\n chart = 'flot';\n } else\n if (!chart && main.objects[main.instances[i]].common.name === 'rickshaw' && main.objects[main.instances[i]].common.enabled) {\n chart = 'rickshaw';\n } else\n if (main.objects[main.instances[i]].common.name === 'web' && main.objects[main.instances[i]].common.enabled) {\n port = main.objects[main.instances[i]].native.port;\n }\n if (chart === 'flot' && port) break;\n }\n that.loadHistoryTable(id);\n\n $tabs.find('.tabs .tab-table').removeClass('disabled');\n\n if (port && chart && that.currentCustoms) {\n $tabs.find('.tabs .tab-chart').removeClass('disabled');\n } else {\n $tabs.find('.tabs .tab-chart').addClass('disabled');\n }\n } else {\n $tabs.find('.tabs .tab-table').addClass('disabled');\n $tabs.find('.tabs .tab-chart').addClass('disabled');\n }\n };\n\n function getCustomTemplate(adapter, callback) {\n $.ajax({\n headers: {\n Accept: 'text/html'\n },\n cache: true,\n url: '/adapter/' + adapter + '/custom_m.html',\n success: function (_data) {\n callback(null, _data);\n },\n error: function (jqXHR) {\n // todo: remove some days 2017.12.19 (for admin2)\n $.ajax({\n headers: {\n Accept: 'text/html'\n },\n cache: true,\n url: '/adapter/' + adapter + '/custom.html',\n success: function (_data) {\n callback(null, _data);\n },\n error: function (jqXHR) {\n callback(jqXHR.responseText);\n }\n });\n }\n });\n }\n\n // Set modified custom states\n this.setCustoms = function (ids, callback) {\n var id = ids.pop();\n if (id) {\n this.$dialog.find('#tab-customs-settings .title').html(_('Adapter settings for %s states', ids.length));\n\n that.main.socket.emit('setObject', id, this.main.objects[id], function (err) {\n if (err) {\n that.main.showMessage(_(err), _('Error'), 'error_outline');\n } else {\n setTimeout(function () {\n that.setCustoms(ids, callback);\n }, 50);\n }\n });\n } else {\n if (callback) callback();\n }\n };\n\n this.resizeHistory = function () {\n // resize only if chart is visible\n var $iFrame = this.$dialog.find('#iframe-history-chart');\n if ($iFrame.attr('src')) {\n var timeout = $iFrame.data('timeout');\n if (timeout) clearTimeout(timeout);\n\n $iFrame.data('timeout', setTimeout(function () {\n that.$dialog.find('#iframe-history-chart').data('timeout', null);\n that.loadHistoryChart(that.$dialog.find('#tabs-customs').data('id')); // reinit iframe\n }, 1000));\n }\n };\n\n function onButtonSave(e) {\n e.stopPropagation();\n e.preventDefault();\n\n var $tabs = that.$dialog.find('#customs-tabs');\n var ids = $tabs.data('ids');\n\n // do not update charts\n that.currentCustoms = null;\n var wordDifferent = _(STR_DIFFERENT);\n\n // collect default values\n var $inputs = $tabs.find('input, select');\n\n //that.historyIds = ids;\n $inputs.each(function () {\n var instance = $(this).data('instance');\n var field = $(this).data('field');\n if (!field) return;\n\n var val;\n if ($(this).attr('type') === 'checkbox') {\n if (this.indeterminate) return;\n val = $(this).prop('checked');\n } else {\n val = $(this).val();\n }\n // if not changed\n if (val === wordDifferent) return;\n\n if (val === null) val = '';\n if (val === undefined) val = '';\n if (val === 'false') val = false;\n if (val === 'true') val = true;\n var f = parseFloat(val);\n // replace trailing 0 and prefix +\n if (val.toString().replace(/^\\+/, '').replace(/([0-9]+(\\.[0-9]+[1-9])?)(\\.?0+$)/,'$1') === f.toString()) {\n val = f;\n }\n\n for (var i = 0; i < ids.length; i++) {\n var custom = that.main.objects[ids[i]].common.custom;\n custom = that.main.objects[ids[i]].common.custom = custom || {};\n\n if (custom[instance] === undefined) {\n var adapter = instance.split('.')[0];\n var _default;\n // Try to get default values\n if (defaults[adapter]) {\n if (typeof defaults[adapter] === 'function') {\n _default = defaults[adapter](that.main.objects[ids[i]], that.main.objects['system.adapter.' + instance]);\n } else {\n _default = defaults[adapter];\n }\n } else {\n _default = that.defaults[adapter];\n }\n custom[instance] = _default || {};\n }\n custom[instance][field] = val;\n }\n });\n\n\n if (ids) {\n that.$dialog.find('.dialog-system-buttons .btn-save').addClass('disabled');\n\n for (var i = 0; i < ids.length; i++) {\n var found = false;\n var custom_ = that.main.objects[ids[i]].common.custom;\n for (var inst in custom_) {\n if (!custom_.hasOwnProperty(inst)) continue;\n if (!custom_[inst].enabled) {\n delete custom_[inst];\n } else {\n found = true;\n }\n }\n if (!found) {\n that.main.objects[ids[i]].common.custom = null;\n }\n }\n that.setCustoms(ids, function () {\n // disable iframe\n that.loadHistoryChart(); // disable iframe\n that.main.navigate();\n });\n }\n\n }\n\n // return true if all data are stored\n this.allStored = function () {\n return that.$dialog.find('.dialog-system-buttons .btn-save').hasClass('disabled');\n };\n\n function initTab(id) {\n switch (id) {\n case 'tab-customs-settings':\n that.loadHistoryChart(); // disable iframe\n break;\n\n case 'tab-customs-table':\n $historyTableInstance.select();\n that.loadHistoryChart(); // disable iframe\n break;\n\n case 'tab-customs-chart':\n that.$dialog.find('#tab-customs-chart .select-instance').select();\n var $tabs = that.$dialog.find('#tabs-customs');\n that.loadHistoryChart($tabs.data('id')); // init iframe\n break;\n }\n }\n\n this.init = function (_ids, isUpdate) {\n if (this.inited && !isUpdate) {\n return;\n }\n\n var ids = this.main.navigateGetParams();\n\n if (ids) {\n ids = ids.split(',');\n }\n // if the list of IDs is too long, it was saved into this.ids\n if (!ids || !ids.length) {\n ids = this.ids;\n this.ids = undefined;\n }\n var instances = [];\n\n // clear global defaults object\n this.defaults = {};\n\n // collect all custom instances\n var count = 0;\n var data = '';\n var urls = [];\n for (var u = 0; u < this.main.instances.length; u++) {\n var inst = this.main.objects[this.main.instances[u]];\n if (inst && inst.common && (inst.common.type === 'storage' || inst.common.supportCustoms)) {\n instances.push(this.main.instances[u]);\n var url = this.main.instances[u].split('.');\n if (urls.indexOf(url[2]) === -1) {\n urls.push(url[2]);\n count++;\n getCustomTemplate(url[2], function (err, result) {\n if (err) console.error(err);\n if (result) data += result;\n if (!--count) {\n that.$dialog.find('#customs-templates').html(data);\n that.initCustomsTabs(ids, instances);\n }\n });\n }\n }\n }\n var _instances = [];\n if (ids) {\n for (var i = ids.length - 1; i >= 0; i--) {\n if (!this.main.objects[ids[i]]) {\n console.warn('Null object: ' + ids[i]);\n ids.splice(i, 1);\n } else {\n var custom = this.main.objects[ids[i]].common.custom;\n if (custom) {\n var found = false;\n // delete disabled entries\n for (var h in custom) {\n if (!custom.hasOwnProperty(h)) continue;\n if (custom[h].enabled === false) {\n delete custom[h];\n } else {\n if (ids.length === 1) _instances.push(h);\n found = true;\n }\n }\n if (!found) {\n delete this.main.objects[ids[i]].common.custom;\n }\n }\n }\n }\n }\n\n var title;\n $historyTableInstance = this.$dialog.find('#tab-customs-table .select-instance');\n $historyChartInstance = this.$dialog.find('#tab-customs-chart .select-instance');\n var $historyTableInstanceBtn = this.$dialog.find('#tab-customs-table .refresh');\n var $historyTableDownloadBtn = this.$dialog.find('#tab-customs-table .download');\n var $historyChartInstanceBtn = this.$dialog.find('#tab-customs-chart .refresh');\n\n if (ids && ids.length === 1) {\n title = _('Storage of %s', ids[0]);\n this.currentCustoms = _instances.length ? ids[0] : null;\n var text = '';\n for (var k = 0; k < _instances.length; k++) {\n var insta = this.main.objects['system.adapter.' + _instances[k]];\n if (insta && insta.common && (insta.common.enabled ||\n (this.main.states['system.adapter.' + _instances[k] + '.alive'] && this.main.states['system.adapter.' + _instances[k] + '.alive'].val))) {\n text += '\\n';\n }\n }\n if (text) {\n $historyTableInstance\n .data('id', ids[0])\n .html(text)\n .show()\n .off('change')\n .on('change', function () {\n that.main.saveConfig('object-history-table', $historyTableInstance.val());\n that.loadHistoryTable($(this).data('id'));\n }).select();\n\n $historyChartInstance\n .data('id', ids[0])\n .html(text)\n .show()\n .off('change')\n .on('change', function () {\n that.main.saveConfig('object-history-chart', $historyChartInstance.val());\n that.loadHistoryChart($(this).data('id')); // reinit iframe\n }).select();\n\n if (this.main.config['object-history-table'] !== undefined) {\n $historyTableInstance.val(this.main.config['object-history-table'])\n }\n if (this.main.config['object-history-chart'] !== undefined) {\n $historyChartInstance.val(this.main.config['object-history-chart'])\n }\n $historyTableInstanceBtn\n .data('id', ids[0])\n .show()\n .off('click')\n .on('click', function () {\n that.$dialog.find('#grid-history-body').html('');\n that.loadHistoryTable($(this).data('id'));\n });\n $historyChartInstanceBtn\n .data('id', ids[0])\n .show()\n .off('click').on('click', function () {\n that.loadHistoryChart($(this).data('id')); // reinit iframe\n });\n\n $historyTableDownloadBtn\n .data('id', ids[0])\n .show()\n .off('click')\n .on('click', function () {\n that.loadHistoryTable($(this).data('id'), false, true);\n });\n\n var yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n var i18n = {\n today: _('Today'),\n clear: _('Clear'),\n done: _('Ok'),\n months : [_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),_('July'),_('August'),_('September'),_('October'),_('November'),_('December')],\n monthsShort : [_('Jan'),_('Feb'),_('Mar'),_('Apr'),_('May'),_('Jun'),_('Jul'),_('Aug'),_('Sep'),_('Oct'),_('Nov'),_('Dec')],\n weekdaysShort : [_('Sun'),_('Mon'),_('Tue'),_('Wed'),_('Thu'),_('Fri'),_('Sat')],\n weekdays : [_('Sunday'),_('Monday'),_('Tuesday'),_('Wednesday'),_('Thursday'),_('Friday'),_('Saturday')],\n weekdaysAbbrev : ['S','M','T','W','T','F','S']\n };\n for (var n = 0; n < i18n.weekdaysAbbrev.length; n++) {\n i18n.weekdaysAbbrev[n] = i18n.weekdaysShort[n][0];\n }\n if (!$tableDateFrom) {\n $tableDateFrom = this.$dialog.find('#tab-customs-table .datepicker.date-from');\n $tableDateTo = this.$dialog.find('#tab-customs-table .datepicker.date-to');\n $tableTimeFrom = this.$dialog.find('#tab-customs-table .timepicker.time-from');\n $tableTimeTo = this.$dialog.find('#tab-customs-table .timepicker.time-to');\n\n $chartDateFrom = this.$dialog.find('#tab-customs-chart .datepicker.date-from');\n $chartDateTo = this.$dialog.find('#tab-customs-chart .datepicker.date-to');\n }\n\n $tableDateFrom.datepicker({\n defaultDate: yesterday,\n showDaysInNextAndPreviousMonths: true,\n minYear: 2014,\n maxYear: 2032,\n i18n: i18n,\n setDefaultDate: true,\n firstDay: 1,\n onSelect: function (date) {\n $tableDateFrom.datepicker('setInputValue');\n $tableDateFrom.datepicker('close');\n }\n });\n $tableDateFrom.on('change', function () {\n updateTable(1000);\n });\n\n $tableTimeFrom.timepicker({\n defaultTime: '00:00',\n twelveHour: false, // TODO\n doneText: _('Ok'),\n clearText: _('Clear'),\n cancelText: _('Cancel'),\n autoClose: true\n });\n $tableTimeFrom.on('change', function () {\n updateTable(1000);\n });\n\n $tableTimeTo.timepicker({\n defaultTime: 'now',\n twelveHour: false, // TODO\n doneText: _('Ok'),\n clearText: _('Clear'),\n cancelText: _('Cancel'),\n autoClose: true\n });\n $tableTimeTo.on('change', function () {\n updateTable(1000);\n });\n\n $tableDateTo.datepicker({\n defaultDate: new Date(),\n showDaysInNextAndPreviousMonths: true,\n minYear: 2014,\n maxYear: 2032,\n i18n: i18n,\n setDefaultDate: true,\n firstDay: 1,\n onSelect: function (date) {\n $tableDateTo.datepicker('setInputValue');\n $tableDateTo.datepicker('close');\n }\n });\n $tableDateTo.on('change', function () {\n updateTable(1000);\n });\n\n\n $chartDateFrom.datepicker({\n defaultDate: yesterday,\n showDaysInNextAndPreviousMonths: true,\n minYear: 2014,\n maxYear: 2032,\n i18n: i18n,\n setDefaultDate: true,\n firstDay: 1,\n onSelect: function (date) {\n $chartDateFrom.datepicker('setInputValue');\n $chartDateFrom.datepicker('close');\n }\n });\n $chartDateFrom.on('change', function () {\n that.loadHistoryChart($historyChartInstance.data('id'));\n });\n $chartDateTo.datepicker({\n defaultDate: new Date(),\n showDaysInNextAndPreviousMonths: true,\n minYear: 2014,\n maxYear: 2032,\n i18n: i18n,\n setDefaultDate: true,\n firstDay: 1,\n onSelect: function (date) {\n $chartDateTo.datepicker('setInputValue');\n $chartDateTo.datepicker('close');\n }\n });\n $chartDateTo.on('change', function () {\n that.loadHistoryChart($historyChartInstance.data('id'));\n });\n } else {\n $historyTableInstance.hide();\n $historyChartInstance.hide();\n $historyTableInstanceBtn.hide();\n $historyChartInstanceBtn.hide();\n $historyTableDownloadBtn.hide();\n }\n if (this.currentCustoms) {\n that.main.subscribeStates(this.currentCustoms);\n }\n this.$dialog.find('#tab-customs-table .title').html(_('Values of %s', ids[0]));\n this.$dialog.find('#tab-customs-chart .title').html(_('Chart for %s', ids[0]));\n } else if (ids) {\n $historyTableInstance.hide();\n $historyChartInstance.hide();\n $historyTableInstanceBtn.hide();\n $historyChartInstanceBtn.hide();\n $historyTableDownloadBtn.hide();\n title = _('Storage of %s states', ids.length);\n this.currentCustoms = null;\n }\n\n this.$dialog.find('#tab-customs-settings .title').html(title);\n\n var $tabs = this.$dialog.find('#tabs-customs');\n $tabs.find('.tabs').mtabs({\n onShow: function (tab) {\n if (!tab) return;\n initTab($(tab).attr('id'));\n }\n });\n this.$dialog.find('#customs-tabs').data('ids', ids);\n that.$dialog.find('.dialog-system-buttons .btn-save').off('click').on('click', onButtonSave);\n that.$dialog.find('.dialog-system-buttons .btn-cancel').off('click').on('click', function (e) {\n e.stopPropagation();\n e.preventDefault();\n if (!that.$dialog.find('.dialog-system-buttons .btn-save').hasClass('disabled')) {\n that.main.confirmMessage(_('Are you sure? Changes are not saved.'), _('Please confirm'), 'error_outline', function (result) {\n if (result) {\n that.$dialog.find('.dialog-system-buttons .btn-save').addClass('disabled');\n // disable iframe\n that.loadHistoryChart();\n that.main.navigate();\n }\n });\n } else {\n // disable iframe\n that.loadHistoryChart();\n that.main.navigate();\n }\n });\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.$dialog.find('.collapsible').collapsible('destroy');\n this.inited = false;\n // disable iframe\n this.loadHistoryChart();\n if (this.currentCustoms) {\n that.main.unsubscribeStates(this.currentCustoms);\n }\n }\n };\n\n return this;\n}\n","function EditObject(main) {\n 'use strict';\n\n var that = this;\n this.$dialog = $('#dialog-editobject');\n this.$dialogNewField = $('#dialog-new-field');\n this.main = main;\n this.prepared = false;\n this.inited = false;\n this.$dialogSave = this.$dialog.find('.dialog-editobject-buttons .btn-save');\n this.iconVal = null;\n\n function loadObjectFields(selector, object, part, objectType) {\n var text = '';\n for (var attr in object) {\n if (!object.hasOwnProperty(attr) || (part === 'common' && (attr === 'name' || attr === 'icon'))) continue;\n\n if (false && objectType === 'state' && part === 'common' && attr === 'role') { // autocomplete is temporally disabled because buggy\n text += '
    ' +\n 'textsms' +\n '';\n } else {\n text += '
    \\n
    \\n';\n if (objectType === 'state' && part === 'common' && attr === 'type') {\n text += '';\n } else if (typeof object[attr] === 'string') {\n text += '\\n';\n } else if (typeof object[attr] === 'number') {\n text += '\\n';\n } else if (typeof object[attr] === 'boolean') {\n text += '\\n';\n } else {\n text += '\\n';\n }\n }\n\n var title = attr;\n // translations\n if (part === 'common' && systemDictionary['common_' + attr] && systemDictionary['common_' + attr][systemLang]) {\n title = _('common_' + attr);\n }\n\n // workaround for materialize\n if (typeof object[attr] === 'boolean') {\n text += '' + title + '\\n';\n } else {\n text += '\\n';\n }\n\n text += '
    \\n\\n';\n text += '
    \\n';\n }\n\n that.$dialog.find(selector).html(text);\n /*that.$dialog.find(selector).find('.autocomplete').each(function () {\n $(this).mautocomplete({\n data: {\n 'state': null,\n 'switch': null,\n 'button': null,\n 'value': null,\n 'level': null,\n 'indicator': null,\n 'value.temperature': null,\n 'value.humidity': null,\n 'level.temperature': null,\n 'level.dimmer': null\n },\n minLength: 0 // The minimum length of the input for the autocomplete to start. Default: 1.\n });\n });*/\n }\n\n function saveObjectFields(selector, object) {\n var $htmlId = that.$dialog.find(selector);\n $htmlId.find('.object-tab-edit-string').each(function () {\n object[$(this).data('attr')] = $(this).val();\n });\n $htmlId.find('.object-tab-edit-number').each(function () {\n object[$(this).data('attr')] = parseFloat($(this).val());\n });\n $htmlId.find('.object-tab-edit-boolean').each(function () {\n object[$(this).data('attr')] = $(this).prop('checked');\n });\n var err = null;\n $htmlId.find('.object-tab-edit-object').each(function () {\n try {\n object[$(this).data('attr')] = JSON.parse($(this).val());\n } catch (e) {\n err = $(this).data('attr');\n return false;\n }\n });\n\n if (object.write !== undefined) {\n if (object.write === 'false' || object.write === '0' || object.write === 0) object.write = false;\n if (object.write === 'true' || object.write === '1' || object.write === 1) object.write = true;\n }\n\n if (object.read !== undefined) {\n if (object.read === 'false' || object.read === '0' || object.read === 0) object.read = false;\n if (object.read === 'true' || object.read === '1' || object.read === 1) object.read = true;\n }\n\n if (object.min === null) {\n delete object.min;\n }\n if (object.min !== undefined) {\n var f = parseFloat(object.min);\n if (f.toString() === object.min.toString()) object.min = f;\n\n if (object.min === 'false') object.min = false;\n if (object.min === 'true') object.min = true;\n }\n if (object.max === null) {\n delete object.max;\n }\n if (object.max !== undefined) {\n var m = parseFloat(object.max);\n if (m.toString() === object.max.toString()) object.max = m;\n\n if (object.max === 'false') object.max = false;\n if (object.max === 'true') object.max = true;\n }\n if (object.def === null) {\n delete object.def;\n }\n\n if (object.def !== undefined) {\n var d = parseFloat(object.def);\n if (d.toString() === object.def.toString()) object.def = d;\n\n if (object.def === 'false') object.def = false;\n if (object.def === 'true') object.def = true;\n }\n\n // common part cannot have \"true\" or \"false\". Only true and false.\n if (selector.indexOf('common') !== -1) {\n for (var attr in object) {\n if (object.hasOwnProperty(attr)) {\n if (object[attr] === 'true') {\n object[attr] = true;\n }\n if (object[attr] === 'false') {\n object[attr] = false;\n }\n if (parseFloat(object[attr]).toString() === object[attr]) {\n object[attr] = parseFloat(object[attr]);\n }\n }\n }\n }\n\n return err;\n }\n\n function showMessage(text, duration, isError) {\n if (typeof duration === 'boolean') {\n isError = duration;\n duration = 3000;\n }\n that.main.showToast(that.$dialog, text, null, duration, isError);\n }\n\n // only init if required\n this._prepare = function () {\n if (this.prepared) {\n return;\n }\n this.prepared = true;\n this.$dialogSave.on('click', function () {\n that.save();\n });\n this.$dialog.find('.dialog-editobject-buttons .btn-cancel').on('click', function () {\n that.editor.setValue('');\n that.$dialogSave.addClass('disabled');\n that.main.navigate();\n });\n\n this.$dialog.find('.btn-add-common').on('click', function () {\n that.$dialogNewField.find('.object-tab-new-icon').show();\n that.$dialogNewField.modal('open');\n var $name = that.$dialogNewField.find('.object-tab-new-name');\n $name.data('type', 'common').focus();\n if (!$name.hasClass('autocomplete')) {\n $name.addClass('autocomplete');\n $name.mautocomplete({\n data: {\n type: null,\n desc: null,\n min: null,\n max: null,\n def: null,\n role: null,\n unit: null,\n read: null,\n write: null,\n states: null\n },\n minLength: 0 // The minimum length of the input for the autocomplete to start. Default: 1.\n });\n }\n $name.focus()\n });\n\n this.$dialog.find('.btn-add-native').on('click', function () {\n that.$dialogNewField.find('.object-tab-new-icon').hide();\n that.$dialogNewField.modal('open');\n var $name = that.$dialogNewField.find('.object-tab-new-name');\n if ($name.hasClass('autocomplete')) {\n $name.mautocomplete('destroy');\n $name.removeClass('autocomplete');\n }\n M.updateTextFields('#dialog-new-field');\n $name.data('type', 'native').focus();\n });\n this.$dialogNewField.find('.object-tab-new-name').keypress(function (e) {\n if (e.which === 13) {\n that.$dialogNewField.find('.btn-add').trigger('click');\n }\n });\n\n if (!this.editor) {\n this.editor = ace.edit('view-object-raw');\n this.editor.getSession().setMode('ace/mode/json');\n this.editor.$blockScrolling = true;\n this.editor.getSession().on('change', function() {\n that.$dialogSave.removeClass('disabled');\n });\n }\n this.$dialogNewField.modal();\n\n this.$dialog.find('.tabs').mtabs({\n onShow: function (tab) {\n if (!tab) return;\n var id = $(tab).attr('id');\n if (id === 'object-tab-common') {\n showMessage(_('Drop the icons here'));\n } else \n if (id === 'object-tab-raw') {\n var obj = that.saveFromTabs();\n\n if (!obj) return false;\n\n that.editor.setValue(JSON.stringify(obj, null, 2));\n } else if (id === 'object-tab-raw') {\n var _obj;\n try {\n _obj = JSON.parse(that.editor.getValue());\n } catch (e) {\n that.main.showMessage(e, _('Parse error'), 'error_outline');\n if (!that.main.noSelect) {\n that.$dialog.find('.tabs').mtabs('select', 'object-tab-raw');\n }\n return false;\n }\n that.load(_obj);\n }\n that.main.saveConfig('object-edit-active', id);\n return true;\n }\n });\n\n this.$dialogNewField.find('.btn-add').on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n var $tab = that.$dialogNewField.find('.object-tab-new-name');\n var type = $tab.data('type') || 'common';\n var field = $tab.val().trim();\n var obj = that.saveFromTabs();\n\n if (!field || field.indexOf(' ') !== -1) {\n that.main.showError(_('Invalid field name: %s', field));\n return;\n }\n if (obj[type][field] !== undefined) {\n that.main.showError(_('Field %s yet exists!', field));\n return;\n }\n\n obj[type][field] = '';\n\n that.load(obj);\n that.$dialogNewField.find('.object-tab-new-name').val('');\n that.$dialogNewField.modal('close');\n that.$dialogSave.removeClass('disabled');\n });\n this.$dialogNewField.find('.btn-cancel').on('click', function (e) {\n that.$dialogNewField.find('.object-tab-new-name').val('');\n });\n this.$dialog.find('.edit-object-name').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n this.$dialog.find('.edit-object-type').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n });\n this.$dialog.find('.object-tab-rights input').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n });\n\n installFileUpload(this.$dialog.find('#object-tab-common'), 50000, function (err, text) {\n if (err) {\n showMessage(err, true);\n } else {\n if (!text.match(/^data:image\\//)) {\n showMessage(_('Unsupported image format'), true);\n return;\n }\n\n that.$dialogSave.removeClass('disabled');\n that.iconVal = text;\n\n var $tab = that.$dialog.find('.icon-editor');\n $tab.find('.icon').show().html('');\n $tab.find('.icon .treetable-icon').attr('src', text);\n }\n });\n this.$dialog.find('.icon-editor .icon-upload').off('click').on('click', function () {\n that.$dialog.find('.drop-file').trigger('click');\n });\n this.$dialog.find('.icon-editor .icon-clear').off('click').on('click', function () {\n if (that.iconVal) {\n that.iconVal = null;\n that.$dialog.find('.icon-editor').hide().appendTo(that.$dialog);\n that.$dialogSave.removeClass('disabled');\n }\n });\n };\n\n this.init = function () {\n this._prepare();\n if (this.inited) {\n return;\n }\n this.inited = true;\n var id = that.main.navigateGetParams();\n var isSetDefaultState = !!(id || '').match(/,def$/);\n id = id.replace(/,def$/, '');\n\n var obj = this.main.objects[id];\n if (!obj) return;\n\n if (this.main.config['object-edit-active'] !== undefined && !that.main.noSelect) {\n this.$dialog.find('.tabs').mtabs('select', this.main.config['object-edit-active']);\n }\n\n // fill users\n var text = '';\n var name;\n for (var u = 0; u < this.main.tabs.users.list.length; u++) {\n name = translateName(this.main.objects[this.main.tabs.users.list[u]].common.name);\n text += '';\n }\n this.$dialog.find('.object-tab-acl-owner').html(text);\n\n // fill groups\n text = '';\n for (u = 0; u < this.main.tabs.users.groups.length; u++) {\n name = translateName(this.main.objects[this.main.tabs.users.groups[u]].common.name);\n text += '';\n }\n this.$dialog.find('.object-tab-acl-group').html(text);\n this.load(obj);\n\n if (isSetDefaultState) {\n this.$dialog.data('cb', function (_obj) {\n if (_obj.type === 'state') {\n // create state\n that.main.socket.emit('getState', _obj._id, function (err, state) {\n if (!state || state.val === null || state.val === undefined) {\n that.main.socket.emit('setState', _obj._id, _obj.common.def === undefined ? null : _obj.common.def, true);\n }\n });\n }\n });\n } else {\n this.$dialog.data('cb', null);\n }\n that.$dialogSave.addClass('disabled');\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.inited = false;\n }\n };\n\n this.load = function (obj) {\n if (!obj) return;\n obj.common = obj.common || {};\n obj.native = obj.native || {};\n obj.acl = obj.acl || {};\n this.$dialog.find('.title-id').text(obj._id);\n this.$dialog.find('.edit-object-name').val(obj.common ? translateName(obj.common.name) : obj._id);\n this.$dialog.find('.edit-object-type').val(obj.type);\n this.$dialog.find('.object-tab-acl-owner').val(obj.acl.owner || 'system.user.admin');\n this.$dialog.find('.object-tab-acl-group').val(obj.acl.ownerGroup || 'system.group.administrator');\n\n this.$dialog.find('.icon-editor').hide().appendTo(this.$dialog);\n\n loadObjectFields('.object-tab-common-table', obj.common || {}, 'common', obj.type);\n loadObjectFields('.object-tab-native-table', obj.native || {}, 'native', obj.type);\n\n if (obj.common.icon !== undefined) {\n this.iconVal = obj.common.icon;\n this.$dialog.find('.object-tab-common-table').prepend(this.$dialog.find('.icon-editor').show());\n this.$dialog.find('.icon-editor .icon').html(that.main.getIconFromObj(obj));\n } else {\n this.iconVal = null;\n }\n\n this.$dialog.find('.object-tab-field-delete').on('click', function () {\n var part = $(this).data('part');\n var field = $(this).data('attr');\n that.main.confirmMessage(_('Delete attribute'), _('Please confirm'), 'error_outline', function (result) {\n if (result) {\n var _obj = that.saveFromTabs();\n delete _obj[part][field];\n that.load(_obj);\n }\n });\n });\n\n obj.acl = obj.acl || {};\n if (obj.acl.object === undefined) obj.acl.object = 0x666;\n\n this.$dialog.find('#object-tab-acl-obj-owner-read') .prop('checked', obj.acl.object & 0x400);\n this.$dialog.find('#object-tab-acl-obj-owner-write').prop('checked', obj.acl.object & 0x200);\n this.$dialog.find('#object-tab-acl-obj-group-read'). prop('checked', obj.acl.object & 0x40);\n this.$dialog.find('#object-tab-acl-obj-group-write').prop('checked', obj.acl.object & 0x20);\n this.$dialog.find('#object-tab-acl-obj-every-read'). prop('checked', obj.acl.object & 0x4);\n this.$dialog.find('#object-tab-acl-obj-every-write').prop('checked', obj.acl.object & 0x2);\n\n if (obj.type !== 'state') {\n this.$dialog.find('.object-tab-acl-state').hide();\n } else {\n this.$dialog.find('.object-tab-acl-state').show();\n if (obj.acl.state === undefined) obj.acl.state = 0x666;\n\n this.$dialog.find('#object-tab-acl-state-owner-read') .prop('checked', obj.acl.state & 0x400);\n this.$dialog.find('#object-tab-acl-state-owner-write').prop('checked', obj.acl.state & 0x200);\n this.$dialog.find('#object-tab-acl-state-group-read'). prop('checked', obj.acl.state & 0x40);\n this.$dialog.find('#object-tab-acl-state-group-write').prop('checked', obj.acl.state & 0x20);\n this.$dialog.find('#object-tab-acl-state-every-read'). prop('checked', obj.acl.state & 0x4);\n this.$dialog.find('#object-tab-acl-state-every-write').prop('checked', obj.acl.state & 0x2);\n }\n\n var _obj = JSON.parse(JSON.stringify(obj));\n this.editor.setValue(JSON.stringify(_obj, null, 2));\n if (_obj._id) delete _obj._id;\n if (_obj.common) delete _obj.common;\n if (_obj.type) delete _obj.type;\n if (_obj.native) delete _obj.native;\n if (_obj.acl) delete _obj.acl;\n this.$dialog.find('#view-object-rest').val(JSON.stringify(_obj, null, ' '));\n this.$dialog.find('select').select();\n\n // workaround for materialize checkbox problem\n this.$dialog.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n // enable save\n this.$dialog.find('input').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n\n this.$dialog.find('select').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n });\n\n this.$dialog.find('textarea').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n\n if (obj.common.color !== undefined) {\n var time = Date.now();\n\n var $color = this.$dialog.find('.object-tab-edit-string[data-attr=\"color\"]').parent();\n $color.prepend('color_lens' + _('Color') + '');\n $color.colorpicker({\n component: '.btn',\n color: $color,\n container: true\n }).colorpicker('setValue', obj.common.color || '#fff').on('showPicker.colorpicker', function (/* event */) {\n }).on('changeColor.colorpicker', function (event){\n if (Date.now() - time > 100) {\n $color.find('input').val(event.color.toHex()).trigger('change');\n }\n });\n }\n\n };\n\n this.saveFromTabs = function () {\n var obj;\n try {\n obj = this.$dialog.find('#view-object-rest').val();\n if (!obj) {\n obj = {};\n } else {\n obj = JSON.parse(obj);\n }\n } catch (err) {\n this.main.showMessage(_('Cannot parse.'), _('Error in %s', err), 'error_outline');\n return false;\n }\n\n obj.common = {};\n obj.native = {};\n obj.acl = {};\n obj._id = this.$dialog.find('.title-id').text();\n obj.common.name = this.$dialog.find('.edit-object-name').val(); // no support of multilanguage if edited\n obj.type = this.$dialog.find('.edit-object-type').val();\n var err = saveObjectFields('.object-tab-common-table', obj.common);\n if (err) {\n this.main.showMessage(_('Cannot parse.'), _('Error in %s', err), 'error_outline');\n return false;\n }\n err = saveObjectFields('.object-tab-native-table', obj.native);\n if (err) {\n this.main.showMessage(_('Cannot parse.'), _('Error in %s', err), 'error_outline');\n return false;\n }\n obj.acl.object = 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-owner-read').prop('checked') ? 0x400 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-owner-write').prop('checked') ? 0x200 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-group-read').prop('checked') ? 0x40 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-group-write').prop('checked') ? 0x20 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-every-read').prop('checked') ? 0x4 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-every-write').prop('checked') ? 0x2 : 0;\n\n obj.acl.owner = this.$dialog.find('.object-tab-acl-owner').val();\n obj.acl.ownerGroup = this.$dialog.find('.object-tab-acl-group').val();\n\n if (obj.type === 'state') {\n obj.acl.state = 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-owner-read').prop('checked') ? 0x400 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-owner-write').prop('checked') ? 0x200 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-group-read').prop('checked') ? 0x40 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-group-write').prop('checked') ? 0x20 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-every-read').prop('checked') ? 0x4 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-every-write').prop('checked') ? 0x2 : 0;\n }\n\n if (this.iconVal !== null && this.iconVal !== undefined) {\n obj.common.icon = this.iconVal;\n }\n\n return obj;\n };\n\n this.saveFromRaw = function () {\n var obj;\n try {\n obj = JSON.parse(this.editor.getValue());\n } catch (e) {\n this.main.showMessage(e, _('Parse error'), 'error_outline');\n if (!that.main.noSelect) {\n this.$dialog.find('.tabs').mtabs('select', 'object-tab-raw');\n }\n return false;\n }\n return obj;\n };\n\n this.save = function () {\n if (this.main.config['object-edit-active'] === 'object-tab-raw') {\n var _obj = this.saveFromRaw();\n if (!_obj) return;\n\n this.main.socket.emit('setObject', _obj._id, _obj, function (err) {\n if (err) {\n that.main.showError(err);\n } else {\n var cb = that.$dialog.data('cb');\n if (cb) cb(_obj);\n that.$dialogSave.addClass('disabled');\n that.main.navigate();\n }\n });\n } else {\n var obj = that.saveFromTabs();\n if (!obj) return;\n this.main.socket.emit('getObject', obj._id, function (err, _obj) {\n if (err) {\n return that.main.showError(err);\n }\n\n _obj.common = obj.common;\n _obj.native = obj.native;\n _obj.acl = obj.acl;\n that.main.socket.emit('setObject', obj._id, _obj, function (err) {\n if (err) {\n that.main.showError(err);\n } else {\n var cb = that.$dialog.data('cb');\n if (cb) cb(obj);\n that.$dialogSave.addClass('disabled');\n that.main.navigate();\n }\n });\n });\n }\n };\n\n this.allStored = function () {\n return that.$dialogSave.hasClass('disabled');\n };\n\n}","function Enums(main) {\n 'use strict';\n\n // enum is first level like enum.function or enum.rooms\n // category is second level like enum.function.light or enum.room.living_room\n\n var that = this;\n\n this.main = main;\n this.list = [];\n this.$gridEnum = $('#tab-enums');\n this.$gridList = this.$gridEnum.find('.tab-enums-list');\n this.$grid = this.$gridEnum.find('.tab-enums-objects');\n this.updateTimers = null;\n this.editMode = false;\n this.isTiles = false;\n\n var tasks = [];\n var standardEnums = {\n 'enum.rooms': {\n \"_id\": \"enum.rooms\",\n \"common\": {\n \"icon\": \"home\",\n \"name\": {\n \"en\": \"Rooms\",\n \"cn\": \"场景\"\n },\n \"desc\": {\n \"en\": \"List of the rooms\",\n \"cn\": \"List of the rooms\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\"\n },\n 'enum.functions': {\n \"_id\": \"enum.functions\",\n \"common\": {\n \"icon\": \"lightbulb_outline\",\n \"name\": {\n \"en\": \"Functions\",\n \"cn\": \"功能\"\n },\n \"desc\": {\n \"en\": \"List of the functions\",\n \"cn\": \"List of the functions\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\"\n },\n 'enum.favorites': {\n \"_id\": \"enum.favorites\",\n \"common\": {\n \"icon\": \"favorite_border\",\n \"name\": {\n \"en\": \"Favorites\",\n \"cn\": \"收藏\"\n },\n \"desc\": {\n \"en\": \"List of favorites objects\",\n \"cn\": \"List of favorites objects\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n }\n };\n\n var standardGroups = {\n 'enum.rooms': {\n \"enum.rooms.living_room\": {\n \"_id\": \"enum.rooms.living_room\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ4MC4wNDYgNDgwLjA0NiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDgwLjA0NiA0ODAuMDQ2OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGc+PGc+PHBhdGggZD0iTTMyOC4wMzQsMzIwLjA0NmgtMjR2LTg4YzAtNC40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wLjIzLDE1My40MjUsNDc5Ljk1NCwxNTEuMTY2eiBNNDMyLjAzNCw0NDguMDQ2djE2aC02NHYtMTZINDMyLjAzNHogTTMzNi45OTQsMTQ0LjA0NmwxNC4yNC0xMjhoOTcuNmwxNC4yNCwxMjhIMzM2Ljk5NHoiLz48L2c+PC9nPjxnPjxnPjxwYXRoIGQ9Ik0yNzIuMDM0LDQ4LjA0NmgtNTIuNzJsLTQ1LjYtNDUuNjhjLTMuMTExLTMuMTM3LTguMTc3LTMuMTU4LTExLjMxNC0wLjA0NmMtMC4wMTYsMC4wMTUtMC4wMzEsMC4wMzEtMC4wNDYsMC4wNDZsLTQ1LjYsNDUuNjhoLTUyLjcyYy00LjQxOCwwLTgsMy41ODItOCw4djEyOGMwLDQuNDE4LDMuNTgyLDgsOCw4aDIwOGM0LjQxOCwwLDgtMy41ODIsOC04di0xMjhDMjgwLjAzNCw1MS42MjgsMjc2LjQ1Miw0OC4wNDYsMjcyLjAzNCw0OC4wNDZ6IE0xNjguMDM0LDE5LjMyNmwyOC43MiwyOC43MmgtNTcuNDRMMTY4LjAzNCwxOS4zMjZ6IE0yNjQuMDM0LDE3Ni4wNDZoLTE5MnYtMTEyaDE5MlYxNzYuMDQ2eiIvPjwvZz48L2c+PGc+PGc+PHBhdGggZD0iTTg4LjAzNCw4MC4wNDZ2ODBoMTYwdi04MEg4OC4wMzR6IE0yMzIuMDM0LDE0NC4wNDZoLTEyOHYtNDhoMTI4VjE0NC4wNDZ6Ii8+PC9nPjwvZz48L3N2Zz4=\",\n \"name\": {\n \"en\": \"Living room\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.rooms.sleeping_room\": {\n \"_id\": \"enum.rooms.sleeping_room\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5L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NMTEyLDE4NGMwLTguODM3LDcuMTYzLTE2LDE2LTE2aDY0YzguODM3LDAsMTYsNy4xNjMsMTYsMTYNCgkJcy03LjE2MywxNi0xNiwxNmgtNjRDMTE5LjE2MywyMDAsMTEyLDE5Mi44MzcsMTEyLDE4NHogTTI3MiwxODRjMC04LjgzNyw3LjE2My0xNiwxNi0xNmg2NGM4LjgzNywwLDE2LDcuMTYzLDE2LDE2DQoJCXMtNy4xNjMsMTYtMTYsMTZoLTY0QzI3OS4xNjMsMjAwLDI3MiwxOTIuODM3LDI3MiwxODR6IE05NiwzNzZINjR2LTMyaDMyVjM3NnogTTQxNiwzNzZoLTMydi0zMmgzMlYzNzZ6IE00NjQsMzI4SDE2di00OGg0NDhWMzI4DQoJCXoiLz4NCjwvZz4NCjxnPg0KCTxyZWN0IHg9IjQ4IiB5PSIxMjAiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIvPg0KPC9nPg0KPGc+DQoJPHJlY3QgeD0iNDE2IiB5PSIxMjAiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIvPg0KPC9nPg0KPGc+DQoJPHJlY3QgeD0iODAiIHk9IjEyMCIgd2lkdGg9IjMyMCIgaGVpZ2h0PSIxNiIvPg0KPC9nPg0KPGc+DQoJPHJlY3QgeD0iNDgiIHk9IjE1MiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjQwIi8+DQo8L2c+DQo8Zz4NCgk8cmVjdCB4PSI0MTYiIHk9IjE1MiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjQwIi8+DQo8L2c+DQoNCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Sleeping room\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.rooms.kitchen\": {\n \"_id\": \"enum.rooms.kitchen\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b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MuNTgyLTgsOC04czgsMy41ODIsOCw4UzM0MC40MTgsMTg0LDMzNiwxODR6Ii8+DQo8L2c+DQo8Zz4NCgkJPHBhdGggZD0iTTE3Niw4OFY0OGMwLTQuNDE4LTMuNTgyLTgtOC04aC04VjE2YzAtNC40MTgtMy41ODItOC04LThINDBjLTQuNDE4LDAtOCwzLjU4Mi04LDh2MjRoLThjLTQuNDE4LDAtOCwzLjU4Mi04LDh2NDBIMHYzODQNCgkJCWgyMDhWMjY0aDIwOHYyMDhoNjRWODhIMTc2eiBNNDgsMjRoOTZ2MTZINDhWMjR6IE0zMiw1NmgxMjh2MzJIMzJWNTZ6IE0xOTIsNDU2SDE2VjIwMGgxNzZWNDU2eiBNMTkyLDE4NEgxNnYtODBoMTc2VjE4NHoNCgkJCSBNNDY0LDQ1NmgtMzJWMjY0aDMyVjQ1NnogTTQ2NCwyNDhIMjA4VjEwNGgyNTZWMjQ4eiIvPg0KPC9nPg0KPGc+DQoJCTxyZWN0IHg9IjgwIiB5PSIxMzYiIHdpZHRoPSI0OCIgaGVpZ2h0PSIxNiIvPg0KPC9nPg0KPGc+DQoJCTxwYXRoIGQ9Ik0xNTIsMjE2Yy0xMy4yNTUsMC0yNCwxMC43NDUtMjQsMjRzMTAuNzQ1LDI0LDI0LDI0czI0LTEwLjc0NSwyNC0yNFMxNjUuMjU1LDIxNiwxNTIsMjE2eiBNMTUyLDI0OGMtNC40MTgsMC04LTMuNTgyLTgtOA0KCQkJczMuNTgyLTgsOC04czgsMy41ODIsOCw4UzE1Ni40MTgsMjQ4LDE1MiwyNDh6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==\",\n \"name\": {\n \"en\": \"Office\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.rooms.nursery\": {\n \"_id\": \"enum.rooms.nursery\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPC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LTMuODAzLTIuNDIzLTguMjExLTMuNzI2LTEyLjcyLTMuNzZjLTEzLjI1NSwwLTI0LDEwLjc0NS0yNCwyNGMwLDEzLjI1NSwxMC43NDUsMjQsMjQsMjQNCgkJczI0LTEwLjc0NSwyNC0yNGMtMC4wMTUtMi43MjMtMC40NzUtNS40MjUtMS4zNi04YzE5Ljg1NS0xNC41NjUsNDYuODY1LTE0LjU2NSw2Ni43MiwwYy0wLjg4NSwyLjU3NS0xLjM0NSw1LjI3Ny0xLjM2LDgNCgkJYzAsMTMuMjU1LDEwLjc0NSwyNCwyNCwyNHMyNC0xMC43NDUsMjQtMjRDMzIwLDYxLjQ2NSwzMDkuMjU1LDUwLjcyLDI5Niw1MC43MnogTTE4NCw4Mi43MmMtNC40MTgsMC04LTMuNTgyLTgtOA0KCQljMC00LjQxOCwzLjU4Mi04LDgtOHM4LDMuNTgyLDgsOEMxOTIsNzkuMTM4LDE4OC40MTgsODIuNzIsMTg0LDgyLjcyeiBNMjk2LDgyLjcyYy00LjQxOCwwLTgtMy41ODItOC04YzAtNC40MTgsMy41ODItOCw4LTgNCgkJczgsMy41ODIsOCw4QzMwNCw3OS4xMzgsMzAwLjQxOCw4Mi43MiwyOTYsODIuNzJ6Ii8+DQo8L2c+DQoNCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Nursery\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.rooms.wc\": {\n \"_id\": \"enum.rooms.wc\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB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HoiIGZpbGw9IiMwMDAwMDAiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGQ9Ik0yNDguMDA3LDQzLjA2NHY3Ni45NDRoNjRWNzUuMDY0TDI0OC4wMDcsNDMuMDY0eiBNMjk2LjAwNywxMDQuMDA4aC0zMlY2OC45NTJsMzIsMTZWMTA0LjAwOHoiIGZpbGw9IiMwMDAwMDAiLz4KCTwvZz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K\",\n \"name\": {\n \"en\": \"Garage\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n }\n\n\n // todo\n //\n },\n 'enum.functions': {\n \"enum.functions.light\": {\n \"_id\": \"enum.functions.light\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgJy0vL1czQy8vRFREIFNWRyAxLjEvL0VOJyAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIj4KICA8Zz4KICAgIDxnPgogICAgICA8cGF0aCBkPSJtMjU2LDkyLjNjLTc0LjIsMC0xMjc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c1LjEsODcuMSAxMTEuNiwxMjIuMiAxMjYuNSwxMDcuMyAgICIvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==\",\n \"name\": {\n \"en\": \"Light\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.blinds\": {\n \"_id\": \"enum.functions.blinds\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTEyIDUxMjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJCTxwYXRoIGQ9Ik0wLDB2NTEyaDUxMlYwSDB6IE00ODIsNDgySDMwVjMwaDQ1MlY0ODJ6Ii8+DQo8L2c+DQo8Zz4NCgkJPHBhdGggZD0iTTYwLDYwdjM5MmgzOTJWNjBINjB6IE0yNDEsNDIySDkwVjI3MWgxNTFWNDIyeiBNMjQxLDI0MUg5MFY5MGgxNTFWMjQxeiBNNDIyLDQyMkgyNzFWMjcxaDE1MVY0MjJ6IE00MjIsMjQxSDI3MVY5MGgxNTENCgkJCVYyNDF6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==\",\n \"name\": {\n \"en\": \"Blinds\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.weather\": {\n \"_id\": \"enum.functions.weather\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktM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jcyMSwyOC45NjcsNTMuODU2LDI5LDU0LDI5aDBoMGMwLjEyMywwLDAuMjQ1LTAuMDI3LDAuMzYxLTAuMDczDQoJYzAuMDQ1LTAuMDE4LDAuMDgyLTAuMDQ3LDAuMTI0LTAuMDcxYzAuMDUxLTAuMDI5LDAuMTA2LTAuMDQ4LDAuMTUyLTAuMDg3YzAuMDEyLTAuMDEsMC4wMTctMC4wMjQsMC4wMjgtMC4wMzUNCgljMC4wNTQtMC4wNDksMC4wOTItMC4xMDcsMC4xMzUtMC4xNjdjMC4wMzQtMC4wNDgsMC4wNzMtMC4wOTMsMC4wOTgtMC4xNDVDNTQuOTI0LDI4LjM2OSw1NC45MzQsMjguMzEsNTQuOTQ5LDI4LjI1MXogTTQ4LDI0DQoJYy0yLjIxOCwwLTQuMzEyLDAuODk1LTYsMi41MzRDNDAuMzEyLDI0Ljg5NSwzOC4yMTgsMjQsMzYsMjRzLTQuMzEyLDAuODk1LTYsMi41MzRDMjguMzEyLDI0Ljg5NSwyNi4yMTgsMjQsMjQsMjQNCglzLTQuMzEyLDAuODk1LTYsMi41MzRDMTYuMzEyLDI0Ljg5NSwxNC4yMTgsMjQsMTIsMjRjLTEuNzUsMC0zLjQxOCwwLjU2Ni00Ljg3NSwxLjYwNUM4LjMyNywxNC4wNDQsMTguMTI3LDUsMzAsNQ0KCXMyMS42NzMsOS4wNDQsMjIuODc1LDIwLjYwNUM1MS40MTgsMjQuNTY2LDQ5Ljc1LDI0LDQ4LDI0eiIvPg0KPC9zdmc+DQo=\",\n \"name\": {\n \"en\": \"Weather\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.heating\": {\n \"_id\": \"enum.functions.heating\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8v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I4LDguNTMyLTguNTMyLDguNTMyaC0yNC4wNDljLTQuNzA1LDAtOC41MzItMy44MjgtOC41MzItOC41MzJWMTk5Ljg5YzAtNC4xNDItMy4zNTgtNy41LTcuNS03LjUNCgkJYy00LjE0MiwwLTcuNSwzLjM1OC03LjUsNy41djE1Mi44MmgtMTcuMDY0VjE1OS4yOTFoMTcuMDY0djguNTMzYzAsNC4xNDIsMy4zNTgsNy41LDcuNSw3LjVjNC4xNDIsMCw3LjUtMy4zNTgsNy41LTcuNXYtNjQuMTMNCgkJYzAtNC43MDUsMy44MjgtOC41MzIsOC41MzItOC41MzJoMjQuMDQ5YzQuNzA1LDAsOC41MzIsMy44MjgsOC41MzIsOC41MzJWNDA4LjMwN3oiLz4NCjwvZz4NCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Heating\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.backlight\": {\n \"_id\": \"enum.functions.backlight\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTExLjk5MSA1MTEuOTkxIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTEuOTkxIDUxMS45OTE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik05MS40OSwzMzYuNTcybC0yMS4zMzMsNDIuNjY3Yy0yLjYyNCw1LjI2OS0wLjQ5MSwxMS42NjksNC43NzksMTQuMzE1YzEuNTM2LDAuNzQ3LDMuMTU3LDEuMTA5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AuMTEydi05Ny4yNTljMC00LjYwOCwyLjkyMy04LjY2MSw3LjI5Ni0xMC4xMTINCgkJbDM1LjM3MS0xMS43OTdWMzQ3Ljg3OHoiLz4NCjwvZz4NCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Backlight\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.household\": {\n \"_id\": \"enum.functions.household\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgJy0vL1czQy8vRFREIFNWRyAxLjEvL0VOJyAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIj4KICA8Zz4KICAgIDxnPgogICAgICA8cGF0aCBkPSJtMjU2LDkyLjNjLTc0LjIsMC0xMjcuOCw1NS4zLTEzNi4zLDExNC43LTUuMywzOS42IDcuNSw3OC4yIDM0LjEsMTA3LjQgMjMuNCwyNSAzNi4yLDU4LjQgMzYuMiw5Mi44bC0uMSw1NC4yYzAsMjEuOSAxOC4xLDM5LjYgNDAuNSwzOS42aDUyLjJjMjIuNCwwIDQwLjUtMTcuNyA0MC41LTM5LjZsLjEtNTQuMmMwLTM1LjQgMTEuNy02Ny44IDM0LjEtOTAuNyAyNC41LTI1IDM3LjMtNTcuMyAzNy4zLTkwLjctMC4xLTc0LjEtNjMtMTMzLjUtMTM4LjYtMTMzLjV6bTQ2LjgsMzY5LjFjMCwxMC40LTguNSwxOC44LTE5LjIsMTguOGgtNTIuMmMtMTAuNywwLTE5LjItOC4zLTE5LjItMTguOHYtMjRoOTAuNXYyNHptMzkuNi0xNTkuNWMtMjYuNiwyNy4xLTQwLjUsNjQuNi00MC41LDEwNS4zdjkuNGgtOTAuNXYtOS40YzAtMzguNi0xNi03Ny4xLTQyLjYtMTA2LjMtMjMuNC0yNS0zMy01Ny4zLTI4LjgtOTAuNyA3LjUtNTAgNTQtOTcgMTE2LjEtOTcgNjUsMCAxMTcuMiw1MS4xIDExNy4yLDExMi42IDAsMjguMS0xMC43LDU1LjItMzAuOSw3Ni4xeiIvPgogICAgICA8cmVjdCB3aWR0aD0iMjEuMyIgeD0iMjQ1LjMiIHk9IjExIiBoZWlnaHQ9IjUwIi8+CiAgICAgIDxwb2x5Z29uIHBvaW50cz0iMzg1LjEsMTA3LjQgNDAwLDEyMi4zIDQzNi41LDg3LjIgNDIxLjUsNzIuMyAgICIvPgogICAgICA8cmVjdCB3aWR0aD0iNTIuMiIgeD0iNDQ4LjgiIHk9IjIzNi4yIiBoZWlnaHQ9IjIwLjkiLz4KICAgICAgPHJlY3Qgd2lkdGg9IjUyLjIiIHg9IjExIiB5PSIyMzYuMiIgaGVpZ2h0PSIyMC45Ii8+CiAgICAgIDxwb2x5Z29uIHBvaW50cz0iOTAuMSw3Mi4yIDc1LjEsODcuMSAxMTEuNiwxMjIuMiAxMjYuNSwxMDcuMyAgICIvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==\",\n \"name\": {\n \"en\": \"Household\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.audio\": {\n \"_id\": \"enum.functions.audio\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3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jMtNTEuOC0zNS42YzAtMTkuMywyMy43LTM1LjYsNTEuOC0zNS42DQoJCXM1MS44LDE2LjMsNTEuOCwzNS42QzE1My45NTgsNDM0LjAxNiwxMzAuMjU4LDQ1MC4yMTYsMTAyLjE1OCw0NTAuMjE2eiBNMTgwLjk1OCwxNzMuNDE2di02My40bDI0NS45LTc4LjF2NjMuNEwxODAuOTU4LDE3My40MTZ6DQoJCSBNMzc1LjE1OCwzNjMuMTE2Yy0yOC4xLDAtNTEuOC0xNi4zLTUxLjgtMzUuNmMwLTE5LjMsMjMuNy0zNS42LDUxLjgtMzUuNnM1MS44LDE2LjMsNTEuOCwzNS42DQoJCUM0MjYuODU4LDM0Ni44MTYsNDAzLjE1OCwzNjMuMTE2LDM3NS4xNTgsMzYzLjExNnoiLz4NCjwvZz4NCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Audio/Music\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.security\": {\n \"_id\": \"enum.functions.security\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTEyIDUxMjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTI1Niw0MC4wMWMtNS41MzgsMC05Ljk5LDQuNDYtOS45OSw5Ljk5YzAsNS4xNDcsMy44NzIsOS40Myw4Ljk5LDkuOTM4YzUuOTI1LDAuNTg4LDEwLj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wyNzQuNTk4LDI5NC41OTgsMzA2LDI1NiwzMDZ6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMzAzLjA3MSwyMDguOTI4Yy0zLjkwNi0zLjkwNC0xMC4yMzYtMy45MDQtMTQuMTQzLDBMMjQ2LDI1MS44NTdsLTEyLjkyOS0xMi45MjhjLTMuOTA2LTMuOTA0LTEwLjIzNi0zLjkwNC0xNC4xNDMsMA0KCQljLTMuOTA1LDMuOTA1LTMuOTA1LDEwLjIzNywwLDE0LjE0M2wyMCwyMEMyNDAuODgyLDI3NS4wMjMsMjQzLjQ0LDI3NiwyNDYsMjc2czUuMTE4LTAuOTc3LDcuMDcxLTIuOTI5bDUwLTUwDQoJCUMzMDYuOTc2LDIxOS4xNjYsMzA2Ljk3NiwyMTIuODM0LDMwMy4wNzEsMjA4LjkyOHoiLz4NCjwvZz4NCg0KPC9zdmc+DQo=\",\n \"name\": {\n \"en\": \"Security\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n }\n // todo\n }\n };\n\n var selectId = function () {\n if (!that.$grid || !that.$grid.selectId) return;\n selectId = that.$grid.selectId.bind(that.$grid);\n return that.$grid.selectId.apply(that.$grid, arguments);\n };\n\n function enumRename(oldId, newId, newCommon, callback) {\n if (tasks.length) {\n var task = tasks.shift();\n if (task.name === 'delObject') {\n that.main.socket.emit(task.name, task.id, function () {\n setTimeout(function () {\n enumRename(undefined, undefined, undefined, callback);\n }, 0);\n });\n } else {\n that.main.socket.emit(task.name, task.id, task.obj, function () {\n setTimeout(function () {\n enumRename(undefined, undefined, undefined, callback);\n }, 0);\n });\n }\n } else {\n _enumRename(oldId, newId, newCommon, function () {\n if (tasks.length) {\n enumRename(undefined, undefined, undefined, callback);\n } else {\n if (callback) callback();\n }\n });\n }\n }\n\n function _enumRename(oldId, newId, newCommon, callback) {\n //Check if this name exists\n if (oldId !== newId && that.main.objects[newId]) {\n showMessage(_('Name yet exists!'), true);\n that.init(true);\n if (callback) callback();\n } else {\n if (oldId === newId) {\n if (newCommon && (newCommon.name !== undefined || newCommon.icon !== undefined || newCommon.color !== undefined)) {\n tasks.push({name: 'extendObject', id: oldId, obj: {common: newCommon}});\n }\n if (callback) callback();\n } else if (that.main.objects[oldId] && that.main.objects[oldId].common && that.main.objects[oldId].common.nondeletable) {\n showMessage(_('Change of enum\\'s id \"%s\" is not allowed!', oldId), true);\n that.init(true);\n if (callback) callback();\n } else {\n var len = oldId.length + 1;\n var children = [];\n for (var e = 0; e < that.list.length; e++) {\n if (that.list[e].substring(0, len) === oldId + '.') {\n children.push(that.list[e]);\n }\n }\n\n that.main.socket.emit('getObject', oldId, function (err, obj) {\n setTimeout(function () {\n if (obj) {\n obj._id = newId;\n if (obj._rev) delete obj._rev;\n if (newCommon && newCommon.name !== undefined) obj.common.name = newCommon.name;\n if (newCommon && newCommon.icon !== undefined) obj.common.icon = newCommon.icon;\n if (newCommon && newCommon.color !== undefined) obj.common.color = newCommon.color;\n tasks.push({name: 'delObject', id: oldId});\n tasks.push({name: 'setObject', id: newId, obj: obj});\n // Rename all children\n var count = 0;\n for (var i = 0; i < children.length; i++) {\n var n = children[i].replace(oldId + '.', newId + '.');\n count++;\n _enumRename(children[i], n, null, function () {\n if (!--count && callback) callback();\n });\n }\n if (!children.length && callback) {\n callback();\n }\n }\n }, 0);\n });\n }\n }\n }\n\n function enumAddChild(parent, newId, common, callback) {\n if (that.main.objects[newId]) {\n showMessage(_('Name yet exists!'), true);\n return false;\n }\n\n that.main.socket.emit('setObject', newId, {\n _id: newId,\n common: {\n name: common.name,\n members: [],\n icon: common.icon,\n color: common.color\n },\n type: 'enum'\n }, callback);\n return true;\n }\n\n function prepareNewEnum(parent) {\n var text = '';\n var id;\n if (parent) {\n var name = parent.replace(/[.#\\\\\\/&?]+/g, '-');\n\n if (standardGroups[parent]) {\n for (id in standardGroups[parent]) {\n if (standardGroups[parent].hasOwnProperty(id) && that.list.indexOf(id) === -1) {\n text += '
  • ' + that.main.getIconFromObj(standardGroups[parent][id]) + getName(standardGroups[parent][id]) + '
  • ';\n }\n }\n }\n if (text) {\n text += '
  • ';\n }\n text += '
  • control_point' + _('custom group') + '
  • ';\n\n that.$gridEnum.find('#btn-new-group-' + name).html(text);\n that.$gridEnum.find('.btn-new-group-btn[data-target=\"btn-new-group-' + name + '\"]').dropdown({\n constrainWidth: false\n });\n that.$gridEnum.find('#btn-new-group-' + name).find('.new-group-item').off('click').on('click', function () {\n var id = $(this).data('id');\n var parent = $(this).data('enum');\n if (!id) {\n createOrEditEnum(null, parent);\n } else {\n var name = parent.replace(/[.#\\\\\\/&?]+/g, '-');\n that.main.saveConfig('enums-active', 'enum-' + name);\n that.main.socket.emit('setObject', id, standardGroups[parent][id], function (err) {\n if (err) {\n that.main.showError(err);\n }\n });\n }\n });\n } else {\n for (id in standardEnums) {\n if (standardEnums.hasOwnProperty(id) && that.list.indexOf(id) === -1) {\n text += '
  • ' + that.main.getIconFromObj(standardEnums[id]) + getName(standardEnums[id]) + '
  • ';\n }\n }\n\n if (text) {\n text += '
  • ';\n }\n text += '
  • control_point' + _('custom enum') + '
  • ';\n that.$gridEnum.find('#btn-new-enum').html(text);\n that.$gridEnum.find('.btn-new-enum-btn').dropdown({\n constrainWidth: false\n });\n that.$gridEnum.find('.new-enum-item').off('click').on('click', function () {\n var id = $(this).data('id');\n if (!id) {\n createOrEditEnum(null);\n } else {\n var name = id.replace(/[.#\\\\\\/&?]+/g, '-');\n that.main.saveConfig('enums-active', 'enum-' + name);\n that.main.socket.emit('setObject', id, standardEnums[id], function (err) {\n if (err) {\n that.main.showError(err);\n }\n });\n }\n });\n }\n }\n\n this.prepare = function () {\n this.isTiles = (this.main.config.enumIsTiles !== undefined && this.main.config.enumIsTiles !== null) ? this.main.config.enumIsTiles : true;\n };\n\n function getName(objects, id) {\n var name;\n if (!id) {\n name = objects;\n } else {\n name = objects[id];\n }\n if (name && name.common && name.common.name) {\n name = translateName(name.common.name);\n } else {\n var parts = id.split('.');\n name = parts.pop();\n name = name[0].toUpperCase() + name.substring(1).toLowerCase();\n }\n return name;\n }\n\n function drawChip(id, group) {\n var text = '';\n text += '
    ' +\n that.main.getIcon(id) +\n '' +\n '' + getName(that.main.objects, id) + '' +\n// '' + id + '' +\n '' +\n 'close' +\n '
    ';\n return text;\n }\n\n function drawEnum(id, $page, scrollTop) {\n var obj = that.main.objects[id];\n var name = id.replace(/[.#\\\\\\/&?]+/g, '-');\n var text =\n '
    ' +\n '
    ' +\n ' library_add' +\n '
      ' +\n ' ' +\n ' edit' +\n ' ' +\n ' ' +\n ' delete' +\n ' ' +\n '
      \\n' +\n ' clear
      \\n' +\n '
      ' +\n '
      ';\n\n text += '
        ';\n\n for (var se = 0; se < that.list.length; se++) {\n if (that.list[se].substring(0, id.length + 1) === id + '.') {\n var en = that.main.objects[that.list[se]];\n var inverted;\n var style = '';\n if (en && en.common && en.common.color) {\n style = 'background: ' + en.common.color + '; ';\n if (that.main.invertColor(en.common.color)) {\n inverted = true;\n style += 'color: white;';\n }\n }\n\n text += '
      • ' +\n that.main.getIcon(that.list[se], null, null, 'icon') +\n '' + getName(that.main.objects, that.list[se]) + '' +\n '

        ' + that.list[se] + '


        ';\n\n if (en && en.common && en.common.members && en.common.members.length) {\n for (var m = 0; m < en.common.members.length; m++) {\n text += drawChip(en.common.members[m], that.list[se]);\n }\n }\n text += 'edit';\n text += 'delete';\n text += '
      • ';\n }\n }\n text += '
      ';\n $page.html(text);\n prepareNewEnum(id);\n scrollTop && $page.find('.enum-collection').scrollTop(scrollTop);\n initFilter(id);\n }\n function applyFilter(id, filter) {\n var $tiles = that.$gridList.find('.enum-collection[data-id=\"' + id + '\"] .collection-item');\n if (!filter) {\n $tiles.show();\n } else {\n filter = filter.toLowerCase();\n $tiles.each(function () {\n var $this = $(this);\n var eid = $this.data('id');\n var name = getName(that.main.objects, eid);\n if (name.toLowerCase().indexOf(filter) !== -1) {\n $this.show();\n } else {\n if (eid.substring(id.length).toLowerCase().indexOf(filter) !== -1) {\n $this.show();\n } else {\n $this.hide();\n }\n }\n });\n }\n }\n\n function initFilter(id) {\n var $filter = that.$gridList.find('.enum-buttons[data-id=\"' + id + '\"] .filter-input');\n var data = {};\n for (var se = 0; se < that.list.length; se++) {\n var eid = that.list[se];\n if (eid.substring(0, id.length + 1) === id + '.') {\n var name = getName(that.main.objects, eid);\n var icon = null;\n if (that.main.objects[eid] &&\n that.main.objects[eid].common &&\n that.main.objects[eid].common.icon) {\n icon = that.main.objects[eid].common.icon;\n }\n\n data[name] = icon;\n }\n }\n var $btn = that.$gridList.find('.enum-buttons[data-id=\"' + id + '\"] .filter-clear');\n $filter.mautocomplete({\n data: data,\n minLength: 0,\n limit: 10\n }).on('change', function () {\n var val = $(this).val();\n applyFilter(id, val);\n if ($(this).val()) {\n $btn.show();\n } else {\n $btn.hide();\n }\n that.main.saveConfig('filter-' + id, val);\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n $btn.off('click').on('click', function () {\n $filter.val('').trigger('change');\n });\n if (that.main.config['filter-' + id]) {\n $filter.val(that.main.config['filter-' + id]).trigger('change');\n } else {\n $btn.hide();\n }\n }\n\n function drawEnumsTiles() {\n var $tableBody = that.$gridList.find('.tree-table-body');\n that.$gridList.removeClass('tree-table-list').addClass('tree-table-tiles');\n that.$gridList.find('.tree-table-buttons').remove();\n\n // create buttons for panels\n that.$gridList.prepend('
      \\n' +\n ' view_list\\n' +\n ' note_add\\n' +\n '
        \\n' +\n ' \\n' +\n ' queue_play_next\\n' +\n ' \\n' +\n '
        ');\n\n\n var text = '
        ';\n text += '
          ';\n var parts;\n for (var e = 0; e < that.list.length; e++) {\n parts = that.list[e].split('.');\n if (parts.length !== 2) continue;\n var name = getName(that.main.objects, that.list[e]);\n text += '
        • ' + that.main.getIcon(that.list[e]) + '' + name + '
        • ';\n }\n text += '
        ';\n text += '
        ';\n for (var se = 0; se < that.list.length; se++) {\n parts = that.list[se].split('.');\n if (parts.length !== 2) continue;\n\n text += '
        ';\n text += '
        ';\n }\n var scrollTop = {};\n $tableBody.find('.enum-collection').each(function () {\n // remember actual offset\n scrollTop[$(this).data('id')] = $(this).scrollTop();\n });\n\n // destroy droppable\n try {\n var $items = that.$gridEnum.find('.tree-table-body .collection').find('.collection-item');\n try {\n if ($items.droppable('instance')) {\n $items.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n } catch (e) {\n\n }\n\n $tableBody.html(text);\n\n if ($tableBody.find('.tabs li').length > 0) {\n $tableBody.find('.tabs').mtabs({\n onShow: function (tab) {\n that.main.saveConfig('enums-active', $(tab).attr('id'));\n }\n });\n if (that.main.config['enums-active'] && !that.main.noSelect) {\n $tableBody.find('.tabs').mtabs('select', that.main.config['enums-active']);\n }\n }\n\n\n $tableBody.find('.page').each(function () {\n drawEnum($(this).data('id'), $(this), scrollTop[$(this).data('id')]);\n });\n $tableBody.find('.btn-new-category').on('click', function () {\n createOrEditEnum(null, $(this).data('id'));\n });\n $tableBody.find('.btn-edit-category').on('click', function () {\n createOrEditEnum($(this).data('id'));\n });\n $tableBody.find('.btn-del-category').on('click', function () {\n deleteEnum($(this).data('id'));\n });\n $tableBody.find('.edit-content').on('click', function () {\n createOrEditEnum($(this).data('id'));\n });\n $tableBody.find('.delete-content').on('click', function () {\n deleteEnum($(this).data('id'));\n });\n $tableBody.find('.close').on('click', function () {\n removeMember($(this).data('id'), $(this).data('enum'));\n });\n\n that.$gridList.find('.btn-edit').off('click').on('click', function () {\n switchEditMode(!that.editMode);\n });\n\n that.$gridList.find('.btn-switch-tiles').off('click').on('click', function () {\n that.isTiles = false;\n that.main.saveConfig('enumIsTiles', that.isTiles);\n\n setTimeout(function () {\n drawEnumsTable();\n }, 50);\n });\n prepareNewEnum();\n\n var $collection = that.$gridEnum.find('.tree-table-body .collection');\n setupDroppableTiles($collection);\n }\n\n function drawEnumsTable() {\n try {\n var $items = that.$gridEnum.find('.tree-table-main').find('tbody>tr.treetable-enum');\n if ($items.droppable('instance')) {\n $items.droppable('destroy');\n }\n } catch (e) {\n console.log(e);\n }\n // extract all enums\n that.$gridList.html('').removeClass('tree-table-tiles').addClass('tree-table-list');\n\n that.$gridList.treeTable({\n objects: that.main.objects,\n root: 'enum',\n columns: ['title', 'name'],\n members: true,\n colors: true,\n icons: true,\n widths: ['calc(100% - 250px)', '250px'],\n //classes: ['', 'treetable-center'],\n name: 'enums',\n buttonsWidth: '40px',\n buttons: [\n {\n text: false,\n icons: {\n primary:'ui-icon-trash'\n },\n click: function (id, children, parent) {\n if (that.main.objects[id]) {\n if (that.main.objects[id].type === 'enum') {\n if (children) {\n // ask if only object must be deleted or just this one\n that.main.confirmMessage(_('All sub-enums of %s will be deleted too?', id), null, 'help', function (result) {\n // If all\n if (result) {\n that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } // else do nothing\n });\n } else {\n that.main.confirmMessage(_('Are you sure to delete %s?', id), null, 'help', function (result) {\n // If all\n if (result) that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n });\n }\n } else {\n removeMember(id, parent);\n }\n } else {\n if (that.main.objects[parent] && that.main.objects[parent].type === 'enum') {\n removeMember(id, parent);\n } else {\n showMessage(_('Object \"%s\" does not exists. Update the page.', id));\n }\n }\n },\n width: 26,\n height: 20\n }, {\n text: false,\n icons: {\n primary:'ui-icon-pencil'\n },\n match: function (id) {\n return that.main.objects[id] && that.main.objects[id].type === 'enum';\n },\n click: function (id, children, parent) {\n createOrEditEnum(id);\n },\n width: 26,\n height: 20\n }\n ],\n panelButtons: [\n {\n id: 'tab-enums-btn-switch-tiles',\n title: _('change view mode'),\n icon: 'view_module',\n click: function () {\n that.isTiles = true;\n that.main.saveConfig('enumIsTiles', that.isTiles);\n setTimeout(function () {\n drawEnumsTiles();\n }, 50);\n }\n },\n {\n id: 'tab-enums-list-new-enum',\n title: _('New enum'),\n icon: 'note_add',\n click: function () {\n createOrEditEnum(null);\n }\n },\n {\n id: 'tab-enums-list-new-category',\n title: _('New category'),\n icon: 'library_add',\n click: function () {\n createOrEditEnum(null, that.enumEdit);\n }\n },\n {\n id: 'tab-enums-list-edit',\n title: _('Edit'),\n icon: 'edit',\n click: function () {\n switchEditMode(!that.editMode);\n }\n }\n ],\n onChange: function (id, oldId) {\n if (id !== oldId) {\n that.enumEdit = id;\n var obj = that.main.objects[id];\n if (obj && obj.type === 'enum') {\n $('#tab-enums-list-new-enum').removeClass('disabled').attr('title', _('Create new enum, like %s', 'enum.newCategory'));\n var parts = id.split('.');\n if (parts.length === 2) {\n that.$gridList.find('#tab-enums-list-new-category').removeClass('disabled').attr('title', _('Create new category, like %s', id + '.newEnum'));\n } else {\n that.$gridList.find('#tab-enums-list-new-category').addClass('disabled');\n }\n } else {\n that.$gridList.find('#tab-enums-list-new-enum').addClass('disabled');\n that.$gridList.find('#tab-enums-list-new-category').addClass('disabled');\n }\n }\n },\n onReady: setupDroppableTable\n });//.treeTable('show', currentEnum);\n that.$gridList.find('.tree-table-buttons a').addClass('btn-small');\n that.$gridList.find('#tab-enums-list-new-enum').addClass('disabled');\n that.$gridList.find('#tab-enums-list-new-category').addClass('disabled');\n }\n\n function getEnumsChildren(id) {\n var parts = id.split('.');\n var items = [];\n var regex = new RegExp('^' + id.replace(/\\./g, '\\\\.') + '\\\\.');\n for (var se = 0; se < that.list.length; se++) {\n var _parts = that.list[se].split('.');\n if (_parts.length === parts.length + 1 && regex.test(that.list[se])) {\n items.push(that.list[se]);\n }\n }\n return items;\n }\n \n function deleteEnum(id) {\n if (that.main.objects[id].type === 'enum') {\n var children = getEnumsChildren(id);\n \n if (children && children.length) {\n // ask if only object must be deleted or just this one\n that.main.confirmMessage(_('All sub-enums of %s will be deleted too?', id), null, 'help', function (result) {\n // If all\n if (result) {\n that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } // else do nothing\n });\n } else {\n that.main.confirmMessage(_('Are you sure to delete %s?', id), null, 'help', function (result) {\n // If all\n if (result) that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n });\n }\n }\n }\n \n function removeMember(id, parent) {\n that.main.socket.emit('getObject', parent, function (err, obj) {\n if (obj && obj.common && obj.common.members) {\n var pos = obj.common.members.indexOf(id);\n if (pos !== -1) {\n obj.common.members.splice(pos, 1);\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n if (!err) {\n showMessage(_('Removed'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } else {\n showMessage(_('%s is not in the list'));\n }\n }\n });\n }\n\n function addMember(id, parent) {\n that.main.socket.emit('getObject', parent, function (err, obj) {\n if (obj && obj.common) {\n obj.common.members = obj.common.members || [];\n var pos = obj.common.members.indexOf(id);\n if (pos === -1) {\n obj.common.members.push(id);\n obj.common.members.sort();\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n if (!err) {\n showMessage(_('%s added to %s', id, obj._id));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } else {\n showMessage(_('Is yet in the list'));\n }\n }\n });\n }\n \n function showMessage(text, duration, isError) {\n if (typeof duration === 'boolean') {\n isError = duration;\n duration = 3000;\n }\n that.main.showToast(that.$gridEnum.find('.tree-table-buttons'), text, null, duration, isError);\n }\n\n function setupDraggable() {\n var $trs = that.$gridEnum.find('.fancytree-container>tbody');\n try {\n if ($trs.sortable('instance')) {\n $trs.sortable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n\n that.$gridEnum.find('.fancytree-container>tbody')\n .sortable({\n connectWith: '#tab-enums .tab-enums-list .tree-table-main.treetable',\n items: '.fancytree-type-draggable',\n appendTo: that.$gridEnum,\n refreshPositions: true,\n helper: function (e, $target) {\n return $('
        ' + $target.find('.fancytree-title').text() + '
        ');\n },\n zIndex: 999990,\n revert: false,\n scroll: false,\n start: function (e, ui) {\n var $prev = ui.item.prev();\n // place this item back where it was\n ui.item.data('prev', $prev);\n that.$gridEnum.addClass('dragging');\n },\n stop: function (e, ui) {\n that.$gridEnum.removeClass('dragging');\n },\n update: function (event, ui) {\n // place this item back where it was\n var $prev = ui.item.data('prev');\n if (!$prev || !$prev.length) {\n $(this).prepend(ui.item);\n } else {\n $($prev).after(ui.item);\n }\n }\n })\n .disableSelection();\n }\n\n this._initObjectTree = function () {\n var settings = {\n objects: main.objects,\n noDialog: true,\n draggable: ['device', 'channel', 'state'],\n name: 'enum-objects',\n expertModeRegEx: /^system\\.|^yunkong2\\.|^_|^[\\w-]+$|^enum\\.|^[\\w-]+\\.admin|^script\\./,\n texts: {\n select: _('Select'),\n cancel: _('Cancel'),\n all: _('All'),\n id: _('ID'),\n ID: _('ID'),\n name: _('Name'),\n role: _('Role'),\n room: _('Room'),\n 'function': _('Function'),\n value: _('Value'),\n type: _('Type'),\n selectid: _('Select ID'),\n from: _('From'),\n lc: _('Last changed'),\n ts: _('Time stamp'),\n wait: _('Processing...'),\n ack: _('Acknowledged'),\n edit: _('Edit'),\n push: _('Trigger event'),\n ok: _('Ok'),\n with: _('With'),\n without: _('Without'),\n copyToClipboard: _('Copy to clipboard'),\n expertMode: _('Toggle expert mode'),\n refresh:\t_('Update'),\n sort: _('Sort alphabetically'),\n button: _('Settings'),\n noData: _('No data')\n },\n filter: {\n type: 'state'\n },\n columns: ['ID', 'name', 'type', 'role']\n };\n\n selectId('init', settings)\n .selectId('show');\n\n setupDraggable();\n };\n\n function setupDroppableTable($treetable) {\n if (!that.editMode) return;\n\n if (!$treetable) {\n $treetable = that.$gridEnum.find('.tree-table-main');\n }\n\n $treetable.find('tbody>tr.treetable-enum').droppable({\n accept: '.fancytree-type-draggable',\n over: function (e, ui) {\n $(this).addClass('tab-accept-item');\n if ($(this).hasClass('not-empty') && !$(this).hasClass('expanded')) {\n var id = $(this).data('tt-id');\n var timer;\n if ((timer = $(this).data('timer'))) {\n clearTimeout(timer);\n }\n $(this).data('timer', setTimeout(function () {\n that.$gridList.treeTable('expand', $(this).data('tt-id'));\n }, 1000));\n }\n },\n out: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n var timer;\n if ((timer = $(this).data('timer'))) {\n clearTimeout(timer);\n $(this).data('timer', null);\n }\n },\n tolerance: 'pointer',\n drop: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n var id = ui.draggable.data('id');\n var enumId = $(this).data('tt-id');\n\n addMember(id, enumId);\n }\n });\n }\n\n function setupDroppableTiles($collection) {\n if (!that.editMode) return;\n\n $collection = $collection || that.$gridEnum.find('.tree-table-body .collection');\n\n var $items = $collection.find('.collection-item');\n try {\n if ($items.droppable('instance')) {\n $items.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n\n $items.droppable({\n accept: '.fancytree-type-draggable',\n over: function (e, ui) {\n $(this).addClass('tab-accept-item');\n },\n out: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n },\n tolerance: 'pointer',\n drop: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n var id = ui.draggable.data('id');\n var enumId = $(this).data('id');\n addMember(id, enumId);\n }\n });\n }\n\n function createOrEditEnum(id, parentId) {\n var idChanged = false;\n var $dialog = that.$gridEnum.find('#tab-enums-dialog-new');\n var oldId = '';\n\n var nameVal = '';\n var idVal = '';\n var originalIdVal = '';\n var iconVal = '';\n var colorVal = '';\n\n var isIdEditable = true;\n\n installFileUpload($dialog, 50000, function (err, text) {\n if (err) {\n showMessage(err, true);\n } else {\n if (!text.match(/^data:image\\//)) {\n showMessage(_('Unsupported image format'), true);\n return;\n }\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n iconVal = text;\n\n $dialog.find('.tab-enums-dialog-new-icon').show().html('');\n $dialog.find('.tab-enums-dialog-new-icon img').attr('src', text);\n $dialog.find('.tab-enums-dialog-new-icon-clear').show();\n }\n });\n\n if (id) {\n if (that.main.objects[id] && that.main.objects[id].common) {\n nameVal = translateName(that.main.objects[id].common.name);\n iconVal = that.main.objects[id].common.icon;\n colorVal = that.main.objects[id].common.color;\n }\n oldId = id;\n idVal = id;\n $dialog.find('#tab-enums-dialog-preserve-id').prop('checked', true);\n isIdEditable = false;\n } else {\n $dialog.find('#tab-enums-dialog-preserve-id').prop('checked', false);\n isIdEditable = true;\n }\n\n $dialog.find('.tab-enums-dialog-new-title').text(parentId ? _('Create new category') : (idVal ? _('Rename') : _('Create new enum')));\n\n if (idVal) {\n var parts = idVal.split('.');\n if (parts.length <= 2) {\n id = true;\n }\n idVal = parts.pop();\n parentId = parts.join('.');\n originalIdVal = idVal;\n }\n\n $dialog.find('#tab-enums-dialog-new-name')\n .val(nameVal)\n .off('change')\n .on('change', function () {\n var $id = $dialog.find('#tab-enums-dialog-new-id');\n var id = $id.val();\n var val = $(this).val();\n val = val.replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_').trim().toLowerCase();\n if (isIdEditable && (!id || !idChanged)) {\n $id.val(val);\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + (val || '#'));\n // detect materialize\n M.updateTextFields('#tab-enums-dialog-new');\n }\n if ($id.val() && !$id.val().match(/[.\\s]/)) {\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $id.removeClass('wrong');\n } else {\n $dialog.find('.tab-enums-dialog-create').addClass('disabled');\n $id.addClass('wrong');\n }\n }).off('keyup').on('keyup', function () {\n $(this).trigger('change');\n });\n\n $dialog.find('#tab-enums-dialog-new-id')\n .val(idVal)\n .off('change')\n .on('change', function () {\n if ($dialog.find('#tab-enums-dialog-preserve-id').prop('checked')) return;\n idChanged = true;\n var val = $(this).val();\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + ($(this).val() || '#'));\n M.updateTextFields('#tab-enums-dialog-new');\n\n if (val && !val.match(/[.\\s]/)) {\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $(this).removeClass('wrong');\n } else {\n $dialog.find('.tab-enums-dialog-create').addClass('disabled');\n $(this).addClass('wrong');\n }\n }).off('keyup').on('keyup', function () {\n $(this).trigger('change');\n });\n\n $dialog.find('#tab-enums-dialog-new-id').prop('disabled', !isIdEditable);\n\n $dialog.find('.tab-enums-dialog-create')\n .addClass('disabled')\n .off('click')\n .text(oldId ? _('Change') : _('Create'))\n .on('click', function () {\n if (oldId) {\n var name;\n if ($dialog.find('#tab-enums-dialog-preserve-id').prop('checked')) {\n if (typeof that.main.objects[oldId].common.name === 'object') {\n name = that.main.objects[oldId].common.name;\n } else {\n name = {'en': oldId.split('.').pop()};\n }\n name[systemLang] = $dialog.find('#tab-enums-dialog-new-name').val();\n } else {\n name = $dialog.find('#tab-enums-dialog-new-name').val();\n }\n enumRename(\n oldId,\n parentId + '.' + $dialog.find('#tab-enums-dialog-new-id').val(),\n {\n name: name,\n icon: iconVal,\n color: colorVal\n },\n function (err) {\n if (err) {\n showMessage(_('Error: %s', err), true);\n } else {\n showMessage(_('Updated'));\n }\n }\n );\n } else {\n enumAddChild(\n parentId,\n (parentId || 'enum') + '.' + $dialog.find('#tab-enums-dialog-new-id').val(),\n {\n name: $dialog.find('#tab-enums-dialog-new-name').val(),\n icon: iconVal,\n color: colorVal\n },\n function (err) {\n if (err) {\n showMessage(_('Error: %s', err), true, 5000);\n } else {\n showMessage(_('Updated'));\n }\n });\n }\n });\n\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + (idVal || '#'));\n\n if (iconVal) {\n $dialog.find('.tab-enums-dialog-new-icon').show().html(that.main.getIcon(oldId));\n $dialog.find('.tab-enums-dialog-new-icon-clear').show();\n } else {\n $dialog.find('.tab-enums-dialog-new-icon').hide();\n $dialog.find('.tab-enums-dialog-new-icon-clear').hide();\n }\n colorVal = colorVal || false;\n if (colorVal) {\n $dialog.find('.tab-enums-dialog-new-color').val(colorVal);\n } else {\n $dialog.find('.tab-enums-dialog-new-color').val();\n }\n\n M.updateTextFields('#tab-enums-dialog-new');\n that.main.showToast($dialog, _('Drop the icons here'));\n\n $dialog.find('.tab-enums-dialog-new-upload').off('click').on('click', function () {\n $dialog.find('.drop-file').trigger('click');\n });\n $dialog.find('.tab-enums-dialog-new-icon-clear').off('click').on('click', function () {\n if (iconVal) {\n iconVal = '';\n $dialog.find('.tab-enums-dialog-new-icon').hide();\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $dialog.find('.tab-enums-dialog-new-icon-clear').hide();\n }\n });\n $dialog.find('.tab-enums-dialog-new-color-clear').off('click').on('click', function () {\n if (colorVal) {\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $dialog.find('.tab-enums-dialog-new-color-clear').hide();\n $dialog.find('.tab-enums-dialog-new-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-enums-dialog-new-colorpicker')\n }).colorpicker('setValue', '');\n colorVal = '';\n }\n });\n var time = Date.now();\n try {\n $dialog.find('.tab-enums-dialog-new-colorpicker').colorpicker('destroy');\n } catch (e) {\n\n }\n $dialog.find('.tab-enums-dialog-new-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-enums-dialog-new-colorpicker')\n }).colorpicker('setValue', colorVal).on('showPicker.colorpicker', function (/* event */) {\n //$dialog.find('.tab-enums-dialog-new-colorpicker')[0].scrollIntoView(false);\n var $modal = $dialog.find('.modal-content');\n $modal[0].scrollTop = $modal[0].scrollHeight;\n }).on('changeColor.colorpicker', function (event){\n if (Date.now() - time > 100) {\n colorVal = event.color.toHex();\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $dialog.find('.tab-enums-dialog-new-icon-clear').show();\n }\n });\n if (colorVal) {\n $dialog.find('.tab-enums-dialog-new-color-clear').show();\n } else {\n $dialog.find('.tab-enums-dialog-new-color-clear').hide();\n }\n\n $dialog.find('#tab-enums-dialog-preserve-id').off('change').on('change', function () {\n if ($(this).prop('checked')) {\n $dialog.find('#tab-enums-dialog-new-id').prop('disabled', true)\n .val(originalIdVal);\n idVal = originalIdVal;\n isIdEditable = false;\n } else {\n if (that.main.objects[id] && that.main.objects[id].common) {\n isIdEditable = !that.main.objects[id].common['object-non-deletable'] && !that.main.objects[id].common.dontDelete;\n }\n if (isIdEditable) {\n idVal = $dialog.find('#tab-enums-dialog-new-name').val();\n idVal = idVal.replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_').trim().toLowerCase();\n $dialog.find('#tab-enums-dialog-new-id').prop('disabled', false)\n .val(idVal);\n }\n }\n idChanged = false;\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + (idVal || '#'));\n });\n\n // workaround for materialize checkbox problem\n $dialog.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n\n $dialog.modal().modal('open');\n }\n\n function switchEditMode(isEnabled) {\n that.editMode = isEnabled;\n var $editButton = that.$gridEnum.find('#tab-enums-list-edit');\n\n if (that.editMode) {\n $editButton.removeClass('blue').addClass('red');\n that.$gridEnum.addClass('tab-enums-edit');\n that._initObjectTree();\n showMessage(_('You can drag&drop the devices, channels and states to enums'));\n if (that.isTiles) {\n setupDroppableTiles();\n } else {\n setupDroppableTable();\n }\n } else {\n selectId('destroy');\n try {\n var _$items = that.$gridEnum.find('.collection-item');\n if (_$items.droppable('instance')) {\n _$items.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n try {\n var $trs = that.$gridEnum.find('tbody>tr.treetable-enum');\n if ($trs.droppable('instance')) {\n $trs.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n\n $editButton.removeClass('red').addClass('blue');\n that.$gridEnum.removeClass('tab-enums-edit');\n }\n }\n\n this._postInit = function () {\n if (typeof this.$gridList !== 'undefined') {\n if (!this.main.objects['enum.rooms']) {\n this.main.objects['enum.rooms'] = {\n \"_id\": \"enum.rooms\",\n \"common\": {\n \"icon\": \"home\",\n \"name\": {\n \"en\": \"Rooms\",\n \"de\": \"Räume\",\n \"ru\": \"Комнаты\",\n \"pt\": \"Quartos\",\n \"nl\": \"Kamers\",\n \"fr\": \"Pièces\",\n \"it\": \"Camere\",\n \"es\": \"Habitaciones\",\n \"pl\": \"Pokoje\"\n },\n \"desc\": {\n \"en\": \"List of the rooms\",\n \"de\": \"Liste der Räumen\",\n \"ru\": \"Список комнат\",\n \"pt\": \"Lista dos quartos\",\n \"nl\": \"Lijst met kamers\",\n \"fr\": \"Liste des chambres\",\n \"it\": \"Elenco delle stanze\",\n \"es\": \"Lista de las habitaciones\",\n \"pl\": \"Lista pokoi\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\",\n \"acl\": {\n \"owner\": \"system.user.admin\",\n \"ownerGroup\": \"system.group.administrator\",\n \"permissions\": 1911\n }\n };\n that.main.socket.emit('setObject', 'enum.rooms', this.main.objects['enum.rooms']);\n this.list.unshift('enum.rooms');\n }\n if (!this.main.objects['enum.functions']) {\n this.main.objects['enum.functions'] = {\n \"_id\": \"enum.functions\",\n \"common\": {\n \"icon\": \"lightbulb_outline\",\n \"name\": {\n \"en\": \"Functions\",\n \"de\": \"Funktionen\",\n \"ru\": \"функции\",\n \"pt\": \"Funções\",\n \"nl\": \"functies\",\n \"fr\": \"Les fonctions\",\n \"it\": \"funzioni\",\n \"es\": \"Funciones\",\n \"pl\": \"Funkcje\"\n },\n \"desc\": {\n \"en\": \"List of the functions\",\n \"de\": \"Liste der Funktionen\",\n \"ru\": \"Список функций\",\n \"pt\": \"Lista das funções\",\n \"nl\": \"Lijst met functies\",\n \"fr\": \"Liste des fonctions\",\n \"it\": \"Elenco delle funzioni\",\n \"es\": \"Lista de las funciones\",\n \"pl\": \"Lista funkcji\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\",\n \"acl\": {\n \"owner\": \"system.user.admin\",\n \"ownerGroup\": \"system.group.administrator\",\n \"permissions\": 1911\n }\n };\n this.list.unshift('enum.functions');\n that.main.socket.emit('setObject', 'enum.functions', this.main.objects['enum.functions']);\n }\n\n if (this.isTiles) {\n drawEnumsTiles();\n } else {\n drawEnumsTable();\n }\n if (this.editMode) {\n this._initObjectTree();\n } else {\n selectId('destroy');\n }\n }\n };\n\n this.init = function (update) {\n if (this.inited && !update) {\n return;\n }\n if (!this.main || !this.main.objectsLoaded) {\n setTimeout(function () {\n that.init(update);\n }, 250);\n return;\n }\n\n this._postInit();\n\n if (!this.inited) {\n this.inited = true;\n this.main.subscribeObjects('enum.*');\n }\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.inited = false;\n // subscribe objects and states\n this.main.unsubscribeObjects('enum.*');\n }\n switchEditMode(false);\n this.$gridList.treeTable('destroy');\n };\n\n this.objectChange = function (id, obj, action) {\n //Update enums\n if (id.match(/^enum\\./)) {\n if (obj) {\n if (this.list.indexOf(id) === -1) this.list.push(id);\n } else {\n var j = this.list.indexOf(id);\n if (j !== -1) this.list.splice(j, 1);\n }\n\n if (this.updateTimers) clearTimeout(this.updateTimers);\n\n this.updateTimers = setTimeout(function () {\n that.updateTimers = null;\n that._postInit();\n }, 200);\n }\n\n if (this.$grid) selectId('object', id, obj, action);\n };\n}\n","function Events(main) {\r\n 'use strict';\r\n\r\n var that = this;\r\n this.main = main;\r\n this.$tab = $('#tab-events'); // body\r\n var isRemote = location.hostname === 'yunkong2.net' || location.hostname === 'yunkong2.pro';\r\n\r\n var list = {\r\n count: 0,\r\n start: 0,\r\n limit: 500 //const\r\n };\r\n var timeout = null;\r\n\r\n var pause = {\r\n list: [],\r\n mode: false,\r\n counter: 0,\r\n overflow: false,\r\n $counterSpan: null\r\n };\r\n\r\n var $header;\r\n var hdr;\r\n var $table;\r\n var $outer;\r\n var $pause;\r\n\r\n var columnResizeInit = {\r\n done: false,\r\n timer: null\r\n };\r\n\r\n this.prepare = function () {\r\n $outer = this.$tab.find('#event-outer');\r\n $table = this.$tab.find('#event-table');\r\n $pause = this.$tab.find('#event-pause');\r\n\r\n // install header\r\n $header = this.$tab.find('#events-table-tr');\r\n hdr = new IobListHeader($header, {list: $outer, colWidthOffset: 1, prefix: 'event-filter'});\r\n hdr.doFilter = filterEvents;\r\n\r\n hdr.add('combobox', 'type');\r\n hdr.add('edit', 'id', 'ID');\r\n //hdr.add('edit', 'val', 'Value');\r\n hdr.add('edit', 'val', 'value');\r\n hdr.add('combobox', 'ack', 'ack', [\r\n {val: '', name: 'all'},\r\n {val: 'true', name: 'ack'},\r\n {val: 'false', name: 'not ack'}\r\n ]);\r\n hdr.add('combobox', 'from', 'from');\r\n hdr.add('text', 'ts');\r\n hdr.add('text', 'lc');\r\n\r\n Object.defineProperty(hdr, 'getValues', {\r\n value: function () {\r\n hdr.ID.selectedVal = hdr.ID.selectedVal.toLocaleLowerCase();\r\n if (hdr.ack.selectedVal === 'true') hdr.ack.selectedVal = true;\r\n if (hdr.ack.selectedVal === 'false') hdr.ack.selectedVal = false;\r\n },\r\n enumerateble: false\r\n });\r\n\r\n $pause.on('click', function () {\r\n that.pause();\r\n });\r\n\r\n // bind \"clear events\" button\r\n var $eventClear = this.$tab.find('#event-clear');\r\n $eventClear\r\n .off('click').on('click', function () {\r\n list.count = 0;\r\n list.start = 0;\r\n that.$tab.find('#event-table').html('');\r\n });\r\n };\r\n\r\n this.init = function () {\r\n if (isRemote) {\r\n that.$tab.find('#grid-events').html(_('You can\\'t see events via cloud') + '
        cloud_off').addClass('no-cloud-events');\r\n return;\r\n }\r\n if (!hdr) return;\r\n\r\n if (this.inited) {\r\n return;\r\n }\r\n \r\n installColResize();\r\n\r\n this.inited = true;\r\n this.main.subscribeObjects('*');\r\n this.main.subscribeStates('*');\r\n };\r\n\r\n this.destroy = function () {\r\n if (this.inited) {\r\n this.inited = false;\r\n this.main.unsubscribeObjects('*');\r\n this.main.unsubscribeStates('*');\r\n }\r\n };\r\n\r\n var widthSet = false;\r\n\r\n function installColResize() {\r\n if (!$.fn.colResizable) return;\r\n if ($outer.is(':visible')) {\r\n $outer.colResizable({\r\n liveDrag: true,\r\n\r\n partialRefresh: true,\r\n marginLeft: 5,\r\n postbackSafe:true,\r\n\r\n onResize: function (event) {\r\n return hdr.syncHeader();\r\n // // read width of data.$tree and set the same width for header\r\n // var thDest = $('#log-outer-header >thead>tr>th');\t//if table headers are specified in its semantically correct tag, are obtained\r\n // var thSrc = $outer.find('>tbody>tr:first>td');\r\n // for (var i = 1; i < thSrc.length; i++) {\r\n // $(thDest[i]).attr('width', $(thSrc[i]).width());\r\n // }\r\n }\r\n });\r\n hdr.syncHeader();\r\n } else {\r\n setTimeout(function () {\r\n installColResize();\r\n }, 200)\r\n }\r\n }\r\n\r\n function updateResizersHeight() {\r\n columnResizeInit.timer = null;\r\n $(window).trigger('resize.JColResizer');\r\n }\r\n\r\n // ----------------------------- Show events ------------------------------------------------\r\n this.add = function (id, stateOrObj, isMessage, isState) {\r\n if (isRemote) return;\r\n\r\n var type = isState ? 'stateChange' : (isMessage ? 'message' : 'objChange');\r\n var value;\r\n var ack;\r\n var from = '';\r\n var ts;\r\n var lc;\r\n if (hdr) {\r\n if (hdr.getValues) {\r\n hdr.getValues();\r\n }\r\n\r\n hdr.type.checkAddOption(type);\r\n }\r\n if (!columnResizeInit.done) {\r\n // if the height not 100%, the column resizer is too short. Wait till the table will be really full and reinit resizer.\r\n // update resizer once and remeber it if the table has full height\r\n if (!columnResizeInit.timer) {\r\n columnResizeInit.timer = setTimeout(updateResizersHeight, 1000);\r\n }\r\n\r\n if (list.count > 20) {\r\n columnResizeInit.done = true;\r\n }\r\n }\r\n\r\n if (!pause.mode) {\r\n if (list.count >= that.limit) {\r\n list.start++;\r\n var e = document.getElementById('event_' + list.start);\r\n if (e) e.outerHTML = '';\r\n } else {\r\n list.count++;\r\n }\r\n }\r\n\r\n // if Object\r\n if (!isMessage && !isState) {\r\n if (!stateOrObj) {\r\n value = 'deleted';\r\n ts = main.formatDate(new Date());\r\n } else {\r\n value = JSON.stringify(stateOrObj, '\\x0A', 2);\r\n if (value !== undefined && value.length > 30) {\r\n value = '' + value.substring(0, 30) + '...';\r\n }\r\n ts = main.formatDate(stateOrObj.ts);\r\n }\r\n } else\r\n // if state\r\n if (isState) {\r\n if (!stateOrObj) {\r\n value = 'deleted';\r\n ts = main.formatDate(new Date());\r\n } else {\r\n stateOrObj.from = stateOrObj.from || '';\r\n stateOrObj.from = stateOrObj.from.replace('system.adapter.', '');\r\n stateOrObj.from = stateOrObj.from.replace('system.', '');\r\n\r\n hdr && hdr.from.checkAddOption(stateOrObj.from, function (o) {\r\n return {val: o.replace(/\\./g, '-'), name: o};\r\n });\r\n\r\n from = stateOrObj.from;\r\n\r\n value = JSON.stringify(stateOrObj.val);\r\n if (value !== undefined && value.length > 30) {\r\n value = '
        ' + value.substring(0, 30) + '...
        ';\r\n }\r\n ack = stateOrObj.ack ? 'true' : 'false';\r\n ts = main.formatDate(stateOrObj.ts);\r\n lc = main.formatDate(stateOrObj.lc);\r\n }\r\n } else\r\n // if message\r\n if (isMessage) {\r\n // todo\r\n }\r\n\r\n var visible = true;\r\n if (hdr) {\r\n if (hdr.type.selectedVal && hdr.type.selectedVal !== type) {\r\n visible = false;\r\n } else if (hdr.ID.selectedVal && id.toLocaleLowerCase().indexOf(hdr.ID.selectedVal) === -1) {\r\n visible = false;\r\n } else if (hdr.value.selectedVal !== '' && value !== null && value !== undefined && value.indexOf(hdr.value.selectedVal) === -1) {\r\n visible = false;\r\n } else if (hdr.ack.selectedVal !== '' && hdr.ack.selectedVal !== ack) {\r\n visible = false;\r\n } else if (hdr.from.selectedVal && hdr.from.selectedVal !== from) {\r\n visible = false;\r\n }\r\n }\r\n\r\n\r\n var text = '';\r\n text += '' + type + '';\r\n text += '' + id + '';\r\n if (isNaN(value)) {\r\n text += '' + (value || '') + '';\r\n } else {\r\n text += '' + (value || '') + '';\r\n }\r\n text += '' + (ack || '') + '';\r\n text += '' + (from || '') + '';\r\n text += '' + (ts || '') + '';\r\n text += '' + (lc || '') + '';\r\n text += '';\r\n\r\n if (pause.mode) {\r\n pause.list.push(text);\r\n pause.counter++;\r\n\r\n if (pause.counter > list.limit) {\r\n if (!pause.overflow) {\r\n $pause.addClass('red lighten3')\r\n .attr('title', _('Message buffer overflow. Losing oldest'));\r\n pause.overflow = true;\r\n }\r\n pause.list.shift();\r\n }\r\n pause.$counterSpan.html(pause.counter);\r\n } else if ($table) {\r\n $table.prepend(text);\r\n if (!widthSet && (window.location.hash === '#tab-events' || window.location.hash === '#events')) {\r\n hdr && hdr.syncHeader();\r\n widthSet = true;\r\n }\r\n }\r\n };\r\n\r\n /*this.onSelected = function () {\r\n hdr && hdr.syncHeader();\r\n };*/\r\n\r\n function filterEvents() {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n }\r\n if (hdr.getValues) {\r\n hdr.getValues();\r\n }\r\n\r\n $table && $table.find('.event-line').each(function (index) {\r\n var isShow = true;\r\n var $this = $(this);\r\n if (hdr.type.selectedVal && !$this.hasClass('event-type-' + hdr.type.selectedVal)) {\r\n isShow = false;\r\n } else\r\n if (hdr.from.selectedVal && !$this.hasClass('event-from-' + hdr.from.selectedVal)) {\r\n isShow = false;\r\n } else\r\n if (hdr.ack.selectedVal !== '' && !$this.hasClass('event-ack-' + hdr.ack.selectedVal)) {\r\n isShow = false;\r\n } else\r\n if (hdr.ID.selectedVal && $(this).find('td.event-column-id').text().toLocaleLowerCase().indexOf(hdr.ID.selectedVal) === -1) {\r\n isShow = false;\r\n } else\r\n if (hdr.value.selectedVal !== '' && $(this).find('td.event-column-value').text().indexOf(hdr.value.selectedVal) === -1) {\r\n isShow = false;\r\n }\r\n\r\n if (isShow) {\r\n $this.show();\r\n } else {\r\n $this.hide();\r\n }\r\n });\r\n }\r\n\r\n this.pause = function () {\r\n if (!pause.mode) {\r\n $pause.addClass('yellow btn-pause-button-active');\r\n\r\n pause.$counterSpan = $pause;\r\n pause.$counterSpan.html('0');\r\n pause.counter = 0;\r\n pause.mode = true;\r\n } else {\r\n pause.mode = false;\r\n for (var i = 0; i < pause.list.length; i++) {\r\n if (list.count >= 500) {\r\n list.start++;\r\n var e = document.getElementById('event_' + list.start);\r\n if (e) e.outerHTML = '';\r\n } else {\r\n list.count++;\r\n }\r\n $table.prepend(pause.list[i]);\r\n }\r\n pause.overflow = false;\r\n pause.list = [];\r\n pause.counter = 0;\r\n\r\n $pause\r\n .removeClass('yellow btn-pause-button-active')\r\n .html('pause');\r\n }\r\n };\r\n}\r\n\r\n\r\n","function fileHandler(event) {\n event.preventDefault();\n var file = event.dataTransfer ? event.dataTransfer.files[0] : event.target.files[0];\n\n var $dz = $(this).find('.drop-zone');\n var callback = $(this).data('drop-zone-cb');\n var limit = $(this).data('limit');\n if (file.size > (limit || 10000)) {\n callback && callback(_('File is too big!'));\n $dz.hide();\n return false;\n }\n $dz.show();\n var reader = new FileReader();\n reader.onload = function (evt) {\n $dz.hide();\n callback && callback(null, evt.target.result);\n };\n reader.readAsDataURL(file);\n}\n\n/**\n * Install file upload on some div\n * @param {object} $dropZone is jquery object of the div (DOM element) where the drop zone must be installed\n * @param {number} limit is maximal size of file in bytes\n * @param {function} callback is callback in form function (err, fileDataBase64) {}\n*/\nfunction installFileUpload($dropZone, limit, callback) {\n if (typeof window.FileReader !== 'undefined' && !$dropZone.data('installed')) {\n $dropZone.data('installed', true);\n $dropZone.prepend('
        ');\n var $dz = $dropZone.find('.drop-zone');\n $dropZone[0].ondragover = function() {\n $dz.off('click');\n $dz.show();\n return false;\n };\n\n $dz[0].ondragleave = function() {\n $dz.hide();\n return false;\n };\n\n $dz[0].ondrop = fileHandler.bind($dropZone[0]);\n }\n $dropZone.data('drop-zone-cb', callback);\n $dropZone.data('limit', limit);\n $dropZone.find('.drop-file').on('change', fileHandler.bind($dropZone[0]));\n}","function Hosts(main) {\n 'use strict';\n\n var that = this;\n this.main = main;\n this.list = [];\n this.$tab = $('#tab-hosts');\n this.$grid = this.$tab.find('#hosts');\n this.$table = this.$tab.find('#grid-hosts');\n this.inited = false;\n this.isTiles = true;\n this.words = {};\n\n this.prepare = function () {\n this.isTiles = (this.main.config.hostsIsTiles !== undefined && this.main.config.hostsIsTiles !== null) ? this.main.config.hostsIsTiles : true;\n\n // fix for IE\n if (this.main.browser === 'ie' && this.main.browserVersion <= 10) {\n this.isTiles = false;\n this.$tab.find('.btn-switch-tiles').hide();\n }\n\n this.$tab.find('.btn-reload')\n .attr('title', _('Update'))\n .on('click', function () {\n that.init(true);\n });\n\n this.$tab.find('.btn-switch-tiles').off('click').on('click', function () {\n that.isTiles = !that.isTiles;\n\n if (that.isTiles) {\n $(this).find('i').text('view_list');\n } else {\n $(this).find('i').text('view_module');\n }\n\n that.main.saveConfig('hostsIsTiles', that.isTiles);\n\n setTimeout(function () {\n that._postInit();\n }, 50);\n });\n\n if (this.isTiles) {\n this.$tab.find('.btn-switch-tiles').find('i').text('view_list');\n } else {\n this.$tab.find('.btn-switch-tiles').find('i').text('view_module');\n }\n\n this.$tab.find('.filter-clear').on('click', function () {\n that.$tab.find('.filter-input').val('').trigger('change');\n });\n\n var $hostsFilter = this.$tab.find('.filter-input');\n $hostsFilter.on('change', function () {\n var filter = $(this).val();\n if (filter) {\n $(this).addClass('input-not-empty');\n that.$tab.find('.filter-clear').show();\n } else {\n that.$tab.find('.filter-clear').hide();\n $(this).removeClass('input-not-empty');\n }\n\n that.main.saveConfig('hostsFilter', filter);\n applyFilter(filter);\n }).on('keyup', function () {\n if (that.filterTimeout) clearTimeout(that.filterTimeout);\n that.filterTimeout = setTimeout(function () {\n that.$tab.find('.filter-input').trigger('change');\n }, 300);\n });\n\n if (this.main.config.hostsFilter && this.main.config.hostsFilter[0] !== '{') {\n $hostsFilter.val(that.main.config.hostsFilter).addClass('input-not-empty');\n this.$tab.find('.filter-clear').show();\n } else {\n this.$tab.find('.filter-clear').hide();\n }\n\n // cache translations\n this.words['Title'] = _('Title');\n this.words['OS'] = _('OS');\n this.words['Available'] = _('Available');\n this.words['Installed'] = _('Installed');\n this.words['Events'] = _('Events');\n this.words['Title'] = _('Title');\n that.words['Type'] = _('Type');\n };\n\n // ----------------------------- Hosts show and Edit ------------------------------------------------\n this.initButtons = function (id) {\n var selector = id ? '[data-host-id=\"' + id + '\"]' : '';\n\n this.$tab.find('.host-update-submit' + selector).off('click').on('click', function () {\n that.main.cmdExec($(this).attr('data-host-name'), 'upgrade self', function (exitCode) {\n if (!exitCode) that.init(true);\n });\n });\n\n this.$tab.find('.host-restart-submit' + selector).off('click').on('click', function () {\n that.main.waitForRestart = true;\n that.main.cmdExec($(this).attr('data-host-name'), '_restart');\n });\n this.$tab.find('.host-delete' + selector).off('click').on('click', function () {\n that.main.cmdExec(that.main.currentHost, 'host remove ' + $(this).attr('data-host-name'));\n });\n\n this.$tab.find('.host-edit' + selector).off('click').on('click', function () {\n editHost($(this).attr('data-host-id'));\n });\n\n this.$tab.find('.host-update-hint-submit' + selector).off('click').on('click', function () {\n var infoTimeout = setTimeout(function () {\n showUpdateInfo();\n infoTimeout = null;\n }, 1000);\n\n that.main.socket.emit('sendToHost', $(this).attr('data-host-name'), 'getLocationOnDisk', null, function (data) {\n if (infoTimeout) clearTimeout(infoTimeout);\n infoTimeout = null;\n showUpdateInfo(data);\n });\n });\n\n };\n\n function showUpdateInfo(data) {\n var $dialog = $('#dialog-host-update');\n if (data) {\n var path = data.path;\n path = path.replace(/\\\\/g, '/');\n var parts = path.split('/');\n parts.pop(); // js-controller\n parts.pop(); // node_modules\n\n if (data.platform === 'linux' || data.platform === 'darwin' || data.platform === 'freebsd' || data.platform === 'lin') {\n // linux\n $dialog.find('#dialog-host-update-instructions').val('cd ' + parts.join('/') + '\\nsudo yunkong2 stop\\nsudo yunkong2 update\\nsudo yunkong2 upgrade self\\nsudo yunkong2 start')\n } else {\n // windows\n $dialog.find('#dialog-host-update-instructions').val('cd ' + parts.join('\\\\') + '\\nyunkong2 stop\\nyunkong2 update\\nyunkong2 upgrade self\\nyunkong2 start')\n }\n } else {\n $dialog.find('#dialog-host-update-instructions').val('cd /opt/yunkong2\\nsudo yunkong2 stop\\nsudo yunkong2 update\\nsudo yunkong2 upgrade self\\nsudo yunkong2 start')\n }\n\n if (!$dialog.data('inited')) {\n $dialog.data('inited', true);\n $dialog.modal();\n }\n $dialog.modal('open');\n }\n\n function applyFilter(filter) {\n filter = (filter || '').toLowerCase().trim();\n\n if (!filter) {\n that.$tab.find('.hosts-host').show();\n that.$tab.find('.hosts-host-filtered-out').hide();\n } else {\n var someVisible = false;\n that.$tab.find('.hosts-host').each(function () {\n var text = $(this).data('host-filter');\n if (text.toLowerCase().indexOf(filter) !== -1) {\n $(this).show();\n someVisible = true;\n } else {\n $(this).hide();\n }\n });\n if (!someVisible) {\n that.$tab.find('.hosts-host-filtered-out').show();\n } else {\n that.$tab.find('.hosts-host-filtered-out').hide();\n }\n }\n }\n\n function showOneHostRow(index) {\n var obj = that.main.objects[that.list[index].id];\n var alive = that.main.states[obj._id + '.alive'] && that.main.states[obj._id + '.alive'].val && that.main.states[obj._id + '.alive'].val !== 'null';\n obj.common = obj.common || {};\n obj.native = obj.native || {};\n\n var text = '';\n //LED\n text += '
        ';\n // icon\n text += '' + that.main.getHostIcon(obj) + '';\n // name\n text += '' + obj.common.hostname + '';\n // type\n text += '' + obj.common.type + '';\n var title = obj.common.titleLang || obj.common.title;\n if (typeof title === 'object') {\n title = title[systemLang] || title.en;\n }\n // description\n text += '' + title + '';\n // platform\n // text += '' + obj.common.platform + ''; // actually only one platform\n // OS\n text += '' + (obj.native.os ? obj.native.os.platform : _('unknown')) + '';\n // Available\n text += '' +\n '' +\n '' +\n '';\n\n // installed\n text += '' + obj.common.installedVersion + '';\n\n // event rates\n if (that.main.states[obj._id + '.inputCount']) {\n text += '⇥' + that.main.states[obj._id + '.inputCount'].val + ' / ↦' + that.main.states[obj._id + '.outputCount'].val + '';\n } else {\n text += ' / ';\n }\n\n // restart button\n text += '';\n\n text += '';\n\n return text;\n }\n\n function showOneHostTile(index) {\n var obj = that.main.objects[that.list[index].id];\n var alive = that.main.states[obj._id + '.alive'] && that.main.states[obj._id + '.alive'].val && that.main.states[obj._id + '.alive'].val !== 'null';\n obj.common = obj.common || {};\n obj.native = obj.native || {};\n\n var color;\n if (obj.common.color) {\n color = that.main.invertColor(obj.common.color);\n }\n\n var text = '
        '+\n '
        ' +\n '
        '+\n ' ' + that.main.getHostIcon(obj, ' ') +\n '
        ' +\n '
        '+\n '
        ' +\n ' ' + obj.common.hostname + '' +\n '
          '+\n '
        • ' + that.words['Type'] + ': ' + obj.common.type + '
        • ' +\n '
        • ' + that.words['Title'] + ': ' + obj.common.title + '
        • ' +\n '
        • ' + that.words['OS'] + ': ' + (obj.native.os ? obj.native.os.platform : _('unknown')) + '
        • ' +\n '
        • ' + that.words['Available'] + ':
        • ' +\n '
        • ' + that.words['Installed'] + ': ' + obj.common.installedVersion + '
        • ';\n\n if (that.main.states[obj._id + '.inputCount']) {\n text += '
        • ' + that.words['Events'] + ': ⇥' + that.main.states[obj._id + '.inputCount'].val + ' / ↦' + that.main.states[obj._id + '.outputCount'].val + '
        • ';\n } else {\n text += '
        • ' + that.words['Events'] + ': /
        • ';\n }\n\n text += '
        '+\n '
        '+\n '
        '+\n ' edit' +\n ' autorenew';\n if (obj.common.hostname !== that.main.currentHost) {\n text += ' delete';\n }\n text += ' refresh' +\n ' refresh' +\n '
        '+\n '
        '+\n '
        ';\n\n return text;\n }\n\n function editHost(id) {\n var $dialog = $('#tab-host-dialog-edit');\n\n var titleVal = '';\n var iconVal = '';\n var colorVal = '';\n\n installFileUpload($dialog, 50000, function (err, text) {\n if (err) {\n that.main.showToast($dialog, err);\n } else {\n if (!text.match(/^data:image\\//)) {\n that.main.showToast($dialog, _('Unsupported image format'));\n return;\n }\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n iconVal = text;\n\n $dialog.find('.tab-host-dialog-edit-icon').show().html('');\n $dialog.find('.tab-host-dialog-edit-icon img').attr('src', text);\n $dialog.find('.tab-host-dialog-edit-icon-clear').show();\n }\n });\n\n if (that.main.objects[id] && that.main.objects[id].common) {\n titleVal = that.main.objects[id].common.title;\n if (typeof titleVal === 'object') {\n titleVal = titleVal[systemLang] || titleVal.en;\n }\n iconVal = that.main.objects[id].common.icon;\n colorVal = that.main.objects[id].common.color;\n }\n\n $dialog.find('#tab-host-dialog-edit-title')\n .val(titleVal)\n .off('change')\n .on('change', function () {\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n }).off('keyup').on('keyup', function () {\n $(this).trigger('change');\n });\n\n $dialog.find('.tab-host-dialog-ok')\n .addClass('disabled')\n .off('click')\n .on('click', function () {\n var obj = JSON.parse(JSON.stringify(that.main.objects[id]));\n obj.common.title = $dialog.find('#tab-host-dialog-edit-title').val();\n obj.common.icon = iconVal;\n obj.common.color = colorVal;\n if (JSON.stringify(obj) !== JSON.stringify(that.main.objects[id])) {\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n that.main.showToast($dialog, _('Updated'));\n });\n } else {\n that.main.showToast($dialog, _('Nothing changed'));\n }\n });\n\n if (iconVal) {\n $dialog.find('.tab-host-dialog-edit-icon').show().html(that.main.getIcon(id));\n $dialog.find('.tab-host-dialog-edit-icon-clear').show();\n } else {\n $dialog.find('.tab-host-dialog-edit-icon').hide();\n $dialog.find('.tab-host-dialog-edit-icon-clear').hide();\n }\n\n colorVal = colorVal || false;\n\n if (colorVal) {\n $dialog.find('.tab-host-dialog-edit-color').val(colorVal);\n } else {\n $dialog.find('.tab-host-dialog-edit-color').val();\n }\n\n M.updateTextFields('#tab-host-dialog-edit');\n that.main.showToast($dialog, _('Drop the icons here'));\n\n $dialog.find('.tab-host-dialog-edit-upload').off('click').on('click', function () {\n $dialog.find('.drop-file').trigger('click');\n });\n\n $dialog.find('.tab-host-dialog-edit-icon-clear').off('click').on('click', function () {\n if (iconVal) {\n iconVal = '';\n $dialog.find('.tab-host-dialog-edit-icon').hide();\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n $dialog.find('.tab-host-dialog-edit-icon-clear').hide();\n }\n });\n $dialog.find('.tab-host-dialog-edit-color-clear').off('click').on('click', function () {\n if (colorVal) {\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n $dialog.find('.tab-host-dialog-edit-color-clear').hide();\n $dialog.find('.tab-host-dialog-edit-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-host-dialog-edit-colorpicker')\n }).colorpicker('setValue', '');\n colorVal = '';\n }\n });\n var time = Date.now();\n try {\n $dialog.find('.tab-host-dialog-edit-colorpicker').colorpicker('destroy');\n } catch (e) {\n\n }\n $dialog.find('.tab-host-dialog-edit-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-host-dialog-edit-colorpicker')\n }).colorpicker('setValue', colorVal).on('showPicker.colorpicker', function (/* event */) {\n //$dialog.find('.tab-host-dialog-edit-colorpicker')[0].scrollIntoView(false);\n var $modal = $dialog.find('.modal-content');\n $modal[0].scrollTop = $modal[0].scrollHeight;\n }).on('changeColor.colorpicker', function (event){\n if (Date.now() - time > 100) {\n colorVal = event.color.toHex();\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n $dialog.find('.tab-host-dialog-edit-icon-clear').show();\n }\n });\n if (colorVal) {\n $dialog.find('.tab-host-dialog-edit-color-clear').show();\n } else {\n $dialog.find('.tab-host-dialog-edit-color-clear').hide();\n }\n\n $dialog.modal().modal('open');\n }\n\n function showHostsTile() {\n var text = '';\n for (var i = 0; i < that.list.length; i++) {\n text += showOneHostTile(i);\n }\n that.$table.html('');\n that.$tab.find('.hosts-table').hide();\n that.$grid.html(text).show();\n that.$grid.append('
        ' + _('Filtered out') + '
        ');\n }\n\n function showHostsTable() {\n var text = '';\n for (var i = 0; i < that.list.length; i++) {\n text += showOneHostRow(i);\n }\n that.$grid.html('').hide();\n that.$table.html(text);\n that.$tab.find('.hosts-table').show();\n that.$table.append('' + _('Filtered out') + '');\n }\n\n this.updateCounter = function (counter) {\n if (counter === undefined) {\n this.main.tabs.adapters.getAdaptersInfo(this.main.currentHost, false, false, function (repository, installedList) {\n var hostsToUpdate = 0;\n if (!installedList || !installedList.hosts) return;\n\n for (var id in installedList.hosts) {\n if (!installedList.hosts.hasOwnProperty(id)) continue;\n var obj = that.main.objects['system.host.' + id];\n if (!obj || !obj.common) continue;\n var installedVersion = obj.common.installedVersion;\n var availableVersion = obj.common ? (repository && repository[obj.common.type] ? repository[obj.common.type].version : '') : '';\n\n if (installedVersion && availableVersion && !that.main.upToDate(availableVersion, installedVersion)) {\n id = 'system.host.' + id.trim().replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_');\n if (that.main.states[id + '.alive'] && that.main.states[id + '.alive'].val && that.main.states[id + '.alive'].val !== 'null') {\n hostsToUpdate++;\n }\n }\n }\n\n that.updateCounter(hostsToUpdate);\n });\n } else if (counter) {\n var $updates = $('#updates-for-hosts');\n if ($updates.length) {\n $updates.text(counter);\n } else {\n $('' + counter + '').appendTo('.admin-sidemenu-items[data-tab=\"tab-hosts\"] a');\n }\n } else {\n $('#updates-for-hosts').remove();\n }\n };\n\n this._postInit = function () {\n if (typeof that.$grid !== 'undefined') {\n if (this.isTiles) {\n showHostsTile();\n } else {\n showHostsTable()\n }\n applyFilter(this.$tab.find('.filter-input').val());\n\n var timer = setTimeout(function () {\n console.warn('Timeout for repository');\n timer = null;\n that.initButtons();\n }, 2000);\n\n var host = that.main.currentHost;\n if (!host) {\n // find alive host\n for (var i = 0; i < that.list.length; i++) {\n if (that.main.states[that.list[i].id + '.alive'] && that.main.states[that.list[i].id + '.alive'].val) {\n host = that.list[i].id;\n break;\n }\n }\n }\n\n that.main.tabs.adapters.getAdaptersInfo(host, true, false, function (repository, installedList) {\n if (!installedList || !installedList.hosts) return;\n\n for (var id in installedList.hosts) {\n if (!installedList.hosts.hasOwnProperty(id)) continue;\n var obj = that.main.objects['system.host.' + id];\n var installed = installedList.hosts[id].version;\n if (installed !== installedList.hosts[id].runningVersion) installed += '(' + _('Running: ') + installedList.hosts[id].runningVersion + ')';\n if (!installed && obj.common && obj.common.installedVersion) installed = obj.common.installedVersion;\n\n id = 'system.host.' + id.trim().replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_');\n that.$tab.find('.hosts-version-installed[data-host-id=\"' + id + '\"]').html(installed);\n }\n\n that.$tab.find('.hosts-host').each(function () {\n var id = $(this).data('host-id');\n var obj = that.main.objects[id];\n var installedVersion = obj.common.installedVersion;\n var availableVersion = obj.common ? (repository && repository[obj.common.type] ? repository[obj.common.type].version : '') : '';\n if (installedVersion && availableVersion) {\n if (!that.main.upToDate(availableVersion, installedVersion)) {\n // show button\n if (that.main.states[id + '.alive'] && that.main.states[id + '.alive'].val && that.main.states[id + '.alive'].val !== 'null') {\n $(this).find('.host-update-submit').show();\n $(this).find('.host-update-hint-submit').show();\n $(this).find('.hosts-version-installed').addClass('updateReady');\n $(this).find('.hosts-version-available').addClass('hosts-version-available-updatable');\n }\n }\n }\n if (availableVersion) {\n $(this).find('.hosts-version-available').html(availableVersion);\n }\n });\n\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n that.initButtons();\n });\n }\n };\n\n this.init = function (update) {\n if (this.inited && !update) {\n return;\n }\n\n this.getHosts(function () {\n that._postInit();\n });\n if (!this.inited) {\n this.inited = true;\n this.main.subscribeObjects('system.host.*');\n this.main.subscribeStates('system.host.*');\n }\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.inited = false;\n this.main.unsubscribeObjects('system.host.*');\n this.main.unsubscribeStates('system.host.*');\n }\n };\n\n this.addHost = function (obj) {\n var addr = null;\n // Find first non internal IP and use it as identifier\n if (obj.native.hardware && obj.native.hardware.networkInterfaces) {\n for (var eth in obj.native.hardware.networkInterfaces) {\n if (!obj.native.hardware.networkInterfaces.hasOwnProperty(eth)) continue;\n for (var num = 0; num < obj.native.hardware.networkInterfaces[eth].length; num++) {\n if (!obj.native.hardware.networkInterfaces[eth][num].internal) {\n addr = obj.native.hardware.networkInterfaces[eth][num].address;\n break;\n }\n }\n if (addr) break;\n }\n }\n if (addr) {\n this.list.push({name: obj.common.hostname, address: addr, id: obj._id});\n } else {\n this.list.push({name: obj.common.hostname, address: '127.0.0.1', id: obj._id});\n }\n };\n\n this.getHosts = function (callback) {\n this.main.socket.emit('getForeignObjects', 'system.host.*', 'state', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.objects[id] = res[id];\n }\n that.main.socket.emit('getForeignStates', 'system.host.*', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.states[id] = res[id];\n }\n that.main.socket.emit('getForeignObjects', 'system.host.*', 'host', function (err, res) {\n that.list = [];\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n var obj = res[id];\n\n that.main.objects[id] = obj;\n\n if (obj.type === 'host') {\n that.addHost(obj);\n }\n }\n main.initHostsList();\n if (callback) callback();\n });\n });\n });\n };\n\n this.objectChange = function (id, obj, action) {\n // Update hosts\n if (id.match(/^system\\.host\\.[-\\w]+$/)) {\n var found = false;\n var i;\n for (i = 0; i < this.list.length; i++) {\n if (this.list[i].id === id) {\n found = true;\n break;\n }\n }\n\n if (obj) {\n if (!found) this.list.push({id: id, address: obj.common.address ? obj.common.address[0] : '', name: obj.common.name});\n } else {\n if (found) this.list.splice(i, 1);\n }\n \n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that._postInit();\n }, 200);\n }\n };\n\n this.stateChange = function (id, state) {\n if (id.match(/^system\\.host\\..+\\.alive$/)) {\n id = id.substring(0, id.length - 6);\n if (state && state.val) {\n this.$tab.find('.hosts-led[data-host-id=\"' + id + '\"]').removeClass('led-red').addClass('led-green');\n } else {\n this.$tab.find('.hosts-led[data-host-id=\"' + id + '\"]').removeClass('led-green').addClass('led-red');\n this.$tab.find('.host-update-submit[data-host-id=\"' + id + '\"]').hide();\n this.$tab.find('.host-update-hint-submit[data-host-id=\"' + id + '\"]').hide();\n this.$tab.find('.host-restart-submit[data-host-id=\"' + id + '\"]').hide();\n this.$tab.find('.hosts-version-available[data-host-id=\"' + id + '\"]').removeClass('hosts-version-available-updatable');\n }\n } else if (id.match(/^system\\.host\\..+\\.outputCount$/)) {\n id = id.substring(0, id.length - 12);\n\n this.$tab.find('.host-out[data-host-id=\"' + id + '\"]').html('↦' + state.val + '');\n } else if (id.match(/^system\\.host\\..+\\.inputCount$/)) {\n id = id.substring(0, id.length - 11);\n\n this.$tab.find('.host-in[data-host-id=\"' + id + '\"]').html('↦' + state.val + '');\n }\n };\n}\n\n","function Instances(main) {\n 'use strict';\n\n var that = this;\n\n this.$tab = $('#tab-instances');\n this.$grid = $('#grid-instances');\n this.$gridHead = $('#grid-instances-head');\n\n this.inited = false;\n this.main = main;\n this.list = [];\n this.hostsText = null;\n this.filterHost = false;\n this.memState = 'memAvailable';\n\n if (!window.tdp) {\n window.tdp = function (x, nachkomma) {\n return isNaN(x) ? '' : x.toFixed(nachkomma || 0).replace('.', ',').replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n }\n }\n\n function getLinkVar(_var, obj, attr, link, instance) {\n if (attr === 'protocol') attr = 'secure';\n\n if (_var === 'ip') {\n link = link.replace('%' + _var + '%', location.hostname);\n } else\n if (_var === 'instance') {\n link = link.replace('%' + _var + '%', instance);\n } else {\n if (obj) {\n if (attr.match(/^native_/)) attr = attr.substring(7);\n\n var val = obj.native[attr];\n if (_var === 'bind' && (!val || val === '0.0.0.0')) val = location.hostname;\n\n if (attr === 'secure') {\n link = link.replace('%' + _var + '%', val ? 'https' : 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', val);\n } else {\n link = link.replace('%' + _var + '%', val);\n }\n }\n } else {\n if (attr === 'secure') {\n link = link.replace('%' + _var + '%', 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', '');\n } else {\n link = link.replace('%' + _var + '%', '');\n }\n }\n }\n }\n return link;\n }\n\n function resolveLink(link, adapter, instance) {\n var vars = link.match(/%(\\w+)%/g);\n var _var;\n var v;\n var parts;\n if (vars) {\n // first replace simple patterns\n for (v = vars.length - 1; v >= 0; v--) {\n _var = vars[v];\n _var = _var.replace(/%/g, '');\n\n parts = _var.split('_');\n // like \"port\"\n if (_var.match(/^native_/)) {\n link = getLinkVar(_var, that.main.objects['system.adapter.' + adapter + '.' + instance], _var, link, instance);\n vars.splice(v, 1);\n } else\n if (parts.length === 1) {\n link = getLinkVar(_var, that.main.objects['system.adapter.' + adapter + '.' + instance], parts[0], link, instance);\n vars.splice(v, 1);\n } else\n // like \"web.0_port\"\n if (parts[0].match(/\\.[0-9]+$/)) {\n link = getLinkVar(_var, that.main.objects['system.adapter.' + parts[0]], parts[1], link, instance);\n vars.splice(v, 1);\n }\n }\n var links = {};\n var instances;\n var adptr = parts[0];\n // process web_port\n for (v = 0; v < vars.length; v++) {\n _var = vars[v];\n _var = _var.replace(/%/g, '');\n if (_var.match(/^native_/)) _var = _var.substring(7);\n\n parts = _var.split('_');\n if (!instances) {\n instances = [];\n for (var inst = 0; inst < 10; inst++) {\n if (that.main.objects['system.adapter.' + adptr + '.' + inst]) instances.push(inst);\n }\n }\n\n for (var i = 0; i < instances.length; i++) {\n links[adptr + '.' + i] = {\n instance: adptr + '.' + i,\n link: getLinkVar(_var, that.main.objects['system.adapter.' + adptr + '.' + i], parts[1], links[adptr + '.' + i] ? links[adptr + '.' + i].link : link, i)\n };\n }\n }\n\n var result;\n if (instances) {\n result = {};\n var count = 0;\n var firtsLink = '';\n for (var d in links) {\n if (links.hasOwnProperty(d)) {\n result[links[d].instance] = links[d].link;\n if (!firtsLink) firtsLink = links[d].link;\n count++;\n }\n }\n if (count < 2) {\n link = firtsLink;\n result = null;\n }\n }\n }\n return result || link;\n }\n\n this.replaceInLink = function (link, adapter, instance) {\n if (typeof link === 'object') {\n var links = JSON.parse(JSON.stringify(link));\n var first;\n for (var v in links) {\n if (links.hasOwnProperty(v)) {\n links[v] = resolveLink(links[v], adapter, instance);\n if (!first) first = links[v];\n }\n }\n links.__first = first;\n return links;\n } else {\n return resolveLink(link, adapter, instance);\n }\n };\n\n function updateLed(instanceId) {\n var tmp = instanceId.split('.');\n var adapter = tmp[2];\n var instance = tmp[3];\n\n var $led = that.$tab.find('.instance-led[data-instance-id=\"' + instanceId + '\"]');\n\n var common = that.main.objects[instanceId] ? that.main.objects[instanceId].common || {} : {};\n var state = (common.mode === 'daemon') ? 'green' : 'blue';\n var title = '';\n if (common.enabled && (!common.webExtension || !that.main.objects[instanceId].native.webInstance)) {\n title = '';\n title += '';\n\n if (that.main.states[adapter + '.' + instance + '.info.connection'] || that.main.objects[adapter + '.' + instance + '.info.connection']) {\n title += '';\n }\n title += '
        ' + _('Connected to host: ') + '';\n\n if (!that.main.states[instanceId + '.connected'] || !that.main.states[instanceId + '.connected'].val) {\n title += ((common.mode === 'daemon') ? '' + _('false') + '' : _('false'));\n state = (common.mode === 'daemon') ? 'red' : 'blue';\n } else {\n title += '' + _('true') + '';\n }\n title += '
        ' + _('Heartbeat: ') + '';\n\n if (!that.main.states[instanceId + '.alive'] || !that.main.states[instanceId + '.alive'].val) {\n title += ((common.mode === 'daemon') ? '' + _('false') + '' : _('false'));\n state = (common.mode === 'daemon') ? 'red' : 'blue';\n } else {\n title += '' + _('true') + '';\n }\n title += '
        ' + _('Connected to %s: ', adapter) + '';\n var val = that.main.states[adapter + '.' + instance + '.info.connection'] ? that.main.states[adapter + '.' + instance + '.info.connection'].val : false;\n if (!val) {\n state = state === 'red' ? 'red' : 'orange';\n title += '' + _('false') + '';\n } else {\n if (val === true) {\n title += '' + _('true') + '';\n } else {\n title += '' + val + '';\n }\n }\n title += '
        ';\n } else {\n state = (common.mode === 'daemon') ? 'gray' : 'blue';\n title = '';\n title += '';\n\n title += '';\n\n if (that.main.states[adapter + '.' + instance + '.info.connection'] || that.main.objects[adapter + '.' + instance + '.info.connection']) {\n title += '';\n }\n title += '
        ' + _('Connected to host: ') + '';\n\n if (!that.main.states[instanceId + '.connected'] || !that.main.states[instanceId + '.connected'].val) {\n title += _('false');\n } else {\n title += '' + _('true') + '';\n }\n title += '
        ' + _('Heartbeat: ') + '';\n if (!that.main.states[instanceId + '.alive'] || !that.main.states[instanceId + '.alive'].val) {\n title += _('false');\n } else {\n title += '' + _('true') + '';\n }\n title += '
        ' + _('Connected to %s: ', adapter) + '';\n var val = that.main.states[adapter + '.' + instance + '.info.connection'] ? that.main.states[adapter + '.' + instance + '.info.connection'].val : false;\n if (!val) {\n title += _('false');\n } else {\n if (val === true) {\n title += '' + _('true') + '';\n } else {\n title += '' + val + '';\n }\n }\n title += '
        ';\n }\n\n state = (state === 'blue') ? '' : state;\n\n $led.removeClass('led-red led-green led-orange led-blue').addClass('led-' + state).data('title', title);\n\n if (!$led.data('inited') && state !== 'gray') {\n $led.data('inited', true);\n\n $led.hover(function () {\n var text = '
        ' + $(this).data('title') + '
        ';\n var $big = $(text);\n\n $big.insertAfter($(this));\n $(this).data('big', $big[0]);\n var h = parseFloat($big.height());\n var top = Math.round($(this).position().top - ((h - parseFloat($(this).height())) / 2));\n if (h + top > (window.innerHeight || document.documentElement.clientHeight)) {\n top = (window.innerHeight || document.documentElement.clientHeight) - h;\n }\n if (top < 0) {\n top = 0;\n }\n $big.css({top: top}).on('click', function () {\n var big = $(this).data('big');\n $(big).remove();\n $(this).data('big', undefined);\n });\n }, function () {\n var big = $(this).data('big');\n $(big).remove();\n $(this).data('big', undefined);\n }).on('click', function () {\n $(this).trigger('hover');\n });\n }\n }\n\n /*function _createHead() {\n var text = '';\n // _('name'), _('instance'), _('title'), _('enabled'), _('host'), _('mode'), _('schedule'), '', _('platform'), _('loglevel'), _('memlimit'), _('alive'), _('connected')],\n text += '';\n //text += '';\n text += '';\n text += '' + _('instance') + '';\n text += '';\n text += '' + _('title') + '';\n\n if (that.main.tabs.hosts.list.length > 1) {\n text += '' + _('host') + '';\n }\n\n text += '' + _('schedule_group') + '';\n\n if (that.main.config.expertMode) {\n text += '' + _('restart') + '';\n text += '' + _('loglevel') + '';\n text += '' + _('memlimit') + '';\n text += '' + _('events') + '';\n }\n text += '' + _('RAM usage') + '';\n that.$gridHead.html(text);\n }*/\n\n function createHead() {\n var text = '';\n // _('name'), _('instance'), _('title'), _('enabled'), _('host'), _('mode'), _('schedule'), '', _('platform'), _('loglevel'), _('memlimit'), _('alive'), _('connected')],\n text += '' +\n '' + _('instance') + '' +\n '';\n text += '';\n text += '';\n // disabled, because no one use it\n if (false && that.main.config.expertMode) {\n text += '' + _('actions') + '';\n } else {\n text += '' + _('actions') + '';\n }\n text += '' + _('title') + '';\n\n if (that.main.tabs.hosts.list.length > 1) {\n text += '' + _('host') + '';\n }\n\n text += '' + _('schedule_group') + '';\n\n if (that.main.config.expertMode) {\n text += '' + _('restart') + '';\n text += '' + _('loglevel') + '';\n text += '' + _('memlimit') + '';\n text += '' + _('events') + '';\n }\n text += '' + _('RAM usage') + '';\n that.$gridHead.html(text);\n }\n\n function calculateTotalRam() {\n var host = that.main.states['system.host.' + that.main.currentHost + '.memRss'];\n var processes = 1;\n var mem = host ? host.val : 0;\n for (var i = 0; i < that.list.length; i++) {\n var obj = that.main.objects[that.list[i]];\n if (!obj || !obj.common) continue;\n if (obj.common.host !== that.main.currentHost) continue;\n if (obj.common.enabled && obj.common.mode === 'daemon') {\n var m = that.main.states[obj._id + '.memRss'];\n mem += m ? m.val : 0;\n processes++;\n }\n }\n mem = Math.round(mem);\n var $totalRam = that.$tab.find('#totalRam');\n if (mem.toString() !== $totalRam.text()) {\n $totalRam.html('' + mem + '');\n }\n var text = _('%s processes', processes);\n var $running_processes = that.$tab.find('#running_processes');\n if (text !== $running_processes.text()) {\n $running_processes.html('' + text + '')\n }\n }\n\n function calculateFreeMem() {\n if (that.main.states['system.host.' + that.main.currentHost + '.memAvailable']) {\n that.memState = 'memAvailable';\n } else if (that.main.states['system.host.' + that.main.currentHost + '.freemem']) {\n that.memState = 'freemem';\n }\n\n var host = that.main.states['system.host.' + that.main.currentHost + '.' + that.memState];\n if (host) {\n that.totalmem = that.totalmem || (that.main.objects['system.host.' + that.main.currentHost].native.hardware.totalmem / (1024 * 1024));\n var percent = Math.round((host.val / that.totalmem) * 100);\n var $freeMem = that.$tab.find('#freeMem');\n var strVal = tdp(host.val);\n if (strVal !== $freeMem.text()) {\n $freeMem.html('' + strVal + '');\n that.$tab.find('#freeMemPercent').html('' + percent + '%');\n }\n } else {\n that.$tab.find('.free-mem-label').hide();\n }\n }\n\n function calculateDiskMem() {\n var diskSize = that.main.states['system.host.' + that.main.currentHost + '.diskSize'];\n var diskFree = that.main.states['system.host.' + that.main.currentHost + '.diskFree'];\n var diskWarning = that.main.states['system.host.' + that.main.currentHost + '.diskWarning'];\n\n if (diskFree && diskFree.val && diskSize && diskSize.val) {\n if (diskWarning) {\n diskWarning = parseFloat(diskWarning.val);\n } else {\n diskWarning = 5;\n }\n\n var $diskFree = that.$tab.find('#diskFree');\n var size = (Math.round((diskFree.val / diskSize.val) * 1000) / 10);\n $diskFree.html('' + size + '');\n $diskFree.parent().attr('title', _('Size: %s, Free: %s', that.main.formatBytes(diskSize.val * 1024 * 1024), that.main.formatBytes(diskFree.val * 1024 * 1024)));\n } else {\n that.$tab.find('.tab-instances-info-disk').hide();\n }\n }\n\n function calculateRam(instanceId) {\n var mem;\n var common = that.main.objects[instanceId] ? that.main.objects[instanceId].common || {} : {};\n if (common.enabled && common.mode === 'daemon' && that.main.states[instanceId + '.memRss']) {\n mem = that.main.states[instanceId + '.memRss'].val;\n mem = parseFloat(mem) || 0;\n\n if (common.memoryLimitMB && common.memoryLimitMB <= mem) {\n mem = '' + mem.toFixed(1) + ' MB';\n } else {\n mem = mem.toFixed(1) + ' MB'\n }\n } else {\n mem = '';\n }\n return mem;\n }\n\n function showOneAdapter(rootElem, instanceId, form, justContent) {\n var text;\n var common = that.main.objects[instanceId] ? that.main.objects[instanceId].common || {} : {};\n var tmp = instanceId.split('.');\n var adapter = tmp[2];\n var instance = tmp[3];\n\n if (form === 'tile') {\n text = justContent ? '' : '
        ';\n text += justContent ? '' : '
        ';\n } else {\n // table\n text = justContent ? '' : '';\n\n var link = common.localLinks || common.localLink || '';\n var url = link ? that.replaceInLink(link, adapter, instance) : '';\n if (link) {\n if (typeof url === 'object') {\n link = '';\n } else {\n link = '';\n }\n }\n\n // State -\n // red - adapter is not connected or not alive,\n // orange - adapter is connected and alive, but device is not connected,\n // green - adapter is connected and alive, device is connected or no device,\n text += '
        ';\n\n // icon\n text += '' + (common.icon ? link + '' : '') + (link ? '
        ': '') + '';\n\n // name and instance\n text += '' + adapter + '.' + instance + '';\n\n var isRun = common.onlyWWW || common.enabled;\n // buttons\n text += '' +\n '' +\n '' +\n '';\n // disable, because no one use it\n if (false && that.main.config.expertMode) {\n text += '';\n }\n text += '' +\n (url ? '' : '') +\n '';\n\n var title = common.titleLang || common.title;\n if (typeof title === 'object') {\n title = title[systemLang] || title.en;\n }\n\n // title\n text += '' + (title || '') + '';\n\n // host - hide it if only one host\n if (that.main.tabs.hosts.list.length > 1) {\n if (!that.hostsText) {\n that.hostsText = '';\n for (var h = 0; h < that.main.tabs.hosts.list.length; h++) {\n var host = that.main.tabs.hosts.list[h] || '';\n that.hostsText += (that.hostsText ? ';' : '') + host.name;\n }\n }\n text += '' + (common.host || '') + '';\n }\n\n // schedule\n text += '' + (common.mode === 'schedule' ? (common.schedule || '') : '') + '';\n\n // scheduled restart (only experts)\n if (that.main.config.expertMode) {\n text += '' + (common.restartSchedule || '') + '';\n // debug level (only experts)\n text += '' + (common.loglevel || '') + '';\n // Max RAM (only experts)\n text += '' + (common.memoryLimitMB || '') + '';\n // Max RAM (only experts)\n if (isRun && that.main.states[instanceId + '.inputCount'] && that.main.states[instanceId + '.outputCount']) {\n text += '⇥' + that.main.states[instanceId + '.inputCount'].val + ' / ↦' + that.main.states[instanceId + '.outputCount'].val + '';\n } else {\n text += ' / ';\n }\n }\n\n text += '' + calculateRam(instanceId) + '';\n\n text += justContent ? '' : '';\n }\n if (!justContent) {\n rootElem.append(text);\n } else {\n that.$tab.find('.instance-adapter[data-instance-id=\"' + instanceId + '\"]').html(text);\n }\n // init buttons\n that.initButtons(instanceId, url);\n updateLed(instanceId);\n // init links\n that.$tab.find('.instance-editable[data-instance-id=\"' + instanceId + '\"]')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit');\n\n // init schedule editor\n that.$tab.find('.instance-schedule[data-instance-id=\"' + instanceId + '\"]').each(function () {\n if (!$(this).find('button').length) {\n $(this).append('');\n $(this).find('button').on('click', function () {\n var attr = $(this).data('name');\n var _instanceId = $(this).data('instance-id');\n showCronDialog(that.main.objects[_instanceId].common[attr] || '', function (newValue) {\n if (newValue !== null) {\n var obj = {common: {}};\n obj.common[attr] = newValue;\n that.main.socket.emit('extendObject', _instanceId, obj, function (err) {\n if (err) that.main.showError(err);\n });\n }\n })\n });\n }\n });\n\n that.$tab.find('.instance-name[data-instance-id=\"' + instanceId + '\"]').on('click', function () {\n var $btn = that.$tab.find('.instance-settings[data-instance-id=\"' + $(this).data('instance-id') + '\"]');\n if (!$btn.hasClass('small-button-empty')) {\n $btn.trigger('click');\n }\n }).css('cursor', 'pointer');\n }\n\n function applyFilter(filter) {\n if (filter === undefined) {\n filter = that.$tab.find('.instances-filter').val();\n }\n var invisible = [];\n if (filter) {\n var reg = new RegExp(filter);\n\n for (var i = 0; i < that.list.length; i++) {\n var obj = that.main.objects[that.list[i]];\n if (!obj || !obj.common) {\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]').hide();\n continue;\n }\n var isShow = 'hide';\n var title = obj.common.titleLang || obj.common.title;\n if (typeof title === 'object') {\n title = title[systemLang] || title.en;\n }\n\n if (obj.common.name && reg.test(obj.common.name)) {\n isShow = 'show';\n } else\n if (title && reg.test(title)) {\n isShow = 'show';\n } else\n if (filter === 'true') {\n isShow = that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]').find('instance-led').hasClass('led-green') ? 'show' : 'hide';\n } else\n if (filter === 'false') {\n isShow = that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]').find('instance-led').hasClass('led-green') ? 'hide' : 'show';\n }\n\n if (isShow === 'show' && that.filterHost && obj.common.host !== that.main.currentHost) isShow = 'hide';\n\n if (isShow === 'hide') invisible.push(that.list[i]);\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]')[isShow]();\n }\n } else {\n if (that.filterHost) {\n for (var j = 0; j < that.list.length; j++) {\n var _obj = that.main.objects[that.list[j]];\n if (!_obj || !_obj.common) {\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[j] + '\"]').hide();\n continue;\n }\n var _isShow = 'hide';\n if (_obj.common.host === that.main.currentHost) _isShow = 'show';\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[j] + '\"]')[_isShow]();\n }\n } else {\n that.$grid.find('.instance-adapter').show();\n }\n }\n var anyVisible = false;\n that.$grid.find('.instance-adapter').each(function () {\n if ($(this).is(':visible')) {\n anyVisible = true;\n return false;\n }\n });\n\n if (anyVisible) {\n that.$grid.find('.filtered-out').hide();\n } else {\n that.$grid.find('.filtered-out').show();\n }\n }\n\n function onQuickEditField(e) {\n var $this = $(this);\n var id = $this.data('instance-id');\n var attr = $this.data('name');\n var options = $this.data('options');\n var oldVal = $this.data('value');\n var innerHTML = this.innerHTML;\n var textAlign = $this.css('text-align');\n $this.css('text-align', 'left');\n\n $this.off('click').removeClass('select-id-quick-edit').css('position', 'relative');\n\n var css = 'cursor: pointer; position: absolute;width: 16px; height: 16px; top: 2px; border-radius: 6px; z-index: 3; background-color: lightgray';\n var type = 'text';\n var text;\n\n if (options) {\n var opt = options.split(';');\n text = '';\n }\n text = text || '';\n\n var timeout = null;\n\n $this.html(text +\n '
        ' +\n '
        ');\n\n var $input = (options) ? $this.find('select') : $this.find('input');\n\n $this.find('.select-id-quick-edit-cancel').off('click').on('click', function (e) {\n if (timeout) clearTimeout(timeout);\n timeout = null;\n e.preventDefault();\n e.stopPropagation();\n $this.html(innerHTML)\n .off('click')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit')\n .css('text-align', textAlign);\n });\n\n $this.find('.select-id-quick-edit-ok').off('click').on('click', function () {\n $this.trigger('blur');\n });\n\n $input.val(oldVal);\n\n $input.blur(function () {\n if (timeout) clearTimeout(timeout);\n\n timeout = setTimeout(function () {\n timeout = null;\n var val = $(this).val();\n\n if (JSON.stringify(val) !== JSON.stringify(oldVal)) {\n that.main.socket.emit('getObject', id, function (err, obj) {\n if (obj) {\n obj.common = obj.common || {};\n obj.common[attr] = val;\n if (attr === 'title' && obj.common.titleLang) {\n delete obj.common.titleLang;\n }\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n if (err) that.main.showError(err);\n });\n } else {\n console.log('Object ' + id + ' does not exist: ' + err);\n }\n });\n oldVal = '' + oldVal + '';\n } else {\n oldVal = innerHTML;\n }\n $this.html(oldVal)\n .off('click')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit')\n .css('text-align', textAlign);\n }.bind(this), 100);\n }).on('keyup', function (e) {\n if (e.which === 13) $(this).trigger('blur');\n if (e.which === 27) {\n if (oldVal === undefined) oldVal = '';\n $this.html(oldVal)\n .off('click')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit')\n .css('text-align', textAlign);\n }\n });\n\n if (typeof e === 'object') {\n e.preventDefault();\n e.stopPropagation();\n }\n\n setTimeout(function () {\n $input.focus();\n }, 100);\n }\n\n function showCronDialog(value, cb) {\n value = (value || '').replace(/\"/g, '').replace(/'/g, '');\n try {\n setupCron(value, cb);\n } catch (e) {\n alert(_('Cannot parse value as cron'));\n }\n }\n\n this.prepare = function () {\n /*this.$dialogCron.dialog({\n autoOpen: false,\n modal: true,\n width: 700,\n height: 550,\n resizable: false,\n title: _('Cron expression'),\n buttons: [\n {\n id: 'dialog_cron_insert',\n text: _('Insert'),\n click: function () {\n var val = $('#div-cron').cron('value');\n that.$dialogCron.dialog('close');\n that.editor.insert('\"' + val + '\"');\n that.editor.focus();\n }\n },\n {\n id: 'dialog_cron_clear',\n text: _('Clear'),\n click: function () {\n $('#div-cron').cron('value', '');\n }\n },\n {\n id: 'dialog_cron_callback',\n text: _('Set CRON'),\n click: function () {\n }\n },\n {\n text: _('Cancel'),\n click: function () {\n that.$dialogCron.dialog('close');\n }\n }\n ]\n });\n\n $('#div-cron').cron({value: ''});\n*/\n var $filter = that.$tab.find('.instances-filter');\n var $filterClear = that.$tab.find('.instances-filter-clear');\n\n $filter.on('change', function () {\n var val = $(this).val();\n if (val) {\n $(this).addClass('input-not-empty');\n $filterClear.show();\n } else {\n $(this).removeClass('input-not-empty');\n $filterClear.hide();\n }\n that.main.saveConfig('instancesFilter', val);\n applyFilter(val);\n }).on('keyup', function () {\n if (that.filterTimeout) clearTimeout(that.filterTimeout);\n that.filterTimeout = setTimeout(function () {\n $filter.trigger('change');\n }, 300);\n });\n if (that.main.config.instancesFilter && that.main.config.instancesFilter[0] !== '{') {\n $filter.addClass('input-not-empty').val(that.main.config.instancesFilter);\n $filterClear.show();\n } else {\n $filterClear.hide();\n }\n\n //$('#load_grid-instances').show();\n that.$tab.find('.btn-instances-expert-mode').on('click', function () {\n that.main.config.expertMode = !that.main.config.expertMode;\n that.main.saveConfig('expertMode', that.main.config.expertMode);\n that.updateExpertMode();\n that.main.tabs.adapters.updateExpertMode();\n });\n\n if (that.main.config.expertMode) {\n that.$tab.find('.btn-instances-expert-mode').addClass('red lighten-3');\n }\n\n that.$tab.find('.btn-instances-reload').on('click', function () {\n that.init(true, true);\n });\n\n /*that.$grid.find('#btn-instances-form').button({\n icons: {primary: 'ui-icon-refresh'},\n text: false\n }).css({width: '1.5em', height: '1.5em'}).attr('title', _('reload')).on('click', function () {\n that.main.config.instanceForm = that.main.config.instanceForm === 'tile' ? 'list' : 'tile';\n that.main.saveCell('expertMode', that.main.config.expertMode);\n that.init(true);\n });*/\n\n $filterClear.on('click', function () {\n $filter.val('').trigger('change');\n });\n\n this.$tab.find('.btn-instances-host').off('click').on('click', function () {\n that.filterHost = !that.filterHost;\n if (that.filterHost) {\n that.$tab.find('.btn-instances-host').addClass('red lighten-3');\n } else {\n that.$tab.find('.btn-instances-host').removeClass('red lighten-3');\n }\n that.main.saveConfig('instancesFilterHost', that.filterHost);\n\n setTimeout(function () {\n applyFilter();\n }, 50);\n });\n\n this.filterHost = this.main.config.instancesFilterHost || false;\n\n if (this.filterHost) {\n this.$tab.find('.btn-instances-host').addClass('red lighten-3');\n } else {\n this.$tab.find('.btn-instances-host').removeClass('red lighten-3');\n }\n };\n\n this.updateExpertMode = function () {\n that.init(true);\n if (that.main.config.expertMode) {\n that.$tab.find('.btn-instances-expert-mode').addClass('red lighten-3');\n } else {\n that.$tab.find('.btn-instances-expert-mode').removeClass('red lighten-3');\n }\n };\n\n this.replaceLink = function (_var, adapter, instance, elem) {\n _var = _var.replace(/%/g, '');\n if (_var.match(/^native_/)) _var = _var.substring(7);\n // like web.0_port\n var parts;\n if (_var.indexOf('_') === -1) {\n parts = [\n adapter + '.' + instance,\n _var\n ]\n } else {\n parts = _var.split('_');\n // add .0 if not defined\n if (!parts[0].match(/\\.[0-9]+$/)) parts[0] += '.0';\n }\n\n if (parts[1] === 'protocol') parts[1] = 'secure';\n\n if (_var === 'instance') {\n setTimeout(function () {\n var link;\n if (elem) {\n link = that.$tab.find('#' + elem).data('src');\n } else {\n link = that.$tab.find('#a_' + adapter + '_' + instance).attr('href');\n }\n\n link = link.replace('%instance%', instance);\n if (elem) {\n that.$tab.find('#' + elem).data('src', link);\n } else {\n that.$tab.find('#a_' + adapter + '_' + instance).attr('href', link);\n }\n }, 0);\n return;\n }\n\n this.main.socket.emit('getObject', 'system.adapter.' + parts[0], function (err, obj) {\n if (obj) {\n setTimeout(function () {\n var link;\n if (elem) {\n link = that.$tab.find('#' + elem).data('src');\n } else {\n link = that.$tab.find('#a_' + adapter + '_' + instance).attr('href');\n }\n if (link) {\n if (parts[1] === 'secure') {\n link = link.replace('%' + _var + '%', obj.native[parts[1]] ? 'https' : 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', obj.native[parts[1]]);\n } else {\n link = link.replace('%' + _var + '%', obj.native[parts[1]]);\n }\n }\n if (elem) {\n that.$tab.find('#' + elem).data('src', link);\n } else {\n that.$tab.find('#a_' + adapter + '_' + instance).attr('href', link);\n }\n }\n }, 0);\n }\n });\n };\n\n /*this.replaceLinks = function (vars, adapter, instance, elem) {\n if (typeof vars !== 'object') vars = [vars];\n for (var t = 0; t < vars.length; t++) {\n this.replaceLink(vars[t], adapter, instance, elem);\n }\n };*/\n\n this._replaceLink = function (link, _var, adapter, instance, callback) {\n // remove %%\n _var = _var.replace(/%/g, '');\n\n if (_var.match(/^native_/)) _var = _var.substring(7);\n // like web.0_port\n var parts;\n if (_var.indexOf('_') === -1) {\n parts = [adapter + '.' + instance, _var];\n } else {\n parts = _var.split('_');\n // add .0 if not defined\n if (!parts[0].match(/\\.[0-9]+$/)) parts[0] += '.0';\n }\n\n if (parts[1] === 'protocol') parts[1] = 'secure';\n\n this.main.socket.emit('getObject', 'system.adapter.' + parts[0], function (err, obj) {\n if (obj && link) {\n if (parts[1] === 'secure') {\n link = link.replace('%' + _var + '%', obj.native[parts[1]] ? 'https' : 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', obj.native[parts[1]]);\n } else {\n link = link.replace('%' + _var + '%', obj.native[parts[1]]);\n }\n }\n } else {\n console.log('Cannot get link ' + parts[1]);\n link = link.replace('%' + _var + '%', '');\n }\n setTimeout(function () {\n callback(link, adapter, instance);\n }, 0);\n });\n };\n\n this._replaceLinks = function (link, adapter, instance, arg, callback) {\n if (!link) {\n return callback(link, adapter, instance, arg);\n }\n var vars = link.match(/%(\\w+)%/g);\n if (!vars) {\n return callback(link, adapter, instance, arg);\n }\n if (vars[0] === '%ip%') {\n link = link.replace('%ip%', location.hostname);\n this._replaceLinks(link, adapter, instance, arg, callback);\n return;\n }\n if (vars[0] === '%instance%') {\n link = link.replace('%instance%', instance);\n this._replaceLinks(link, adapter, instance, arg, callback);\n return;\n }\n this._replaceLink(link, vars[0], adapter, instance, function (link, adapter, instance) {\n this._replaceLinks(link, adapter, instance, arg, callback);\n }.bind(this));\n };\n\n this._postInit = function (update, showTip) {\n if (this.main.currentHost && typeof this.$grid !== 'undefined' && (!this.$grid.data('inited') || update)) {\n this.$grid.data('inited', true);\n this.list.sort();\n var onlyWWW = [];\n // move all adapters with not onlyWWW and noConfig to the bottom\n for (var l = this.list.length - 1; l >= 0; l--) {\n if (this.main.objects[this.list[l]] &&\n this.main.objects[this.list[l]].common &&\n !this.main.objects[this.list[l]].common.localLink &&\n !this.main.objects[this.list[l]].common.localLinks &&\n this.main.objects[this.list[l]].common.noConfig\n ) {\n onlyWWW.push(this.list[l]);\n this.list.splice(l, 1);\n }\n }\n this.list.sort();\n onlyWWW.sort();\n for (l = 0; l < onlyWWW.length; l++) {\n this.list.push(onlyWWW[l]);\n }\n\n createHead();\n this.$grid.html('');\n var ts = Date.now();\n for (var i = 0; i < this.list.length; i++) {\n var obj = this.main.objects[this.list[i]];\n if (!obj) continue;\n showOneAdapter(this.$grid, this.list[i], this.main.config.instanceForm);\n }\n console.log(Date.now() - ts);\n\n this.$grid.append('' + _('Filtered out') + '');\n\n that.$tab.find('#currentHost').html(this.main.currentHost);\n\n if (that.main.tabs.hosts.list.length > 1) {\n this.$tab.find('.btn-instances-host').show();\n } else {\n this.$tab.find('.btn-instances-host').hide();\n this.filterHost = false;\n }\n\n applyFilter();\n\n calculateTotalRam();\n calculateFreeMem();\n calculateDiskMem();\n that.restoreScroll();\n if (showTip) {\n that.main.showToast(that.$tab.find('.main-toolbar-table'), _('Updated'));\n }\n }\n };\n\n this.getInstances = function (callback) {\n this.main.socket.emit('getForeignObjects', 'system.adapter.*', 'state', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.objects[id] = res[id];\n }\n that.main.socket.emit('getForeignStates', '*.info.connection', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.states[id] = res[id];\n }\n\n that.main.socket.emit('getForeignStates', 'system.adapter.*', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.states[id] = res[id];\n }\n\n that.main.socket.emit('getForeignObjects', 'system.adapter.*', 'instance', function (err, res) {\n that.main.instances.splice(0, that.main.instances.length); // because of pointer in admin.main\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n var obj = res[id];\n that.main.objects[id] = obj;\n\n if (obj.type === 'instance') {\n that.main.instances.push(id);\n }\n }\n if (callback) callback();\n });\n\n });\n });\n });\n };\n\n this.init = function (update, showMessage) {\n if (this.inited && !update) {\n return;\n }\n if (!this.main.objectsLoaded) {\n setTimeout(function () {\n that.init(update, showMessage);\n }, 250);\n return;\n }\n var count = 0;\n\n count++;\n this.getInstances(function () {\n if (!--count) that._postInit(update, showMessage);\n });\n count++;\n this.main.tabs.hosts.getHosts(function () {\n if (!--count) that._postInit(update, showMessage);\n });\n\n if (!this.inited) {\n this.inited = true;\n // subscribe objects and states\n this.main.subscribeObjects('system.adapter.*');\n this.main.subscribeStates('system.adapter.*');\n this.main.subscribeObjects('system.host.*');\n this.main.subscribeStates('system.host.*');\n this.main.subscribeStates('*.info.connection');\n }\n };\n\n this.saveScroll = function () {\n this.scrollTop = this.$tab.find('.grid-main-div').scrollTop();\n };\n this.restoreScroll = function () {\n if (this.scrollTop) {\n this.$tab.find('.grid-main-div').scrollTop(this.scrollTop);\n }\n };\n this.destroy = function () {\n if (this.inited) {\n this.saveScroll();\n this.$grid.data('inited', false);\n this.inited = false;\n // subscribe objects and states\n this.main.unsubscribeObjects('system.adapter.*');\n this.main.unsubscribeStates('system.host.*');\n this.main.unsubscribeObjects('system.host.*');\n this.main.unsubscribeStates('system.adapter.*');\n this.main.unsubscribeStates('*.info.connection');\n }\n };\n\n this.stateChange = function (id, state) {\n this.main.states[id] = state;\n if (this.$grid) {\n var parts = id.split('.');\n var last = parts.pop();\n id = parts.join('.');\n\n if (state) {\n if (last === 'diskFree' || last === 'diskWarning') {\n // update disk size\n calculateDiskMem();\n } else if (last === that.memState) {\n // update total ram\n calculateFreeMem();\n } else if (last === 'memRss') {\n // update total ram\n calculateTotalRam();\n // update instance ram\n var $mem = that.$tab.find('.memUsage[data-instance-id=\"' + id + '\"]');\n var mem = calculateRam(id);\n if ($mem.length && $mem.text() !== mem) {\n $mem.html('' + mem + '');\n }\n } else if (last === 'outputCount') {\n // update total ram\n that.$tab.find('.instance-out[data-instance-id=\"' + id + '\"]').html('↦' + state.val + '');\n } else if (last === 'inputCount') {\n that.$tab.find('.instance-in[data-instance-id=\"' + id + '\"]').html('⇥' + state.val + '');\n }\n\n if (this.list.indexOf(id) !== -1) {\n if (last === 'alive' || last === 'connected') {\n updateLed(id);\n }\n return;\n }\n id = 'system.adapter.' + parts[0] + '.' + parts[1];\n if (this.list.indexOf(id) !== -1 && last === 'connection') {\n updateLed(id);\n }\n }\n }\n };\n\n this.objectChange = function (id, obj, action) {\n // Update Instance Table\n if (id.match(/^system\\.adapter\\.[-\\w]+\\.[0-9]+$/)) {\n if (obj) {\n if (this.list.indexOf(id) === -1) {\n // add new instance\n this.list.push(id);\n\n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that.init(true);\n }, 200);\n\n // open automatically config dialog\n if (!obj.common.noConfig) {\n setTimeout(function () {\n if (window.location.hash.indexOf('/config/') === -1) {\n // open configuration dialog\n that.main.navigate({\n tab: 'instances',\n dialog: 'config',\n params: id\n });\n }\n }, 2000);\n }\n } else {\n if (id.indexOf('.web.') !== -1) {\n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that.init(true);\n }, 200);\n } else {\n // update just one line or\n this.$grid.find('.instance-adapter[data-instance-id=\"' + id + '\"]').html(showOneAdapter(this.$grid, id, this.main.config.instanceForm, true));\n }\n }\n } else {\n var i = this.list.indexOf(id);\n if (i !== -1) {\n this.list.splice(i, 1);\n this.$grid.find('.instance-adapter[data-instance-id=\"' + id + '\"]').remove();\n }\n }\n } else\n // update list if some host changed\n if (id.match(/^system\\.host\\.[-\\w]+$/)) {\n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that.init(true);\n }, 200);\n }\n };\n\n this.initButtons = function (id, url) {\n id = id ? '[data-instance-id=\"' + id + '\"]' : '';\n\n var $e = that.$grid.find('.instance-edit' + id).off('click').on('click', function () {\n that.onEdit($(this).attr('data-instance-id'));\n });\n\n //var buttonSize = {width: '2em', height: '2em'}\n\n if (!$e.find('.ui-button-icon-primary').length) {\n $e/*.button({\n icons: {primary: 'ui-icon-pencil'},\n text: false\n }).css({width: '2em', height: '2em'})*/.attr('title', _('edit'));\n }\n\n $e = that.$grid.find('.instance-settings' + id).off('click')\n .on('click', function () {\n that.main.navigate({\n tab: 'instances',\n dialog: 'config',\n params: $(this).data('instance-id')\n });\n });\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-note'}, text: false}).css({width: '2em', height: '2em'}).attr('title', _('config'));\n }*/\n $e.each(function () {\n var _id = $(this).attr('data-instance-id');\n if (main.objects[_id] && main.objects[_id].common && main.objects[_id].common.noConfig) {\n //$(this).button('disable');\n $(this).addClass('disabled');\n }\n });\n\n $e = that.$grid.find('.instance-reload' + id).off('click')\n .on('click', function () {\n that.main.socket.emit('extendObject', $(this).attr('data-instance-id'), {}, function (err) {\n if (err) that.main.showError(err);\n });\n });\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-refresh'}, text: false}).attr('title', _('reload'));\n }*/\n\n $e = that.$grid.find('.instance-del' + id).off('click')\n .on('click', function () {\n var id = $(this).attr('data-instance-id');\n if (that.main.objects[id] && that.main.objects[id].common && that.main.objects[id].common.host) {\n var name = id.replace(/^system\\.adapter\\./, '');\n that.main.confirmMessage(_('Are you sure you want to delete the instance %s?', name), null, 'help', function (result) {\n if (result) {\n that.main.cmdExec(that.main.objects[id].common.host, 'del ' + id.replace('system.adapter.', ''), function (exitCode) {\n if (!exitCode) that.main.tabs.adapters.init(true);\n });\n }\n });\n }\n });\n\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-trash'}, text: false}).attr('title', _('delete'));\n } else {\n //$e.button('enable');\n $e.removeClass('disabled');\n }*/\n $e = that.$grid.find('.instance-issue' + id).off('click')\n .on('click', function () {\n that.main.navigate({\n tab: 'instances',\n dialog: 'issue',\n params: $(this).data('instance-id')\n });\n });\n /*if (!$e.find('.ui-button-icon-primary').length) {\n //$e.button({icons: {primary: 'ui-icon-pin-s'}, text: false}).css({width: '2em', height: '2em'}).attr('title', _('bug'));\n //Material-Hack\n $e.button().attr('title', _('bug')).empty().append('bug_report');\n }*/\n\n that.$grid.find('.instance-image' + id).each(function () {\n if (!$(this).data('installed')) {\n $(this).data('installed', true);\n $(this).hover(function () {\n var text = '
        ';\n var $big = $(text);\n $big.insertAfter($(this));\n $(this).data('big', $big[0]);\n var h = parseFloat($big.height());\n var top = Math.round($(this).position().top - ((h - parseFloat($(this).height())) / 2));\n if (h + top > (window.innerHeight || document.documentElement.clientHeight)) {\n top = (window.innerHeight || document.documentElement.clientHeight) - h;\n }\n if (top < 0) {\n top = 0;\n }\n $big.css({top: top});\n }, function () {\n var big = $(this).data('big');\n $(big).remove();\n $(this).data('big', undefined);\n });\n }\n });\n $e = that.$grid.find('.instance-stop-run' + id).off('click')\n .on('click', function () {\n var id = $(this).attr('data-instance-id');\n //$(this).button('disable');\n $(this).addClass('disabled');\n that.main.socket.emit('extendObject', id, {common: {enabled: !that.main.objects[id].common.enabled}}, function (err) {\n if (err) that.main.showError(err);\n });\n });\n\n if (!$e.find('.ui-button-icon-primary').length) {\n $e.each(function () {\n var id = $(this).attr('data-instance-id');\n var enabled = that.main.objects[id].common.enabled;\n\n if (enabled) {\n $e\n .addClass('instance-running')\n .attr('title', _('Activated. Click to stop.'))\n .find('i')\n .html('pause');\n } else {\n $e\n .removeClass('instance-running')\n .attr('title', _('Deactivated. Click to start.'))\n .find('i')\n .html('play_arrow');\n }\n\n /*$e.button({icons: {primary: enabled ? 'ui-icon-pause': 'ui-icon-play'}, text: false})\n //.css({'background-color': enabled ? 'lightgreen' : '#FF9999'})\n //.css({'background-color': enabled ? 'rgba(0, 255, 0, 0.15)' : 'rgba(255, 0, 0, 0.15)'})\n .css({'background-color': enabled ? 'rgba(0, 255, 0, 0.3)' : 'rgba(255, 0, 0, 0.3)'})\n .attr('title', enabled ? _('Activated. Click to stop.') : _('Deactivated. Click to start.'));*/\n });\n }\n\n $e = that.$grid.find('.instance-web' + id).off('click')\n .on('click', function () {\n var _link = $(this).data('link');\n if (typeof _link === 'object') {\n var menu = '';\n for (var m in _link) {\n if (!_link.hasOwnProperty(m)) continue;\n if (m === '__first') continue;\n var port = _link[m].match(/^https?:\\/\\/[-.\\w]+:(\\d+)\\/?/);\n var https = _link[m].match(/^https:\\/\\//);\n\n menu += '
      • ' + m + (port ? ' :' + port[1] : '') + (https ? ' - SSL' : '') + '
      • ';\n }\n menu += '
      • ' + _('Close') + '
      • ';\n\n var $instancesMenu = $('#instances-menu');\n if ($instancesMenu.data('inited')) $instancesMenu.menu('destroy');\n\n var pos = $(this).position();\n $instancesMenu.html(menu);\n if (!$instancesMenu.data('inited')) {\n $instancesMenu.data('inited', true);\n $instancesMenu.mouseleave(function () {\n $(this).hide();\n });\n }\n\n $instancesMenu.menu().css({\n left: pos.left,\n top: pos.top\n }).show();\n\n $instancesMenu.find('.instances-menu-link').off('click').on('click', function () {\n if ($(this).data('link')) window.open($(this).data('link'), $(this).data('instance-id'));\n $('#instances-menu').hide();\n });\n\n } else {\n window.open($(this).data('link'), $(this).data('instance-id'));\n }\n });\n if (typeof url === 'object') $e.data('link', url);\n\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-image'}, text: false}).attr('title', _('open web page'));\n } else {\n $e.removeClass('disabled');\n //$e.button('enable');\n }*/\n };\n\n this.resize = function (width, height) {\n //this.$grid.setGridHeight(height - 150).setGridWidth(width);\n };\n}\n","function Intro(main) {\n 'use strict';\n\n var that = this;\n\n this.$tab = $('#tab-intro');\n this.$tiles = this.$tab.find('.tab-intro-cards');\n this.main = main;\n this.inited = false;\n this.$template = $('#intro-template');\n\n function readInstances(callback) {\n that.main.socket.emit('getObjectView', 'system', 'instance', {startkey: 'system.adapter.', endkey: 'system.adapter.\\u9999'}, function (err, doc) {\n if (err) {\n if (callback) callback (err, []);\n } else {\n if (doc.rows.length === 0) {\n if (callback) callback (err, []);\n } else {\n that.main.instances = [];\n for (var i = 0; i < doc.rows.length; i++) {\n that.main.instances.push(doc.rows[i].id);\n that.main.objects[doc.rows[i].id] = doc.rows[i].value;\n }\n if (callback) callback(err, that.main.instances);\n }\n }\n });\n }\n\n /**\n * Format number in seconds to time text\n * @param {!number} seconds\n * @returns {String}\n */\n function formatSeconds(seconds) {\n var days = Math.floor(seconds / (3600 * 24));\n seconds %= 3600 * 24;\n var hours = Math.floor(seconds / 3600);\n if (hours < 10) {\n hours = '0' + hours;\n }\n seconds %= 3600;\n var minutes = Math.floor(seconds / 60);\n if (minutes < 10) {\n minutes = '0' + minutes;\n }\n seconds %= 60;\n seconds = Math.floor(seconds);\n if (seconds < 10) {\n seconds = '0' + seconds;\n }\n var text = '';\n if (days) {\n text += days + ' ' + _('daysShortText') + ' ';\n }\n text += hours + ':' + minutes + ':' + seconds;\n\n return text;\n }\n\n /**\n * Format bytes to MB or GB\n * @param {!number} bytes\n * @returns {String}\n */\n function formatRam(bytes) {\n var GB = Math.floor(bytes / (1024 * 1024 * 1024) * 10) / 10;\n bytes %= (1024 * 1024 * 1024);\n var MB = Math.floor(bytes / (1024 * 1024) * 10) / 10;\n var text = '';\n if (GB > 1) {\n text += GB + ' GB ';\n } else {\n text += MB + ' MB ';\n }\n\n return text;\n }\n\n function formatSpeed(mhz) {\n return mhz + ' MHz';\n }\n\n /**\n * FormatObject for host informations\n * @type type\n */\n var formatInfo = {\n 'Uptime': formatSeconds,\n 'System uptime': formatSeconds,\n 'RAM': formatRam,\n 'Speed': formatSpeed,\n 'Disk size': that.main.formatBytes,\n 'Disk free': that.main.formatBytes\n };\n\n function copyToClipboard(e) {\n var $input = $('\\n';\n }\n }\n\n var title = attr;\n // translations\n if (part === 'common' && systemDictionary['common_' + attr] && systemDictionary['common_' + attr][systemLang]) {\n title = _('common_' + attr);\n }\n\n // workaround for materialize\n if (typeof object[attr] === 'boolean') {\n text += '' + title + '\\n';\n } else {\n text += '\\n';\n }\n\n text += '
        \\n\\n';\n text += '
        \\n';\n }\n\n that.$dialog.find(selector).html(text);\n /*that.$dialog.find(selector).find('.autocomplete').each(function () {\n $(this).mautocomplete({\n data: {\n 'state': null,\n 'switch': null,\n 'button': null,\n 'value': null,\n 'level': null,\n 'indicator': null,\n 'value.temperature': null,\n 'value.humidity': null,\n 'level.temperature': null,\n 'level.dimmer': null\n },\n minLength: 0 // The minimum length of the input for the autocomplete to start. Default: 1.\n });\n });*/\n }\n\n function saveObjectFields(selector, object) {\n var $htmlId = that.$dialog.find(selector);\n $htmlId.find('.object-tab-edit-string').each(function () {\n object[$(this).data('attr')] = $(this).val();\n });\n $htmlId.find('.object-tab-edit-number').each(function () {\n object[$(this).data('attr')] = parseFloat($(this).val());\n });\n $htmlId.find('.object-tab-edit-boolean').each(function () {\n object[$(this).data('attr')] = $(this).prop('checked');\n });\n var err = null;\n $htmlId.find('.object-tab-edit-object').each(function () {\n try {\n object[$(this).data('attr')] = JSON.parse($(this).val());\n } catch (e) {\n err = $(this).data('attr');\n return false;\n }\n });\n\n if (object.write !== undefined) {\n if (object.write === 'false' || object.write === '0' || object.write === 0) object.write = false;\n if (object.write === 'true' || object.write === '1' || object.write === 1) object.write = true;\n }\n\n if (object.read !== undefined) {\n if (object.read === 'false' || object.read === '0' || object.read === 0) object.read = false;\n if (object.read === 'true' || object.read === '1' || object.read === 1) object.read = true;\n }\n\n if (object.min === null) {\n delete object.min;\n }\n if (object.min !== undefined) {\n var f = parseFloat(object.min);\n if (f.toString() === object.min.toString()) object.min = f;\n\n if (object.min === 'false') object.min = false;\n if (object.min === 'true') object.min = true;\n }\n if (object.max === null) {\n delete object.max;\n }\n if (object.max !== undefined) {\n var m = parseFloat(object.max);\n if (m.toString() === object.max.toString()) object.max = m;\n\n if (object.max === 'false') object.max = false;\n if (object.max === 'true') object.max = true;\n }\n if (object.def === null) {\n delete object.def;\n }\n\n if (object.def !== undefined) {\n var d = parseFloat(object.def);\n if (d.toString() === object.def.toString()) object.def = d;\n\n if (object.def === 'false') object.def = false;\n if (object.def === 'true') object.def = true;\n }\n\n // common part cannot have \"true\" or \"false\". Only true and false.\n if (selector.indexOf('common') !== -1) {\n for (var attr in object) {\n if (object.hasOwnProperty(attr)) {\n if (object[attr] === 'true') {\n object[attr] = true;\n }\n if (object[attr] === 'false') {\n object[attr] = false;\n }\n if (parseFloat(object[attr]).toString() === object[attr]) {\n object[attr] = parseFloat(object[attr]);\n }\n }\n }\n }\n\n return err;\n }\n\n function showMessage(text, duration, isError) {\n if (typeof duration === 'boolean') {\n isError = duration;\n duration = 3000;\n }\n that.main.showToast(that.$dialog, text, null, duration, isError);\n }\n\n // only init if required\n this._prepare = function () {\n if (this.prepared) {\n return;\n }\n this.prepared = true;\n this.$dialogSave.on('click', function () {\n that.save();\n });\n this.$dialog.find('.dialog-editobject-buttons .btn-cancel').on('click', function () {\n that.editor.setValue('');\n that.$dialogSave.addClass('disabled');\n that.main.navigate();\n });\n\n this.$dialog.find('.btn-add-common').on('click', function () {\n that.$dialogNewField.find('.object-tab-new-icon').show();\n that.$dialogNewField.modal('open');\n var $name = that.$dialogNewField.find('.object-tab-new-name');\n $name.data('type', 'common').focus();\n if (!$name.hasClass('autocomplete')) {\n $name.addClass('autocomplete');\n $name.mautocomplete({\n data: {\n type: null,\n desc: null,\n min: null,\n max: null,\n def: null,\n role: null,\n unit: null,\n read: null,\n write: null,\n states: null\n },\n minLength: 0 // The minimum length of the input for the autocomplete to start. Default: 1.\n });\n }\n $name.focus()\n });\n\n this.$dialog.find('.btn-add-native').on('click', function () {\n that.$dialogNewField.find('.object-tab-new-icon').hide();\n that.$dialogNewField.modal('open');\n var $name = that.$dialogNewField.find('.object-tab-new-name');\n if ($name.hasClass('autocomplete')) {\n $name.mautocomplete('destroy');\n $name.removeClass('autocomplete');\n }\n M.updateTextFields('#dialog-new-field');\n $name.data('type', 'native').focus();\n });\n this.$dialogNewField.find('.object-tab-new-name').keypress(function (e) {\n if (e.which === 13) {\n that.$dialogNewField.find('.btn-add').trigger('click');\n }\n });\n\n if (!this.editor) {\n this.editor = ace.edit('view-object-raw');\n this.editor.getSession().setMode('ace/mode/json');\n this.editor.$blockScrolling = true;\n this.editor.getSession().on('change', function() {\n that.$dialogSave.removeClass('disabled');\n });\n }\n this.$dialogNewField.modal();\n\n this.$dialog.find('.tabs').mtabs({\n onShow: function (tab) {\n if (!tab) return;\n var id = $(tab).attr('id');\n if (id === 'object-tab-common') {\n showMessage(_('Drop the icons here'));\n } else \n if (id === 'object-tab-raw') {\n var obj = that.saveFromTabs();\n\n if (!obj) return false;\n\n that.editor.setValue(JSON.stringify(obj, null, 2));\n } else if (id === 'object-tab-raw') {\n var _obj;\n try {\n _obj = JSON.parse(that.editor.getValue());\n } catch (e) {\n that.main.showMessage(e, _('Parse error'), 'error_outline');\n if (!that.main.noSelect) {\n that.$dialog.find('.tabs').mtabs('select', 'object-tab-raw');\n }\n return false;\n }\n that.load(_obj);\n }\n that.main.saveConfig('object-edit-active', id);\n return true;\n }\n });\n\n this.$dialogNewField.find('.btn-add').on('click', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n var $tab = that.$dialogNewField.find('.object-tab-new-name');\n var type = $tab.data('type') || 'common';\n var field = $tab.val().trim();\n var obj = that.saveFromTabs();\n\n if (!field || field.indexOf(' ') !== -1) {\n that.main.showError(_('Invalid field name: %s', field));\n return;\n }\n if (obj[type][field] !== undefined) {\n that.main.showError(_('Field %s yet exists!', field));\n return;\n }\n\n obj[type][field] = '';\n\n that.load(obj);\n that.$dialogNewField.find('.object-tab-new-name').val('');\n that.$dialogNewField.modal('close');\n that.$dialogSave.removeClass('disabled');\n });\n this.$dialogNewField.find('.btn-cancel').on('click', function (e) {\n that.$dialogNewField.find('.object-tab-new-name').val('');\n });\n this.$dialog.find('.edit-object-name').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n this.$dialog.find('.edit-object-type').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n });\n this.$dialog.find('.object-tab-rights input').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n });\n\n installFileUpload(this.$dialog.find('#object-tab-common'), 50000, function (err, text) {\n if (err) {\n showMessage(err, true);\n } else {\n if (!text.match(/^data:image\\//)) {\n showMessage(_('Unsupported image format'), true);\n return;\n }\n\n that.$dialogSave.removeClass('disabled');\n that.iconVal = text;\n\n var $tab = that.$dialog.find('.icon-editor');\n $tab.find('.icon').show().html('');\n $tab.find('.icon .treetable-icon').attr('src', text);\n }\n });\n this.$dialog.find('.icon-editor .icon-upload').off('click').on('click', function () {\n that.$dialog.find('.drop-file').trigger('click');\n });\n this.$dialog.find('.icon-editor .icon-clear').off('click').on('click', function () {\n if (that.iconVal) {\n that.iconVal = null;\n that.$dialog.find('.icon-editor').hide().appendTo(that.$dialog);\n that.$dialogSave.removeClass('disabled');\n }\n });\n };\n\n this.init = function () {\n this._prepare();\n if (this.inited) {\n return;\n }\n this.inited = true;\n var id = that.main.navigateGetParams();\n var isSetDefaultState = !!(id || '').match(/,def$/);\n id = id.replace(/,def$/, '');\n\n var obj = this.main.objects[id];\n if (!obj) return;\n\n if (this.main.config['object-edit-active'] !== undefined && !that.main.noSelect) {\n this.$dialog.find('.tabs').mtabs('select', this.main.config['object-edit-active']);\n }\n\n // fill users\n var text = '';\n var name;\n for (var u = 0; u < this.main.tabs.users.list.length; u++) {\n name = translateName(this.main.objects[this.main.tabs.users.list[u]].common.name);\n text += '';\n }\n this.$dialog.find('.object-tab-acl-owner').html(text);\n\n // fill groups\n text = '';\n for (u = 0; u < this.main.tabs.users.groups.length; u++) {\n name = translateName(this.main.objects[this.main.tabs.users.groups[u]].common.name);\n text += '';\n }\n this.$dialog.find('.object-tab-acl-group').html(text);\n this.load(obj);\n\n if (isSetDefaultState) {\n this.$dialog.data('cb', function (_obj) {\n if (_obj.type === 'state') {\n // create state\n that.main.socket.emit('getState', _obj._id, function (err, state) {\n if (!state || state.val === null || state.val === undefined) {\n that.main.socket.emit('setState', _obj._id, _obj.common.def === undefined ? null : _obj.common.def, true);\n }\n });\n }\n });\n } else {\n this.$dialog.data('cb', null);\n }\n that.$dialogSave.addClass('disabled');\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.inited = false;\n }\n };\n\n this.load = function (obj) {\n if (!obj) return;\n obj.common = obj.common || {};\n obj.native = obj.native || {};\n obj.acl = obj.acl || {};\n this.$dialog.find('.title-id').text(obj._id);\n this.$dialog.find('.edit-object-name').val(obj.common ? translateName(obj.common.name) : obj._id);\n this.$dialog.find('.edit-object-type').val(obj.type);\n this.$dialog.find('.object-tab-acl-owner').val(obj.acl.owner || 'system.user.admin');\n this.$dialog.find('.object-tab-acl-group').val(obj.acl.ownerGroup || 'system.group.administrator');\n\n this.$dialog.find('.icon-editor').hide().appendTo(this.$dialog);\n\n loadObjectFields('.object-tab-common-table', obj.common || {}, 'common', obj.type);\n loadObjectFields('.object-tab-native-table', obj.native || {}, 'native', obj.type);\n\n if (obj.common.icon !== undefined) {\n this.iconVal = obj.common.icon;\n this.$dialog.find('.object-tab-common-table').prepend(this.$dialog.find('.icon-editor').show());\n this.$dialog.find('.icon-editor .icon').html(that.main.getIconFromObj(obj));\n } else {\n this.iconVal = null;\n }\n\n this.$dialog.find('.object-tab-field-delete').on('click', function () {\n var part = $(this).data('part');\n var field = $(this).data('attr');\n that.main.confirmMessage(_('Delete attribute'), _('Please confirm'), 'error_outline', function (result) {\n if (result) {\n var _obj = that.saveFromTabs();\n delete _obj[part][field];\n that.load(_obj);\n }\n });\n });\n\n obj.acl = obj.acl || {};\n if (obj.acl.object === undefined) obj.acl.object = 0x666;\n\n this.$dialog.find('#object-tab-acl-obj-owner-read') .prop('checked', obj.acl.object & 0x400);\n this.$dialog.find('#object-tab-acl-obj-owner-write').prop('checked', obj.acl.object & 0x200);\n this.$dialog.find('#object-tab-acl-obj-group-read'). prop('checked', obj.acl.object & 0x40);\n this.$dialog.find('#object-tab-acl-obj-group-write').prop('checked', obj.acl.object & 0x20);\n this.$dialog.find('#object-tab-acl-obj-every-read'). prop('checked', obj.acl.object & 0x4);\n this.$dialog.find('#object-tab-acl-obj-every-write').prop('checked', obj.acl.object & 0x2);\n\n if (obj.type !== 'state') {\n this.$dialog.find('.object-tab-acl-state').hide();\n } else {\n this.$dialog.find('.object-tab-acl-state').show();\n if (obj.acl.state === undefined) obj.acl.state = 0x666;\n\n this.$dialog.find('#object-tab-acl-state-owner-read') .prop('checked', obj.acl.state & 0x400);\n this.$dialog.find('#object-tab-acl-state-owner-write').prop('checked', obj.acl.state & 0x200);\n this.$dialog.find('#object-tab-acl-state-group-read'). prop('checked', obj.acl.state & 0x40);\n this.$dialog.find('#object-tab-acl-state-group-write').prop('checked', obj.acl.state & 0x20);\n this.$dialog.find('#object-tab-acl-state-every-read'). prop('checked', obj.acl.state & 0x4);\n this.$dialog.find('#object-tab-acl-state-every-write').prop('checked', obj.acl.state & 0x2);\n }\n\n var _obj = JSON.parse(JSON.stringify(obj));\n this.editor.setValue(JSON.stringify(_obj, null, 2));\n if (_obj._id) delete _obj._id;\n if (_obj.common) delete _obj.common;\n if (_obj.type) delete _obj.type;\n if (_obj.native) delete _obj.native;\n if (_obj.acl) delete _obj.acl;\n this.$dialog.find('#view-object-rest').val(JSON.stringify(_obj, null, ' '));\n this.$dialog.find('select').select();\n\n // workaround for materialize checkbox problem\n this.$dialog.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n // enable save\n this.$dialog.find('input').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n\n this.$dialog.find('select').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n });\n\n this.$dialog.find('textarea').on('change', function () {\n that.$dialogSave.removeClass('disabled');\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n\n if (obj.common.color !== undefined) {\n var time = Date.now();\n\n var $color = this.$dialog.find('.object-tab-edit-string[data-attr=\"color\"]').parent();\n $color.prepend('color_lens' + _('Color') + '');\n $color.colorpicker({\n component: '.btn',\n color: $color,\n container: true\n }).colorpicker('setValue', obj.common.color || '#fff').on('showPicker.colorpicker', function (/* event */) {\n }).on('changeColor.colorpicker', function (event){\n if (Date.now() - time > 100) {\n $color.find('input').val(event.color.toHex()).trigger('change');\n }\n });\n }\n\n };\n\n this.saveFromTabs = function () {\n var obj;\n try {\n obj = this.$dialog.find('#view-object-rest').val();\n if (!obj) {\n obj = {};\n } else {\n obj = JSON.parse(obj);\n }\n } catch (err) {\n this.main.showMessage(_('Cannot parse.'), _('Error in %s', err), 'error_outline');\n return false;\n }\n\n obj.common = {};\n obj.native = {};\n obj.acl = {};\n obj._id = this.$dialog.find('.title-id').text();\n obj.common.name = this.$dialog.find('.edit-object-name').val(); // no support of multilanguage if edited\n obj.type = this.$dialog.find('.edit-object-type').val();\n var err = saveObjectFields('.object-tab-common-table', obj.common);\n if (err) {\n this.main.showMessage(_('Cannot parse.'), _('Error in %s', err), 'error_outline');\n return false;\n }\n err = saveObjectFields('.object-tab-native-table', obj.native);\n if (err) {\n this.main.showMessage(_('Cannot parse.'), _('Error in %s', err), 'error_outline');\n return false;\n }\n obj.acl.object = 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-owner-read').prop('checked') ? 0x400 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-owner-write').prop('checked') ? 0x200 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-group-read').prop('checked') ? 0x40 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-group-write').prop('checked') ? 0x20 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-every-read').prop('checked') ? 0x4 : 0;\n obj.acl.object |= this.$dialog.find('#object-tab-acl-obj-every-write').prop('checked') ? 0x2 : 0;\n\n obj.acl.owner = this.$dialog.find('.object-tab-acl-owner').val();\n obj.acl.ownerGroup = this.$dialog.find('.object-tab-acl-group').val();\n\n if (obj.type === 'state') {\n obj.acl.state = 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-owner-read').prop('checked') ? 0x400 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-owner-write').prop('checked') ? 0x200 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-group-read').prop('checked') ? 0x40 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-group-write').prop('checked') ? 0x20 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-every-read').prop('checked') ? 0x4 : 0;\n obj.acl.state |= this.$dialog.find('#object-tab-acl-state-every-write').prop('checked') ? 0x2 : 0;\n }\n\n if (this.iconVal !== null && this.iconVal !== undefined) {\n obj.common.icon = this.iconVal;\n }\n\n return obj;\n };\n\n this.saveFromRaw = function () {\n var obj;\n try {\n obj = JSON.parse(this.editor.getValue());\n } catch (e) {\n this.main.showMessage(e, _('Parse error'), 'error_outline');\n if (!that.main.noSelect) {\n this.$dialog.find('.tabs').mtabs('select', 'object-tab-raw');\n }\n return false;\n }\n return obj;\n };\n\n this.save = function () {\n if (this.main.config['object-edit-active'] === 'object-tab-raw') {\n var _obj = this.saveFromRaw();\n if (!_obj) return;\n\n this.main.socket.emit('setObject', _obj._id, _obj, function (err) {\n if (err) {\n that.main.showError(err);\n } else {\n var cb = that.$dialog.data('cb');\n if (cb) cb(_obj);\n that.$dialogSave.addClass('disabled');\n that.main.navigate();\n }\n });\n } else {\n var obj = that.saveFromTabs();\n if (!obj) return;\n this.main.socket.emit('getObject', obj._id, function (err, _obj) {\n if (err) {\n return that.main.showError(err);\n }\n\n _obj.common = obj.common;\n _obj.native = obj.native;\n _obj.acl = obj.acl;\n that.main.socket.emit('setObject', obj._id, _obj, function (err) {\n if (err) {\n that.main.showError(err);\n } else {\n var cb = that.$dialog.data('cb');\n if (cb) cb(obj);\n that.$dialogSave.addClass('disabled');\n that.main.navigate();\n }\n });\n });\n }\n };\n\n this.allStored = function () {\n return that.$dialogSave.hasClass('disabled');\n };\n\n}","function Enums(main) {\n 'use strict';\n\n // enum is first level like enum.function or enum.rooms\n // category is second level like enum.function.light or enum.room.living_room\n\n var that = this;\n\n this.main = main;\n this.list = [];\n this.$gridEnum = $('#tab-enums');\n this.$gridList = this.$gridEnum.find('.tab-enums-list');\n this.$grid = this.$gridEnum.find('.tab-enums-objects');\n this.updateTimers = null;\n this.editMode = false;\n this.isTiles = false;\n\n var tasks = [];\n var standardEnums = {\n 'enum.rooms': {\n \"_id\": \"enum.rooms\",\n \"common\": {\n \"icon\": \"home\",\n \"name\": {\n \"en\": \"Rooms\",\n \"cn\": \"场景\"\n },\n \"desc\": {\n \"en\": \"List of the rooms\",\n \"cn\": \"List of the rooms\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\"\n },\n 'enum.functions': {\n \"_id\": \"enum.functions\",\n \"common\": {\n \"icon\": \"lightbulb_outline\",\n \"name\": {\n \"en\": \"Functions\",\n \"cn\": \"功能\"\n },\n \"desc\": {\n \"en\": \"List of the functions\",\n \"cn\": \"List of the functions\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\"\n },\n 'enum.favorites': {\n \"_id\": \"enum.favorites\",\n \"common\": {\n \"icon\": \"favorite_border\",\n \"name\": {\n \"en\": \"Favorites\",\n \"cn\": \"收藏\"\n },\n \"desc\": {\n \"en\": \"List of favorites objects\",\n \"cn\": \"List of favorites objects\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n }\n };\n\n var standardGroups = {\n 'enum.rooms': {\n \"enum.rooms.living_room\": {\n \"_id\": \"enum.rooms.living_room\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ4MC4wNDYgNDgwLjA0NiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDgwLjA0NiA0ODAuMDQ2OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGc+PGc+PHBhdGggZD0iTTMyOC4wMzQsMzIwLjA0NmgtMjR2LTg4YzAtNC40MTgtMy41ODItOC04LThoLTI1NmMtNC40MTgsMC04LDMuNTgyLTgsOHY4OGgtMjRjLTQuNDE4LDAtOCwzLjU4Mi04LDh2MTI4YzAsNC40MTgsMy41ODIsOCw4LDhoMjR2MTZoMTZ2LTE2aDI0MHYxNmgxNnYtMTZoMjRjNC40MTgsMCw4LTMuNTgyLDgtOHYtMTI4QzMzNi4wMzQsMzIzLjYyOCwzMzIuNDUyLDMyMC4wNDYsMzI4LjAzNCwzMjAuMDQ2eiBNODAuMDM0LDQ0OC4wNDZoLTY0di0xMTJoNjRWNDQ4LjA0NnogTTI0MC4wMzQsNDQ4LjA0NmgtMTQ0di02NGgxNDRWNDQ4LjA0N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LjcyYy00LjQxOCwwLTgsMy41ODItOCw4djEyOGMwLDQuNDE4LDMuNTgyLDgsOCw4aDIwOGM0LjQxOCwwLDgtMy41ODIsOC04di0xMjhDMjgwLjAzNCw1MS42MjgsMjc2LjQ1Miw0OC4wNDYsMjcyLjAzNCw0OC4wNDZ6IE0xNjguMDM0LDE5LjMyNmwyOC43MiwyOC43MmgtNTcuNDRMMTY4LjAzNCwxOS4zMjZ6IE0yNjQuMDM0LDE3Ni4wNDZoLTE5MnYtMTEyaDE5MlYxNzYuMDQ2eiIvPjwvZz48L2c+PGc+PGc+PHBhdGggZD0iTTg4LjAzNCw4MC4wNDZ2ODBoMTYwdi04MEg4OC4wMzR6IE0yMzIuMDM0LDE0NC4wNDZoLTEyOHYtNDhoMTI4VjE0NC4wNDZ6Ii8+PC9nPjwvZz48L3N2Zz4=\",\n \"name\": {\n \"en\": \"Living room\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.rooms.sleeping_room\": {\n \"_id\": \"enum.rooms.sleeping_room\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNDgwIDQ4MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDgwIDQ4MDsiIHhtbDpzcGFjZT0icHJlc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wLjcyLDI5Niw1MC43MnogTTE4NCw4Mi43MmMtNC40MTgsMC04LTMuNTgyLTgtOA0KCQljMC00LjQxOCwzLjU4Mi04LDgtOHM4LDMuNTgyLDgsOEMxOTIsNzkuMTM4LDE4OC40MTgsODIuNzIsMTg0LDgyLjcyeiBNMjk2LDgyLjcyYy00LjQxOCwwLTgtMy41ODItOC04YzAtNC40MTgsMy41ODItOCw4LTgNCgkJczgsMy41ODIsOCw4QzMwNCw3OS4xMzgsMzAwLjQxOCw4Mi43MiwyOTYsODIuNzJ6Ii8+DQo8L2c+DQoNCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Nursery\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.rooms.wc\": {\n \"_id\": \"enum.rooms.wc\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMiA1MTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMjU2cHgiIGhlaWdodD0iMjU2cHgiPgo8Zz4KCTxnPgoJCTxwYXRoIGQ9Ik00NTEsMzE3di0zMGMwLTI0LjgxMy0yMC4xODctNDUtNDUtNDVIMjI2Yy01LjI1OSwwLTEwLjMwN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C9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K\",\n \"name\": {\n \"en\": \"Garage\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n }\n\n\n // todo\n //\n },\n 'enum.functions': {\n \"enum.functions.light\": {\n \"_id\": \"enum.functions.light\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgJy0vL1czQy8vRFREIFNWRyAxLjEvL0VOJyAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIj4KICA8Zz4KICAgIDxnPgogICAgICA8cGF0aCBkPSJtMjU2LDkyLjNjLTc0LjIsMC0xMjcuOCw1NS4zLTEzNi4zLDExNC43LTUuMywzOS42IDcuNSw3OC4yIDM0LjEsMTA3LjQgMjMuNCwyNSAzNi4yLDU4LjQgMzYuMiw5Mi44bC0uMSw1NC4yYzAsMjEuOSAxOC4xLDM5LjYgNDAuNSwzOS42aDUyLjJjMjIuNCwwIDQwLjUtMTcuNyA0MC41LTM5LjZsLjEtNTQuMmMwLTM1LjQgMTEuNy02Ny44IDM0LjEtOTAuNyAyNC41LTI1IDM3LjMtNTcuMyAzNy4zLTkwLjctMC4xLTc0LjEtNjMtMTMzLjUtMTM4LjYtMTMzLjV6bTQ2LjgsMzY5LjFjMCwxMC40LTguNSwxOC44LTE5LjIsMTguOGgtNTIuMmMtMTAuNywwLTE5LjItOC4zLTE5LjItMTguOHYtMjRoOTAuNXYyNHptMzkuNi0xNTkuNWMtMjYuNiwyNy4xLTQwLjUsNjQuNi00MC41LDEwNS4zdjkuNGgtOTAuNXYtOS40YzAtMzguNi0xNi03Ny4xLTQyLjYtMTA2LjMtMjMuNC0yNS0zMy01Ny4zLTI4LjgtOTAuNyA3LjUtNTAgNTQtOTcgMTE2LjEtOTcgNjUsMCAxMTcuMiw1MS4xIDExNy4yLDExMi42IDAsMjguMS0xMC43LDU1LjItMzAuOSw3Ni4xeiIvPgogICAgICA8cmVjdCB3aWR0aD0iMjEuMyIgeD0iMjQ1LjMiIHk9IjExIiBoZWlnaHQ9IjUwIi8+CiAgICAgIDxwb2x5Z29uIHBvaW50cz0iMzg1LjEsMTA3LjQgNDAwLDEyMi4zIDQzNi41LDg3LjIgNDIxLjUsNzIuMyAgICIvPgogICAgICA8cmVjdCB3aWR0aD0iNTIuMiIgeD0iNDQ4LjgiIHk9IjIzNi4yIiBoZWlnaHQ9IjIwLjkiLz4KICAgICAgPHJlY3Qgd2lkdGg9IjUyLjIiIHg9IjExIiB5PSIyMzYuMiIgaGVpZ2h0PSIyMC45Ii8+CiAgICAgIDxwb2x5Z29uIHBvaW50cz0iOTAuMSw3Mi4yIDc1LjEsODcuMSAxMTEuNiwxMjIuMiAxMjYuNSwxMDcuMyAgICIvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==\",\n \"name\": {\n \"en\": \"Light\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.blinds\": {\n \"_id\": \"enum.functions.blinds\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTEyIDUxMjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJCTxwYXRoIGQ9Ik0wLDB2NTEyaDUxMlYwSDB6IE00ODIsNDgySDMwVjMwaDQ1MlY0ODJ6Ii8+DQo8L2c+DQo8Zz4NCgkJPHBhdGggZD0iTTYwLDYwdjM5MmgzOTJWNjBINjB6IE0yNDEsNDIySDkwVjI3MWgxNTFWNDIyeiBNMjQxLDI0MUg5MFY5MGgxNTFWMjQxeiBNNDIyLDQyMkgyNzFWMjcxaDE1MVY0MjJ6IE00MjIsMjQxSDI3MVY5MGgxNTENCgkJCVYyNDF6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==\",\n \"name\": {\n \"en\": \"Blinds\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.weather\": {\n \"_id\": \"enum.functions.weather\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNjAgNjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDYwIDYwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNNTQuOTQ5LDI4LjI1MWMwLjAxOC0wLjA2OSwwLjAzOS0wLjEzNSww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MjguMzEsNTQuOTQ5LDI4LjI1MXogTTQ4LDI0DQoJYy0yLjIxOCwwLTQuMzEyLDAuODk1LTYsMi41MzRDNDAuMzEyLDI0Ljg5NSwzOC4yMTgsMjQsMzYsMjRzLTQuMzEyLDAuODk1LTYsMi41MzRDMjguMzEyLDI0Ljg5NSwyNi4yMTgsMjQsMjQsMjQNCglzLTQuMzEyLDAuODk1LTYsMi41MzRDMTYuMzEyLDI0Ljg5NSwxNC4yMTgsMjQsMTIsMjRjLTEuNzUsMC0zLjQxOCwwLjU2Ni00Ljg3NSwxLjYwNUM4LjMyNywxNC4wNDQsMTguMTI3LDUsMzAsNQ0KCXMyMS42NzMsOS4wNDQsMjIuODc1LDIwLjYwNUM1MS40MTgsMjQuNTY2LDQ5Ljc1LDI0LDQ4LDI0eiIvPg0KPC9zdmc+DQo=\",\n \"name\": {\n \"en\": \"Weather\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.heating\": {\n \"_id\": \"enum.functions.heating\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTEyIDUxMjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTQ0MC4zNzEsMTU5LjI5MWM4LjA1MSwwLDE1LjQwMy0zLjAzNSwyMC45ODMtOC4wMTZINTA0LjVjNC4xNDIsMCw3LjUtMy4zNTgsNy41LTcuNWMwLT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MzIsOC41MzJWNDA4LjMwN3oiLz4NCjwvZz4NCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Heating\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.backlight\": {\n \"_id\": \"enum.functions.backlight\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTExLjk5MSA1MTEuOTkxIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTEuOTkxIDUxMS45OTE7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik05MS40OSwzMzYuNTcybC0yMS4zMzMsNDIuNjY3Yy0yLjYyNCw1LjI2OS0wLjQ5MSwxMS42NjksNC43NzksMTQuMzE1YzEuNTM2LDAuNzQ3LDMuMTU3LDEuMTA5LDQuNzU3LDEuMTA5DQoJCWMzLjkwNCwwLDcuNjU5LTIuMTc2LDkuNTM2LTUuODg4bDIxLjMzMy00Mi42NjdjMi42NDUtNS4yNjksMC41MTItMTEuNjY5LTQuNzU3LTE0LjMxNQ0KCQlDMTAwLjU1NywzMjkuMTY5LDk0LjE1NywzMzEuMzI0LDkxLjQ5LDMzNi41NzJ6Ii8+DQoJPHBhdGggZD0iTTUwNy41NTQsMTgzLjM1NmMtMi43NzMtMi4wMjctNi4zMzYtMi41MzktOS42LTEuNDkzbC00OS40MDgsMTYuNDY5Yy0xMy4wOTksNC4zNzMtMjEuODg4LDE2LjU3Ni0yMS44ODgsMzAuMzc5djM2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y4zOTIsMC41NTVjMi4yMTksMCw0LjM5NS0wLjY4Myw2LjIyOS0yLjAyN2MyLjc5NS0xLjk4NCw0LjQzNy01LjIwNSw0LjQzNy04LjY0VjE5MS45OTYNCgkJQzUxMS45OTEsMTg4LjU2MSw1MTAuMzQ5LDE4NS4zNCw1MDcuNTU0LDE4My4zNTZ6IE0xNTkuOTkxLDQ3OS45OTZjLTI1Ljc0OSwwLTQ3LjMxNy0xOC4zNDctNTIuMjY3LTQyLjY2N2gxMDQuNTMzDQoJCUMyMDcuMzA5LDQ2MS42NDksMTg1Ljc0MSw0NzkuOTk2LDE1OS45OTEsNDc5Ljk5NnogTTI5Mi4wODcsNDE1Ljk5NmgtNjguMDk2aC0xMjhIMjcuOTE3bDc0LjY2Ny0xNDkuMzMzaDExNC44MzcNCgkJTDI5Mi4wODcsNDE1Ljk5NnogTTIwMi42NTgsMjAyLjY2MmM1Ljg2NywwLDEwLjY2Nyw0LjgsMTAuNjY3LDEwLjY2N3YzMkgxMDYuNjU4di0zMmMwLTUuODY3LDQuOC0xMC42NjcsMTAuNjY3LTEwLjY2N0gyMDIuNjU4eg0KCQkgTTQ5MC42NTgsMzQ3Ljg3OGwtMzUuMzcxLTExLjgxOWMtNC4zNzMtMS40MjktNy4yOTYtNS41MDQtNy4yOTYtMTAuMTEydi05Ny4yNTljMC00LjYwOCwyLjkyMy04LjY2MSw3LjI5Ni0xMC4xMTINCgkJbDM1LjM3MS0xMS43OTdWMzQ3Ljg3OHoiLz4NCjwvZz4NCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Backlight\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.household\": {\n \"_id\": \"enum.functions.household\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0ndXRmLTgnPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgJy0vL1czQy8vRFREIFNWRyAxLjEvL0VOJyAnaHR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Q1LjMiIHk9IjExIiBoZWlnaHQ9IjUwIi8+CiAgICAgIDxwb2x5Z29uIHBvaW50cz0iMzg1LjEsMTA3LjQgNDAwLDEyMi4zIDQzNi41LDg3LjIgNDIxLjUsNzIuMyAgICIvPgogICAgICA8cmVjdCB3aWR0aD0iNTIuMiIgeD0iNDQ4LjgiIHk9IjIzNi4yIiBoZWlnaHQ9IjIwLjkiLz4KICAgICAgPHJlY3Qgd2lkdGg9IjUyLjIiIHg9IjExIiB5PSIyMzYuMiIgaGVpZ2h0PSIyMC45Ii8+CiAgICAgIDxwb2x5Z29uIHBvaW50cz0iOTAuMSw3Mi4yIDc1LjEsODcuMSAxMTEuNiwxMjIuMiAxMjYuNSwxMDcuMyAgICIvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==\",\n \"name\": {\n \"en\": \"Household\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.audio\": {\n \"_id\": \"enum.functions.audio\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNDc3LjIxNiA0NzcuMjE2IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NzcuMjE2IDQ3Ny4yMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxwYXRoIGQ9Ik00NTMuODU4LDEwNS4xMTZ2LTkxLjZjMC00LjMtMi4xLTguNC01LjUtMTAuOWMtMy41LTIuNS04LTMuMy0xMi4xLTJsLTI3Mi45LDg2LjdjLTUuNiwx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Ni44MTYsNDAzLjE1OCwzNjMuMTE2LDM3NS4xNTgsMzYzLjExNnoiLz4NCjwvZz4NCjwvc3ZnPg0K\",\n \"name\": {\n \"en\": \"Audio/Music\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n },\n \"enum.functions.security\": {\n \"_id\": \"enum.functions.security\",\n \"common\": {\n \"icon\": \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTEyIDUxMjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTI1Niw0MC4wMWMtNS41MzgsMC05Ljk5LDQuNDYtOS45OSw5Ljk5YzAsNS4xNDcsMy44NzIsOS40Myw4Ljk5LDkuOTM4YzUuOTI1LDAuNTg4LDEwLjk5LTQuMDI3LDEwLjk5LTkuOTM4DQoJCUMyNjUuOTksNDQuNDYyLDI2MS41Myw0MC4wMSwyNTYsNDAuMDF6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNNDU2LDYwYy0yNy41NywwLTUwLTIyLjQzLTUwLTUwYzAtNS41MjItNC40NzgtMTAtMTAtMTBIMTE2Yy01LjUyMiwwLTEwLDQuNDc4LTEwLDEwYzAsMjcuNTctMjIuNDMsNTAtNTAsNTANCgkJYy01LjUyMiwwLTEwLDQuNDc4LTEwLDEwdjE2My4xOWMwLDEyNy4xNzcsODIuODk1LDI0MS4xMzUsMjA3LjEyOCwyNzguMzg5YzAuOTM3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uOTI5bDUwLTUwDQoJCUMzMDYuOTc2LDIxOS4xNjYsMzA2Ljk3NiwyMTIuODM0LDMwMy4wNzEsMjA4LjkyOHoiLz4NCjwvZz4NCg0KPC9zdmc+DQo=\",\n \"name\": {\n \"en\": \"Security\"\n },\n \"members\": []\n },\n \"type\": \"enum\"\n }\n // todo\n }\n };\n\n var selectId = function () {\n if (!that.$grid || !that.$grid.selectId) return;\n selectId = that.$grid.selectId.bind(that.$grid);\n return that.$grid.selectId.apply(that.$grid, arguments);\n };\n\n function enumRename(oldId, newId, newCommon, callback) {\n if (tasks.length) {\n var task = tasks.shift();\n if (task.name === 'delObject') {\n that.main.socket.emit(task.name, task.id, function () {\n setTimeout(function () {\n enumRename(undefined, undefined, undefined, callback);\n }, 0);\n });\n } else {\n that.main.socket.emit(task.name, task.id, task.obj, function () {\n setTimeout(function () {\n enumRename(undefined, undefined, undefined, callback);\n }, 0);\n });\n }\n } else {\n _enumRename(oldId, newId, newCommon, function () {\n if (tasks.length) {\n enumRename(undefined, undefined, undefined, callback);\n } else {\n if (callback) callback();\n }\n });\n }\n }\n\n function _enumRename(oldId, newId, newCommon, callback) {\n //Check if this name exists\n if (oldId !== newId && that.main.objects[newId]) {\n showMessage(_('Name yet exists!'), true);\n that.init(true);\n if (callback) callback();\n } else {\n if (oldId === newId) {\n if (newCommon && (newCommon.name !== undefined || newCommon.icon !== undefined || newCommon.color !== undefined)) {\n tasks.push({name: 'extendObject', id: oldId, obj: {common: newCommon}});\n }\n if (callback) callback();\n } else if (that.main.objects[oldId] && that.main.objects[oldId].common && that.main.objects[oldId].common.nondeletable) {\n showMessage(_('Change of enum\\'s id \"%s\" is not allowed!', oldId), true);\n that.init(true);\n if (callback) callback();\n } else {\n var len = oldId.length + 1;\n var children = [];\n for (var e = 0; e < that.list.length; e++) {\n if (that.list[e].substring(0, len) === oldId + '.') {\n children.push(that.list[e]);\n }\n }\n\n that.main.socket.emit('getObject', oldId, function (err, obj) {\n setTimeout(function () {\n if (obj) {\n obj._id = newId;\n if (obj._rev) delete obj._rev;\n if (newCommon && newCommon.name !== undefined) obj.common.name = newCommon.name;\n if (newCommon && newCommon.icon !== undefined) obj.common.icon = newCommon.icon;\n if (newCommon && newCommon.color !== undefined) obj.common.color = newCommon.color;\n tasks.push({name: 'delObject', id: oldId});\n tasks.push({name: 'setObject', id: newId, obj: obj});\n // Rename all children\n var count = 0;\n for (var i = 0; i < children.length; i++) {\n var n = children[i].replace(oldId + '.', newId + '.');\n count++;\n _enumRename(children[i], n, null, function () {\n if (!--count && callback) callback();\n });\n }\n if (!children.length && callback) {\n callback();\n }\n }\n }, 0);\n });\n }\n }\n }\n\n function enumAddChild(parent, newId, common, callback) {\n if (that.main.objects[newId]) {\n showMessage(_('Name yet exists!'), true);\n return false;\n }\n\n that.main.socket.emit('setObject', newId, {\n _id: newId,\n common: {\n name: common.name,\n members: [],\n icon: common.icon,\n color: common.color\n },\n type: 'enum'\n }, callback);\n return true;\n }\n\n function prepareNewEnum(parent) {\n var text = '';\n var id;\n if (parent) {\n var name = parent.replace(/[.#\\\\\\/&?]+/g, '-');\n\n if (standardGroups[parent]) {\n for (id in standardGroups[parent]) {\n if (standardGroups[parent].hasOwnProperty(id) && that.list.indexOf(id) === -1) {\n text += '
      • ' + that.main.getIconFromObj(standardGroups[parent][id]) + getName(standardGroups[parent][id]) + '
      • ';\n }\n }\n }\n if (text) {\n text += '
      • ';\n }\n text += '
      • control_point' + _('custom group') + '
      • ';\n\n that.$gridEnum.find('#btn-new-group-' + name).html(text);\n that.$gridEnum.find('.btn-new-group-btn[data-target=\"btn-new-group-' + name + '\"]').dropdown({\n constrainWidth: false\n });\n that.$gridEnum.find('#btn-new-group-' + name).find('.new-group-item').off('click').on('click', function () {\n var id = $(this).data('id');\n var parent = $(this).data('enum');\n if (!id) {\n createOrEditEnum(null, parent);\n } else {\n var name = parent.replace(/[.#\\\\\\/&?]+/g, '-');\n that.main.saveConfig('enums-active', 'enum-' + name);\n that.main.socket.emit('setObject', id, standardGroups[parent][id], function (err) {\n if (err) {\n that.main.showError(err);\n }\n });\n }\n });\n } else {\n for (id in standardEnums) {\n if (standardEnums.hasOwnProperty(id) && that.list.indexOf(id) === -1) {\n text += '
      • ' + that.main.getIconFromObj(standardEnums[id]) + getName(standardEnums[id]) + '
      • ';\n }\n }\n\n if (text) {\n text += '
      • ';\n }\n text += '
      • control_point' + _('custom enum') + '
      • ';\n that.$gridEnum.find('#btn-new-enum').html(text);\n that.$gridEnum.find('.btn-new-enum-btn').dropdown({\n constrainWidth: false\n });\n that.$gridEnum.find('.new-enum-item').off('click').on('click', function () {\n var id = $(this).data('id');\n if (!id) {\n createOrEditEnum(null);\n } else {\n var name = id.replace(/[.#\\\\\\/&?]+/g, '-');\n that.main.saveConfig('enums-active', 'enum-' + name);\n that.main.socket.emit('setObject', id, standardEnums[id], function (err) {\n if (err) {\n that.main.showError(err);\n }\n });\n }\n });\n }\n }\n\n this.prepare = function () {\n this.isTiles = (this.main.config.enumIsTiles !== undefined && this.main.config.enumIsTiles !== null) ? this.main.config.enumIsTiles : true;\n };\n\n function getName(objects, id) {\n var name;\n if (!id) {\n name = objects;\n } else {\n name = objects[id];\n }\n if (name && name.common && name.common.name) {\n name = translateName(name.common.name);\n } else {\n var parts = id.split('.');\n name = parts.pop();\n name = name[0].toUpperCase() + name.substring(1).toLowerCase();\n }\n return name;\n }\n\n function drawChip(id, group) {\n var text = '';\n text += '
        ' +\n that.main.getIcon(id) +\n '' +\n '' + getName(that.main.objects, id) + '' +\n// '' + id + '' +\n '' +\n 'close' +\n '
        ';\n return text;\n }\n\n function drawEnum(id, $page, scrollTop) {\n var obj = that.main.objects[id];\n var name = id.replace(/[.#\\\\\\/&?]+/g, '-');\n var text =\n '
        ' +\n '
        ' +\n ' library_add' +\n '
          ' +\n ' ' +\n ' edit' +\n ' ' +\n ' ' +\n ' delete' +\n ' ' +\n '
          \\n' +\n ' clear
          \\n' +\n '
          ' +\n '
          ';\n\n text += '
            ';\n\n for (var se = 0; se < that.list.length; se++) {\n if (that.list[se].substring(0, id.length + 1) === id + '.') {\n var en = that.main.objects[that.list[se]];\n var inverted;\n var style = '';\n if (en && en.common && en.common.color) {\n style = 'background: ' + en.common.color + '; ';\n if (that.main.invertColor(en.common.color)) {\n inverted = true;\n style += 'color: white;';\n }\n }\n\n text += '
          • ' +\n that.main.getIcon(that.list[se], null, null, 'icon') +\n '' + getName(that.main.objects, that.list[se]) + '' +\n '

            ' + that.list[se] + '


            ';\n\n if (en && en.common && en.common.members && en.common.members.length) {\n for (var m = 0; m < en.common.members.length; m++) {\n text += drawChip(en.common.members[m], that.list[se]);\n }\n }\n text += 'edit';\n text += 'delete';\n text += '
          • ';\n }\n }\n text += '
          ';\n $page.html(text);\n prepareNewEnum(id);\n scrollTop && $page.find('.enum-collection').scrollTop(scrollTop);\n initFilter(id);\n }\n function applyFilter(id, filter) {\n var $tiles = that.$gridList.find('.enum-collection[data-id=\"' + id + '\"] .collection-item');\n if (!filter) {\n $tiles.show();\n } else {\n filter = filter.toLowerCase();\n $tiles.each(function () {\n var $this = $(this);\n var eid = $this.data('id');\n var name = getName(that.main.objects, eid);\n if (name.toLowerCase().indexOf(filter) !== -1) {\n $this.show();\n } else {\n if (eid.substring(id.length).toLowerCase().indexOf(filter) !== -1) {\n $this.show();\n } else {\n $this.hide();\n }\n }\n });\n }\n }\n\n function initFilter(id) {\n var $filter = that.$gridList.find('.enum-buttons[data-id=\"' + id + '\"] .filter-input');\n var data = {};\n for (var se = 0; se < that.list.length; se++) {\n var eid = that.list[se];\n if (eid.substring(0, id.length + 1) === id + '.') {\n var name = getName(that.main.objects, eid);\n var icon = null;\n if (that.main.objects[eid] &&\n that.main.objects[eid].common &&\n that.main.objects[eid].common.icon) {\n icon = that.main.objects[eid].common.icon;\n }\n\n data[name] = icon;\n }\n }\n var $btn = that.$gridList.find('.enum-buttons[data-id=\"' + id + '\"] .filter-clear');\n $filter.mautocomplete({\n data: data,\n minLength: 0,\n limit: 10\n }).on('change', function () {\n var val = $(this).val();\n applyFilter(id, val);\n if ($(this).val()) {\n $btn.show();\n } else {\n $btn.hide();\n }\n that.main.saveConfig('filter-' + id, val);\n }).on('keyup', function () {\n $(this).trigger('change');\n });\n $btn.off('click').on('click', function () {\n $filter.val('').trigger('change');\n });\n if (that.main.config['filter-' + id]) {\n $filter.val(that.main.config['filter-' + id]).trigger('change');\n } else {\n $btn.hide();\n }\n }\n\n function drawEnumsTiles() {\n var $tableBody = that.$gridList.find('.tree-table-body');\n that.$gridList.removeClass('tree-table-list').addClass('tree-table-tiles');\n that.$gridList.find('.tree-table-buttons').remove();\n\n // create buttons for panels\n that.$gridList.prepend('
          \\n' +\n ' view_list\\n' +\n ' note_add\\n' +\n '
            \\n' +\n ' \\n' +\n ' queue_play_next\\n' +\n ' \\n' +\n '
            ');\n\n\n var text = '
            ';\n text += '
              ';\n var parts;\n for (var e = 0; e < that.list.length; e++) {\n parts = that.list[e].split('.');\n if (parts.length !== 2) continue;\n var name = getName(that.main.objects, that.list[e]);\n text += '
            • ' + that.main.getIcon(that.list[e]) + '' + name + '
            • ';\n }\n text += '
            ';\n text += '
            ';\n for (var se = 0; se < that.list.length; se++) {\n parts = that.list[se].split('.');\n if (parts.length !== 2) continue;\n\n text += '
            ';\n text += '
            ';\n }\n var scrollTop = {};\n $tableBody.find('.enum-collection').each(function () {\n // remember actual offset\n scrollTop[$(this).data('id')] = $(this).scrollTop();\n });\n\n // destroy droppable\n try {\n var $items = that.$gridEnum.find('.tree-table-body .collection').find('.collection-item');\n try {\n if ($items.droppable('instance')) {\n $items.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n } catch (e) {\n\n }\n\n $tableBody.html(text);\n\n if ($tableBody.find('.tabs li').length > 0) {\n $tableBody.find('.tabs').mtabs({\n onShow: function (tab) {\n that.main.saveConfig('enums-active', $(tab).attr('id'));\n }\n });\n if (that.main.config['enums-active'] && !that.main.noSelect) {\n $tableBody.find('.tabs').mtabs('select', that.main.config['enums-active']);\n }\n }\n\n\n $tableBody.find('.page').each(function () {\n drawEnum($(this).data('id'), $(this), scrollTop[$(this).data('id')]);\n });\n $tableBody.find('.btn-new-category').on('click', function () {\n createOrEditEnum(null, $(this).data('id'));\n });\n $tableBody.find('.btn-edit-category').on('click', function () {\n createOrEditEnum($(this).data('id'));\n });\n $tableBody.find('.btn-del-category').on('click', function () {\n deleteEnum($(this).data('id'));\n });\n $tableBody.find('.edit-content').on('click', function () {\n createOrEditEnum($(this).data('id'));\n });\n $tableBody.find('.delete-content').on('click', function () {\n deleteEnum($(this).data('id'));\n });\n $tableBody.find('.close').on('click', function () {\n removeMember($(this).data('id'), $(this).data('enum'));\n });\n\n that.$gridList.find('.btn-edit').off('click').on('click', function () {\n switchEditMode(!that.editMode);\n });\n\n that.$gridList.find('.btn-switch-tiles').off('click').on('click', function () {\n that.isTiles = false;\n that.main.saveConfig('enumIsTiles', that.isTiles);\n\n setTimeout(function () {\n drawEnumsTable();\n }, 50);\n });\n prepareNewEnum();\n\n var $collection = that.$gridEnum.find('.tree-table-body .collection');\n setupDroppableTiles($collection);\n }\n\n function drawEnumsTable() {\n try {\n var $items = that.$gridEnum.find('.tree-table-main').find('tbody>tr.treetable-enum');\n if ($items.droppable('instance')) {\n $items.droppable('destroy');\n }\n } catch (e) {\n console.log(e);\n }\n // extract all enums\n that.$gridList.html('').removeClass('tree-table-tiles').addClass('tree-table-list');\n\n that.$gridList.treeTable({\n objects: that.main.objects,\n root: 'enum',\n columns: ['title', 'name'],\n members: true,\n colors: true,\n icons: true,\n widths: ['calc(100% - 250px)', '250px'],\n //classes: ['', 'treetable-center'],\n name: 'enums',\n buttonsWidth: '40px',\n buttons: [\n {\n text: false,\n icons: {\n primary:'ui-icon-trash'\n },\n click: function (id, children, parent) {\n if (that.main.objects[id]) {\n if (that.main.objects[id].type === 'enum') {\n if (children) {\n // ask if only object must be deleted or just this one\n that.main.confirmMessage(_('All sub-enums of %s will be deleted too?', id), null, 'help', function (result) {\n // If all\n if (result) {\n that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } // else do nothing\n });\n } else {\n that.main.confirmMessage(_('Are you sure to delete %s?', id), null, 'help', function (result) {\n // If all\n if (result) that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n });\n }\n } else {\n removeMember(id, parent);\n }\n } else {\n if (that.main.objects[parent] && that.main.objects[parent].type === 'enum') {\n removeMember(id, parent);\n } else {\n showMessage(_('Object \"%s\" does not exists. Update the page.', id));\n }\n }\n },\n width: 26,\n height: 20\n }, {\n text: false,\n icons: {\n primary:'ui-icon-pencil'\n },\n match: function (id) {\n return that.main.objects[id] && that.main.objects[id].type === 'enum';\n },\n click: function (id, children, parent) {\n createOrEditEnum(id);\n },\n width: 26,\n height: 20\n }\n ],\n panelButtons: [\n {\n id: 'tab-enums-btn-switch-tiles',\n title: _('change view mode'),\n icon: 'view_module',\n click: function () {\n that.isTiles = true;\n that.main.saveConfig('enumIsTiles', that.isTiles);\n setTimeout(function () {\n drawEnumsTiles();\n }, 50);\n }\n },\n {\n id: 'tab-enums-list-new-enum',\n title: _('New enum'),\n icon: 'note_add',\n click: function () {\n createOrEditEnum(null);\n }\n },\n {\n id: 'tab-enums-list-new-category',\n title: _('New category'),\n icon: 'library_add',\n click: function () {\n createOrEditEnum(null, that.enumEdit);\n }\n },\n {\n id: 'tab-enums-list-edit',\n title: _('Edit'),\n icon: 'edit',\n click: function () {\n switchEditMode(!that.editMode);\n }\n }\n ],\n onChange: function (id, oldId) {\n if (id !== oldId) {\n that.enumEdit = id;\n var obj = that.main.objects[id];\n if (obj && obj.type === 'enum') {\n $('#tab-enums-list-new-enum').removeClass('disabled').attr('title', _('Create new enum, like %s', 'enum.newCategory'));\n var parts = id.split('.');\n if (parts.length === 2) {\n that.$gridList.find('#tab-enums-list-new-category').removeClass('disabled').attr('title', _('Create new category, like %s', id + '.newEnum'));\n } else {\n that.$gridList.find('#tab-enums-list-new-category').addClass('disabled');\n }\n } else {\n that.$gridList.find('#tab-enums-list-new-enum').addClass('disabled');\n that.$gridList.find('#tab-enums-list-new-category').addClass('disabled');\n }\n }\n },\n onReady: setupDroppableTable\n });//.treeTable('show', currentEnum);\n that.$gridList.find('.tree-table-buttons a').addClass('btn-small');\n that.$gridList.find('#tab-enums-list-new-enum').addClass('disabled');\n that.$gridList.find('#tab-enums-list-new-category').addClass('disabled');\n }\n\n function getEnumsChildren(id) {\n var parts = id.split('.');\n var items = [];\n var regex = new RegExp('^' + id.replace(/\\./g, '\\\\.') + '\\\\.');\n for (var se = 0; se < that.list.length; se++) {\n var _parts = that.list[se].split('.');\n if (_parts.length === parts.length + 1 && regex.test(that.list[se])) {\n items.push(that.list[se]);\n }\n }\n return items;\n }\n \n function deleteEnum(id) {\n if (that.main.objects[id].type === 'enum') {\n var children = getEnumsChildren(id);\n \n if (children && children.length) {\n // ask if only object must be deleted or just this one\n that.main.confirmMessage(_('All sub-enums of %s will be deleted too?', id), null, 'help', function (result) {\n // If all\n if (result) {\n that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } // else do nothing\n });\n } else {\n that.main.confirmMessage(_('Are you sure to delete %s?', id), null, 'help', function (result) {\n // If all\n if (result) that.main._delObjects(id, true, function (err) {\n if (!err) {\n showMessage(_('Deleted'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n });\n }\n }\n }\n \n function removeMember(id, parent) {\n that.main.socket.emit('getObject', parent, function (err, obj) {\n if (obj && obj.common && obj.common.members) {\n var pos = obj.common.members.indexOf(id);\n if (pos !== -1) {\n obj.common.members.splice(pos, 1);\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n if (!err) {\n showMessage(_('Removed'));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } else {\n showMessage(_('%s is not in the list'));\n }\n }\n });\n }\n\n function addMember(id, parent) {\n that.main.socket.emit('getObject', parent, function (err, obj) {\n if (obj && obj.common) {\n obj.common.members = obj.common.members || [];\n var pos = obj.common.members.indexOf(id);\n if (pos === -1) {\n obj.common.members.push(id);\n obj.common.members.sort();\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n if (!err) {\n showMessage(_('%s added to %s', id, obj._id));\n } else {\n showMessage(_('Error: %s', err), true);\n }\n });\n } else {\n showMessage(_('Is yet in the list'));\n }\n }\n });\n }\n \n function showMessage(text, duration, isError) {\n if (typeof duration === 'boolean') {\n isError = duration;\n duration = 3000;\n }\n that.main.showToast(that.$gridEnum.find('.tree-table-buttons'), text, null, duration, isError);\n }\n\n function setupDraggable() {\n var $trs = that.$gridEnum.find('.fancytree-container>tbody');\n try {\n if ($trs.sortable('instance')) {\n $trs.sortable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n\n that.$gridEnum.find('.fancytree-container>tbody')\n .sortable({\n connectWith: '#tab-enums .tab-enums-list .tree-table-main.treetable',\n items: '.fancytree-type-draggable',\n appendTo: that.$gridEnum,\n refreshPositions: true,\n helper: function (e, $target) {\n return $('
            ' + $target.find('.fancytree-title').text() + '
            ');\n },\n zIndex: 999990,\n revert: false,\n scroll: false,\n start: function (e, ui) {\n var $prev = ui.item.prev();\n // place this item back where it was\n ui.item.data('prev', $prev);\n that.$gridEnum.addClass('dragging');\n },\n stop: function (e, ui) {\n that.$gridEnum.removeClass('dragging');\n },\n update: function (event, ui) {\n // place this item back where it was\n var $prev = ui.item.data('prev');\n if (!$prev || !$prev.length) {\n $(this).prepend(ui.item);\n } else {\n $($prev).after(ui.item);\n }\n }\n })\n .disableSelection();\n }\n\n this._initObjectTree = function () {\n var settings = {\n objects: main.objects,\n noDialog: true,\n draggable: ['device', 'channel', 'state'],\n name: 'enum-objects',\n expertModeRegEx: /^system\\.|^yunkong2\\.|^_|^[\\w-]+$|^enum\\.|^[\\w-]+\\.admin|^script\\./,\n texts: {\n select: _('Select'),\n cancel: _('Cancel'),\n all: _('All'),\n id: _('ID'),\n ID: _('ID'),\n name: _('Name'),\n role: _('Role'),\n room: _('Room'),\n 'function': _('Function'),\n value: _('Value'),\n type: _('Type'),\n selectid: _('Select ID'),\n from: _('From'),\n lc: _('Last changed'),\n ts: _('Time stamp'),\n wait: _('Processing...'),\n ack: _('Acknowledged'),\n edit: _('Edit'),\n push: _('Trigger event'),\n ok: _('Ok'),\n with: _('With'),\n without: _('Without'),\n copyToClipboard: _('Copy to clipboard'),\n expertMode: _('Toggle expert mode'),\n refresh:\t_('Update'),\n sort: _('Sort alphabetically'),\n button: _('Settings'),\n noData: _('No data')\n },\n filter: {\n type: 'state'\n },\n columns: ['ID', 'name', 'type', 'role']\n };\n\n selectId('init', settings)\n .selectId('show');\n\n setupDraggable();\n };\n\n function setupDroppableTable($treetable) {\n if (!that.editMode) return;\n\n if (!$treetable) {\n $treetable = that.$gridEnum.find('.tree-table-main');\n }\n\n $treetable.find('tbody>tr.treetable-enum').droppable({\n accept: '.fancytree-type-draggable',\n over: function (e, ui) {\n $(this).addClass('tab-accept-item');\n if ($(this).hasClass('not-empty') && !$(this).hasClass('expanded')) {\n var id = $(this).data('tt-id');\n var timer;\n if ((timer = $(this).data('timer'))) {\n clearTimeout(timer);\n }\n $(this).data('timer', setTimeout(function () {\n that.$gridList.treeTable('expand', $(this).data('tt-id'));\n }, 1000));\n }\n },\n out: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n var timer;\n if ((timer = $(this).data('timer'))) {\n clearTimeout(timer);\n $(this).data('timer', null);\n }\n },\n tolerance: 'pointer',\n drop: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n var id = ui.draggable.data('id');\n var enumId = $(this).data('tt-id');\n\n addMember(id, enumId);\n }\n });\n }\n\n function setupDroppableTiles($collection) {\n if (!that.editMode) return;\n\n $collection = $collection || that.$gridEnum.find('.tree-table-body .collection');\n\n var $items = $collection.find('.collection-item');\n try {\n if ($items.droppable('instance')) {\n $items.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n\n $items.droppable({\n accept: '.fancytree-type-draggable',\n over: function (e, ui) {\n $(this).addClass('tab-accept-item');\n },\n out: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n },\n tolerance: 'pointer',\n drop: function (e, ui) {\n $(this).removeClass('tab-accept-item');\n var id = ui.draggable.data('id');\n var enumId = $(this).data('id');\n addMember(id, enumId);\n }\n });\n }\n\n function createOrEditEnum(id, parentId) {\n var idChanged = false;\n var $dialog = that.$gridEnum.find('#tab-enums-dialog-new');\n var oldId = '';\n\n var nameVal = '';\n var idVal = '';\n var originalIdVal = '';\n var iconVal = '';\n var colorVal = '';\n\n var isIdEditable = true;\n\n installFileUpload($dialog, 50000, function (err, text) {\n if (err) {\n showMessage(err, true);\n } else {\n if (!text.match(/^data:image\\//)) {\n showMessage(_('Unsupported image format'), true);\n return;\n }\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n iconVal = text;\n\n $dialog.find('.tab-enums-dialog-new-icon').show().html('');\n $dialog.find('.tab-enums-dialog-new-icon img').attr('src', text);\n $dialog.find('.tab-enums-dialog-new-icon-clear').show();\n }\n });\n\n if (id) {\n if (that.main.objects[id] && that.main.objects[id].common) {\n nameVal = translateName(that.main.objects[id].common.name);\n iconVal = that.main.objects[id].common.icon;\n colorVal = that.main.objects[id].common.color;\n }\n oldId = id;\n idVal = id;\n $dialog.find('#tab-enums-dialog-preserve-id').prop('checked', true);\n isIdEditable = false;\n } else {\n $dialog.find('#tab-enums-dialog-preserve-id').prop('checked', false);\n isIdEditable = true;\n }\n\n $dialog.find('.tab-enums-dialog-new-title').text(parentId ? _('Create new category') : (idVal ? _('Rename') : _('Create new enum')));\n\n if (idVal) {\n var parts = idVal.split('.');\n if (parts.length <= 2) {\n id = true;\n }\n idVal = parts.pop();\n parentId = parts.join('.');\n originalIdVal = idVal;\n }\n\n $dialog.find('#tab-enums-dialog-new-name')\n .val(nameVal)\n .off('change')\n .on('change', function () {\n var $id = $dialog.find('#tab-enums-dialog-new-id');\n var id = $id.val();\n var val = $(this).val();\n val = val.replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_').trim().toLowerCase();\n if (isIdEditable && (!id || !idChanged)) {\n $id.val(val);\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + (val || '#'));\n // detect materialize\n M.updateTextFields('#tab-enums-dialog-new');\n }\n if ($id.val() && !$id.val().match(/[.\\s]/)) {\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $id.removeClass('wrong');\n } else {\n $dialog.find('.tab-enums-dialog-create').addClass('disabled');\n $id.addClass('wrong');\n }\n }).off('keyup').on('keyup', function () {\n $(this).trigger('change');\n });\n\n $dialog.find('#tab-enums-dialog-new-id')\n .val(idVal)\n .off('change')\n .on('change', function () {\n if ($dialog.find('#tab-enums-dialog-preserve-id').prop('checked')) return;\n idChanged = true;\n var val = $(this).val();\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + ($(this).val() || '#'));\n M.updateTextFields('#tab-enums-dialog-new');\n\n if (val && !val.match(/[.\\s]/)) {\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $(this).removeClass('wrong');\n } else {\n $dialog.find('.tab-enums-dialog-create').addClass('disabled');\n $(this).addClass('wrong');\n }\n }).off('keyup').on('keyup', function () {\n $(this).trigger('change');\n });\n\n $dialog.find('#tab-enums-dialog-new-id').prop('disabled', !isIdEditable);\n\n $dialog.find('.tab-enums-dialog-create')\n .addClass('disabled')\n .off('click')\n .text(oldId ? _('Change') : _('Create'))\n .on('click', function () {\n if (oldId) {\n var name;\n if ($dialog.find('#tab-enums-dialog-preserve-id').prop('checked')) {\n if (typeof that.main.objects[oldId].common.name === 'object') {\n name = that.main.objects[oldId].common.name;\n } else {\n name = {'en': oldId.split('.').pop()};\n }\n name[systemLang] = $dialog.find('#tab-enums-dialog-new-name').val();\n } else {\n name = $dialog.find('#tab-enums-dialog-new-name').val();\n }\n enumRename(\n oldId,\n parentId + '.' + $dialog.find('#tab-enums-dialog-new-id').val(),\n {\n name: name,\n icon: iconVal,\n color: colorVal\n },\n function (err) {\n if (err) {\n showMessage(_('Error: %s', err), true);\n } else {\n showMessage(_('Updated'));\n }\n }\n );\n } else {\n enumAddChild(\n parentId,\n (parentId || 'enum') + '.' + $dialog.find('#tab-enums-dialog-new-id').val(),\n {\n name: $dialog.find('#tab-enums-dialog-new-name').val(),\n icon: iconVal,\n color: colorVal\n },\n function (err) {\n if (err) {\n showMessage(_('Error: %s', err), true, 5000);\n } else {\n showMessage(_('Updated'));\n }\n });\n }\n });\n\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + (idVal || '#'));\n\n if (iconVal) {\n $dialog.find('.tab-enums-dialog-new-icon').show().html(that.main.getIcon(oldId));\n $dialog.find('.tab-enums-dialog-new-icon-clear').show();\n } else {\n $dialog.find('.tab-enums-dialog-new-icon').hide();\n $dialog.find('.tab-enums-dialog-new-icon-clear').hide();\n }\n colorVal = colorVal || false;\n if (colorVal) {\n $dialog.find('.tab-enums-dialog-new-color').val(colorVal);\n } else {\n $dialog.find('.tab-enums-dialog-new-color').val();\n }\n\n M.updateTextFields('#tab-enums-dialog-new');\n that.main.showToast($dialog, _('Drop the icons here'));\n\n $dialog.find('.tab-enums-dialog-new-upload').off('click').on('click', function () {\n $dialog.find('.drop-file').trigger('click');\n });\n $dialog.find('.tab-enums-dialog-new-icon-clear').off('click').on('click', function () {\n if (iconVal) {\n iconVal = '';\n $dialog.find('.tab-enums-dialog-new-icon').hide();\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $dialog.find('.tab-enums-dialog-new-icon-clear').hide();\n }\n });\n $dialog.find('.tab-enums-dialog-new-color-clear').off('click').on('click', function () {\n if (colorVal) {\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $dialog.find('.tab-enums-dialog-new-color-clear').hide();\n $dialog.find('.tab-enums-dialog-new-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-enums-dialog-new-colorpicker')\n }).colorpicker('setValue', '');\n colorVal = '';\n }\n });\n var time = Date.now();\n try {\n $dialog.find('.tab-enums-dialog-new-colorpicker').colorpicker('destroy');\n } catch (e) {\n\n }\n $dialog.find('.tab-enums-dialog-new-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-enums-dialog-new-colorpicker')\n }).colorpicker('setValue', colorVal).on('showPicker.colorpicker', function (/* event */) {\n //$dialog.find('.tab-enums-dialog-new-colorpicker')[0].scrollIntoView(false);\n var $modal = $dialog.find('.modal-content');\n $modal[0].scrollTop = $modal[0].scrollHeight;\n }).on('changeColor.colorpicker', function (event){\n if (Date.now() - time > 100) {\n colorVal = event.color.toHex();\n $dialog.find('.tab-enums-dialog-create').removeClass('disabled');\n $dialog.find('.tab-enums-dialog-new-icon-clear').show();\n }\n });\n if (colorVal) {\n $dialog.find('.tab-enums-dialog-new-color-clear').show();\n } else {\n $dialog.find('.tab-enums-dialog-new-color-clear').hide();\n }\n\n $dialog.find('#tab-enums-dialog-preserve-id').off('change').on('change', function () {\n if ($(this).prop('checked')) {\n $dialog.find('#tab-enums-dialog-new-id').prop('disabled', true)\n .val(originalIdVal);\n idVal = originalIdVal;\n isIdEditable = false;\n } else {\n if (that.main.objects[id] && that.main.objects[id].common) {\n isIdEditable = !that.main.objects[id].common['object-non-deletable'] && !that.main.objects[id].common.dontDelete;\n }\n if (isIdEditable) {\n idVal = $dialog.find('#tab-enums-dialog-new-name').val();\n idVal = idVal.replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_').trim().toLowerCase();\n $dialog.find('#tab-enums-dialog-new-id').prop('disabled', false)\n .val(idVal);\n }\n }\n idChanged = false;\n $dialog.find('#tab-enums-dialog-new-preview').val((parentId || 'enum') + '.' + (idVal || '#'));\n });\n\n // workaround for materialize checkbox problem\n $dialog.find('input[type=\"checkbox\"]+span').off('click').on('click', function () {\n var $input = $(this).prev();\n if (!$input.prop('disabled')) {\n $input.prop('checked', !$input.prop('checked')).trigger('change');\n }\n });\n\n $dialog.modal().modal('open');\n }\n\n function switchEditMode(isEnabled) {\n that.editMode = isEnabled;\n var $editButton = that.$gridEnum.find('#tab-enums-list-edit');\n\n if (that.editMode) {\n $editButton.removeClass('blue').addClass('red');\n that.$gridEnum.addClass('tab-enums-edit');\n that._initObjectTree();\n showMessage(_('You can drag&drop the devices, channels and states to enums'));\n if (that.isTiles) {\n setupDroppableTiles();\n } else {\n setupDroppableTable();\n }\n } else {\n selectId('destroy');\n try {\n var _$items = that.$gridEnum.find('.collection-item');\n if (_$items.droppable('instance')) {\n _$items.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n try {\n var $trs = that.$gridEnum.find('tbody>tr.treetable-enum');\n if ($trs.droppable('instance')) {\n $trs.droppable('destroy');\n }\n } catch (e) {\n console.error(e);\n }\n\n $editButton.removeClass('red').addClass('blue');\n that.$gridEnum.removeClass('tab-enums-edit');\n }\n }\n\n this._postInit = function () {\n if (typeof this.$gridList !== 'undefined') {\n if (!this.main.objects['enum.rooms']) {\n this.main.objects['enum.rooms'] = {\n \"_id\": \"enum.rooms\",\n \"common\": {\n \"icon\": \"home\",\n \"name\": {\n \"en\": \"Rooms\",\n \"cn\": \"场景\"\n },\n \"desc\": {\n \"en\": \"List of the rooms\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\",\n \"acl\": {\n \"owner\": \"system.user.admin\",\n \"ownerGroup\": \"system.group.administrator\",\n \"permissions\": 1911\n }\n };\n that.main.socket.emit('setObject', 'enum.rooms', this.main.objects['enum.rooms']);\n this.list.unshift('enum.rooms');\n }\n if (!this.main.objects['enum.functions']) {\n this.main.objects['enum.functions'] = {\n \"_id\": \"enum.functions\",\n \"common\": {\n \"icon\": \"lightbulb_outline\",\n \"name\": {\n \"en\": \"Functions\",\n \"cn\": \"功能\"\n },\n \"desc\": {\n \"en\": \"List of the functions\"\n },\n \"members\": [],\n \"dontDelete\": true\n },\n \"type\": \"enum\",\n \"acl\": {\n \"owner\": \"system.user.admin\",\n \"ownerGroup\": \"system.group.administrator\",\n \"permissions\": 1911\n }\n };\n this.list.unshift('enum.functions');\n that.main.socket.emit('setObject', 'enum.functions', this.main.objects['enum.functions']);\n }\n\n if (this.isTiles) {\n drawEnumsTiles();\n } else {\n drawEnumsTable();\n }\n if (this.editMode) {\n this._initObjectTree();\n } else {\n selectId('destroy');\n }\n }\n };\n\n this.init = function (update) {\n if (this.inited && !update) {\n return;\n }\n if (!this.main || !this.main.objectsLoaded) {\n setTimeout(function () {\n that.init(update);\n }, 250);\n return;\n }\n\n this._postInit();\n\n if (!this.inited) {\n this.inited = true;\n this.main.subscribeObjects('enum.*');\n }\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.inited = false;\n // subscribe objects and states\n this.main.unsubscribeObjects('enum.*');\n }\n switchEditMode(false);\n this.$gridList.treeTable('destroy');\n };\n\n this.objectChange = function (id, obj, action) {\n //Update enums\n if (id.match(/^enum\\./)) {\n if (obj) {\n if (this.list.indexOf(id) === -1) this.list.push(id);\n } else {\n var j = this.list.indexOf(id);\n if (j !== -1) this.list.splice(j, 1);\n }\n\n if (this.updateTimers) clearTimeout(this.updateTimers);\n\n this.updateTimers = setTimeout(function () {\n that.updateTimers = null;\n that._postInit();\n }, 200);\n }\n\n if (this.$grid) selectId('object', id, obj, action);\n };\n}\n","function Events(main) {\r\n 'use strict';\r\n\r\n var that = this;\r\n this.main = main;\r\n this.$tab = $('#tab-events'); // body\r\n var isRemote = location.hostname === 'yunkong2.net' || location.hostname === 'yunkong2.pro';\r\n\r\n var list = {\r\n count: 0,\r\n start: 0,\r\n limit: 500 //const\r\n };\r\n var timeout = null;\r\n\r\n var pause = {\r\n list: [],\r\n mode: false,\r\n counter: 0,\r\n overflow: false,\r\n $counterSpan: null\r\n };\r\n\r\n var $header;\r\n var hdr;\r\n var $table;\r\n var $outer;\r\n var $pause;\r\n\r\n var columnResizeInit = {\r\n done: false,\r\n timer: null\r\n };\r\n\r\n this.prepare = function () {\r\n $outer = this.$tab.find('#event-outer');\r\n $table = this.$tab.find('#event-table');\r\n $pause = this.$tab.find('#event-pause');\r\n\r\n // install header\r\n $header = this.$tab.find('#events-table-tr');\r\n hdr = new IobListHeader($header, {list: $outer, colWidthOffset: 1, prefix: 'event-filter'});\r\n hdr.doFilter = filterEvents;\r\n\r\n hdr.add('combobox', 'type');\r\n hdr.add('edit', 'id', 'ID');\r\n //hdr.add('edit', 'val', 'Value');\r\n hdr.add('edit', 'val', 'value');\r\n hdr.add('combobox', 'ack', 'ack', [\r\n {val: '', name: 'all'},\r\n {val: 'true', name: 'ack'},\r\n {val: 'false', name: 'not ack'}\r\n ]);\r\n hdr.add('combobox', 'from', 'from');\r\n hdr.add('text', 'ts');\r\n hdr.add('text', 'lc');\r\n\r\n Object.defineProperty(hdr, 'getValues', {\r\n value: function () {\r\n hdr.ID.selectedVal = hdr.ID.selectedVal.toLocaleLowerCase();\r\n if (hdr.ack.selectedVal === 'true') hdr.ack.selectedVal = true;\r\n if (hdr.ack.selectedVal === 'false') hdr.ack.selectedVal = false;\r\n },\r\n enumerateble: false\r\n });\r\n\r\n $pause.on('click', function () {\r\n that.pause();\r\n });\r\n\r\n // bind \"clear events\" button\r\n var $eventClear = this.$tab.find('#event-clear');\r\n $eventClear\r\n .off('click').on('click', function () {\r\n list.count = 0;\r\n list.start = 0;\r\n that.$tab.find('#event-table').html('');\r\n });\r\n };\r\n\r\n this.init = function () {\r\n if (isRemote) {\r\n that.$tab.find('#grid-events').html(_('You can\\'t see events via cloud') + '
            cloud_off').addClass('no-cloud-events');\r\n return;\r\n }\r\n if (!hdr) return;\r\n\r\n if (this.inited) {\r\n return;\r\n }\r\n \r\n installColResize();\r\n\r\n this.inited = true;\r\n this.main.subscribeObjects('*');\r\n this.main.subscribeStates('*');\r\n };\r\n\r\n this.destroy = function () {\r\n if (this.inited) {\r\n this.inited = false;\r\n this.main.unsubscribeObjects('*');\r\n this.main.unsubscribeStates('*');\r\n }\r\n };\r\n\r\n var widthSet = false;\r\n\r\n function installColResize() {\r\n if (!$.fn.colResizable) return;\r\n if ($outer.is(':visible')) {\r\n $outer.colResizable({\r\n liveDrag: true,\r\n\r\n partialRefresh: true,\r\n marginLeft: 5,\r\n postbackSafe:true,\r\n\r\n onResize: function (event) {\r\n return hdr.syncHeader();\r\n // // read width of data.$tree and set the same width for header\r\n // var thDest = $('#log-outer-header >thead>tr>th');\t//if table headers are specified in its semantically correct tag, are obtained\r\n // var thSrc = $outer.find('>tbody>tr:first>td');\r\n // for (var i = 1; i < thSrc.length; i++) {\r\n // $(thDest[i]).attr('width', $(thSrc[i]).width());\r\n // }\r\n }\r\n });\r\n hdr.syncHeader();\r\n } else {\r\n setTimeout(function () {\r\n installColResize();\r\n }, 200)\r\n }\r\n }\r\n\r\n function updateResizersHeight() {\r\n columnResizeInit.timer = null;\r\n $(window).trigger('resize.JColResizer');\r\n }\r\n\r\n // ----------------------------- Show events ------------------------------------------------\r\n this.add = function (id, stateOrObj, isMessage, isState) {\r\n if (isRemote) return;\r\n\r\n var type = isState ? 'stateChange' : (isMessage ? 'message' : 'objChange');\r\n var value;\r\n var ack;\r\n var from = '';\r\n var ts;\r\n var lc;\r\n if (hdr) {\r\n if (hdr.getValues) {\r\n hdr.getValues();\r\n }\r\n\r\n hdr.type.checkAddOption(type);\r\n }\r\n if (!columnResizeInit.done) {\r\n // if the height not 100%, the column resizer is too short. Wait till the table will be really full and reinit resizer.\r\n // update resizer once and remeber it if the table has full height\r\n if (!columnResizeInit.timer) {\r\n columnResizeInit.timer = setTimeout(updateResizersHeight, 1000);\r\n }\r\n\r\n if (list.count > 20) {\r\n columnResizeInit.done = true;\r\n }\r\n }\r\n\r\n if (!pause.mode) {\r\n if (list.count >= that.limit) {\r\n list.start++;\r\n var e = document.getElementById('event_' + list.start);\r\n if (e) e.outerHTML = '';\r\n } else {\r\n list.count++;\r\n }\r\n }\r\n\r\n // if Object\r\n if (!isMessage && !isState) {\r\n if (!stateOrObj) {\r\n value = 'deleted';\r\n ts = main.formatDate(new Date());\r\n } else {\r\n value = JSON.stringify(stateOrObj, '\\x0A', 2);\r\n if (value !== undefined && value.length > 30) {\r\n value = '' + value.substring(0, 30) + '...';\r\n }\r\n ts = main.formatDate(stateOrObj.ts);\r\n }\r\n } else\r\n // if state\r\n if (isState) {\r\n if (!stateOrObj) {\r\n value = 'deleted';\r\n ts = main.formatDate(new Date());\r\n } else {\r\n stateOrObj.from = stateOrObj.from || '';\r\n stateOrObj.from = stateOrObj.from.replace('system.adapter.', '');\r\n stateOrObj.from = stateOrObj.from.replace('system.', '');\r\n\r\n hdr && hdr.from.checkAddOption(stateOrObj.from, function (o) {\r\n return {val: o.replace(/\\./g, '-'), name: o};\r\n });\r\n\r\n from = stateOrObj.from;\r\n\r\n value = JSON.stringify(stateOrObj.val);\r\n if (value !== undefined && value.length > 30) {\r\n value = '
            ' + value.substring(0, 30) + '...
            ';\r\n }\r\n ack = stateOrObj.ack ? 'true' : 'false';\r\n ts = main.formatDate(stateOrObj.ts);\r\n lc = main.formatDate(stateOrObj.lc);\r\n }\r\n } else\r\n // if message\r\n if (isMessage) {\r\n // todo\r\n }\r\n\r\n var visible = true;\r\n if (hdr) {\r\n if (hdr.type.selectedVal && hdr.type.selectedVal !== type) {\r\n visible = false;\r\n } else if (hdr.ID.selectedVal && id.toLocaleLowerCase().indexOf(hdr.ID.selectedVal) === -1) {\r\n visible = false;\r\n } else if (hdr.value.selectedVal !== '' && value !== null && value !== undefined && value.indexOf(hdr.value.selectedVal) === -1) {\r\n visible = false;\r\n } else if (hdr.ack.selectedVal !== '' && hdr.ack.selectedVal !== ack) {\r\n visible = false;\r\n } else if (hdr.from.selectedVal && hdr.from.selectedVal !== from) {\r\n visible = false;\r\n }\r\n }\r\n\r\n\r\n var text = '';\r\n text += '' + type + '';\r\n text += '' + id + '';\r\n if (isNaN(value)) {\r\n text += '' + (value || '') + '';\r\n } else {\r\n text += '' + (value || '') + '';\r\n }\r\n text += '' + (ack || '') + '';\r\n text += '' + (from || '') + '';\r\n text += '' + (ts || '') + '';\r\n text += '' + (lc || '') + '';\r\n text += '';\r\n\r\n if (pause.mode) {\r\n pause.list.push(text);\r\n pause.counter++;\r\n\r\n if (pause.counter > list.limit) {\r\n if (!pause.overflow) {\r\n $pause.addClass('red lighten3')\r\n .attr('title', _('Message buffer overflow. Losing oldest'));\r\n pause.overflow = true;\r\n }\r\n pause.list.shift();\r\n }\r\n pause.$counterSpan.html(pause.counter);\r\n } else if ($table) {\r\n $table.prepend(text);\r\n if (!widthSet && (window.location.hash === '#tab-events' || window.location.hash === '#events')) {\r\n hdr && hdr.syncHeader();\r\n widthSet = true;\r\n }\r\n }\r\n };\r\n\r\n /*this.onSelected = function () {\r\n hdr && hdr.syncHeader();\r\n };*/\r\n\r\n function filterEvents() {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n }\r\n if (hdr.getValues) {\r\n hdr.getValues();\r\n }\r\n\r\n $table && $table.find('.event-line').each(function (index) {\r\n var isShow = true;\r\n var $this = $(this);\r\n if (hdr.type.selectedVal && !$this.hasClass('event-type-' + hdr.type.selectedVal)) {\r\n isShow = false;\r\n } else\r\n if (hdr.from.selectedVal && !$this.hasClass('event-from-' + hdr.from.selectedVal)) {\r\n isShow = false;\r\n } else\r\n if (hdr.ack.selectedVal !== '' && !$this.hasClass('event-ack-' + hdr.ack.selectedVal)) {\r\n isShow = false;\r\n } else\r\n if (hdr.ID.selectedVal && $(this).find('td.event-column-id').text().toLocaleLowerCase().indexOf(hdr.ID.selectedVal) === -1) {\r\n isShow = false;\r\n } else\r\n if (hdr.value.selectedVal !== '' && $(this).find('td.event-column-value').text().indexOf(hdr.value.selectedVal) === -1) {\r\n isShow = false;\r\n }\r\n\r\n if (isShow) {\r\n $this.show();\r\n } else {\r\n $this.hide();\r\n }\r\n });\r\n }\r\n\r\n this.pause = function () {\r\n if (!pause.mode) {\r\n $pause.addClass('yellow btn-pause-button-active');\r\n\r\n pause.$counterSpan = $pause;\r\n pause.$counterSpan.html('0');\r\n pause.counter = 0;\r\n pause.mode = true;\r\n } else {\r\n pause.mode = false;\r\n for (var i = 0; i < pause.list.length; i++) {\r\n if (list.count >= 500) {\r\n list.start++;\r\n var e = document.getElementById('event_' + list.start);\r\n if (e) e.outerHTML = '';\r\n } else {\r\n list.count++;\r\n }\r\n $table.prepend(pause.list[i]);\r\n }\r\n pause.overflow = false;\r\n pause.list = [];\r\n pause.counter = 0;\r\n\r\n $pause\r\n .removeClass('yellow btn-pause-button-active')\r\n .html('pause');\r\n }\r\n };\r\n}\r\n\r\n\r\n","function fileHandler(event) {\n event.preventDefault();\n var file = event.dataTransfer ? event.dataTransfer.files[0] : event.target.files[0];\n\n var $dz = $(this).find('.drop-zone');\n var callback = $(this).data('drop-zone-cb');\n var limit = $(this).data('limit');\n if (file.size > (limit || 10000)) {\n callback && callback(_('File is too big!'));\n $dz.hide();\n return false;\n }\n $dz.show();\n var reader = new FileReader();\n reader.onload = function (evt) {\n $dz.hide();\n callback && callback(null, evt.target.result);\n };\n reader.readAsDataURL(file);\n}\n\n/**\n * Install file upload on some div\n * @param {object} $dropZone is jquery object of the div (DOM element) where the drop zone must be installed\n * @param {number} limit is maximal size of file in bytes\n * @param {function} callback is callback in form function (err, fileDataBase64) {}\n*/\nfunction installFileUpload($dropZone, limit, callback) {\n if (typeof window.FileReader !== 'undefined' && !$dropZone.data('installed')) {\n $dropZone.data('installed', true);\n $dropZone.prepend('
            ');\n var $dz = $dropZone.find('.drop-zone');\n $dropZone[0].ondragover = function() {\n $dz.off('click');\n $dz.show();\n return false;\n };\n\n $dz[0].ondragleave = function() {\n $dz.hide();\n return false;\n };\n\n $dz[0].ondrop = fileHandler.bind($dropZone[0]);\n }\n $dropZone.data('drop-zone-cb', callback);\n $dropZone.data('limit', limit);\n $dropZone.find('.drop-file').on('change', fileHandler.bind($dropZone[0]));\n}","function Hosts(main) {\n 'use strict';\n\n var that = this;\n this.main = main;\n this.list = [];\n this.$tab = $('#tab-hosts');\n this.$grid = this.$tab.find('#hosts');\n this.$table = this.$tab.find('#grid-hosts');\n this.inited = false;\n this.isTiles = true;\n this.words = {};\n\n this.prepare = function () {\n this.isTiles = (this.main.config.hostsIsTiles !== undefined && this.main.config.hostsIsTiles !== null) ? this.main.config.hostsIsTiles : true;\n\n // fix for IE\n if (this.main.browser === 'ie' && this.main.browserVersion <= 10) {\n this.isTiles = false;\n this.$tab.find('.btn-switch-tiles').hide();\n }\n\n this.$tab.find('.btn-reload')\n .attr('title', _('Update'))\n .on('click', function () {\n that.init(true);\n });\n\n this.$tab.find('.btn-switch-tiles').off('click').on('click', function () {\n that.isTiles = !that.isTiles;\n\n if (that.isTiles) {\n $(this).find('i').text('view_list');\n } else {\n $(this).find('i').text('view_module');\n }\n\n that.main.saveConfig('hostsIsTiles', that.isTiles);\n\n setTimeout(function () {\n that._postInit();\n }, 50);\n });\n\n if (this.isTiles) {\n this.$tab.find('.btn-switch-tiles').find('i').text('view_list');\n } else {\n this.$tab.find('.btn-switch-tiles').find('i').text('view_module');\n }\n\n this.$tab.find('.filter-clear').on('click', function () {\n that.$tab.find('.filter-input').val('').trigger('change');\n });\n\n var $hostsFilter = this.$tab.find('.filter-input');\n $hostsFilter.on('change', function () {\n var filter = $(this).val();\n if (filter) {\n $(this).addClass('input-not-empty');\n that.$tab.find('.filter-clear').show();\n } else {\n that.$tab.find('.filter-clear').hide();\n $(this).removeClass('input-not-empty');\n }\n\n that.main.saveConfig('hostsFilter', filter);\n applyFilter(filter);\n }).on('keyup', function () {\n if (that.filterTimeout) clearTimeout(that.filterTimeout);\n that.filterTimeout = setTimeout(function () {\n that.$tab.find('.filter-input').trigger('change');\n }, 300);\n });\n\n if (this.main.config.hostsFilter && this.main.config.hostsFilter[0] !== '{') {\n $hostsFilter.val(that.main.config.hostsFilter).addClass('input-not-empty');\n this.$tab.find('.filter-clear').show();\n } else {\n this.$tab.find('.filter-clear').hide();\n }\n\n // cache translations\n this.words['Title'] = _('Title');\n this.words['OS'] = _('OS');\n this.words['Available'] = _('Available');\n this.words['Installed'] = _('Installed');\n this.words['Events'] = _('Events');\n this.words['Title'] = _('Title');\n that.words['Type'] = _('Type');\n };\n\n // ----------------------------- Hosts show and Edit ------------------------------------------------\n this.initButtons = function (id) {\n var selector = id ? '[data-host-id=\"' + id + '\"]' : '';\n\n this.$tab.find('.host-update-submit' + selector).off('click').on('click', function () {\n that.main.cmdExec($(this).attr('data-host-name'), 'upgrade self', function (exitCode) {\n if (!exitCode) that.init(true);\n });\n });\n\n this.$tab.find('.host-restart-submit' + selector).off('click').on('click', function () {\n that.main.waitForRestart = true;\n that.main.cmdExec($(this).attr('data-host-name'), '_restart');\n });\n this.$tab.find('.host-delete' + selector).off('click').on('click', function () {\n that.main.cmdExec(that.main.currentHost, 'host remove ' + $(this).attr('data-host-name'));\n });\n\n this.$tab.find('.host-edit' + selector).off('click').on('click', function () {\n editHost($(this).attr('data-host-id'));\n });\n\n this.$tab.find('.host-update-hint-submit' + selector).off('click').on('click', function () {\n var infoTimeout = setTimeout(function () {\n showUpdateInfo();\n infoTimeout = null;\n }, 1000);\n\n that.main.socket.emit('sendToHost', $(this).attr('data-host-name'), 'getLocationOnDisk', null, function (data) {\n if (infoTimeout) clearTimeout(infoTimeout);\n infoTimeout = null;\n showUpdateInfo(data);\n });\n });\n\n };\n\n function showUpdateInfo(data) {\n var $dialog = $('#dialog-host-update');\n if (data) {\n var path = data.path;\n path = path.replace(/\\\\/g, '/');\n var parts = path.split('/');\n parts.pop(); // js-controller\n parts.pop(); // node_modules\n\n if (data.platform === 'linux' || data.platform === 'darwin' || data.platform === 'freebsd' || data.platform === 'lin') {\n // linux\n $dialog.find('#dialog-host-update-instructions').val('cd ' + parts.join('/') + '\\nsudo yunkong2 stop\\nsudo yunkong2 update\\nsudo yunkong2 upgrade self\\nsudo yunkong2 start')\n } else {\n // windows\n $dialog.find('#dialog-host-update-instructions').val('cd ' + parts.join('\\\\') + '\\nyunkong2 stop\\nyunkong2 update\\nyunkong2 upgrade self\\nyunkong2 start')\n }\n } else {\n $dialog.find('#dialog-host-update-instructions').val('cd /opt/yunkong2\\nsudo yunkong2 stop\\nsudo yunkong2 update\\nsudo yunkong2 upgrade self\\nsudo yunkong2 start')\n }\n\n if (!$dialog.data('inited')) {\n $dialog.data('inited', true);\n $dialog.modal();\n }\n $dialog.modal('open');\n }\n\n function applyFilter(filter) {\n filter = (filter || '').toLowerCase().trim();\n\n if (!filter) {\n that.$tab.find('.hosts-host').show();\n that.$tab.find('.hosts-host-filtered-out').hide();\n } else {\n var someVisible = false;\n that.$tab.find('.hosts-host').each(function () {\n var text = $(this).data('host-filter');\n if (text.toLowerCase().indexOf(filter) !== -1) {\n $(this).show();\n someVisible = true;\n } else {\n $(this).hide();\n }\n });\n if (!someVisible) {\n that.$tab.find('.hosts-host-filtered-out').show();\n } else {\n that.$tab.find('.hosts-host-filtered-out').hide();\n }\n }\n }\n\n function showOneHostRow(index) {\n var obj = that.main.objects[that.list[index].id];\n var alive = that.main.states[obj._id + '.alive'] && that.main.states[obj._id + '.alive'].val && that.main.states[obj._id + '.alive'].val !== 'null';\n obj.common = obj.common || {};\n obj.native = obj.native || {};\n\n var text = '';\n //LED\n text += '
            ';\n // icon\n text += '' + that.main.getHostIcon(obj) + '';\n // name\n text += '' + obj.common.hostname + '';\n // type\n text += '' + obj.common.type + '';\n var title = obj.common.titleLang || obj.common.title;\n if (typeof title === 'object') {\n title = title[systemLang] || title.en;\n }\n // description\n text += '' + title + '';\n // platform\n // text += '' + obj.common.platform + ''; // actually only one platform\n // OS\n text += '' + (obj.native.os ? obj.native.os.platform : _('unknown')) + '';\n // Available\n text += '' +\n '' +\n '' +\n '';\n\n // installed\n text += '' + obj.common.installedVersion + '';\n\n // event rates\n if (that.main.states[obj._id + '.inputCount']) {\n text += '⇥' + that.main.states[obj._id + '.inputCount'].val + ' / ↦' + that.main.states[obj._id + '.outputCount'].val + '';\n } else {\n text += ' / ';\n }\n\n // restart button\n text += '';\n\n text += '';\n\n return text;\n }\n\n function showOneHostTile(index) {\n var obj = that.main.objects[that.list[index].id];\n var alive = that.main.states[obj._id + '.alive'] && that.main.states[obj._id + '.alive'].val && that.main.states[obj._id + '.alive'].val !== 'null';\n obj.common = obj.common || {};\n obj.native = obj.native || {};\n\n var color;\n if (obj.common.color) {\n color = that.main.invertColor(obj.common.color);\n }\n\n var text = '
            '+\n '
            ' +\n '
            '+\n ' ' + that.main.getHostIcon(obj, ' ') +\n '
            ' +\n '
            '+\n '
            ' +\n ' ' + obj.common.hostname + '' +\n '
              '+\n '
            • ' + that.words['Type'] + ': ' + obj.common.type + '
            • ' +\n '
            • ' + that.words['Title'] + ': ' + obj.common.title + '
            • ' +\n '
            • ' + that.words['OS'] + ': ' + (obj.native.os ? obj.native.os.platform : _('unknown')) + '
            • ' +\n '
            • ' + that.words['Available'] + ':
            • ' +\n '
            • ' + that.words['Installed'] + ': ' + obj.common.installedVersion + '
            • ';\n\n if (that.main.states[obj._id + '.inputCount']) {\n text += '
            • ' + that.words['Events'] + ': ⇥' + that.main.states[obj._id + '.inputCount'].val + ' / ↦' + that.main.states[obj._id + '.outputCount'].val + '
            • ';\n } else {\n text += '
            • ' + that.words['Events'] + ': /
            • ';\n }\n\n text += '
            '+\n '
            '+\n '
            '+\n ' edit' +\n ' autorenew';\n if (obj.common.hostname !== that.main.currentHost) {\n text += ' delete';\n }\n text += ' refresh' +\n ' refresh' +\n '
            '+\n '
            '+\n '
            ';\n\n return text;\n }\n\n function editHost(id) {\n var $dialog = $('#tab-host-dialog-edit');\n\n var titleVal = '';\n var iconVal = '';\n var colorVal = '';\n\n installFileUpload($dialog, 50000, function (err, text) {\n if (err) {\n that.main.showToast($dialog, err);\n } else {\n if (!text.match(/^data:image\\//)) {\n that.main.showToast($dialog, _('Unsupported image format'));\n return;\n }\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n iconVal = text;\n\n $dialog.find('.tab-host-dialog-edit-icon').show().html('');\n $dialog.find('.tab-host-dialog-edit-icon img').attr('src', text);\n $dialog.find('.tab-host-dialog-edit-icon-clear').show();\n }\n });\n\n if (that.main.objects[id] && that.main.objects[id].common) {\n titleVal = that.main.objects[id].common.title;\n if (typeof titleVal === 'object') {\n titleVal = titleVal[systemLang] || titleVal.en;\n }\n iconVal = that.main.objects[id].common.icon;\n colorVal = that.main.objects[id].common.color;\n }\n\n $dialog.find('#tab-host-dialog-edit-title')\n .val(titleVal)\n .off('change')\n .on('change', function () {\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n }).off('keyup').on('keyup', function () {\n $(this).trigger('change');\n });\n\n $dialog.find('.tab-host-dialog-ok')\n .addClass('disabled')\n .off('click')\n .on('click', function () {\n var obj = JSON.parse(JSON.stringify(that.main.objects[id]));\n obj.common.title = $dialog.find('#tab-host-dialog-edit-title').val();\n obj.common.icon = iconVal;\n obj.common.color = colorVal;\n if (JSON.stringify(obj) !== JSON.stringify(that.main.objects[id])) {\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n that.main.showToast($dialog, _('Updated'));\n });\n } else {\n that.main.showToast($dialog, _('Nothing changed'));\n }\n });\n\n if (iconVal) {\n $dialog.find('.tab-host-dialog-edit-icon').show().html(that.main.getIcon(id));\n $dialog.find('.tab-host-dialog-edit-icon-clear').show();\n } else {\n $dialog.find('.tab-host-dialog-edit-icon').hide();\n $dialog.find('.tab-host-dialog-edit-icon-clear').hide();\n }\n\n colorVal = colorVal || false;\n\n if (colorVal) {\n $dialog.find('.tab-host-dialog-edit-color').val(colorVal);\n } else {\n $dialog.find('.tab-host-dialog-edit-color').val();\n }\n\n M.updateTextFields('#tab-host-dialog-edit');\n that.main.showToast($dialog, _('Drop the icons here'));\n\n $dialog.find('.tab-host-dialog-edit-upload').off('click').on('click', function () {\n $dialog.find('.drop-file').trigger('click');\n });\n\n $dialog.find('.tab-host-dialog-edit-icon-clear').off('click').on('click', function () {\n if (iconVal) {\n iconVal = '';\n $dialog.find('.tab-host-dialog-edit-icon').hide();\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n $dialog.find('.tab-host-dialog-edit-icon-clear').hide();\n }\n });\n $dialog.find('.tab-host-dialog-edit-color-clear').off('click').on('click', function () {\n if (colorVal) {\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n $dialog.find('.tab-host-dialog-edit-color-clear').hide();\n $dialog.find('.tab-host-dialog-edit-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-host-dialog-edit-colorpicker')\n }).colorpicker('setValue', '');\n colorVal = '';\n }\n });\n var time = Date.now();\n try {\n $dialog.find('.tab-host-dialog-edit-colorpicker').colorpicker('destroy');\n } catch (e) {\n\n }\n $dialog.find('.tab-host-dialog-edit-colorpicker').colorpicker({\n component: '.btn',\n color: colorVal,\n container: $dialog.find('.tab-host-dialog-edit-colorpicker')\n }).colorpicker('setValue', colorVal).on('showPicker.colorpicker', function (/* event */) {\n //$dialog.find('.tab-host-dialog-edit-colorpicker')[0].scrollIntoView(false);\n var $modal = $dialog.find('.modal-content');\n $modal[0].scrollTop = $modal[0].scrollHeight;\n }).on('changeColor.colorpicker', function (event){\n if (Date.now() - time > 100) {\n colorVal = event.color.toHex();\n $dialog.find('.tab-host-dialog-ok').removeClass('disabled');\n $dialog.find('.tab-host-dialog-edit-icon-clear').show();\n }\n });\n if (colorVal) {\n $dialog.find('.tab-host-dialog-edit-color-clear').show();\n } else {\n $dialog.find('.tab-host-dialog-edit-color-clear').hide();\n }\n\n $dialog.modal().modal('open');\n }\n\n function showHostsTile() {\n var text = '';\n for (var i = 0; i < that.list.length; i++) {\n text += showOneHostTile(i);\n }\n that.$table.html('');\n that.$tab.find('.hosts-table').hide();\n that.$grid.html(text).show();\n that.$grid.append('
            ' + _('Filtered out') + '
            ');\n }\n\n function showHostsTable() {\n var text = '';\n for (var i = 0; i < that.list.length; i++) {\n text += showOneHostRow(i);\n }\n that.$grid.html('').hide();\n that.$table.html(text);\n that.$tab.find('.hosts-table').show();\n that.$table.append('' + _('Filtered out') + '');\n }\n\n this.updateCounter = function (counter) {\n if (counter === undefined) {\n this.main.tabs.adapters.getAdaptersInfo(this.main.currentHost, false, false, function (repository, installedList) {\n var hostsToUpdate = 0;\n if (!installedList || !installedList.hosts) return;\n\n for (var id in installedList.hosts) {\n if (!installedList.hosts.hasOwnProperty(id)) continue;\n var obj = that.main.objects['system.host.' + id];\n if (!obj || !obj.common) continue;\n var installedVersion = obj.common.installedVersion;\n var availableVersion = obj.common ? (repository && repository[obj.common.type] ? repository[obj.common.type].version : '') : '';\n\n if (installedVersion && availableVersion && !that.main.upToDate(availableVersion, installedVersion)) {\n id = 'system.host.' + id.trim().replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_');\n if (that.main.states[id + '.alive'] && that.main.states[id + '.alive'].val && that.main.states[id + '.alive'].val !== 'null') {\n hostsToUpdate++;\n }\n }\n }\n\n that.updateCounter(hostsToUpdate);\n });\n } else if (counter) {\n var $updates = $('#updates-for-hosts');\n if ($updates.length) {\n $updates.text(counter);\n } else {\n $('' + counter + '').appendTo('.admin-sidemenu-items[data-tab=\"tab-hosts\"] a');\n }\n } else {\n $('#updates-for-hosts').remove();\n }\n };\n\n this._postInit = function () {\n if (typeof that.$grid !== 'undefined') {\n if (this.isTiles) {\n showHostsTile();\n } else {\n showHostsTable()\n }\n applyFilter(this.$tab.find('.filter-input').val());\n\n var timer = setTimeout(function () {\n console.warn('Timeout for repository');\n timer = null;\n that.initButtons();\n }, 2000);\n\n var host = that.main.currentHost;\n if (!host) {\n // find alive host\n for (var i = 0; i < that.list.length; i++) {\n if (that.main.states[that.list[i].id + '.alive'] && that.main.states[that.list[i].id + '.alive'].val) {\n host = that.list[i].id;\n break;\n }\n }\n }\n\n that.main.tabs.adapters.getAdaptersInfo(host, true, false, function (repository, installedList) {\n if (!installedList || !installedList.hosts) return;\n\n for (var id in installedList.hosts) {\n if (!installedList.hosts.hasOwnProperty(id)) continue;\n var obj = that.main.objects['system.host.' + id];\n var installed = installedList.hosts[id].version;\n if (installed !== installedList.hosts[id].runningVersion) installed += '(' + _('Running: ') + installedList.hosts[id].runningVersion + ')';\n if (!installed && obj.common && obj.common.installedVersion) installed = obj.common.installedVersion;\n\n id = 'system.host.' + id.trim().replace(FORBIDDEN_CHARS, '_').replace(/\\./g, '_');\n that.$tab.find('.hosts-version-installed[data-host-id=\"' + id + '\"]').html(installed);\n }\n\n that.$tab.find('.hosts-host').each(function () {\n var id = $(this).data('host-id');\n var obj = that.main.objects[id];\n var installedVersion = obj.common.installedVersion;\n var availableVersion = obj.common ? (repository && repository[obj.common.type] ? repository[obj.common.type].version : '') : '';\n if (installedVersion && availableVersion) {\n if (!that.main.upToDate(availableVersion, installedVersion)) {\n // show button\n if (that.main.states[id + '.alive'] && that.main.states[id + '.alive'].val && that.main.states[id + '.alive'].val !== 'null') {\n $(this).find('.host-update-submit').show();\n $(this).find('.host-update-hint-submit').show();\n $(this).find('.hosts-version-installed').addClass('updateReady');\n $(this).find('.hosts-version-available').addClass('hosts-version-available-updatable');\n }\n }\n }\n if (availableVersion) {\n $(this).find('.hosts-version-available').html(availableVersion);\n }\n });\n\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n that.initButtons();\n });\n }\n };\n\n this.init = function (update) {\n if (this.inited && !update) {\n return;\n }\n\n this.getHosts(function () {\n that._postInit();\n });\n if (!this.inited) {\n this.inited = true;\n this.main.subscribeObjects('system.host.*');\n this.main.subscribeStates('system.host.*');\n }\n };\n\n this.destroy = function () {\n if (this.inited) {\n this.inited = false;\n this.main.unsubscribeObjects('system.host.*');\n this.main.unsubscribeStates('system.host.*');\n }\n };\n\n this.addHost = function (obj) {\n var addr = null;\n // Find first non internal IP and use it as identifier\n if (obj.native.hardware && obj.native.hardware.networkInterfaces) {\n for (var eth in obj.native.hardware.networkInterfaces) {\n if (!obj.native.hardware.networkInterfaces.hasOwnProperty(eth)) continue;\n for (var num = 0; num < obj.native.hardware.networkInterfaces[eth].length; num++) {\n if (!obj.native.hardware.networkInterfaces[eth][num].internal) {\n addr = obj.native.hardware.networkInterfaces[eth][num].address;\n break;\n }\n }\n if (addr) break;\n }\n }\n if (addr) {\n this.list.push({name: obj.common.hostname, address: addr, id: obj._id});\n } else {\n this.list.push({name: obj.common.hostname, address: '127.0.0.1', id: obj._id});\n }\n };\n\n this.getHosts = function (callback) {\n this.main.socket.emit('getForeignObjects', 'system.host.*', 'state', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.objects[id] = res[id];\n }\n that.main.socket.emit('getForeignStates', 'system.host.*', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.states[id] = res[id];\n }\n that.main.socket.emit('getForeignObjects', 'system.host.*', 'host', function (err, res) {\n that.list = [];\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n var obj = res[id];\n\n that.main.objects[id] = obj;\n\n if (obj.type === 'host') {\n that.addHost(obj);\n }\n }\n main.initHostsList();\n if (callback) callback();\n });\n });\n });\n };\n\n this.objectChange = function (id, obj, action) {\n // Update hosts\n if (id.match(/^system\\.host\\.[-\\w]+$/)) {\n var found = false;\n var i;\n for (i = 0; i < this.list.length; i++) {\n if (this.list[i].id === id) {\n found = true;\n break;\n }\n }\n\n if (obj) {\n if (!found) this.list.push({id: id, address: obj.common.address ? obj.common.address[0] : '', name: obj.common.name});\n } else {\n if (found) this.list.splice(i, 1);\n }\n \n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that._postInit();\n }, 200);\n }\n };\n\n this.stateChange = function (id, state) {\n if (id.match(/^system\\.host\\..+\\.alive$/)) {\n id = id.substring(0, id.length - 6);\n if (state && state.val) {\n this.$tab.find('.hosts-led[data-host-id=\"' + id + '\"]').removeClass('led-red').addClass('led-green');\n } else {\n this.$tab.find('.hosts-led[data-host-id=\"' + id + '\"]').removeClass('led-green').addClass('led-red');\n this.$tab.find('.host-update-submit[data-host-id=\"' + id + '\"]').hide();\n this.$tab.find('.host-update-hint-submit[data-host-id=\"' + id + '\"]').hide();\n this.$tab.find('.host-restart-submit[data-host-id=\"' + id + '\"]').hide();\n this.$tab.find('.hosts-version-available[data-host-id=\"' + id + '\"]').removeClass('hosts-version-available-updatable');\n }\n } else if (id.match(/^system\\.host\\..+\\.outputCount$/)) {\n id = id.substring(0, id.length - 12);\n\n this.$tab.find('.host-out[data-host-id=\"' + id + '\"]').html('↦' + state.val + '');\n } else if (id.match(/^system\\.host\\..+\\.inputCount$/)) {\n id = id.substring(0, id.length - 11);\n\n this.$tab.find('.host-in[data-host-id=\"' + id + '\"]').html('↦' + state.val + '');\n }\n };\n}\n\n","function Instances(main) {\n 'use strict';\n\n var that = this;\n\n this.$tab = $('#tab-instances');\n this.$grid = $('#grid-instances');\n this.$gridHead = $('#grid-instances-head');\n\n this.inited = false;\n this.main = main;\n this.list = [];\n this.hostsText = null;\n this.filterHost = false;\n this.memState = 'memAvailable';\n\n if (!window.tdp) {\n window.tdp = function (x, nachkomma) {\n return isNaN(x) ? '' : x.toFixed(nachkomma || 0).replace('.', ',').replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n }\n }\n\n function getLinkVar(_var, obj, attr, link, instance) {\n if (attr === 'protocol') attr = 'secure';\n\n if (_var === 'ip') {\n link = link.replace('%' + _var + '%', location.hostname);\n } else\n if (_var === 'instance') {\n link = link.replace('%' + _var + '%', instance);\n } else {\n if (obj) {\n if (attr.match(/^native_/)) attr = attr.substring(7);\n\n var val = obj.native[attr];\n if (_var === 'bind' && (!val || val === '0.0.0.0')) val = location.hostname;\n\n if (attr === 'secure') {\n link = link.replace('%' + _var + '%', val ? 'https' : 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', val);\n } else {\n link = link.replace('%' + _var + '%', val);\n }\n }\n } else {\n if (attr === 'secure') {\n link = link.replace('%' + _var + '%', 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', '');\n } else {\n link = link.replace('%' + _var + '%', '');\n }\n }\n }\n }\n return link;\n }\n\n function resolveLink(link, adapter, instance) {\n var vars = link.match(/%(\\w+)%/g);\n var _var;\n var v;\n var parts;\n if (vars) {\n // first replace simple patterns\n for (v = vars.length - 1; v >= 0; v--) {\n _var = vars[v];\n _var = _var.replace(/%/g, '');\n\n parts = _var.split('_');\n // like \"port\"\n if (_var.match(/^native_/)) {\n link = getLinkVar(_var, that.main.objects['system.adapter.' + adapter + '.' + instance], _var, link, instance);\n vars.splice(v, 1);\n } else\n if (parts.length === 1) {\n link = getLinkVar(_var, that.main.objects['system.adapter.' + adapter + '.' + instance], parts[0], link, instance);\n vars.splice(v, 1);\n } else\n // like \"web.0_port\"\n if (parts[0].match(/\\.[0-9]+$/)) {\n link = getLinkVar(_var, that.main.objects['system.adapter.' + parts[0]], parts[1], link, instance);\n vars.splice(v, 1);\n }\n }\n var links = {};\n var instances;\n var adptr = parts[0];\n // process web_port\n for (v = 0; v < vars.length; v++) {\n _var = vars[v];\n _var = _var.replace(/%/g, '');\n if (_var.match(/^native_/)) _var = _var.substring(7);\n\n parts = _var.split('_');\n if (!instances) {\n instances = [];\n for (var inst = 0; inst < 10; inst++) {\n if (that.main.objects['system.adapter.' + adptr + '.' + inst]) instances.push(inst);\n }\n }\n\n for (var i = 0; i < instances.length; i++) {\n links[adptr + '.' + i] = {\n instance: adptr + '.' + i,\n link: getLinkVar(_var, that.main.objects['system.adapter.' + adptr + '.' + i], parts[1], links[adptr + '.' + i] ? links[adptr + '.' + i].link : link, i)\n };\n }\n }\n\n var result;\n if (instances) {\n result = {};\n var count = 0;\n var firtsLink = '';\n for (var d in links) {\n if (links.hasOwnProperty(d)) {\n result[links[d].instance] = links[d].link;\n if (!firtsLink) firtsLink = links[d].link;\n count++;\n }\n }\n if (count < 2) {\n link = firtsLink;\n result = null;\n }\n }\n }\n return result || link;\n }\n\n this.replaceInLink = function (link, adapter, instance) {\n if (typeof link === 'object') {\n var links = JSON.parse(JSON.stringify(link));\n var first;\n for (var v in links) {\n if (links.hasOwnProperty(v)) {\n links[v] = resolveLink(links[v], adapter, instance);\n if (!first) first = links[v];\n }\n }\n links.__first = first;\n return links;\n } else {\n return resolveLink(link, adapter, instance);\n }\n };\n\n function updateLed(instanceId) {\n var tmp = instanceId.split('.');\n var adapter = tmp[2];\n var instance = tmp[3];\n\n var $led = that.$tab.find('.instance-led[data-instance-id=\"' + instanceId + '\"]');\n\n var common = that.main.objects[instanceId] ? that.main.objects[instanceId].common || {} : {};\n var state = (common.mode === 'daemon') ? 'green' : 'blue';\n var title = '';\n if (common.enabled && (!common.webExtension || !that.main.objects[instanceId].native.webInstance)) {\n title = '';\n title += '';\n\n if (that.main.states[adapter + '.' + instance + '.info.connection'] || that.main.objects[adapter + '.' + instance + '.info.connection']) {\n title += '';\n }\n title += '
            ' + _('Connected to host: ') + '';\n\n if (!that.main.states[instanceId + '.connected'] || !that.main.states[instanceId + '.connected'].val) {\n title += ((common.mode === 'daemon') ? '' + _('false') + '' : _('false'));\n state = (common.mode === 'daemon') ? 'red' : 'blue';\n } else {\n title += '' + _('true') + '';\n }\n title += '
            ' + _('Heartbeat: ') + '';\n\n if (!that.main.states[instanceId + '.alive'] || !that.main.states[instanceId + '.alive'].val) {\n title += ((common.mode === 'daemon') ? '' + _('false') + '' : _('false'));\n state = (common.mode === 'daemon') ? 'red' : 'blue';\n } else {\n title += '' + _('true') + '';\n }\n title += '
            ' + _('Connected to %s: ', adapter) + '';\n var val = that.main.states[adapter + '.' + instance + '.info.connection'] ? that.main.states[adapter + '.' + instance + '.info.connection'].val : false;\n if (!val) {\n state = state === 'red' ? 'red' : 'orange';\n title += '' + _('false') + '';\n } else {\n if (val === true) {\n title += '' + _('true') + '';\n } else {\n title += '' + val + '';\n }\n }\n title += '
            ';\n } else {\n state = (common.mode === 'daemon') ? 'gray' : 'blue';\n title = '';\n title += '';\n\n title += '';\n\n if (that.main.states[adapter + '.' + instance + '.info.connection'] || that.main.objects[adapter + '.' + instance + '.info.connection']) {\n title += '';\n }\n title += '
            ' + _('Connected to host: ') + '';\n\n if (!that.main.states[instanceId + '.connected'] || !that.main.states[instanceId + '.connected'].val) {\n title += _('false');\n } else {\n title += '' + _('true') + '';\n }\n title += '
            ' + _('Heartbeat: ') + '';\n if (!that.main.states[instanceId + '.alive'] || !that.main.states[instanceId + '.alive'].val) {\n title += _('false');\n } else {\n title += '' + _('true') + '';\n }\n title += '
            ' + _('Connected to %s: ', adapter) + '';\n var val = that.main.states[adapter + '.' + instance + '.info.connection'] ? that.main.states[adapter + '.' + instance + '.info.connection'].val : false;\n if (!val) {\n title += _('false');\n } else {\n if (val === true) {\n title += '' + _('true') + '';\n } else {\n title += '' + val + '';\n }\n }\n title += '
            ';\n }\n\n state = (state === 'blue') ? '' : state;\n\n $led.removeClass('led-red led-green led-orange led-blue').addClass('led-' + state).data('title', title);\n\n if (!$led.data('inited') && state !== 'gray') {\n $led.data('inited', true);\n\n $led.hover(function () {\n var text = '
            ' + $(this).data('title') + '
            ';\n var $big = $(text);\n\n $big.insertAfter($(this));\n $(this).data('big', $big[0]);\n var h = parseFloat($big.height());\n var top = Math.round($(this).position().top - ((h - parseFloat($(this).height())) / 2));\n if (h + top > (window.innerHeight || document.documentElement.clientHeight)) {\n top = (window.innerHeight || document.documentElement.clientHeight) - h;\n }\n if (top < 0) {\n top = 0;\n }\n $big.css({top: top}).on('click', function () {\n var big = $(this).data('big');\n $(big).remove();\n $(this).data('big', undefined);\n });\n }, function () {\n var big = $(this).data('big');\n $(big).remove();\n $(this).data('big', undefined);\n }).on('click', function () {\n $(this).trigger('hover');\n });\n }\n }\n\n /*function _createHead() {\n var text = '';\n // _('name'), _('instance'), _('title'), _('enabled'), _('host'), _('mode'), _('schedule'), '', _('platform'), _('loglevel'), _('memlimit'), _('alive'), _('connected')],\n text += '';\n //text += '';\n text += '';\n text += '' + _('instance') + '';\n text += '';\n text += '' + _('title') + '';\n\n if (that.main.tabs.hosts.list.length > 1) {\n text += '' + _('host') + '';\n }\n\n text += '' + _('schedule_group') + '';\n\n if (that.main.config.expertMode) {\n text += '' + _('restart') + '';\n text += '' + _('loglevel') + '';\n text += '' + _('memlimit') + '';\n text += '' + _('events') + '';\n }\n text += '' + _('RAM usage') + '';\n that.$gridHead.html(text);\n }*/\n\n function createHead() {\n var text = '';\n // _('name'), _('instance'), _('title'), _('enabled'), _('host'), _('mode'), _('schedule'), '', _('platform'), _('loglevel'), _('memlimit'), _('alive'), _('connected')],\n text += '' +\n '' + _('instance') + '' +\n '';\n text += '';\n text += '';\n // disabled, because no one use it\n if (false && that.main.config.expertMode) {\n text += '' + _('actions') + '';\n } else {\n text += '' + _('actions') + '';\n }\n text += '' + _('title') + '';\n\n if (that.main.tabs.hosts.list.length > 1) {\n text += '' + _('host') + '';\n }\n\n text += '' + _('schedule_group') + '';\n\n if (that.main.config.expertMode) {\n text += '' + _('restart') + '';\n text += '' + _('loglevel') + '';\n text += '' + _('memlimit') + '';\n text += '' + _('events') + '';\n }\n text += '' + _('RAM usage') + '';\n that.$gridHead.html(text);\n }\n\n function calculateTotalRam() {\n var host = that.main.states['system.host.' + that.main.currentHost + '.memRss'];\n var processes = 1;\n var mem = host ? host.val : 0;\n for (var i = 0; i < that.list.length; i++) {\n var obj = that.main.objects[that.list[i]];\n if (!obj || !obj.common) continue;\n if (obj.common.host !== that.main.currentHost) continue;\n if (obj.common.enabled && obj.common.mode === 'daemon') {\n var m = that.main.states[obj._id + '.memRss'];\n mem += m ? m.val : 0;\n processes++;\n }\n }\n mem = Math.round(mem);\n var $totalRam = that.$tab.find('#totalRam');\n if (mem.toString() !== $totalRam.text()) {\n $totalRam.html('' + mem + '');\n }\n var text = _('%s processes', processes);\n var $running_processes = that.$tab.find('#running_processes');\n if (text !== $running_processes.text()) {\n $running_processes.html('' + text + '')\n }\n }\n\n function calculateFreeMem() {\n if (that.main.states['system.host.' + that.main.currentHost + '.memAvailable']) {\n that.memState = 'memAvailable';\n } else if (that.main.states['system.host.' + that.main.currentHost + '.freemem']) {\n that.memState = 'freemem';\n }\n\n var host = that.main.states['system.host.' + that.main.currentHost + '.' + that.memState];\n if (host) {\n that.totalmem = that.totalmem || (that.main.objects['system.host.' + that.main.currentHost].native.hardware.totalmem / (1024 * 1024));\n var percent = Math.round((host.val / that.totalmem) * 100);\n var $freeMem = that.$tab.find('#freeMem');\n var strVal = tdp(host.val);\n if (strVal !== $freeMem.text()) {\n $freeMem.html('' + strVal + '');\n that.$tab.find('#freeMemPercent').html('' + percent + '%');\n }\n } else {\n that.$tab.find('.free-mem-label').hide();\n }\n }\n\n function calculateDiskMem() {\n var diskSize = that.main.states['system.host.' + that.main.currentHost + '.diskSize'];\n var diskFree = that.main.states['system.host.' + that.main.currentHost + '.diskFree'];\n var diskWarning = that.main.states['system.host.' + that.main.currentHost + '.diskWarning'];\n\n if (diskFree && diskFree.val && diskSize && diskSize.val) {\n if (diskWarning) {\n diskWarning = parseFloat(diskWarning.val);\n } else {\n diskWarning = 5;\n }\n\n var $diskFree = that.$tab.find('#diskFree');\n var size = (Math.round((diskFree.val / diskSize.val) * 1000) / 10);\n $diskFree.html('' + size + '');\n $diskFree.parent().attr('title', _('Size: %s, Free: %s', that.main.formatBytes(diskSize.val * 1024 * 1024), that.main.formatBytes(diskFree.val * 1024 * 1024)));\n } else {\n that.$tab.find('.tab-instances-info-disk').hide();\n }\n }\n\n function calculateRam(instanceId) {\n var mem;\n var common = that.main.objects[instanceId] ? that.main.objects[instanceId].common || {} : {};\n if (common.enabled && common.mode === 'daemon' && that.main.states[instanceId + '.memRss']) {\n mem = that.main.states[instanceId + '.memRss'].val;\n mem = parseFloat(mem) || 0;\n\n if (common.memoryLimitMB && common.memoryLimitMB <= mem) {\n mem = '' + mem.toFixed(1) + ' MB';\n } else {\n mem = mem.toFixed(1) + ' MB'\n }\n } else {\n mem = '';\n }\n return mem;\n }\n\n function showOneAdapter(rootElem, instanceId, form, justContent) {\n var text;\n var common = that.main.objects[instanceId] ? that.main.objects[instanceId].common || {} : {};\n var tmp = instanceId.split('.');\n var adapter = tmp[2];\n var instance = tmp[3];\n\n if (form === 'tile') {\n text = justContent ? '' : '
            ';\n text += justContent ? '' : '
            ';\n } else {\n // table\n text = justContent ? '' : '';\n\n var link = common.localLinks || common.localLink || '';\n var url = link ? that.replaceInLink(link, adapter, instance) : '';\n if (link) {\n if (typeof url === 'object') {\n link = '';\n } else {\n link = '';\n }\n }\n\n // State -\n // red - adapter is not connected or not alive,\n // orange - adapter is connected and alive, but device is not connected,\n // green - adapter is connected and alive, device is connected or no device,\n text += '
            ';\n\n // icon\n text += '' + (common.icon ? link + '' : '') + (link ? '
            ': '') + '';\n\n // name and instance\n text += '' + adapter + '.' + instance + '';\n\n var isRun = common.onlyWWW || common.enabled;\n // buttons\n text += '' +\n '' +\n '' +\n '';\n // disable, because no one use it\n if (false && that.main.config.expertMode) {\n text += '';\n }\n text += '' +\n (url ? '' : '') +\n '';\n\n var title = common.titleLang || common.title;\n if (typeof title === 'object') {\n title = title[systemLang] || title.en;\n }\n\n // title\n text += '' + (title || '') + '';\n\n // host - hide it if only one host\n if (that.main.tabs.hosts.list.length > 1) {\n if (!that.hostsText) {\n that.hostsText = '';\n for (var h = 0; h < that.main.tabs.hosts.list.length; h++) {\n var host = that.main.tabs.hosts.list[h] || '';\n that.hostsText += (that.hostsText ? ';' : '') + host.name;\n }\n }\n text += '' + (common.host || '') + '';\n }\n\n // schedule\n text += '' + (common.mode === 'schedule' ? (common.schedule || '') : '') + '';\n\n // scheduled restart (only experts)\n if (that.main.config.expertMode) {\n text += '' + (common.restartSchedule || '') + '';\n // debug level (only experts)\n text += '' + (common.loglevel || '') + '';\n // Max RAM (only experts)\n text += '' + (common.memoryLimitMB || '') + '';\n // Max RAM (only experts)\n if (isRun && that.main.states[instanceId + '.inputCount'] && that.main.states[instanceId + '.outputCount']) {\n text += '⇥' + that.main.states[instanceId + '.inputCount'].val + ' / ↦' + that.main.states[instanceId + '.outputCount'].val + '';\n } else {\n text += ' / ';\n }\n }\n\n text += '' + calculateRam(instanceId) + '';\n\n text += justContent ? '' : '';\n }\n if (!justContent) {\n rootElem.append(text);\n } else {\n that.$tab.find('.instance-adapter[data-instance-id=\"' + instanceId + '\"]').html(text);\n }\n // init buttons\n that.initButtons(instanceId, url);\n updateLed(instanceId);\n // init links\n that.$tab.find('.instance-editable[data-instance-id=\"' + instanceId + '\"]')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit');\n\n // init schedule editor\n that.$tab.find('.instance-schedule[data-instance-id=\"' + instanceId + '\"]').each(function () {\n if (!$(this).find('button').length) {\n $(this).append('');\n $(this).find('button').on('click', function () {\n var attr = $(this).data('name');\n var _instanceId = $(this).data('instance-id');\n showCronDialog(that.main.objects[_instanceId].common[attr] || '', function (newValue) {\n if (newValue !== null) {\n var obj = {common: {}};\n obj.common[attr] = newValue;\n that.main.socket.emit('extendObject', _instanceId, obj, function (err) {\n if (err) that.main.showError(err);\n });\n }\n })\n });\n }\n });\n\n that.$tab.find('.instance-name[data-instance-id=\"' + instanceId + '\"]').on('click', function () {\n var $btn = that.$tab.find('.instance-settings[data-instance-id=\"' + $(this).data('instance-id') + '\"]');\n if (!$btn.hasClass('small-button-empty')) {\n $btn.trigger('click');\n }\n }).css('cursor', 'pointer');\n }\n\n function applyFilter(filter) {\n if (filter === undefined) {\n filter = that.$tab.find('.instances-filter').val();\n }\n var invisible = [];\n if (filter) {\n var reg = new RegExp(filter);\n\n for (var i = 0; i < that.list.length; i++) {\n var obj = that.main.objects[that.list[i]];\n if (!obj || !obj.common) {\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]').hide();\n continue;\n }\n var isShow = 'hide';\n var title = obj.common.titleLang || obj.common.title;\n if (typeof title === 'object') {\n title = title[systemLang] || title.en;\n }\n\n if (obj.common.name && reg.test(obj.common.name)) {\n isShow = 'show';\n } else\n if (title && reg.test(title)) {\n isShow = 'show';\n } else\n if (filter === 'true') {\n isShow = that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]').find('instance-led').hasClass('led-green') ? 'show' : 'hide';\n } else\n if (filter === 'false') {\n isShow = that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]').find('instance-led').hasClass('led-green') ? 'hide' : 'show';\n }\n\n if (isShow === 'show' && that.filterHost && obj.common.host !== that.main.currentHost) isShow = 'hide';\n\n if (isShow === 'hide') invisible.push(that.list[i]);\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[i] + '\"]')[isShow]();\n }\n } else {\n if (that.filterHost) {\n for (var j = 0; j < that.list.length; j++) {\n var _obj = that.main.objects[that.list[j]];\n if (!_obj || !_obj.common) {\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[j] + '\"]').hide();\n continue;\n }\n var _isShow = 'hide';\n if (_obj.common.host === that.main.currentHost) _isShow = 'show';\n that.$grid.find('.instance-adapter[data-instance-id=\"' + that.list[j] + '\"]')[_isShow]();\n }\n } else {\n that.$grid.find('.instance-adapter').show();\n }\n }\n var anyVisible = false;\n that.$grid.find('.instance-adapter').each(function () {\n if ($(this).is(':visible')) {\n anyVisible = true;\n return false;\n }\n });\n\n if (anyVisible) {\n that.$grid.find('.filtered-out').hide();\n } else {\n that.$grid.find('.filtered-out').show();\n }\n }\n\n function onQuickEditField(e) {\n var $this = $(this);\n var id = $this.data('instance-id');\n var attr = $this.data('name');\n var options = $this.data('options');\n var oldVal = $this.data('value');\n var innerHTML = this.innerHTML;\n var textAlign = $this.css('text-align');\n $this.css('text-align', 'left');\n\n $this.off('click').removeClass('select-id-quick-edit').css('position', 'relative');\n\n var css = 'cursor: pointer; position: absolute;width: 16px; height: 16px; top: 2px; border-radius: 6px; z-index: 3; background-color: lightgray';\n var type = 'text';\n var text;\n\n if (options) {\n var opt = options.split(';');\n text = '';\n }\n text = text || '';\n\n var timeout = null;\n\n $this.html(text +\n '
            ' +\n '
            ');\n\n var $input = (options) ? $this.find('select') : $this.find('input');\n\n $this.find('.select-id-quick-edit-cancel').off('click').on('click', function (e) {\n if (timeout) clearTimeout(timeout);\n timeout = null;\n e.preventDefault();\n e.stopPropagation();\n $this.html(innerHTML)\n .off('click')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit')\n .css('text-align', textAlign);\n });\n\n $this.find('.select-id-quick-edit-ok').off('click').on('click', function () {\n $this.trigger('blur');\n });\n\n $input.val(oldVal);\n\n $input.blur(function () {\n if (timeout) clearTimeout(timeout);\n\n timeout = setTimeout(function () {\n timeout = null;\n var val = $(this).val();\n\n if (JSON.stringify(val) !== JSON.stringify(oldVal)) {\n that.main.socket.emit('getObject', id, function (err, obj) {\n if (obj) {\n obj.common = obj.common || {};\n obj.common[attr] = val;\n if (attr === 'title' && obj.common.titleLang) {\n delete obj.common.titleLang;\n }\n that.main.socket.emit('setObject', obj._id, obj, function (err) {\n if (err) that.main.showError(err);\n });\n } else {\n console.log('Object ' + id + ' does not exist: ' + err);\n }\n });\n oldVal = '' + oldVal + '';\n } else {\n oldVal = innerHTML;\n }\n $this.html(oldVal)\n .off('click')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit')\n .css('text-align', textAlign);\n }.bind(this), 100);\n }).on('keyup', function (e) {\n if (e.which === 13) $(this).trigger('blur');\n if (e.which === 27) {\n if (oldVal === undefined) oldVal = '';\n $this.html(oldVal)\n .off('click')\n .on('click', onQuickEditField)\n .addClass('select-id-quick-edit')\n .css('text-align', textAlign);\n }\n });\n\n if (typeof e === 'object') {\n e.preventDefault();\n e.stopPropagation();\n }\n\n setTimeout(function () {\n $input.focus();\n }, 100);\n }\n\n function showCronDialog(value, cb) {\n value = (value || '').replace(/\"/g, '').replace(/'/g, '');\n try {\n setupCron(value, cb);\n } catch (e) {\n alert(_('Cannot parse value as cron'));\n }\n }\n\n this.prepare = function () {\n /*this.$dialogCron.dialog({\n autoOpen: false,\n modal: true,\n width: 700,\n height: 550,\n resizable: false,\n title: _('Cron expression'),\n buttons: [\n {\n id: 'dialog_cron_insert',\n text: _('Insert'),\n click: function () {\n var val = $('#div-cron').cron('value');\n that.$dialogCron.dialog('close');\n that.editor.insert('\"' + val + '\"');\n that.editor.focus();\n }\n },\n {\n id: 'dialog_cron_clear',\n text: _('Clear'),\n click: function () {\n $('#div-cron').cron('value', '');\n }\n },\n {\n id: 'dialog_cron_callback',\n text: _('Set CRON'),\n click: function () {\n }\n },\n {\n text: _('Cancel'),\n click: function () {\n that.$dialogCron.dialog('close');\n }\n }\n ]\n });\n\n $('#div-cron').cron({value: ''});\n*/\n var $filter = that.$tab.find('.instances-filter');\n var $filterClear = that.$tab.find('.instances-filter-clear');\n\n $filter.on('change', function () {\n var val = $(this).val();\n if (val) {\n $(this).addClass('input-not-empty');\n $filterClear.show();\n } else {\n $(this).removeClass('input-not-empty');\n $filterClear.hide();\n }\n that.main.saveConfig('instancesFilter', val);\n applyFilter(val);\n }).on('keyup', function () {\n if (that.filterTimeout) clearTimeout(that.filterTimeout);\n that.filterTimeout = setTimeout(function () {\n $filter.trigger('change');\n }, 300);\n });\n if (that.main.config.instancesFilter && that.main.config.instancesFilter[0] !== '{') {\n $filter.addClass('input-not-empty').val(that.main.config.instancesFilter);\n $filterClear.show();\n } else {\n $filterClear.hide();\n }\n\n //$('#load_grid-instances').show();\n that.$tab.find('.btn-instances-expert-mode').on('click', function () {\n that.main.config.expertMode = !that.main.config.expertMode;\n that.main.saveConfig('expertMode', that.main.config.expertMode);\n that.updateExpertMode();\n that.main.tabs.adapters.updateExpertMode();\n });\n\n if (that.main.config.expertMode) {\n that.$tab.find('.btn-instances-expert-mode').addClass('red lighten-3');\n }\n\n that.$tab.find('.btn-instances-reload').on('click', function () {\n that.init(true, true);\n });\n\n /*that.$grid.find('#btn-instances-form').button({\n icons: {primary: 'ui-icon-refresh'},\n text: false\n }).css({width: '1.5em', height: '1.5em'}).attr('title', _('reload')).on('click', function () {\n that.main.config.instanceForm = that.main.config.instanceForm === 'tile' ? 'list' : 'tile';\n that.main.saveCell('expertMode', that.main.config.expertMode);\n that.init(true);\n });*/\n\n $filterClear.on('click', function () {\n $filter.val('').trigger('change');\n });\n\n this.$tab.find('.btn-instances-host').off('click').on('click', function () {\n that.filterHost = !that.filterHost;\n if (that.filterHost) {\n that.$tab.find('.btn-instances-host').addClass('red lighten-3');\n } else {\n that.$tab.find('.btn-instances-host').removeClass('red lighten-3');\n }\n that.main.saveConfig('instancesFilterHost', that.filterHost);\n\n setTimeout(function () {\n applyFilter();\n }, 50);\n });\n\n this.filterHost = this.main.config.instancesFilterHost || false;\n\n if (this.filterHost) {\n this.$tab.find('.btn-instances-host').addClass('red lighten-3');\n } else {\n this.$tab.find('.btn-instances-host').removeClass('red lighten-3');\n }\n };\n\n this.updateExpertMode = function () {\n that.init(true);\n if (that.main.config.expertMode) {\n that.$tab.find('.btn-instances-expert-mode').addClass('red lighten-3');\n } else {\n that.$tab.find('.btn-instances-expert-mode').removeClass('red lighten-3');\n }\n };\n\n this.replaceLink = function (_var, adapter, instance, elem) {\n _var = _var.replace(/%/g, '');\n if (_var.match(/^native_/)) _var = _var.substring(7);\n // like web.0_port\n var parts;\n if (_var.indexOf('_') === -1) {\n parts = [\n adapter + '.' + instance,\n _var\n ]\n } else {\n parts = _var.split('_');\n // add .0 if not defined\n if (!parts[0].match(/\\.[0-9]+$/)) parts[0] += '.0';\n }\n\n if (parts[1] === 'protocol') parts[1] = 'secure';\n\n if (_var === 'instance') {\n setTimeout(function () {\n var link;\n if (elem) {\n link = that.$tab.find('#' + elem).data('src');\n } else {\n link = that.$tab.find('#a_' + adapter + '_' + instance).attr('href');\n }\n\n link = link.replace('%instance%', instance);\n if (elem) {\n that.$tab.find('#' + elem).data('src', link);\n } else {\n that.$tab.find('#a_' + adapter + '_' + instance).attr('href', link);\n }\n }, 0);\n return;\n }\n\n this.main.socket.emit('getObject', 'system.adapter.' + parts[0], function (err, obj) {\n if (obj) {\n setTimeout(function () {\n var link;\n if (elem) {\n link = that.$tab.find('#' + elem).data('src');\n } else {\n link = that.$tab.find('#a_' + adapter + '_' + instance).attr('href');\n }\n if (link) {\n if (parts[1] === 'secure') {\n link = link.replace('%' + _var + '%', obj.native[parts[1]] ? 'https' : 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', obj.native[parts[1]]);\n } else {\n link = link.replace('%' + _var + '%', obj.native[parts[1]]);\n }\n }\n if (elem) {\n that.$tab.find('#' + elem).data('src', link);\n } else {\n that.$tab.find('#a_' + adapter + '_' + instance).attr('href', link);\n }\n }\n }, 0);\n }\n });\n };\n\n /*this.replaceLinks = function (vars, adapter, instance, elem) {\n if (typeof vars !== 'object') vars = [vars];\n for (var t = 0; t < vars.length; t++) {\n this.replaceLink(vars[t], adapter, instance, elem);\n }\n };*/\n\n this._replaceLink = function (link, _var, adapter, instance, callback) {\n // remove %%\n _var = _var.replace(/%/g, '');\n\n if (_var.match(/^native_/)) _var = _var.substring(7);\n // like web.0_port\n var parts;\n if (_var.indexOf('_') === -1) {\n parts = [adapter + '.' + instance, _var];\n } else {\n parts = _var.split('_');\n // add .0 if not defined\n if (!parts[0].match(/\\.[0-9]+$/)) parts[0] += '.0';\n }\n\n if (parts[1] === 'protocol') parts[1] = 'secure';\n\n this.main.socket.emit('getObject', 'system.adapter.' + parts[0], function (err, obj) {\n if (obj && link) {\n if (parts[1] === 'secure') {\n link = link.replace('%' + _var + '%', obj.native[parts[1]] ? 'https' : 'http');\n } else {\n if (link.indexOf('%' + _var + '%') === -1) {\n link = link.replace('%native_' + _var + '%', obj.native[parts[1]]);\n } else {\n link = link.replace('%' + _var + '%', obj.native[parts[1]]);\n }\n }\n } else {\n console.log('Cannot get link ' + parts[1]);\n link = link.replace('%' + _var + '%', '');\n }\n setTimeout(function () {\n callback(link, adapter, instance);\n }, 0);\n });\n };\n\n this._replaceLinks = function (link, adapter, instance, arg, callback) {\n if (!link) {\n return callback(link, adapter, instance, arg);\n }\n var vars = link.match(/%(\\w+)%/g);\n if (!vars) {\n return callback(link, adapter, instance, arg);\n }\n if (vars[0] === '%ip%') {\n link = link.replace('%ip%', location.hostname);\n this._replaceLinks(link, adapter, instance, arg, callback);\n return;\n }\n if (vars[0] === '%instance%') {\n link = link.replace('%instance%', instance);\n this._replaceLinks(link, adapter, instance, arg, callback);\n return;\n }\n this._replaceLink(link, vars[0], adapter, instance, function (link, adapter, instance) {\n this._replaceLinks(link, adapter, instance, arg, callback);\n }.bind(this));\n };\n\n this._postInit = function (update, showTip) {\n if (this.main.currentHost && typeof this.$grid !== 'undefined' && (!this.$grid.data('inited') || update)) {\n this.$grid.data('inited', true);\n this.list.sort();\n var onlyWWW = [];\n // move all adapters with not onlyWWW and noConfig to the bottom\n for (var l = this.list.length - 1; l >= 0; l--) {\n if (this.main.objects[this.list[l]] &&\n this.main.objects[this.list[l]].common &&\n !this.main.objects[this.list[l]].common.localLink &&\n !this.main.objects[this.list[l]].common.localLinks &&\n this.main.objects[this.list[l]].common.noConfig\n ) {\n onlyWWW.push(this.list[l]);\n this.list.splice(l, 1);\n }\n }\n this.list.sort();\n onlyWWW.sort();\n for (l = 0; l < onlyWWW.length; l++) {\n this.list.push(onlyWWW[l]);\n }\n\n createHead();\n this.$grid.html('');\n var ts = Date.now();\n for (var i = 0; i < this.list.length; i++) {\n var obj = this.main.objects[this.list[i]];\n if (!obj) continue;\n showOneAdapter(this.$grid, this.list[i], this.main.config.instanceForm);\n }\n console.log(Date.now() - ts);\n\n this.$grid.append('' + _('Filtered out') + '');\n\n that.$tab.find('#currentHost').html(this.main.currentHost);\n\n if (that.main.tabs.hosts.list.length > 1) {\n this.$tab.find('.btn-instances-host').show();\n } else {\n this.$tab.find('.btn-instances-host').hide();\n this.filterHost = false;\n }\n\n applyFilter();\n\n calculateTotalRam();\n calculateFreeMem();\n calculateDiskMem();\n that.restoreScroll();\n if (showTip) {\n that.main.showToast(that.$tab.find('.main-toolbar-table'), _('Updated'));\n }\n }\n };\n\n this.getInstances = function (callback) {\n this.main.socket.emit('getForeignObjects', 'system.adapter.*', 'state', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.objects[id] = res[id];\n }\n that.main.socket.emit('getForeignStates', '*.info.connection', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.states[id] = res[id];\n }\n\n that.main.socket.emit('getForeignStates', 'system.adapter.*', function (err, res) {\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n that.main.states[id] = res[id];\n }\n\n that.main.socket.emit('getForeignObjects', 'system.adapter.*', 'instance', function (err, res) {\n that.main.instances.splice(0, that.main.instances.length); // because of pointer in admin.main\n for (var id in res) {\n if (!res.hasOwnProperty(id)) continue;\n var obj = res[id];\n that.main.objects[id] = obj;\n\n if (obj.type === 'instance') {\n that.main.instances.push(id);\n }\n }\n if (callback) callback();\n });\n\n });\n });\n });\n };\n\n this.init = function (update, showMessage) {\n if (this.inited && !update) {\n return;\n }\n if (!this.main.objectsLoaded) {\n setTimeout(function () {\n that.init(update, showMessage);\n }, 250);\n return;\n }\n var count = 0;\n\n count++;\n this.getInstances(function () {\n if (!--count) that._postInit(update, showMessage);\n });\n count++;\n this.main.tabs.hosts.getHosts(function () {\n if (!--count) that._postInit(update, showMessage);\n });\n\n if (!this.inited) {\n this.inited = true;\n // subscribe objects and states\n this.main.subscribeObjects('system.adapter.*');\n this.main.subscribeStates('system.adapter.*');\n this.main.subscribeObjects('system.host.*');\n this.main.subscribeStates('system.host.*');\n this.main.subscribeStates('*.info.connection');\n }\n };\n\n this.saveScroll = function () {\n this.scrollTop = this.$tab.find('.grid-main-div').scrollTop();\n };\n this.restoreScroll = function () {\n if (this.scrollTop) {\n this.$tab.find('.grid-main-div').scrollTop(this.scrollTop);\n }\n };\n this.destroy = function () {\n if (this.inited) {\n this.saveScroll();\n this.$grid.data('inited', false);\n this.inited = false;\n // subscribe objects and states\n this.main.unsubscribeObjects('system.adapter.*');\n this.main.unsubscribeStates('system.host.*');\n this.main.unsubscribeObjects('system.host.*');\n this.main.unsubscribeStates('system.adapter.*');\n this.main.unsubscribeStates('*.info.connection');\n }\n };\n\n this.stateChange = function (id, state) {\n this.main.states[id] = state;\n if (this.$grid) {\n var parts = id.split('.');\n var last = parts.pop();\n id = parts.join('.');\n\n if (state) {\n if (last === 'diskFree' || last === 'diskWarning') {\n // update disk size\n calculateDiskMem();\n } else if (last === that.memState) {\n // update total ram\n calculateFreeMem();\n } else if (last === 'memRss') {\n // update total ram\n calculateTotalRam();\n // update instance ram\n var $mem = that.$tab.find('.memUsage[data-instance-id=\"' + id + '\"]');\n var mem = calculateRam(id);\n if ($mem.length && $mem.text() !== mem) {\n $mem.html('' + mem + '');\n }\n } else if (last === 'outputCount') {\n // update total ram\n that.$tab.find('.instance-out[data-instance-id=\"' + id + '\"]').html('↦' + state.val + '');\n } else if (last === 'inputCount') {\n that.$tab.find('.instance-in[data-instance-id=\"' + id + '\"]').html('⇥' + state.val + '');\n }\n\n if (this.list.indexOf(id) !== -1) {\n if (last === 'alive' || last === 'connected') {\n updateLed(id);\n }\n return;\n }\n id = 'system.adapter.' + parts[0] + '.' + parts[1];\n if (this.list.indexOf(id) !== -1 && last === 'connection') {\n updateLed(id);\n }\n }\n }\n };\n\n this.objectChange = function (id, obj, action) {\n // Update Instance Table\n if (id.match(/^system\\.adapter\\.[-\\w]+\\.[0-9]+$/)) {\n if (obj) {\n if (this.list.indexOf(id) === -1) {\n // add new instance\n this.list.push(id);\n\n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that.init(true);\n }, 200);\n\n // open automatically config dialog\n if (!obj.common.noConfig) {\n setTimeout(function () {\n if (window.location.hash.indexOf('/config/') === -1) {\n // open configuration dialog\n that.main.navigate({\n tab: 'instances',\n dialog: 'config',\n params: id\n });\n }\n }, 2000);\n }\n } else {\n if (id.indexOf('.web.') !== -1) {\n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that.init(true);\n }, 200);\n } else {\n // update just one line or\n this.$grid.find('.instance-adapter[data-instance-id=\"' + id + '\"]').html(showOneAdapter(this.$grid, id, this.main.config.instanceForm, true));\n }\n }\n } else {\n var i = this.list.indexOf(id);\n if (i !== -1) {\n this.list.splice(i, 1);\n this.$grid.find('.instance-adapter[data-instance-id=\"' + id + '\"]').remove();\n }\n }\n } else\n // update list if some host changed\n if (id.match(/^system\\.host\\.[-\\w]+$/)) {\n if (this.updateTimer) clearTimeout(this.updateTimer);\n\n this.updateTimer = setTimeout(function () {\n that.updateTimer = null;\n that.init(true);\n }, 200);\n }\n };\n\n this.initButtons = function (id, url) {\n id = id ? '[data-instance-id=\"' + id + '\"]' : '';\n\n var $e = that.$grid.find('.instance-edit' + id).off('click').on('click', function () {\n that.onEdit($(this).attr('data-instance-id'));\n });\n\n //var buttonSize = {width: '2em', height: '2em'}\n\n if (!$e.find('.ui-button-icon-primary').length) {\n $e/*.button({\n icons: {primary: 'ui-icon-pencil'},\n text: false\n }).css({width: '2em', height: '2em'})*/.attr('title', _('edit'));\n }\n\n $e = that.$grid.find('.instance-settings' + id).off('click')\n .on('click', function () {\n that.main.navigate({\n tab: 'instances',\n dialog: 'config',\n params: $(this).data('instance-id')\n });\n });\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-note'}, text: false}).css({width: '2em', height: '2em'}).attr('title', _('config'));\n }*/\n $e.each(function () {\n var _id = $(this).attr('data-instance-id');\n if (main.objects[_id] && main.objects[_id].common && main.objects[_id].common.noConfig) {\n //$(this).button('disable');\n $(this).addClass('disabled');\n }\n });\n\n $e = that.$grid.find('.instance-reload' + id).off('click')\n .on('click', function () {\n that.main.socket.emit('extendObject', $(this).attr('data-instance-id'), {}, function (err) {\n if (err) that.main.showError(err);\n });\n });\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-refresh'}, text: false}).attr('title', _('reload'));\n }*/\n\n $e = that.$grid.find('.instance-del' + id).off('click')\n .on('click', function () {\n var id = $(this).attr('data-instance-id');\n if (that.main.objects[id] && that.main.objects[id].common && that.main.objects[id].common.host) {\n var name = id.replace(/^system\\.adapter\\./, '');\n that.main.confirmMessage(_('Are you sure you want to delete the instance %s?', name), null, 'help', function (result) {\n if (result) {\n that.main.cmdExec(that.main.objects[id].common.host, 'del ' + id.replace('system.adapter.', ''), function (exitCode) {\n if (!exitCode) that.main.tabs.adapters.init(true);\n });\n }\n });\n }\n });\n\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-trash'}, text: false}).attr('title', _('delete'));\n } else {\n //$e.button('enable');\n $e.removeClass('disabled');\n }*/\n $e = that.$grid.find('.instance-issue' + id).off('click')\n .on('click', function () {\n that.main.navigate({\n tab: 'instances',\n dialog: 'issue',\n params: $(this).data('instance-id')\n });\n });\n /*if (!$e.find('.ui-button-icon-primary').length) {\n //$e.button({icons: {primary: 'ui-icon-pin-s'}, text: false}).css({width: '2em', height: '2em'}).attr('title', _('bug'));\n //Material-Hack\n $e.button().attr('title', _('bug')).empty().append('bug_report');\n }*/\n\n that.$grid.find('.instance-image' + id).each(function () {\n if (!$(this).data('installed')) {\n $(this).data('installed', true);\n $(this).hover(function () {\n var text = '
            ';\n var $big = $(text);\n $big.insertAfter($(this));\n $(this).data('big', $big[0]);\n var h = parseFloat($big.height());\n var top = Math.round($(this).position().top - ((h - parseFloat($(this).height())) / 2));\n if (h + top > (window.innerHeight || document.documentElement.clientHeight)) {\n top = (window.innerHeight || document.documentElement.clientHeight) - h;\n }\n if (top < 0) {\n top = 0;\n }\n $big.css({top: top});\n }, function () {\n var big = $(this).data('big');\n $(big).remove();\n $(this).data('big', undefined);\n });\n }\n });\n $e = that.$grid.find('.instance-stop-run' + id).off('click')\n .on('click', function () {\n var id = $(this).attr('data-instance-id');\n //$(this).button('disable');\n $(this).addClass('disabled');\n that.main.socket.emit('extendObject', id, {common: {enabled: !that.main.objects[id].common.enabled}}, function (err) {\n if (err) that.main.showError(err);\n });\n });\n\n if (!$e.find('.ui-button-icon-primary').length) {\n $e.each(function () {\n var id = $(this).attr('data-instance-id');\n var enabled = that.main.objects[id].common.enabled;\n\n if (enabled) {\n $e\n .addClass('instance-running')\n .attr('title', _('Activated. Click to stop.'))\n .find('i')\n .html('pause');\n } else {\n $e\n .removeClass('instance-running')\n .attr('title', _('Deactivated. Click to start.'))\n .find('i')\n .html('play_arrow');\n }\n\n /*$e.button({icons: {primary: enabled ? 'ui-icon-pause': 'ui-icon-play'}, text: false})\n //.css({'background-color': enabled ? 'lightgreen' : '#FF9999'})\n //.css({'background-color': enabled ? 'rgba(0, 255, 0, 0.15)' : 'rgba(255, 0, 0, 0.15)'})\n .css({'background-color': enabled ? 'rgba(0, 255, 0, 0.3)' : 'rgba(255, 0, 0, 0.3)'})\n .attr('title', enabled ? _('Activated. Click to stop.') : _('Deactivated. Click to start.'));*/\n });\n }\n\n $e = that.$grid.find('.instance-web' + id).off('click')\n .on('click', function () {\n var _link = $(this).data('link');\n if (typeof _link === 'object') {\n var menu = '';\n for (var m in _link) {\n if (!_link.hasOwnProperty(m)) continue;\n if (m === '__first') continue;\n var port = _link[m].match(/^https?:\\/\\/[-.\\w]+:(\\d+)\\/?/);\n var https = _link[m].match(/^https:\\/\\//);\n\n menu += '
          • ' + m + (port ? ' :' + port[1] : '') + (https ? ' - SSL' : '') + '
          • ';\n }\n menu += '
          • ' + _('Close') + '
          • ';\n\n var $instancesMenu = $('#instances-menu');\n if ($instancesMenu.data('inited')) $instancesMenu.menu('destroy');\n\n var pos = $(this).position();\n $instancesMenu.html(menu);\n if (!$instancesMenu.data('inited')) {\n $instancesMenu.data('inited', true);\n $instancesMenu.mouseleave(function () {\n $(this).hide();\n });\n }\n\n $instancesMenu.menu().css({\n left: pos.left,\n top: pos.top\n }).show();\n\n $instancesMenu.find('.instances-menu-link').off('click').on('click', function () {\n if ($(this).data('link')) window.open($(this).data('link'), $(this).data('instance-id'));\n $('#instances-menu').hide();\n });\n\n } else {\n window.open($(this).data('link'), $(this).data('instance-id'));\n }\n });\n if (typeof url === 'object') $e.data('link', url);\n\n /*if (!$e.find('.ui-button-icon-primary').length) {\n $e.button({icons: {primary: 'ui-icon-image'}, text: false}).attr('title', _('open web page'));\n } else {\n $e.removeClass('disabled');\n //$e.button('enable');\n }*/\n };\n\n this.resize = function (width, height) {\n //this.$grid.setGridHeight(height - 150).setGridWidth(width);\n };\n}\n","function Intro(main) {\n 'use strict';\n\n var that = this;\n\n this.$tab = $('#tab-intro');\n this.$tiles = this.$tab.find('.tab-intro-cards');\n this.main = main;\n this.inited = false;\n this.$template = $('#intro-template');\n\n function readInstances(callback) {\n that.main.socket.emit('getObjectView', 'system', 'instance', {startkey: 'system.adapter.', endkey: 'system.adapter.\\u9999'}, function (err, doc) {\n if (err) {\n if (callback) callback (err, []);\n } else {\n if (doc.rows.length === 0) {\n if (callback) callback (err, []);\n } else {\n that.main.instances = [];\n for (var i = 0; i < doc.rows.length; i++) {\n that.main.instances.push(doc.rows[i].id);\n that.main.objects[doc.rows[i].id] = doc.rows[i].value;\n }\n if (callback) callback(err, that.main.instances);\n }\n }\n });\n }\n\n /**\n * Format number in seconds to time text\n * @param {!number} seconds\n * @returns {String}\n */\n function formatSeconds(seconds) {\n var days = Math.floor(seconds / (3600 * 24));\n seconds %= 3600 * 24;\n var hours = Math.floor(seconds / 3600);\n if (hours < 10) {\n hours = '0' + hours;\n }\n seconds %= 3600;\n var minutes = Math.floor(seconds / 60);\n if (minutes < 10) {\n minutes = '0' + minutes;\n }\n seconds %= 60;\n seconds = Math.floor(seconds);\n if (seconds < 10) {\n seconds = '0' + seconds;\n }\n var text = '';\n if (days) {\n text += days + ' ' + _('daysShortText') + ' ';\n }\n text += hours + ':' + minutes + ':' + seconds;\n\n return text;\n }\n\n /**\n * Format bytes to MB or GB\n * @param {!number} bytes\n * @returns {String}\n */\n function formatRam(bytes) {\n var GB = Math.floor(bytes / (1024 * 1024 * 1024) * 10) / 10;\n bytes %= (1024 * 1024 * 1024);\n var MB = Math.floor(bytes / (1024 * 1024) * 10) / 10;\n var text = '';\n if (GB > 1) {\n text += GB + ' GB ';\n } else {\n text += MB + ' MB ';\n }\n\n return text;\n }\n\n function formatSpeed(mhz) {\n return mhz + ' MHz';\n }\n\n /**\n * FormatObject for host informations\n * @type type\n */\n var formatInfo = {\n 'Uptime': formatSeconds,\n 'System uptime': formatSeconds,\n 'RAM': formatRam,\n 'Speed': formatSpeed,\n 'Disk size': that.main.formatBytes,\n 'Disk free': that.main.formatBytes\n };\n\n function copyToClipboard(e) {\n var $input = $('",m.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue;var pe=_.documentElement,me=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=/^([^.]*)(?:\.(.+)|)/;function ve(){return!0}function be(){return!1}function ye(){try{return _.activeElement}catch(e){}}function Ie(e,t,i,n,s,r){var o,a;if("object"==typeof t){for(a in"string"!=typeof i&&(n=n||i,i=void 0),t)Ie(e,a,i,n,t[a],r);return e}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=be;else if(!s)return e;return 1===r&&(o=s,(s=function(e){return x().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=x.guid++)),e.each(function(){x.event.add(this,t,s,n,i)})}x.event={global:{},add:function(t,e,i,n,s){var r,o,a,l,c,h,u,d,g,f,p,m=q.get(t);if(m)for(i.handler&&(i=(r=i).handler,s=r.selector),s&&x.find.matchesSelector(pe,s),i.guid||(i.guid=x.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(R)||[""]).length;c--;)g=p=(a=Ae.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),g&&(u=x.event.special[g]||{},g=(s?u.delegateType:u.bindType)||g,u=x.event.special[g]||{},h=x.extend({type:g,origType:p,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&x.expr.match.needsContext.test(s),namespace:f.join(".")},r),(d=l[g])||((d=l[g]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,f,o)||t.addEventListener&&t.addEventListener(g,o)),u.add&&(u.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,h):d.push(h),x.event.global[g]=!0)},remove:function(e,t,i,n,s){var r,o,a,l,c,h,u,d,g,f,p,m=q.hasData(e)&&q.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(R)||[""]).length;c--;)if(g=p=(a=Ae.exec(t[c])||[])[1],f=(a[2]||"").split(".").sort(),g){for(u=x.event.special[g]||{},d=l[g=(n?u.delegateType:u.bindType)||g]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=r=d.length;r--;)h=d[r],!s&&p!==h.origType||i&&i.guid!==h.guid||a&&!a.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(d.splice(r,1),h.selector&&d.delegateCount--,u.remove&&u.remove.call(e,h));o&&!d.length&&(u.teardown&&!1!==u.teardown.call(e,f,m.handle)||x.removeEvent(e,g,m.handle),delete l[g])}else for(g in l)x.event.remove(e,g+t[c],i,n,!0);x.isEmptyObject(l)&&q.remove(e,"handle events")}},dispatch:function(e){var t,i,n,s,r,o,a=x.event.fix(e),l=new Array(arguments.length),c=(q.get(this,"events")||{})[a.type]||[],h=x.event.special[a.type]||{};for(l[0]=a,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,_e=/\s*$/g;function Fe(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&x(">tbody",e)[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Se(e){var t=ke.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Te(e,t){var i,n,s,r,o,a,l,c;if(1===t.nodeType){if(q.hasData(e)&&(r=q.access(e),o=q.set(t,r),c=r.events))for(s in delete o.handle,o.events={},c)for(i=0,n=c[s].length;i")},clone:function(e,t,i){var n,s,r,o,a,l,c,h=e.cloneNode(!0),u=x.contains(e.ownerDocument,e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(o=ce(h),n=0,s=(r=ce(e)).length;n").prop({charset:i.scriptCharset,src:i.url}).on("load error",s=function(e){n.remove(),s=null,e&&t("error"===e.type?404:200,e.type)}),_.head.appendChild(n[0])},abort:function(){s&&s()}}});var Ot,Pt=[],jt=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Pt.pop()||x.expando+"_"+mt++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(e,t,i){var n,s,r,o=!1!==e.jsonp&&(jt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&jt.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return n=e.jsonpCallback=x.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(jt,"$1"+n):!1!==e.jsonp&&(e.url+=(Ct.test(e.url)?"&":"?")+e.jsonp+"="+n),e.converters["script json"]=function(){return r||x.error(n+" was not called"),r[0]},e.dataTypes[0]="json",s=w[n],w[n]=function(){r=arguments},i.always(function(){void 0===s?x(w).removeProp(n):w[n]=s,e[n]&&(e.jsonpCallback=t.jsonpCallback,Pt.push(n)),r&&x.isFunction(s)&&s(r[0]),r=s=void 0}),"script"}),m.createHTMLDocument=((Ot=_.implementation.createHTMLDocument("").body).innerHTML="
            ",2===Ot.childNodes.length),x.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(m.createHTMLDocument?((n=(t=_.implementation.createHTMLDocument("")).createElement("base")).href=_.location.href,t.head.appendChild(n)):t=_),r=!i&&[],(s=F.exec(e))?[t.createElement(s[1])]:(s=fe([e],t,r),r&&r.length&&x(r).remove(),x.merge([],s.childNodes)));var n,s,r},x.fn.load=function(e,t,i){var n,s,r,o=this,a=e.indexOf(" ");return-1").append(x.parseHTML(e)).find(n):e)}).always(i&&function(e,t){o.each(function(){i.apply(this,r||[e.responseText,t,e])})}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.expr.pseudos.animated=function(t){return x.grep(x.timers,function(e){return t===e.elem}).length},x.offset={setOffset:function(e,t,i){var n,s,r,o,a,l,c=x.css(e,"position"),h=x(e),u={};"static"===c&&(e.style.position="relative"),a=h.offset(),r=x.css(e,"top"),l=x.css(e,"left"),s=("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(o=(n=h.position()).top,n.left):(o=parseFloat(r)||0,parseFloat(l)||0),x.isFunction(t)&&(t=t.call(e,i,x.extend({},a))),null!=t.top&&(u.top=t.top-a.top+o),null!=t.left&&(u.left=t.left-a.left+s),"using"in t?t.using.call(e,u):h.css(u)}},x.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){x.offset.setOffset(this,t,e)});var e,i,n,s,r=this[0];return r?r.getClientRects().length?(n=r.getBoundingClientRect(),i=(e=r.ownerDocument).documentElement,s=e.defaultView,{top:n.top+s.pageYOffset-i.clientTop,left:n.left+s.pageXOffset-i.clientLeft}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i=this[0],n={top:0,left:0};return"fixed"===x.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),E(e[0],"html")||(n=e.offset()),n={top:n.top+x.css(e[0],"borderTopWidth",!0),left:n.left+x.css(e[0],"borderLeftWidth",!0)}),{top:t.top-n.top-x.css(i,"marginTop",!0),left:t.left-n.left-x.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===x.css(e,"position");)e=e.offsetParent;return e||pe})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,s){var r="pageYOffset"===s;x.fn[t]=function(e){return W(this,function(e,t,i){var n;return x.isWindow(e)?n=e:9===e.nodeType&&(n=e.defaultView),void 0===i?n?n[s]:e[t]:void(n?n.scrollTo(r?n.pageXOffset:i,r?i:n.pageYOffset):e[t]=i)},t,e,arguments.length)}}),x.each(["top","left"],function(e,i){x.cssHooks[i]=Oe(m.pixelPosition,function(e,t){if(t)return t=Ne(e,i),Le.test(t)?x(e).position()[i]+"px":t})}),x.each({Height:"height",Width:"width"},function(o,a){x.each({padding:"inner"+o,content:a,"":"outer"+o},function(n,r){x.fn[r]=function(e,t){var i=arguments.length&&(n||"boolean"!=typeof e),s=n||(!0===e||!0===t?"margin":"border");return W(this,function(e,t,i){var n;return x.isWindow(e)?0===r.indexOf("outer")?e["inner"+o]:e.document.documentElement["client"+o]:9===e.nodeType?(n=e.documentElement,Math.max(e.body["scroll"+o],n["scroll"+o],e.body["offset"+o],n["offset"+o],n["client"+o])):void 0===i?x.css(e,t,s):x.style(e,t,i,s)},a,i?e:void 0,i)}})}),x.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}}),x.holdReady=function(e){e?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=E,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x});var Ht=w.jQuery,zt=w.$;return x.noConflict=function(e){return w.$===x&&(w.$=zt),e&&w.jQuery===x&&(w.jQuery=Ht),x},e||(w.jQuery=w.$=x),x}),function(e){"function"==typeof define&&define.amd?define(["jquery"],window,e):"object"==typeof module&&module.exports?module.exports=e(require("jquery"),window):e(jQuery,window)}(function(a,n){"use strict";a.migrateVersion="3.0.1",n.console&&n.console.log&&(a&&!/^[12]\./.test(a.fn.jquery)||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"));function e(e,t,i,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return i},set:function(e){i=e}})}function t(e,t,i,n){e[t]=function(){return i.apply(this,arguments)}}a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){({}),a.migrateWarnings.length=0},n.document.compatMode;var i,s=a.fn.init,r=a.isNumeric,o=a.find,l=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,c=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;for(i in a.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(t[0]=[]),s.apply(this,t)},a.fn.init.prototype=a.fn,a.find=function(t){var i=Array.prototype.slice.call(arguments);if("string"==typeof t&&l.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(c,function(e,t,i,n){return"["+t+i+'"'+n+'"]'});try{n.document.querySelector(t),i[0],i[0]=t}catch(e){i[0]}}return o.apply(this,i)},o)Object.prototype.hasOwnProperty.call(o,i)&&(a.find[i]=o[i]);a.fn.size=function(){return this.length},a.parseJSON=function(){return JSON.parse.apply(null,arguments)},a.isNumeric=function(e){r(e);var t,i,n=(i=(t=e)&&t.toString(),!a.isArray(t)&&0<=i-parseFloat(i)+1);return n},t(a,"holdReady",a.holdReady),t(a,"unique",a.uniqueSort),e(a.expr,"filters",a.expr.pseudos),e(a.expr,":",a.expr.pseudos);var h=a.ajax;a.ajax=function(){var e=h.apply(this,arguments);return e.promise&&(t(e,"success",e.done),t(e,"error",e.fail),t(e,"complete",e.always)),e};var u=a.fn.removeAttr,d=a.fn.toggleClass,g=/\S+/g;a.fn.removeAttr=function(e){var i=this;return a.each(e.match(g),function(e,t){a.expr.match.bool.test(t)&&i.prop(t,!1)}),u.apply(this,arguments)};a.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?d.apply(this,arguments):this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&a.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":a.data(this,"__className__")||"")})};a.swap&&a.each(["height","width","reliableMarginRight"],function(e,t){var i=a.cssHooks[t]&&a.cssHooks[t].get;i&&(a.cssHooks[t].get=function(){var e;return!0,e=i.apply(this,arguments),!1,e})}),a.swap=function(e,t,i,n){var s,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in s=i.apply(e,n||[]),t)e.style[r]=o[r];return s};var f=a.data;a.data=function(e,t,i){var n;if(t&&"object"==typeof t&&2===arguments.length){n=a.hasData(e)&&f.call(this,e);var s={};for(var r in t)r!==a.camelCase(r)?n[r]=t[r]:s[r]=t[r];return f.call(this,e,s),t}return t&&"string"==typeof t&&t!==a.camelCase(t)&&(n=a.hasData(e)&&f.call(this,e))&&t in n?(2"))}function i(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){F(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&F(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&F(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",r)}function r(){F.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(F(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),F(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&F(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&F(this).addClass("ui-datepicker-next-hover"))}function u(e,t){for(var i in F.extend(e,t),t)null==t[i]&&(e[i]=t[i]);return e}function t(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}var s,a,l,c;F.ui=F.ui||{},F.extend(F.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),F.fn.extend({scrollParent:function(e){var t=this.css("position"),i="absolute"===t,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter(function(){var e=F(this);return(!i||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&s.length?s:F(this[0].ownerDocument||document)},uniqueId:(c=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++c)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&F(this).removeAttr("id")})}}),F.extend(F.expr[":"],{data:F.expr.createPseudo?F.expr.createPseudo(function(t){return function(e){return!!F.data(e,t)}}):function(e,t,i){return!!F.data(e,i[3])},focusable:function(e){return n(e,!isNaN(F.attr(e,"tabindex")))},tabbable:function(e){var t=F.attr(e,"tabindex"),i=isNaN(t);return(i||0<=t)&&n(e,!i)}}),F("").outerWidth(1).jquery||F.each(["Width","Height"],function(e,i){function n(e,t,i,n){return F.each(s,function(){t-=parseFloat(F.css(e,"padding"+this))||0,i&&(t-=parseFloat(F.css(e,"border"+this+"Width"))||0),n&&(t-=parseFloat(F.css(e,"margin"+this))||0)}),t}var s="Width"===i?["Left","Right"]:["Top","Bottom"],r=i.toLowerCase(),o={innerWidth:F.fn.innerWidth,innerHeight:F.fn.innerHeight,outerWidth:F.fn.outerWidth,outerHeight:F.fn.outerHeight};F.fn["inner"+i]=function(e){return void 0===e?o["inner"+i].call(this):this.each(function(){F(this).css(r,n(this,e)+"px")})},F.fn["outer"+i]=function(e,t){return"number"!=typeof e?o["outer"+i].call(this,e):this.each(function(){F(this).css(r,n(this,e,!0,t)+"px")})}}),F.fn.addBack||(F.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),F("").data("a-b","a").removeData("a-b").data("a-b")&&(F.fn.removeData=(l=F.fn.removeData,function(e){return arguments.length?l.call(this,F.camelCase(e)):l.call(this)})),F.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),F.fn.extend({focus:(a=F.fn.focus,function(t,i){return"number"==typeof t?this.each(function(){var e=this;setTimeout(function(){F(e).focus(),i&&i.call(e)},t)}):a.apply(this,arguments)}),disableSelection:(s="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(s+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var t,i,n=F(this[0]);n.length&&n[0]!==document;){if(("absolute"===(t=n.css("position"))||"relative"===t||"fixed"===t)&&(i=parseInt(n.css("zIndex"),10),!isNaN(i)&&0!==i))return i;n=n.parent()}return 0}}),F.ui.plugin={add:function(e,t,i){var n,s=F.ui[e].prototype;for(n in i)s.plugins[n]=s.plugins[n]||[],s.plugins[n].push([t,i[n]])},call:function(e,t,i,n){var s,r=e.plugins[t];if(r&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;r.length>s;s++)e.options[r[s][0]]&&r[s][1].apply(e.element,i)}};var h,d=0,g=Array.prototype.slice;F.cleanData=(h=F.cleanData,function(e){var t,i,n;for(n=0;null!=(i=e[n]);n++)try{(t=F._data(i,"events"))&&t.remove&&F(i).triggerHandler("remove")}catch(e){}h(e)}),F.widget=function(e,i,t){var n,s,r,o,a={},l=e.split(".")[0];return e=e.split(".")[1],n=l+"-"+e,t||(t=i,i=F.Widget),F.expr[":"][n.toLowerCase()]=function(e){return!!F.data(e,n)},F[l]=F[l]||{},s=F[l][e],r=F[l][e]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new r(e,t)},F.extend(r,s,{version:t.version,_proto:F.extend({},t),_childConstructors:[]}),(o=new i).options=F.widget.extend({},o.options),F.each(t,function(t,n){return F.isFunction(n)?void(a[t]=(s=function(){return i.prototype[t].apply(this,arguments)},r=function(e){return i.prototype[t].apply(this,e)},function(){var e,t=this._super,i=this._superApply;return this._super=s,this._superApply=r,e=n.apply(this,arguments),this._super=t,this._superApply=i,e})):void(a[t]=n);var s,r}),r.prototype=F.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||e},a,{constructor:r,namespace:l,widgetName:e,widgetFullName:n}),s?(F.each(s._childConstructors,function(e,t){var i=t.prototype;F.widget(i.namespace+"."+i.widgetName,r,t._proto)}),delete s._childConstructors):i._childConstructors.push(r),F.widget.bridge(e,r),r},F.widget.extend=function(e){for(var t,i,n=g.call(arguments,1),s=0,r=n.length;s",options:{disabled:!1,create:null},_createWidget:function(e,t){t=F(t||this.defaultElement||this)[0],this.element=F(t),this.uuid=d++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=F(),this.hoverable=F(),this.focusable=F(),t!==this&&(F.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=F(t.style?t.ownerDocument:t.document||t),this.window=F(this.document[0].defaultView||this.document[0].parentWindow)),this.options=F.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:F.noop,_getCreateEventData:F.noop,_create:F.noop,_init:F.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(F.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:F.noop,widget:function(){return this.element},option:function(e,t){var i,n,s,r=e;if(0===arguments.length)return F.widget.extend({},this.options);if("string"==typeof e)if(r={},e=(i=e.split(".")).shift(),i.length){for(n=r[e]=F.widget.extend({},this.options[e]),s=0;i.length-1>s;s++)n[i[s]]=n[i[s]]||{},n=n[i[s]];if(e=i.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=t}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(o,a,e){var l,c=this;"boolean"!=typeof o&&(e=a,a=o,o=!1),e?(a=l=F(a),this.bindings=this.bindings.add(a)):(e=a,a=this.element,l=this.widget()),F.each(e,function(e,t){function i(){return o||!0!==c.options.disabled&&!F(this).hasClass("ui-state-disabled")?("string"==typeof t?c[t]:t).apply(c,arguments):void 0}"string"!=typeof t&&(i.guid=t.guid=t.guid||i.guid||F.guid++);var n=e.match(/^([\w:-]*)\s*(.*)$/),s=n[1]+c.eventNamespace,r=n[2];r?l.delegate(r,s,i):a.bind(s,i)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t),this.bindings=F(this.bindings.not(e).get()),this.focusable=F(this.focusable.not(e).get()),this.hoverable=F(this.hoverable.not(e).get())},_delay:function(e,t){var i=this;return setTimeout(function(){return("string"==typeof e?i[e]:e).apply(i,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){F(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){F(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){F(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){F(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,t,i){var n,s,r=this.options[e];if(i=i||{},(t=F.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],s=t.originalEvent)for(n in s)n in t||(t[n]=s[n]);return this.element.trigger(t,i),!(F.isFunction(r)&&!1===r.apply(this.element[0],[t].concat(i))||t.isDefaultPrevented())}},F.each({show:"fadeIn",hide:"fadeOut"},function(r,o){F.Widget.prototype["_"+r]=function(t,e,i){"string"==typeof e&&(e={effect:e});var n,s=e?!0===e||"number"==typeof e?o:e.effect||o:r;"number"==typeof(e=e||{})&&(e={duration:e}),n=!F.isEmptyObject(e),e.complete=i,e.delay&&t.delay(e.delay),n&&F.effects&&F.effects.effect[s]?t[r](e):s!==r&&t[s]?t[s](e.duration,e.easing,i):t.queue(function(e){F(this)[r](),i&&i.call(t[0]),e()})}}),F.widget;var f=!1;F(document).mouseup(function(){f=!1}),F.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(e){return!0===F.data(e.target,t.widgetName+".preventClickEvent")?(F.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!f){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var t=this,i=1===e.which,n=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&F(e.target).closest(this.options.cancel).length;return i&&!n&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===F.data(e.target,this.widgetName+".preventClickEvent")&&F.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),f=!0)),!0}},_mouseMove:function(e){if(this._mouseMoved){if(F.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&F.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),f=!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function I(e,t,i){return[parseFloat(e[0])*(l.test(e[0])?t/100:1),parseFloat(e[1])*(l.test(e[1])?i/100:1)]}function w(e,t){return parseInt(F.css(e,t),10)||0}F.ui=F.ui||{};var s,_,x=Math.max,k=Math.abs,E=Math.round,n=/left|center|right/,r=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,l=/%$/,c=F.fn.position;F.position={scrollbarWidth:function(){if(void 0!==s)return s;var e,t,i=F("
            "),n=i.children()[0];return F("body").append(i),e=n.offsetWidth,i.css("overflow","scroll"),e===(t=n.offsetWidth)&&(t=i[0].clientWidth),i.remove(),s=e-t},getScrollInfo:function(e){var t=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===t||"auto"===t&&e.widthk(t+i)&&(r.horizontal="center"),fk(n+s)&&(r.vertical="middle"),r.important=x(k(t),k(i))>x(k(n),k(s))?"horizontal":"vertical",u.using.call(this,e,r)}),o.offset(F.extend(c,{using:e}))})},F.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,o=e.left-t.collisionPosition.marginLeft,a=s-o,l=o+t.collisionWidth-r-s;t.collisionWidth>r?0r?0i)&&(e.left+=u+d+g):0k(n))&&(e.left+=u+d+g))},top:function(e,t){var i,n,s=t.within,r=s.offset.top+s.scrollTop,o=s.height,a=s.isWindow?s.scrollTop:s.offset.top,l=e.top-t.collisionPosition.marginTop,c=l-a,h=l+t.collisionHeight-o-a,u="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,d="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];c<0?((n=e.top+u+d+g+t.collisionHeight-o-r)<0||k(c)>n)&&(e.top+=u+d+g):0k(i))&&(e.top+=u+d+g))}},flipfit:{left:function(){F.ui.position.flip.left.apply(this,arguments),F.ui.position.fit.left.apply(this,arguments)},top:function(){F.ui.position.flip.top.apply(this,arguments),F.ui.position.fit.top.apply(this,arguments)}}},function(){var e,t,i,n,s,r=document.getElementsByTagName("body")[0],o=document.createElement("div");for(s in e=document.createElement(r?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&F.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"}),i)e.style[s]=i[s];e.appendChild(o),(t=r||document.documentElement).insertBefore(e,t.firstChild),o.style.cssText="position: absolute; left: 10.7432222px;",n=F(o).offset().left,_=10").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=this.document[0];if(this.handleElement.is(e.target))try{t.activeElement&&"body"!==t.activeElement.nodeName.toLowerCase()&&F(t.activeElement).blur()}catch(e){}},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),F.ui.ddmanager&&(F.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),o.grid&&(s=o.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,c=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-o.grid[1]:s+o.grid[1]:s,r=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-o.grid[0]:r+o.grid[0]:r),"y"===o.axis&&(l=this.originalPageX),"x"===o.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,t,i){return i=i||this._uiHash(),F.ui.plugin.call(this,e,[t,i,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),F.Widget.prototype._trigger.call(this,e,t,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),F.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,i){var n=F.extend({},e,{item:i.element});i.sortables=[],F(i.options.connectToSortable).each(function(){var e=F(this).sortable("instance");e&&!e.options.disabled&&(i.sortables.push(e),e.refreshPositions(),e._trigger("activate",t,n))})},stop:function(t,e,i){var n=F.extend({},e,{item:i.element});i.cancelHelperRemoval=!1,F.each(i.sortables,function(){var e=this;e.isOver?(e.isOver=0,i.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(i,n,s){F.each(s.sortables,function(){var e=!1,t=this;t.positionAbs=s.positionAbs,t.helperProportions=s.helperProportions,t.offset.click=s.offset.click,t._intersectsWith(t.containerCache)&&(e=!0,F.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==t&&this._intersectsWith(this.containerCache)&&F.contains(t.element[0],this.element[0])&&(e=!1),e})),e?(t.isOver||(t.isOver=1,s._parent=n.helper.parent(),t.currentItem=n.helper.appendTo(t.element).data("ui-sortable-item",!0),t.options._helper=t.options.helper,t.options.helper=function(){return n.helper[0]},i.target=t.currentItem[0],t._mouseCapture(i,!0),t._mouseStart(i,!0,!0),t.offset.click.top=s.offset.click.top,t.offset.click.left=s.offset.click.left,t.offset.parent.left-=s.offset.parent.left-t.offset.parent.left,t.offset.parent.top-=s.offset.parent.top-t.offset.parent.top,s._trigger("toSortable",i),s.dropped=t.element,F.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,t.fromOutside=s),t.currentItem&&(t._mouseDrag(i),n.position=t.position)):t.isOver&&(t.isOver=0,t.cancelHelperRemoval=!0,t.options._revert=t.options.revert,t.options.revert=!1,t._trigger("out",i,t._uiHash(t)),t._mouseStop(i,!0),t.options.revert=t.options._revert,t.options.helper=t.options._helper,t.placeholder&&t.placeholder.remove(),n.helper.appendTo(s._parent),s._refreshOffsets(i),n.position=s._generatePosition(i,!0),s._trigger("fromSortable",i),s.dropped=!1,F.each(s.sortables,function(){this.refreshPositions()}))})}}),F.ui.plugin.add("draggable","cursor",{start:function(e,t,i){var n=F("body"),s=i.options;n.css("cursor")&&(s._cursor=n.css("cursor")),n.css("cursor",s.cursor)},stop:function(e,t,i){var n=i.options;n._cursor&&F("body").css("cursor",n._cursor)}}),F.ui.plugin.add("draggable","opacity",{start:function(e,t,i){var n=F(t.helper),s=i.options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(e,t,i){var n=i.options;n._opacity&&F(t.helper).css("opacity",n._opacity)}}),F.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,t,i){var n=i.options,s=!1,r=i.scrollParentNotHidden[0],o=i.document[0];r!==o&&"HTML"!==r.tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+r.offsetHeight-e.pageY=Math.abs(c-A),s=f>=Math.abs(h-C),r=f>=Math.abs(a-m),o=f>=Math.abs(l-p),n&&(t.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),s&&(t.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),r&&(t.position.left=i._convertPositionTo("relative",{top:0,left:a-i.helperProportions.width}).left),o&&(t.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),d=n||s||r||o,"outer"!==g.snapMode&&(n=f>=Math.abs(c-C),s=f>=Math.abs(h-A),r=f>=Math.abs(a-p),o=f>=Math.abs(l-m),n&&(t.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),s&&(t.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),r&&(t.position.left=i._convertPositionTo("relative",{top:0,left:a}).left),o&&(t.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[u].snapping&&(n||s||r||o||d)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,F.extend(i._uiHash(),{snapItem:i.snapElements[u].item})),i.snapElements[u].snapping=n||s||r||o||d)}}),F.ui.plugin.add("draggable","stack",{start:function(e,t,i){var n,s=i.options,r=F.makeArray(F(s.stack)).sort(function(e,t){return(parseInt(F(e).css("zIndex"),10)||0)-(parseInt(F(t).css("zIndex"),10)||0)});r.length&&(n=parseInt(F(r[0]).css("zIndex"),10)||0,F(r).each(function(e){F(this).css("zIndex",n+e)}),this.css("zIndex",n+r.length))}}),F.ui.plugin.add("draggable","zIndex",{start:function(e,t,i){var n=F(t.helper),s=i.options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(e,t,i){var n=i.options;n._zIndex&&F(t.helper).css("zIndex",n._zIndex)}}),F.ui.draggable,F.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=F.isFunction(i)?i:function(e){return e.is(i)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(t.scope),t.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){F.ui.ddmanager.droppables[e]=F.ui.ddmanager.droppables[e]||[],F.ui.ddmanager.droppables[e].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var e=F.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,t){if("accept"===e)this.accept=F.isFunction(t)?t:function(e){return e.is(t)};else if("scope"===e){var i=F.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(t)}this._super(e,t)},_activate:function(e){var t=F.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),t&&this._trigger("activate",e,this.ui(t))},_deactivate:function(e){var t=F.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),t&&this._trigger("deactivate",e,this.ui(t))},_over:function(e){var t=F.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(t)))},_out:function(e){var t=F.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(t)))},_drop:function(t,e){var i=e||F.ui.ddmanager.current,n=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=F(this).droppable("instance");return e.options.greedy&&!e.options.disabled&&e.options.scope===i.options.scope&&e.accept.call(e.element[0],i.currentItem||i.element)&&F.ui.intersect(i,F.extend(e,{offset:e.element.offset()}),e.options.tolerance,t)?!(n=!0):void 0}),!n&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(i)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),F.ui.intersect=function(){function d(e,t,i){return t<=e&&el&&h>o-e.helperProportions.width/2&&r+e.helperProportions.height/2>c&&u>a-e.helperProportions.height/2;case"pointer":return d(n.pageY,c,t.proportions().height)&&d(n.pageX,l,t.proportions().width);case"touch":return(c<=r&&r<=u||c<=a&&a<=u||ri;i++)if(!(s[i].options.disabled||e&&!s[i].accept.call(s[i].element[0],e.currentItem||e.element))){for(n=0;o.length>n;n++)if(o[n]===s[i].element[0]){s[i].proportions().height=0;continue e}s[i].visible="none"!==s[i].element.css("display"),s[i].visible&&("mousedown"===r&&s[i]._activate.call(s[i],t),s[i].offset=s[i].element.offset(),s[i].proportions({width:s[i].element[0].offsetWidth,height:s[i].element[0].offsetHeight}))}},drop:function(e,t){var i=!1;return F.each((F.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&F.ui.intersect(e,this,this.options.tolerance,t)&&(i=this._drop.call(this,t)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,t)))}),i},dragStart:function(e,t){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||F.ui.ddmanager.prepareOffsets(e,t)})},drag:function(r,o){r.options.refreshPositions&&F.ui.ddmanager.prepareOffsets(r,o),F.each(F.ui.ddmanager.droppables[r.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e,t,i,n=F.ui.intersect(r,this,this.options.tolerance,o),s=!n&&this.isover?"isout":n&&!this.isover?"isover":null;s&&(this.options.greedy&&(t=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return F(this).droppable("instance").options.scope===t})).length&&((e=F(i[0]).droppable("instance")).greedyChild="isover"===s)),e&&"isover"===s&&(e.isover=!1,e.isout=!0,e._out.call(e,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),e&&"isout"===s&&(e.isout=!1,e.isover=!0,e._over.call(e,o)))}})},dragStop:function(e,t){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||F.ui.ddmanager.prepareOffsets(e,t)}},F.ui.droppable,F.widget("ui.resizable",F.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(e,t){if("hidden"===F(e).css("overflow"))return!1;var i=t&&"left"===t?"scrollLeft":"scrollTop",n=!1;return 0").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=s.handles||(F(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=F(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},t=0;e.length>t;t++)i=F.trim(e[t]),(n=F("
            ")).css({zIndex:s.zIndex}),"se"===i&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[i]=".ui-resizable-"+i,this.element.append(n);this._renderAxis=function(e){var t,i,n,s;for(t in e=e||this.element,this.handles)this.handles[t].constructor===String?this.handles[t]=this.element.children(this.handles[t]).first().show():(this.handles[t].jquery||this.handles[t].nodeType)&&(this.handles[t]=F(this.handles[t]),this._on(this.handles[t],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=F(this.handles[t],this.element),s=/sw|ne|nw|se|n|s/.test(t)?i.outerHeight():i.outerWidth(),n=["padding",/ne|nw|n/.test(t)?"Top":/se|sw|s/.test(t)?"Bottom":/^e$/.test(t)?"Right":"Left"].join(""),e.css(n,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[t])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=n&&n[1]?n[1]:"se")}),s.autoHide&&(this._handles.hide(),F(this.element).addClass("ui-resizable-autohide").mouseenter(function(){s.disabled||(F(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){s.disabled||r.resizing||(F(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,t=function(e){F(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(e){var t,i,n=!1;for(t in this.handles)((i=F(this.handles[t])[0])===e.target||F.contains(i,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var t,i,n,s=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),t=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(t+=F(s.containment).scrollLeft()||0,i+=F(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:t,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:t,top:i},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=F(".ui-resizable-"+this.axis).css("cursor"),F("body").css("cursor","auto"===n?this.axis+"-resize":n),r.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var t,i,n=this.originalMousePosition,s=this.axis,r=e.pageX-n.left||0,o=e.pageY-n.top||0,a=this._change[s];return this._updatePrevProperties(),a&&(t=a.apply(this,[e,r,o]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(t=this._updateRatio(t,e)),t=this._respectSize(t,e),this._updateCache(t),this._propagate("resize",e),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),F.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges())),!1},_mouseStop:function(e){this.resizing=!1;var t,i,n,s,r,o,a,l=this.options,c=this;return this._helper&&(n=(i=(t=this._proportionallyResizeElements).length&&/textarea/i.test(t[0].nodeName))&&this._hasScroll(t[0],"left")?0:c.sizeDiff.height,s=i?0:c.sizeDiff.width,r={width:c.helper.width()-s,height:c.helper.height()-n},o=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,a=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(F.extend(r,{top:a,left:o})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),F("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,n,s,r,o=this.options;r={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=r.minHeight*this.aspectRatio,n=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,s=r.maxWidth/this.aspectRatio,t>r.minWidth&&(r.minWidth=t),n>r.minHeight&&(r.minHeight=n),r.maxWidth>i&&(r.maxWidth=i),r.maxHeight>s&&(r.maxHeight=s)),this._vBoundaries=r},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,n=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,n=this._isNumber(e.width)&&t.maxWidth&&t.maxWidthe.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(i),h=/nw|ne|n/.test(i);return r&&(e.width=t.minWidth),o&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),s&&(e.height=t.maxHeight),r&&c&&(e.left=a-t.minWidth),n&&c&&(e.left=a-t.maxWidth),o&&h&&(e.top=l-t.minHeight),s&&h&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],n=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],s=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)i[t]=parseInt(n[t],10)||0,i[t]+=parseInt(s[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,t=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||F("
            "),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++t.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize;return{left:this.originalPosition.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(e,t,i){return F.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,t,i]))},sw:function(e,t,i){return F.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,t,i]))},ne:function(e,t,i){return F.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,t,i]))},nw:function(e,t,i){return F.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,t,i]))}},_propagate:function(e,t){F.ui.plugin.call(this,e,[t,this.ui()]),"resize"!==e&&this._trigger(e,t,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),F.ui.plugin.add("resizable","animate",{stop:function(t){var i=F(this).resizable("instance"),e=i.options,n=i._proportionallyResizeElements,s=n.length&&/textarea/i.test(n[0].nodeName),r=s&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,o=s?0:i.sizeDiff.width,a={width:i.size.width-o,height:i.size.height-r},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(F.extend(a,c&&l?{top:c,left:l}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&F(n[0]).css({width:e.width,height:e.height}),i._updateCache(e),i._propagate("resize",t)}})}}),F.ui.plugin.add("resizable","containment",{start:function(){var i,n,e,t,s,r,o,a=F(this).resizable("instance"),l=a.options,c=a.element,h=l.containment,u=h instanceof F?h.get(0):/parent/.test(h)?c.parent().get(0):h;u&&(a.containerElement=F(u),/document/.test(h)||h===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:F(document),left:0,top:0,width:F(document).width(),height:F(document).height()||document.body.parentNode.scrollHeight}):(i=F(u),n=[],F(["Top","Right","Left","Bottom"]).each(function(e,t){n[e]=a._num(i.css("padding"+t))}),a.containerOffset=i.offset(),a.containerPosition=i.position(),a.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},e=a.containerOffset,t=a.containerSize.height,s=a.containerSize.width,r=a._hasScroll(u,"left")?u.scrollWidth:s,o=a._hasScroll(u)?u.scrollHeight:t,a.parentData={element:u,left:e.left,top:e.top,width:r,height:o}))},resize:function(e){var t,i,n,s,r=F(this).resizable("instance"),o=r.options,a=r.containerOffset,l=r.position,c=r._aspectRatio||e.shiftKey,h={top:0,left:0},u=r.containerElement,d=!0;u[0]!==document&&/static/.test(u.css("position"))&&(h=a),l.left<(r._helper?a.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-a.left:r.position.left-h.left),c&&(r.size.height=r.size.width/r.aspectRatio,d=!1),r.position.left=o.helper?a.left:0),l.top<(r._helper?a.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-a.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,d=!1),r.position.top=r._helper?a.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),s=/relative|absolute/.test(r.containerElement.css("position")),r.offset.top=n&&s?(r.offset.left=r.parentData.left+r.position.left,r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.element.offset().top),t=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-h.left:r.offset.left-a.left)),i=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-h.top:r.offset.top-a.top)),t+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-t,c&&(r.size.height=r.size.width/r.aspectRatio,d=!1)),i+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-i,c&&(r.size.width=r.size.height*r.aspectRatio,d=!1)),d||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=F(this).resizable("instance"),t=e.options,i=e.containerOffset,n=e.containerPosition,s=e.containerElement,r=F(e.helper),o=r.offset(),a=r.outerWidth()-e.sizeDiff.width,l=r.outerHeight()-e.sizeDiff.height;e._helper&&!t.animate&&/relative/.test(s.css("position"))&&F(this).css({left:o.left-n.left-i.left,width:a,height:l}),e._helper&&!t.animate&&/static/.test(s.css("position"))&&F(this).css({left:o.left-n.left-i.left,width:a,height:l})}}),F.ui.plugin.add("resizable","alsoResize",{start:function(){var e=F(this).resizable("instance").options;F(e.alsoResize).each(function(){var e=F(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})},resize:function(e,i){var t=F(this).resizable("instance"),n=t.options,s=t.originalSize,r=t.originalPosition,o={height:t.size.height-s.height||0,width:t.size.width-s.width||0,top:t.position.top-r.top||0,left:t.position.left-r.left||0};F(n.alsoResize).each(function(){var e=F(this),n=F(this).data("ui-resizable-alsoresize"),s={},t=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];F.each(t,function(e,t){var i=(n[t]||0)+(o[t]||0);i&&0<=i&&(s[t]=i||null)}),e.css(s)})},stop:function(){F(this).removeData("resizable-alsoresize")}}),F.ui.plugin.add("resizable","ghost",{start:function(){var e=F(this).resizable("instance"),t=e.options,i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof t.ghost?t.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=F(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=F(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),F.ui.plugin.add("resizable","grid",{resize:function(){var e,t=F(this).resizable("instance"),i=t.options,n=t.size,s=t.originalSize,r=t.originalPosition,o=t.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,c=a[1]||1,h=Math.round((n.width-s.width)/l)*l,u=Math.round((n.height-s.height)/c)*c,d=s.width+h,g=s.height+u,f=i.maxWidth&&d>i.maxWidth,p=i.maxHeight&&g>i.maxHeight,m=i.minWidth&&i.minWidth>d,C=i.minHeight&&i.minHeight>g;i.grid=a,m&&(d+=l),C&&(g+=c),f&&(d-=l),p&&(g-=c),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=g):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=g,t.position.top=r.top-u):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=g,t.position.left=r.left-h):((g-c<=0||d-l<=0)&&(e=t._getPaddingPlusBorderDimensions(this)),t.position.top=0")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(i){var n=this,e=this.options;this.opos=[i.pageX,i.pageY],this.options.disabled||(this.selectees=F(e.filter,this.element[0]),this._trigger("start",i),F(e.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),e.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var e=F.data(this,"selectable-item");e.startselected=!0,i.metaKey||i.ctrlKey||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,n._trigger("unselecting",i,{unselecting:e.element}))}),F(i.target).parents().addBack().each(function(){var e,t=F.data(this,"selectable-item");return t?(e=!i.metaKey&&!i.ctrlKey||!t.$element.hasClass("ui-selected"),t.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),t.unselecting=!e,t.selecting=e,(t.selected=e)?n._trigger("selecting",i,{selecting:t.element}):n._trigger("unselecting",i,{unselecting:t.element}),!1):void 0}))},_mouseDrag:function(i){if(this.dragged=!0,!this.options.disabled){var e,n=this,s=this.options,r=this.opos[0],o=this.opos[1],a=i.pageX,l=i.pageY;return aa||r>e.right||e.top>l||o>e.bottom):"fit"===s.tolerance&&(t=e.left>r&&a>e.right&&e.top>o&&l>e.bottom),t?(e.selected&&(e.$element.removeClass("ui-selected"),e.selected=!1),e.unselecting&&(e.$element.removeClass("ui-unselecting"),e.unselecting=!1),e.selecting||(e.$element.addClass("ui-selecting"),e.selecting=!0,n._trigger("selecting",i,{selecting:e.element}))):(e.selecting&&((i.metaKey||i.ctrlKey)&&e.startselected?(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.$element.addClass("ui-selected"),e.selected=!0):(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.startselected&&(e.$element.addClass("ui-unselecting"),e.unselecting=!0),n._trigger("unselecting",i,{unselecting:e.element}))),e.selected&&(i.metaKey||i.ctrlKey||e.startselected||(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,n._trigger("unselecting",i,{unselecting:e.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,F(".ui-unselecting",this.element[0]).each(function(){var e=F.data(this,"selectable-item");e.$element.removeClass("ui-unselecting"),e.unselecting=!1,e.startselected=!1,i._trigger("unselected",t,{unselected:e.element})}),F(".ui-selecting",this.element[0]).each(function(){var e=F.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected"),e.selecting=!1,e.selected=!0,e.startselected=!0,i._trigger("selected",t,{selected:e.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),F.widget("ui.sortable",F.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return t<=e&&e*{ cursor: "+r.cursor+" !important; }").appendTo(s)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(n=this.containers.length-1;0<=n;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return F.ui.ddmanager&&(F.ui.ddmanager.current=this),F.ui.ddmanager&&!r.dropBehaviour&&F.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var t,i,n,s,r=this.options,o=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageYe[this.floating?"width":"height"]?g:t+this.helperProportions.width/2>r&&o>i-this.helperProportions.width/2&&n+this.helperProportions.height/2>a&&l>s-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),n=t&&i,s=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return!!n&&(this.floating?r&&"right"===r||"down"===s?2:1:s&&("down"===s?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),n=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&i||"left"===s&&!i:n&&("down"===n&&t||"up"===n&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(0t;t++)if(i[t]===e.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var t,i,n,s,r,o,a,l,c=this.items,h=[[F.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):F(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(t=u.length-1;0<=t;t--)for(i=(n=F(u[t],this.document[0])).length-1;0<=i;i--)(s=F.data(n[i],this.widgetFullName))&&s!==this&&!s.options.disabled&&(h.push([F.isFunction(s.options.items)?s.options.items.call(s.element[0],e,{item:this.currentItem}):F(s.options.items,s.element),s]),this.containers.push(s));for(t=h.length-1;0<=t;t--)for(r=h[t][1],i=0,l=(o=h[t][0]).length;i",i.document[0]).addClass(n||i.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===e?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),F("",i.document[0]).appendTo(t)):"tr"===e?i._createTrPlaceholder(i.currentItem,t):"img"===e&&t.attr("src",i.currentItem.attr("src")),n||t.css("visibility","hidden"),t},update:function(e,t){(!n||s.forcePlaceholderSize)&&(t.height()||t.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=F(s.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),s.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(e,t){var i=this;e.children().each(function(){F(" ",i.document[0]).attr("colspan",F(this).attr("colspan")||1).appendTo(t)})},_contactContainers:function(e){var t,i,n,s,r,o,a,l,c,h,u=null,d=null;for(t=this.containers.length-1;0<=t;t--)if(!F.contains(this.currentItem[0],this.containers[t].element[0]))if(this._intersectsWith(this.containers[t].containerCache)){if(u&&F.contains(this.containers[t].element[0],u.element[0]))continue;u=this.containers[t],d=t}else this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",e,this._uiHash(this)),this.containers[t].containerCache.over=0);if(u)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(n=1e4,s=null,r=(c=u.floating||this._isFloating(this.currentItem))?"left":"top",o=c?"width":"height",h=c?"clientX":"clientY",i=this.items.length-1;0<=i;i--)F.contains(this.containers[d].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(a=this.items[i].item.offset()[r],l=!1,e[h]-a>this.items[i][o]/2&&(l=!0),n>Math.abs(e[h]-a)&&(n=Math.abs(e[h]-a),s=this.items[i],this.direction=l?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(e,s,null,!0):this._rearrange(e,null,this.containers[d].element,!0),this._trigger("change",e,this._uiHash()),this.containers[d]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(e){var t=this.options,i=F.isFunction(t.helper)?F(t.helper.apply(this.element[0],[e,this.currentItem])):"clone"===t.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||F("parent"!==t.appendTo?t.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||t.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||t.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),F.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&F.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&F.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,i,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=F(n.containment)[0],t=F(n.containment).offset(),i="hidden"!==F(e).css("overflow"),this.containment=[t.left+(parseInt(F(e).css("borderLeftWidth"),10)||0)+(parseInt(F(e).css("paddingLeft"),10)||0)-this.margins.left,t.top+(parseInt(F(e).css("borderTopWidth"),10)||0)+(parseInt(F(e).css("paddingTop"),10)||0)-this.margins.top,t.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(F(e).css("borderLeftWidth"),10)||0)-(parseInt(F(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,t.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(F(e).css("borderTopWidth"),10)||0)-(parseInt(F(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&F.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(n[0].tagName);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:n.scrollTop())*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:n.scrollLeft())*i}},_generatePosition:function(e){var t,i,n=this.options,s=e.pageX,r=e.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&F.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.leftthis.containment[2]&&(s=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(t=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1],r=this.containment?t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-n.grid[1]:t+n.grid[1]:t,i=this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0],s=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-n.grid[0]:i+n.grid[0]:i)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:o.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:o.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){function i(t,i,n){return function(e){n._trigger(t,e,i._uiHash(i))}}this.reverting=!1;var n,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)("auto"===this._storedCSS[n]||"static"===this._storedCSS[n])&&(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&s.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||s.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(s.push(function(e){this._trigger("remove",e,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;0<=n;n--)t||s.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;s.length>n;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===F.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var t=e||this;return{helper:t.helper,placeholder:t.placeholder||F([]),position:t.position,originalPosition:t.originalPosition,offset:t.positionAbs,item:t.currentItem,sender:e?e.element:null}}}),F.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=F(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():F()}},_createIcons:function(){var e=this.options.icons;e&&(F("").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?void this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),void("disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=F.ui.keyCode,i=this.headers.length,n=this.headers.index(e.target),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(n+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(n-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(F(e.target).attr("tabIndex",-1),F(s).attr("tabIndex",0),s.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===F.ui.keyCode.UP&&e.ctrlKey&&F(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=F()):!1===e.active?this._activate(0):this.active.length&&!F.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=F()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var i,e=this.options,t=e.heightStyle,n=this.element.parent();this.active=this._findActive(e.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=F(this),t=e.uniqueId().attr("id"),i=e.next(),n=i.uniqueId().attr("id");e.attr("aria-controls",n),i.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(i=n.height(),this.element.siblings(":visible").each(function(){var e=F(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=F(this).outerHeight(!0)}),this.headers.next().each(function(){F(this).height(Math.max(0,i-F(this).innerHeight()+F(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.headers.next().each(function(){i=Math.max(i,F(this).css("height","").height())}).height(i))},_activate:function(e){var t=this._findActive(e)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:F.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):F()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&F.each(e.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,i=this.active,n=F(e.currentTarget),s=n[0]===i[0],r=s&&t.collapsible,o=r?F():n.next(),a=i.next(),l={oldHeader:i,oldPanel:a,newHeader:r?F():n,newPanel:o};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,l)||(t.active=!r&&this.headers.index(n),this.active=s?F():n,this._toggle(l),i.removeClass("ui-accordion-header-active ui-state-active"),t.icons&&i.children(".ui-accordion-header-icon").removeClass(t.icons.activeHeader).addClass(t.icons.header),s||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),t.icons&&n.children(".ui-accordion-header-icon").removeClass(t.icons.header).addClass(t.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=i,this.options.animate?this._animate(t,i,e):(i.hide(),t.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(F(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,i,t){var n,s,r,o=this,a=0,l=e.css("box-sizing"),c=e.length&&(!i.length||e.index()",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(e){var t=F(e.target);!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&F(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var t=F(e.currentTarget);t.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,t)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(e){this._delay(function(){F.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=F(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var t,i,n,s,r=!0;switch(e.keyCode){case F.ui.keyCode.PAGE_UP:this.previousPage(e);break;case F.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case F.ui.keyCode.HOME:this._move("first","first",e);break;case F.ui.keyCode.END:this._move("last","last",e);break;case F.ui.keyCode.UP:this.previous(e);break;case F.ui.keyCode.DOWN:this.next(e);break;case F.ui.keyCode.LEFT:this.collapse(e);break;case F.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case F.ui.keyCode.ENTER:case F.ui.keyCode.SPACE:this._activate(e);break;case F.ui.keyCode.ESCAPE:this.collapse(e);break;default:r=!1,i=this.previousFilter||"",n=String.fromCharCode(e.keyCode),s=!1,clearTimeout(this.filterTimer),n===i?s=!0:n=i+n,t=this._filterMenuItems(n),(t=s&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(n=String.fromCharCode(e.keyCode),t=this._filterMenuItems(n)),t.length?(this.focus(e,t),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&e.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var e,t=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),i.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=F(this),t=e.parent(),i=F("").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);t.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",t.attr("id"))}),(e=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=F(this);t._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),e.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!F.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,i,n,s,r,o;this._hasScroll()&&(t=parseFloat(F.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(F.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-t-i,s=this.activeMenu.scrollTop(),r=this.activeMenu.height(),o=e.outerHeight(),n<0?this.activeMenu.scrollTop(s+n):r",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var i,n,s,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,r="input"===e;this.isMultiLine=!!t||!r&&this.element.prop("isContentEditable"),this.valueMethod=this.element[t||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))n=s=i=!0;else{n=s=i=!1;var t=F.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:i=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:i=!0,this._move("nextPage",e);break;case t.UP:i=!0,this._keyEvent("previous",e);break;case t.DOWN:i=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(i=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:n=!0,this._searchTimeout(e)}}},keypress:function(e){if(i)return i=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&e.preventDefault());if(!n){var t=F.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){return s?(s=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=F("
              ").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];F(e.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(e){e.target===t.element[0]||e.target===i||F.contains(i,e.target)||t.close()})})},menufocus:function(e,t){var i,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){F(e.target).trigger(e.originalEvent)})):(n=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),void((i=t.item.attr("aria-label")||n.value)&&F.trim(i).length&&(this.liveRegion.children().hide(),F("
              ").text(i).appendTo(this.liveRegion))))},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=F("",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?F(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var i,n,s=this;F.isArray(this.options.source)?(i=this.options.source,this.source=function(e,t){t(F.ui.autocomplete.filter(i,e.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,t){s.xhr&&s.xhr.abort(),s.xhr=F.ajax({url:n,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(n){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),i=n.altKey||n.ctrlKey||n.metaKey||n.shiftKey;(!e||e&&!t&&!i)&&(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length").text(t.label).appendTo(e)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),F.extend(F.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var i=RegExp(F.ui.autocomplete.escapeRegex(t),"i");return F.grep(e,function(e){return i.test(e.label||e.value||e)})}}),F.widget("ui.autocomplete",F.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1").text(t).appendTo(this.liveRegion))}}),F.ui.autocomplete;var p,m,C,A="ui-button ui-widget ui-state-default ui-corner-all",v="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",b=function(){var e=F(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},y=function(e){var t=e.name,i=e.form,n=F([]);return t&&(t=t.replace(/'/g,"\\'"),n=i?F(i).find("[name='"+t+"'][type=radio]"):F("[name='"+t+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),n};F.widget("ui.button",{version:"1.11.4",defaultElement:"").addClass(this._triggerClass).html(s?F("").attr({src:s,alt:n,title:n}):n)),e[o?"before":"after"](t.trigger),t.trigger.click(function(){return F.datepicker._datepickerShowing&&F.datepicker._lastInput===e[0]?F.datepicker._hideDatepicker():(F.datepicker._datepickerShowing&&F.datepicker._lastInput!==e[0]&&F.datepicker._hideDatepicker(),F.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,r=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(s=n=i=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,n=s);return n},r.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},_inlineDatepicker:function(e,t){var i=F(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.dpDiv),F.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,i,n,s){var r,o,a,l,c,h=this._dialogInst;return h||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=F(""),this._dialogInput.keydown(this._doKeyDown),F("body").append(this._dialogInput),(h=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},F.data(this._dialogInput[0],"datepicker",h)),u(h.settings,n||{}),t=t&&t.constructor===Date?this._formatDate(h,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(o=document.documentElement.clientWidth,a=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+l,a/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),F.blockUI&&F.blockUI(this.dpDiv),F.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(e){var t,i=F(e),n=F.data(e,"datepicker");i.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),F.removeData(e,"datepicker"),"input"===t?(n.append.remove(),n.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===t||"span"===t)&&i.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(t){var e,i,n=F(t),s=F.data(t,"datepicker");n.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===e||"span"===e)&&((i=n.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=F.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,i,n=F(t),s=F.data(t,"datepicker");n.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===e||"span"===e)&&((i=n.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=F.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return F.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,i){var n,s,r,o,a=this._getInst(e);return 2===arguments.length&&"string"==typeof t?"defaults"===t?F.extend({},F.datepicker._defaults):a?"all"===t?F.extend({},a.settings):this._get(a,t):null:(n=t||{},"string"==typeof t&&((n={})[t]=i),void(a&&(this._curInst===a&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max"),u(a.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(a.settings.minDate=this._formatDate(a,r)),null!==o&&void 0!==n.dateFormat&&void 0===n.maxDate&&(a.settings.maxDate=this._formatDate(a,o)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(F(e),a),this._autoSize(a),this._setDate(a,s),this._updateAlternate(a),this._updateDatepicker(a))))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(e){var t,i,n,s=F.datepicker._getInst(e.target),r=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,F.datepicker._datepickerShowing)switch(e.keyCode){case 9:F.datepicker._hideDatepicker(),r=!1;break;case 13:return(n=F("td."+F.datepicker._dayOverClass+":not(."+F.datepicker._currentClass+")",s.dpDiv))[0]&&F.datepicker._selectDay(e.target,s.selectedMonth,s.selectedYear,n[0]),(t=F.datepicker._get(s,"onSelect"))?(i=F.datepicker._formatDate(s),t.apply(s.input?s.input[0]:null,[i,s])):F.datepicker._hideDatepicker(),!1;case 27:F.datepicker._hideDatepicker();break;case 33:F.datepicker._adjustDate(e.target,e.ctrlKey?-F.datepicker._get(s,"stepBigMonths"):-F.datepicker._get(s,"stepMonths"),"M");break;case 34:F.datepicker._adjustDate(e.target,e.ctrlKey?+F.datepicker._get(s,"stepBigMonths"):+F.datepicker._get(s,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&F.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&F.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&F.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&F.datepicker._adjustDate(e.target,e.ctrlKey?-F.datepicker._get(s,"stepBigMonths"):-F.datepicker._get(s,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&F.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&F.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&F.datepicker._adjustDate(e.target,e.ctrlKey?+F.datepicker._get(s,"stepBigMonths"):+F.datepicker._get(s,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&F.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?F.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,i,n=F.datepicker._getInst(e.target);return F.datepicker._get(n,"constrainInput")?(t=F.datepicker._possibleChars(F.datepicker._get(n,"dateFormat")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||i<" "||!t||-1a&&nl&&sn+1&&i.charAt(n+1)===e;return t&&n++,t},b=function(e){var t=v(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n=RegExp("^\\d{"+("y"===e?i:1)+","+i+"}"),s=r.substring(a).match(n);if(!s)throw"Missing number at position "+a;return a+=s[0].length,parseInt(s[0],10)},y=function(e,t,i){var n=-1,s=F.map(v(e)?i:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(F.each(s,function(e,t){var i=t[1];return r.substr(a,i.length).toLowerCase()===i.toLowerCase()?(n=t[0],a+=i.length,!1):void 0}),-1!==n)return n+1;throw"Unknown name at position "+a},I=function(){if(r.charAt(a)!==i.charAt(n))throw"Unexpected literal at position "+a;a++};for(n=0;i.length>n;n++)if(A)"'"!==i.charAt(n)||v("'")?I():A=!1;else switch(i.charAt(n)){case"d":m=b("d");break;case"D":y("D",h,u);break;case"o":C=b("o");break;case"m":p=b("m");break;case"M":p=y("M",d,g);break;case"y":f=b("y");break;case"@":f=(o=new Date(b("@"))).getFullYear(),p=o.getMonth()+1,m=o.getDate();break;case"!":f=(o=new Date((b("!")-this._ticksTo1970)/1e4)).getFullYear(),p=o.getMonth()+1,m=o.getDate();break;case"'":v("'")?I():A=!0;break;default:I()}if(r.length>a&&(s=r.substr(a),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=c?0:-100)),-1n+1&&i.charAt(n+1)===e;return t&&n++,t},c=function(e,t,i){var n=""+t;if(l(e))for(;i>n.length;)n="0"+n;return n},h=function(e,t,i,n){return l(e)?n[t]:i[t]},u="",d=!1;if(e)for(n=0;i.length>n;n++)if(d)"'"!==i.charAt(n)||l("'")?u+=i.charAt(n):d=!1;else switch(i.charAt(n)){case"d":u+=c("d",e.getDate(),2);break;case"D":u+=h("D",e.getDay(),s,r);break;case"o":u+=c("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=c("m",e.getMonth()+1,2);break;case"M":u+=h("M",e.getMonth(),o,a);break;case"y":u+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=i.charAt(n)}return u},_possibleChars:function(i){var n,e="",t=!1,s=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t};for(n=0;i.length>n;n++)if(t)"'"!==i.charAt(n)||s("'")?e+=i.charAt(n):t=!1;else switch(i.charAt(n)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":s("'")?e+="'":t=!0;break;default:e+=i.charAt(n)}return e},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),r=s,o=this._getFormatConfig(e);try{r=this.parseDate(i,n,o)||s}catch(e){n=t?"":n}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=n?r.getDate():0,e.currentMonth=n?r.getMonth():0,e.currentYear=n?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(a,e,t){var i,n,s=null==e||""===e?t:"string"==typeof e?function(e){try{return F.datepicker.parseDate(F.datepicker._get(a,"dateFormat"),e,F.datepicker._getFormatConfig(a))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?F.datepicker._getDate(a):null)||new Date,i=t.getFullYear(),n=t.getMonth(),s=t.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,o=r.exec(e);o;){switch(o[2]||"d"){case"d":case"D":s+=parseInt(o[1],10);break;case"w":case"W":s+=7*parseInt(o[1],10);break;case"m":case"M":n+=parseInt(o[1],10),s=Math.min(s,F.datepicker._getDaysInMonth(i,n));break;case"y":case"Y":i+=parseInt(o[1],10),s=Math.min(s,F.datepicker._getDaysInMonth(i,n))}o=r.exec(e)}return new Date(i,n,s)}(e):"number"==typeof e?isNaN(e)?t:(i=e,(n=new Date).setDate(n.getDate()+i),n):new Date(e.getTime());return(s=s&&"Invalid Date"==""+s?t:s)&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(12t;)--Q<0&&(Q=11,ee--);for(e.drawMonth=Q,e.drawYear=ee,i=this._get(e,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,Q-G,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,ee,Q)?""+i+"":V?"":""+i+"",s=this._get(e,"nextText"),s=U?this.formatDate(s,this._daylightSavingAdjust(new Date(ee,Q+G,1)),this._getFormatConfig(e)):s,r=this._canAdjustMonth(e,1,ee,Q)?""+s+"":V?"":""+s+"",o=this._get(e,"currentText"),a=this._get(e,"gotoCurrent")&&e.currentDay?J:H,o=U?this.formatDate(o,a,this._getFormatConfig(e)):o,l=e.inline?"":"",c=W?"
              "+(z?l:"")+(this._isInRange(e,a)?"":"")+(z?"":l)+"
              ":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,u=this._get(e,"showWeek"),d=this._get(e,"dayNames"),g=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),p=this._get(e,"monthNamesShort"),m=this._get(e,"beforeShowDay"),C=this._get(e,"showOtherMonths"),A=this._get(e,"selectOtherMonths"),v=this._getDefaultDate(e),b="",I=0;q[0]>I;I++){for(w="",this.maxRows=4,_=0;q[1]>_;_++){if(x=this._daylightSavingAdjust(new Date(ee,Q,e.selectedDay)),k=" ui-corner-all",E="",Y){if(E+="
              "}for(E+="
              "+(/all|left/.test(k)&&0===I?z?r:n:"")+(/all|right/.test(k)&&0===I?z?n:r:"")+this._generateMonthYearHeader(e,Q,ee,X,Z,0",F=u?"":"",y=0;y<7;y++)F+="";for(E+=F+"",S=this._getDaysInMonth(ee,Q),ee===e.selectedYear&&Q===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,S)),T=(this._getFirstDayOfMonth(ee,Q)-h+7)%7,B=Math.ceil((T+S)/7),$=Y&&this.maxRows>B?this.maxRows:B,this.maxRows=$,M=this._daylightSavingAdjust(new Date(ee,Q,1-T)),L=0;L<$;L++){for(E+="",R=u?"":"",y=0;y<7;y++)N=m?m.apply(e.input?e.input[0]:null,[M]):[!0,""],P=(O=M.getMonth()!==Q)&&!A||!N[0]||X&&M"+(O&&!C?" ":P?""+M.getDate()+"":""+M.getDate()+"")+"",M.setDate(M.getDate()+1),M=this._daylightSavingAdjust(M);E+=R+""}11<++Q&&(Q=0,ee++),w+=E+="
              "+this._get(e,"weekHeader")+""+g[D]+"
              "+this._get(e,"calculateWeek")(M)+"
              "+(Y?"
              "+(0
              ":""):"")}b+=w}return b+=c,e._keyEvent=!1,b},_generateMonthYearHeader:function(e,t,i,n,s,r,o,a){var l,c,h,u,d,g,f,p,m=this._get(e,"changeMonth"),C=this._get(e,"changeYear"),A=this._get(e,"showMonthAfterYear"),v="
              ",b="";if(r||!m)b+=""+o[t]+"";else{for(l=n&&n.getFullYear()===i,c=s&&s.getFullYear()===i,b+=""}if(A||(v+=b+(!r&&m&&C?"":" ")),!e.yearshtml)if(e.yearshtml="",r||!C)v+=""+i+"";else{for(u=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),f=(g=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t})(u[0]),p=Math.max(f,g(u[1]||"")),f=n?Math.max(f,n.getFullYear()):f,p=s?Math.min(p,s.getFullYear()):p,e.yearshtml+="",v+=e.yearshtml,e.yearshtml=null}return v+=this._get(e,"yearSuffix"),A&&(v+=(!r&&m&&C?"":" ")+b),v+"
              "},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,r)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&t=s.getTime())&&(!r||t.getTime()<=r.getTime())&&(!o||t.getFullYear()>=o)&&(!a||a>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),F.fn.datepicker=function(e){if(!this.length)return this;F.datepicker.initialized||(F(document).mousedown(F.datepicker._checkExternalClick),F.datepicker.initialized=!0),0===F("#"+F.datepicker._mainDivId).length&&F("body").append(F.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?F.datepicker["_"+e+"Datepicker"].apply(F.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?F.datepicker["_"+e+"Datepicker"].apply(F.datepicker,[this].concat(t)):F.datepicker._attachDatepicker(this,e)}):F.datepicker["_"+e+"Datepicker"].apply(F.datepicker,[this[0]].concat(t))},F.datepicker=new e,F.datepicker.initialized=!1,F.datepicker.uuid=(new Date).getTime(),F.datepicker.version="1.11.4",F.datepicker,F.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var t=F(this).css(e).offset().top;t<0&&F(this).css("top",e.top-t)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&F.fn.draggable&&this._makeDraggable(),this.options.resizable&&F.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?F(e):this.document.find(e||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(e=t.parent.children().eq(t.index)).length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:F.noop,enable:F.noop,close:function(e){var t,i=this;if(this._isOpen&&!1!==this._trigger("beforeClose",e)){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{(t=this.document[0].activeElement)&&"body"!==t.nodeName.toLowerCase()&&F(t).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+F(this).css("z-index")}).get(),s=Math.max.apply(null,n);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!t&&this._trigger("focus",e),i},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=F(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(e){function t(){var e=this.document[0].activeElement;this.uiDialog[0]===e||F.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),t.call(this),this._delay(t)},_createWrapper:function(){this.uiDialog=F("
              ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===F.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===F.ui.keyCode.TAB&&!e.isDefaultPrevented()){var t=this.uiDialog.find(":tabbable"),i=t.filter(":first"),n=t.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==i[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.focus()}),e.preventDefault()):(this._delay(function(){i.focus()}),e.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=F("
              ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){F(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=F("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),e=F("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=F("
              ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=F("
              ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var s=this,e=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),F.isEmptyObject(e)||F.isArray(e)&&!e.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(F.each(e,function(e,t){var i,n;t=F.isFunction(t)?{click:t,text:e}:t,t=F.extend({type:"button"},t),i=t.click,t.click=function(){i.apply(s.element[0],arguments)},n={icons:t.icons,text:t.showText},delete t.icons,delete t.showText,F("",t).button(n).appendTo(s.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function s(e){return{position:e.position,offset:e.offset}}var r=this,o=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,t){F(this).addClass("ui-dialog-dragging"),r._blockFrames(),r._trigger("dragStart",e,s(t))},drag:function(e,t){r._trigger("drag",e,s(t))},stop:function(e,t){var i=t.offset.left-r.document.scrollLeft(),n=t.offset.top-r.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=n?"+":"")+n,of:r.window},F(this).removeClass("ui-dialog-dragging"),r._unblockFrames(),r._trigger("dragStop",e,s(t))}})},_makeResizable:function(){function r(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var o=this,a=this.options,e=a.resizable,t=this.uiDialog.css("position"),i="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:i,start:function(e,t){F(this).addClass("ui-dialog-resizing"),o._blockFrames(),o._trigger("resizeStart",e,r(t))},resize:function(e,t){o._trigger("resize",e,r(t))},stop:function(e,t){var i=o.uiDialog.offset(),n=i.left-o.document.scrollLeft(),s=i.top-o.document.scrollTop();a.height=o.uiDialog.height(),a.width=o.uiDialog.width(),a.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=s?"+":"")+s,of:o.window},F(this).removeClass("ui-dialog-resizing"),o._unblockFrames(),o._trigger("resizeStop",e,r(t))}}).css("position",t)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=F(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),t=F.inArray(this,e);-1!==t&&e.splice(t,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(e){var i=this,n=!1,s={};F.each(e,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(n=!0),e in i.resizableRelatedOptions&&(s[e]=t)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(e,t){var i,n,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&((i=s.is(":data(ui-draggable)"))&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&((n=s.is(":data(ui-resizable)"))&&!t&&s.resizable("destroy"),n&&"string"==typeof t&&s.resizable("option","handles",t),n||!1===t||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),t=Math.max(0,n.minHeight-e),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-e):"none","auto"===n.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=F(this);return F("
              ").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!F(e.target).closest(".ui-dialog").length||!!F(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=F("
              ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),F.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=F("
              ").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),void this._refreshValue())},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,t=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=F("
              ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),F.widget("ui.selectmenu",{version:"1.11.4",defaultElement:""}),n.html(d),this.labels=i.find("label"),this.inputs=this.labels.children("input"),this._setButtonWidth(),this._setMenuWidth(),this.button[0].defaultValue=this.update(),e||this._trigger("refresh")},update:function(){var e=this.options,t=this.inputs,i=t.filter(":checked"),n=i.length;e=0===n?e.noneSelectedText:f.isFunction(e.selectedText)?e.selectedText.call(this,n,t.length,i.get()):/\d/.test(e.selectedList)&&0)?=?)";var I=t++;e[I]=e[o]+"|x|X|\\*";var w=t++;e[w]=e[i]+"|x|X|\\*";var _=t++;e[_]="[v=\\s]*("+e[w]+")(?:\\.("+e[w]+")(?:\\.("+e[w]+")(?:"+e[g]+")?"+e[m]+"?)?)?";var x=t++;e[x]="[v=\\s]*("+e[I]+")(?:\\.("+e[I]+")(?:\\.("+e[I]+")(?:"+e[f]+")?"+e[m]+"?)?)?";var k=t++;e[k]="^"+e[y]+"\\s*"+e[_]+"$";var E=t++;e[E]="^"+e[y]+"\\s*"+e[x]+"$";var F=t++;e[F]="(?:~>?)";var D=t++;e[D]="(\\s*)"+e[F]+"\\s+",l[D]=new RegExp(e[D],"g");var S=t++;e[S]="^"+e[F]+e[_]+"$";var T=t++;e[T]="^"+e[F]+e[x]+"$";var B=t++;e[B]="(?:\\^)";var $=t++;e[$]="(\\s*)"+e[B]+"\\s+",l[$]=new RegExp(e[$],"g");var M=t++;e[M]="^"+e[B]+e[_]+"$";var L=t++;e[L]="^"+e[B]+e[x]+"$";var R=t++;e[R]="^"+e[y]+"\\s*("+v+")$|^$";var N=t++;e[N]="^"+e[y]+"\\s*("+A+")$|^$";var O=t++;e[O]="(\\s*)"+e[y]+"\\s*("+v+"|"+e[_]+")",l[O]=new RegExp(e[O],"g");var P=t++;e[P]="^\\s*("+e[_]+")\\s+-\\s+("+e[_]+")\\s*$";var j=t++;e[j]="^\\s*("+e[x]+")\\s+-\\s+("+e[x]+")\\s*$";var H=t++;e[H]="(<|>)?=?\\s*\\*";for(var z=0;z<34;z++)l[z]||(l[z]=new RegExp(e[z]));function W(e,t){if(e instanceof V)return e;if("string"!=typeof e)return null;if(e.length>s)return null;if(!(t?l[b]:l[C]).test(e))return null;try{return new V(e,t)}catch(e){return null}}function V(e,t){if(e instanceof V){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>s)throw new TypeError("version is longer than "+s+" characters");if(!(this instanceof V))return new V(e,t);this.loose=t;var i=e.trim().match(t?l[b]:l[C]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(0<=t&&t'},V.prototype.toString=function(){return this.version},V.prototype.compare=function(e){return e instanceof V||(e=new V(e,this.loose)),this.compareMain(e)||this.comparePre(e)},V.prototype.compareMain=function(e){return e instanceof V||(e=new V(e,this.loose)),q(this.major,e.major)||q(this.minor,e.minor)||q(this.patch,e.patch)},V.prototype.comparePre=function(e){if(e instanceof V||(e=new V(e,this.loose)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var i=this.prerelease[t],n=e.prerelease[t];if(void 0===i&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(i!==n)return q(i,n)}while(++t)},V.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var i=this.prerelease.length;0<=--i;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);-1===i&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this},n.inc=function(e,t,i,n){"string"==typeof i&&(n=i,i=void 0);try{return new V(e,i).inc(t,n).version}catch(e){return null}},n.diff=function(e,t){{if(X(e,t))return null;var i=W(e),n=W(t);if(i.prerelease.length||n.prerelease.length){for(var s in i)if(("major"===s||"minor"===s||"patch"===s)&&i[s]!==n[s])return"pre"+s;return"prerelease"}for(var s in i)if(("major"===s||"minor"===s||"patch"===s)&&i[s]!==n[s])return s}},n.compareIdentifiers=q;var U=/^[0-9]+$/;function q(e,t){var i=U.test(e),n=U.test(t);return i&&n&&(e=+e,t=+t),i&&!n?-1:n&&!i?1:e":s=Y(e,i,n);break;case">=":s=Q(e,i,n);break;case"<":s=J(e,i,n);break;case"<=":s=ee(e,i,n);break;default:throw new TypeError("Invalid operator: "+t)}return s}function ie(e,t){if(e instanceof ie){if(e.loose===t)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);this.loose=t,this.parse(e),this.semver===ne?this.value="":this.value=this.operator+this.semver.version}n.rcompareIdentifiers=function(e,t){return q(t,e)},n.major=function(e,t){return new V(e,t).major},n.minor=function(e,t){return new V(e,t).minor},n.patch=function(e,t){return new V(e,t).patch},n.compare=K,n.compareLoose=function(e,t){return K(e,t,!0)},n.rcompare=G,n.sort=function(e,i){return e.sort(function(e,t){return n.compare(e,t,i)})},n.rsort=function(e,i){return e.sort(function(e,t){return n.rcompare(e,t,i)})},n.gt=Y,n.lt=J,n.eq=X,n.neq=Z,n.gte=Q,n.lte=ee,n.cmp=te,n.Comparator=ie;var ne={};function se(e,t){if(e instanceof se&&e.loose===t)return e;if(!(this instanceof se))return new se(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function re(e){return!e||"x"===e.toLowerCase()||"*"===e}function oe(e,t,i,n,s,r,o,a,l,c,h,u,d){return((t=re(i)?"":re(n)?">="+i+".0.0":re(s)?">="+i+"."+n+".0":">="+t)+" "+(a=re(l)?"":re(c)?"<"+(+l+1)+".0.0":re(h)?"<"+l+"."+(+c+1)+".0":u?"<="+l+"."+c+"."+h+"-"+u:"<="+a)).trim()}function ae(e,t){for(var i=0;i":s=Y,r=ee,o=J,a=">",l=">=";break;case"<":s=J,r=Q,o=Y,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var c=0;c=0.0.0")),u=u||e,d=d||e,s(e.semver,u.semver,n)?u=e:o(e.semver,d.semver,n)&&(d=e)}),u.operator===a||u.operator===l)return!1;if((!d.operator||d.operator===a)&&r(e,d.semver))return!1;if(d.operator===l&&o(e,d.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.loose?l[R]:l[N],i=e.match(t);if(!i)throw new TypeError("Invalid comparator: "+e);this.operator=i[1],"="===this.operator&&(this.operator=""),i[2]?this.semver=new V(i[2],this.loose):this.semver=ne},ie.prototype.inspect=function(){return''},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return this.semver===ne||("string"==typeof e&&(e=new V(e,this.loose)),te(e,this.operator,this.semver,this.loose))},(n.Range=se).prototype.inspect=function(){return''},se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var a=this.loose;e=e.trim();var t=a?l[j]:l[P];e=(e=(e=(e=(e=e.replace(t,oe)).replace(l[O],"$1$2$3")).replace(l[D],"$1~")).replace(l[$],"$1^")).split(/\s+/).join(" ");var i=a?l[R]:l[N],n=e.split(" ").map(function(e){return o=t=a,s=e.trim().split(/\s+/).map(function(e){return t=e,i=o?l[L]:l[M],t.replace(i,function(e,t,i,n,s){return re(t)?"":re(i)?">="+t+".0.0 <"+(+t+1)+".0.0":re(n)?"0"===t?">="+t+"."+i+".0 <"+t+"."+(+i+1)+".0":">="+t+"."+i+".0 <"+(+t+1)+".0.0":s?("-"!==s.charAt(0)&&(s="-"+s),"0"===t?"0"===i?">="+t+"."+i+"."+n+s+" <"+t+"."+i+"."+(+n+1):">="+t+"."+i+"."+n+s+" <"+t+"."+(+i+1)+".0":">="+t+"."+i+"."+n+s+" <"+(+t+1)+".0.0"):"0"===t?"0"===i?">="+t+"."+i+"."+n+" <"+t+"."+i+"."+(+n+1):">="+t+"."+i+"."+n+" <"+t+"."+(+i+1)+".0":">="+t+"."+i+"."+n+" <"+(+t+1)+".0.0"});var t,i}).join(" "),r=t,i=s.trim().split(/\s+/).map(function(e){return t=e,i=r?l[T]:l[S],t.replace(i,function(e,t,i,n,s){return re(t)?"":re(i)?">="+t+".0.0 <"+(+t+1)+".0.0":re(n)?">="+t+"."+i+".0 <"+t+"."+(+i+1)+".0":s?("-"!==s.charAt(0)&&(s="-"+s),">="+t+"."+i+"."+n+s+" <"+t+"."+(+i+1)+".0"):">="+t+"."+i+"."+n+" <"+t+"."+(+i+1)+".0"});var t,i}).join(" "),n=t,i.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var i=t?l[E]:l[k];return e.replace(i,function(e,t,i,n,s,r){var o=re(i),a=o||re(n),l=a||re(s),c=l;return"="===t&&c&&(t=""),o?e=">"===t||"<"===t?"<0.0.0":"*":t&&c?(a&&(n=0),l&&(s=0),">"===t?(t=">=",a?(i=+i+1,s=n=0):l&&(n=+n+1,s=0)):"<="===t&&(t="<",a?i=+i+1:n=+n+1),e=t+i+"."+n+"."+s):a?e=">="+i+".0.0 <"+(+i+1)+".0.0":l&&(e=">="+i+"."+n+".0 <"+i+"."+(+n+1)+".0"),e})}(e,n)}).join(" ").trim().replace(l[H],"");var t,i,n,s,r,o}).join(" ").split(/\s+/);return this.loose&&(n=n.filter(function(e){return!!e.match(i)})),n=n.map(function(e){return new ie(e,a)})},n.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new V(e,this.loose));for(var t=0;t",i)},n.outside=ce,"function"==typeof define&&define.amd&&define(n)}("object"==typeof exports?exports:"function"==typeof define&&define.amd?{}:semver={}),function(){var e=function(){return this}();if(!e&&"undefined"!=typeof window&&(e=window),"undefined"==typeof requirejs){var r=function(e,t,i){"string"==typeof e?(2==arguments.length&&(i=t),r.modules[e]||(r.payloads[e]=i,r.modules[e]=null)):r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};r.modules={},r.payloads={};var t,i,o=function(e,t,i){if("string"==typeof t){var n=c(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],r=0,o=t.length;rs.index&&this.lastIndex--}return s},l||(RegExp.prototype.test=function(e){var t=o.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),define("ace/lib/es5-shim",["require","exports","module"],function(e,t,i){function r(){}function n(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function s(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(0>>0;if("[object Function]"!=p(e))throw new TypeError;for(;++s>>0,s=Array(n),r=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,r=[],o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,s=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0,s=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,r=0;if(2<=arguments.length)s=arguments[1];else for(;;){if(r in i){s=i[r++];break}if(++r>=n)throw new TypeError("reduce of empty array with no initial value")}for(;r>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,r=n-1;if(2<=arguments.length)s=arguments[1];else for(;;){if(r in i){s=i[r--];break}if(--r<0)throw new TypeError("reduceRight of empty array with no initial value")}for(;r in this&&(s=e.call(void 0,s,i[r],r,t)),r--;);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=y&&"[object String]"==p(this)?this.split(""):B(this),i=t.length>>>0;if(!i)return-1;var n=0;for(1>>0;if(!i)return-1;var n=i-1;for(1>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;ithis.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor;return n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||i<200?(this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},this.onTouchMove=function(e){var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor;if(n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)||i<200)return this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(n.prototype),t.DefaultHandlers=n}),define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var s=e("./lib/dom");(function(){this.$init=function(){return this.$element=s.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){s.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){s.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(n.prototype),t.Tooltip=n}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";function n(e){o.call(this,e)}var s=e("../lib/dom"),r=e("../lib/oop"),f=e("../lib/event"),o=e("../tooltip").Tooltip;r.inherits(n,o),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),r=this.getHeight();i<(e+=15)+s&&(e-=e+s-i),n<(t+=15)+r&&(t-=20+r),o.prototype.setPosition.call(this,e,t)}}.call(n.prototype),t.GutterHandler=function(o){function a(){i&&(i=clearTimeout(i)),h&&(g.hide(),h=null,u.removeEventListener("mousewheel",a))}function l(e){g.setPosition(e.x,e.y)}var i,c,h,u=o.editor,d=u.renderer.$gutterLayer,g=new n(u.container);o.editor.setDefaultHandler("guttermousedown",function(e){if(u.isFocused()&&0==e.getButton()&&"foldWidgets"!=d.getRegion(e)){var t=e.getDocumentPosition().row,i=u.session.selection;if(e.getShiftKey())i.selectTo(t,0);else{if(2==e.domEvent.detail)return u.selectAll(),e.preventDefault();o.$clickSelection=u.selection.getLineRange(t)}return o.setState("selectByLines"),o.captureMouse(e),e.preventDefault()}}),o.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(s.hasCssClass(t,"ace_fold-widget"))return a();h&&o.$tooltipFollowsMouse&&l(e),c=e,i||(i=setTimeout(function(){i=null,c&&!o.isMousePressed?function(){var e=c.getDocumentPosition().row,t=d.$annotations[e];if(!t)return a();if(e==u.session.getLength()){var i=u.renderer.pixelToScreenCoordinates(0,c.y).row,n=c.$pos;if(i>u.session.documentToScreenRow(n.row,n.column))return a()}if(h!=t)if(h=t.text.join("
              "),g.setHtml(h),g.show(),u.on("mousewheel",a),o.$tooltipFollowsMouse)l(c);else{var s=d.$cells[u.session.documentToScreenRow(e,0)].element.getBoundingClientRect(),r=g.getElement().style;r.left=s.right+"px",r.top=s.bottom+"px"}}():a()},50))}),f.addListener(u.renderer.$gutter,"mouseout",function(e){c=null,h&&!i&&(i=setTimeout(function(){i=null,a()},50))}),u.on("changeSession",a)}}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),r=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(r.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";function n(t){function e(){var e,t,i,n,s,r=u;u=g.renderer.screenToTextCoordinates(f,p),e=u,t=r,i=Date.now(),n=!t||e.row!=t.row,s=!t||e.column!=t.column,!A||n||s?(g.$blockScrolling+=1,g.moveCursorToPosition(e),g.$blockScrolling-=1,A=i,v={x:f,y:p}):5this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=k.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;k.isIE&&"dragReady"==this.state&&(3 ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.rowt)var n={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?r.fromPoints(t,t):this.isBackwards()?r.fromPoints(t,e):r.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return i=s?(n=s.start.row,s.end.row):n,!0===t?new r(n,0,i,this.session.getLine(i).length):new r(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)0=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(ec){var m=e.substring(c,p-f.length);u.type==d?u.value+=m:(u.type&&l.push(u),u={type:d,value:m})}for(var C=0;CA){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;0e.length&&(b=e.length)}),l==1/0&&(l=b,a=o=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),t(a?A:C)},this.toggleBlockComment=function(e,t,i,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var r,o,a=(g=new p(t,n.row,n.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,h;a&&/comment/.test(a.type);){if(-1!=(f=a.value.indexOf(s.start))){var u=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+f;c=new m(u,d,u,d+s.start.length);break}a=g.stepBackward()}var g;for(a=(g=new p(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){var f;if(-1!=(f=a.value.indexOf(s.end))){u=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+f;h=new m(u,d,u,d+s.end.length);break}a=g.stepForward()}h&&t.remove(h),c&&(t.remove(c),r=c.start.row,o=-s.start.length)}else o=s.start.length,r=i.start.row,t.insert(i.end,s.end),t.insert(i.start,s.start);l.start.row==r&&(l.start.column+=o),l.end.row==r&&(l.end.column+=o),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var n in this.$embeds=[],this.$modes={},e)e[n]&&(this.$embeds.push(n),this.$modes[n]=new e[n]);var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(n=0;nthis.row)){var t,i,n,s,r,o,a,l,c=(t=e,i={row:this.row,column:this.column},n=this.$insertRight,s="insert"==t.action,r=(s?1:-1)*(t.end.row-t.start.row),o=(s?1:-1)*(t.end.column-t.start.column),a=t.start,l=s?a:t.end,h(i,a,n)?{row:i.row,column:i.column}:h(l,i,!n)?{row:i.row+r,column:i.column+(i.row==l.row?o:0)}:{row:a.row,column:a.column});this.setPosition(c.row,c.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):i.column=e<0?i.row=0:(i.row=e,Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(r.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./apply_delta").applyDelta,r=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,o=e("./anchor").Anchor,a=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,r),this.setValue=function(e){var t=this.getLength()-1;this.remove(new h(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:i<=e&&(e=i-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var i=0;i=(e=Math.min(Math.max(e,0),this.getLength()))e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(r.prototype),t.BackgroundTokenizer=r}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var c=e("./lib/lang"),h=(e("./lib/oop"),e("./range").Range),n=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,n){if(this.regExp)for(var s=n.firstRow,r=n.lastRow,o=s;o<=r;o++){var a=this.cache[o];null==a&&((a=c.getMatchOffsets(i.getLine(o),this.regExp)).length>this.MAX_RANGES&&(a=a.slice(0,this.MAX_RANGES)),a=a.map(function(e){return new h(o,e.offset,o,e.offset+e.length)}),this.cache[o]=a.length?a:"");for(var l=a.length;l--;)t.drawSingleLineMarker(e,a[l].toScreenRange(i),this.clazz,n)}}}).call(n.prototype),t.SearchHighlight=n}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";function c(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var n=e("../range").Range;(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),0=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,s,r=0,o=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;lt||i[i.length-1].start.rown)break;if(c.start.row==n&&c.start.column>=t.column&&(c.start.column!=t.column||!this.$insertRight)&&(c.start.column+=r,c.start.row+=s),c.end.row==n&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&0c.start.column&&c.end.column==o[a+1].start.column&&(c.end.column-=r),c.end.column+=r,c.end.row+=s}}}if(0!=s&&a=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,s=0;s=e){s=r.end.row;try{var o=this.addFold("...",r);o&&(o.collapseChildren=i)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){"manual"==(this.$foldStyle=e)&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._emit("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,s=e-1;0<=s;){var r=i[s];if(null==r&&(r=i[s]=this.getFoldWidget(s)),"start"==r){var o=this.getFoldWidgetRange(s);if(n||(n=o),o&&o.end.row>=e)break}s--}return{range:-1!==s&&o,firstRange:n}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,i)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),s="end"===i?-1:1,r=this.getFoldAt(e,-1===s?0:n.length,s);if(r)t.children||t.all?this.removeFold(r):this.expandFold(r);else{var o=this.getFoldWidgetRange(e,!0);if(!o||o.isMultiLine()||!(r=this.getFoldAt(o.start.row,o.start.column,1))||!o.isEqual(r.range)){if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=o?o.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o}this.removeFold(r)}}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var u=e("../token_iterator").TokenIterator,a=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,s=i.charAt(e.column-1),r=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(r||(s=i.charAt(e.column),e={row:e.row,column:e.column+1},r=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1),!r)return null;if(r[1]){if(!(o=this.$findClosingBracket(r[1],e)))return null;t=a.fromPoints(e,o),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var o;if(!(o=this.$findOpeningBracket(r[2],e)))return null;t=a.fromPoints(o,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var n=this.$brackets[e],s=1,r=new u(this,t.row,t.column),o=r.getCurrentToken();if(o||(o=r.stepForward()),o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var a=t.column-r.getCurrentTokenColumn()-2,l=o.value;;){for(;0<=a;){var c=l.charAt(a);if(c==n){if(0==(s-=1))return{row:r.getCurrentTokenRow(),column:a+r.getCurrentTokenColumn()}}else c==e&&(s+=1);a-=1}for(;(o=r.stepBackward())&&!i.test(o.type););if(null==o)break;a=(l=o.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var n=this.$brackets[e],s=1,r=new u(this,t.row,t.column),o=r.getCurrentToken();if(o||(o=r.stepForward()),o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var a=t.column-r.getCurrentTokenColumn();;){for(var l=o.value,c=l.length;a>1,r=e[s];if(rt&&(t=e.screenWidth)}),this.lineWidgetWidth=t},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,s=0,r=this.$foldData[s],o=r?r.start.row:1/0,a=t.length,l=0;ln&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var s=e[n];"doc"==s.group?(this.doc.revertDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!0,i)):s.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;ne.end.column&&(r.start.column+=c),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=c)),o&&r.start.row>=e.end.row&&(r.start.row+=o,r.end.row+=o)}if(r.end=this.insert(r.start,n),s.length){var a=e.start,l=r.start,c=(o=l.row-a.row,l.column-a.column);this.addFolds(s.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=o,e.end.row+=o,e}))}return r},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new h(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var r=this.getLine(s);i.start.row=s,i.end.row=s;for(var o=0;othis.doc.getLength()-1)return 0;n=s-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var r=new h(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(r).map(function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,a),o.length&&this.addFolds(o),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)t=e=0;else{var i=this.doc.getLength();t=i<=e?(e=i-1,this.doc.getLine(i-1).length):Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&1=s.row&&p.shiftRow(-a)}o=r}else{var d=Array(a);d.unshift(r,0);var g=t?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,d);c=this.$foldData,h=0;if(p=this.getFoldLine(r)){var f=p.range.compareInside(n.row,n.column);0==f?(p=p.split(n.row,n.column))&&(p.shiftRow(a),p.addRemoveChars(o,0,s.column-n.column)):-1==f&&(p.addRemoveChars(r,0,s.column-n.column),p.shiftRow(a)),h=c.indexOf(p)+1}for(;h=r&&p.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(r))&&p.addRemoveChars(r,n.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,o):this.$updateRowLengthCache(r,o),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var o,i,a=this.doc.getAllLines(),n=this.getTabSize(),s=this.$wrapData,r=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(i=this.getFoldLine(l,i))?(o=[],i.walk(function(e,t,i,n){var s;if(null!=e){(s=this.$getDisplayTokens(e,o.length))[0]=f;for(var r=1;r>2)),o-1);gl[h-1]}else u=!h;for(var d=this.getLength()-1,g=this.getNextFoldLine(s),f=g?g.start.row:1/0;o<=e&&!(el[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;a=m[C];)s++,C++;f=f.substring(m[C-1]||0,f.length),p=0g||(s.push(o=new y(c,g,c+a-1,f)),2v&&s[h].end.row==i.end.row;)h--;for(s=s.slice(p,h+1),p=0,h=s.length;ps?s+1:s,e.selection.moveCursorTo(i.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r=s.lastRow||n.end.row<=s.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&2e3n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,t);for(var s=n.length;s--;){var r=n[s];r.isEmpty()||this.session.remove(r),this.session.insert(r.start,i[s])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),s=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var r=n.transformAction(i.getState(s.row),"insertion",this,i,e);r&&(e!==r.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=r.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){(o=new p.fromPoints(s,s)).end.column+=e.length,this.session.remove(o)}}else{var o=this.getSelectionRange();s=this.session.remove(o),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(s.row);if(s.column>a.search(/\S|$/)){var l=a.substr(s.column).search(/\S|$/);i.doc.removeInLine(s.row,s.column,s.column+l)}}this.clearSelection();var c=s.column,h=i.getState(s.row),u=(a=i.getLine(s.row),n.checkOutdent(h,a,e));i.insert(s,e);if(r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new p(s.row,c+r.selection[0],s.row,c+r.selection[1])):this.selection.setSelectionRange(new p(s.row+r.selection[0],r.selection[1],s.row+r.selection[2],r.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(h,a.slice(0,s.column),i.getTabString());i.insert({row:s.row+1,column:0},d)}u&&n.autoOutdent(h,i,s.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),s=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var r=i.getTextRange(t);if("\n"==r[r.length-1]){var o=i.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,s=this.session.getLine(e.row);n=tt.toLowerCase()?1:0});for(var n=new p(0,0,0,0),s=e.first;s<=e.last;s++){var r=t.getLine(s);n.start.row=s,n.end.row=s,n.end.column=r.length,t.replace(n,i[s-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex=t)return{value:s[0],start:s.index,end:s.index+s[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new p(t,i-1,t,i),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var r=this.getNumberAt(t,i);if(r){var o=0<=r.value.indexOf(".")?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-o,l=parseFloat(r.value);l*=Math.pow(10,a),o!==r.end&&ig+1)break;g=f.last}for(h--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=h+1);u<=h;)o[u].moveBy(a,0),u++;t||(a=0),l+=a}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(s,0)}):!1===t&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection()),this.$blockScrolling--;var r=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new A(this.session,i.row,i.column),s=n.getCurrentToken(),r=s||n.stepForward();if(r){var o,a,l=!1,c={},h=i.column-r.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;hwindow.innerHeight)&&null)&&(a.style.top=n+"px",a.style.left=t.left+"px",a.style.height=i.lineHeight+"px",a.scrollIntoView(o)),o=s=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",t),this.renderer.removeEventListener("afterRender",n),this.renderer.removeEventListener("beforeRender",i))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,n.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(v.prototype),C.defineOptions(v.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),t.Editor=v}),define("ace/undomanager",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.reset()};(function(){function t(e){return{action:e.action,start:e.start,end:e.end,lines:1==e.lines.length?null:e.lines,text:1==e.lines.length?e.lines[0]:null}}function i(e){return{action:e.action,start:e.start,end:e.end,lines:e.lines||[e.text]}}function n(e,t){for(var i=new Array(e.length),n=0;ng+1;)d=this.$cells.pop(),this.element.removeChild(d.element);break}(d=this.$cells[++g])||((d={element:null,textNode:null,foldWidget:null}).element=y.createElement("div"),d.textNode=document.createTextNode(""),d.element.appendChild(d.textNode),this.element.appendChild(d.element),this.$cells[g]=d);var p="ace_gutter-cell ";if(a[f]&&(p+=a[f]),l[f]&&(p+=l[f]),this.$annotations[f]&&(p+=this.$annotations[f].className),d.element.className!=p&&(d.element.className=p),(C=t.getRowLength(f)*e.lineHeight+"px")!=d.element.style.height&&(d.element.style.height=C),o){var m=o[f];null==m&&(m=o[f]=t.getFoldWidget(f))}if(m){d.foldWidget||(d.foldWidget=y.createElement("span"),d.element.appendChild(d.foldWidget));p="ace_fold-widget ace_"+m;"start"==m&&f==r&&fi.right-t.right?"foldWidgets":void 0}}).call(r.prototype),t.Gutter=r}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";var g=e("../range").Range,n=e("../lib/dom"),s=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){if(e=e||this.config){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var r=this.$getTop(s.start.row,e),o=this.$padding+s.start.column*e.characterWidth;n.renderer(t,s,o,r,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,n,s){for(var r=this.session,o=t.start.row,a=t.end.row,l=o,c=0,h=0,u=r.getScreenLastRowColumn(l),d=new g(l,t.start.column,l,h);l<=a;l++)d.start.row=d.end.row=l,d.start.column=l==o?t.start.column:r.getRowWrapIndent(l),c=h,h=d.end.column=u,u=l+1
              "),a=this.$getTop(t.end.row,n);var c=t.end.column*n.characterWidth;if(e.push("
              "),!((o=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){a=this.$getTop(t.start.row+1,n);var h=(t.start.column?1:0)|(t.end.column?0:8);e.push("
              ")}},this.drawSingleLineMarker=function(e,t,i,n,s,r){var o=n.lineHeight,a=(t.end.column+(s||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;e.push("
              ")},this.drawFullLineMarker=function(e,t,i,n,s){var r=this.$getTop(t.start.row,n),o=n.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,n)-r),e.push("
              ")},this.drawScreenLineMarker=function(e,t,i,n,s){var r=this.$getTop(t.start.row,n),o=n.lineHeight;e.push("
              ")}}).call(s.prototype),t.Marker=s}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),c=e("../lib/dom"),u=e("../lib/lang"),s=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),r=function(e){this.element=c.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){(this.session=e)&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;i"+u.stringRepeat(this.TAB_CHAR,i)+""):t.push(u.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",s="",r="";if(this.showInvisibles){n+=" ace_invisible",s=" ace_invisible_space",r=" ace_invisible_tab";var o=u.stringRepeat(this.SPACE_CHAR,this.tabSize),a=u.stringRepeat(this.TAB_CHAR,this.tabSize)}else a=o=u.stringRepeat(" ",this.tabSize);this.$tabStrings[" "]=""+o+"",this.$tabStrings["\t"]=""+a+""}},this.updateLines=function(e,t,i){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),s=Math.min(i,e.lastRow),r=this.element.childNodes,o=0,a=e.firstRow;ae.lastRow)for(n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0t.lastRow){s=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(s)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),s=t,r=this.session.getNextFoldLine(s),o=r?r.start.row:1/0;o"),this.$renderLine(t,s,!1,s==o&&r),this.$useLineGroups()&&t.push("
              "),s++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,l,t,i){var c=this,n=i.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,function(e,t,i,n,s){if(t)return c.showInvisibles?""+u.stringRepeat(c.SPACE_CHAR,e.length)+"":e;if("&"==e)return"&";if("<"==e)return"<";if(">"==e)return">";if("\t"==e){var r=c.session.getScreenTabSize(l+n);return l+=r-1,c.$tabStrings[r]}if(" "!=e)return i?""+c.SPACE_CHAR+"":(l+=1,""+e+"");var o=c.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",a=c.showInvisibles?c.SPACE_CHAR:"";return l+=1,""+a+""});if(this.$textToken[t.type])e.push(n);else{var s="ace_"+t.type.replace(/\./g," ace_"),r="";"fold"==t.type&&(r=" style='width:"+t.value.length*this.config.characterWidth+"px;' "),e.push("",n,"")}return l+i.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||i<=n?t:" "==t[0]?(n-=n%this.tabSize,e.push(u.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(u.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var s=0,r=0,o=i[0],a=0,l=0;l=o;)a=this.$renderToken(e,a,c,h.substring(0,o-s)),h=h.substring(o-s),s=o,n||e.push("
              ","
              "),e.push(u.stringRepeat(" ",i.indent)),a=0,o=i[++r]||Number.MAX_VALUE;0!=h.length&&(s+=h.length,a=this.$renderToken(e,a,c,h))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],s=n.value;this.displayIndentGuides&&(s=this.renderIndentGuide(e,s)),s&&(i=this.$renderToken(e,i,n,s));for(var r=1;r"),s.length){var r=this.session.getRowSplitData(t);r&&r.length?this.$renderWrappedLine(e,s,r,i):this.$renderSimpleLine(e,s)}this.showInvisibles&&(n&&(t=n.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),i||e.push("
              ")},this.$getFoldLineTokens=function(e,t){var r=this.session,o=[],a=r.getTokens(e);return t.walk(function(e,t,i,n,s){null!=e?o.push({type:"fold",value:e}):(s&&(a=r.getTokens(t)),a.length&&function(e,t,i){for(var n=0,s=0;s+e[n].value.lengthi-t&&(r=r.substring(0,i-t)),o.push({type:e[n].type,value:r}),s=t+r.length,n+=1);si?o.push({type:e[n].type,value:r.substring(0,i-s)}):o.push(e[n]),s+=r.length,n+=1}}(a,n,i))},t.end.row,this.session.getLine(t.end.row).length),o},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(r.prototype),t.Text=r}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n,s=e("../lib/dom"),r=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(n?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&!n&&(this.smoothBlinking=e,s.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var e=s.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(1e.height+e.offset||r.top<0)&&1n;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=r,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),t.Cursor=r}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),r=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)};(function(){n.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=s.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),s=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){var e;for(t.pending=!1;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(s.prototype),t.RenderLoop=s}),define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),s=e("../lib/dom"),r=e("../lib/lang"),o=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e,t){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=r.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=s.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=0 .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}',"ace_editor.css");var m=function(e,t){var i=this;this.container=e||r.createElement("div"),this.$keepTextAreaAtCursor=!s.isOldIE,r.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var n=this.$textLayer=new c(this.content);this.canvas=n.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=e)&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(2e.height-s)n.top=n.left="0";else{var r=this.characterWidth;if(this.$composition){var o=this.textarea.value.replace(/^\x01+/,"");r*=this.session.$getStringScreenWidth(o)[0]+2,s+=2}(i-=this.scrollLeft)>this.$size.scrollerWidth-r&&(i=this.$size.scrollerWidth-r),i+=this.gutterWidth,n.height=s+"px",n.width=r+"px",n.left=Math.min(i,this.$size.scrollerWidth-r)+"px",n.top=Math.min(t,this.$size.height-s)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var i=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;0u.top),g=a!==d;g&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var f,p,m=Math.ceil(c/this.lineHeight)-1,C=Math.max(0,Math.round((this.scrollTop-l)/this.lineHeight)),A=C+m,v=this.lineHeight;C=e.screenToDocumentRow(C,0);var b=e.getFoldLine(C);b&&(C=b.start.row),f=e.documentToScreenRow(C,0),p=e.getRowLength(C)*v,A=Math.min(e.screenToDocumentRow(A,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(A)*v+p,l=this.scrollTop-f*v;var y=0;return this.layerConfig.width!=s&&(y=this.CHANGE_H_SCROLL),(o||g)&&(y=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),g&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:C,firstRowScreen:f,lastRow:A,lineHeight:v,characterWidth:this.characterWidth,minHeight:c,maxHeight:n,offset:l,gutterOffset:Math.max(0,Math.ceil((l+t.height-t.scrollerHeight)/v)),height:this.$size.scrollerHeight},y},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||t=1-this.scrollMargin.top||(0=1-this.scrollMargin.left||(0this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+n.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var i=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return i.append(t),i.getBlob("application/javascript")}}}).call(s.prototype);var r=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,s=!1,r=Object.create(l),o=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){o.messageBuffer.push(e),n&&(s?setTimeout(a):a())},this.setEmitSync=function(e){s=e};var a=function(){var e=o.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&r._signal(e.event,e.data)};r.postMessage=function(e){o.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},h.loadModule(["worker",t],function(e){for(n=new e[i](r);o.messageBuffer.length;)a()})};r.prototype=s.prototype,e.UIWorkerClient=r,e.WorkerClient=s}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var a=e("./range").Range,n=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),r=function(e,t,i,n,s,r){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,n),this.setup=function(){var i=this,n=this.doc,t=this.session,e=this.$pos;this.selectionBefore=t.selection.toJSON(),t.selection.inMultiSelectMode&&t.selection.toSingleRange(),this.pos=n.createAnchor(e.row,e.column),this.markerId=t.addMarker(new a(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(e){t.removeMarker(i.markerId),i.markerId=t.addMarker(new a(e.value.row,e.value.column,e.value.row,e.value.column+i.length),i.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(e){var t=n.createAnchor(e.row,e.column);i.others.push(t)}),t.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,n=this;this.othersActive=!0,this.others.forEach(function(t){t.markerId=i.addMarker(new a(t.row,t.column,t.row,t.column+n.length),n.othersClass,null,!1),t.on("change",function(e){i.removeMarker(t.markerId),t.markerId=i.addMarker(new a(e.value.row,e.value.column,e.value.row,e.value.column+n.length),n.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var t=n.start.column-this.pos.column;if(this.length+=s,!this.session.$fromUndo){if("insert"===e.action)for(var i=this.others.length-1;0<=i;i--){var r={row:(o=this.others[i]).row,column:o.column+t};o.row===n.start.row&&n.start.column=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;eo&&(o=t.column),it[1].length&&(s=t[1].length),rt[3].length&&(o=t[3].length)),t):[e]}).map(t?n:a?l?function(e){return e[2]?i(s+r-e[2].length)+e[2]+i(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:n:function(e){return e[2]?i(s)+e[2]+i(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(c.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=n,e("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(e){n(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",r)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",r))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var d=e("../../range").Range,n=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var n=/\S/,s=e.getLine(t),r=s.search(n);if(-1!=r){for(var o=i||s.length,a=e.getLength(),l=t,c=t;++tr.row&&(o.row--,o.column=e.getLine(o.row).length),d.fromPoints(r,o)}},this.closingBracketBlock=function(e,t,i,n,s){var r={row:i,column:n},o=e.$findOpeningBracket(t,r);if(o)return o.column++,r.column--,d.fromPoints(o,r)}}).call(n.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e("../lib/dom").importCssString(t.cssText,t.cssClass)}),define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeEditor",this.$onChangeEditor)}e("./lib/oop");var s=e("./lib/dom");e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),(this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.start.row,n=e.end.row-i;if(0!==n)if("remove"==e.action){t.splice(i+1,n).forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var s=new Array(n);s.unshift(i,0),t.splice.apply(t,s),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var i=!0;e.forEach(function(e,t){e&&(i=!1,e.row=t)}),i&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[e.row]=e;var t=this.editor.renderer;return e.html&&!e.el&&(e.el=s.createElement("div"),e.el.innerHTML=e.html),e.el&&(s.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=void 0),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var s=1/0,r=0;r>1,o=i(t,e[r]);if(0=n.length?s=0"),h.appendChild(p.createElement("div"));var g=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return c.destroy(),{command:"null"}};c.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),i.widgetManager.removeLineWidget(c),e.off("changeSelection",c.destroy),e.off("changeSession",c.destroy),e.off("mouseup",c.destroy),e.off("change",c.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",c.destroy),e.on("changeSession",c.destroy),e.on("mouseup",c.destroy),e.on("change",c.destroy),e.session.widgetManager.addLineWidget(c),c.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:c.el.offsetHeight})},p.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,a,t){"use strict";e("./lib/fixoldbrowsers");var l=e("./lib/dom"),c=e("./lib/event"),h=e("./editor").Editor,n=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,u=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),a.config=e("./config"),a.require=e,a.edit=function(e){if("string"==typeof e){var t=e;if(!(e=document.getElementById(t)))throw new Error("ace.edit can't find div #"+t)}if(e&&e.env&&e.env.editor instanceof h)return e.env.editor;var i="";if(e&&/input|textarea/i.test(e.tagName)){var n=e;i=n.value,e=l.createElement("pre"),n.parentNode.replaceChild(e,n)}else e&&(i=l.getInnerText(e),e.innerHTML="");var s=a.createEditSession(i),r=new h(new u(e));r.setSession(s);var o={document:s,editor:r,onResize:r.resize.bind(r,null)};return n&&(o.textarea=n),c.addListener(window,"resize",o.onResize),r.on("destroy",function(){c.removeListener(window,"resize",o.onResize),o.editor.container.env=null}),r.container.env=r.env=o,r},a.createEditSession=function(e,t){var i=new n(e,t);return i.setUndoManager(new s),i},a.EditSession=n,a.UndoManager=s}),window.require(["ace/ace"],function(e){for(var t in e&&e.config.init(!0),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])}),function(t,a){var l={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isPlainObj:function(e){return e===Object(e)},toArray:function(e){return Array.prototype.slice.call(e)},prepareArgs:function(e,t){return(e=l.toArray(e)).unshift(t),e},getObjKeyByValue:function(e,t){for(var i in e)if(e.hasOwnProperty(i)&&e[i]===t)return i},prepareReturn:function(e){return t[l.getObjKeyByValue(s,e)]},retrieve:function(e,t){return e==a?t:e},serialize:function(e){return JSON.stringify(e)},unserialize:function(e){return e==a?a:JSON.parse(e)}},n=function(){return n.get.apply(this,arguments)},e={storage:function(){return storage.get.apply(storage,arguments)},session:function(){return session.get.apply(session,arguments)}};n.set=function(e,t,i){if(l.isPlainObj(t))for(var n in t)t.hasOwnProperty(n)&&e.setItem(n,l.serialize(t[n]));else e.setItem(t,l.serialize(i));return l.prepareReturn(e)},n.invert=function(e,t){return this.set(e,t,!this.get(e,t))},n.add=function(e,t,i){return this.set(e,t,this.get(e,t)+parseInt(i,10))},n.increase=function(e,t,i){return this.add(e,t,l.retrieve(i,1))},n.decrease=function(e,t,i){return this.add(e,t,-l.retrieve(i,1))},n.concat=function(e,t,i){return this.set(e,t,this.get(e,t)+i)},n.push=function(e,t,i){var n=l.toArray(arguments),s=this.get(e,t,[]);return n.splice(0,2),s.push.apply(s,n),this.set(e,t,s)},n.extend=function(e,t,i,n){var s=this.get(e,t,{});if(l.isPlainObj(i))for(var r in i)i.hasOwnProperty(r)&&(s[r]=i[r]);else s[i]=n;return this.set(e,t,s)},n.remove=function(e,t){for(var i=0,n=(t=l.isArray(t)?t:l.toArray(arguments)).length;i([\w ]+)\[\w ]+"+i+"<")))}),$(".translateT").each(function(e){var t=$(this).attr("data-lang");t||(t=$(this).attr("title"),$(this).attr("data-lang",t));var i=translateWord(t,n,s);i&&$(this).attr("title",i)})}var _=function(e,t,i,n){var s=(e=translateWord(e)).indexOf("%s");return-1===s||-1===(s=(e=e.replace("%s",t)).indexOf("%s"))||-1!==(s=(e=e.replace("%s",i)).indexOf("%s"))&&(e=e.replace("%s",n)),e};!function(e){"function"==typeof define&&define.amd?define(["jquery","./jquery.fancytree.ui-deps"],e):"object"==typeof module&&module.exports?(require("./jquery.fancytree.ui-deps"),module.exports=e(require("jquery"))):e(jQuery)}(function(y){"use strict";if(!y.ui||!y.ui.fancytree){var r,e,p=null,m=new RegExp(/\.|\//),t=/[&<>"'\/]/g,i=/[<>"'\/]/g,h="$recursive_request",n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},s={16:!0,17:!0,18:!0},f={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={0:"",1:"left",2:"middle",3:"right"},C="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),A={},u="columns types".split(" "),v="checkbox expanded extraClasses folder icon iconTooltip key lazy radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),a={},b={},l={active:!0,children:!0,data:!0,focus:!0};for(r=0;r