/*! phoscon-app 2024-08-14 */

"use strict";function bbInitConfig(){var initialized=!1;_.debounce(function(){},500);app.api.on("event",function(e){if("config"===e.r&&e){_.map(e,function(val,key){}),s.set({})}});var Config=Backbone.Model.extend({name:"config",url:"//"+app.session.gw+"/api/"+app.apikey+"/config",sync:function(method,model,options){return"patch"===method&&(method="update"),Backbone.sync(method,model,options)},initialize:function(){this.set("id","1")},parse:function(config){return delete config.whitelist,config}});var cache=sessionStorage.getItem("app.config");cache?(cache=JSON.parse(cache),app.config=new Config(cache)):app.config=new Config,app.config.on("change",function(config,options){}),restGetResource(app.config),app.config.on("sync",function(config,response,options){initialized||($("#gw-info").html(config.get("name")+"<i>"+config.get("ipaddress")+"</i>"),initialized=!0)})}