You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
13 KiB
2 lines
13 KiB
4 years ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{299:function(e,t,a){(function(a){var s,n,r;n=[],void 0===(r="function"==typeof(s=function(){"use strict";function t(e,t,a){var s=new XMLHttpRequest;s.open("GET",e),s.responseType="blob",s.onload=function(){i(s.response,t,a)},s.onerror=function(){console.error("could not download file")},s.send()}function s(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function n(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(a){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof a&&a.global===a?a:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,a,o){var i=r.URL||r.webkitURL,c=document.createElement("a");a=a||e.name||"download",c.download=a,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?n(c):s(c.href)?t(e,a,o):n(c,c.target="_blank")):(c.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(c.href)}),4e4),setTimeout((function(){n(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,a,r){if(a=a||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,r),a);else if(s(e))t(e,a,r);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){n(o)}))}}:function(e,a,s,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof e)return t(e,a,s);var i="application/octet-stream"===e.type,c=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&c||o)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=e:location=e,n=null},u.readAsDataURL(e)}else{var h=r.URL||r.webkitURL,p=h.createObjectURL(e);n?n.location=p:location.href=p,n=null,setTimeout((function(){h.revokeObjectURL(p)}),4e4)}});r.saveAs=i.saveAs=i,e.exports=i})?s.apply(t,n):s)||(e.exports=r)}).call(this,a(6))},733:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return C}));var s=a(83),n=a.n(s),r=a(82),o=a.n(r),i=a(299),c=a.n(i),l=a(87),u=a(88),h=a(86),p=a.n(h),m=a(84),d=a(173),y=a(92),b=a(296),f=a(298);const k=0,_=5;class C extends o.a.PureComponent{constructor(e){super(e),n()(this,"_collectRecoveryKeyNode",e=>{this._recoveryKeyNode=e}),n()(this,"_onCopyClick",()=>{Object(b.a)(this._recoveryKeyNode)&&this.setState({copied:!0,phase:3})}),n()(this,"_onDownloadClick",()=>{const e=new Blob([this._keyBackupInfo.recovery_key],{type:"text/plain;charset=us-ascii"});c.a.saveAs(e,"security-key.txt"),this.setState({downloaded:!0,phase:3})}),n()(this,"_createBackup",async()=>{const{secureSecretStorage:e}=this.state;let t;this.setState({phase:4,error:null});try{e?await Object(d.b)(async()=>{t=await u.a.get().prepareKeyBackupVersion(null,{secureSecretStorage:!0}),t=await u.a.get().createKeyBackupVersion(t)}):t=await u.a.get().createKeyBackupVersion(this._keyBackupInfo),await u.a.get().scheduleAllGroupSessionsForBackup(),this.setState({phase:_})}catch(e){console.error("Error creating key backup",e),t&&u.a.get().deleteKeyBackupVersion(t.version),this.setState({error:e})}}),n()(this,"_onCancel",()=>{this.props.onFinished(!1)}),n()(this,"_onDone",()=>{this.props.onFinished(!0)}),n()(this,"_onOptOutClick",()=>{this.setState({phase:6})}),n()(this,"_onSetUpClick",()=>{this.setState({phase:k})}),n()(this,"_on
|
||
|
//# sourceMappingURL=4.js.map
|