(()=>{function e(t,n){var r="c8y_JsonSchema",c={type:r,name:"",appliesTo:{},c8y_JsonSchema:{type:"object",properties:{}},c8y_Global:{}},a={type:r,pageSize:1e3};return{getDefaults:function(){return _.cloneDeep(c)},list:function(e){return n.list(_.defaults(e,a))},detail:function(e){return n.detail(e).then(t.getResData)},create:o,update:u,save:function(e){return(_.isUndefined(e.id)?o:u)(e)},remove:function(e){return n.remove(e)},getProperties:function(e){e=_.get(e,"".concat(r,".properties"));return _.map(e,function(e,t){return _.assign({key:t},e)})}};function o(e){return n.create(_.defaults(e,c))}function u(e){return n.update(_.defaults(e,{c8y_Global:{}}))}}e.$inject=["c8yBase","c8yInventory"],angular.module("c8y.core").factory("c8yJsonSchemas",e)})();