diff --git a/build/widget.js b/build/widget.js index d6586c2..8e5c873 100644 --- a/build/widget.js +++ b/build/widget.js @@ -1,3 +1,3 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Widget=e():t.Widget=e()}(this,function(){return function(t){function e(n){if(l[n])return l[n].exports;var i=l[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var l={};return e.m=t,e.c=l,e.p="",e(0)}([function(t,e,l){t.exports=l(1)},function(t,e,l){"use strict";var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rs=t,this.state="initial",this.active=!1,this.online=!1,this.closed=!1,this.leaveOpen=!!e.leaveOpen&&e.leaveOpen,this.logging="boolean"==typeof e.logging&&e.logging,this.autoCloseAfter=e.autoCloseAfter?e.autoCloseAfter:1500,this.lastSynced=null,this.lastSyncedUpdateLoop=null};n.prototype={log:function(){if(this.logging){for(var t,e=arguments.length,l=Array(e),n=0;n0?this.setState("choose"):this.setState("sign-in")},setClickHandlers:function(){var t=this;this.rsInitial.addEventListener("click",function(){return t.showChooseOrSignIn()}),this.rsChooseRemoteStorageButton.addEventListener("click",function(){return t.setState("sign-in")}),this.rsChooseDropboxButton.addEventListener("click",function(){return t.rs.dropbox.connect()}),this.rsChooseGoogleDriveButton.addEventListener("click",function(){return t.rs.googledrive.connect()}),this.rsDisconnectButton.addEventListener("click",function(){return t.rs.disconnect()}),this.rsErrorReconnectLink.addEventListener("click",function(){return t.rs.reconnect()}),this.rsErrorDisconnectButton.addEventListener("click",function(){return t.rs.disconnect()}),this.rs.hasFeature("Sync")&&this.rsSyncButton.addEventListener("click",function(){t.rsSyncButton.classList.contains("rs-rotate")?(t.rs.stopSync(),t.rsSyncButton.classList.remove("rs-rotate")):(t.rs.startSync(),t.rsSyncButton.classList.add("rs-rotate"))}),document.addEventListener("click",function(){return t.close()}),this.rsWidget.addEventListener("click",function(t){return t.stopPropagation()}),this.rsLogo.addEventListener("click",function(){return t.toggle()})},toggle:function(){this.closed?this.open():"initial"===this.state?this.showChooseOrSignIn():this.close()},open:function(){this.closed=!1,this.rsWidget.classList.remove("rs-closed"),this.shouldCloseWhenSyncDone=!1},close:function(){"error"!==this.state&&(!this.leaveOpen&&this.active?(this.closed=!0,this.rsWidget.classList.add("rs-closed")):this.setState(this.active?"connected":"initial"))},setOffline:function(){this.online&&(this.rsWidget.classList.add("rs-offline"),this.rsConnectedLabel.textContent="Offline",this.online=!1)},setOnline:function(){this.online||(this.rsWidget.classList.remove("rs-offline"),this.active&&(this.rsConnectedLabel.textContent="Connected")),this.online=!0},setBackendClass:function(t){this.rsWidget.classList.remove("rs-backend-remotestorage"),this.rsWidget.classList.remove("rs-backend-dropbox"),this.rsWidget.classList.remove("rs-backend-googledrive"),t&&this.rsWidget.classList.add("rs-backend-"+t)},showErrorBox:function(t){this.rsErrorBox.innerHTML=t,this.setState("error")},hideErrorBox:function(){this.rsErrorBox.innerHTML="",this.close()},handleDiscoveryError:function(t){var e=document.querySelector(".rs-sign-in-error");e.innerHTML=t.message,e.classList.remove("rs-hidden"),e.classList.add("rs-visible")},handleSyncError:function(){this.open(),this.showErrorBox("App sync error")},handleUnauthorized:function(t){t.code&&"access_denied"===t.code?this.rs.disconnect():(this.open(),this.showErrorBox(t.message+" "),this.rsErrorBox.appendChild(this.rsErrorReconnectLink),this.rsErrorReconnectLink.classList.remove("rs-hidden"))},updateLastSyncedOutput:function(){var t=new Date,e=Math.round((t.getTime()-this.lastSynced.getTime())/1e3),l=document.querySelector(".rs-box-connected .rs-sub-headline");l.innerHTML="Synced "+e+" seconds ago"}},t.exports=n},function(t,e){t.exports='

Connect your storage

To sync data with your account

user@provider.com

Connected

Connect your storage

This app allows you to sync data with a storage of your choice. Read more

'; -},function(t,e){t.exports='/* RemoteStorage widget styles */\n\n.rs-widget {\n box-sizing: border-box;\n z-index: 21000000; /* Make sure we\'re on a reasonably high visibility layer */\n overflow: hidden;\n max-width: 350px;\n padding: 10px;\n margin: 10px;\n border-radius: 3px;\n background-color: #fff;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n font-family: arial, sans-serif;\n font-size: 16px;\n color: #333;\n will-change: max-height, height, width, opacity, max-width, background, box-shadow;\n transition-property: width, height, opacity, max-width, max-height, background, box-shadow;\n transition-duration: 300ms;\n}\n\n.rs-widget * {\n box-sizing: border-box;\n}\n\n.rs-widget .rs-hidden {\n display: none;\n}\n\n.rs-box {\n overflow: hidden;\n will-change: height;\n transition-property: height, width, max-height;\n transition-duration: 300ms;\n transition-timing-function: ease-in;\n opacity: 0;\n max-height: 0px;\n}\n\n.rs-box.rs-selected {\n opacity: 1;\n max-height: 420px;\n}\n\n/* Main logo */\n.rs-main-logo {\n float: left;\n height: 36px;\n width: 36px;\n margin-top: 1px;\n margin-right: 0.625em;\n transition: margin-left 300ms ease-out, transform 300ms ease-out;\n cursor: pointer;\n}\n.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage,\n{\n display: normal;\n}\n.rs-widget[class*="rs-backend-"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {\n display: none;\n}\n.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {\n display: normal;\n}\n.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {\n display: none;\n}\n.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {\n display: normal;\n}\n.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {\n display: none;\n}\n\npolygon.rs-logo-shape {\n fill: #FF4B03;\n}\n\npolygon.rs-logo-shape,\n#rs-main-logo-dropbox path,\n#rs-main-logo-googledrive path {\n transition-property: fill;\n transition-duration: 0.5s;\n}\n\n.rs-offline polygon.rs-logo-shape,\n.rs-offline #rs-main-logo-dropbox path,\n.rs-offline #rs-main-logo-googledrive path {\n fill: #888;\n transition-property: fill;\n transition-duration: 0.5s;\n}\n\n/* Hide everything except logo when connected and clicked outside of box */\n.rs-closed {\n max-width: 56px;\n background-color: transparent;\n box-shadow: none;\n opacity: 0.5;\n\n transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms; \n}\n\n.rs-closed:hover {\n cursor: pointer;\n opacity: 1;\n}\n\n.rs-box-initial {\n transition-duration: 0ms;\n}\n\n.rs-box-initial:hover {\n cursor: pointer;\n}\n\n.rs-widget a {\n color: #0093cc;\n}\n\n/* HEADLINE */\n.rs-small-headline {\n font-size: 1em;\n font-weight: bold;\n margin: 0;\n margin-bottom: 2px;\n height: 1.2em;\n word-break: break-all;\n overflow: hidden;\n line-height: 1em;\n}\n\n.rs-sub-headline {\n word-break: break-all;\n overflow: hidden;\n color: #666;\n font-size: 0.92em;\n height: 1.2em;\n}\n.rs-big-headline {\n font-size: 1.625em;\n font-weight: normal;\n text-align: center;\n margin-top: 20px;\n margin-bottom: 20px;\n}\n\n/* BUTTONS */\n.rs-button {\n font: inherit;\n color: inherit;\n background-color: transparent;\n border: 1px solid #dcdcdc;\n border-radius: 3px;\n cursor: pointer;\n}\n.rs-button-small {\n padding: 0.5em 0.6em;\n margin-left: 0.3em;\n transition: border-color 300ms ease-out;\n}\n.rs-button-wrap {\n margin-top: 10px;\n}\n\n.rs-button-wrap img,\n.rs-button-wrap svg {\n float: left;\n margin-right: 0.6em;\n width: 40px;\n height: 40px;\n}\n\n.rs-button-big {\n padding: 15px 10px;\n margin-bottom: 10px;\n display: block;\n width: 100%;\n text-align: left;\n transition: box-shadow 200ms;\n}\n.rs-button-big > div {\n font-size: 1.125em;\n padding: 10px 0;\n}\n.rs-button-big:hover {\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-button-big:active {\n background-color: #eee;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-button-big:last-child {\n margin-bottom: 0;\n}\n\n.rs-content {\n padding: 0 10px 10px 10px;\n}\n\n\n.rs-state-choose .rs-main-logo,\n.rs-state-sign-in .rs-main-logo {\n margin-left: 45%;\n float: none;\n}\n\n.rs-sign-in-form input[type=text] {\n padding: 15px 10px;\n display: block;\n width: 100%;\n font: inherit;\n height: 52px;\n border: 1px solid #aaa;\n border-radius: 0;\n box-shadow: none;\n}\n.rs-sign-in-form input[type=submit] {\n padding: 15px 10px;\n margin-top: 20px;\n margin-bottom: 15px;\n display: block;\n width: 100%;\n border: none;\n border-radius: 3px;\n background-color: #3fb34f;\n font: inherit;\n color: #fff;\n transition: box-shadow 200ms, background-color 200ms;\n}\n.rs-sign-in-form input[type=submit]:hover {\n cursor: pointer;\n background-color: #4BCB5D;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-sign-in-form input[type=submit]:active {\n background-color: #3fb34f;\n}\n\n.rs-sign-in-error.rs-hidden,\n.rs-box-error.rs-hidden {\n height: 0;\n}\n\n.rs-sign-in-error.rs-visible,\n.rs-box-error.rs-visible {\n height: auto;\n border-radius: 3px;\n padding: 0.5em 0.5em;\n margin-top: 0.5em;\n text-align: center;\n background-color: rgba(255,0,0,0.1);\n color: darkred;\n}\n\n.rs-box-error .rs-error-message {\n float: left;\n max-width: 242px;\n}\n\n /*Choose provider box */\n.rs-box-choose {\n text-align: center;\n overflow: hidden;\n}\n\n.rs-box-choose p {\n margin-top: 0;\n margin-bottom: 20px;\n line-height: 1.4em;\n}\n\n/*Connected box */\n.rs-box-connected {\n height: 40px;\n transition: height 0s;\n}\n.rs-connected-text {\n float: left;\n}\n.rs-box-connected .rs-user {\n font-weight: bold;\n max-width: 210px;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: keep-all;\n}\n.rs-connected-buttons, .rs-error-buttons {\n float: right;\n}\n.rs-disconnect:hover {\n border-color: #FF2D2D;\n}\n.rs-disconnect:hover .rs-icon{\n fill: #FF2D2D;\n}\n.rs-sync:hover {\n border-color: #FFBB0C;\n}\n.rs-sync:hover .rs-icon {\n fill: #FFBB0C;\n}\n.rs-sync.rs-rotate {\n border-color: #FFBB0C;\n}\n.rs-sync.rs-rotate .rs-icon {\n fill: #FFBB0C;\n animation: rs-spin 1s linear infinite;\n}\n@keyframes rs-spin { 100% { transform: rotate(360deg); transform:rotate(360deg); } }\n\n/* Floating widget styles (top right corner) */\n.rs-floating {\n position: fixed;\n top: 0;\n right: 0;\n}\n\n\n/* Small/mobile screens */\n@media screen and (max-width: 420px) {\n .rs-widget {\n font-size: 100%;\n transition: all 300ms ease-out;\n max-width: 400px;\n }\n .rs-floating {\n position: relative;\n top: auto;\n right: auto\n }\n .rs-closed {\n max-width: 56px;\n }\n .rs-state-choose,\n .rs-state-sign-in {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n max-width: 100%;\n }\n}\n\n/* remove dotted outline border on Firefox */\n.rs-widget a:focus,\n.rs-widget a:active,\n.rs-widget button:focus,\n.rs-widget input:focus {\n outline:none;\n}\n.rs-widget button::-moz-focus-inner, \n.rs-widget input[type="button"]::-moz-focus-inner,\n.rs-widget input[type="submit"]::-moz-focus-inner {\n border:0;\n}\n\n/* prevent rounded buttons on mobile Safari */\n.rs-widget input[type="button"],\n.rs-widget input[type="submit"] {\n -webkit-appearance: none;\n}\n'}])}); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Widget=e():t.Widget=e()}(this,function(){return function(t){function e(n){if(l[n])return l[n].exports;var i=l[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var l={};return e.m=t,e.c=l,e.p="",e(0)}([function(t,e,l){t.exports=l(1)},function(t,e,l){"use strict";var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rs=t,this.state="initial",this.active=!1,this.online=!1,this.closed=!1,this.leaveOpen=!!e.leaveOpen&&e.leaveOpen,this.logging="boolean"==typeof e.logging&&e.logging,this.autoCloseAfter=e.autoCloseAfter?e.autoCloseAfter:1500,this.lastSynced=null,this.lastSyncedUpdateLoop=null};n.prototype={log:function(){if(this.logging){for(var t,e=arguments.length,l=Array(e),n=0;n0?this.setState("choose"):this.setState("sign-in")},setClickHandlers:function(){var t=this;this.rsInitial.addEventListener("click",function(){return t.showChooseOrSignIn()}),this.rsChooseRemoteStorageButton.addEventListener("click",function(){return t.setState("sign-in")}),this.rsChooseDropboxButton.addEventListener("click",function(){return t.rs.dropbox.connect()}),this.rsChooseGoogleDriveButton.addEventListener("click",function(){return t.rs.googledrive.connect()}),this.rsDisconnectButton.addEventListener("click",function(){return t.rs.disconnect()}),this.rsErrorReconnectLink.addEventListener("click",function(){return t.rs.reconnect()}),this.rsErrorDisconnectButton.addEventListener("click",function(){return t.rs.disconnect()}),this.rs.hasFeature("Sync")&&this.rsSyncButton.addEventListener("click",function(){t.rsSyncButton.classList.contains("rs-rotate")?(t.rs.stopSync(),t.rsSyncButton.classList.remove("rs-rotate")):(t.rs.startSync(),t.rsSyncButton.classList.add("rs-rotate"))}),document.addEventListener("click",function(){return t.close()}),this.rsWidget.addEventListener("click",function(t){return t.stopPropagation()}),this.rsLogo.addEventListener("click",function(){return t.toggle()})},toggle:function(){this.closed?this.open():"initial"===this.state?this.showChooseOrSignIn():this.close()},open:function(){this.closed=!1,this.rsWidget.classList.remove("rs-closed"),this.shouldCloseWhenSyncDone=!1},close:function(){"error"!==this.state&&(!this.leaveOpen&&this.active?(this.closed=!0,this.rsWidget.classList.add("rs-closed")):this.setState(this.active?"connected":"initial"))},setOffline:function(){this.online&&(this.rsWidget.classList.add("rs-offline"),this.rsConnectedLabel.textContent="Offline",this.online=!1)},setOnline:function(){this.online||(this.rsWidget.classList.remove("rs-offline"),this.active&&(this.rsConnectedLabel.textContent="Connected")),this.online=!0},setBackendClass:function(t){this.rsWidget.classList.remove("rs-backend-remotestorage"),this.rsWidget.classList.remove("rs-backend-dropbox"),this.rsWidget.classList.remove("rs-backend-googledrive"),t&&this.rsWidget.classList.add("rs-backend-"+t)},showErrorBox:function(t){this.rsErrorBox.innerHTML=t,this.setState("error")},hideErrorBox:function(){this.rsErrorBox.innerHTML="",this.close()},handleDiscoveryError:function(t){var e=document.querySelector(".rs-sign-in-error");e.innerHTML=t.message,e.classList.remove("rs-hidden"),e.classList.add("rs-visible")},handleSyncError:function(){this.open(),this.showErrorBox("App sync error")},handleUnauthorized:function(t){t.code&&"access_denied"===t.code?this.rs.disconnect():(this.open(),this.showErrorBox(t.message+" "),this.rsErrorBox.appendChild(this.rsErrorReconnectLink),this.rsErrorReconnectLink.classList.remove("rs-hidden"))},updateLastSyncedOutput:function(){if(this.lastSynced){var t=new Date,e=Math.round((t.getTime()-this.lastSynced.getTime())/1e3),l=document.querySelector(".rs-box-connected .rs-sub-headline");l.innerHTML="Synced "+e+" seconds ago"}}},t.exports=n},function(t,e){t.exports='

Connect your storage

To sync data with your account

user@provider.com

Connected

Connect your storage

This app allows you to sync data with a storage of your choice. Read more

'; +},function(t,e){t.exports='/* RemoteStorage widget styles */\n\n.rs-widget {\n box-sizing: border-box;\n z-index: 21000000; /* Make sure we\'re on a reasonably high visibility layer */\n overflow: hidden;\n max-width: 350px;\n padding: 10px;\n margin: 10px;\n border-radius: 3px;\n background-color: #fff;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n font-family: arial, sans-serif;\n font-size: 16px;\n color: #333;\n will-change: max-height, height, width, opacity, max-width, background, box-shadow;\n transition-property: width, height, opacity, max-width, max-height, background, box-shadow;\n transition-duration: 300ms;\n}\n\n.rs-widget * {\n box-sizing: border-box;\n}\n\n.rs-widget .rs-hidden {\n display: none;\n}\n\n.rs-box {\n overflow: hidden;\n will-change: height;\n transition-property: height, width, max-height;\n transition-duration: 300ms;\n transition-timing-function: ease-in;\n opacity: 0;\n max-height: 0px;\n}\n\n.rs-box.rs-selected {\n opacity: 1;\n max-height: 420px;\n}\n\n/* Main logo */\n.rs-main-logo {\n float: left;\n height: 36px;\n width: 36px;\n margin-top: 1px;\n margin-right: 0.625em;\n transition: margin-left 300ms ease-out, transform 300ms ease-out;\n cursor: pointer;\n}\n.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage,\n{\n display: normal;\n}\n.rs-widget[class*="rs-backend-"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {\n display: none;\n}\n.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {\n display: normal;\n}\n.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {\n display: none;\n}\n.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {\n display: normal;\n}\n.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {\n display: none;\n}\n\npolygon.rs-logo-shape {\n fill: #FF4B03;\n}\n\npolygon.rs-logo-shape,\n#rs-main-logo-dropbox path,\n#rs-main-logo-googledrive path {\n transition-property: fill;\n transition-duration: 0.5s;\n}\n\n.rs-offline polygon.rs-logo-shape,\n.rs-offline #rs-main-logo-dropbox path,\n.rs-offline #rs-main-logo-googledrive path {\n fill: #888;\n transition-property: fill;\n transition-duration: 0.5s;\n}\n\n/* Hide everything except logo when connected and clicked outside of box */\n.rs-closed {\n max-width: 56px;\n background-color: transparent;\n box-shadow: none;\n opacity: 0.5;\n\n transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms; \n}\n\n.rs-closed:hover {\n cursor: pointer;\n opacity: 1;\n}\n\n.rs-box-initial {\n transition-duration: 0ms;\n}\n\n.rs-box-initial:hover {\n cursor: pointer;\n}\n\n.rs-widget a {\n color: #0093cc;\n}\n\n/* HEADLINE */\n.rs-small-headline {\n font-size: 1em;\n font-weight: bold;\n margin: 0;\n margin-bottom: 2px;\n height: 1.2em;\n word-break: break-all;\n overflow: hidden;\n line-height: 1em;\n}\n\n.rs-sub-headline {\n word-break: break-all;\n overflow: hidden;\n color: #666;\n font-size: 0.92em;\n height: 1.2em;\n}\n.rs-big-headline {\n font-size: 1.625em;\n font-weight: normal;\n text-align: center;\n margin-top: 20px;\n margin-bottom: 20px;\n}\n\n/* BUTTONS */\n.rs-button {\n font: inherit;\n color: inherit;\n background-color: transparent;\n border: 1px solid #dcdcdc;\n border-radius: 3px;\n cursor: pointer;\n}\n.rs-button-small {\n padding: 0.5em 0.6em;\n margin-left: 0.3em;\n transition: border-color 300ms ease-out;\n}\n.rs-button-wrap {\n margin-top: 10px;\n}\n\n.rs-button-wrap img,\n.rs-button-wrap svg {\n float: left;\n margin-right: 0.6em;\n width: 40px;\n height: 40px;\n}\n\n.rs-button-big {\n padding: 15px 10px;\n margin-bottom: 10px;\n display: block;\n width: 100%;\n text-align: left;\n transition: box-shadow 200ms;\n}\n.rs-button-big > div {\n font-size: 1.125em;\n padding: 10px 0;\n}\n.rs-button-big:hover {\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-button-big:active {\n background-color: #eee;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-button-big:last-child {\n margin-bottom: 0;\n}\n\n.rs-content {\n padding: 0 10px 10px 10px;\n}\n\n\n.rs-state-choose .rs-main-logo,\n.rs-state-sign-in .rs-main-logo {\n margin-left: 45%;\n float: none;\n}\n\n.rs-sign-in-form input[type=text] {\n padding: 15px 10px;\n display: block;\n width: 100%;\n font: inherit;\n height: 52px;\n border: 1px solid #aaa;\n border-radius: 0;\n box-shadow: none;\n}\n.rs-sign-in-form input[type=submit] {\n padding: 15px 10px;\n margin-top: 20px;\n margin-bottom: 15px;\n display: block;\n width: 100%;\n border: none;\n border-radius: 3px;\n background-color: #3fb34f;\n font: inherit;\n color: #fff;\n transition: box-shadow 200ms, background-color 200ms;\n}\n.rs-sign-in-form input[type=submit]:hover {\n cursor: pointer;\n background-color: #4BCB5D;\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\n}\n.rs-sign-in-form input[type=submit]:active {\n background-color: #3fb34f;\n}\n\n.rs-sign-in-error.rs-hidden,\n.rs-box-error.rs-hidden {\n height: 0;\n}\n\n.rs-sign-in-error.rs-visible,\n.rs-box-error.rs-visible {\n height: auto;\n border-radius: 3px;\n padding: 0.5em 0.5em;\n margin-top: 0.5em;\n text-align: center;\n background-color: rgba(255,0,0,0.1);\n color: darkred;\n}\n\n.rs-box-error {\n display: flex;\n flex-direction: row;\n}\n\n.rs-box-error .rs-error-message {\n flex: auto;\n}\n\n /*Choose provider box */\n.rs-box-choose {\n text-align: center;\n overflow: hidden;\n}\n\n.rs-box-choose p {\n margin-top: 0;\n margin-bottom: 20px;\n line-height: 1.4em;\n}\n\n/*Connected box */\n.rs-box-connected {\n display: flex;\n flex-direction: row;\n height: 40px;\n transition: height 0s;\n}\n.rs-connected-text {\n flex: auto;\n min-width: 0;\n}\n.rs-box-connected .rs-user {\n font-weight: bold;\n text-overflow: ellipsis;\n overflow: hidden;\n word-break: keep-all;\n}\n.rs-connected-buttons, .rs-error-buttons {\n flex: none;\n}\n.rs-disconnect:hover {\n border-color: #FF2D2D;\n}\n.rs-disconnect:hover .rs-icon{\n fill: #FF2D2D;\n}\n.rs-sync:hover {\n border-color: #FFBB0C;\n}\n.rs-sync:hover .rs-icon {\n fill: #FFBB0C;\n}\n.rs-sync.rs-rotate {\n border-color: #FFBB0C;\n}\n.rs-sync.rs-rotate .rs-icon {\n fill: #FFBB0C;\n animation: rs-spin 1s linear infinite;\n}\n@keyframes rs-spin { 100% { transform: rotate(360deg); transform:rotate(360deg); } }\n\n/* Floating widget styles (top right corner) */\n.rs-floating {\n position: fixed;\n top: 0;\n right: 0;\n}\n\n\n/* Small/mobile screens */\n@media screen and (max-width: 420px) {\n .rs-widget {\n font-size: 100%;\n transition: all 300ms ease-out;\n max-width: 400px;\n }\n .rs-floating {\n position: relative;\n top: auto;\n right: auto\n }\n .rs-closed {\n max-width: 56px;\n }\n .rs-state-choose,\n .rs-state-sign-in {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n max-width: 100%;\n }\n}\n\n/* remove dotted outline border on Firefox */\n.rs-widget a:focus,\n.rs-widget a:active,\n.rs-widget button:focus,\n.rs-widget input:focus {\n outline:none;\n}\n.rs-widget button::-moz-focus-inner, \n.rs-widget input[type="button"]::-moz-focus-inner,\n.rs-widget input[type="submit"]::-moz-focus-inner {\n border:0;\n}\n\n/* prevent rounded buttons on mobile Safari */\n.rs-widget input[type="button"],\n.rs-widget input[type="submit"] {\n -webkit-appearance: none;\n}\n'}])}); //# sourceMappingURL=widget.js.map \ No newline at end of file diff --git a/build/widget.js.map b/build/widget.js.map index f028809..7394bc8 100644 --- a/build/widget.js.map +++ b/build/widget.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///widget.js","webpack:///webpack/bootstrap 15be14e066448214a0cc","webpack:///./src/widget.js","webpack:///./src/assets/widget.html","webpack:///./src/assets/styles.css"],"names":["root","factory","exports","module","define","amd","Widget","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","remoteStorage","options","arguments","length","undefined","rs","state","active","online","closed","leaveOpen","logging","autoCloseAfter","lastSynced","lastSyncedUpdateLoop","prototype","log","_console","_len","msg","Array","_key","console","debug","apply","concat","eventHandler","event","_this","setState","rsSyncButton","classList","add","remove","rsWidget","contains","remote","updateLastSyncedOutput","Date","subHeadlineEl","document","querySelector","innerHTML","shouldCloseWhenSyncDone","setTimeout","close","bind","setOnline","setBackendClass","hasFeature","on","connectedUser","userAddress","rsConnectedUser","backend","rsConnectedLabel","textContent","setOffline","name","handleDiscoveryError","handleSyncError","handleUnauthorized","lastSelected","toSelect","currentStateClass","className","match","createHtmlTemplate","element","createElement","style","appendChild","setupElements","rsInitial","rsChoose","rsConnected","rsSignIn","rsChooseRemoteStorageButton","rsChooseDropboxButton","rsChooseGoogleDriveButton","rsErrorBox","apiKeys","hasOwnProperty","parentNode","removeChild","rsSignInForm","rsDisconnectButton","rsLogo","rsErrorReconnectLink","rsErrorDisconnectButton","setupHandlers","_this2","error","setEventListeners","setClickHandlers","attach","elementId","domElement","parent","getElementById","body","_this3","addEventListener","e","preventDefault","value","connect","showChooseOrSignIn","Object","keys","_this4","dropbox","googledrive","disconnect","reconnect","stopSync","startSync","stopPropagation","toggle","open","showErrorBox","errorMsg","hideErrorBox","msgContainer","message","code","now","secondsSinceLastSync","Math","round","getTime"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAAI,OAAAL,IAEAD,EAAAM,OAAAL,KACCM,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAR,OAGA,IAAAC,GAAAQ,EAAAD,IACAR,WACAU,GAAAF,EACAG,UAUA,OANAL,GAAAE,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAU,UAGAV,EAAAD,QAvBA,GAAAS,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUN,EAAQD,EAASO,GAEhCN,EAAOD,QAAUO,EAAoB,IAKhC,SAAUN,EAAQD,EAASO,GAEhC,YEnDD,IAAIH,GAAS,SAASY,GAA2B,GAAZC,GAAYC,UAAAC,OAAA,GAAAC,SAAAF,UAAA,GAAAA,UAAA,KAC/Cb,MAAKgB,GAAKL,EAEVX,KAAKiB,MAAQ,UAGbjB,KAAKkB,UAGLlB,KAAKmB,UAGLnB,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BqB,GACFjE,KAAK6C,SAASH,UAAUC,IAAxB,cAA0CsB,IAI9CkE,aA1WiB,SA0WHC,GACZpI,KAAK2F,WAAWtC,UAAY+E,EAC5BpI,KAAKwC,SAAS,UAGhB6F,aA/WiB,WAgXfrI,KAAK2F,WAAWtC,UAAY,GAC5BrD,KAAKwD,SAGPc,qBApXiB,SAoXKiC,GACpB,GAAI+B,GAAenF,SAASC,cAAc,oBAC1CkF,GAAajF,UAAYkD,EAAMgC,QAC/BD,EAAa5F,UAAUE,OAAO,aAC9B0F,EAAa5F,UAAUC,IAAI,eAG7B4B,gBA3XiB,WA6XfvE,KAAKkI,OACLlI,KAAKmI,aAAa,mBAGpB3D,mBAjYiB,SAiYG+B,GACdA,EAAMiC,MAAuB,kBAAfjC,EAAMiC,KACtBxI,KAAKgB,GAAG4G,cAER5H,KAAKkI,OACLlI,KAAKmI,aAAa5B,EAAMgC,QAAU,KAClCvI,KAAK2F,WAAWT,YAAYlF,KAAKmG,sBACjCnG,KAAKmG,qBAAqBzD,UAAUE,OAAO,eAI/CI,uBA5YiB,WA6Yf,GAAIyF,GAAM,GAAIxF,MACVyF,EAAuBC,KAAKC,OAAOH,EAAII,UAAY7I,KAAKwB,WAAWqH,WAAW,KAC9E3F,EAAgBC,SAASC,cAAc,qCAC3CF,GAAcG,UAAd,UAAoCqF,EAApC,iBAIJ9I,EAAOD,QAAUI,GF0HX,SAAUH,EAAQD,GGnjBxBC,EAAAD,QAAA;EHyjBM,SAAUC,EAAQD,GIzjBxBC,EAAAD,QAAA","file":"widget.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Widget\"] = factory();\n\telse\n\t\troot[\"Widget\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Widget\"] = factory();\n\telse\n\t\troot[\"Widget\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * RemoteStorage connect widget\n\t * @constructor\n\t *\n\t * @param {object} remoteStorage - remoteStorage instance\n\t * @param {object} options - Widget options\n\t * @param {boolean} options.leaveOpen - Do not minimize widget when user clicks\n\t * outside of it (default: false)\n\t * @param {number} options.autoCloseAfter - Time after which the widget closes\n\t * automatically in ms (default: 1500)\n\t * @param {boolean} options.logging - Enable logging (default: false)\n\t */\n\tvar Widget = function Widget(remoteStorage) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t this.rs = remoteStorage;\n\t\n\t this.state = 'initial';\n\t\n\t // true if we have remoteStorage connection's info\n\t this.active = false;\n\t\n\t // remoteStorage is connected!\n\t this.online = false;\n\t\n\t // widget is minimized ?\n\t this.closed = false;\n\t\n\t this.leaveOpen = options.leaveOpen ? options.leaveOpen : false;\n\t\n\t this.logging = typeof options.logging === 'boolean' ? options.logging : false;\n\t\n\t this.autoCloseAfter = options.autoCloseAfter ? options.autoCloseAfter : 1500;\n\t\n\t this.lastSynced = null;\n\t this.lastSyncedUpdateLoop = null;\n\t};\n\t\n\tWidget.prototype = {\n\t log: function log() {\n\t if (this.logging) {\n\t var _console;\n\t\n\t for (var _len = arguments.length, msg = Array(_len), _key = 0; _key < _len; _key++) {\n\t msg[_key] = arguments[_key];\n\t }\n\t\n\t (_console = console).debug.apply(_console, ['[RS-WIDGET] '].concat(msg));\n\t }\n\t },\n\t\n\t\n\t // handle events !\n\t eventHandler: function eventHandler(event, msg) {\n\t var _this = this;\n\t\n\t this.log('EVENT: ', event);\n\t switch (event) {\n\t case 'ready':\n\t this.setState(this.state);\n\t break;\n\t case 'sync-req-done':\n\t this.rsSyncButton.classList.add(\"rs-rotate\");\n\t break;\n\t case 'sync-done':\n\t this.rsSyncButton.classList.remove(\"rs-rotate\");\n\t\n\t if (this.rsWidget.classList.contains('rs-state-unauthorized') || !this.rs.remote.online) {\n\t this.updateLastSyncedOutput();\n\t } else if (this.rs.remote.online) {\n\t this.lastSynced = new Date();\n\t var subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n\t subHeadlineEl.innerHTML = 'Synced just now';\n\t }\n\t\n\t if (!this.closed && this.shouldCloseWhenSyncDone) {\n\t setTimeout(this.close.bind(this), this.autoCloseAfter);\n\t }\n\t break;\n\t case 'disconnected':\n\t this.active = false;\n\t this.setOnline();\n\t this.setBackendClass(); // removes all backend CSS classes\n\t this.setState('initial');\n\t break;\n\t case 'connected':\n\t this.active = true;\n\t this.online = true;\n\t if (this.rs.hasFeature('Sync')) {\n\t this.shouldCloseWhenSyncDone = true;\n\t this.rs.on('sync-req-done', function () {\n\t return _this.eventHandler('sync-req-done');\n\t });\n\t this.rs.on('sync-done', function () {\n\t return _this.eventHandler('sync-done');\n\t });\n\t } else {\n\t this.rsSyncButton.classList.add('rs-hidden');\n\t setTimeout(this.close.bind(this), this.autoCloseAfter);\n\t }\n\t var connectedUser = this.rs.remote.userAddress;\n\t this.rsConnectedUser.innerHTML = connectedUser;\n\t this.setBackendClass(this.rs.backend);\n\t this.rsConnectedLabel.textContent = 'Connected';\n\t this.setState('connected');\n\t break;\n\t case 'network-offline':\n\t this.setOffline();\n\t break;\n\t case 'network-online':\n\t this.setOnline();\n\t break;\n\t case 'error':\n\t this.setBackendClass(this.rs.backend);\n\t\n\t if (msg.name === 'DiscoveryError') {\n\t this.handleDiscoveryError(msg);\n\t } else if (msg.name === 'SyncError') {\n\t this.handleSyncError(msg);\n\t } else if (msg.name === 'Unauthorized') {\n\t this.handleUnauthorized(msg);\n\t } else {\n\t console.debug('Encountered unhandled error', msg);\n\t }\n\t break;\n\t }\n\t },\n\t setState: function setState(state) {\n\t if (state) {\n\t this.log('Setting state ', state);\n\t var lastSelected = document.querySelector('.rs-box.rs-selected');\n\t if (lastSelected) {\n\t lastSelected.classList.remove('rs-selected');\n\t }\n\t\n\t var toSelect = document.querySelector('.rs-box.rs-box-' + state);\n\t if (toSelect) {\n\t toSelect.classList.add('rs-selected');\n\t }\n\t\n\t var currentStateClass = this.rsWidget.className.match(/rs-state-\\S+/g)[0];\n\t this.rsWidget.classList.remove(currentStateClass);\n\t this.rsWidget.classList.add('rs-state-' + (state || this.state));\n\t\n\t this.state = state;\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Create the widget element and add styling.\n\t *\n\t * @returns {object} The widget's DOM element\n\t *\n\t * @private\n\t */\n\t createHtmlTemplate: function createHtmlTemplate() {\n\t var element = document.createElement('div');\n\t var style = document.createElement('style');\n\t style.innerHTML = __webpack_require__(3);\n\t\n\t element.id = \"remotestorage-widget\";\n\t element.innerHTML = __webpack_require__(2);\n\t element.appendChild(style);\n\t\n\t return element;\n\t },\n\t\n\t\n\t /**\n\t * Save all interactive DOM elements as variables for later access.\n\t *\n\t * @private\n\t */\n\t setupElements: function setupElements() {\n\t this.rsWidget = document.querySelector('.rs-widget');\n\t this.rsInitial = document.querySelector('.rs-box-initial');\n\t this.rsChoose = document.querySelector('.rs-box-choose');\n\t this.rsConnected = document.querySelector('.rs-box-connected');\n\t this.rsSignIn = document.querySelector('.rs-box-sign-in');\n\t\n\t this.rsConnectedLabel = document.querySelector('.rs-box-connected .rs-sub-headline');\n\t this.rsChooseRemoteStorageButton = document.querySelector('button.rs-choose-rs');\n\t this.rsChooseDropboxButton = document.querySelector('button.rs-choose-dropbox');\n\t this.rsChooseGoogleDriveButton = document.querySelector('button.rs-choose-googledrive');\n\t this.rsErrorBox = document.querySelector('.rs-box-error .rs-error-message');\n\t\n\t // check if apiKeys is set for Dropbox or Google [googledrive, dropbox]\n\t // to show/hide relative buttons only if needed\n\t if (!this.rs.apiKeys.hasOwnProperty('googledrive')) {\n\t this.rsChooseGoogleDriveButton.parentNode.removeChild(this.rsChooseGoogleDriveButton);\n\t }\n\t\n\t if (!this.rs.apiKeys.hasOwnProperty('dropbox')) {\n\t this.rsChooseDropboxButton.parentNode.removeChild(this.rsChooseDropboxButton);\n\t }\n\t\n\t this.rsSignInForm = document.querySelector('.rs-sign-in-form');\n\t\n\t this.rsDisconnectButton = document.querySelector('.rs-disconnect');\n\t this.rsSyncButton = document.querySelector('.rs-sync');\n\t this.rsLogo = document.querySelector('.rs-widget-icon');\n\t\n\t this.rsErrorReconnectLink = document.querySelector('.rs-box-error a.rs-reconnect');\n\t this.rsErrorDisconnectButton = document.querySelector('.rs-box-error button.rs-disconnect');\n\t\n\t this.rsConnectedUser = document.querySelector('.rs-connected-text h1.rs-user');\n\t },\n\t\n\t\n\t /**\n\t * Setup all event handlers\n\t *\n\t * @private\n\t */\n\t setupHandlers: function setupHandlers() {\n\t var _this2 = this;\n\t\n\t this.rs.on('connected', function () {\n\t return _this2.eventHandler('connected');\n\t });\n\t this.rs.on('ready', function () {\n\t return _this2.eventHandler('ready');\n\t });\n\t this.rs.on('disconnected', function () {\n\t return _this2.eventHandler('disconnected');\n\t });\n\t this.rs.on('network-online', function () {\n\t return _this2.eventHandler('network-online');\n\t });\n\t this.rs.on('network-offline', function () {\n\t return _this2.eventHandler('network-offline');\n\t });\n\t this.rs.on('error', function (error) {\n\t return _this2.eventHandler('error', error);\n\t });\n\t\n\t this.setEventListeners();\n\t this.setClickHandlers();\n\t },\n\t\n\t\n\t /**\n\t * Append widget to the DOM.\n\t *\n\t * If an elementId is specified, it will be appended to that element,\n\t * otherwise it will be appended to the document's body.\n\t *\n\t * @param {String} [elementId] - Widget's parent\n\t */\n\t attach: function attach(elementId) {\n\t var domElement = this.createHtmlTemplate();\n\t\n\t if (elementId) {\n\t var parent = document.getElementById(elementId);\n\t if (!parent) {\n\t throw \"Failed to find target DOM element with id=\\\"\" + elementId + \"\\\"\";\n\t }\n\t parent.appendChild(domElement);\n\t } else {\n\t document.body.appendChild(domElement);\n\t }\n\t\n\t this.setupElements();\n\t this.setupHandlers();\n\t },\n\t setEventListeners: function setEventListeners() {\n\t var _this3 = this;\n\t\n\t // Sign-in form\n\t this.rsSignInForm.addEventListener('submit', function (e) {\n\t e.preventDefault();\n\t var userAddress = document.querySelector('input[name=rs-user-address]').value;\n\t _this3.rs.connect(userAddress);\n\t });\n\t },\n\t\n\t\n\t /**\n\t * Show the screen for choosing a backend if there is more than one backend\n\t * to choose from. Otherwise it directly shows the remoteStorage connect\n\t * screen.\n\t *\n\t * @private\n\t */\n\t showChooseOrSignIn: function showChooseOrSignIn() {\n\t // choose backend only if some providers are declared\n\t if (this.rs.apiKeys && Object.keys(this.rs.apiKeys).length > 0) {\n\t this.setState('choose');\n\t } else {\n\t this.setState('sign-in');\n\t }\n\t },\n\t setClickHandlers: function setClickHandlers() {\n\t var _this4 = this;\n\t\n\t // Initial button\n\t this.rsInitial.addEventListener('click', function () {\n\t return _this4.showChooseOrSignIn();\n\t });\n\t\n\t // Choose RS button\n\t this.rsChooseRemoteStorageButton.addEventListener('click', function () {\n\t return _this4.setState('sign-in');\n\t });\n\t\n\t // Choose Dropbox button\n\t this.rsChooseDropboxButton.addEventListener('click', function () {\n\t return _this4.rs[\"dropbox\"].connect();\n\t });\n\t\n\t // Choose Google Drive button\n\t this.rsChooseGoogleDriveButton.addEventListener('click', function () {\n\t return _this4.rs[\"googledrive\"].connect();\n\t });\n\t\n\t // Disconnect button\n\t this.rsDisconnectButton.addEventListener('click', function () {\n\t return _this4.rs.disconnect();\n\t });\n\t\n\t this.rsErrorReconnectLink.addEventListener('click', function () {\n\t return _this4.rs.reconnect();\n\t });\n\t this.rsErrorDisconnectButton.addEventListener('click', function () {\n\t return _this4.rs.disconnect();\n\t });\n\t\n\t // Sync button\n\t if (this.rs.hasFeature('Sync')) {\n\t this.rsSyncButton.addEventListener('click', function () {\n\t if (_this4.rsSyncButton.classList.contains('rs-rotate')) {\n\t _this4.rs.stopSync();\n\t _this4.rsSyncButton.classList.remove(\"rs-rotate\");\n\t } else {\n\t _this4.rs.startSync();\n\t _this4.rsSyncButton.classList.add(\"rs-rotate\");\n\t }\n\t });\n\t }\n\t\n\t // Reduce to icon only if connected and clicked outside of widget\n\t document.addEventListener('click', function () {\n\t return _this4.close();\n\t });\n\t\n\t // Clicks on the widget stop the above event\n\t this.rsWidget.addEventListener('click', function (e) {\n\t return e.stopPropagation();\n\t });\n\t\n\t // Click on the logo to toggle the widget's open/close state\n\t this.rsLogo.addEventListener('click', function () {\n\t return _this4.toggle();\n\t });\n\t },\n\t\n\t\n\t /**\n\t * Toggle between the widget's open/close state.\n\t *\n\t * When then widget is open and in initial state, it will show the backend\n\t * chooser screen.\n\t */\n\t toggle: function toggle() {\n\t if (this.closed) {\n\t this.open();\n\t } else {\n\t if (this.state === 'initial') {\n\t this.showChooseOrSignIn();\n\t } else {\n\t this.close();\n\t }\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Open the widget.\n\t */\n\t open: function open() {\n\t this.closed = false;\n\t this.rsWidget.classList.remove('rs-closed');\n\t this.shouldCloseWhenSyncDone = false; // prevent auto-closing when user opened the widget\n\t },\n\t\n\t\n\t /**\n\t * Close the widget to only show the icon.\n\t *\n\t * If the ``leaveOpen`` config is true or there is no storage connected,\n\t * the widget will not close.\n\t */\n\t close: function close() {\n\t // don't do anything when we have an error\n\t if (this.state === 'error') {\n\t return;\n\t }\n\t\n\t if (!this.leaveOpen && this.active) {\n\t this.closed = true;\n\t this.rsWidget.classList.add('rs-closed');\n\t } else {\n\t this.setState(this.active ? 'connected' : 'initial');\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Mark the widget as offline.\n\t *\n\t * This will not do anything when no account is connected.\n\t *\n\t * @private\n\t */\n\t setOffline: function setOffline() {\n\t if (this.online) {\n\t this.rsWidget.classList.add('rs-offline');\n\t this.rsConnectedLabel.textContent = 'Offline';\n\t this.online = false;\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Mark the widget as online.\n\t *\n\t * @private\n\t */\n\t setOnline: function setOnline() {\n\t if (!this.online) {\n\t this.rsWidget.classList.remove('rs-offline');\n\t if (this.active) {\n\t this.rsConnectedLabel.textContent = 'Connected';\n\t }\n\t }\n\t this.online = true;\n\t },\n\t\n\t\n\t /**\n\t * Set the remoteStorage backend type to show the appropriate icon.\n\t * If no backend is given, all existing backend CSS classes will be removed.\n\t *\n\t * @param {string} [backend]\n\t *\n\t * @private\n\t */\n\t setBackendClass: function setBackendClass(backend) {\n\t this.rsWidget.classList.remove('rs-backend-remotestorage');\n\t this.rsWidget.classList.remove('rs-backend-dropbox');\n\t this.rsWidget.classList.remove('rs-backend-googledrive');\n\t\n\t if (backend) {\n\t this.rsWidget.classList.add('rs-backend-' + backend);\n\t }\n\t },\n\t showErrorBox: function showErrorBox(errorMsg) {\n\t this.rsErrorBox.innerHTML = errorMsg;\n\t this.setState('error');\n\t },\n\t hideErrorBox: function hideErrorBox() {\n\t this.rsErrorBox.innerHTML = '';\n\t this.close();\n\t },\n\t handleDiscoveryError: function handleDiscoveryError(error) {\n\t var msgContainer = document.querySelector('.rs-sign-in-error');\n\t msgContainer.innerHTML = error.message;\n\t msgContainer.classList.remove('rs-hidden');\n\t msgContainer.classList.add('rs-visible');\n\t },\n\t handleSyncError: function handleSyncError() /* error */{\n\t // console.debug('Encountered SyncError', error);\n\t this.open();\n\t this.showErrorBox('App sync error');\n\t },\n\t handleUnauthorized: function handleUnauthorized(error) {\n\t if (error.code && error.code === 'access_denied') {\n\t this.rs.disconnect();\n\t } else {\n\t this.open();\n\t this.showErrorBox(error.message + \" \");\n\t this.rsErrorBox.appendChild(this.rsErrorReconnectLink);\n\t this.rsErrorReconnectLink.classList.remove('rs-hidden');\n\t }\n\t },\n\t updateLastSyncedOutput: function updateLastSyncedOutput() {\n\t var now = new Date();\n\t var secondsSinceLastSync = Math.round((now.getTime() - this.lastSynced.getTime()) / 1000);\n\t var subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n\t subHeadlineEl.innerHTML = 'Synced ' + secondsSinceLastSync + ' seconds ago';\n\t }\n\t};\n\t\n\tmodule.exports = Widget;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = \"

Connect your storage

To sync data with your account

user@provider.com

Connected

Connect your storage

This app allows you to sync data with a storage of your choice. Read more

\";\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = \"/* RemoteStorage widget styles */\\n\\n.rs-widget {\\n box-sizing: border-box;\\n z-index: 21000000; /* Make sure we're on a reasonably high visibility layer */\\n overflow: hidden;\\n max-width: 350px;\\n padding: 10px;\\n margin: 10px;\\n border-radius: 3px;\\n background-color: #fff;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n font-family: arial, sans-serif;\\n font-size: 16px;\\n color: #333;\\n will-change: max-height, height, width, opacity, max-width, background, box-shadow;\\n transition-property: width, height, opacity, max-width, max-height, background, box-shadow;\\n transition-duration: 300ms;\\n}\\n\\n.rs-widget * {\\n box-sizing: border-box;\\n}\\n\\n.rs-widget .rs-hidden {\\n display: none;\\n}\\n\\n.rs-box {\\n overflow: hidden;\\n will-change: height;\\n transition-property: height, width, max-height;\\n transition-duration: 300ms;\\n transition-timing-function: ease-in;\\n opacity: 0;\\n max-height: 0px;\\n}\\n\\n.rs-box.rs-selected {\\n opacity: 1;\\n max-height: 420px;\\n}\\n\\n/* Main logo */\\n.rs-main-logo {\\n float: left;\\n height: 36px;\\n width: 36px;\\n margin-top: 1px;\\n margin-right: 0.625em;\\n transition: margin-left 300ms ease-out, transform 300ms ease-out;\\n cursor: pointer;\\n}\\n.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage,\\n{\\n display: normal;\\n}\\n.rs-widget[class*=\\\"rs-backend-\\\"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {\\n display: none;\\n}\\n.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {\\n display: none;\\n}\\n.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {\\n display: none;\\n}\\n\\npolygon.rs-logo-shape {\\n fill: #FF4B03;\\n}\\n\\npolygon.rs-logo-shape,\\n#rs-main-logo-dropbox path,\\n#rs-main-logo-googledrive path {\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n.rs-offline polygon.rs-logo-shape,\\n.rs-offline #rs-main-logo-dropbox path,\\n.rs-offline #rs-main-logo-googledrive path {\\n fill: #888;\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n/* Hide everything except logo when connected and clicked outside of box */\\n.rs-closed {\\n max-width: 56px;\\n background-color: transparent;\\n box-shadow: none;\\n opacity: 0.5;\\n\\n transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms; \\n}\\n\\n.rs-closed:hover {\\n cursor: pointer;\\n opacity: 1;\\n}\\n\\n.rs-box-initial {\\n transition-duration: 0ms;\\n}\\n\\n.rs-box-initial:hover {\\n cursor: pointer;\\n}\\n\\n.rs-widget a {\\n color: #0093cc;\\n}\\n\\n/* HEADLINE */\\n.rs-small-headline {\\n font-size: 1em;\\n font-weight: bold;\\n margin: 0;\\n margin-bottom: 2px;\\n height: 1.2em;\\n word-break: break-all;\\n overflow: hidden;\\n line-height: 1em;\\n}\\n\\n.rs-sub-headline {\\n word-break: break-all;\\n overflow: hidden;\\n color: #666;\\n font-size: 0.92em;\\n height: 1.2em;\\n}\\n.rs-big-headline {\\n font-size: 1.625em;\\n font-weight: normal;\\n text-align: center;\\n margin-top: 20px;\\n margin-bottom: 20px;\\n}\\n\\n/* BUTTONS */\\n.rs-button {\\n font: inherit;\\n color: inherit;\\n background-color: transparent;\\n border: 1px solid #dcdcdc;\\n border-radius: 3px;\\n cursor: pointer;\\n}\\n.rs-button-small {\\n padding: 0.5em 0.6em;\\n margin-left: 0.3em;\\n transition: border-color 300ms ease-out;\\n}\\n.rs-button-wrap {\\n margin-top: 10px;\\n}\\n\\n.rs-button-wrap img,\\n.rs-button-wrap svg {\\n float: left;\\n margin-right: 0.6em;\\n width: 40px;\\n height: 40px;\\n}\\n\\n.rs-button-big {\\n padding: 15px 10px;\\n margin-bottom: 10px;\\n display: block;\\n width: 100%;\\n text-align: left;\\n transition: box-shadow 200ms;\\n}\\n.rs-button-big > div {\\n font-size: 1.125em;\\n padding: 10px 0;\\n}\\n.rs-button-big:hover {\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:active {\\n background-color: #eee;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:last-child {\\n margin-bottom: 0;\\n}\\n\\n.rs-content {\\n padding: 0 10px 10px 10px;\\n}\\n\\n\\n.rs-state-choose .rs-main-logo,\\n.rs-state-sign-in .rs-main-logo {\\n margin-left: 45%;\\n float: none;\\n}\\n\\n.rs-sign-in-form input[type=text] {\\n padding: 15px 10px;\\n display: block;\\n width: 100%;\\n font: inherit;\\n height: 52px;\\n border: 1px solid #aaa;\\n border-radius: 0;\\n box-shadow: none;\\n}\\n.rs-sign-in-form input[type=submit] {\\n padding: 15px 10px;\\n margin-top: 20px;\\n margin-bottom: 15px;\\n display: block;\\n width: 100%;\\n border: none;\\n border-radius: 3px;\\n background-color: #3fb34f;\\n font: inherit;\\n color: #fff;\\n transition: box-shadow 200ms, background-color 200ms;\\n}\\n.rs-sign-in-form input[type=submit]:hover {\\n cursor: pointer;\\n background-color: #4BCB5D;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-sign-in-form input[type=submit]:active {\\n background-color: #3fb34f;\\n}\\n\\n.rs-sign-in-error.rs-hidden,\\n.rs-box-error.rs-hidden {\\n height: 0;\\n}\\n\\n.rs-sign-in-error.rs-visible,\\n.rs-box-error.rs-visible {\\n height: auto;\\n border-radius: 3px;\\n padding: 0.5em 0.5em;\\n margin-top: 0.5em;\\n text-align: center;\\n background-color: rgba(255,0,0,0.1);\\n color: darkred;\\n}\\n\\n.rs-box-error .rs-error-message {\\n float: left;\\n max-width: 242px;\\n}\\n\\n /*Choose provider box */\\n.rs-box-choose {\\n text-align: center;\\n overflow: hidden;\\n}\\n\\n.rs-box-choose p {\\n margin-top: 0;\\n margin-bottom: 20px;\\n line-height: 1.4em;\\n}\\n\\n/*Connected box */\\n.rs-box-connected {\\n height: 40px;\\n transition: height 0s;\\n}\\n.rs-connected-text {\\n float: left;\\n}\\n.rs-box-connected .rs-user {\\n font-weight: bold;\\n max-width: 210px;\\n text-overflow: ellipsis;\\n overflow: hidden;\\n word-break: keep-all;\\n}\\n.rs-connected-buttons, .rs-error-buttons {\\n float: right;\\n}\\n.rs-disconnect:hover {\\n border-color: #FF2D2D;\\n}\\n.rs-disconnect:hover .rs-icon{\\n fill: #FF2D2D;\\n}\\n.rs-sync:hover {\\n border-color: #FFBB0C;\\n}\\n.rs-sync:hover .rs-icon {\\n fill: #FFBB0C;\\n}\\n.rs-sync.rs-rotate {\\n border-color: #FFBB0C;\\n}\\n.rs-sync.rs-rotate .rs-icon {\\n fill: #FFBB0C;\\n animation: rs-spin 1s linear infinite;\\n}\\n@keyframes rs-spin { 100% { transform: rotate(360deg); transform:rotate(360deg); } }\\n\\n/* Floating widget styles (top right corner) */\\n.rs-floating {\\n position: fixed;\\n top: 0;\\n right: 0;\\n}\\n\\n\\n/* Small/mobile screens */\\n@media screen and (max-width: 420px) {\\n .rs-widget {\\n font-size: 100%;\\n transition: all 300ms ease-out;\\n max-width: 400px;\\n }\\n .rs-floating {\\n position: relative;\\n top: auto;\\n right: auto\\n }\\n .rs-closed {\\n max-width: 56px;\\n }\\n .rs-state-choose,\\n .rs-state-sign-in {\\n position: fixed;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n max-width: 100%;\\n }\\n}\\n\\n/* remove dotted outline border on Firefox */\\n.rs-widget a:focus,\\n.rs-widget a:active,\\n.rs-widget button:focus,\\n.rs-widget input:focus {\\n outline:none;\\n}\\n.rs-widget button::-moz-focus-inner, \\n.rs-widget input[type=\\\"button\\\"]::-moz-focus-inner,\\n.rs-widget input[type=\\\"submit\\\"]::-moz-focus-inner {\\n border:0;\\n}\\n\\n/* prevent rounded buttons on mobile Safari */\\n.rs-widget input[type=\\\"button\\\"],\\n.rs-widget input[type=\\\"submit\\\"] {\\n -webkit-appearance: none;\\n}\\n\"\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// widget.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 15be14e066448214a0cc","/**\n * RemoteStorage connect widget\n * @constructor\n *\n * @param {object} remoteStorage - remoteStorage instance\n * @param {object} options - Widget options\n * @param {boolean} options.leaveOpen - Do not minimize widget when user clicks\n * outside of it (default: false)\n * @param {number} options.autoCloseAfter - Time after which the widget closes\n * automatically in ms (default: 1500)\n * @param {boolean} options.logging - Enable logging (default: false)\n */\nlet Widget = function(remoteStorage, options={}) {\n this.rs = remoteStorage;\n\n this.state = 'initial';\n\n // true if we have remoteStorage connection's info\n this.active = false;\n\n // remoteStorage is connected!\n this.online = false;\n\n // widget is minimized ?\n this.closed = false;\n\n this.leaveOpen = options.leaveOpen ? options.leaveOpen : false;\n\n this.logging = typeof options.logging === 'boolean' ? options.logging : false;\n\n this.autoCloseAfter = options.autoCloseAfter ? options.autoCloseAfter : 1500;\n\n this.lastSynced = null;\n this.lastSyncedUpdateLoop = null;\n};\n\n\nWidget.prototype = {\n\n log (...msg) {\n if (this.logging) {\n console.debug('[RS-WIDGET] ', ...msg);\n }\n },\n\n // handle events !\n eventHandler (event, msg) {\n this.log('EVENT: ', event);\n switch (event) {\n case 'ready':\n this.setState(this.state);\n break;\n case 'sync-req-done':\n this.rsSyncButton.classList.add(\"rs-rotate\");\n break;\n case 'sync-done':\n this.rsSyncButton.classList.remove(\"rs-rotate\");\n\n if (this.rsWidget.classList.contains('rs-state-unauthorized') ||\n !this.rs.remote.online) {\n this.updateLastSyncedOutput();\n } else if (this.rs.remote.online) {\n this.lastSynced = new Date();\n let subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n subHeadlineEl.innerHTML = 'Synced just now';\n }\n\n if (!this.closed && this.shouldCloseWhenSyncDone) {\n setTimeout(this.close.bind(this), this.autoCloseAfter);\n }\n break;\n case 'disconnected':\n this.active = false;\n this.setOnline();\n this.setBackendClass(); // removes all backend CSS classes\n this.setState('initial');\n break;\n case 'connected':\n this.active = true;\n this.online = true;\n if (this.rs.hasFeature('Sync')) {\n this.shouldCloseWhenSyncDone = true;\n this.rs.on('sync-req-done', () => this.eventHandler('sync-req-done'));\n this.rs.on('sync-done', () => this.eventHandler('sync-done'));\n } else {\n this.rsSyncButton.classList.add('rs-hidden');\n setTimeout(this.close.bind(this), this.autoCloseAfter);\n }\n let connectedUser = this.rs.remote.userAddress;\n this.rsConnectedUser.innerHTML = connectedUser;\n this.setBackendClass(this.rs.backend);\n this.rsConnectedLabel.textContent = 'Connected';\n this.setState('connected');\n break;\n case 'network-offline':\n this.setOffline();\n break;\n case 'network-online':\n this.setOnline();\n break;\n case 'error':\n this.setBackendClass(this.rs.backend);\n\n if (msg.name === 'DiscoveryError') {\n this.handleDiscoveryError(msg);\n } else if (msg.name === 'SyncError') {\n this.handleSyncError(msg);\n } else if (msg.name === 'Unauthorized') {\n this.handleUnauthorized(msg);\n } else {\n console.debug('Encountered unhandled error', msg);\n }\n break;\n }\n },\n\n setState (state) {\n if (state) {\n this.log('Setting state ', state);\n let lastSelected = document.querySelector('.rs-box.rs-selected');\n if (lastSelected) {\n lastSelected.classList.remove('rs-selected');\n }\n\n let toSelect = document.querySelector('.rs-box.rs-box-'+state);\n if (toSelect) {\n toSelect.classList.add('rs-selected');\n }\n\n let currentStateClass = this.rsWidget.className.match(/rs-state-\\S+/g)[0];\n this.rsWidget.classList.remove(currentStateClass);\n this.rsWidget.classList.add(`rs-state-${state || this.state}`);\n\n this.state = state;\n }\n },\n\n /**\n * Create the widget element and add styling.\n *\n * @returns {object} The widget's DOM element\n *\n * @private\n */\n createHtmlTemplate () {\n const element = document.createElement('div');\n const style = document.createElement('style');\n style.innerHTML = require('raw!./assets/styles.css');\n\n element.id = \"remotestorage-widget\";\n element.innerHTML = require('html!./assets/widget.html');\n element.appendChild(style);\n\n return element;\n },\n\n /**\n * Save all interactive DOM elements as variables for later access.\n *\n * @private\n */\n setupElements () {\n this.rsWidget = document.querySelector('.rs-widget');\n this.rsInitial = document.querySelector('.rs-box-initial');\n this.rsChoose = document.querySelector('.rs-box-choose');\n this.rsConnected = document.querySelector('.rs-box-connected');\n this.rsSignIn = document.querySelector('.rs-box-sign-in');\n\n this.rsConnectedLabel = document.querySelector('.rs-box-connected .rs-sub-headline')\n this.rsChooseRemoteStorageButton = document.querySelector('button.rs-choose-rs');\n this.rsChooseDropboxButton = document.querySelector('button.rs-choose-dropbox');\n this.rsChooseGoogleDriveButton = document.querySelector('button.rs-choose-googledrive');\n this.rsErrorBox = document.querySelector('.rs-box-error .rs-error-message');\n\n // check if apiKeys is set for Dropbox or Google [googledrive, dropbox]\n // to show/hide relative buttons only if needed\n if (! this.rs.apiKeys.hasOwnProperty('googledrive')) {\n this.rsChooseGoogleDriveButton.parentNode.removeChild(this.rsChooseGoogleDriveButton);\n }\n\n if (! this.rs.apiKeys.hasOwnProperty('dropbox')) {\n this.rsChooseDropboxButton.parentNode.removeChild(this.rsChooseDropboxButton);\n }\n\n this.rsSignInForm = document.querySelector('.rs-sign-in-form');\n\n this.rsDisconnectButton = document.querySelector('.rs-disconnect');\n this.rsSyncButton = document.querySelector('.rs-sync');\n this.rsLogo = document.querySelector('.rs-widget-icon');\n\n this.rsErrorReconnectLink = document.querySelector('.rs-box-error a.rs-reconnect');\n this.rsErrorDisconnectButton = document.querySelector('.rs-box-error button.rs-disconnect');\n\n this.rsConnectedUser = document.querySelector('.rs-connected-text h1.rs-user');\n },\n\n /**\n * Setup all event handlers\n *\n * @private\n */\n setupHandlers () {\n this.rs.on('connected', () => this.eventHandler('connected'));\n this.rs.on('ready', () => this.eventHandler('ready'));\n this.rs.on('disconnected', () => this.eventHandler('disconnected'));\n this.rs.on('network-online', () => this.eventHandler('network-online'));\n this.rs.on('network-offline', () => this.eventHandler('network-offline'));\n this.rs.on('error', (error) => this.eventHandler('error', error));\n\n this.setEventListeners();\n this.setClickHandlers();\n },\n\n /**\n * Append widget to the DOM.\n *\n * If an elementId is specified, it will be appended to that element,\n * otherwise it will be appended to the document's body.\n *\n * @param {String} [elementId] - Widget's parent\n */\n attach (elementId) {\n const domElement = this.createHtmlTemplate();\n\n if (elementId) {\n const parent = document.getElementById(elementId);\n if (!parent) {\n throw \"Failed to find target DOM element with id=\\\"\" + elementId + \"\\\"\";\n }\n parent.appendChild(domElement);\n } else {\n document.body.appendChild(domElement);\n }\n\n this.setupElements();\n this.setupHandlers();\n },\n\n setEventListeners () {\n // Sign-in form\n this.rsSignInForm.addEventListener('submit', (e) => {\n e.preventDefault();\n let userAddress = document.querySelector('input[name=rs-user-address]').value;\n this.rs.connect(userAddress);\n });\n },\n\n /**\n * Show the screen for choosing a backend if there is more than one backend\n * to choose from. Otherwise it directly shows the remoteStorage connect\n * screen.\n *\n * @private\n */\n showChooseOrSignIn () {\n // choose backend only if some providers are declared\n if (this.rs.apiKeys && Object.keys(this.rs.apiKeys).length > 0) {\n this.setState('choose');\n } else {\n this.setState('sign-in');\n }\n },\n\n setClickHandlers () {\n // Initial button\n this.rsInitial.addEventListener('click', () => this.showChooseOrSignIn() );\n\n // Choose RS button\n this.rsChooseRemoteStorageButton.addEventListener('click', () => this.setState('sign-in') );\n\n // Choose Dropbox button\n this.rsChooseDropboxButton.addEventListener('click', () => this.rs[\"dropbox\"].connect() );\n\n // Choose Google Drive button\n this.rsChooseGoogleDriveButton.addEventListener('click', () => this.rs[\"googledrive\"].connect() );\n\n // Disconnect button\n this.rsDisconnectButton.addEventListener('click', () => this.rs.disconnect() );\n\n this.rsErrorReconnectLink.addEventListener('click', () => this.rs.reconnect() );\n this.rsErrorDisconnectButton.addEventListener('click', () => this.rs.disconnect() );\n\n // Sync button\n if (this.rs.hasFeature('Sync')) {\n this.rsSyncButton.addEventListener('click', () => {\n if (this.rsSyncButton.classList.contains('rs-rotate')) {\n this.rs.stopSync();\n this.rsSyncButton.classList.remove(\"rs-rotate\");\n } else {\n this.rs.startSync();\n this.rsSyncButton.classList.add(\"rs-rotate\");\n }\n });\n }\n\n // Reduce to icon only if connected and clicked outside of widget\n document.addEventListener('click', () => this.close() );\n\n // Clicks on the widget stop the above event\n this.rsWidget.addEventListener('click', e => e.stopPropagation() );\n\n // Click on the logo to toggle the widget's open/close state\n this.rsLogo.addEventListener('click', () => this.toggle() );\n },\n\n /**\n * Toggle between the widget's open/close state.\n *\n * When then widget is open and in initial state, it will show the backend\n * chooser screen.\n */\n toggle () {\n if (this.closed) {\n this.open();\n } else {\n if (this.state === 'initial') {\n this.showChooseOrSignIn();\n } else {\n this.close();\n }\n }\n },\n\n /**\n * Open the widget.\n */\n open () {\n this.closed = false;\n this.rsWidget.classList.remove('rs-closed');\n this.shouldCloseWhenSyncDone = false; // prevent auto-closing when user opened the widget\n },\n\n /**\n * Close the widget to only show the icon.\n *\n * If the ``leaveOpen`` config is true or there is no storage connected,\n * the widget will not close.\n */\n close () {\n // don't do anything when we have an error\n if (this.state === 'error') { return; }\n\n if (!this.leaveOpen && this.active) {\n this.closed = true;\n this.rsWidget.classList.add('rs-closed');\n } else {\n this.setState(this.active ? 'connected' : 'initial');\n }\n },\n\n\n /**\n * Mark the widget as offline.\n *\n * This will not do anything when no account is connected.\n *\n * @private\n */\n setOffline () {\n if (this.online) {\n this.rsWidget.classList.add('rs-offline');\n this.rsConnectedLabel.textContent = 'Offline';\n this.online = false;\n }\n },\n\n /**\n * Mark the widget as online.\n *\n * @private\n */\n setOnline () {\n if (!this.online) {\n this.rsWidget.classList.remove('rs-offline');\n if (this.active) {\n this.rsConnectedLabel.textContent = 'Connected';\n }\n }\n this.online = true;\n },\n\n /**\n * Set the remoteStorage backend type to show the appropriate icon.\n * If no backend is given, all existing backend CSS classes will be removed.\n *\n * @param {string} [backend]\n *\n * @private\n */\n setBackendClass (backend) {\n this.rsWidget.classList.remove('rs-backend-remotestorage');\n this.rsWidget.classList.remove('rs-backend-dropbox');\n this.rsWidget.classList.remove('rs-backend-googledrive');\n\n if (backend) {\n this.rsWidget.classList.add(`rs-backend-${backend}`);\n }\n },\n\n showErrorBox (errorMsg) {\n this.rsErrorBox.innerHTML = errorMsg;\n this.setState('error');\n },\n\n hideErrorBox () {\n this.rsErrorBox.innerHTML = '';\n this.close();\n },\n\n handleDiscoveryError (error) {\n let msgContainer = document.querySelector('.rs-sign-in-error');\n msgContainer.innerHTML = error.message;\n msgContainer.classList.remove('rs-hidden');\n msgContainer.classList.add('rs-visible');\n },\n\n handleSyncError (/* error */) {\n // console.debug('Encountered SyncError', error);\n this.open();\n this.showErrorBox('App sync error');\n },\n\n handleUnauthorized (error) {\n if (error.code && error.code === 'access_denied') {\n this.rs.disconnect();\n } else {\n this.open();\n this.showErrorBox(error.message + \" \");\n this.rsErrorBox.appendChild(this.rsErrorReconnectLink);\n this.rsErrorReconnectLink.classList.remove('rs-hidden');\n }\n },\n\n updateLastSyncedOutput () {\n let now = new Date();\n let secondsSinceLastSync = Math.round((now.getTime() - this.lastSynced.getTime())/1000);\n let subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n subHeadlineEl.innerHTML = `Synced ${secondsSinceLastSync} seconds ago`;\n }\n};\n\nmodule.exports = Widget;\n\n\n\n// WEBPACK FOOTER //\n// ./src/widget.js","module.exports = \"

Connect your storage

To sync data with your account

user@provider.com

Connected

Connect your storage

This app allows you to sync data with a storage of your choice. Read more

\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/html-loader!./src/assets/widget.html\n// module id = 2\n// module chunks = 0","module.exports = \"/* RemoteStorage widget styles */\\n\\n.rs-widget {\\n box-sizing: border-box;\\n z-index: 21000000; /* Make sure we're on a reasonably high visibility layer */\\n overflow: hidden;\\n max-width: 350px;\\n padding: 10px;\\n margin: 10px;\\n border-radius: 3px;\\n background-color: #fff;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n font-family: arial, sans-serif;\\n font-size: 16px;\\n color: #333;\\n will-change: max-height, height, width, opacity, max-width, background, box-shadow;\\n transition-property: width, height, opacity, max-width, max-height, background, box-shadow;\\n transition-duration: 300ms;\\n}\\n\\n.rs-widget * {\\n box-sizing: border-box;\\n}\\n\\n.rs-widget .rs-hidden {\\n display: none;\\n}\\n\\n.rs-box {\\n overflow: hidden;\\n will-change: height;\\n transition-property: height, width, max-height;\\n transition-duration: 300ms;\\n transition-timing-function: ease-in;\\n opacity: 0;\\n max-height: 0px;\\n}\\n\\n.rs-box.rs-selected {\\n opacity: 1;\\n max-height: 420px;\\n}\\n\\n/* Main logo */\\n.rs-main-logo {\\n float: left;\\n height: 36px;\\n width: 36px;\\n margin-top: 1px;\\n margin-right: 0.625em;\\n transition: margin-left 300ms ease-out, transform 300ms ease-out;\\n cursor: pointer;\\n}\\n.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage,\\n{\\n display: normal;\\n}\\n.rs-widget[class*=\\\"rs-backend-\\\"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {\\n display: none;\\n}\\n.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {\\n display: none;\\n}\\n.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {\\n display: none;\\n}\\n\\npolygon.rs-logo-shape {\\n fill: #FF4B03;\\n}\\n\\npolygon.rs-logo-shape,\\n#rs-main-logo-dropbox path,\\n#rs-main-logo-googledrive path {\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n.rs-offline polygon.rs-logo-shape,\\n.rs-offline #rs-main-logo-dropbox path,\\n.rs-offline #rs-main-logo-googledrive path {\\n fill: #888;\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n/* Hide everything except logo when connected and clicked outside of box */\\n.rs-closed {\\n max-width: 56px;\\n background-color: transparent;\\n box-shadow: none;\\n opacity: 0.5;\\n\\n transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms; \\n}\\n\\n.rs-closed:hover {\\n cursor: pointer;\\n opacity: 1;\\n}\\n\\n.rs-box-initial {\\n transition-duration: 0ms;\\n}\\n\\n.rs-box-initial:hover {\\n cursor: pointer;\\n}\\n\\n.rs-widget a {\\n color: #0093cc;\\n}\\n\\n/* HEADLINE */\\n.rs-small-headline {\\n font-size: 1em;\\n font-weight: bold;\\n margin: 0;\\n margin-bottom: 2px;\\n height: 1.2em;\\n word-break: break-all;\\n overflow: hidden;\\n line-height: 1em;\\n}\\n\\n.rs-sub-headline {\\n word-break: break-all;\\n overflow: hidden;\\n color: #666;\\n font-size: 0.92em;\\n height: 1.2em;\\n}\\n.rs-big-headline {\\n font-size: 1.625em;\\n font-weight: normal;\\n text-align: center;\\n margin-top: 20px;\\n margin-bottom: 20px;\\n}\\n\\n/* BUTTONS */\\n.rs-button {\\n font: inherit;\\n color: inherit;\\n background-color: transparent;\\n border: 1px solid #dcdcdc;\\n border-radius: 3px;\\n cursor: pointer;\\n}\\n.rs-button-small {\\n padding: 0.5em 0.6em;\\n margin-left: 0.3em;\\n transition: border-color 300ms ease-out;\\n}\\n.rs-button-wrap {\\n margin-top: 10px;\\n}\\n\\n.rs-button-wrap img,\\n.rs-button-wrap svg {\\n float: left;\\n margin-right: 0.6em;\\n width: 40px;\\n height: 40px;\\n}\\n\\n.rs-button-big {\\n padding: 15px 10px;\\n margin-bottom: 10px;\\n display: block;\\n width: 100%;\\n text-align: left;\\n transition: box-shadow 200ms;\\n}\\n.rs-button-big > div {\\n font-size: 1.125em;\\n padding: 10px 0;\\n}\\n.rs-button-big:hover {\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:active {\\n background-color: #eee;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:last-child {\\n margin-bottom: 0;\\n}\\n\\n.rs-content {\\n padding: 0 10px 10px 10px;\\n}\\n\\n\\n.rs-state-choose .rs-main-logo,\\n.rs-state-sign-in .rs-main-logo {\\n margin-left: 45%;\\n float: none;\\n}\\n\\n.rs-sign-in-form input[type=text] {\\n padding: 15px 10px;\\n display: block;\\n width: 100%;\\n font: inherit;\\n height: 52px;\\n border: 1px solid #aaa;\\n border-radius: 0;\\n box-shadow: none;\\n}\\n.rs-sign-in-form input[type=submit] {\\n padding: 15px 10px;\\n margin-top: 20px;\\n margin-bottom: 15px;\\n display: block;\\n width: 100%;\\n border: none;\\n border-radius: 3px;\\n background-color: #3fb34f;\\n font: inherit;\\n color: #fff;\\n transition: box-shadow 200ms, background-color 200ms;\\n}\\n.rs-sign-in-form input[type=submit]:hover {\\n cursor: pointer;\\n background-color: #4BCB5D;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-sign-in-form input[type=submit]:active {\\n background-color: #3fb34f;\\n}\\n\\n.rs-sign-in-error.rs-hidden,\\n.rs-box-error.rs-hidden {\\n height: 0;\\n}\\n\\n.rs-sign-in-error.rs-visible,\\n.rs-box-error.rs-visible {\\n height: auto;\\n border-radius: 3px;\\n padding: 0.5em 0.5em;\\n margin-top: 0.5em;\\n text-align: center;\\n background-color: rgba(255,0,0,0.1);\\n color: darkred;\\n}\\n\\n.rs-box-error .rs-error-message {\\n float: left;\\n max-width: 242px;\\n}\\n\\n /*Choose provider box */\\n.rs-box-choose {\\n text-align: center;\\n overflow: hidden;\\n}\\n\\n.rs-box-choose p {\\n margin-top: 0;\\n margin-bottom: 20px;\\n line-height: 1.4em;\\n}\\n\\n/*Connected box */\\n.rs-box-connected {\\n height: 40px;\\n transition: height 0s;\\n}\\n.rs-connected-text {\\n float: left;\\n}\\n.rs-box-connected .rs-user {\\n font-weight: bold;\\n max-width: 210px;\\n text-overflow: ellipsis;\\n overflow: hidden;\\n word-break: keep-all;\\n}\\n.rs-connected-buttons, .rs-error-buttons {\\n float: right;\\n}\\n.rs-disconnect:hover {\\n border-color: #FF2D2D;\\n}\\n.rs-disconnect:hover .rs-icon{\\n fill: #FF2D2D;\\n}\\n.rs-sync:hover {\\n border-color: #FFBB0C;\\n}\\n.rs-sync:hover .rs-icon {\\n fill: #FFBB0C;\\n}\\n.rs-sync.rs-rotate {\\n border-color: #FFBB0C;\\n}\\n.rs-sync.rs-rotate .rs-icon {\\n fill: #FFBB0C;\\n animation: rs-spin 1s linear infinite;\\n}\\n@keyframes rs-spin { 100% { transform: rotate(360deg); transform:rotate(360deg); } }\\n\\n/* Floating widget styles (top right corner) */\\n.rs-floating {\\n position: fixed;\\n top: 0;\\n right: 0;\\n}\\n\\n\\n/* Small/mobile screens */\\n@media screen and (max-width: 420px) {\\n .rs-widget {\\n font-size: 100%;\\n transition: all 300ms ease-out;\\n max-width: 400px;\\n }\\n .rs-floating {\\n position: relative;\\n top: auto;\\n right: auto\\n }\\n .rs-closed {\\n max-width: 56px;\\n }\\n .rs-state-choose,\\n .rs-state-sign-in {\\n position: fixed;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n max-width: 100%;\\n }\\n}\\n\\n/* remove dotted outline border on Firefox */\\n.rs-widget a:focus,\\n.rs-widget a:active,\\n.rs-widget button:focus,\\n.rs-widget input:focus {\\n outline:none;\\n}\\n.rs-widget button::-moz-focus-inner, \\n.rs-widget input[type=\\\"button\\\"]::-moz-focus-inner,\\n.rs-widget input[type=\\\"submit\\\"]::-moz-focus-inner {\\n border:0;\\n}\\n\\n/* prevent rounded buttons on mobile Safari */\\n.rs-widget input[type=\\\"button\\\"],\\n.rs-widget input[type=\\\"submit\\\"] {\\n -webkit-appearance: none;\\n}\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/raw-loader!./src/assets/styles.css\n// module id = 3\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///widget.js","webpack:///webpack/bootstrap 7e120a7461003580fd03","webpack:///./src/widget.js","webpack:///./src/assets/widget.html","webpack:///./src/assets/styles.css"],"names":["root","factory","exports","module","define","amd","Widget","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","remoteStorage","options","arguments","length","undefined","rs","state","active","online","closed","leaveOpen","logging","autoCloseAfter","lastSynced","lastSyncedUpdateLoop","prototype","log","_console","_len","msg","Array","_key","console","debug","apply","concat","eventHandler","event","_this","setState","rsSyncButton","classList","add","remove","rsWidget","contains","remote","updateLastSyncedOutput","Date","subHeadlineEl","document","querySelector","innerHTML","shouldCloseWhenSyncDone","setTimeout","close","bind","setOnline","setBackendClass","hasFeature","on","connectedUser","userAddress","rsConnectedUser","backend","rsConnectedLabel","textContent","setOffline","name","handleDiscoveryError","handleSyncError","handleUnauthorized","lastSelected","toSelect","currentStateClass","className","match","createHtmlTemplate","element","createElement","style","appendChild","setupElements","rsInitial","rsChoose","rsConnected","rsSignIn","rsChooseRemoteStorageButton","rsChooseDropboxButton","rsChooseGoogleDriveButton","rsErrorBox","apiKeys","hasOwnProperty","parentNode","removeChild","rsSignInForm","rsDisconnectButton","rsLogo","rsErrorReconnectLink","rsErrorDisconnectButton","setupHandlers","_this2","error","setEventListeners","setClickHandlers","attach","elementId","domElement","parent","getElementById","body","_this3","addEventListener","e","preventDefault","value","connect","showChooseOrSignIn","Object","keys","_this4","dropbox","googledrive","disconnect","reconnect","stopSync","startSync","stopPropagation","toggle","open","showErrorBox","errorMsg","hideErrorBox","msgContainer","message","code","now","secondsSinceLastSync","Math","round","getTime"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAAI,OAAAL,IAEAD,EAAAM,OAAAL,KACCM,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAR,OAGA,IAAAC,GAAAQ,EAAAD,IACAR,WACAU,GAAAF,EACAG,UAUA,OANAL,GAAAE,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAU,UAGAV,EAAAD,QAvBA,GAAAS,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUN,EAAQD,EAASO,GAEhCN,EAAOD,QAAUO,EAAoB,IAKhC,SAAUN,EAAQD,EAASO,GAEhC,YEnDD,IAAIH,GAAS,SAASY,GAA2B,GAAZC,GAAYC,UAAAC,OAAA,GAAAC,SAAAF,UAAA,GAAAA,UAAA,KAC/Cb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BAC/B5C,KAAK6C,SAASH,UAAUE,OAAO,sBAC/B5C,KAAK6C,SAASH,UAAUE,OAAO,0BAE3BqB,GACFjE,KAAK6C,SAASH,UAAUC,IAAxB,cAA0CsB,IAI9CkE,aA1WiB,SA0WHC,GACZpI,KAAK2F,WAAWtC,UAAY+E,EAC5BpI,KAAKwC,SAAS,UAGhB6F,aA/WiB,WAgXfrI,KAAK2F,WAAWtC,UAAY,GAC5BrD,KAAKwD,SAGPc,qBApXiB,SAoXKiC,GACpB,GAAI+B,GAAenF,SAASC,cAAc,oBAC1CkF,GAAajF,UAAYkD,EAAMgC,QAC/BD,EAAa5F,UAAUE,OAAO,aAC9B0F,EAAa5F,UAAUC,IAAI,eAG7B4B,gBA3XiB,WA6XfvE,KAAKkI,OACLlI,KAAKmI,aAAa,mBAGpB3D,mBAjYiB,SAiYG+B,GACdA,EAAMiC,MAAuB,kBAAfjC,EAAMiC,KACtBxI,KAAKgB,GAAG4G,cAER5H,KAAKkI,OACLlI,KAAKmI,aAAa5B,EAAMgC,QAAU,KAClCvI,KAAK2F,WAAWT,YAAYlF,KAAKmG,sBACjCnG,KAAKmG,qBAAqBzD,UAAUE,OAAO,eAI/CI,uBA5YiB,WA6Yf,GAAKhD,KAAKwB,WAAV,CACA,GAAIiH,GAAM,GAAIxF,MACVyF,EAAuBC,KAAKC,OAAOH,EAAII,UAAY7I,KAAKwB,WAAWqH,WAAW,KAC9E3F,EAAgBC,SAASC,cAAc,qCAC3CF,GAAcG,UAAd,UAAoCqF,EAApC,kBAIJ9I,EAAOD,QAAUI,GF4HX,SAAUH,EAAQD,GGtjBxBC,EAAAD,QAAA;EH4jBM,SAAUC,EAAQD,GI5jBxBC,EAAAD,QAAA","file":"widget.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Widget\"] = factory();\n\telse\n\t\troot[\"Widget\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Widget\"] = factory();\n\telse\n\t\troot[\"Widget\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t/**\n\t * RemoteStorage connect widget\n\t * @constructor\n\t *\n\t * @param {object} remoteStorage - remoteStorage instance\n\t * @param {object} options - Widget options\n\t * @param {boolean} options.leaveOpen - Do not minimize widget when user clicks\n\t * outside of it (default: false)\n\t * @param {number} options.autoCloseAfter - Time after which the widget closes\n\t * automatically in ms (default: 1500)\n\t * @param {boolean} options.logging - Enable logging (default: false)\n\t */\n\tvar Widget = function Widget(remoteStorage) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\n\t this.rs = remoteStorage;\n\t\n\t this.state = 'initial';\n\t\n\t // true if we have remoteStorage connection's info\n\t this.active = false;\n\t\n\t // remoteStorage is connected!\n\t this.online = false;\n\t\n\t // widget is minimized ?\n\t this.closed = false;\n\t\n\t this.leaveOpen = options.leaveOpen ? options.leaveOpen : false;\n\t\n\t this.logging = typeof options.logging === 'boolean' ? options.logging : false;\n\t\n\t this.autoCloseAfter = options.autoCloseAfter ? options.autoCloseAfter : 1500;\n\t\n\t this.lastSynced = null;\n\t this.lastSyncedUpdateLoop = null;\n\t};\n\t\n\tWidget.prototype = {\n\t log: function log() {\n\t if (this.logging) {\n\t var _console;\n\t\n\t for (var _len = arguments.length, msg = Array(_len), _key = 0; _key < _len; _key++) {\n\t msg[_key] = arguments[_key];\n\t }\n\t\n\t (_console = console).debug.apply(_console, ['[RS-WIDGET] '].concat(msg));\n\t }\n\t },\n\t\n\t\n\t // handle events !\n\t eventHandler: function eventHandler(event, msg) {\n\t var _this = this;\n\t\n\t this.log('EVENT: ', event);\n\t switch (event) {\n\t case 'ready':\n\t this.setState(this.state);\n\t break;\n\t case 'sync-req-done':\n\t this.rsSyncButton.classList.add(\"rs-rotate\");\n\t break;\n\t case 'sync-done':\n\t this.rsSyncButton.classList.remove(\"rs-rotate\");\n\t\n\t if (this.rsWidget.classList.contains('rs-state-unauthorized') || !this.rs.remote.online) {\n\t this.updateLastSyncedOutput();\n\t } else if (this.rs.remote.online) {\n\t this.lastSynced = new Date();\n\t var subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n\t subHeadlineEl.innerHTML = 'Synced just now';\n\t }\n\t\n\t if (!this.closed && this.shouldCloseWhenSyncDone) {\n\t setTimeout(this.close.bind(this), this.autoCloseAfter);\n\t }\n\t break;\n\t case 'disconnected':\n\t this.active = false;\n\t this.setOnline();\n\t this.setBackendClass(); // removes all backend CSS classes\n\t this.setState('initial');\n\t break;\n\t case 'connected':\n\t this.active = true;\n\t this.online = true;\n\t if (this.rs.hasFeature('Sync')) {\n\t this.shouldCloseWhenSyncDone = true;\n\t this.rs.on('sync-req-done', function () {\n\t return _this.eventHandler('sync-req-done');\n\t });\n\t this.rs.on('sync-done', function () {\n\t return _this.eventHandler('sync-done');\n\t });\n\t } else {\n\t this.rsSyncButton.classList.add('rs-hidden');\n\t setTimeout(this.close.bind(this), this.autoCloseAfter);\n\t }\n\t var connectedUser = this.rs.remote.userAddress;\n\t this.rsConnectedUser.innerHTML = connectedUser;\n\t this.setBackendClass(this.rs.backend);\n\t this.rsConnectedLabel.textContent = 'Connected';\n\t this.setState('connected');\n\t break;\n\t case 'network-offline':\n\t this.setOffline();\n\t break;\n\t case 'network-online':\n\t this.setOnline();\n\t break;\n\t case 'error':\n\t this.setBackendClass(this.rs.backend);\n\t\n\t if (msg.name === 'DiscoveryError') {\n\t this.handleDiscoveryError(msg);\n\t } else if (msg.name === 'SyncError') {\n\t this.handleSyncError(msg);\n\t } else if (msg.name === 'Unauthorized') {\n\t this.handleUnauthorized(msg);\n\t } else {\n\t console.debug('Encountered unhandled error', msg);\n\t }\n\t break;\n\t }\n\t },\n\t setState: function setState(state) {\n\t if (state) {\n\t this.log('Setting state ', state);\n\t var lastSelected = document.querySelector('.rs-box.rs-selected');\n\t if (lastSelected) {\n\t lastSelected.classList.remove('rs-selected');\n\t }\n\t\n\t var toSelect = document.querySelector('.rs-box.rs-box-' + state);\n\t if (toSelect) {\n\t toSelect.classList.add('rs-selected');\n\t }\n\t\n\t var currentStateClass = this.rsWidget.className.match(/rs-state-\\S+/g)[0];\n\t this.rsWidget.classList.remove(currentStateClass);\n\t this.rsWidget.classList.add('rs-state-' + (state || this.state));\n\t\n\t this.state = state;\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Create the widget element and add styling.\n\t *\n\t * @returns {object} The widget's DOM element\n\t *\n\t * @private\n\t */\n\t createHtmlTemplate: function createHtmlTemplate() {\n\t var element = document.createElement('div');\n\t var style = document.createElement('style');\n\t style.innerHTML = __webpack_require__(3);\n\t\n\t element.id = \"remotestorage-widget\";\n\t element.innerHTML = __webpack_require__(2);\n\t element.appendChild(style);\n\t\n\t return element;\n\t },\n\t\n\t\n\t /**\n\t * Save all interactive DOM elements as variables for later access.\n\t *\n\t * @private\n\t */\n\t setupElements: function setupElements() {\n\t this.rsWidget = document.querySelector('.rs-widget');\n\t this.rsInitial = document.querySelector('.rs-box-initial');\n\t this.rsChoose = document.querySelector('.rs-box-choose');\n\t this.rsConnected = document.querySelector('.rs-box-connected');\n\t this.rsSignIn = document.querySelector('.rs-box-sign-in');\n\t\n\t this.rsConnectedLabel = document.querySelector('.rs-box-connected .rs-sub-headline');\n\t this.rsChooseRemoteStorageButton = document.querySelector('button.rs-choose-rs');\n\t this.rsChooseDropboxButton = document.querySelector('button.rs-choose-dropbox');\n\t this.rsChooseGoogleDriveButton = document.querySelector('button.rs-choose-googledrive');\n\t this.rsErrorBox = document.querySelector('.rs-box-error .rs-error-message');\n\t\n\t // check if apiKeys is set for Dropbox or Google [googledrive, dropbox]\n\t // to show/hide relative buttons only if needed\n\t if (!this.rs.apiKeys.hasOwnProperty('googledrive')) {\n\t this.rsChooseGoogleDriveButton.parentNode.removeChild(this.rsChooseGoogleDriveButton);\n\t }\n\t\n\t if (!this.rs.apiKeys.hasOwnProperty('dropbox')) {\n\t this.rsChooseDropboxButton.parentNode.removeChild(this.rsChooseDropboxButton);\n\t }\n\t\n\t this.rsSignInForm = document.querySelector('.rs-sign-in-form');\n\t\n\t this.rsDisconnectButton = document.querySelector('.rs-disconnect');\n\t this.rsSyncButton = document.querySelector('.rs-sync');\n\t this.rsLogo = document.querySelector('.rs-widget-icon');\n\t\n\t this.rsErrorReconnectLink = document.querySelector('.rs-box-error a.rs-reconnect');\n\t this.rsErrorDisconnectButton = document.querySelector('.rs-box-error button.rs-disconnect');\n\t\n\t this.rsConnectedUser = document.querySelector('.rs-connected-text h1.rs-user');\n\t },\n\t\n\t\n\t /**\n\t * Setup all event handlers\n\t *\n\t * @private\n\t */\n\t setupHandlers: function setupHandlers() {\n\t var _this2 = this;\n\t\n\t this.rs.on('connected', function () {\n\t return _this2.eventHandler('connected');\n\t });\n\t this.rs.on('ready', function () {\n\t return _this2.eventHandler('ready');\n\t });\n\t this.rs.on('disconnected', function () {\n\t return _this2.eventHandler('disconnected');\n\t });\n\t this.rs.on('network-online', function () {\n\t return _this2.eventHandler('network-online');\n\t });\n\t this.rs.on('network-offline', function () {\n\t return _this2.eventHandler('network-offline');\n\t });\n\t this.rs.on('error', function (error) {\n\t return _this2.eventHandler('error', error);\n\t });\n\t\n\t this.setEventListeners();\n\t this.setClickHandlers();\n\t },\n\t\n\t\n\t /**\n\t * Append widget to the DOM.\n\t *\n\t * If an elementId is specified, it will be appended to that element,\n\t * otherwise it will be appended to the document's body.\n\t *\n\t * @param {String} [elementId] - Widget's parent\n\t */\n\t attach: function attach(elementId) {\n\t var domElement = this.createHtmlTemplate();\n\t\n\t if (elementId) {\n\t var parent = document.getElementById(elementId);\n\t if (!parent) {\n\t throw \"Failed to find target DOM element with id=\\\"\" + elementId + \"\\\"\";\n\t }\n\t parent.appendChild(domElement);\n\t } else {\n\t document.body.appendChild(domElement);\n\t }\n\t\n\t this.setupElements();\n\t this.setupHandlers();\n\t },\n\t setEventListeners: function setEventListeners() {\n\t var _this3 = this;\n\t\n\t // Sign-in form\n\t this.rsSignInForm.addEventListener('submit', function (e) {\n\t e.preventDefault();\n\t var userAddress = document.querySelector('input[name=rs-user-address]').value;\n\t _this3.rs.connect(userAddress);\n\t });\n\t },\n\t\n\t\n\t /**\n\t * Show the screen for choosing a backend if there is more than one backend\n\t * to choose from. Otherwise it directly shows the remoteStorage connect\n\t * screen.\n\t *\n\t * @private\n\t */\n\t showChooseOrSignIn: function showChooseOrSignIn() {\n\t // choose backend only if some providers are declared\n\t if (this.rs.apiKeys && Object.keys(this.rs.apiKeys).length > 0) {\n\t this.setState('choose');\n\t } else {\n\t this.setState('sign-in');\n\t }\n\t },\n\t setClickHandlers: function setClickHandlers() {\n\t var _this4 = this;\n\t\n\t // Initial button\n\t this.rsInitial.addEventListener('click', function () {\n\t return _this4.showChooseOrSignIn();\n\t });\n\t\n\t // Choose RS button\n\t this.rsChooseRemoteStorageButton.addEventListener('click', function () {\n\t return _this4.setState('sign-in');\n\t });\n\t\n\t // Choose Dropbox button\n\t this.rsChooseDropboxButton.addEventListener('click', function () {\n\t return _this4.rs[\"dropbox\"].connect();\n\t });\n\t\n\t // Choose Google Drive button\n\t this.rsChooseGoogleDriveButton.addEventListener('click', function () {\n\t return _this4.rs[\"googledrive\"].connect();\n\t });\n\t\n\t // Disconnect button\n\t this.rsDisconnectButton.addEventListener('click', function () {\n\t return _this4.rs.disconnect();\n\t });\n\t\n\t this.rsErrorReconnectLink.addEventListener('click', function () {\n\t return _this4.rs.reconnect();\n\t });\n\t this.rsErrorDisconnectButton.addEventListener('click', function () {\n\t return _this4.rs.disconnect();\n\t });\n\t\n\t // Sync button\n\t if (this.rs.hasFeature('Sync')) {\n\t this.rsSyncButton.addEventListener('click', function () {\n\t if (_this4.rsSyncButton.classList.contains('rs-rotate')) {\n\t _this4.rs.stopSync();\n\t _this4.rsSyncButton.classList.remove(\"rs-rotate\");\n\t } else {\n\t _this4.rs.startSync();\n\t _this4.rsSyncButton.classList.add(\"rs-rotate\");\n\t }\n\t });\n\t }\n\t\n\t // Reduce to icon only if connected and clicked outside of widget\n\t document.addEventListener('click', function () {\n\t return _this4.close();\n\t });\n\t\n\t // Clicks on the widget stop the above event\n\t this.rsWidget.addEventListener('click', function (e) {\n\t return e.stopPropagation();\n\t });\n\t\n\t // Click on the logo to toggle the widget's open/close state\n\t this.rsLogo.addEventListener('click', function () {\n\t return _this4.toggle();\n\t });\n\t },\n\t\n\t\n\t /**\n\t * Toggle between the widget's open/close state.\n\t *\n\t * When then widget is open and in initial state, it will show the backend\n\t * chooser screen.\n\t */\n\t toggle: function toggle() {\n\t if (this.closed) {\n\t this.open();\n\t } else {\n\t if (this.state === 'initial') {\n\t this.showChooseOrSignIn();\n\t } else {\n\t this.close();\n\t }\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Open the widget.\n\t */\n\t open: function open() {\n\t this.closed = false;\n\t this.rsWidget.classList.remove('rs-closed');\n\t this.shouldCloseWhenSyncDone = false; // prevent auto-closing when user opened the widget\n\t },\n\t\n\t\n\t /**\n\t * Close the widget to only show the icon.\n\t *\n\t * If the ``leaveOpen`` config is true or there is no storage connected,\n\t * the widget will not close.\n\t */\n\t close: function close() {\n\t // don't do anything when we have an error\n\t if (this.state === 'error') {\n\t return;\n\t }\n\t\n\t if (!this.leaveOpen && this.active) {\n\t this.closed = true;\n\t this.rsWidget.classList.add('rs-closed');\n\t } else {\n\t this.setState(this.active ? 'connected' : 'initial');\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Mark the widget as offline.\n\t *\n\t * This will not do anything when no account is connected.\n\t *\n\t * @private\n\t */\n\t setOffline: function setOffline() {\n\t if (this.online) {\n\t this.rsWidget.classList.add('rs-offline');\n\t this.rsConnectedLabel.textContent = 'Offline';\n\t this.online = false;\n\t }\n\t },\n\t\n\t\n\t /**\n\t * Mark the widget as online.\n\t *\n\t * @private\n\t */\n\t setOnline: function setOnline() {\n\t if (!this.online) {\n\t this.rsWidget.classList.remove('rs-offline');\n\t if (this.active) {\n\t this.rsConnectedLabel.textContent = 'Connected';\n\t }\n\t }\n\t this.online = true;\n\t },\n\t\n\t\n\t /**\n\t * Set the remoteStorage backend type to show the appropriate icon.\n\t * If no backend is given, all existing backend CSS classes will be removed.\n\t *\n\t * @param {string} [backend]\n\t *\n\t * @private\n\t */\n\t setBackendClass: function setBackendClass(backend) {\n\t this.rsWidget.classList.remove('rs-backend-remotestorage');\n\t this.rsWidget.classList.remove('rs-backend-dropbox');\n\t this.rsWidget.classList.remove('rs-backend-googledrive');\n\t\n\t if (backend) {\n\t this.rsWidget.classList.add('rs-backend-' + backend);\n\t }\n\t },\n\t showErrorBox: function showErrorBox(errorMsg) {\n\t this.rsErrorBox.innerHTML = errorMsg;\n\t this.setState('error');\n\t },\n\t hideErrorBox: function hideErrorBox() {\n\t this.rsErrorBox.innerHTML = '';\n\t this.close();\n\t },\n\t handleDiscoveryError: function handleDiscoveryError(error) {\n\t var msgContainer = document.querySelector('.rs-sign-in-error');\n\t msgContainer.innerHTML = error.message;\n\t msgContainer.classList.remove('rs-hidden');\n\t msgContainer.classList.add('rs-visible');\n\t },\n\t handleSyncError: function handleSyncError() /* error */{\n\t // console.debug('Encountered SyncError', error);\n\t this.open();\n\t this.showErrorBox('App sync error');\n\t },\n\t handleUnauthorized: function handleUnauthorized(error) {\n\t if (error.code && error.code === 'access_denied') {\n\t this.rs.disconnect();\n\t } else {\n\t this.open();\n\t this.showErrorBox(error.message + \" \");\n\t this.rsErrorBox.appendChild(this.rsErrorReconnectLink);\n\t this.rsErrorReconnectLink.classList.remove('rs-hidden');\n\t }\n\t },\n\t updateLastSyncedOutput: function updateLastSyncedOutput() {\n\t if (!this.lastSynced) {\n\t return;\n\t } // don't do anything when we've never synced yet\n\t var now = new Date();\n\t var secondsSinceLastSync = Math.round((now.getTime() - this.lastSynced.getTime()) / 1000);\n\t var subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n\t subHeadlineEl.innerHTML = 'Synced ' + secondsSinceLastSync + ' seconds ago';\n\t }\n\t};\n\t\n\tmodule.exports = Widget;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = \"

Connect your storage

To sync data with your account

user@provider.com

Connected

Connect your storage

This app allows you to sync data with a storage of your choice. Read more

\";\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = \"/* RemoteStorage widget styles */\\n\\n.rs-widget {\\n box-sizing: border-box;\\n z-index: 21000000; /* Make sure we're on a reasonably high visibility layer */\\n overflow: hidden;\\n max-width: 350px;\\n padding: 10px;\\n margin: 10px;\\n border-radius: 3px;\\n background-color: #fff;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n font-family: arial, sans-serif;\\n font-size: 16px;\\n color: #333;\\n will-change: max-height, height, width, opacity, max-width, background, box-shadow;\\n transition-property: width, height, opacity, max-width, max-height, background, box-shadow;\\n transition-duration: 300ms;\\n}\\n\\n.rs-widget * {\\n box-sizing: border-box;\\n}\\n\\n.rs-widget .rs-hidden {\\n display: none;\\n}\\n\\n.rs-box {\\n overflow: hidden;\\n will-change: height;\\n transition-property: height, width, max-height;\\n transition-duration: 300ms;\\n transition-timing-function: ease-in;\\n opacity: 0;\\n max-height: 0px;\\n}\\n\\n.rs-box.rs-selected {\\n opacity: 1;\\n max-height: 420px;\\n}\\n\\n/* Main logo */\\n.rs-main-logo {\\n float: left;\\n height: 36px;\\n width: 36px;\\n margin-top: 1px;\\n margin-right: 0.625em;\\n transition: margin-left 300ms ease-out, transform 300ms ease-out;\\n cursor: pointer;\\n}\\n.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage,\\n{\\n display: normal;\\n}\\n.rs-widget[class*=\\\"rs-backend-\\\"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {\\n display: none;\\n}\\n.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {\\n display: none;\\n}\\n.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {\\n display: none;\\n}\\n\\npolygon.rs-logo-shape {\\n fill: #FF4B03;\\n}\\n\\npolygon.rs-logo-shape,\\n#rs-main-logo-dropbox path,\\n#rs-main-logo-googledrive path {\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n.rs-offline polygon.rs-logo-shape,\\n.rs-offline #rs-main-logo-dropbox path,\\n.rs-offline #rs-main-logo-googledrive path {\\n fill: #888;\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n/* Hide everything except logo when connected and clicked outside of box */\\n.rs-closed {\\n max-width: 56px;\\n background-color: transparent;\\n box-shadow: none;\\n opacity: 0.5;\\n\\n transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms; \\n}\\n\\n.rs-closed:hover {\\n cursor: pointer;\\n opacity: 1;\\n}\\n\\n.rs-box-initial {\\n transition-duration: 0ms;\\n}\\n\\n.rs-box-initial:hover {\\n cursor: pointer;\\n}\\n\\n.rs-widget a {\\n color: #0093cc;\\n}\\n\\n/* HEADLINE */\\n.rs-small-headline {\\n font-size: 1em;\\n font-weight: bold;\\n margin: 0;\\n margin-bottom: 2px;\\n height: 1.2em;\\n word-break: break-all;\\n overflow: hidden;\\n line-height: 1em;\\n}\\n\\n.rs-sub-headline {\\n word-break: break-all;\\n overflow: hidden;\\n color: #666;\\n font-size: 0.92em;\\n height: 1.2em;\\n}\\n.rs-big-headline {\\n font-size: 1.625em;\\n font-weight: normal;\\n text-align: center;\\n margin-top: 20px;\\n margin-bottom: 20px;\\n}\\n\\n/* BUTTONS */\\n.rs-button {\\n font: inherit;\\n color: inherit;\\n background-color: transparent;\\n border: 1px solid #dcdcdc;\\n border-radius: 3px;\\n cursor: pointer;\\n}\\n.rs-button-small {\\n padding: 0.5em 0.6em;\\n margin-left: 0.3em;\\n transition: border-color 300ms ease-out;\\n}\\n.rs-button-wrap {\\n margin-top: 10px;\\n}\\n\\n.rs-button-wrap img,\\n.rs-button-wrap svg {\\n float: left;\\n margin-right: 0.6em;\\n width: 40px;\\n height: 40px;\\n}\\n\\n.rs-button-big {\\n padding: 15px 10px;\\n margin-bottom: 10px;\\n display: block;\\n width: 100%;\\n text-align: left;\\n transition: box-shadow 200ms;\\n}\\n.rs-button-big > div {\\n font-size: 1.125em;\\n padding: 10px 0;\\n}\\n.rs-button-big:hover {\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:active {\\n background-color: #eee;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:last-child {\\n margin-bottom: 0;\\n}\\n\\n.rs-content {\\n padding: 0 10px 10px 10px;\\n}\\n\\n\\n.rs-state-choose .rs-main-logo,\\n.rs-state-sign-in .rs-main-logo {\\n margin-left: 45%;\\n float: none;\\n}\\n\\n.rs-sign-in-form input[type=text] {\\n padding: 15px 10px;\\n display: block;\\n width: 100%;\\n font: inherit;\\n height: 52px;\\n border: 1px solid #aaa;\\n border-radius: 0;\\n box-shadow: none;\\n}\\n.rs-sign-in-form input[type=submit] {\\n padding: 15px 10px;\\n margin-top: 20px;\\n margin-bottom: 15px;\\n display: block;\\n width: 100%;\\n border: none;\\n border-radius: 3px;\\n background-color: #3fb34f;\\n font: inherit;\\n color: #fff;\\n transition: box-shadow 200ms, background-color 200ms;\\n}\\n.rs-sign-in-form input[type=submit]:hover {\\n cursor: pointer;\\n background-color: #4BCB5D;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-sign-in-form input[type=submit]:active {\\n background-color: #3fb34f;\\n}\\n\\n.rs-sign-in-error.rs-hidden,\\n.rs-box-error.rs-hidden {\\n height: 0;\\n}\\n\\n.rs-sign-in-error.rs-visible,\\n.rs-box-error.rs-visible {\\n height: auto;\\n border-radius: 3px;\\n padding: 0.5em 0.5em;\\n margin-top: 0.5em;\\n text-align: center;\\n background-color: rgba(255,0,0,0.1);\\n color: darkred;\\n}\\n\\n.rs-box-error {\\n display: flex;\\n flex-direction: row;\\n}\\n\\n.rs-box-error .rs-error-message {\\n flex: auto;\\n}\\n\\n /*Choose provider box */\\n.rs-box-choose {\\n text-align: center;\\n overflow: hidden;\\n}\\n\\n.rs-box-choose p {\\n margin-top: 0;\\n margin-bottom: 20px;\\n line-height: 1.4em;\\n}\\n\\n/*Connected box */\\n.rs-box-connected {\\n display: flex;\\n flex-direction: row;\\n height: 40px;\\n transition: height 0s;\\n}\\n.rs-connected-text {\\n flex: auto;\\n min-width: 0;\\n}\\n.rs-box-connected .rs-user {\\n font-weight: bold;\\n text-overflow: ellipsis;\\n overflow: hidden;\\n word-break: keep-all;\\n}\\n.rs-connected-buttons, .rs-error-buttons {\\n flex: none;\\n}\\n.rs-disconnect:hover {\\n border-color: #FF2D2D;\\n}\\n.rs-disconnect:hover .rs-icon{\\n fill: #FF2D2D;\\n}\\n.rs-sync:hover {\\n border-color: #FFBB0C;\\n}\\n.rs-sync:hover .rs-icon {\\n fill: #FFBB0C;\\n}\\n.rs-sync.rs-rotate {\\n border-color: #FFBB0C;\\n}\\n.rs-sync.rs-rotate .rs-icon {\\n fill: #FFBB0C;\\n animation: rs-spin 1s linear infinite;\\n}\\n@keyframes rs-spin { 100% { transform: rotate(360deg); transform:rotate(360deg); } }\\n\\n/* Floating widget styles (top right corner) */\\n.rs-floating {\\n position: fixed;\\n top: 0;\\n right: 0;\\n}\\n\\n\\n/* Small/mobile screens */\\n@media screen and (max-width: 420px) {\\n .rs-widget {\\n font-size: 100%;\\n transition: all 300ms ease-out;\\n max-width: 400px;\\n }\\n .rs-floating {\\n position: relative;\\n top: auto;\\n right: auto\\n }\\n .rs-closed {\\n max-width: 56px;\\n }\\n .rs-state-choose,\\n .rs-state-sign-in {\\n position: fixed;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n max-width: 100%;\\n }\\n}\\n\\n/* remove dotted outline border on Firefox */\\n.rs-widget a:focus,\\n.rs-widget a:active,\\n.rs-widget button:focus,\\n.rs-widget input:focus {\\n outline:none;\\n}\\n.rs-widget button::-moz-focus-inner, \\n.rs-widget input[type=\\\"button\\\"]::-moz-focus-inner,\\n.rs-widget input[type=\\\"submit\\\"]::-moz-focus-inner {\\n border:0;\\n}\\n\\n/* prevent rounded buttons on mobile Safari */\\n.rs-widget input[type=\\\"button\\\"],\\n.rs-widget input[type=\\\"submit\\\"] {\\n -webkit-appearance: none;\\n}\\n\"\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// widget.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7e120a7461003580fd03","/**\n * RemoteStorage connect widget\n * @constructor\n *\n * @param {object} remoteStorage - remoteStorage instance\n * @param {object} options - Widget options\n * @param {boolean} options.leaveOpen - Do not minimize widget when user clicks\n * outside of it (default: false)\n * @param {number} options.autoCloseAfter - Time after which the widget closes\n * automatically in ms (default: 1500)\n * @param {boolean} options.logging - Enable logging (default: false)\n */\nlet Widget = function(remoteStorage, options={}) {\n this.rs = remoteStorage;\n\n this.state = 'initial';\n\n // true if we have remoteStorage connection's info\n this.active = false;\n\n // remoteStorage is connected!\n this.online = false;\n\n // widget is minimized ?\n this.closed = false;\n\n this.leaveOpen = options.leaveOpen ? options.leaveOpen : false;\n\n this.logging = typeof options.logging === 'boolean' ? options.logging : false;\n\n this.autoCloseAfter = options.autoCloseAfter ? options.autoCloseAfter : 1500;\n\n this.lastSynced = null;\n this.lastSyncedUpdateLoop = null;\n};\n\n\nWidget.prototype = {\n\n log (...msg) {\n if (this.logging) {\n console.debug('[RS-WIDGET] ', ...msg);\n }\n },\n\n // handle events !\n eventHandler (event, msg) {\n this.log('EVENT: ', event);\n switch (event) {\n case 'ready':\n this.setState(this.state);\n break;\n case 'sync-req-done':\n this.rsSyncButton.classList.add(\"rs-rotate\");\n break;\n case 'sync-done':\n this.rsSyncButton.classList.remove(\"rs-rotate\");\n\n if (this.rsWidget.classList.contains('rs-state-unauthorized') ||\n !this.rs.remote.online) {\n this.updateLastSyncedOutput();\n } else if (this.rs.remote.online) {\n this.lastSynced = new Date();\n let subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n subHeadlineEl.innerHTML = 'Synced just now';\n }\n\n if (!this.closed && this.shouldCloseWhenSyncDone) {\n setTimeout(this.close.bind(this), this.autoCloseAfter);\n }\n break;\n case 'disconnected':\n this.active = false;\n this.setOnline();\n this.setBackendClass(); // removes all backend CSS classes\n this.setState('initial');\n break;\n case 'connected':\n this.active = true;\n this.online = true;\n if (this.rs.hasFeature('Sync')) {\n this.shouldCloseWhenSyncDone = true;\n this.rs.on('sync-req-done', () => this.eventHandler('sync-req-done'));\n this.rs.on('sync-done', () => this.eventHandler('sync-done'));\n } else {\n this.rsSyncButton.classList.add('rs-hidden');\n setTimeout(this.close.bind(this), this.autoCloseAfter);\n }\n let connectedUser = this.rs.remote.userAddress;\n this.rsConnectedUser.innerHTML = connectedUser;\n this.setBackendClass(this.rs.backend);\n this.rsConnectedLabel.textContent = 'Connected';\n this.setState('connected');\n break;\n case 'network-offline':\n this.setOffline();\n break;\n case 'network-online':\n this.setOnline();\n break;\n case 'error':\n this.setBackendClass(this.rs.backend);\n\n if (msg.name === 'DiscoveryError') {\n this.handleDiscoveryError(msg);\n } else if (msg.name === 'SyncError') {\n this.handleSyncError(msg);\n } else if (msg.name === 'Unauthorized') {\n this.handleUnauthorized(msg);\n } else {\n console.debug('Encountered unhandled error', msg);\n }\n break;\n }\n },\n\n setState (state) {\n if (state) {\n this.log('Setting state ', state);\n let lastSelected = document.querySelector('.rs-box.rs-selected');\n if (lastSelected) {\n lastSelected.classList.remove('rs-selected');\n }\n\n let toSelect = document.querySelector('.rs-box.rs-box-'+state);\n if (toSelect) {\n toSelect.classList.add('rs-selected');\n }\n\n let currentStateClass = this.rsWidget.className.match(/rs-state-\\S+/g)[0];\n this.rsWidget.classList.remove(currentStateClass);\n this.rsWidget.classList.add(`rs-state-${state || this.state}`);\n\n this.state = state;\n }\n },\n\n /**\n * Create the widget element and add styling.\n *\n * @returns {object} The widget's DOM element\n *\n * @private\n */\n createHtmlTemplate () {\n const element = document.createElement('div');\n const style = document.createElement('style');\n style.innerHTML = require('raw!./assets/styles.css');\n\n element.id = \"remotestorage-widget\";\n element.innerHTML = require('html!./assets/widget.html');\n element.appendChild(style);\n\n return element;\n },\n\n /**\n * Save all interactive DOM elements as variables for later access.\n *\n * @private\n */\n setupElements () {\n this.rsWidget = document.querySelector('.rs-widget');\n this.rsInitial = document.querySelector('.rs-box-initial');\n this.rsChoose = document.querySelector('.rs-box-choose');\n this.rsConnected = document.querySelector('.rs-box-connected');\n this.rsSignIn = document.querySelector('.rs-box-sign-in');\n\n this.rsConnectedLabel = document.querySelector('.rs-box-connected .rs-sub-headline')\n this.rsChooseRemoteStorageButton = document.querySelector('button.rs-choose-rs');\n this.rsChooseDropboxButton = document.querySelector('button.rs-choose-dropbox');\n this.rsChooseGoogleDriveButton = document.querySelector('button.rs-choose-googledrive');\n this.rsErrorBox = document.querySelector('.rs-box-error .rs-error-message');\n\n // check if apiKeys is set for Dropbox or Google [googledrive, dropbox]\n // to show/hide relative buttons only if needed\n if (! this.rs.apiKeys.hasOwnProperty('googledrive')) {\n this.rsChooseGoogleDriveButton.parentNode.removeChild(this.rsChooseGoogleDriveButton);\n }\n\n if (! this.rs.apiKeys.hasOwnProperty('dropbox')) {\n this.rsChooseDropboxButton.parentNode.removeChild(this.rsChooseDropboxButton);\n }\n\n this.rsSignInForm = document.querySelector('.rs-sign-in-form');\n\n this.rsDisconnectButton = document.querySelector('.rs-disconnect');\n this.rsSyncButton = document.querySelector('.rs-sync');\n this.rsLogo = document.querySelector('.rs-widget-icon');\n\n this.rsErrorReconnectLink = document.querySelector('.rs-box-error a.rs-reconnect');\n this.rsErrorDisconnectButton = document.querySelector('.rs-box-error button.rs-disconnect');\n\n this.rsConnectedUser = document.querySelector('.rs-connected-text h1.rs-user');\n },\n\n /**\n * Setup all event handlers\n *\n * @private\n */\n setupHandlers () {\n this.rs.on('connected', () => this.eventHandler('connected'));\n this.rs.on('ready', () => this.eventHandler('ready'));\n this.rs.on('disconnected', () => this.eventHandler('disconnected'));\n this.rs.on('network-online', () => this.eventHandler('network-online'));\n this.rs.on('network-offline', () => this.eventHandler('network-offline'));\n this.rs.on('error', (error) => this.eventHandler('error', error));\n\n this.setEventListeners();\n this.setClickHandlers();\n },\n\n /**\n * Append widget to the DOM.\n *\n * If an elementId is specified, it will be appended to that element,\n * otherwise it will be appended to the document's body.\n *\n * @param {String} [elementId] - Widget's parent\n */\n attach (elementId) {\n const domElement = this.createHtmlTemplate();\n\n if (elementId) {\n const parent = document.getElementById(elementId);\n if (!parent) {\n throw \"Failed to find target DOM element with id=\\\"\" + elementId + \"\\\"\";\n }\n parent.appendChild(domElement);\n } else {\n document.body.appendChild(domElement);\n }\n\n this.setupElements();\n this.setupHandlers();\n },\n\n setEventListeners () {\n // Sign-in form\n this.rsSignInForm.addEventListener('submit', (e) => {\n e.preventDefault();\n let userAddress = document.querySelector('input[name=rs-user-address]').value;\n this.rs.connect(userAddress);\n });\n },\n\n /**\n * Show the screen for choosing a backend if there is more than one backend\n * to choose from. Otherwise it directly shows the remoteStorage connect\n * screen.\n *\n * @private\n */\n showChooseOrSignIn () {\n // choose backend only if some providers are declared\n if (this.rs.apiKeys && Object.keys(this.rs.apiKeys).length > 0) {\n this.setState('choose');\n } else {\n this.setState('sign-in');\n }\n },\n\n setClickHandlers () {\n // Initial button\n this.rsInitial.addEventListener('click', () => this.showChooseOrSignIn() );\n\n // Choose RS button\n this.rsChooseRemoteStorageButton.addEventListener('click', () => this.setState('sign-in') );\n\n // Choose Dropbox button\n this.rsChooseDropboxButton.addEventListener('click', () => this.rs[\"dropbox\"].connect() );\n\n // Choose Google Drive button\n this.rsChooseGoogleDriveButton.addEventListener('click', () => this.rs[\"googledrive\"].connect() );\n\n // Disconnect button\n this.rsDisconnectButton.addEventListener('click', () => this.rs.disconnect() );\n\n this.rsErrorReconnectLink.addEventListener('click', () => this.rs.reconnect() );\n this.rsErrorDisconnectButton.addEventListener('click', () => this.rs.disconnect() );\n\n // Sync button\n if (this.rs.hasFeature('Sync')) {\n this.rsSyncButton.addEventListener('click', () => {\n if (this.rsSyncButton.classList.contains('rs-rotate')) {\n this.rs.stopSync();\n this.rsSyncButton.classList.remove(\"rs-rotate\");\n } else {\n this.rs.startSync();\n this.rsSyncButton.classList.add(\"rs-rotate\");\n }\n });\n }\n\n // Reduce to icon only if connected and clicked outside of widget\n document.addEventListener('click', () => this.close() );\n\n // Clicks on the widget stop the above event\n this.rsWidget.addEventListener('click', e => e.stopPropagation() );\n\n // Click on the logo to toggle the widget's open/close state\n this.rsLogo.addEventListener('click', () => this.toggle() );\n },\n\n /**\n * Toggle between the widget's open/close state.\n *\n * When then widget is open and in initial state, it will show the backend\n * chooser screen.\n */\n toggle () {\n if (this.closed) {\n this.open();\n } else {\n if (this.state === 'initial') {\n this.showChooseOrSignIn();\n } else {\n this.close();\n }\n }\n },\n\n /**\n * Open the widget.\n */\n open () {\n this.closed = false;\n this.rsWidget.classList.remove('rs-closed');\n this.shouldCloseWhenSyncDone = false; // prevent auto-closing when user opened the widget\n },\n\n /**\n * Close the widget to only show the icon.\n *\n * If the ``leaveOpen`` config is true or there is no storage connected,\n * the widget will not close.\n */\n close () {\n // don't do anything when we have an error\n if (this.state === 'error') { return; }\n\n if (!this.leaveOpen && this.active) {\n this.closed = true;\n this.rsWidget.classList.add('rs-closed');\n } else {\n this.setState(this.active ? 'connected' : 'initial');\n }\n },\n\n\n /**\n * Mark the widget as offline.\n *\n * This will not do anything when no account is connected.\n *\n * @private\n */\n setOffline () {\n if (this.online) {\n this.rsWidget.classList.add('rs-offline');\n this.rsConnectedLabel.textContent = 'Offline';\n this.online = false;\n }\n },\n\n /**\n * Mark the widget as online.\n *\n * @private\n */\n setOnline () {\n if (!this.online) {\n this.rsWidget.classList.remove('rs-offline');\n if (this.active) {\n this.rsConnectedLabel.textContent = 'Connected';\n }\n }\n this.online = true;\n },\n\n /**\n * Set the remoteStorage backend type to show the appropriate icon.\n * If no backend is given, all existing backend CSS classes will be removed.\n *\n * @param {string} [backend]\n *\n * @private\n */\n setBackendClass (backend) {\n this.rsWidget.classList.remove('rs-backend-remotestorage');\n this.rsWidget.classList.remove('rs-backend-dropbox');\n this.rsWidget.classList.remove('rs-backend-googledrive');\n\n if (backend) {\n this.rsWidget.classList.add(`rs-backend-${backend}`);\n }\n },\n\n showErrorBox (errorMsg) {\n this.rsErrorBox.innerHTML = errorMsg;\n this.setState('error');\n },\n\n hideErrorBox () {\n this.rsErrorBox.innerHTML = '';\n this.close();\n },\n\n handleDiscoveryError (error) {\n let msgContainer = document.querySelector('.rs-sign-in-error');\n msgContainer.innerHTML = error.message;\n msgContainer.classList.remove('rs-hidden');\n msgContainer.classList.add('rs-visible');\n },\n\n handleSyncError (/* error */) {\n // console.debug('Encountered SyncError', error);\n this.open();\n this.showErrorBox('App sync error');\n },\n\n handleUnauthorized (error) {\n if (error.code && error.code === 'access_denied') {\n this.rs.disconnect();\n } else {\n this.open();\n this.showErrorBox(error.message + \" \");\n this.rsErrorBox.appendChild(this.rsErrorReconnectLink);\n this.rsErrorReconnectLink.classList.remove('rs-hidden');\n }\n },\n\n updateLastSyncedOutput () {\n if (!this.lastSynced) { return } // don't do anything when we've never synced yet\n let now = new Date();\n let secondsSinceLastSync = Math.round((now.getTime() - this.lastSynced.getTime())/1000);\n let subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');\n subHeadlineEl.innerHTML = `Synced ${secondsSinceLastSync} seconds ago`;\n }\n};\n\nmodule.exports = Widget;\n\n\n\n// WEBPACK FOOTER //\n// ./src/widget.js","module.exports = \"

Connect your storage

To sync data with your account

user@provider.com

Connected

Connect your storage

This app allows you to sync data with a storage of your choice. Read more

\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/html-loader!./src/assets/widget.html\n// module id = 2\n// module chunks = 0","module.exports = \"/* RemoteStorage widget styles */\\n\\n.rs-widget {\\n box-sizing: border-box;\\n z-index: 21000000; /* Make sure we're on a reasonably high visibility layer */\\n overflow: hidden;\\n max-width: 350px;\\n padding: 10px;\\n margin: 10px;\\n border-radius: 3px;\\n background-color: #fff;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n font-family: arial, sans-serif;\\n font-size: 16px;\\n color: #333;\\n will-change: max-height, height, width, opacity, max-width, background, box-shadow;\\n transition-property: width, height, opacity, max-width, max-height, background, box-shadow;\\n transition-duration: 300ms;\\n}\\n\\n.rs-widget * {\\n box-sizing: border-box;\\n}\\n\\n.rs-widget .rs-hidden {\\n display: none;\\n}\\n\\n.rs-box {\\n overflow: hidden;\\n will-change: height;\\n transition-property: height, width, max-height;\\n transition-duration: 300ms;\\n transition-timing-function: ease-in;\\n opacity: 0;\\n max-height: 0px;\\n}\\n\\n.rs-box.rs-selected {\\n opacity: 1;\\n max-height: 420px;\\n}\\n\\n/* Main logo */\\n.rs-main-logo {\\n float: left;\\n height: 36px;\\n width: 36px;\\n margin-top: 1px;\\n margin-right: 0.625em;\\n transition: margin-left 300ms ease-out, transform 300ms ease-out;\\n cursor: pointer;\\n}\\n.rs-widget .rs-backend-remotestorage svg#rs-main-logo-remotestorage,\\n{\\n display: normal;\\n}\\n.rs-widget[class*=\\\"rs-backend-\\\"]:not(.rs-backend-remotestorage) svg#rs-main-logo-remotestorage {\\n display: none;\\n}\\n.rs-widget.rs-backend-dropbox svg#rs-main-logo-dropbox {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-dropbox) svg#rs-main-logo-dropbox {\\n display: none;\\n}\\n.rs-widget.rs-backend-googledrive svg#rs-main-logo-googledrive {\\n display: normal;\\n}\\n.rs-widget:not(.rs-backend-googledrive) svg#rs-main-logo-googledrive {\\n display: none;\\n}\\n\\npolygon.rs-logo-shape {\\n fill: #FF4B03;\\n}\\n\\npolygon.rs-logo-shape,\\n#rs-main-logo-dropbox path,\\n#rs-main-logo-googledrive path {\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n.rs-offline polygon.rs-logo-shape,\\n.rs-offline #rs-main-logo-dropbox path,\\n.rs-offline #rs-main-logo-googledrive path {\\n fill: #888;\\n transition-property: fill;\\n transition-duration: 0.5s;\\n}\\n\\n/* Hide everything except logo when connected and clicked outside of box */\\n.rs-closed {\\n max-width: 56px;\\n background-color: transparent;\\n box-shadow: none;\\n opacity: 0.5;\\n\\n transition: max-height 100ms ease-out 0ms, max-width 300ms ease-out 300ms, background 300ms ease-in 200ms, opacity 300ms ease 200ms; \\n}\\n\\n.rs-closed:hover {\\n cursor: pointer;\\n opacity: 1;\\n}\\n\\n.rs-box-initial {\\n transition-duration: 0ms;\\n}\\n\\n.rs-box-initial:hover {\\n cursor: pointer;\\n}\\n\\n.rs-widget a {\\n color: #0093cc;\\n}\\n\\n/* HEADLINE */\\n.rs-small-headline {\\n font-size: 1em;\\n font-weight: bold;\\n margin: 0;\\n margin-bottom: 2px;\\n height: 1.2em;\\n word-break: break-all;\\n overflow: hidden;\\n line-height: 1em;\\n}\\n\\n.rs-sub-headline {\\n word-break: break-all;\\n overflow: hidden;\\n color: #666;\\n font-size: 0.92em;\\n height: 1.2em;\\n}\\n.rs-big-headline {\\n font-size: 1.625em;\\n font-weight: normal;\\n text-align: center;\\n margin-top: 20px;\\n margin-bottom: 20px;\\n}\\n\\n/* BUTTONS */\\n.rs-button {\\n font: inherit;\\n color: inherit;\\n background-color: transparent;\\n border: 1px solid #dcdcdc;\\n border-radius: 3px;\\n cursor: pointer;\\n}\\n.rs-button-small {\\n padding: 0.5em 0.6em;\\n margin-left: 0.3em;\\n transition: border-color 300ms ease-out;\\n}\\n.rs-button-wrap {\\n margin-top: 10px;\\n}\\n\\n.rs-button-wrap img,\\n.rs-button-wrap svg {\\n float: left;\\n margin-right: 0.6em;\\n width: 40px;\\n height: 40px;\\n}\\n\\n.rs-button-big {\\n padding: 15px 10px;\\n margin-bottom: 10px;\\n display: block;\\n width: 100%;\\n text-align: left;\\n transition: box-shadow 200ms;\\n}\\n.rs-button-big > div {\\n font-size: 1.125em;\\n padding: 10px 0;\\n}\\n.rs-button-big:hover {\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:active {\\n background-color: #eee;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-button-big:last-child {\\n margin-bottom: 0;\\n}\\n\\n.rs-content {\\n padding: 0 10px 10px 10px;\\n}\\n\\n\\n.rs-state-choose .rs-main-logo,\\n.rs-state-sign-in .rs-main-logo {\\n margin-left: 45%;\\n float: none;\\n}\\n\\n.rs-sign-in-form input[type=text] {\\n padding: 15px 10px;\\n display: block;\\n width: 100%;\\n font: inherit;\\n height: 52px;\\n border: 1px solid #aaa;\\n border-radius: 0;\\n box-shadow: none;\\n}\\n.rs-sign-in-form input[type=submit] {\\n padding: 15px 10px;\\n margin-top: 20px;\\n margin-bottom: 15px;\\n display: block;\\n width: 100%;\\n border: none;\\n border-radius: 3px;\\n background-color: #3fb34f;\\n font: inherit;\\n color: #fff;\\n transition: box-shadow 200ms, background-color 200ms;\\n}\\n.rs-sign-in-form input[type=submit]:hover {\\n cursor: pointer;\\n background-color: #4BCB5D;\\n box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 3px 8px 0 rgba(0,0,0,0.2);\\n}\\n.rs-sign-in-form input[type=submit]:active {\\n background-color: #3fb34f;\\n}\\n\\n.rs-sign-in-error.rs-hidden,\\n.rs-box-error.rs-hidden {\\n height: 0;\\n}\\n\\n.rs-sign-in-error.rs-visible,\\n.rs-box-error.rs-visible {\\n height: auto;\\n border-radius: 3px;\\n padding: 0.5em 0.5em;\\n margin-top: 0.5em;\\n text-align: center;\\n background-color: rgba(255,0,0,0.1);\\n color: darkred;\\n}\\n\\n.rs-box-error {\\n display: flex;\\n flex-direction: row;\\n}\\n\\n.rs-box-error .rs-error-message {\\n flex: auto;\\n}\\n\\n /*Choose provider box */\\n.rs-box-choose {\\n text-align: center;\\n overflow: hidden;\\n}\\n\\n.rs-box-choose p {\\n margin-top: 0;\\n margin-bottom: 20px;\\n line-height: 1.4em;\\n}\\n\\n/*Connected box */\\n.rs-box-connected {\\n display: flex;\\n flex-direction: row;\\n height: 40px;\\n transition: height 0s;\\n}\\n.rs-connected-text {\\n flex: auto;\\n min-width: 0;\\n}\\n.rs-box-connected .rs-user {\\n font-weight: bold;\\n text-overflow: ellipsis;\\n overflow: hidden;\\n word-break: keep-all;\\n}\\n.rs-connected-buttons, .rs-error-buttons {\\n flex: none;\\n}\\n.rs-disconnect:hover {\\n border-color: #FF2D2D;\\n}\\n.rs-disconnect:hover .rs-icon{\\n fill: #FF2D2D;\\n}\\n.rs-sync:hover {\\n border-color: #FFBB0C;\\n}\\n.rs-sync:hover .rs-icon {\\n fill: #FFBB0C;\\n}\\n.rs-sync.rs-rotate {\\n border-color: #FFBB0C;\\n}\\n.rs-sync.rs-rotate .rs-icon {\\n fill: #FFBB0C;\\n animation: rs-spin 1s linear infinite;\\n}\\n@keyframes rs-spin { 100% { transform: rotate(360deg); transform:rotate(360deg); } }\\n\\n/* Floating widget styles (top right corner) */\\n.rs-floating {\\n position: fixed;\\n top: 0;\\n right: 0;\\n}\\n\\n\\n/* Small/mobile screens */\\n@media screen and (max-width: 420px) {\\n .rs-widget {\\n font-size: 100%;\\n transition: all 300ms ease-out;\\n max-width: 400px;\\n }\\n .rs-floating {\\n position: relative;\\n top: auto;\\n right: auto\\n }\\n .rs-closed {\\n max-width: 56px;\\n }\\n .rs-state-choose,\\n .rs-state-sign-in {\\n position: fixed;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n max-width: 100%;\\n }\\n}\\n\\n/* remove dotted outline border on Firefox */\\n.rs-widget a:focus,\\n.rs-widget a:active,\\n.rs-widget button:focus,\\n.rs-widget input:focus {\\n outline:none;\\n}\\n.rs-widget button::-moz-focus-inner, \\n.rs-widget input[type=\\\"button\\\"]::-moz-focus-inner,\\n.rs-widget input[type=\\\"submit\\\"]::-moz-focus-inner {\\n border:0;\\n}\\n\\n/* prevent rounded buttons on mobile Safari */\\n.rs-widget input[type=\\\"button\\\"],\\n.rs-widget input[type=\\\"submit\\\"] {\\n -webkit-appearance: none;\\n}\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/raw-loader!./src/assets/styles.css\n// module id = 3\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 69f8de2..0a18e68 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "remotestorage-widget", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5c57c8e..e1d6aed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remotestorage-widget", - "version": "1.1.0", + "version": "1.1.1", "description": "remoteStorage.js connect widget", "main": "build/widget.js", "scripts": {