From 325a2417f40e2899d78739b726ef49b50c726ec0 Mon Sep 17 00:00:00 2001 From: Joxit Date: Wed, 8 Nov 2017 23:50:43 -0400 Subject: [PATCH] Update version to 0.3.1 Fix for #24 --- dist/scripts/script.js | 2 +- dist/scripts/tags-static.js | 2 +- dist/scripts/tags.js | 2 +- dist/scripts/vendor.js | 6 ++-- gulpfile.js | 2 +- package.json | 10 +++---- src/index.html | 2 +- src/scripts/script.js | 2 +- src/tags/add.tag | 2 +- src/tags/app.tag | 59 +++++++++++++++++++++++-------------- src/tags/catalog.tag | 7 ++--- src/tags/change.tag | 2 +- src/tags/taglist.tag | 16 ++++------ 13 files changed, 60 insertions(+), 54 deletions(-) diff --git a/dist/scripts/script.js b/dist/scripts/script.js index 85cf0b6..705ffd6 100644 --- a/dist/scripts/script.js +++ b/dist/scripts/script.js @@ -15,4 +15,4 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -function Http(){this.oReq=new XMLHttpRequest,this.oReq.hasHeader=Http.hasHeader,this._events={},this._headers={}}Http.prototype.addEventListener=function(e,r){this._events[e]=r;var t=this;switch(e){case"loadend":t.oReq.addEventListener("loadend",function(){if(401==this.status){var e=new XMLHttpRequest;e.open(t._method,t._url);for(key in t._events)e.addEventListener(key,t._events[key]);for(key in t._headers)e.setRequestHeader(key,t._headers[key]);e.withCredentials=!0,e.hasHeader=Http.hasHeader,e.send()}else r.bind(this)()});break;case"load":t.oReq.addEventListener("load",function(){401!==this.status&&r.bind(this)()});break;default:t.oReq.addEventListener(e,function(){r.bind(this)()})}},Http.prototype.setRequestHeader=function(e,r){this.oReq.setRequestHeader(e,r),this._headers[e]=r},Http.prototype.open=function(e,r){this._method=e,this._url=r,this.oReq.open(e,r)},Http.prototype.send=function(){this.oReq.send()},Http.hasHeader=function(e){return this.getAllResponseHeaders().split("\n").some(function(r){return new RegExp("^"+e+":","i").test(r)})};var registryUI={};registryUI.URL_QUERY_PARAM_REGEX=/[&?]url=/,registryUI.URL_PARAM_REGEX=/^url=/,registryUI.url=function(e){if(!registryUI._url){var r=registryUI.getUrlQueryParam();if(r)try{return registryUI._url=registryUI.decodeURI(r),registryUI._url}catch(e){console.log(e)}registryUI._url=registryUI.getRegistryServer(0)}return registryUI._url},registryUI.getRegistryServer=function(e){try{var r=JSON.parse(localStorage.getItem("registryServer"));if(r instanceof Array)return isNaN(e)?r.map(function(e){return e.trim().replace(/\/*$/,"")}):r[e]}catch(e){}return isNaN(e)?[]:""},registryUI.addServer=function(e){var r=registryUI.getRegistryServer();e=e.trim().replace(/\/*$/,"");var t=r.indexOf(e);t==-1&&(r.push(e),registryUI._url||registryUI.updateHistory(e),localStorage.setItem("registryServer",JSON.stringify(r)))},registryUI.changeServer=function(e){var r=registryUI.getRegistryServer();e=e.trim().replace(/\/*$/,"");var t=r.indexOf(e);t!=-1&&(r.splice(t,1),r=[e].concat(r),registryUI.updateHistory(e),localStorage.setItem("registryServer",JSON.stringify(r)))},registryUI.removeServer=function(e){var r=registryUI.getRegistryServer();e=e.trim().replace(/\/*$/,"");var t=r.indexOf(e);t!=-1&&(r.splice(t,1),localStorage.setItem("registryServer",JSON.stringify(r)),e==registryUI.url()&&(registryUI.updateHistory(registryUI.getRegistryServer(0)),rg.router.go("home")))},registryUI.updateHistory=function(e){history.pushState(null,"",(e?"?url="+registryUI.encodeURI(e):"?")+window.location.hash),registryUI._url=e},registryUI.getUrlQueryParam=function(){var e=window.location.search;if(registryUI.URL_QUERY_PARAM_REGEX.test(e)){var r=e.split(/^\?|&/).find(function(e){return e&®istryUI.URL_PARAM_REGEX.test(e)});return r?r.replace(registryUI.URL_PARAM_REGEX,""):r}},registryUI.encodeURI=function(e){return e.indexOf("&")<0?window.encodeURIComponent(e):btoa(e)},registryUI.decodeURI=function(e){return e.startsWith("http")?window.decodeURIComponent(e):atob(e)},registryUI.isImageRemoveActivated=!0,registryUI.catalog={},registryUI.taglist={},riot.mount("*"); \ No newline at end of file +function Http(){this.oReq=new XMLHttpRequest,this.oReq.hasHeader=Http.hasHeader,this._events={},this._headers={}}Http.prototype.addEventListener=function(e,t){this._events[e]=t;var r=this;switch(e){case"loadend":r.oReq.addEventListener("loadend",function(){if(401==this.status){var e=new XMLHttpRequest;e.open(r._method,r._url);for(key in r._events)e.addEventListener(key,r._events[key]);for(key in r._headers)e.setRequestHeader(key,r._headers[key]);e.withCredentials=!0,e.hasHeader=Http.hasHeader,e.send()}else t.bind(this)()});break;case"load":r.oReq.addEventListener("load",function(){401!==this.status&&t.bind(this)()});break;default:r.oReq.addEventListener(e,function(){t.bind(this)()})}},Http.prototype.setRequestHeader=function(e,t){this.oReq.setRequestHeader(e,t),this._headers[e]=t},Http.prototype.open=function(e,t){this._method=e,this._url=t,this.oReq.open(e,t)},Http.prototype.send=function(){this.oReq.send()},Http.hasHeader=function(e){return this.getAllResponseHeaders().split("\n").some(function(t){return new RegExp("^"+e+":","i").test(t)})};var registryUI={};registryUI.URL_QUERY_PARAM_REGEX=/[&?]url=/,registryUI.URL_PARAM_REGEX=/^url=/,registryUI.url=function(e){if(!registryUI._url){var t=registryUI.getUrlQueryParam();if(t)try{return registryUI._url=registryUI.decodeURI(t),registryUI._url}catch(e){console.log(e)}registryUI._url=registryUI.getRegistryServer(0)}return registryUI._url},registryUI.getRegistryServer=function(e){try{var t=JSON.parse(localStorage.getItem("registryServer"));if(t instanceof Array)return isNaN(e)?t.map(function(e){return e.trim().replace(/\/*$/,"")}):t[e]}catch(e){}return isNaN(e)?[]:""},registryUI.addServer=function(e){var t=registryUI.getRegistryServer();e=e.trim().replace(/\/*$/,"");var r=t.indexOf(e);r==-1&&(t.push(e),registryUI._url||registryUI.updateHistory(e),localStorage.setItem("registryServer",JSON.stringify(t)))},registryUI.changeServer=function(e){var t=registryUI.getRegistryServer();e=e.trim().replace(/\/*$/,"");var r=t.indexOf(e);r!=-1&&(t.splice(r,1),t=[e].concat(t),registryUI.updateHistory(e),localStorage.setItem("registryServer",JSON.stringify(t)))},registryUI.removeServer=function(e){var t=registryUI.getRegistryServer();e=e.trim().replace(/\/*$/,"");var r=t.indexOf(e);r!=-1&&(t.splice(r,1),localStorage.setItem("registryServer",JSON.stringify(t)),e==registryUI.url()&&(registryUI.updateHistory(registryUI.getRegistryServer(0)),route("")))},registryUI.updateHistory=function(e){history.pushState(null,"",(e?"?url="+registryUI.encodeURI(e):"?")+window.location.hash),registryUI._url=e},registryUI.getUrlQueryParam=function(){var e=window.location.search;if(registryUI.URL_QUERY_PARAM_REGEX.test(e)){var t=e.split(/^\?|&/).find(function(e){return e&®istryUI.URL_PARAM_REGEX.test(e)});return t?t.replace(registryUI.URL_PARAM_REGEX,""):t}},registryUI.encodeURI=function(e){return e.indexOf("&")<0?window.encodeURIComponent(e):btoa(e)},registryUI.decodeURI=function(e){return e.startsWith("http")?window.decodeURIComponent(e):atob(e)},registryUI.isImageRemoveActivated=!0,registryUI.catalog={},registryUI.taglist={},riot.mount("*"); \ No newline at end of file diff --git a/dist/scripts/tags-static.js b/dist/scripts/tags-static.js index 462f831..da490da 100644 --- a/dist/scripts/tags-static.js +++ b/dist/scripts/tags-static.js @@ -15,4 +15,4 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -riot.tag2("catalog",'

Repositories of {registryUI.url()}

  • send {item}
',"","",function(t){registryUI.catalog.instance=this,this.mixin("rg.router"),registryUI.catalog.display=function(){var t=new Http;t.addEventListener("load",function(){registryUI.catalog.repositories=[],200==this.status?(registryUI.catalog.repositories=JSON.parse(this.responseText).repositories||[],registryUI.catalog.repositories.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText)}),t.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.catalog.repositories=[]}),t.addEventListener("loadend",function(){registryUI.catalog.loadend=!0,registryUI.catalog.instance.update()}),t.open("GET",registryUI.url()+"/v2/_catalog"),t.send()},registryUI.catalog.go=function(t){rg.router.go("taglist",{repository:t.split("/")[0],image:t.split("/")[1]})},registryUI.catalog.display()}),riot.tag2("app",'
',"","",function(t){this.mixin("rg.router"),this.router.add({name:"home",url:""}),this.router.add({name:"taglist",url:"/taglist/:repository/:image"}),this.router.on("go",t=>{switch(t.name){case"taglist":registryUI.taglist.display&&(registryUI.taglist.loadend=!1,registryUI.taglist.display());break;case"home":registryUI.catalog.display&&(registryUI.catalog.loadend=!1,registryUI.catalog.display())}}),registryUI.appTag=this,registryUI.snackbar=function(t,r){registryUI.appTag.tags["material-snackbar"].addToast({message:t,isError:r})},registryUI.errorSnackbar=function(t){return registryUI.snackbar(t,!0)},this.router.start()}),riot.tag2("taglist",'
arrow_back

Tags of {registryUI.url() + \'/\' + registryUI.taglist.name}

Repository Tag
{registryUI.taglist.name} {item}
',"","",function(t){registryUI.taglist.instance=this,registryUI.taglist.display=function(){if(rg.router.current&&"taglist"==rg.router.current.name){name=rg.router.current.params.repository+(rg.router.current.params.image?"/"+rg.router.current.params.image:"");var t=new Http;registryUI.taglist.name=name,registryUI.taglist.instance.update(),t.addEventListener("load",function(){registryUI.taglist.tags=[],200==this.status?(registryUI.taglist.tags=JSON.parse(this.responseText).tags||[],registryUI.taglist.tags.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText,!0)}),t.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.taglist.tags=[]}),t.addEventListener("loadend",function(){registryUI.taglist.loadend=!0,registryUI.taglist.instance.update()}),t.open("GET",registryUI.url()+"/v2/"+name+"/tags/list"),t.send(),registryUI.taglist.asc=!0}},registryUI.taglist.display(),registryUI.taglist.instance.update(),registryUI.taglist.reverse=function(){registryUI.taglist.asc?(registryUI.taglist.tags.reverse(),registryUI.taglist.asc=!1):(registryUI.taglist.tags.sort(),registryUI.taglist.asc=!0),registryUI.taglist.instance.update()},registryUI.taglist.back=function(){rg.router.go("home")},registryUI.taglist.refresh=function(){rg.router.go(rg.router.current.name,rg.router.current.params)}}),riot.tag2("remove-image",' delete ',"","",function(t){registryUI.removeImage=registryUI.removeImage||{},registryUI.removeImage.update=this.update,registryUI.removeImage.remove=function(t,r){var e=new Http;e.addEventListener("loadend",function(){if(registryUI.taglist.refresh(),200==this.status){if(!this.hasHeader("Docker-Content-Digest"))return void registryUI.errorSnackbar("You need to add Access-Control-Expose-Headers: ['Docker-Content-Digest'] in your server configuration.");var e=this.getResponseHeader("Docker-Content-Digest"),a=new Http;a.addEventListener("loadend",function(){200==this.status||202==this.status?(registryUI.taglist.refresh(),registryUI.snackbar("Deleting "+t+":"+r+" image. Run `registry garbage-collect config.yml` on your registry")):404==this.status?registryUI.errorSnackbar("Digest not found"):registryUI.snackbar(this.responseText)}),a.open("DELETE",registryUI.url()+"/v2/"+t+"/manifests/"+e),a.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),a.addEventListener("error",function(){registryUI.errorSnackbar("An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].")}),a.send()}else 404==this.status?registryUI.errorSnackbar("Manifest for "+t+":"+r+" not found"):registryUI.snackbar(this.responseText)}),e.open("HEAD",registryUI.url()+"/v2/"+t+"/manifests/"+r),e.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),e.send()}}); \ No newline at end of file +riot.tag2("catalog",'

Repositories of {registryUI.url()}

  • send {item}
',"","",function(t){registryUI.catalog.instance=this,registryUI.catalog.display=function(){registryUI.catalog.repositories=[];var t=new Http;t.addEventListener("load",function(){registryUI.catalog.repositories=[],200==this.status?(registryUI.catalog.repositories=JSON.parse(this.responseText).repositories||[],registryUI.catalog.repositories.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText)}),t.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.catalog.repositories=[]}),t.addEventListener("loadend",function(){registryUI.catalog.loadend=!0,registryUI.catalog.instance.update()}),t.open("GET",registryUI.url()+"/v2/_catalog"),t.send()},registryUI.catalog.go=function(t){route("taglist/"+t)},registryUI.catalog.display()}),riot.tag2("app",'
',"","",function(t){registryUI.appTag=this,route.base("#!"),route("",function(){route.routeName="home",registryUI.catalog.display&&(registryUI.catalog.loadend=!1,registryUI.catalog.display()),registryUI.appTag.update()}),route("/taglist/*",function(t){route.routeName="taglist",registryUI.taglist.name=t,registryUI.taglist.display&&(registryUI.taglist.loadend=!1,registryUI.taglist.display()),registryUI.appTag.update()}),registryUI.home=function(){"home"==route.routeName?registryUI.catalog.display():route("")},registryUI.snackbar=function(t,e){registryUI.appTag.tags["material-snackbar"].addToast({message:t,isError:e})},registryUI.errorSnackbar=function(t){return registryUI.snackbar(t,!0)},route.parser(null,function(t,e){const r=e.replace(/\?/g,"\\?").replace(/\*/g,"([^?#]+?)").replace(/\.\./,".*"),a=new RegExp("^"+r+"$"),s=t.match(a);if(s)return s.slice(1)}),route.start(!0)}),riot.tag2("taglist",'
arrow_back

Tags of {registryUI.url() + \'/\' + registryUI.taglist.name}

Repository Tag
{registryUI.taglist.name} {item}
',"","",function(t){registryUI.taglist.instance=this,registryUI.taglist.display=function(){if(registryUI.taglist.tags=[],"taglist"==route.routeName){var t=new Http;registryUI.taglist.instance.update(),t.addEventListener("load",function(){registryUI.taglist.tags=[],200==this.status?(registryUI.taglist.tags=JSON.parse(this.responseText).tags||[],registryUI.taglist.tags.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText,!0)}),t.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.taglist.tags=[]}),t.addEventListener("loadend",function(){registryUI.taglist.loadend=!0,registryUI.taglist.instance.update()}),t.open("GET",registryUI.url()+"/v2/"+registryUI.taglist.name+"/tags/list"),t.send(),registryUI.taglist.asc=!0}},registryUI.taglist.display(),registryUI.taglist.instance.update(),registryUI.taglist.reverse=function(){registryUI.taglist.asc?(registryUI.taglist.tags.reverse(),registryUI.taglist.asc=!1):(registryUI.taglist.tags.sort(),registryUI.taglist.asc=!0),registryUI.taglist.instance.update()},registryUI.taglist.refresh=function(){route(registryUI.taglist.name)}}),riot.tag2("remove-image",' delete ',"","",function(t){registryUI.removeImage=registryUI.removeImage||{},registryUI.removeImage.update=this.update,registryUI.removeImage.remove=function(t,e){var r=new Http;r.addEventListener("loadend",function(){if(registryUI.taglist.refresh(),200==this.status){if(!this.hasHeader("Docker-Content-Digest"))return void registryUI.errorSnackbar("You need to add Access-Control-Expose-Headers: ['Docker-Content-Digest'] in your server configuration.");var r=this.getResponseHeader("Docker-Content-Digest"),a=new Http;a.addEventListener("loadend",function(){200==this.status||202==this.status?(registryUI.taglist.refresh(),registryUI.snackbar("Deleting "+t+":"+e+" image. Run `registry garbage-collect config.yml` on your registry")):404==this.status?registryUI.errorSnackbar("Digest not found"):registryUI.snackbar(this.responseText)}),a.open("DELETE",registryUI.url()+"/v2/"+t+"/manifests/"+r),a.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),a.addEventListener("error",function(){registryUI.errorSnackbar("An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].")}),a.send()}else 404==this.status?registryUI.errorSnackbar("Manifest for "+t+":"+e+" not found"):registryUI.snackbar(this.responseText)}),r.open("HEAD",registryUI.url()+"/v2/"+t+"/manifests/"+e),r.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),r.send()}}); \ No newline at end of file diff --git a/dist/scripts/tags.js b/dist/scripts/tags.js index b1ec06b..9936e52 100644 --- a/dist/scripts/tags.js +++ b/dist/scripts/tags.js @@ -15,4 +15,4 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -riot.tag2("add",'
Add your Server ?
Write your URL without /v2
Add Cancel
',"","",function(e){registryUI.addTag=registryUI.addTag||{},this.one("mount",function(){registryUI.addTag.dialog=this.tags["material-popup"],registryUI.addTag.dialog.getAddServer=function(){return this.tags["material-input"]?this.tags["material-input"].value:""}}),registryUI.addTag.onkeyup=function(e){13==e.keyCode&®istryUI.addTag.add()},registryUI.addTag.show=function(){registryUI.addTag.dialog.open()},registryUI.addTag.add=function(){registryUI.addTag.dialog.getAddServer().length>0&®istryUI.addServer(registryUI.addTag.dialog.getAddServer()),rg.router.go("home"),registryUI.addTag.close()},registryUI.addTag.close=function(){registryUI.addTag.dialog.tags["material-input"].value="",registryUI.addTag.dialog.close()}}),riot.tag2("app",'
',"","",function(e){this.mixin("rg.router"),this.router.add({name:"home",url:""}),this.router.add({name:"taglist",url:"/taglist/:repository/:image"}),this.router.on("go",e=>{switch(e.name){case"taglist":registryUI.taglist.display&&(registryUI.taglist.loadend=!1,registryUI.taglist.display());break;case"home":registryUI.catalog.display&&(registryUI.catalog.loadend=!1,registryUI.catalog.display())}}),registryUI.appTag=this,registryUI.snackbar=function(e,r){registryUI.appTag.tags["material-snackbar"].addToast({message:e,isError:r})},registryUI.errorSnackbar=function(e){return registryUI.snackbar(e,!0)},this.router.start()}),riot.tag2("catalog",'

Repositories of {registryUI.url()}

  • send {item}
',"","",function(e){registryUI.catalog.instance=this,this.mixin("rg.router"),registryUI.catalog.display=function(){var e=new Http;e.addEventListener("load",function(){registryUI.catalog.repositories=[],200==this.status?(registryUI.catalog.repositories=JSON.parse(this.responseText).repositories||[],registryUI.catalog.repositories.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText)}),e.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.catalog.repositories=[]}),e.addEventListener("loadend",function(){registryUI.catalog.loadend=!0,registryUI.catalog.instance.update()}),e.open("GET",registryUI.url()+"/v2/_catalog"),e.send()},registryUI.catalog.go=function(e){rg.router.go("taglist",{repository:e.split("/")[0],image:e.split("/")[1]})},registryUI.catalog.display()}),riot.tag2("change",'
Change your Server ?
Change Cancel
',"","",function(e){registryUI.changeTag=registryUI.changeTag||{},this.one("mount",function(){registryUI.changeTag.dialog=this.tags["material-popup"],registryUI.changeTag.dialog.getServerUrl=function(){return this.refs["server-list"]?this.refs["server-list"].value:""},registryUI.changeTag.dialog.on("updated",function(){this.refs["server-list"]&&(this.refs["server-list"].value=registryUI.url())})}),registryUI.changeTag.show=function(){registryUI.changeTag.dialog.open()},registryUI.changeTag.change=function(){registryUI.changeTag.dialog.getServerUrl().length>0&®istryUI.changeServer(registryUI.changeTag.dialog.getServerUrl()),rg.router.go("home"),registryUI.changeTag.dialog.close()},registryUI.changeTag.close=function(){registryUI.changeTag.dialog.close()}}),riot.tag2("menu",' more_vert

Add URL

Change URL

Remove URL

',"","",function(e){registryUI.menuTag=registryUI.menuTag||{},registryUI.menuTag.update=this.update,this.one("mount",function(e){var r=this;registryUI.menuTag.close=function(){r.tags["material-dropdown"].close(),r.update()},registryUI.menuTag.isOpen=function(){return r.tags["material-dropdown"].opened},registryUI.menuTag.toggle=function(){r.tags["material-dropdown"].opened?r.tags["material-dropdown"].close():r.tags["material-dropdown"].open(),r.update()}})}),riot.tag2("remove-image",' delete ',"","",function(e){registryUI.removeImage=registryUI.removeImage||{},registryUI.removeImage.update=this.update,registryUI.removeImage.remove=function(e,r){var t=new Http;t.addEventListener("loadend",function(){if(registryUI.taglist.refresh(),200==this.status){if(!this.hasHeader("Docker-Content-Digest"))return void registryUI.errorSnackbar("You need to add Access-Control-Expose-Headers: ['Docker-Content-Digest'] in your server configuration.");var t=this.getResponseHeader("Docker-Content-Digest"),a=new Http;a.addEventListener("loadend",function(){200==this.status||202==this.status?(registryUI.taglist.refresh(),registryUI.snackbar("Deleting "+e+":"+r+" image. Run `registry garbage-collect config.yml` on your registry")):404==this.status?registryUI.errorSnackbar("Digest not found"):registryUI.snackbar(this.responseText)}),a.open("DELETE",registryUI.url()+"/v2/"+e+"/manifests/"+t),a.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),a.addEventListener("error",function(){registryUI.errorSnackbar("An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].")}),a.send()}else 404==this.status?registryUI.errorSnackbar("Manifest for "+e+":"+r+" not found"):registryUI.snackbar(this.responseText)}),t.open("HEAD",registryUI.url()+"/v2/"+e+"/manifests/"+r),t.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),t.send()}}),riot.tag2("remove",'
Remove your Registry Server ?
Close
',"","",function(e){registryUI.removeTag=registryUI.removeTag||{},registryUI.removeTag.update=this.update,registryUI.removeTag.removeUrl=function(e){registryUI.removeServer(e),registryUI.removeTag.close()},registryUI.removeTag.close=function(){registryUI.removeTag.dialog.close(),registryUI.removeTag.update()},registryUI.removeTag.show=function(){registryUI.removeTag.dialog.open()},this.one("mount",function(){registryUI.removeTag.dialog=this.tags["material-popup"]})}),riot.tag2("taglist",'
arrow_back

Tags of {registryUI.url() + \'/\' + registryUI.taglist.name}

Repository Tag
{registryUI.taglist.name} {item}
',"","",function(e){registryUI.taglist.instance=this,registryUI.taglist.display=function(){if(rg.router.current&&"taglist"==rg.router.current.name){name=rg.router.current.params.repository+(rg.router.current.params.image?"/"+rg.router.current.params.image:"");var e=new Http;registryUI.taglist.name=name,registryUI.taglist.instance.update(),e.addEventListener("load",function(){registryUI.taglist.tags=[],200==this.status?(registryUI.taglist.tags=JSON.parse(this.responseText).tags||[],registryUI.taglist.tags.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText,!0)}),e.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.taglist.tags=[]}),e.addEventListener("loadend",function(){registryUI.taglist.loadend=!0,registryUI.taglist.instance.update()}),e.open("GET",registryUI.url()+"/v2/"+name+"/tags/list"),e.send(),registryUI.taglist.asc=!0}},registryUI.taglist.display(),registryUI.taglist.instance.update(),registryUI.taglist.reverse=function(){registryUI.taglist.asc?(registryUI.taglist.tags.reverse(),registryUI.taglist.asc=!1):(registryUI.taglist.tags.sort(),registryUI.taglist.asc=!0),registryUI.taglist.instance.update()},registryUI.taglist.back=function(){rg.router.go("home")},registryUI.taglist.refresh=function(){rg.router.go(rg.router.current.name,rg.router.current.params)}}); \ No newline at end of file +riot.tag2("add",'
Add your Server ?
Write your URL without /v2
Add Cancel
',"","",function(e){registryUI.addTag=registryUI.addTag||{},this.one("mount",function(){registryUI.addTag.dialog=this.tags["material-popup"],registryUI.addTag.dialog.getAddServer=function(){return this.tags["material-input"]?this.tags["material-input"].value:""}}),registryUI.addTag.onkeyup=function(e){13==e.keyCode&®istryUI.addTag.add()},registryUI.addTag.show=function(){registryUI.addTag.dialog.open()},registryUI.addTag.add=function(){registryUI.addTag.dialog.getAddServer().length>0&®istryUI.addServer(registryUI.addTag.dialog.getAddServer()),registryUI.home(),registryUI.addTag.close()},registryUI.addTag.close=function(){registryUI.addTag.dialog.tags["material-input"].value="",registryUI.addTag.dialog.close()}}),riot.tag2("app",'
',"","",function(e){registryUI.appTag=this,route.base("#!"),route("",function(){route.routeName="home",registryUI.catalog.display&&(registryUI.catalog.loadend=!1,registryUI.catalog.display()),registryUI.appTag.update()}),route("/taglist/*",function(e){route.routeName="taglist",registryUI.taglist.name=e,registryUI.taglist.display&&(registryUI.taglist.loadend=!1,registryUI.taglist.display()),registryUI.appTag.update()}),registryUI.home=function(){"home"==route.routeName?registryUI.catalog.display():route("")},registryUI.snackbar=function(e,t){registryUI.appTag.tags["material-snackbar"].addToast({message:e,isError:t})},registryUI.errorSnackbar=function(e){return registryUI.snackbar(e,!0)},route.parser(null,function(e,t){const r=t.replace(/\?/g,"\\?").replace(/\*/g,"([^?#]+?)").replace(/\.\./,".*"),a=new RegExp("^"+r+"$"),i=e.match(a);if(i)return i.slice(1)}),route.start(!0)}),riot.tag2("catalog",'

Repositories of {registryUI.url()}

  • send {item}
',"","",function(e){registryUI.catalog.instance=this,registryUI.catalog.display=function(){registryUI.catalog.repositories=[];var e=new Http;e.addEventListener("load",function(){registryUI.catalog.repositories=[],200==this.status?(registryUI.catalog.repositories=JSON.parse(this.responseText).repositories||[],registryUI.catalog.repositories.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText)}),e.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.catalog.repositories=[]}),e.addEventListener("loadend",function(){registryUI.catalog.loadend=!0,registryUI.catalog.instance.update()}),e.open("GET",registryUI.url()+"/v2/_catalog"),e.send()},registryUI.catalog.go=function(e){route("taglist/"+e)},registryUI.catalog.display()}),riot.tag2("change",'
Change your Server ?
Change Cancel
',"","",function(e){registryUI.changeTag=registryUI.changeTag||{},this.one("mount",function(){registryUI.changeTag.dialog=this.tags["material-popup"],registryUI.changeTag.dialog.getServerUrl=function(){return this.refs["server-list"]?this.refs["server-list"].value:""},registryUI.changeTag.dialog.on("updated",function(){this.refs["server-list"]&&(this.refs["server-list"].value=registryUI.url())})}),registryUI.changeTag.show=function(){registryUI.changeTag.dialog.open()},registryUI.changeTag.change=function(){registryUI.changeTag.dialog.getServerUrl().length>0&®istryUI.changeServer(registryUI.changeTag.dialog.getServerUrl()),registryUI.home(),registryUI.changeTag.dialog.close()},registryUI.changeTag.close=function(){registryUI.changeTag.dialog.close()}}),riot.tag2("menu",' more_vert

Add URL

Change URL

Remove URL

',"","",function(e){registryUI.menuTag=registryUI.menuTag||{},registryUI.menuTag.update=this.update,this.one("mount",function(e){var t=this;registryUI.menuTag.close=function(){t.tags["material-dropdown"].close(),t.update()},registryUI.menuTag.isOpen=function(){return t.tags["material-dropdown"].opened},registryUI.menuTag.toggle=function(){t.tags["material-dropdown"].opened?t.tags["material-dropdown"].close():t.tags["material-dropdown"].open(),t.update()}})}),riot.tag2("remove-image",' delete ',"","",function(e){registryUI.removeImage=registryUI.removeImage||{},registryUI.removeImage.update=this.update,registryUI.removeImage.remove=function(e,t){var r=new Http;r.addEventListener("loadend",function(){if(registryUI.taglist.refresh(),200==this.status){if(!this.hasHeader("Docker-Content-Digest"))return void registryUI.errorSnackbar("You need to add Access-Control-Expose-Headers: ['Docker-Content-Digest'] in your server configuration.");var r=this.getResponseHeader("Docker-Content-Digest"),a=new Http;a.addEventListener("loadend",function(){200==this.status||202==this.status?(registryUI.taglist.refresh(),registryUI.snackbar("Deleting "+e+":"+t+" image. Run `registry garbage-collect config.yml` on your registry")):404==this.status?registryUI.errorSnackbar("Digest not found"):registryUI.snackbar(this.responseText)}),a.open("DELETE",registryUI.url()+"/v2/"+e+"/manifests/"+r),a.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),a.addEventListener("error",function(){registryUI.errorSnackbar("An error occurred when deleting image. Check if your server accept DELETE methods Access-Control-Allow-Methods: ['DELETE'].")}),a.send()}else 404==this.status?registryUI.errorSnackbar("Manifest for "+e+":"+t+" not found"):registryUI.snackbar(this.responseText)}),r.open("HEAD",registryUI.url()+"/v2/"+e+"/manifests/"+t),r.setRequestHeader("Accept","application/vnd.docker.distribution.manifest.v2+json"),r.send()}}),riot.tag2("remove",'
Remove your Registry Server ?
Close
',"","",function(e){registryUI.removeTag=registryUI.removeTag||{},registryUI.removeTag.update=this.update,registryUI.removeTag.removeUrl=function(e){registryUI.removeServer(e),registryUI.removeTag.close()},registryUI.removeTag.close=function(){registryUI.removeTag.dialog.close(),registryUI.removeTag.update()},registryUI.removeTag.show=function(){registryUI.removeTag.dialog.open()},this.one("mount",function(){registryUI.removeTag.dialog=this.tags["material-popup"]})}),riot.tag2("taglist",'
arrow_back

Tags of {registryUI.url() + \'/\' + registryUI.taglist.name}

Repository Tag
{registryUI.taglist.name} {item}
',"","",function(e){registryUI.taglist.instance=this,registryUI.taglist.display=function(){if(registryUI.taglist.tags=[],"taglist"==route.routeName){var e=new Http;registryUI.taglist.instance.update(),e.addEventListener("load",function(){registryUI.taglist.tags=[],200==this.status?(registryUI.taglist.tags=JSON.parse(this.responseText).tags||[],registryUI.taglist.tags.sort()):404==this.status?registryUI.snackbar("Server not found",!0):registryUI.snackbar(this.responseText,!0)}),e.addEventListener("error",function(){registryUI.snackbar("An error occured",!0),registryUI.taglist.tags=[]}),e.addEventListener("loadend",function(){registryUI.taglist.loadend=!0,registryUI.taglist.instance.update()}),e.open("GET",registryUI.url()+"/v2/"+registryUI.taglist.name+"/tags/list"),e.send(),registryUI.taglist.asc=!0}},registryUI.taglist.display(),registryUI.taglist.instance.update(),registryUI.taglist.reverse=function(){registryUI.taglist.asc?(registryUI.taglist.tags.reverse(),registryUI.taglist.asc=!1):(registryUI.taglist.tags.sort(),registryUI.taglist.asc=!0),registryUI.taglist.instance.update()},registryUI.taglist.refresh=function(){route(registryUI.taglist.name)}}); \ No newline at end of file diff --git a/dist/scripts/vendor.js b/dist/scripts/vendor.js index bfa522b..86d1d24 100644 --- a/dist/scripts/vendor.js +++ b/dist/scripts/vendor.js @@ -1,5 +1,5 @@ -/* Riot v3.7.3, @license MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.riot={})}(this,function(e){"use strict";function t(e,t){for(var n=e?e.length:0,r=0;rr;)n--,V.apply(t[n],[t,n])}function V(e,t){e.splice(t,1),this.unmount(),he(this.parent,this,this.__.tagName,!0)}function U(e){var n=this;t(Object.keys(this.tags),function(t){ue.apply(n.tags[t],[t,e])})}function B(e,t,n){n?ye.apply(this,[e,t]):T(e,this.root,t.root)}function z(e,t,n){n?ve.apply(this,[e,t]):T(e,this.root,t.root)}function F(e,t){t?ve.call(this,e):e.appendChild(this.root)}function D(e,t,n,r){return e?r?ut(e,n):t[e]:t}function K(e,r,i){var o,s=typeof E(e,ke)!==Pe||O(e,ke),u=E(e,Ie),l=!!u&&ut.hasExpr(u),c=pe(e),p=Ne[c],d=e.parentNode,g=_(),m=se(e),v=E(e,Ae),x=[],b=e.innerHTML,w=!Ne[c],N="VIRTUAL"===e.tagName,C=[];return O(e,Le),O(e,Ie),i=ut.loopKeys(i),i.isLoop=!0,v&&O(e,Ae),d.insertBefore(g,e),d.removeChild(e),i.update=function(){i.value=ut(i.val,r);var d=i.value,_=y(),O=!h(d)&&!f(d),E=g.parentNode,j=[];E&&(O?d=(o=d||!1)?Object.keys(d).map(function(e){return $(i,d[e],e)}):[]:o=!1,v&&(d=d.filter(function(e,t){return i.key&&!O?!!ut(v,$(i,e,t,r)):!!ut(v,a(Object.create(r),e))})),t(d,function(t,a){var f=!o&&i.key?$(i,t,a):t,h=D(u,t,f,l),g=s&&typeof t===$e&&!o,v=C.indexOf(h),y=-1===v,O=!y&&g?v:a,T=x[O],A=a>=C.length,L=g&&y||!g&&!T;L?((T=ae(p,{parent:r,isLoop:!0,isAnonymous:w,tagName:c,root:e.cloneNode(w),item:f,index:a},b)).mount(),A?F.apply(T,[_||E,N]):z.apply(T,[E,x[a],N]),A||C.splice(a,0,f),x.splice(a,0,T),m&&de(r.tags,c,T,!0)):O!==a&&g&&((u||n(d,C[O]))&&(B.apply(T,[E,x[a],N]),x.splice(a,0,x.splice(O,1)[0]),C.splice(a,0,C.splice(O,1)[0])),i.pos&&(T[i.pos]=a),!m&&T.tags&&U.call(T,a)),T.__.item=f,T.__.index=a,T.__.parent=r,j[a]=h,L||T.update(f)}),H(d,x),C=j.slice(),E.insertBefore(_,g))},i.unmount=function(){t(x,function(e){e.unmount()})},i}function q(e,t,n){var r=this;L(e,function(t,i){var o,a,s,u=t.nodeType,l=i.parent;if(!n&&t===e)return{parent:l};if(3===u&&"STYLE"!==t.parentNode.tagName&&ut.hasExpr(t.nodeValue)&&l.children.push({dom:t,expr:t.nodeValue}),1!==u)return i;var c="VIRTUAL"===t.tagName;if(o=E(t,Le))return c&&j(t,"loopVirtual",!0),l.children.push(K(t,r,o)),!1;if(o=E(t,Ae))return l.children.push(Object.create(ft).init(t,r,o)),!1;if((a=E(t,Te))&&ut.hasExpr(a))return l.children.push({isRtag:!0,expr:a,dom:t,attrs:[].slice.call(t.attributes)}),!1;if(s=se(t),c&&(E(t,"virtualized")&&t.parentElement.removeChild(t),s||E(t,"virtualized")||E(t,"loopVirtual")||(s={tmpl:t.outerHTML})),s&&(t!==e||n)){if(!c||E(t,Te))return l.children.push(le(s,{root:t,parent:r},t.innerHTML,r)),!1;j(t,"virtualized",!0);var f=ae({tmpl:t.outerHTML},{root:t,parent:r},t.innerHTML);l.children.push(f)}return W.apply(r,[t,t.attributes,function(e,t){t&&l.children.push(t)}]),{parent:l}},{parent:{children:t}})}function W(e,r,i){var o=this;t(r,function(t){if(!t)return!1;var r,a=t.name,u=s(a);n(je,a)&&e.tagName.toLowerCase()!==Oe?r=Object.create(pt).init(e,o,a,t.value):ut.hasExpr(t.value)&&(r={dom:e,expr:t.value,attr:a,bool:u}),i(t,r)})}function Z(e,t,n){var r="o"===n[0],i=r?"select>":"table>";if(e.innerHTML="<"+i+t.trim()+"=0&&/\s/.test(e[t]););return t}var t="[{(,;:?=|&!^~>%*/",n=["case","default","do","else","in","instanceof","prefix","return","typeof","void","yield"],r=n.reduce(function(e,t){return e+t.slice(-1)},""),i=/^\/(?=[^*>/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,o=/[$\w]/;return function(a,s){var u=/.*/g,l=u.lastIndex=s++,c=u.exec(a)[0].match(i);if(c){var f=l+c[0].length,p=a[l=e(a,l)];if(l<0||~t.indexOf(p))return f;if("."===p)"."===a[l-1]&&(s=f);else if("+"===p||"-"===p)(a[--l]!==p||(l=e(a,l))<0||!o.test(a[l]))&&(s=f);else if(~r.indexOf(p)){for(var d=l+1;--l>=0&&o.test(a[l]););~n.indexOf(a.slice(l+1,d))&&(s=f)}}return s}}(),st=function(e){function t(e){return e}function n(e,t){return t||(t=_),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?u:"")}function r(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||p.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(d,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=n(e.length>3?/\\({|})/g:v[5],t),t[6]=n(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+h,u),t[8]=e,t}function i(e){return e instanceof RegExp?a(e):_[e]}function o(e){(e||(e=m))!==_[8]&&(_=r(e),a=e===m?t:n,_[9]=a(v[9])),y=e}var a,s,u="g",l=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,c=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,f=c.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?([^<]\/)[gim]*/.source,p=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,h=c.source+"|"+/(\/)(?![*\/])/.source,g={"(":RegExp("([()])|"+h,u),"[":RegExp("([[\\]])|"+h,u),"{":RegExp("([{}])|"+h,u)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+h,u),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],y=void 0,_=[];return i.split=function(e,t,n){function r(e){h&&(e=h+e,h=""),t||a?f.push(e&&e.replace(n[5],"$1")):f.push(e)}function i(n,r,i){return i&&(r=at(e,n)),t&&r>n+2&&(l="⁗"+d.length+"~",d.push(e.slice(n,r)),h+=e.slice(s,n)+l,s=r),r}n||(n=_);var o,a,s,u,l,c,f=[],p=n[6],d=[],h="";for(a=s=p.lastIndex=0;o=p.exec(e);){if(c=p.lastIndex,u=o.index,a){if(o[2]){var m=o[2],v=g[m],y=1;for(v.lastIndex=c;o=v.exec(e);)if(o[1]){if(o[1]===m)++y;else if(!--y)break}else v.lastIndex=i(o.index,v.lastIndex,o[2]);p.lastIndex=y?e.length:v.lastIndex;continue}if(!o[3]){p.lastIndex=i(u,c,o[4]);continue}}o[1]||(r(e.slice(s,u)),s=p.lastIndex,(p=n[6+(a^=1)]).lastIndex=s)}return e&&s %s",t.riotData.tagName||"Unknown tag",this.tmpl),console.log(this.data))}function n(e){var t=r(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function r(e){var t,n=st.split(e.replace(s,'"'),1),r=n.qblocks;if(n.length>2||n[0]){var o,a,l=[];for(o=a=0;o1?"["+i.join(",")+'].join(" ").trim()':i[0]:o(e,t)}return e}function o(e,t,n){var r;return e=e.replace(p,function(e,t,n,i,o){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+f+n,i&&(r="."===(o=o[i])||"("===o||"["===o)):i&&(r=!d.test(o.slice(i)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var a={};e.hasExpr=st.hasExpr,e.loopKeys=st.loopKeys,e.clearCache=function(){a={}},e.errorHandler=null;var s=/\u2057/g,u=/\u2057(\d+)~/g,l=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,c={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},f='"in this?this:'+("object"!=typeof window?"global":"window")+").",p=/[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,d=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=st.version="v3.0.8",e}(),lt=function(e){e=e||{};var t={},n=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(n,r){return"function"==typeof r&&(t[n]=t[n]||[]).push(r),e},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,o=t[n],a=0;i=o&&o[a];++a)i==r&&o.splice(a--,1);else delete t[n];else t={};return e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,o,a,s=arguments,u=arguments.length-1,l=new Array(u);for(a=0;a|>([\S\s]*?)<\/yield\s*>|>)/gi,gt=/]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,mt=/|>([\S\s]*?)<\/yield\s*>)/gi,vt={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},yt=Qe&&Qe<10?De:Ke,_t="div",xt="svg",bt={},wt=bt[Ce]={},Nt=0,Ot=Object.freeze({Tag:J,tag:X,tag2:Y,mount:ee,mixin:te,update:ne,unregister:re,version:"v3.7.3"}),Ct=Object.freeze({getTag:se,moveChildTag:ue,initChildTag:le,getImmediateCustomParentTag:ce,unmountAll:fe,getTagName:pe,arrayishAdd:de,arrayishRemove:he,mountTo:ge,makeReplaceVirtual:me,makeVirtual:ve,moveVirtual:ye,selectTags:_e}),Et=ct,jt={tmpl:ut,brackets:st,styleManager:ot,vdom:we,styleNode:ot.styleNode,dom:tt,check:et,misc:Ye,tags:Ct},Tt=J,At=X,Lt=Y,kt=ee,Mt=te,St=ne,It=re,Rt=lt,Pt=a({},Ot,{observable:lt,settings:Et,util:jt});e.settings=Et,e.util=jt,e.Tag=Tt,e.tag=At,e.tag2=Lt,e.mount=kt,e.mixin=Mt,e.update=St,e.unregister=It,e.version="v3.7.3",e.observable=Rt,e.default=Pt,Object.defineProperty(e,"__esModule",{value:!0})}); +/* Riot v3.7.4, @license MIT */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.riot={})}(this,function(e){"use strict";function t(e,t){return[].slice.call((t||document).querySelectorAll(e))}function n(e,t){return(t||document).querySelector(e)}function r(){return document.createDocumentFragment()}function i(){return document.createTextNode("")}function o(e){var t=e.ownerSVGElement;return!!t||null===t}function a(e){return"svg"===e?document.createElementNS(ze,e):document.createElement(e)}function s(e,t,n){if(n){var r=e.ownerDocument.importNode((new DOMParser).parseFromString(''+t+"","application/xml").documentElement,!0);e.appendChild(r)}else e.innerHTML=t}function u(e,t){e.style.display=t?"":"none",e.hidden=!t}function l(e,t){e.removeAttribute(t)}function c(e){return Object.keys(e).reduce(function(t,n){return t+" "+n+": "+e[n]+";"},"")}function f(e,t){return e.getAttribute(t)}function p(e,t,n){var r=Fe.exec(t);r&&r[1]?e.setAttributeNS(Be,r[1],n):e.setAttribute(t,n)}function d(e,t,n){e.insertBefore(t,n.parentNode&&n)}function h(e,t){if(e)for(var n;n=Ze.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function g(e,t,n){if(e){var r,i=t(e,n);if(!1===i)return;for(e=e.firstChild;e;)r=e.nextSibling,g(e,t,i),e=r}}function m(e){return Qe.test(e)}function v(e){return typeof e===Ue}function y(e){return e&&typeof e===He}function _(e){return typeof e===Ve}function x(e){return typeof e===$e}function b(e){return w(e)||""===e}function w(e){return _(e)||null===e}function N(e){return Array.isArray(e)||e instanceof Array}function O(e,t){var n=lt(e,t);return _(e[t])||n&&n.writable}function C(e,t){for(var n=e?e.length:0,r=0;rr;)n--,V.apply(t[n],[t,n])}function V(e,t){e.splice(t,1),this.unmount(),he(this.parent,this,this.__.tagName,!0)}function U(e){var t=this;C(Object.keys(this.tags),function(n){ue.apply(t.tags[n],[n,e])})}function B(e,t,n){n?_e.apply(this,[e,t]):d(e,this.root,t.root)}function z(e,t,n){n?ve.apply(this,[e,t]):d(e,this.root,t.root)}function F(e,t){t?ve.call(this,e):e.appendChild(this.root)}function D(e,t,n,r){return e?r?ot(e,n):t[e]:t}function K(e,t,n){var o,a=typeof f(e,Me)!==$e||l(e,Me),s=f(e,Pe),u=!!s&&ot.hasExpr(s),c=pe(e),p=Oe[c],d=e.parentNode,h=i(),g=se(e),m=f(e,Le),v=[],y=e.innerHTML,_=!Oe[c],b="VIRTUAL"===e.tagName,w=[];return l(e,ke),l(e,Pe),n=ot.loopKeys(n),n.isLoop=!0,m&&l(e,Le),d.insertBefore(h,e),d.removeChild(e),n.update=function(){n.value=ot(n.val,t);var i=n.value,l=r(),f=!N(i)&&!x(i),d=h.parentNode,O=[];d&&(f?i=(o=i||!1)?Object.keys(i).map(function(e){return $(n,i[e],e)}):[]:o=!1,m&&(i=i.filter(function(e,r){return n.key&&!f?!!ot(m,$(n,e,r,t)):!!ot(m,L(Object.create(t),e))})),C(i,function(r,f){var h=!o&&n.key?$(n,r,f):r,m=D(s,r,h,u),x=a&&typeof r===He&&!o,N=w.indexOf(m),C=-1===N,j=!C&&x?N:f,T=v[j],A=f>=w.length,L=x&&C||!x&&!T;L?((T=ae(p,{parent:t,isLoop:!0,isAnonymous:_,tagName:c,root:e.cloneNode(_),item:h,index:f},y)).mount(),A?F.apply(T,[l||d,b]):z.apply(T,[d,v[f],b]),A||w.splice(f,0,h),v.splice(f,0,T),g&&de(t.tags,c,T,!0)):j!==f&&x&&((s||E(i,w[j]))&&(B.apply(T,[d,v[f],b]),v.splice(f,0,v.splice(j,1)[0]),w.splice(f,0,w.splice(j,1)[0])),n.pos&&(T[n.pos]=f),!g&&T.tags&&U.call(T,f)),T.__.item=h,T.__.index=f,T.__.parent=t,O[f]=m,L||T.update(h)}),H(i,v),w=O.slice(),d.insertBefore(l,h))},n.unmount=function(){C(v,function(e){e.unmount()})},n}function q(e,t){var n=this,r=[];return g(e,function(i){var o,a,s=i.nodeType;if((t||i!==e)&&(3===s&&"STYLE"!==i.parentNode.tagName&&ot.hasExpr(i.nodeValue)&&r.push({dom:i,expr:i.nodeValue}),1===s)){var u="VIRTUAL"===i.tagName;if(o=f(i,ke))return u&&p(i,"loopVirtual",!0),r.push(K(i,n,o)),!1;if(o=f(i,Le))return r.push(Object.create(pt).init(i,n,o)),!1;if((o=f(i,Ae))&&ot.hasExpr(o))return r.push({isRtag:!0,expr:o,dom:i,attrs:[].slice.call(i.attributes)}),!1;if(a=se(i),u&&(f(i,"virtualized")&&i.parentElement.removeChild(i),a||f(i,"virtualized")||f(i,"loopVirtual")||(a={tmpl:i.outerHTML})),a&&(i!==e||t)){if(!u||f(i,Ae))return r.push(le(a,{root:i,parent:n},i.innerHTML,n)),!1;p(i,"virtualized",!0);var l=ae({tmpl:i.outerHTML},{root:i,parent:n},i.innerHTML);r.push(l)}W.apply(n,[i,i.attributes,function(e,t){t&&r.push(t)}])}}),r}function W(e,t,n){var r=this;C(t,function(t){if(!t)return!1;var i,o=t.name,a=m(o);E(Te,o)&&e.tagName.toLowerCase()!==Ce?i=Object.create(dt).init(e,r,o,t.value):ot.hasExpr(t.value)&&(i={dom:e,expr:t.value,attr:o,bool:a}),n(t,i)})}function Z(e,t,r){var i="o"===r[0],o=i?"select>":"table>";if(e.innerHTML="<"+o+t.trim()+"=0&&/\s/.test(e[t]););return t}var t="[{(,;:?=|&!^~>%*/",n=["case","default","do","else","in","instanceof","prefix","return","typeof","void","yield"],r=n.reduce(function(e,t){return e+t.slice(-1)},""),i=/^\/(?=[^*>/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,o=/[$\w]/;return function(a,s){var u=/.*/g,l=u.lastIndex=s++,c=u.exec(a)[0].match(i);if(c){var f=l+c[0].length,p=a[l=e(a,l)];if(l<0||~t.indexOf(p))return f;if("."===p)"."===a[l-1]&&(s=f);else if("+"===p||"-"===p)(a[--l]!==p||(l=e(a,l))<0||!o.test(a[l]))&&(s=f);else if(~r.indexOf(p)){for(var d=l+1;--l>=0&&o.test(a[l]););~n.indexOf(a.slice(l+1,d))&&(s=f)}}return s}}(),it=function(e){function t(e){return e}function n(e,t){return t||(t=_),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?u:"")}function r(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||p.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(d,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=n(e.length>3?/\\({|})/g:v[5],t),t[6]=n(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+h,u),t[8]=e,t}function i(e){return e instanceof RegExp?a(e):_[e]}function o(e){(e||(e=m))!==_[8]&&(_=r(e),a=e===m?t:n,_[9]=a(v[9])),y=e}var a,s,u="g",l=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,c=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,f=c.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?([^<]\/)[gim]*/.source,p=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,h=c.source+"|"+/(\/)(?![*\/])/.source,g={"(":RegExp("([()])|"+h,u),"[":RegExp("([[\\]])|"+h,u),"{":RegExp("([{}])|"+h,u)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+h,u),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],y=void 0,_=[];return i.split=function(e,t,n){function r(e){h&&(e=h+e,h=""),t||a?f.push(e&&e.replace(n[5],"$1")):f.push(e)}function i(n,r,i){return i&&(r=rt(e,n)),t&&r>n+2&&(l="⁗"+d.length+"~",d.push(e.slice(n,r)),h+=e.slice(s,n)+l,s=r),r}n||(n=_);var o,a,s,u,l,c,f=[],p=n[6],d=[],h="";for(a=s=p.lastIndex=0;o=p.exec(e);){if(c=p.lastIndex,u=o.index,a){if(o[2]){var m=o[2],v=g[m],y=1;for(v.lastIndex=c;o=v.exec(e);)if(o[1]){if(o[1]===m)++y;else if(!--y)break}else v.lastIndex=i(o.index,v.lastIndex,o[2]);p.lastIndex=y?e.length:v.lastIndex;continue}if(!o[3]){p.lastIndex=i(u,c,o[4]);continue}}o[1]||(r(e.slice(s,u)),s=p.lastIndex,(p=n[6+(a^=1)]).lastIndex=s)}return e&&s %s",t.riotData.tagName||"Unknown tag",this.tmpl),console.log(this.data))}function n(e){var t=r(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function r(e){var t,n=it.split(e.replace(s,'"'),1),r=n.qblocks;if(n.length>2||n[0]){var o,a,l=[];for(o=a=0;o1?"["+i.join(",")+'].join(" ").trim()':i[0]:o(e,t)}return e}function o(e,t,n){var r;return e=e.replace(p,function(e,t,n,i,o){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+f+n,i&&(r="."===(o=o[i])||"("===o||"["===o)):i&&(r=!d.test(o.slice(i)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var a={};e.hasExpr=it.hasExpr,e.loopKeys=it.loopKeys,e.clearCache=function(){a={}},e.errorHandler=null;var s=/\u2057/g,u=/\u2057(\d+)~/g,l=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,c={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},f='"in this?this:'+("object"!=typeof window?"global":"window")+").",p=/[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,d=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=it.version="v3.0.8",e}(),at=function(e){e=e||{};var t={},n=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(n,r){return"function"==typeof r&&(t[n]=t[n]||[]).push(r),e},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,o=t[n],a=0;i=o&&o[a];++a)i==r&&o.splice(a--,1);else delete t[n];else t={};return e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,o,a,s=arguments,u=arguments.length-1,l=new Array(u);for(a=0;a|>([\S\s]*?)<\/yield\s*>|>)/gi,mt=/]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,vt=/|>([\S\s]*?)<\/yield\s*>)/gi,yt={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},_t=Je&&Je<10?Ke:qe,xt="div",bt="svg",wt={},Nt=wt[Ee]={},Ot=0,Ct=Object.freeze({Tag:J,tag:X,tag2:Y,mount:ee,mixin:te,update:ne,unregister:re,version:"v3.7.4"}),Et=Object.freeze({getTag:se,moveChildTag:ue,initChildTag:le,getImmediateCustomParentTag:ce,unmountAll:fe,getTagName:pe,arrayishAdd:de,arrayishRemove:he,mountTo:ge,makeReplaceVirtual:me,makeVirtual:ve,inheritParentProps:ye,moveVirtual:_e,selectTags:xe}),jt=ft,Tt={tmpl:ot,brackets:it,styleManager:nt,vdom:Ne,styleNode:nt.styleNode,dom:Xe,check:st,misc:ct,tags:Et},At=J,Lt=X,kt=Y,Mt=ee,St=te,It=ne,Pt=re,Rt=at,$t=L({},Ct,{observable:at,settings:jt,util:Tt});e.settings=jt,e.util=Tt,e.Tag=At,e.tag=Lt,e.tag2=kt,e.mount=Mt,e.mixin=St,e.update=It,e.unregister=Pt,e.version="v3.7.4",e.observable=Rt,e.default=$t,Object.defineProperty(e,"__esModule",{value:!0})}); -"use strict";var _extends=Object.assign||function(r){for(var t=1;t>>0,i=arguments[1],a=0;n>a;a++)if(t=e[a],r.call(i,t,a,e))return t;return void 0});var r=[];var t={hash:"#!",add:function u(n){if(!n||!n.name){throw"Please specify a state name";return}var i=e(n);if(i)i=n;else{if(n.url&&n.url[0]=="/")n.url=n.url.substr(1);r.push(n)}t.trigger("add",i);return this},remove:function f(e){var n=undefined;r=r.filter(function(r){if(r.name!=e)return r;else n=r});t.trigger("remove",n);return this},go:function s(r,n,i){if(!t.active||!r)return;var o=e(r);if(!o){throw"State '"+r+"' has not been configured";return}if(n)o.params=n;var u=r.split(".");u=u.map(function(r,t){if(t>0){return u.slice(0,t).join(".")+"."+r}else{return r}});u.forEach(function(r,t){if(t
',"","",function(t){var e=this;this.dynamicAttributes=["disabled"],this.disabled=t.disabled||!1,this.launch=function(t){e.disabled||e.refs["material-waves"].trigger("launch",t)},this.on("mount",function(){e.refs["material-waves"].on("wavestart",function(t){e.trigger("wavestart",t)}),e.refs["material-waves"].on("waveend",function(){e.trigger("waveend")})}),this.click=function(){t.link&&(window.location.href=t.link),e.trigger("click")},this.mixin("dynamicAttributes")})},function(t,e,i){"use strict";riot.tag2("material-card",'
',"","",function(t){var e=this;this.titleExist=!1,this.on("mount",function(){e.update({titleExist:!!e.root.querySelector(".material-card-title")})}),this.mixin("content")})},function(t,e,i){"use strict";riot.tag2("material-checkbox",'
',"","",function(t){var e=this;this.checked=t.checked||!1,this.disabled=t.disabled||!1,this.toggle=function(){if(e.disabled)return!1;e.update({checked:!e.checked}),e.trigger("toggle",e.checked)}})},function(module,exports,__webpack_require__){"use strict";riot.tag2("material-combo",' ',"","",function(opts){var _this=this;this.items=[],this.title=null;var lastValue=this.value,valueChanged=function(){_this.value!==lastValue&&(lastValue=_this.value,_this.root.dispatchEvent(new CustomEvent("change",{value:_this.value})))};if(this.getOptions=function(){Array.prototype.forEach.call(_this.refs.options.children,function(t,e){if("option"==t.tagName.toLowerCase()){var i={title:t.innerHTML,value:t.getAttribute("value")};_this.items.push(i),null!=t.getAttribute("isSelected")&&(_this.refs.dropdown.update({selected:e}),_this.update({value:i.value||i.title}),valueChanged(),_this.title=i.title)}}),_this.refs.dropdown.update({items:_this.items}),_this.refs.dropdown.selected&&_this.update({hValue:_this.refs.dropdown.items[_this.refs.dropdown.selected].value||_this.refs.dropdown.items[_this.refs.dropdown.selected].title}),_this.update({isParsed:!0}),valueChanged()},opts.items)try{this.items=eval(opts.items)||[],this.items.length&&this.refs.dropdown.update({items:this.items})}catch(t){console.error("Something wrong with your items. For details look at it - "+t)}this.on("mount",function(){_this.getOptions(),_this.refs.dropdown.on("selectChanged",function(t){_this.update({value:_this.refs.dropdown.items[t].value||_this.refs.dropdown.items[t].title}),valueChanged(),_this.refs.input.update({value:_this.refs.dropdown.items[t].title}),setTimeout(function(){_this.refs.dropdown.update({items:_this.items})},200)}),_this.refs.input.on("valueChanged",function(t){_this.refs.dropdown.update({items:_this.filter("items",{title:t})})}),_this.refs.input.on("focusChanged",function(t){_this.refs.input.value==(opts.defaulttext||"Choose item")&&t&&_this.refs.input.update({value:""}),""!=_this.refs.input.value||t||_this.refs.input.update({value:opts.defaulttext||"Choose item"}),t&&_this.refs.dropdown.open()}),_this.refs.dropdown.root.style.top=_this.refs.input.root.getBoundingClientRect().height+"px",_this.refs.input.update({value:_this.title||opts.defaulttext||"Choose item"})}),this.mixin("collection")})},function(module,exports,__webpack_require__){"use strict";riot.tag2("material-dropdown-list",'
',"","",function(opts){var _this=this;if(this.opened=!1,opts.items){try{this.items=eval(opts.items)||[]}catch(t){console.error("Something wrong with your items. For details look at it - "+t)}this.update({items:this.items})}opts.selected&&this.update({selected:opts.selected}),this.select=function(t){return _this.update({selected:t.item.key}),_this.close(),_this.trigger("selectChanged",t.item.key,t.item.item),!0},this.open=function(){_this.update({opened:!0,opening:!0}),_this.opts.extraclose&&document.body.appendChild(_this.refs.overlay),setTimeout(function(){_this.update({opening:!1})},0)},this.close=function(){_this.update({opening:!0}),setTimeout(function(){_this.update({opened:!1})},200)}})},function(t,e,i){"use strict";riot.tag2("material-dropdown",'
',"","",function(t){var e=this;this.opened=t.opened||!1,this.open=function(){e.update({opened:!0,opening:!0}),setTimeout(function(){e.update({opening:!1})},0)},this.close=function(){e.update({opening:!0}),setTimeout(function(){e.update({opened:!1})},200)}})},function(t,e,i){"use strict";riot.tag2("material-footer",' ',"","",function(t){this.mixin("content")})},function(t,e,i){"use strict";riot.tag2("material-input",'
',"","",function(t){var e=this;if(this.opts=t,this.required="",this.name=t.ref||"input",this.notSupportedTypes=["date","color","datetime","month","range","time"],-1!=this.notSupportedTypes.indexOf(t.type))throw new Error("Sorry but we do not support "+t.type+" type yet!");this.update({showIcon:!1}),this.on("mount",function(){e.update({value:t.value||"",disabled:t.disabled||!1,required:t.required||!1}),e.n=t.ref||"default-input",e.refs[e.n].addEventListener("focus",e.changeFocus),e.refs[e.n].addEventListener("blur",e.changeFocus)}),this.changeFocus=function(i){if(e.disabled)return!1;e.update({focused:e.refs[e.n]==document.activeElement}),e.trigger("focusChanged",e.focused,i),t.focuschanged&&"function"==typeof t.focuschanged&&t.focuschanged(e.focused)},this.changeValue=function(i){e.update({value:e.refs[e.n].value}),e.trigger("valueChanged",e.refs[e.n].value,i),t.valuechanged&&"function"==typeof t.valuechanged&&t.valuechanged(e.refs[e.n].value)},this.iconClickHandler=function(t){e.opts.iconclicked&&"function"==typeof e.opts.iconclicked&&e.opts.iconclicked.call(e,t),e.trigger("iconclicked",t)},this.on("update",function(t){t&&void 0!=t.value&&e.validationType&&e.isValid(e.validate(t.value))}),this.isValid=function(t){e.update({error:!t})},this.mixin("validate")})},function(t,e,i){"use strict";riot.tag2("material-navbar",'',"",'role="toolbar"',function(t){})},function(t,e,i){"use strict";riot.tag2("material-pane",'
',"","",function(t){this.mixin("content")})},function(t,e,i){"use strict";riot.tag2("material-popup",'
',"","",function(t){var e=this;this.opened=t.opened||!1,this.on("mount",function(){document.body.appendChild(e.root)}),this.open=function(){e.update({opened:!0,opening:!0}),setTimeout(function(){e.update({opening:!1})},0)},this.close=function(){e.update({opening:!0}),setTimeout(function(){e.update({opened:!1})},200)},this.mixin("content")})},function(t,e,i){"use strict";riot.tag2("material-snackbar",'
{toast.message}
',"","",function(t){var e=this;this.toasts=[],this.intervals={},this.addToast=function(i,n){var o=e.toastID=Math.random().toString(36).substring(7);e.toasts.push(Object.assign(i,{opening:!0,_id:o})),e.update({toasts:e.toasts}),setTimeout(function(){e.toasts[e.findToastKeyByID(o)].opening=!1,e.update({toasts:e.toasts})},50),e.intervals[o]=setTimeout(function(){e.removeToast(o)},t.duration||n||5e3)},this.removeToastAfterDurationEnding=function(t){e.removeToast(t)},this.findToastKeyByID=function(t){var i=null;return e.toasts.forEach(function(e,n){e._id==t&&(i=n)}),i},this.removeToastByClick=function(t){var i=t.item.toast._id;clearInterval(e.intervals[i]),e.removeToast(i)},this.removeToast=function(t){null!=e.findToastKeyByID(t)&&(e.toasts[e.findToastKeyByID(t)].opening=!0,e.update({toasts:e.toasts}),setTimeout(function(){e.toasts.splice(e.findToastKeyByID(t),1),e.update({toasts:e.toasts})},200))}})},function(t,e,i){"use strict";riot.tag2("material-spinner",' ',"","",function(t){})},function(module,exports,__webpack_require__){"use strict";riot.tag2("material-tabs",'
{parent.opts.cut ? parent.cut(tab.title) : tab.title}
',"","",function(opts){var _this=this;if(this.selected=0,this.tabs=[],opts.tabs){var tabs=[];try{tabs=opts.tabs?eval(opts.tabs):[],this.tabs=tabs}catch(t){}}this.on("mount",function(){_this.setWidth(),_this.setLinePosition()}),this.setWidth=function(){[].forEach.call(_this.root.querySelectorAll("material-button"),function(t){t.style.width=_this.refs.line.style.width=(100/_this.tabs.length).toFixed(2)+"%"})},this.onChangeTab=function(t){var e=_this.tabs.indexOf(t.item.tab);_this.changeTab(e)},this.changeTab=function(t){_this.update({selected:t}),_this.setLinePosition(),_this.trigger("tabChanged",_this.tabs[t],t),opts.tabchanged&&"function"==typeof opts.tabchanged&&opts.tabchanged(_this.tabs[t],t)},this.setLinePosition=function(){_this.refs.line.style.left=(100/_this.tabs.length).toFixed(2)*_this.selected+"%"},this.cut=function(t){return t.length>opts.cut?t.substr(0,opts.cut)+"...":t}})},function(t,e,i){"use strict";riot.tag2("material-textarea",'
',"","",function(t){var e=this;this.opts=t,this.disabled=t.disabled||!1,this.on("mount",function(){t.maxRows&&(e.refs.mirror.style.maxHeight=t.maxRows*e.refs[e.n].getBoundingClientRect().height+"px"),e.n=t.ref||"default-textarea",e.value=t.value||"",e.refs.mirror.innerHTML=e.format(e.value),e.refs[e.n].value=e.value,e.refs[e.n].scrollTop=e.refs[e.n].scrollHeight,e.refs[e.n].addEventListener("focus",e.changeFocus),e.refs[e.n].addEventListener("blur",e.changeFocus),e.refs[e.n].addEventListener("input",e.inputHandler),e.update({value:e.value})}),this.changeFocus=function(t){if(e.disabled)return!1;var i=e.refs[e.n]==document.activeElement;e.update({focused:i}),e.trigger("focusChanged",i)},this.inputHandler=function(t){var i=e.refs[e.n].value;e.refs.mirror.innerHTML=e.format(i),e.update({value:i})},this.changeValue=function(i){e.trigger("valueChanged",e.refs[e.n].value,i),t.valuechanged&&"function"==typeof t.valuechanged&&t.valuechanged(e.refs[e.n].value)},this.isValid=function(t){e.update({error:!t})},this.format=function(t){return t.replace(/\n/g,"
 ")},this.on("update",function(t){t&&void 0!=t.value&&e.validationType&&e.isValid(e.validate(t.value))}),this.mixin("validate")})},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=i(0),r=function(t){return t&&t.__esModule?t:{default:t}}(s);riot.tag2("material-waves",'
',"","",function(t){var e=this,i=function(t){function e(i,a,s){n(this,e);var r=o(this,t.call(this));return i||console.error("You should set container to the wave!"),r.container=i,r.maxOpacity=a.opacity||.6,r.duration=a.duration||750,r.color=a.color||"#fff",r.center=a.center||!1,r.event=s,r.containerBound=r.receiveBound(),r.maxScale=r.containerBound.size/100*10,r.created=Date.now(),r.start={},r.createNode(),r.waveIn(),r}return a(e,t),e.prototype.createNode=function(){this.wave=document.createElement("div"),this.wave.classList.add("wave"),this.container.appendChild(this.wave)},e.prototype.waveIn=function(){var t=this;this.center&&!this.event&&console.error("Setup at least mouse event... Or just set center attribute"),this.start.x=this.center?this.containerBound.height/2:this.event.pageY-this.containerBound.offsetTop,this.start.y=this.center?this.containerBound.width/2:this.event.pageX-this.containerBound.offsetLeft;var e=-1!==window.navigator.userAgent.indexOf("Trident");setTimeout(function(){return t.setStyles(t.maxOpacity)},e?50:0)},e.prototype.waveOut=function(t){var e=this,i=Date.now()-this.created,n=Math.round(this.duration/2)-i,o=n>0?n:0;setTimeout(function(){e.setStyles(0),setTimeout(function(){e.wave.parentNode===e.container&&(e.container.removeChild(e.wave),t())},e.duration)},o)},e.prototype.setStyles=function(t){this.wave.setAttribute("style",this.convertStyle({top:this.start.x+"px",left:this.start.y+"px",transform:"scale("+this.maxScale+")","transition-duration":this.duration+"ms","transition-timing-function":"cubic-bezier(0.250, 0.460, 0.450, 0.940)",background:this.color,opacity:t}))},e.prototype.convertStyle=function(t){var e="";return Object.keys(t).forEach(function(i){t.hasOwnProperty(i)&&(e+=i+":"+t[i]+";")}),e},e}(r.default);this._waves=[],this._events=[],this.on("launch",function(n){var o=new i(e.refs.waves,t,n);e._waves.push(o),e.trigger("wavestart",o),e.parent&&e.parent.opts&&e.parent.opts.wavestart&&e.parent.opts.wavestart(o),e._events.length||(e._events.push(n.target.addEventListener("mouseup",function(){return e.trigger("hold")})),e._events.push(n.target.addEventListener("mouseleave",function(){return e.trigger("hold")})))}),this.on("hold",function(){e._waves[e._waves.length-1]&&e._waves[e._waves.length-1].waveOut(e.waveOut),e._waves[e._waves.length-1]&&e._waves.slice(e._waves.length-1,1)}),this.waveOut=function(){e.trigger("waveend"),e.parent&&e.parent.opts&&e.parent.opts.waveend&&e.parent.opts.waveend()}})},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){n(this,t)}return t.prototype.filter=function(t,e){return this[t].filter(function(t){var i=!1;return Object.keys(e).forEach(function(n){var o=e[n],a=new RegExp(""+o,"i");i=a.test(t[n])}),i})},t.prototype.find=function(t,e){var i={},n=0;return t.forEach(function(t){Object.keys(e).forEach(function(o){var a=e[o];t[o]==a&&(i.e=t,i.k=n)}),n++}),i},t}();e.default=o,riot.mixin("collection",o)},function(t,e,i){"use strict";var n={init:function(){var t=this;this.on("mount",function(){[].forEach.call(t.root.querySelectorAll("content"),function(e){var i=e.getAttribute("select");[].forEach.call(t.root.querySelectorAll(i),function(t){e.parentNode.insertBefore(t,e.nextSibling)}),e.parentNode.removeChild(e)})})}};riot.mixin("content",n)},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){n(this,t)}return t.prototype.init=function(){var t=this;this.on("update",function(e){e&&t.dynamicAttributes&&t.dynamicAttributes.forEach(function(i){void 0!=e[i]&&t.root.setAttribute(i,e[i])})})},t}();e.default=o,riot.mixin("dynamicAttributes",o)},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){n(this,t)}return t.prototype.findTag=function(t,e){var i=null;return t.forEach(function(t){t.root.getAttribute("name").toLowerCase()!=e.toLowerCase()&&t.root.tagName.toLowerCase()!=e.toLowerCase()&&t.root.getAttribute("ref").toLowerCase()!=e.toLowerCase()||(i=t)}),i},t.prototype.turnHyphensOptsToCamelCase=function(t){for(var e in t)if(/-/.test(e)){var i=e.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()});t[i]=t[e],delete t[e]}},t}();e.default=o,riot.findTag=o.findTag,riot.mixin("helpers",o)},function(module,exports,__webpack_require__){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function t(t,e){for(var i=0;i - + diff --git a/src/scripts/script.js b/src/scripts/script.js index 31f2ea7..8113da6 100644 --- a/src/scripts/script.js +++ b/src/scripts/script.js @@ -80,7 +80,7 @@ registryUI.removeServer = function(url) { localStorage.setItem('registryServer', JSON.stringify(registryServer)); if (url == registryUI.url()) { registryUI.updateHistory(registryUI.getRegistryServer(0)); - rg.router.go('home'); + route(''); } } diff --git a/src/tags/add.tag b/src/tags/add.tag index 8bc87ae..97dadd4 100644 --- a/src/tags/add.tag +++ b/src/tags/add.tag @@ -48,7 +48,7 @@ if (registryUI.addTag.dialog.getAddServer().length > 0) { registryUI.addServer(registryUI.addTag.dialog.getAddServer()); } - rg.router.go('home'); + registryUI.home(); registryUI.addTag.close(); }; registryUI.addTag.close = function () { diff --git a/src/tags/app.tag b/src/tags/app.tag index 2d99e3a..d306032 100644 --- a/src/tags/app.tag +++ b/src/tags/app.tag @@ -22,8 +22,8 @@
- - + + @@ -45,32 +45,47 @@ \ No newline at end of file diff --git a/src/tags/catalog.tag b/src/tags/catalog.tag index 5632f65..883320b 100644 --- a/src/tags/catalog.tag +++ b/src/tags/catalog.tag @@ -35,8 +35,8 @@ diff --git a/src/tags/change.tag b/src/tags/change.tag index ad36b11..6209646 100644 --- a/src/tags/change.tag +++ b/src/tags/change.tag @@ -51,7 +51,7 @@ if (registryUI.changeTag.dialog.getServerUrl().length > 0) { registryUI.changeServer(registryUI.changeTag.dialog.getServerUrl()); } - rg.router.go('home'); + registryUI.home(); registryUI.changeTag.dialog.close(); }; registryUI.changeTag.close = function () { diff --git a/src/tags/taglist.tag b/src/tags/taglist.tag index 4c50958..8b981e4 100644 --- a/src/tags/taglist.tag +++ b/src/tags/taglist.tag @@ -18,7 +18,7 @@
- + arrow_back

Tags of { registryUI.url() + '/' + registryUI.taglist.name }

@@ -48,12 +48,9 @@