var $url="/cms/templates/templatesReference",data=utils.init({siteId:utils.getQueryInt("siteId"),elements:null,elementPanel:!1,elementTagName:"",elementTitle:"",elementFields:null}),methods={apiList:function(){var e=this;$api.get($url,{params:{siteId:this.siteId}}).then(function(t){var n=t.data;e.elements=n}).catch(function(e){utils.error(e)}).then(function(){utils.loading(e,!1)})},apiFields:function(e){this.elementTagName=e.name,this.elementTitle=e.title;var t=this;utils.loading(this,!0),$api.post($url,{siteId:this.siteId,elementName:e.elementName}).then(function(e){var n=e.data;t.elementPanel=!0,t.elementFields=n}).catch(function(e){utils.error(e)}).then(function(){utils.loading(t,!1)})},getLinkUrl:function(e){return cloud.getDocsUrl("stl/"+e+"/")},getFieldLinkUrl:function(e){return cloud.getDocsUrl("stl/"+this.elementTagName+"/#"+e.name.toLowerCase()+"-"+e.title.toLowerCase())},btnElementSelectClick:function(e){this.apiFields(e)},btnElementCancelClick:function(){this.elementPanel=!1}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiList()}});