1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00
Files
web/app/main.cc71efde7ad30ee0876f.js
Joseph Flinn 518b158b83 Updates
2021-05-21 13:25:13 -07:00

2 lines
2.7 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e){function t(t){for(var r,a,s=t[0],l=t[1],c=t[2],u=0,d=[];u<s.length;u++)a=s[u],i[a]&&d.push(i[a][0]),i[a]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(p&&p(t);d.length;)d.shift()();return o.push.apply(o,c||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==i[l]&&(r=!1)}r&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},i={0:0},o=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var c=0;c<s.length;c++)t(s[c]);var p=l;o.push([753,2]),n()}([,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.I18nService=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.PlatformUtilsService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.ApiService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.UserService=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(3);var r=n(0),i=n(3),o=function(){function e(e){this.i18nService=e}return e.prototype.transform=function(e,t,n,r){return this.i18nService.t(e,t,n,r)},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(i.I18nService))},e.ɵpipe=r.ɵɵdefinePipe({name:"i18n",type:e,pure:!0}),e}();t.I18nPipe=o},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.MessagingService=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(247);var r=n(0),i=n(247),o=function(){function e(e,t){this.el=e,this.validationService=t}return e.prototype.ngOnChanges=function(e){var t=this;null!=this.appApiAction&&null!=this.appApiAction.then&&(this.el.nativeElement.loading=!0,this.appApiAction.then((function(e){t.el.nativeElement.loading=!1}),(function(e){t.el.nativeElement.loading=!1,t.validationService.showError(e)})))},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(r.ElementRef),r.ɵɵdirectiveInject(i.ValidationService))},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appApiAction",""]],inputs:{appApiAction:"appApiAction"},features:[r.ɵɵNgOnChangesFeature]}),e}();t.ApiActionDirective=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(e,t){this.el=e,this.renderer=t}return Object.defineProperty(e.prototype,"appA11yTitle",{set:function(e){this.title=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.el.nativeElement.hasAttribute("title")||this.renderer.setAttribute(this.el.nativeElement,"title",this.title),this.el.nativeElement.hasAttribute("aria-label")||this.renderer.setAttribute(this.el.nativeElement,"aria-label",this.title)},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(r.ElementRef),r.ɵɵdirectiveInject(r.Renderer2))},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appA11yTitle",""]],inputs:{appA11yTitle:"appA11yTitle"}}),e}();t.A11yTitleDirective=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.CryptoService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.CipherService=r},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.response=e}return e.prototype.getResponseProperty=function(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=!1),null==e||""===e)throw new Error("propertyName must not be null/empty.");if(null==t&&null!=this.response&&(t=this.response),null==t)return null;if(!n&&void 0===t[e]){var r=null;r=e.charAt(0)===e.charAt(0).toUpperCase()?e.charAt(0).toLowerCase():e.charAt(0).toUpperCase(),e.length>1&&(r+=e.slice(1)),void 0===t[e=r]&&(e=e.toLowerCase()),void 0===t[e]&&(e=e.toUpperCase())}return t[e]},e}();t.BaseResponse=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(3);var r=n(0),i=n(3),o=n(4);function a(e,t){if(1&e&&r.ɵɵelement(0,"i",4),2&e){var n=r.ɵɵnextContext(2);r.ɵɵclassMapInterpolate1("fa ",n.icon,"")}}function s(e,t){if(1&e&&(r.ɵɵelementStart(0,"h3",2),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,a,1,3,"i",3),r.ɵɵtext(3),r.ɵɵelementEnd()),2&e){var n=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngIf",n.icon),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",n.title,"\n ")}}var l=function(e){return{clickable:e}},c=["*"],p=function(){function e(e){this.i18nService=e,this.type="info"}return e.prototype.ngOnInit=function(){this.calloutStyle=this.type,"warning"===this.type||"danger"===this.type?("danger"===this.type&&(this.calloutStyle="danger"),void 0===this.title&&(this.title=this.i18nService.t("warning")),void 0===this.icon&&(this.icon="fa-warning")):"error"===this.type?(this.calloutStyle="danger",void 0===this.title&&(this.title=this.i18nService.t("error")),void 0===this.icon&&(this.icon="fa-bolt")):"tip"===this.type&&(this.calloutStyle="success",void 0===this.title&&(this.title=this.i18nService.t("tip")),void 0===this.icon&&(this.icon="fa-lightbulb-o"))},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(i.I18nService))},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["app-callout"]],inputs:{type:"type",icon:"icon",title:"title",clickable:"clickable"},ngContentSelectors:c,decls:7,vars:7,consts:[["role","alert",3,"ngClass"],["class","callout-heading",4,"ngIf"],[1,"callout-heading"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"]],template:function(e,t){1&e&&(r.ɵɵprojectionDef(),r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,s,4,2,"h3",1),r.ɵɵtext(3,"\n "),r.ɵɵprojection(4),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n")),2&e&&(r.ɵɵclassMapInterpolate1("callout callout-",t.calloutStyle,""),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(5,l,t.clickable)),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.title))},directives:[o.NgClass,o.NgIf],encapsulation:2}),e}();t.CalloutComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(711),i=n(143),o=n(156),a=n(258),s=n(30),l=n(209),c=n(127),p=n(159),u=n(94),d=n(39),m=n(118),h=n(106),f=n(709),v=function(){function e(){this.organizationId=null,this.logService=new f.ConsoleLogService(!1),this.newLineRegex=/(?:\r\n|\r|\n)/,this.passwordFieldNames=["password","pass word","passphrase","pass phrase","pass","code","code word","codeword","secret","secret word","personpwd","key","keyword","key word","keyphrase","key phrase","form_pw","wppassword","pin","pwd","pw","pword","passwd","p","serial","serial#","license key","reg #","passwort"],this.usernameFieldNames=["user","name","user name","username","login name","email","e-mail","id","userid","user id","login","form_loginname","wpname","mail","loginid","login id","log","personlogin","first name","last name","card#","account #","member","member #","nom","benutzername"],this.notesFieldNames=["note","notes","comment","comments","memo","description","free form","freeform","free text","freetext","free","kommentar"],this.uriFieldNames=["url","hyper link","hyperlink","link","host","hostname","host name","server","address","hyper ref","href","web","website","web site","site","web-site","uri","ort","adresse"],this.parseCsvOptions={encoding:"UTF-8",skipEmptyLines:!1}}return Object.defineProperty(e.prototype,"organization",{get:function(){return null!=this.organizationId},enumerable:!0,configurable:!0}),e.prototype.parseXml=function(e){var t=(new DOMParser).parseFromString(e,"application/xml");return null!=t&&null==t.querySelector("parsererror")?t:null},e.prototype.parseCsv=function(e,t,n){var i=this;void 0===n&&(n={});var o=Object.assign({header:t},this.parseCsvOptions,n);e=this.splitNewLine(e).join("\n").trim();var a=r.parse(e,o);return null!=a.errors&&a.errors.length>0&&a.errors.forEach((function(e){null!=e.row&&i.logService.warning("Error parsing row "+e.row+": "+e.message)})),a.data&&a.data.length>0?a.data:null},e.prototype.parseSingleRowCsv=function(e){if(this.isNullOrWhitespace(e))return null;var t=this.parseCsv(e,!1);return null!=t&&t.length>0&&t[0].length>0?t[0]:null},e.prototype.makeUriArray=function(e){var t=this;if(null==e)return null;if("string"==typeof e){var n=new a.LoginUriView;return n.uri=this.fixUri(e),this.isNullOrWhitespace(n.uri)?null:(n.match=null,[n])}if(e.length>0){var r=[];return e.forEach((function(e){var n=new a.LoginUriView;n.uri=t.fixUri(e),t.isNullOrWhitespace(n.uri)||(n.match=null,r.push(n))})),0===r.length?null:r}return null},e.prototype.fixUri=function(e){return null==e?null:(-1===(e=e.trim()).indexOf("://")&&e.indexOf(".")>=0&&(e="http://"+e),e.length>1e3?e.substring(0,1e3):e)},e.prototype.nameFromUrl=function(e){var t=s.Utils.getHostname(e);return this.isNullOrWhitespace(t)?null:t.startsWith("www.")?t.replace("www.",""):t},e.prototype.isNullOrWhitespace=function(e){return s.Utils.isNullOrWhitespace(e)},e.prototype.getValueOrDefault=function(e,t){return void 0===t&&(t=null),this.isNullOrWhitespace(e)?t:e},e.prototype.splitNewLine=function(e){return e.split(this.newLineRegex)},e.prototype.getCardBrand=function(e){if(this.isNullOrWhitespace(e))return null;var t=new RegExp("^4");return null!=e.match(t)?"Visa":/^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test(e)?"Mastercard":(t=new RegExp("^3[47]"),null!=e.match(t)?"Amex":(t=new RegExp("^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)"),null!=e.match(t)?"Discover":(t=new RegExp("^36"),null!=e.match(t)?"Diners Club":(t=new RegExp("^30[0-5]"),null!=e.match(t)?"Diners Club":(t=new RegExp("^35(2[89]|[3-8][0-9])"),null!=e.match(t)?"JCB":(t=new RegExp("^(4026|417500|4508|4844|491(3|7))"),null!=e.match(t)?"Visa":null))))))},e.prototype.setCardExpiration=function(e,t){if(!this.isNullOrWhitespace(t)){var n=t.split("/");if(2===n.length){var r=null,i=null;if(1!==n[0].length&&2!==n[0].length||2===(r=n[0]).length&&"0"===r[0]&&(r=r.substr(1,1)),2!==n[1].length&&4!==n[1].length||(i=2===r.length?"20"+n[1]:n[1]),null!=r&&null!=i)return e.card.expMonth=r,e.card.expYear=i,!0}}return!1},e.prototype.moveFoldersToCollections=function(e){e.folderRelationships.forEach((function(t){return e.collectionRelationships.push(t)})),e.collections=e.folders.map((function(e){var t=new o.CollectionView;return t.name=e.name,t})),e.folderRelationships=[],e.folders=[]},e.prototype.querySelectorDirectChild=function(e,t){var n=this.querySelectorAllDirectChild(e,t);return 0===n.length?null:n[0]},e.prototype.querySelectorAllDirectChild=function(e,t){return Array.from(e.querySelectorAll(t)).filter((function(t){return t.parentNode===e}))},e.prototype.initLoginCipher=function(){var e=new i.CipherView;return e.favorite=!1,e.notes="",e.fields=[],e.login=new p.LoginView,e.type=d.CipherType.Login,e},e.prototype.cleanupCipher=function(e){null!=e&&(e.type!==d.CipherType.Login&&(e.login=null),this.isNullOrWhitespace(e.name)&&(e.name="--"),this.isNullOrWhitespace(e.notes)?e.notes=null:e.notes=e.notes.trim(),null!=e.fields&&0===e.fields.length&&(e.fields=null))},e.prototype.processKvp=function(e,t,n,r){if(void 0===r&&(r=m.FieldType.Text),!this.isNullOrWhitespace(n))if(this.isNullOrWhitespace(t)&&(t=""),n.length>200||n.trim().search(this.newLineRegex)>-1)null==e.notes&&(e.notes=""),e.notes+=t+": "+this.splitNewLine(n).join("\n")+"\n";else{null==e.fields&&(e.fields=[]);var i=new l.FieldView;i.type=r,i.name=t,i.value=n,e.fields.push(i)}},e.prototype.processFolder=function(e,t){var n=e.folders.length,r=!this.isNullOrWhitespace(t),i=r;if(r)for(var o=0;o<e.folders.length;o++)if(e.folders[o].name===t){i=!1,n=o;break}if(i){var a=new c.FolderView;a.name=t,e.folders.push(a)}r&&e.folderRelationships.push([e.ciphers.length,n])},e.prototype.convertToNoteIfNeeded=function(e){e.type===d.CipherType.Login&&this.isNullOrWhitespace(e.login.username)&&this.isNullOrWhitespace(e.login.password)&&(null==e.login.uris||0===e.login.uris.length)&&(e.type=d.CipherType.SecureNote,e.secureNote=new u.SecureNoteView,e.secureNote.type=h.SecureNoteType.Generic)},e}();t.BaseImporter=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.success=!1,this.ciphers=[],this.folders=[],this.folderRelationships=[],this.collections=[],this.collectionRelationships=[]};t.ImportResult=r},,,,function(e,t,n){"use strict";(function(e,r,i){Object.defineProperty(t,"__esModule",{value:!0});var o=n(826),a="undefined"==typeof window?n(827):null,s=function(){function t(){}return t.init=function(){t.inited||(t.inited=!0,t.isNode=void 0!==e&&null!=e.release&&"node"===e.release.name,t.isBrowser="undefined"!=typeof window,t.isNativeScript=!t.isNode&&!t.isBrowser,t.isMobileBrowser=t.isBrowser&&this.isMobile(window),t.isAppleMobileBrowser=t.isBrowser&&this.isAppleMobile(window),t.global=t.isNativeScript||t.isNode&&!t.isBrowser?r:window)},t.fromB64ToArray=function(e){if(t.isNode||t.isNativeScript)return new Uint8Array(i.from(e,"base64"));for(var n=window.atob(e),r=new Uint8Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r},t.fromUrlB64ToArray=function(e){return t.fromB64ToArray(t.fromUrlB64ToB64(e))},t.fromHexToArray=function(e){if(t.isNode||t.isNativeScript)return new Uint8Array(i.from(e,"hex"));for(var n=new Uint8Array(e.length/2),r=0;r<e.length;r+=2)n[r/2]=parseInt(e.substr(r,2),16);return n},t.fromUtf8ToArray=function(e){if(t.isNode||t.isNativeScript)return new Uint8Array(i.from(e,"utf8"));for(var n=unescape(encodeURIComponent(e)),r=new Uint8Array(n.length),o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r},t.fromByteStringToArray=function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},t.fromBufferToB64=function(e){if(t.isNode||t.isNativeScript)return i.from(e).toString("base64");for(var n="",r=new Uint8Array(e),o=0;o<r.byteLength;o++)n+=String.fromCharCode(r[o]);return window.btoa(n)},t.fromBufferToUrlB64=function(e){return t.fromB64toUrlB64(t.fromBufferToB64(e))},t.fromB64toUrlB64=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},t.fromBufferToUtf8=function(e){if(t.isNode||t.isNativeScript)return i.from(e).toString("utf8");var n=new Uint8Array(e),r=String.fromCharCode.apply(null,n);return decodeURIComponent(escape(r))},t.fromBufferToByteString=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))},t.fromBufferToHex=function(e){if(t.isNode||t.isNativeScript)return i.from(e).toString("hex");var n=new Uint8Array(e);return Array.prototype.map.call(n,(function(e){return("00"+e.toString(16)).slice(-2)})).join("")},t.fromUrlB64ToB64=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Illegal base64url string!")}return t},t.fromUrlB64ToUtf8=function(e){return t.fromB64ToUtf8(t.fromUrlB64ToB64(e))},t.fromUtf8ToB64=function(e){return t.isNode||t.isNativeScript?i.from(e,"utf8").toString("base64"):decodeURIComponent(escape(window.btoa(e)))},t.fromB64ToUtf8=function(e){return t.isNode||t.isNativeScript?i.from(e,"base64").toString("utf8"):decodeURIComponent(escape(window.atob(e)))},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.isGuid=function(e){return RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,"i").test(e)},t.getHostname=function(e){var n=t.getUrl(e);try{return null!=n&&""!==n.hostname?n.hostname:null}catch(r){return null}},t.getHost=function(e){var n=t.getUrl(e);try{return null!=n&&""!==n.host?n.host:null}catch(r){return null}},t.getDomain=function(e){if(null==e)return null;if(""===(e=e.trim()))return null;if(e.startsWith("data:"))return null;var n=e.startsWith("http://")||e.startsWith("https://");if(!n&&e.indexOf("://")<0&&t.tldEndingRegex.test(e)&&(e="http://"+e,n=!0),n)try{var r=t.getUrlObject(e);if("localhost"===r.hostname||t.validIpAddress(r.hostname))return r.hostname;var i=null!=o&&null!=o.getDomain?o.getDomain(r.hostname):null;return null!=i?i:r.hostname}catch(s){}try{var a=null!=o&&null!=o.getDomain?o.getDomain(e):null;if(null!=a)return a}catch(l){return null}return null},t.getQueryParams=function(e){var n=t.getUrl(e);if(null==n||null==n.search||""===n.search)return null;var r=new Map;return("?"===n.search[0]?n.search.substr(1):n.search).split("&").forEach((function(e){var t=e.split("=");t.length<1||r.set(decodeURIComponent(t[0]).toLowerCase(),null==t[1]?"":decodeURIComponent(t[1]))})),r},t.getSortFunction=function(e,t){return function(n,r){return null==n[t]&&null!=r[t]?-1:null!=n[t]&&null==r[t]?1:null==n[t]&&null==r[t]?0:e.collator?e.collator.compare(n[t],r[t]):n[t].localeCompare(r[t])}},t.isNullOrWhitespace=function(e){return null==e||"string"!=typeof e||""===e.trim()},t.nameOf=function(e){return e},t.assign=function(e,t){return Object.assign(e,t)},t.getUrl=function(e){if(null==e)return null;if(""===(e=e.trim()))return null;var n=t.getUrlObject(e);null==n&&(!(0===e.indexOf("http://")||0===e.indexOf("https://"))&&e.indexOf(".")>-1&&(n=t.getUrlObject("http://"+e)));return n},t.validIpAddress=function(e){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)},t.isMobile=function(e){var t,n=!1;return t=e.navigator.userAgent||e.navigator.vendor||e.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n||null!=e.navigator.userAgent.match(/iPad/i)},t.isAppleMobile=function(e){return null!=e.navigator.userAgent.match(/iPhone/i)||null!=e.navigator.userAgent.match(/iPad/i)},t.getUrlObject=function(e){try{if(null!=a)return a.URL?new a.URL(e):a.parse(e);if("function"==typeof URL)return new URL(e);if(null!=window){var t=e.indexOf("://")>-1;if(!t&&e.indexOf(".")>-1)e="http://"+e;else if(!t)return null;var n=window.document.createElement("a");return n.href=e,n}}catch(r){}return null},t.inited=!1,t.isNativeScript=!1,t.isNode=!1,t.isBrowser=!0,t.isMobileBrowser=!1,t.isAppleMobileBrowser=!1,t.global=null,t.tldEndingRegex=/.*\.(com|net|org|edu|uk|gov|ca|de|jp|fr|au|ru|ch|io|es|us|co|xyz|info|ly|mil)$/,t}();t.Utils=s,s.init()}).call(this,n(126),n(102),n(95).Buffer)},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.PasswordGenerationService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(){}return e.prototype.onClick=function(e){e.preventDefault()},e.ɵfac=function(t){return new(t||e)},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appStopClick",""]],hostBindings:function(e,t){1&e&&r.ɵɵlistener("click",(function(e){return t.onClick(e)}))}}),e}();t.StopClickDirective=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.StateService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Login=1]="Login",e[e.SecureNote=2]="SecureNote",e[e.Card=3]="Card",e[e.Identity=4]="Identity"}(t.CipherType||(t.CipherType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.CollectionService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.StorageService=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.PolicyService=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(e,t){this.el=e,this.renderer=t}return Object.defineProperty(e.prototype,"appInputVerbatim",{set:function(e){this.disableComplete=""===e||!0===e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.disableComplete&&!this.el.nativeElement.hasAttribute("autocomplete")&&this.renderer.setAttribute(this.el.nativeElement,"autocomplete","off"),this.el.nativeElement.hasAttribute("autocapitalize")||this.renderer.setAttribute(this.el.nativeElement,"autocapitalize","none"),this.el.nativeElement.hasAttribute("autocorrect")||this.renderer.setAttribute(this.el.nativeElement,"autocorrect","none"),this.el.nativeElement.hasAttribute("spellcheck")||this.renderer.setAttribute(this.el.nativeElement,"spellcheck","false"),this.el.nativeElement.hasAttribute("inputmode")||this.renderer.setAttribute(this.el.nativeElement,"inputmode","verbatim")},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(r.ElementRef),r.ɵɵdirectiveInject(r.Renderer2))},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appInputVerbatim",""]],inputs:{appInputVerbatim:"appInputVerbatim"}}),e}();t.InputVerbatimDirective=i},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.FolderService=r},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(){}return e.prototype.onClick=function(e){e.stopPropagation()},e.ɵfac=function(t){return new(t||e)},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appStopProp",""]],hostBindings:function(e,t){1&e&&r.ɵɵlistener("click",(function(e){return t.onClick(e)}))}}),e}();t.StopPropDirective=i},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.AuthService=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.SyncService=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EnvironmentService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(30),i=n(0),o=function(){function e(e){this.el=e}return Object.defineProperty(e.prototype,"appAutofocus",{set:function(e){this.autofocus=""===e||!0===e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){!r.Utils.isMobileBrowser&&this.autofocus&&this.el.nativeElement.focus()},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(i.ElementRef))},e.ɵdir=i.ɵɵdefineDirective({type:e,selectors:[["","appAutofocus",""]],inputs:{appAutofocus:"appAutofocus"}}),e}();t.AutofocusDirective=o},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.environmentUrlsKey=e.environmentUrlsKey,this.disableGaKey=e.disableGaKey,this.disableAddLoginNotificationKey=e.disableAddLoginNotificationKey,this.disableContextMenuItemKey=e.disableContextMenuItemKey,this.disableFaviconKey=e.disableFaviconKey,this.disableBadgeCounterKey=e.disableBadgeCounterKey,this.disableAutoTotpCopyKey=e.disableAutoTotpCopyKey,this.enableAutoFillOnPageLoadKey=e.enableAutoFillOnPageLoadKey,this.vaultTimeoutKey=e.vaultTimeoutKey,this.vaultTimeoutActionKey=e.vaultTimeoutActionKey,this.lastActiveKey=e.lastActiveKey,this.neverDomainsKey=e.neverDomainsKey,this.installedVersionKey=e.installedVersionKey,this.localeKey=e.localeKey,this.themeKey=e.themeKey,this.collapsedGroupingsKey=e.collapsedGroupingsKey,this.autoConfirmFingerprints=e.autoConfirmFingerprints,this.dontShowCardsCurrentTab=e.dontShowCardsCurrentTab,this.dontShowIdentitiesCurrentTab=e.dontShowIdentitiesCurrentTab,this.defaultUriMatch=e.defaultUriMatch,this.pinProtectedKey=e.pinProtectedKey,this.protectedPin=e.protectedPin,this.clearClipboardKey=e.clearClipboardKey,this.eventCollectionKey=e.eventCollectionKey,this.ssoCodeVerifierKey=e.ssoCodeVerifierKey,this.ssoStateKey=e.ssoStateKey,this.biometricUnlockKey=e.biometricUnlockKey,this.biometricText=e.biometricText,this.biometricAwaitingAcceptance=e.biometricAwaitingAcceptance,this.biometricFingerprintValidated=e.biometricFingerprintValidated}return e.environmentUrlsKey="environmentUrls",e.disableGaKey="disableGa",e.disableAddLoginNotificationKey="disableAddLoginNotification",e.disableChangedPasswordNotificationKey="disableChangedPasswordNotification",e.disableContextMenuItemKey="disableContextMenuItem",e.disableFaviconKey="disableFavicon",e.disableBadgeCounterKey="disableBadgeCounter",e.disableAutoTotpCopyKey="disableAutoTotpCopy",e.enableAutoFillOnPageLoadKey="enableAutoFillOnPageLoad",e.vaultTimeoutKey="lockOption",e.vaultTimeoutActionKey="vaultTimeoutAction",e.lastActiveKey="lastActive",e.neverDomainsKey="neverDomains",e.installedVersionKey="installedVersion",e.localeKey="locale",e.themeKey="theme",e.collapsedGroupingsKey="collapsedGroupings",e.autoConfirmFingerprints="autoConfirmFingerprints",e.dontShowCardsCurrentTab="dontShowCardsCurrentTab",e.dontShowIdentitiesCurrentTab="dontShowIdentitiesCurrentTab",e.defaultUriMatch="defaultUriMatch",e.pinProtectedKey="pinProtectedKey",e.protectedPin="protectedPin",e.clearClipboardKey="clearClipboardKey",e.eventCollectionKey="eventCollection",e.ssoCodeVerifierKey="ssoCodeVerifier",e.ssoStateKey="ssoState",e.biometricUnlockKey="biometric",e.biometricText="biometricText",e.biometricAwaitingAcceptance="biometricAwaitingAcceptance",e.biometricFingerprintValidated="biometricFingerprintValidated",e}();t.ConstantsService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EventService=r},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.PasswordVerificationRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.indexedEntityId=null};t.SearchService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(105),a=function(){function e(){}return e.prototype.buildDomainModel=function(e,t,n,r,i){for(var a in void 0===i&&(i=[]),n)if(n.hasOwnProperty(a)){var s=t[n[a]||a];!0===r||i.indexOf(a)>-1?e[a]=s||null:e[a]=s?new o.EncString(s):null}},e.prototype.buildDataModel=function(e,t,n,r){for(var i in void 0===r&&(r=[]),n)if(n.hasOwnProperty(i)){var o=e[n[i]||i];r.indexOf(i)>-1?t[i]=null!=o?o:null:t[i]=null!=o?o.encryptedString:null}},e.prototype.decryptObj=function(e,t,n,o){return void 0===o&&(o=null),r(this,void 0,void 0,(function(){var r,a,s;return i(this,(function(i){switch(i.label){case 0:for(s in r=[],a=this,t)t.hasOwnProperty(s)&&function(i){var s=Promise.resolve().then((function(){var e=t[i]||i;return a[e]?a[e].decrypt(n,o):null})).then((function(t){e[i]=t}));r.push(s)}(s);return[4,Promise.all(r)];case 1:return i.sent(),[2,e]}}))}))},e}();t.default=a},,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(273),a=(n(0),n(847)),s=n(30),l=(n(14),n(0)),c=n(14);function p(e,t){}var u=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.el=null,r}return i(t,e),t.prototype.ngOnDestroy=function(){},t.prototype.show=function(e,t,n,r){var i=this;void 0===n&&(n=!0),void 0===r&&(r=null),this.parentContainer=t,this.fade=n;var a=this.componentFactoryResolver.resolveComponentFactory(e),l=this.container.createComponent(a);null!=r&&r(l.instance);var c=Array.from(document.querySelectorAll(".modal"));return c.length>0&&(this.el=o(c[0]),this.el.modal("show"),this.el.on("show.bs.modal",(function(){i.onShow.emit(),i.messagingService.send("modalShow")})),this.el.on("shown.bs.modal",(function(){i.onShown.emit(),i.messagingService.send("modalShown"),s.Utils.isMobileBrowser||i.el.find("*[appAutoFocus]").focus()})),this.el.on("hide.bs.modal",(function(){i.onClose.emit(),i.messagingService.send("modalClose")})),this.el.on("hidden.bs.modal",(function(){i.onClosed.emit(),i.messagingService.send("modalClosed"),null!=i.parentContainer&&i.parentContainer.clear()}))),l.instance},t.prototype.close=function(){null!=this.el&&this.el.modal("hide")},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(l.ComponentFactoryResolver),l.ɵɵdirectiveInject(c.MessagingService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-modal"]],features:[l.ɵɵInheritDefinitionFeature],decls:2,vars:0,consts:[["container",""]],template:function(e,t){1&e&&l.ɵɵtemplate(0,p,0,0,"ng-template",null,0,l.ɵɵtemplateRefExtractor)},encapsulation:2}),t}(a.ModalComponent);t.ModalComponent=u},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.AuditService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.cardholderName=null,this.expMonth=null,this.expYear=null,this.code=null,this._brand=null,this._number=null,this._subTitle=null}return Object.defineProperty(e.prototype,"maskedCode",{get:function(){return null!=this.code?"•".repeat(this.code.length):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brand",{get:function(){return this._brand},set:function(e){this._brand=e,this._subTitle=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"number",{get:function(){return this._number},set:function(e){this._number=e,this._subTitle=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){if(null==this._subTitle&&(this._subTitle=this.brand,null!=this.number&&this.number.length>=4)){null!=this._subTitle&&""!==this._subTitle?this._subTitle+=", ":this._subTitle="";var e=this.number.length>=5&&null!=this.number.match(new RegExp("^3[47]"))?5:4;this._subTitle+="*"+this.number.substr(this.number.length-e)}return this._subTitle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expiration",{get:function(){if(!this.expMonth&&!this.expYear)return null;var e=null!=this.expMonth?("0"+this.expMonth).slice(-2):"__";return e+=" / "+(null!=this.expYear?this.formatYear(this.expYear):"____")},enumerable:!0,configurable:!0}),e.prototype.formatYear=function(e){return 2===e.length?"20"+e:e},e}();t.CardView=r},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.VaultTimeoutService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.type=null,e&&(this.type=e.type)}return Object.defineProperty(e.prototype,"subTitle",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.SecureNoteView=r},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.TokenService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.CryptoFunctionService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(277),a=n(30),s=function(){function e(e,t,n,r){if(null!=t){var i=e;return this.encryptedString=null!=n?i+"."+n+"|"+t:i+"."+t,null!=r&&(this.encryptedString+="|"+r),this.encryptionType=i,this.data=t,this.iv=n,void(this.mac=r)}if(this.encryptedString=e,this.encryptedString){var a=this.encryptedString.split("."),s=null;if(2===a.length)try{this.encryptionType=parseInt(a[0],null),s=a[1].split("|")}catch(l){return}else s=this.encryptedString.split("|"),this.encryptionType=3===s.length?o.EncryptionType.AesCbc128_HmacSha256_B64:o.EncryptionType.AesCbc256_B64;switch(this.encryptionType){case o.EncryptionType.AesCbc128_HmacSha256_B64:case o.EncryptionType.AesCbc256_HmacSha256_B64:if(3!==s.length)return;this.iv=s[0],this.data=s[1],this.mac=s[2];break;case o.EncryptionType.AesCbc256_B64:if(2!==s.length)return;this.iv=s[0],this.data=s[1];break;case o.EncryptionType.Rsa2048_OaepSha256_B64:case o.EncryptionType.Rsa2048_OaepSha1_B64:if(1!==s.length)return;this.data=s[0];break;default:return}}}return e.prototype.decrypt=function(e,t){return void 0===t&&(t=null),r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:if(null!=this.decryptedValue)return[2,this.decryptedValue];if(!(r=a.Utils.global.bitwardenContainerService))throw new Error("global bitwardenContainerService not initialized.");n=r.getCryptoService(),i.label=1;case 1:return i.trys.push([1,5,,6]),null!=t?[3,3]:[4,n.getOrgKey(e)];case 2:t=i.sent(),i.label=3;case 3:return o=this,[4,n.decryptToUtf8(this,t)];case 4:return o.decryptedValue=i.sent(),[3,6];case 5:return i.sent(),this.decryptedValue="[error: cannot decrypt]",[3,6];case 6:return[2,this.decryptedValue]}}))}))},e}();t.EncString=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Generic=0]="Generic"}(t.SecureNoteType||(t.SecureNoteType={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0);var o=n(39),a=(n(143),n(64),n(38),n(70)),s=n(30),l=n(0),c=n(64),p=n(38),u=n(4),d=n(605);function m(e,t){if(1&e&&l.ɵɵelement(0,"img",3),2&e){var n=l.ɵɵnextContext();l.ɵɵpropertyInterpolate("appFallbackSrc",n.fallbackImage),l.ɵɵproperty("src",n.image,l.ɵɵsanitizeUrl)}}function h(e,t){if(1&e&&l.ɵɵelement(0,"i"),2&e){var n=l.ɵɵnextContext();l.ɵɵclassMapInterpolate1("fa fa-fw fa-lg ",n.icon,"")}}var f={"fa-globe":String.fromCharCode(61612),"fa-sticky-note-o":String.fromCharCode(62026),"fa-id-card-o":String.fromCharCode(62147),"fa-credit-card":String.fromCharCode(61597),"fa-android":String.fromCharCode(61819),"fa-apple":String.fromCharCode(61817)},v=function(){function e(e,t){this.stateService=t,this.iconsUrl=e.iconsUrl,this.iconsUrl||(e.baseUrl?this.iconsUrl=e.baseUrl+"/icons":this.iconsUrl="https://icons.bitwarden.net")}return e.prototype.ngOnChanges=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.stateService.get(a.ConstantsService.disableFaviconKey)];case 1:return e.imageEnabled=!t.sent(),this.load(),[2]}}))}))},Object.defineProperty(e.prototype,"iconCode",{get:function(){return f[this.icon]},enumerable:!0,configurable:!0}),e.prototype.load=function(){switch(this.cipher.type){case o.CipherType.Login:this.icon="fa-globe",this.setLoginIcon();break;case o.CipherType.SecureNote:this.icon="fa-sticky-note-o";break;case o.CipherType.Card:this.icon="fa-credit-card";break;case o.CipherType.Identity:this.icon="fa-id-card-o"}},e.prototype.setLoginIcon=function(){if(this.cipher.login.uri){var e=this.cipher.login.uri,t=!1;if(0===e.indexOf("androidapp://")?(this.icon="fa-android",this.image=null):0===e.indexOf("iosapp://")?(this.icon="fa-apple",this.image=null):this.imageEnabled&&-1===e.indexOf("://")&&e.indexOf(".")>-1?(e="http://"+e,t=!0):this.imageEnabled&&(t=0===e.indexOf("http")&&e.indexOf(".")>-1),this.imageEnabled&&t)try{this.image=this.iconsUrl+"/"+s.Utils.getHostname(e)+"/icon.png",this.fallbackImage="images/fa-globe.png"}catch(n){}}else this.image=null},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.EnvironmentService),l.ɵɵdirectiveInject(p.StateService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-vault-icon"]],inputs:{cipher:"cipher"},features:[l.ɵɵNgOnChangesFeature],decls:7,vars:2,consts:[["aria-hidden","true",1,"icon"],["alt","",3,"src","appFallbackSrc",4,"ngIf"],[3,"class",4,"ngIf"],["alt","",3,"src","appFallbackSrc"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,m,1,2,"img",1),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,h,1,3,"i",2),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n")),2&e&&(l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.imageEnabled&&t.image),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.imageEnabled||!t.image))},directives:[u.NgIf,d.FallbackSrcDirective],encapsulation:2}),e}();t.IconComponent=v},,,,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0);var o=n(823),a=n(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.ɵfac=function(e){return l(e||t)},t.ɵprov=a.ɵɵdefineInjectable({token:t,factory:t.ɵfac}),t}(o.BroadcasterService);t.BroadcasterService=s;var l=a.ɵɵgetInheritedFactory(s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Authenticator=0]="Authenticator",e[e.Email=1]="Email",e[e.Duo=2]="Duo",e[e.Yubikey=3]="Yubikey",e[e.U2f=4]="U2f",e[e.Remember=5]="Remember",e[e.OrganizationDuo=6]="OrganizationDuo",e[e.WebAuthn=7]="WebAuthn"}(t.TwoFactorProviderType||(t.TwoFactorProviderType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.TotpService=r},,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0);var o=n(255),a=(n(6),n(5),n(581)),s=n(0),l=n(5),c=n(6),p=n(4),u=n(13),d=n(17),m=n(24),h=n(45),f=n(10);function v(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",3),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",9),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).method=e}))("change",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",10),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",11),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",r.paymentMethodType.BankAccount)("ngModel",r.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,3,"bankAccount"),"")}}function y(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",13),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).method=e}))("change",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",14),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",15),s.ɵɵtext(7," PayPal"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",r.paymentMethodType.PayPal)("ngModel",r.method)}}function g(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",16),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).method=e}))("change",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",17),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",18),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",r.paymentMethodType.Credit)("ngModel",r.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,3,"accountCredit"),"")}}function x(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",2),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",3),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",4),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().method=e}))("change",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",5),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",6),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,v,10,5,"div",7),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,y,9,2,"div",8),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,g,10,5,"div",8),s.ɵɵtext(18,"\n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("value",r.paymentMethodType.Card)("ngModel",r.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(10,6,"creditCard"),""),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!r.hideBank),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!r.hidePaypal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!r.hideCredit)}}function b(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",19),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",20),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",21),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"div",22),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",23),s.ɵɵtext(14,"\n "),s.ɵɵelement(15,"img",24),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",20),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"label",25),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"div",26),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",20),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",27),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"label",28),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"a",29),s.ɵɵpipe(36,"i18n"),s.ɵɵtext(37,"\n "),s.ɵɵelement(38,"i",30),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelement(42,"div",31),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,4,"number")),s.ɵɵadvance(14),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,6,"expiration")),s.ɵɵadvance(11),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(33,8,"securityCode"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(36,10,"learnMore")))}function S(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",32),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",19),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",33),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"label",34),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"input",35),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().bank.routing_number=e})),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",33),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",36),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"input",37),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().bank.account_number=e})),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",33),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",38),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",39),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().bank.account_holder_name=e})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",33),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"label",40),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"select",41),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().bank.account_holder_type=e})),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"option",42),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"option",43),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"option",44),s.ɵɵtext(54),s.ɵɵpipe(55,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n"),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,14,"verifyBankAccount")),s.ɵɵadvance(2),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(5,16,"verifyBankAccountInitialDesc")," ",s.ɵɵpipeBind1(6,18,"verifyBankAccountFailureWarning"),"\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,20,"routingNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",r.bank.routing_number),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,22,"accountNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",r.bank.account_number),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,24,"accountHolderName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",r.bank.account_holder_name),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,26,"bankAccountType")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",r.bank.account_holder_type),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("-- ",s.ɵɵpipeBind1(47,28,"select")," --"),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(51,30,"bankAccountTypeCompany")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(55,32,"bankAccountTypeIndividual"))}}function w(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",45),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"div",46),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"small",47),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,1,"paypalClickSubmit")))}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",48),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"makeSureEnoughCredit"),"\n "))}var I={base:{color:"#333333",fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontSmoothing:"antialiased"},invalid:{color:"#333333"}},E={focus:"is-focused",empty:"is-empty",invalid:"is-invalid"},P=function(){function e(e,t){var n=this;this.platformUtilsService=e,this.apiService=t,this.showMethods=!0,this.showOptions=!0,this.method=o.PaymentMethodType.Card,this.hideBank=!1,this.hidePaypal=!1,this.hideCredit=!1,this.bank={routing_number:null,account_number:null,account_holder_name:null,account_holder_type:"",currency:"USD",country:"US"},this.paymentMethodType=o.PaymentMethodType,this.btInstance=null,this.stripe=null,this.stripeElements=null,this.stripeCardNumberElement=null,this.stripeCardExpiryElement=null,this.stripeCardCvcElement=null,this.stripeScript=window.document.createElement("script"),this.stripeScript.src="https://js.stripe.com/v3/",this.stripeScript.async=!0,this.stripeScript.onload=function(){n.stripe=window.Stripe(n.platformUtilsService.isDev()?a.WebConstants.stripeTestKey:a.WebConstants.stripeLiveKey),n.stripeElements=n.stripe.elements(),n.setStripeElement()},this.btScript=window.document.createElement("script"),this.btScript.src="scripts/dropin.js",this.btScript.async=!0}return e.prototype.ngOnInit=function(){this.showOptions||(this.hidePaypal=this.method!==o.PaymentMethodType.PayPal,this.hideBank=this.method!==o.PaymentMethodType.BankAccount,this.hideCredit=this.method!==o.PaymentMethodType.Credit),window.document.head.appendChild(this.stripeScript),this.hidePaypal||window.document.head.appendChild(this.btScript)},e.prototype.ngOnDestroy=function(){window.document.head.removeChild(this.stripeScript),window.setTimeout((function(){Array.from(window.document.querySelectorAll("iframe")).forEach((function(e){if(null!=e.src&&e.src.indexOf("stripe")>-1)try{window.document.body.removeChild(e)}catch(t){}}))}),500),this.hidePaypal||(window.document.head.removeChild(this.btScript),window.setTimeout((function(){Array.from(window.document.head.querySelectorAll("script")).forEach((function(e){if(null!=e.src&&e.src.indexOf("paypal")>-1)try{window.document.head.removeChild(e)}catch(t){}}));var e=window.document.head.querySelector("#braintree-dropin-stylesheet");if(null!=e)try{window.document.head.removeChild(e)}catch(t){}}),500))},e.prototype.changeMethod=function(){var e=this;this.btInstance=null,this.method===o.PaymentMethodType.PayPal?window.setTimeout((function(){window.braintree.dropin.create({authorization:e.platformUtilsService.isDev()?a.WebConstants.btSandboxKey:a.WebConstants.btProductionKey,container:"#bt-dropin-container",paymentOptionPriority:["paypal"],paypal:{flow:"vault",buttonStyle:{label:"pay",size:"medium",shape:"pill",color:"blue"}}},(function(t,n){null==t?e.btInstance=n:console.error(t)}))}),250):this.setStripeElement()},e.prototype.createPaymentToken=function(){var e=this;return new Promise((function(t,n){e.method===o.PaymentMethodType.Credit?t([null,e.method]):e.method===o.PaymentMethodType.PayPal?e.btInstance.requestPaymentMethod().then((function(n){t([n.nonce,e.method])})).catch((function(e){n(e.message)})):e.method!==o.PaymentMethodType.Card&&e.method!==o.PaymentMethodType.BankAccount||(e.method===o.PaymentMethodType.Card?e.apiService.postSetupPayment().then((function(t){return e.stripe.handleCardSetup(t,e.stripeCardNumberElement)})).then((function(r){r.error?n(r.error.message):r.setupIntent&&"succeeded"===r.setupIntent.status?t([r.setupIntent.payment_method,e.method]):n()})):e.stripe.createToken("bank_account",e.bank).then((function(r){r.error?n(r.error.message):r.token&&null!=r.token.id?t([r.token.id,e.method]):n()})))}))},e.prototype.handleStripeCardPayment=function(e,t){var n=this;return new Promise((function(o,a){if(!n.showMethods||null!=n.stripeCardNumberElement){return(n.showMethods?n.stripe.handleCardSetup(e,n.stripeCardNumberElement):n.stripe.handleCardSetup(e)).then((function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return e.error?(a(e.error.message),[3,5]):[3,1];case 1:return e.paymentIntent&&"succeeded"===e.paymentIntent.status?null==t?[3,3]:[4,t()]:[3,4];case 2:n.sent(),n.label=3;case 3:return o(),[3,5];case 4:a(),n.label=5;case 5:return[2]}}))}))}))}a()}))},e.prototype.setStripeElement=function(){var e=this;window.setTimeout((function(){e.showMethods&&e.method===o.PaymentMethodType.Card&&(null==e.stripeCardNumberElement&&(e.stripeCardNumberElement=e.stripeElements.create("cardNumber",{style:I,classes:E,placeholder:""})),null==e.stripeCardExpiryElement&&(e.stripeCardExpiryElement=e.stripeElements.create("cardExpiry",{style:I,classes:E})),null==e.stripeCardCvcElement&&(e.stripeCardCvcElement=e.stripeElements.create("cardCvc",{style:I,classes:E,placeholder:""})),e.stripeCardNumberElement.mount("#stripe-card-number-element"),e.stripeCardExpiryElement.mount("#stripe-card-expiry-element"),e.stripeCardCvcElement.mount("#stripe-card-cvc-element"))}),50)},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.PlatformUtilsService),s.ɵɵdirectiveInject(c.ApiService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-payment"]],inputs:{showMethods:"showMethods",showOptions:"showOptions",method:"method",hideBank:"hideBank",hidePaypal:"hidePaypal",hideCredit:"hideCredit"},decls:10,vars:5,consts:[["class","mb-4 text-lg",4,"ngIf"],[4,"ngIf"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline","mr-4"],["type","radio","name","Method","id","method-card",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-card",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-credit-card"],["class","form-check form-check-inline mr-4",4,"ngIf"],["class","form-check form-check-inline",4,"ngIf"],["type","radio","name","Method","id","method-bank",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-bank",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-university"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-paypal",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-paypal"],["type","radio","name","Method","id","method-credit",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-credit",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-dollar"],[1,"row"],[1,"form-group","col-4"],["for","stripe-card-number-element"],["id","stripe-card-number-element",1,"form-control","stripe-form-control"],[1,"form-group","col-8","d-flex","align-items-end"],["src","images/cards.png","alt","Visa, MasterCard, Discover, AmEx, JCB, Diners Club, UnionPay","width","323","height","32"],["for","stripe-card-expiry-element"],["id","stripe-card-expiry-element",1,"form-control","stripe-form-control"],[1,"d-flex"],["for","stripe-card-cvc-element"],["href","https://www.cvvnumber.com/cvv.html","tabindex","-1","target","_blank","rel","noopener noreferrer",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["id","stripe-card-cvc-element",1,"form-control","stripe-form-control"],["type","warning",3,"title"],[1,"form-group","col-6"],["for","routing_number"],["id","routing_number","type","text","name","routing_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_number"],["id","account_number","type","text","name","account_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_name"],["id","account_holder_name","type","text","name","account_holder_name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_type"],["id","account_holder_type","name","account_holder_type","required","",1,"form-control",3,"ngModel","ngModelChange"],["value",""],["value","company"],["value","individual"],[1,"mb-3"],["id","bt-dropin-container",1,"mb-1"],[1,"text-muted"],["type","note"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,x,19,8,"div",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,b,46,12,"ng-container",1),s.ɵɵtext(3,"\n"),s.ɵɵtemplate(4,S,60,34,"ng-container",1),s.ɵɵtext(5,"\n"),s.ɵɵtemplate(6,w,11,3,"ng-container",1),s.ɵɵtext(7,"\n"),s.ɵɵtemplate(8,C,6,3,"ng-container",1),s.ɵɵtext(9,"\n")),2&e&&(s.ɵɵproperty("ngIf",t.showOptions&&t.showMethods),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Card),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.BankAccount),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.PayPal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Credit))},directives:[p.NgIf,u.RadioControlValueAccessor,u.DefaultValueAccessor,u.NgControlStatus,u.NgModel,d.A11yTitleDirective,m.CalloutComponent,u.RequiredValidator,h.InputVerbatimDirective,u.SelectControlValueAccessor,u.NgSelectOption,u.ɵangular_packages_forms_forms_x],pipes:[f.I18nPipe],encapsulation:2}),e}();t.PaymentComponent=P},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Text=0]="Text",e[e.Hidden=1]="Hidden",e[e.Boolean=2]="Boolean"}(t.FieldType||(t.FieldType={}))},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.id=null,this.name=null,this.revisionDate=null,e&&(this.id=e.id,this.revisionDate=e.revisionDate)};t.FolderView=r},,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(72),n(104),n(38);var o=n(30),a=n(0),s=n(72),l=n(104),c=n(38),p=n(4),u=function(e){return{"rounded-circle":e}},d=function(){function e(e,t,n){this.sanitizer=e,this.cryptoFunctionService=t,this.stateService=n,this.size=45,this.charCount=2,this.textColor="#ffffff",this.fontSize=20,this.fontWeight=300,this.dynamic=!1,this.circle=!1}return e.prototype.ngOnInit=function(){this.dynamic||this.generate()},e.prototype.ngOnChanges=function(){this.dynamic&&this.generate()},e.prototype.generate=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,a,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return[4,this.stateService.get("enableGravatars")];case 1:return i.sent()&&null!=this.email?[4,this.cryptoFunctionService.hash(this.email.toLowerCase().trim(),"md5")]:[3,3];case 2:return e=i.sent(),t=o.Utils.fromBufferToHex(e).toLowerCase(),this.src="https://www.gravatar.com/avatar/"+t+"?s="+this.size+"&r=pg&d=retro",[3,4];case 3:n=null,r=this.data.toUpperCase(),this.charCount>1&&(n=this.getFirstLetters(r,this.charCount)),null==n&&(n=r.substr(0,this.charCount)),a=this.getCharText(n),s=this.stringToColor(r),(l=this.getSvg(this.size,s)).appendChild(a),c=window.document.createElement("div").appendChild(l).outerHTML,p=window.btoa(unescape(encodeURIComponent(c))),this.src="data:image/svg+xml;base64,"+p,i.label=4;case 4:return[2]}}))}))},e.prototype.stringToColor=function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);var r="#";for(n=0;n<3;n++){r+=("00"+(t>>8*n&255).toString(16)).substr(-2)}return r},e.prototype.getFirstLetters=function(e,t){var n=e.split(" ");if(n.length>1){for(var r="",i=0;i<t;i++)r+=n[i].substr(0,1);return r}return null},e.prototype.getSvg=function(e,t){var n=window.document.createElement("svg");return n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("pointer-events","none"),n.setAttribute("width",e.toString()),n.setAttribute("height",e.toString()),n.style.backgroundColor=t,n.style.width=e+"px",n.style.height=e+"px",n},e.prototype.getCharText=function(e){var t=window.document.createElement("text");return t.setAttribute("text-anchor","middle"),t.setAttribute("y","50%"),t.setAttribute("x","50%"),t.setAttribute("dy","0.35em"),t.setAttribute("pointer-events","auto"),t.setAttribute("fill",this.textColor),t.setAttribute("font-family",'"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"'),t.textContent=e,t.style.fontWeight=this.fontWeight.toString(),t.style.fontSize=this.fontSize+"px",t},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.DomSanitizer),a.ɵɵdirectiveInject(l.CryptoFunctionService),a.ɵɵdirectiveInject(c.StateService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-avatar"]],inputs:{data:"data",email:"email",size:"size",charCount:"charCount",textColor:"textColor",fontSize:"fontSize",fontWeight:"fontWeight",dynamic:"dynamic",circle:"circle"},features:[a.ɵɵNgOnChangesFeature],decls:1,vars:5,consts:[[3,"src","title","ngClass"]],template:function(e,t){1&e&&a.ɵɵelement(0,"img",0),2&e&&(a.ɵɵpropertyInterpolate("title",t.data),a.ɵɵproperty("src",t.sanitizer.bypassSecurityTrustResourceUrl(t.src),a.ɵɵsanitizeUrl)("ngClass",a.ɵɵpureFunction1(3,u,t.circle)))},directives:[p.NgClass],encapsulation:2}),e}();t.AvatarComponent=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(156),a=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{id:null,organizationId:null,name:null,externalId:null,readOnly:null,hidePasswords:null},n,["id","organizationId","externalId","readOnly","hidePasswords"]),r}return i(t,e),t.prototype.decrypt=function(){return this.decryptObj(new o.CollectionView(this),{name:null},this.organizationId)},t}(n(81).default);t.Collection=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.TwoFactorAuthentication=0]="TwoFactorAuthentication",e[e.MasterPassword=1]="MasterPassword",e[e.PasswordGenerator=2]="PasswordGenerator",e[e.SingleOrg=3]="SingleOrg",e[e.RequireSso=4]="RequireSso",e[e.PersonalOwnership=5]="PersonalOwnership",e[e.DisableSend=6]="DisableSend",e[e.SendOptions=7]="SendOptions"}(t.PolicyType||(t.PolicyType={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(6),n(577)),s=n(578),l=n(0),c=n(6),p=n(8),u=n(13),d=n(4),m=n(10);function h(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",1),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",261),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"input",262),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().taxInfo.includeTaxId=e})),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",263),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngModel",r.taxInfo.includeTaxId),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,2,"includeVAT"))}}function f(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",264),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"input",265),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().taxInfo.taxId=e})),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n"),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext();l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,2,"taxIdNumber")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.taxInfo.taxId)}}function v(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",266),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"input",267),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().taxInfo.line1=e})),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"div",1),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"div",2),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"label",268),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"input",269),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().taxInfo.line2=e})),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",1),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"div",2),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"label",270),l.ɵɵtext(31),l.ɵɵpipe(32,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"input",271),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().taxInfo.city=e})),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"div",1),l.ɵɵtext(39,"\n "),l.ɵɵelementStart(40,"div",2),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"label",272),l.ɵɵtext(43),l.ɵɵpipe(44,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"input",273),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().taxInfo.state=e})),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n"),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext();l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,8,"address1")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.taxInfo.line1),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,10,"address2")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.taxInfo.line2),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(32,12,"cityTown")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.taxInfo.city),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(44,14,"stateProvince")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.taxInfo.state)}}var y=function(){function e(e,t){this.apiService=e,this.route=t,this.onCountryChanged=new o.EventEmitter,this.loading=!0,this.taxInfo={taxId:null,line1:null,line2:null,city:null,state:null,postalCode:null,country:"US",includeTaxId:!1},this.pristine={taxId:null,line1:null,line2:null,city:null,state:null,postalCode:null,country:"US",includeTaxId:!1}}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return this.route.parent.parent.params.subscribe((function(e){return r(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(this.organizationId=e.organizationId,!this.organizationId)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.apiService.getOrganizationTaxInfo(this.organizationId)];case 2:return(t=n.sent())&&(this.taxInfo.taxId=t.taxId,this.taxInfo.state=t.state,this.taxInfo.line1=t.line1,this.taxInfo.line2=t.line2,this.taxInfo.city=t.city,this.taxInfo.state=t.state,this.taxInfo.postalCode=t.postalCode,this.taxInfo.country=t.country||"US",this.taxInfo.includeTaxId=!("US"===this.taxInfo.country||!t.taxId&&!t.line1&&!t.line2&&!t.city&&!t.state)),[3,4];case 3:return n.sent(),[3,4];case 4:return[3,7];case 5:return[4,this.apiService.getTaxInfo()];case 6:(t=n.sent())&&(this.taxInfo.postalCode=t.postalCode,this.taxInfo.country=t.country||"US"),n.label=7;case 7:return this.pristine=Object.assign({},this.taxInfo),"US"!==this.taxInfo.country&&this.onCountryChanged.emit(),[2]}}))}))})),[4,this.apiService.getTaxRates()];case 1:return e=n.sent(),this.taxRates=e.data,this.loading=!1,[2]}}))}))},Object.defineProperty(e.prototype,"taxRate",{get:function(){var e,t=this;if(null!=this.taxRates){var n=this.taxRates.find((function(e){return e.country===t.taxInfo.country&&e.postalCode===t.taxInfo.postalCode}));return null!==(e=null==n?void 0:n.rate)&&void 0!==e?e:null}},enumerable:!0,configurable:!0}),e.prototype.getTaxInfoRequest=function(){var e;return this.organizationId?((e=new a.OrganizationTaxInfoUpdateRequest).taxId=this.taxInfo.taxId,e.state=this.taxInfo.state,e.line1=this.taxInfo.line1,e.line2=this.taxInfo.line2,e.city=this.taxInfo.city,e.state=this.taxInfo.state,e.postalCode=this.taxInfo.postalCode,e.country=this.taxInfo.country,e):((e=new s.TaxInfoUpdateRequest).postalCode=this.taxInfo.postalCode,e.country=this.taxInfo.country,e)},e.prototype.submitTaxInfo=function(){if(!this.hasChanged())return new Promise((function(e){e()}));var e=this.getTaxInfoRequest();return this.organizationId?this.apiService.putOrganizationTaxInfo(this.organizationId,e):this.apiService.putTaxInfo(e)},e.prototype.changeCountry=function(){"US"===this.taxInfo.country&&(this.taxInfo.includeTaxId=!1,this.taxInfo.taxId=null,this.taxInfo.line1=null,this.taxInfo.line2=null,this.taxInfo.city=null,this.taxInfo.state=null),this.onCountryChanged.emit()},e.prototype.hasChanged=function(){for(var e in this.taxInfo)if(this.pristine.hasOwnProperty(e)&&this.pristine[e]!==this.taxInfo[e])return!0;return!1},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.ActivatedRoute))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-tax-info"]],outputs:{onCountryChanged:"onCountryChanged"},decls:786,vars:12,consts:[[1,"row"],[1,"col-6"],[1,"form-group"],["for","addressCountry"],["id","addressCountry","required","","name","addressCountry","autocomplete","country",1,"form-control",3,"ngModel","ngModelChange","change"],["value",""],["value","US"],["value","CN"],["value","FR"],["value","DE"],["value","CA"],["value","GB"],["value","AU"],["value","IN"],["value","-","disabled",""],["value","AF"],["value","AX"],["value","AL"],["value","DZ"],["value","AS"],["value","AD"],["value","AO"],["value","AI"],["value","AQ"],["value","AG"],["value","AR"],["value","AM"],["value","AW"],["value","AT"],["value","AZ"],["value","BS"],["value","BH"],["value","BD"],["value","BB"],["value","BY"],["value","BE"],["value","BZ"],["value","BJ"],["value","BM"],["value","BT"],["value","BO"],["value","BQ"],["value","BA"],["value","BW"],["value","BV"],["value","BR"],["value","IO"],["value","BN"],["value","BG"],["value","BF"],["value","BI"],["value","KH"],["value","CM"],["value","CV"],["value","KY"],["value","CF"],["value","TD"],["value","CL"],["value","CX"],["value","CC"],["value","CO"],["value","KM"],["value","CG"],["value","CD"],["value","CK"],["value","CR"],["value","CI"],["value","HR"],["value","CU"],["value","CW"],["value","CY"],["value","CZ"],["value","DK"],["value","DJ"],["value","DM"],["value","DO"],["value","EC"],["value","EG"],["value","SV"],["value","GQ"],["value","ER"],["value","EE"],["value","ET"],["value","FK"],["value","FO"],["value","FJ"],["value","FI"],["value","GF"],["value","PF"],["value","TF"],["value","GA"],["value","GM"],["value","GE"],["value","GH"],["value","GI"],["value","GR"],["value","GL"],["value","GD"],["value","GP"],["value","GU"],["value","GT"],["value","GG"],["value","GN"],["value","GW"],["value","GY"],["value","HT"],["value","HM"],["value","VA"],["value","HN"],["value","HK"],["value","HU"],["value","IS"],["value","ID"],["value","IR"],["value","IQ"],["value","IE"],["value","IM"],["value","IL"],["value","IT"],["value","JM"],["value","JP"],["value","JE"],["value","JO"],["value","KZ"],["value","KE"],["value","KI"],["value","KP"],["value","KR"],["value","KW"],["value","KG"],["value","LA"],["value","LV"],["value","LB"],["value","LS"],["value","LR"],["value","LY"],["value","LI"],["value","LT"],["value","LU"],["value","MO"],["value","MK"],["value","MG"],["value","MW"],["value","MY"],["value","MV"],["value","ML"],["value","MT"],["value","MH"],["value","MQ"],["value","MR"],["value","MU"],["value","YT"],["value","MX"],["value","FM"],["value","MD"],["value","MC"],["value","MN"],["value","ME"],["value","MS"],["value","MA"],["value","MZ"],["value","MM"],["value","NA"],["value","NR"],["value","NP"],["value","NL"],["value","NC"],["value","NZ"],["value","NI"],["value","NE"],["value","NG"],["value","NU"],["value","NF"],["value","MP"],["value","NO"],["value","OM"],["value","PK"],["value","PW"],["value","PS"],["value","PA"],["value","PG"],["value","PY"],["value","PE"],["value","PH"],["value","PN"],["value","PL"],["value","PT"],["value","PR"],["value","QA"],["value","RE"],["value","RO"],["value","RU"],["value","RW"],["value","BL"],["value","SH"],["value","KN"],["value","LC"],["value","MF"],["value","PM"],["value","VC"],["value","WS"],["value","SM"],["value","ST"],["value","SA"],["value","SN"],["value","RS"],["value","SC"],["value","SL"],["value","SG"],["value","SX"],["value","SK"],["value","SI"],["value","SB"],["value","SO"],["value","ZA"],["value","GS"],["value","SS"],["value","ES"],["value","LK"],["value","SD"],["value","SR"],["value","SJ"],["value","SZ"],["value","SE"],["value","CH"],["value","SY"],["value","TW"],["value","TJ"],["value","TZ"],["value","TH"],["value","TL"],["value","TG"],["value","TK"],["value","TO"],["value","TT"],["value","TN"],["value","TR"],["value","TM"],["value","TC"],["value","TV"],["value","UG"],["value","UA"],["value","AE"],["value","UM"],["value","UY"],["value","UZ"],["value","VU"],["value","VE"],["value","VN"],["value","VG"],["value","VI"],["value","WF"],["value","EH"],["value","YE"],["value","ZM"],["value","ZW"],[1,"col-3"],["for","addressPostalCode"],["id","addressPostalCode","type","text","name","addressPostalCode","autocomplete","postal-code",1,"form-control",3,"ngModel","required","ngModelChange"],["class","col-6",4,"ngIf"],["class","row",4,"ngIf"],[1,"form-group","form-check"],["id","addressIncludeTaxId","name","addressIncludeTaxId","type","checkbox",1,"form-check-input",3,"ngModel","ngModelChange"],["for","addressIncludeTaxId",1,"form-check-label"],["for","taxId"],["id","taxId","type","text","name","taxId",1,"form-control",3,"ngModel","ngModelChange"],["for","addressLine1"],["id","addressLine1","type","text","name","addressLine1","autocomplete","address-line1",1,"form-control",3,"ngModel","ngModelChange"],["for","addressLine2"],["id","addressLine2","type","text","name","addressLine2","autocomplete","address-line2",1,"form-control",3,"ngModel","ngModelChange"],["for","addressCity"],["id","addressCity","type","text","name","addressCity","autocomplete","address-level2",1,"form-control",3,"ngModel","ngModelChange"],["for","addressState"],["id","addressState","type","text","name","addressState","autocomplete","address-level1",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,t){if(1&e){l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",3),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"select",4),l.ɵɵlistener("ngModelChange",(function(e){return t.taxInfo.country=e}))("change",(function(){return t.changeCountry()})),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"option",5),l.ɵɵtext(13,"-- Select --"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"option",6),l.ɵɵtext(16,"United States"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"option",7),l.ɵɵtext(19,"China"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"option",8),l.ɵɵtext(22,"France"),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementStart(24,"option",9),l.ɵɵtext(25,"Germany"),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementStart(27,"option",10),l.ɵɵtext(28,"Canada"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"option",11),l.ɵɵtext(31,"United Kingdom"),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"option",12),l.ɵɵtext(34,"Australia"),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"option",13),l.ɵɵtext(37,"India"),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelement(39,"option",14),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"option",15),l.ɵɵtext(42,"Afghanistan"),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementStart(44,"option",16),l.ɵɵtext(45,"Åland Islands"),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"option",17),l.ɵɵtext(48,"Albania"),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementStart(50,"option",18),l.ɵɵtext(51,"Algeria"),l.ɵɵelementEnd(),l.ɵɵtext(52,"\n "),l.ɵɵelementStart(53,"option",19),l.ɵɵtext(54,"American Samoa"),l.ɵɵelementEnd(),l.ɵɵtext(55,"\n "),l.ɵɵelementStart(56,"option",20),l.ɵɵtext(57,"Andorra"),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementStart(59,"option",21),l.ɵɵtext(60,"Angola"),l.ɵɵelementEnd(),l.ɵɵtext(61,"\n "),l.ɵɵelementStart(62,"option",22),l.ɵɵtext(63,"Anguilla"),l.ɵɵelementEnd(),l.ɵɵtext(64,"\n "),l.ɵɵelementStart(65,"option",23),l.ɵɵtext(66,"Antarctica"),l.ɵɵelementEnd(),l.ɵɵtext(67,"\n "),l.ɵɵelementStart(68,"option",24),l.ɵɵtext(69,"Antigua and Barbuda"),l.ɵɵelementEnd(),l.ɵɵtext(70,"\n "),l.ɵɵelementStart(71,"option",25),l.ɵɵtext(72,"Argentina"),l.ɵɵelementEnd(),l.ɵɵtext(73,"\n "),l.ɵɵelementStart(74,"option",26),l.ɵɵtext(75,"Armenia"),l.ɵɵelementEnd(),l.ɵɵtext(76,"\n "),l.ɵɵelementStart(77,"option",27),l.ɵɵtext(78,"Aruba"),l.ɵɵelementEnd(),l.ɵɵtext(79,"\n "),l.ɵɵelementStart(80,"option",28),l.ɵɵtext(81,"Austria"),l.ɵɵelementEnd(),l.ɵɵtext(82,"\n "),l.ɵɵelementStart(83,"option",29),l.ɵɵtext(84,"Azerbaijan"),l.ɵɵelementEnd(),l.ɵɵtext(85,"\n "),l.ɵɵelementStart(86,"option",30),l.ɵɵtext(87,"Bahamas"),l.ɵɵelementEnd(),l.ɵɵtext(88,"\n "),l.ɵɵelementStart(89,"option",31),l.ɵɵtext(90,"Bahrain"),l.ɵɵelementEnd(),l.ɵɵtext(91,"\n "),l.ɵɵelementStart(92,"option",32),l.ɵɵtext(93,"Bangladesh"),l.ɵɵelementEnd(),l.ɵɵtext(94,"\n "),l.ɵɵelementStart(95,"option",33),l.ɵɵtext(96,"Barbados"),l.ɵɵelementEnd(),l.ɵɵtext(97,"\n "),l.ɵɵelementStart(98,"option",34),l.ɵɵtext(99,"Belarus"),l.ɵɵelementEnd(),l.ɵɵtext(100,"\n "),l.ɵɵelementStart(101,"option",35),l.ɵɵtext(102,"Belgium"),l.ɵɵelementEnd(),l.ɵɵtext(103,"\n "),l.ɵɵelementStart(104,"option",36),l.ɵɵtext(105,"Belize"),l.ɵɵelementEnd(),l.ɵɵtext(106,"\n "),l.ɵɵelementStart(107,"option",37),l.ɵɵtext(108,"Benin"),l.ɵɵelementEnd(),l.ɵɵtext(109,"\n "),l.ɵɵelementStart(110,"option",38),l.ɵɵtext(111,"Bermuda"),l.ɵɵelementEnd(),l.ɵɵtext(112,"\n "),l.ɵɵelementStart(113,"option",39),l.ɵɵtext(114,"Bhutan"),l.ɵɵelementEnd(),l.ɵɵtext(115,"\n "),l.ɵɵelementStart(116,"option",40),l.ɵɵtext(117,"Bolivia, Plurinational State of"),l.ɵɵelementEnd(),l.ɵɵtext(118,"\n "),l.ɵɵelementStart(119,"option",41),l.ɵɵtext(120,"Bonaire, Sint Eustatius and Saba"),l.ɵɵelementEnd(),l.ɵɵtext(121,"\n "),l.ɵɵelementStart(122,"option",42),l.ɵɵtext(123,"Bosnia and Herzegovina"),l.ɵɵelementEnd(),l.ɵɵtext(124,"\n "),l.ɵɵelementStart(125,"option",43),l.ɵɵtext(126,"Botswana"),l.ɵɵelementEnd(),l.ɵɵtext(127,"\n "),l.ɵɵelementStart(128,"option",44),l.ɵɵtext(129,"Bouvet Island"),l.ɵɵelementEnd(),l.ɵɵtext(130,"\n "),l.ɵɵelementStart(131,"option",45),l.ɵɵtext(132,"Brazil"),l.ɵɵelementEnd(),l.ɵɵtext(133,"\n "),l.ɵɵelementStart(134,"option",46),l.ɵɵtext(135,"British Indian Ocean Territory"),l.ɵɵelementEnd(),l.ɵɵtext(136,"\n "),l.ɵɵelementStart(137,"option",47),l.ɵɵtext(138,"Brunei Darussalam"),l.ɵɵelementEnd(),l.ɵɵtext(139,"\n "),l.ɵɵelementStart(140,"option",48),l.ɵɵtext(141,"Bulgaria"),l.ɵɵelementEnd(),l.ɵɵtext(142,"\n "),l.ɵɵelementStart(143,"option",49),l.ɵɵtext(144,"Burkina Faso"),l.ɵɵelementEnd(),l.ɵɵtext(145,"\n "),l.ɵɵelementStart(146,"option",50),l.ɵɵtext(147,"Burundi"),l.ɵɵelementEnd(),l.ɵɵtext(148,"\n "),l.ɵɵelementStart(149,"option",51),l.ɵɵtext(150,"Cambodia"),l.ɵɵelementEnd(),l.ɵɵtext(151,"\n "),l.ɵɵelementStart(152,"option",52),l.ɵɵtext(153,"Cameroon"),l.ɵɵelementEnd(),l.ɵɵtext(154,"\n "),l.ɵɵelementStart(155,"option",53),l.ɵɵtext(156,"Cape Verde"),l.ɵɵelementEnd(),l.ɵɵtext(157,"\n "),l.ɵɵelementStart(158,"option",54),l.ɵɵtext(159,"Cayman Islands"),l.ɵɵelementEnd(),l.ɵɵtext(160,"\n "),l.ɵɵelementStart(161,"option",55),l.ɵɵtext(162,"Central African Republic"),l.ɵɵelementEnd(),l.ɵɵtext(163,"\n "),l.ɵɵelementStart(164,"option",56),l.ɵɵtext(165,"Chad"),l.ɵɵelementEnd(),l.ɵɵtext(166,"\n "),l.ɵɵelementStart(167,"option",57),l.ɵɵtext(168,"Chile"),l.ɵɵelementEnd(),l.ɵɵtext(169,"\n "),l.ɵɵelementStart(170,"option",58),l.ɵɵtext(171,"Christmas Island"),l.ɵɵelementEnd(),l.ɵɵtext(172,"\n "),l.ɵɵelementStart(173,"option",59),l.ɵɵtext(174,"Cocos (Keeling) Islands"),l.ɵɵelementEnd(),l.ɵɵtext(175,"\n "),l.ɵɵelementStart(176,"option",60),l.ɵɵtext(177,"Colombia"),l.ɵɵelementEnd(),l.ɵɵtext(178,"\n "),l.ɵɵelementStart(179,"option",61),l.ɵɵtext(180,"Comoros"),l.ɵɵelementEnd(),l.ɵɵtext(181,"\n "),l.ɵɵelementStart(182,"option",62),l.ɵɵtext(183,"Congo"),l.ɵɵelementEnd(),l.ɵɵtext(184,"\n "),l.ɵɵelementStart(185,"option",63),l.ɵɵtext(186,"Congo, the Democratic Republic of the"),l.ɵɵelementEnd(),l.ɵɵtext(187,"\n "),l.ɵɵelementStart(188,"option",64),l.ɵɵtext(189,"Cook Islands"),l.ɵɵelementEnd(),l.ɵɵtext(190,"\n "),l.ɵɵelementStart(191,"option",65),l.ɵɵtext(192,"Costa Rica"),l.ɵɵelementEnd(),l.ɵɵtext(193,"\n "),l.ɵɵelementStart(194,"option",66),l.ɵɵtext(195,"Côte d'Ivoire"),l.ɵɵelementEnd(),l.ɵɵtext(196,"\n "),l.ɵɵelementStart(197,"option",67),l.ɵɵtext(198,"Croatia"),l.ɵɵelementEnd(),l.ɵɵtext(199,"\n "),l.ɵɵelementStart(200,"option",68),l.ɵɵtext(201,"Cuba"),l.ɵɵelementEnd(),l.ɵɵtext(202,"\n "),l.ɵɵelementStart(203,"option",69),l.ɵɵtext(204,"Curaçao"),l.ɵɵelementEnd(),l.ɵɵtext(205,"\n "),l.ɵɵelementStart(206,"option",70),l.ɵɵtext(207,"Cyprus"),l.ɵɵelementEnd(),l.ɵɵtext(208,"\n "),l.ɵɵelementStart(209,"option",71),l.ɵɵtext(210,"Czech Republic"),l.ɵɵelementEnd(),l.ɵɵtext(211,"\n "),l.ɵɵelementStart(212,"option",72),l.ɵɵtext(213,"Denmark"),l.ɵɵelementEnd(),l.ɵɵtext(214,"\n "),l.ɵɵelementStart(215,"option",73),l.ɵɵtext(216,"Djibouti"),l.ɵɵelementEnd(),l.ɵɵtext(217,"\n "),l.ɵɵelementStart(218,"option",74),l.ɵɵtext(219,"Dominica"),l.ɵɵelementEnd(),l.ɵɵtext(220,"\n "),l.ɵɵelementStart(221,"option",75),l.ɵɵtext(222,"Dominican Republic"),l.ɵɵelementEnd(),l.ɵɵtext(223,"\n "),l.ɵɵelementStart(224,"option",76),l.ɵɵtext(225,"Ecuador"),l.ɵɵelementEnd(),l.ɵɵtext(226,"\n "),l.ɵɵelementStart(227,"option",77),l.ɵɵtext(228,"Egypt"),l.ɵɵelementEnd(),l.ɵɵtext(229,"\n "),l.ɵɵelementStart(230,"option",78),l.ɵɵtext(231,"El Salvador"),l.ɵɵelementEnd(),l.ɵɵtext(232,"\n "),l.ɵɵelementStart(233,"option",79),l.ɵɵtext(234,"Equatorial Guinea"),l.ɵɵelementEnd(),l.ɵɵtext(235,"\n "),l.ɵɵelementStart(236,"option",80),l.ɵɵtext(237,"Eritrea"),l.ɵɵelementEnd(),l.ɵɵtext(238,"\n "),l.ɵɵelementStart(239,"option",81),l.ɵɵtext(240,"Estonia"),l.ɵɵelementEnd(),l.ɵɵtext(241,"\n "),l.ɵɵelementStart(242,"option",82),l.ɵɵtext(243,"Ethiopia"),l.ɵɵelementEnd(),l.ɵɵtext(244,"\n "),l.ɵɵelementStart(245,"option",83),l.ɵɵtext(246,"Falkland Islands (Malvinas)"),l.ɵɵelementEnd(),l.ɵɵtext(247,"\n "),l.ɵɵelementStart(248,"option",84),l.ɵɵtext(249,"Faroe Islands"),l.ɵɵelementEnd(),l.ɵɵtext(250,"\n "),l.ɵɵelementStart(251,"option",85),l.ɵɵtext(252,"Fiji"),l.ɵɵelementEnd(),l.ɵɵtext(253,"\n "),l.ɵɵelementStart(254,"option",86),l.ɵɵtext(255,"Finland"),l.ɵɵelementEnd(),l.ɵɵtext(256,"\n "),l.ɵɵelementStart(257,"option",87),l.ɵɵtext(258,"French Guiana"),l.ɵɵelementEnd(),l.ɵɵtext(259,"\n "),l.ɵɵelementStart(260,"option",88),l.ɵɵtext(261,"French Polynesia"),l.ɵɵelementEnd(),l.ɵɵtext(262,"\n "),l.ɵɵelementStart(263,"option",89),l.ɵɵtext(264,"French Southern Territories"),l.ɵɵelementEnd(),l.ɵɵtext(265,"\n "),l.ɵɵelementStart(266,"option",90),l.ɵɵtext(267,"Gabon"),l.ɵɵelementEnd(),l.ɵɵtext(268,"\n "),l.ɵɵelementStart(269,"option",91),l.ɵɵtext(270,"Gambia"),l.ɵɵelementEnd(),l.ɵɵtext(271,"\n "),l.ɵɵelementStart(272,"option",92),l.ɵɵtext(273,"Georgia"),l.ɵɵelementEnd(),l.ɵɵtext(274,"\n "),l.ɵɵelementStart(275,"option",93),l.ɵɵtext(276,"Ghana"),l.ɵɵelementEnd(),l.ɵɵtext(277,"\n "),l.ɵɵelementStart(278,"option",94),l.ɵɵtext(279,"Gibraltar"),l.ɵɵelementEnd(),l.ɵɵtext(280,"\n "),l.ɵɵelementStart(281,"option",95),l.ɵɵtext(282,"Greece"),l.ɵɵelementEnd(),l.ɵɵtext(283,"\n "),l.ɵɵelementStart(284,"option",96),l.ɵɵtext(285,"Greenland"),l.ɵɵelementEnd(),l.ɵɵtext(286,"\n "),l.ɵɵelementStart(287,"option",97),l.ɵɵtext(288,"Grenada"),l.ɵɵelementEnd(),l.ɵɵtext(289,"\n "),l.ɵɵelementStart(290,"option",98),l.ɵɵtext(291,"Guadeloupe"),l.ɵɵelementEnd(),l.ɵɵtext(292,"\n "),l.ɵɵelementStart(293,"option",99),l.ɵɵtext(294,"Guam"),l.ɵɵelementEnd(),l.ɵɵtext(295,"\n "),l.ɵɵelementStart(296,"option",100),l.ɵɵtext(297,"Guatemala"),l.ɵɵelementEnd(),l.ɵɵtext(298,"\n "),l.ɵɵelementStart(299,"option",101),l.ɵɵtext(300,"Guernsey"),l.ɵɵelementEnd(),l.ɵɵtext(301,"\n "),l.ɵɵelementStart(302,"option",102),l.ɵɵtext(303,"Guinea"),l.ɵɵelementEnd(),l.ɵɵtext(304,"\n "),l.ɵɵelementStart(305,"option",103),l.ɵɵtext(306,"Guinea-Bissau"),l.ɵɵelementEnd(),l.ɵɵtext(307,"\n "),l.ɵɵelementStart(308,"option",104),l.ɵɵtext(309,"Guyana"),l.ɵɵelementEnd(),l.ɵɵtext(310,"\n "),l.ɵɵelementStart(311,"option",105),l.ɵɵtext(312,"Haiti"),l.ɵɵelementEnd(),l.ɵɵtext(313,"\n "),l.ɵɵelementStart(314,"option",106),l.ɵɵtext(315,"Heard Island and McDonald Islands"),l.ɵɵelementEnd(),l.ɵɵtext(316,"\n "),l.ɵɵelementStart(317,"option",107),l.ɵɵtext(318,"Holy See (Vatican City State)"),l.ɵɵelementEnd(),l.ɵɵtext(319,"\n "),l.ɵɵelementStart(320,"option",108),l.ɵɵtext(321,"Honduras"),l.ɵɵelementEnd(),l.ɵɵtext(322,"\n "),l.ɵɵelementStart(323,"option",109),l.ɵɵtext(324,"Hong Kong"),l.ɵɵelementEnd(),l.ɵɵtext(325,"\n "),l.ɵɵelementStart(326,"option",110),l.ɵɵtext(327,"Hungary"),l.ɵɵelementEnd(),l.ɵɵtext(328,"\n "),l.ɵɵelementStart(329,"option",111),l.ɵɵtext(330,"Iceland"),l.ɵɵelementEnd(),l.ɵɵtext(331,"\n "),l.ɵɵelementStart(332,"option",112),l.ɵɵtext(333,"Indonesia"),l.ɵɵelementEnd(),l.ɵɵtext(334,"\n "),l.ɵɵelementStart(335,"option",113),l.ɵɵtext(336,"Iran, Islamic Republic of"),l.ɵɵelementEnd(),l.ɵɵtext(337,"\n "),l.ɵɵelementStart(338,"option",114),l.ɵɵtext(339,"Iraq"),l.ɵɵelementEnd(),l.ɵɵtext(340,"\n "),l.ɵɵelementStart(341,"option",115),l.ɵɵtext(342,"Ireland"),l.ɵɵelementEnd(),l.ɵɵtext(343,"\n "),l.ɵɵelementStart(344,"option",116),l.ɵɵtext(345,"Isle of Man"),l.ɵɵelementEnd(),l.ɵɵtext(346,"\n "),l.ɵɵelementStart(347,"option",117),l.ɵɵtext(348,"Israel"),l.ɵɵelementEnd(),l.ɵɵtext(349,"\n "),l.ɵɵelementStart(350,"option",118),l.ɵɵtext(351,"Italy"),l.ɵɵelementEnd(),l.ɵɵtext(352,"\n "),l.ɵɵelementStart(353,"option",119),l.ɵɵtext(354,"Jamaica"),l.ɵɵelementEnd(),l.ɵɵtext(355,"\n "),l.ɵɵelementStart(356,"option",120),l.ɵɵtext(357,"Japan"),l.ɵɵelementEnd(),l.ɵɵtext(358,"\n "),l.ɵɵelementStart(359,"option",121),l.ɵɵtext(360,"Jersey"),l.ɵɵelementEnd(),l.ɵɵtext(361,"\n "),l.ɵɵelementStart(362,"option",122),l.ɵɵtext(363,"Jordan"),l.ɵɵelementEnd(),l.ɵɵtext(364,"\n "),l.ɵɵelementStart(365,"option",123),l.ɵɵtext(366,"Kazakhstan"),l.ɵɵelementEnd(),l.ɵɵtext(367,"\n "),l.ɵɵelementStart(368,"option",124),l.ɵɵtext(369,"Kenya"),l.ɵɵelementEnd(),l.ɵɵtext(370,"\n "),l.ɵɵelementStart(371,"option",125),l.ɵɵtext(372,"Kiribati"),l.ɵɵelementEnd(),l.ɵɵtext(373,"\n "),l.ɵɵelementStart(374,"option",126),l.ɵɵtext(375,"Korea, Democratic People's Republic of"),l.ɵɵelementEnd(),l.ɵɵtext(376,"\n "),l.ɵɵelementStart(377,"option",127),l.ɵɵtext(378,"Korea, Republic of"),l.ɵɵelementEnd(),l.ɵɵtext(379,"\n "),l.ɵɵelementStart(380,"option",128),l.ɵɵtext(381,"Kuwait"),l.ɵɵelementEnd(),l.ɵɵtext(382,"\n "),l.ɵɵelementStart(383,"option",129),l.ɵɵtext(384,"Kyrgyzstan"),l.ɵɵelementEnd(),l.ɵɵtext(385,"\n "),l.ɵɵelementStart(386,"option",130),l.ɵɵtext(387,"Lao People's Democratic Republic"),l.ɵɵelementEnd(),l.ɵɵtext(388,"\n "),l.ɵɵelementStart(389,"option",131),l.ɵɵtext(390,"Latvia"),l.ɵɵelementEnd(),l.ɵɵtext(391,"\n "),l.ɵɵelementStart(392,"option",132),l.ɵɵtext(393,"Lebanon"),l.ɵɵelementEnd(),l.ɵɵtext(394,"\n "),l.ɵɵelementStart(395,"option",133),l.ɵɵtext(396,"Lesotho"),l.ɵɵelementEnd(),l.ɵɵtext(397,"\n "),l.ɵɵelementStart(398,"option",134),l.ɵɵtext(399,"Liberia"),l.ɵɵelementEnd(),l.ɵɵtext(400,"\n "),l.ɵɵelementStart(401,"option",135),l.ɵɵtext(402,"Libya"),l.ɵɵelementEnd(),l.ɵɵtext(403,"\n "),l.ɵɵelementStart(404,"option",136),l.ɵɵtext(405,"Liechtenstein"),l.ɵɵelementEnd(),l.ɵɵtext(406,"\n "),l.ɵɵelementStart(407,"option",137),l.ɵɵtext(408,"Lithuania"),l.ɵɵelementEnd(),l.ɵɵtext(409,"\n "),l.ɵɵelementStart(410,"option",138),l.ɵɵtext(411,"Luxembourg"),l.ɵɵelementEnd(),l.ɵɵtext(412,"\n "),l.ɵɵelementStart(413,"option",139),l.ɵɵtext(414,"Macao"),l.ɵɵelementEnd(),l.ɵɵtext(415,"\n "),l.ɵɵelementStart(416,"option",140),l.ɵɵtext(417,"Macedonia, the former Yugoslav Republic of"),l.ɵɵelementEnd(),l.ɵɵtext(418,"\n "),l.ɵɵelementStart(419,"option",141),l.ɵɵtext(420,"Madagascar"),l.ɵɵelementEnd(),l.ɵɵtext(421,"\n "),l.ɵɵelementStart(422,"option",142),l.ɵɵtext(423,"Malawi"),l.ɵɵelementEnd(),l.ɵɵtext(424,"\n "),l.ɵɵelementStart(425,"option",143),l.ɵɵtext(426,"Malaysia"),l.ɵɵelementEnd(),l.ɵɵtext(427,"\n "),l.ɵɵelementStart(428,"option",144),l.ɵɵtext(429,"Maldives"),l.ɵɵelementEnd(),l.ɵɵtext(430,"\n "),l.ɵɵelementStart(431,"option",145),l.ɵɵtext(432,"Mali"),l.ɵɵelementEnd(),l.ɵɵtext(433,"\n "),l.ɵɵelementStart(434,"option",146),l.ɵɵtext(435,"Malta"),l.ɵɵelementEnd(),l.ɵɵtext(436,"\n "),l.ɵɵelementStart(437,"option",147),l.ɵɵtext(438,"Marshall Islands"),l.ɵɵelementEnd(),l.ɵɵtext(439,"\n "),l.ɵɵelementStart(440,"option",148),l.ɵɵtext(441,"Martinique"),l.ɵɵelementEnd(),l.ɵɵtext(442,"\n "),l.ɵɵelementStart(443,"option",149),l.ɵɵtext(444,"Mauritania"),l.ɵɵelementEnd(),l.ɵɵtext(445,"\n "),l.ɵɵelementStart(446,"option",150),l.ɵɵtext(447,"Mauritius"),l.ɵɵelementEnd(),l.ɵɵtext(448,"\n "),l.ɵɵelementStart(449,"option",151),l.ɵɵtext(450,"Mayotte"),l.ɵɵelementEnd(),l.ɵɵtext(451,"\n "),l.ɵɵelementStart(452,"option",152),l.ɵɵtext(453,"Mexico"),l.ɵɵelementEnd(),l.ɵɵtext(454,"\n "),l.ɵɵelementStart(455,"option",153),l.ɵɵtext(456,"Micronesia, Federated States of"),l.ɵɵelementEnd(),l.ɵɵtext(457,"\n "),l.ɵɵelementStart(458,"option",154),l.ɵɵtext(459,"Moldova, Republic of"),l.ɵɵelementEnd(),l.ɵɵtext(460,"\n "),l.ɵɵelementStart(461,"option",155),l.ɵɵtext(462,"Monaco"),l.ɵɵelementEnd(),l.ɵɵtext(463,"\n "),l.ɵɵelementStart(464,"option",156),l.ɵɵtext(465,"Mongolia"),l.ɵɵelementEnd(),l.ɵɵtext(466,"\n "),l.ɵɵelementStart(467,"option",157),l.ɵɵtext(468,"Montenegro"),l.ɵɵelementEnd(),l.ɵɵtext(469,"\n "),l.ɵɵelementStart(470,"option",158),l.ɵɵtext(471,"Montserrat"),l.ɵɵelementEnd(),l.ɵɵtext(472,"\n "),l.ɵɵelementStart(473,"option",159),l.ɵɵtext(474,"Morocco"),l.ɵɵelementEnd(),l.ɵɵtext(475,"\n "),l.ɵɵelementStart(476,"option",160),l.ɵɵtext(477,"Mozambique"),l.ɵɵelementEnd(),l.ɵɵtext(478,"\n "),l.ɵɵelementStart(479,"option",161),l.ɵɵtext(480,"Myanmar"),l.ɵɵelementEnd(),l.ɵɵtext(481,"\n "),l.ɵɵelementStart(482,"option",162),l.ɵɵtext(483,"Namibia"),l.ɵɵelementEnd(),l.ɵɵtext(484,"\n "),l.ɵɵelementStart(485,"option",163),l.ɵɵtext(486,"Nauru"),l.ɵɵelementEnd(),l.ɵɵtext(487,"\n "),l.ɵɵelementStart(488,"option",164),l.ɵɵtext(489,"Nepal"),l.ɵɵelementEnd(),l.ɵɵtext(490,"\n "),l.ɵɵelementStart(491,"option",165),l.ɵɵtext(492,"Netherlands"),l.ɵɵelementEnd(),l.ɵɵtext(493,"\n "),l.ɵɵelementStart(494,"option",166),l.ɵɵtext(495,"New Caledonia"),l.ɵɵelementEnd(),l.ɵɵtext(496,"\n "),l.ɵɵelementStart(497,"option",167),l.ɵɵtext(498,"New Zealand"),l.ɵɵelementEnd(),l.ɵɵtext(499,"\n "),l.ɵɵelementStart(500,"option",168),l.ɵɵtext(501,"Nicaragua"),l.ɵɵelementEnd(),l.ɵɵtext(502,"\n "),l.ɵɵelementStart(503,"option",169),l.ɵɵtext(504,"Niger"),l.ɵɵelementEnd(),l.ɵɵtext(505,"\n "),l.ɵɵelementStart(506,"option",170),l.ɵɵtext(507,"Nigeria"),l.ɵɵelementEnd(),l.ɵɵtext(508,"\n "),l.ɵɵelementStart(509,"option",171),l.ɵɵtext(510,"Niue"),l.ɵɵelementEnd(),l.ɵɵtext(511,"\n "),l.ɵɵelementStart(512,"option",172),l.ɵɵtext(513,"Norfolk Island"),l.ɵɵelementEnd(),l.ɵɵtext(514,"\n "),l.ɵɵelementStart(515,"option",173),l.ɵɵtext(516,"Northern Mariana Islands"),l.ɵɵelementEnd(),l.ɵɵtext(517,"\n "),l.ɵɵelementStart(518,"option",174),l.ɵɵtext(519,"Norway"),l.ɵɵelementEnd(),l.ɵɵtext(520,"\n "),l.ɵɵelementStart(521,"option",175),l.ɵɵtext(522,"Oman"),l.ɵɵelementEnd(),l.ɵɵtext(523,"\n "),l.ɵɵelementStart(524,"option",176),l.ɵɵtext(525,"Pakistan"),l.ɵɵelementEnd(),l.ɵɵtext(526,"\n "),l.ɵɵelementStart(527,"option",177),l.ɵɵtext(528,"Palau"),l.ɵɵelementEnd(),l.ɵɵtext(529,"\n "),l.ɵɵelementStart(530,"option",178),l.ɵɵtext(531,"Palestinian Territory, Occupied"),l.ɵɵelementEnd(),l.ɵɵtext(532,"\n "),l.ɵɵelementStart(533,"option",179),l.ɵɵtext(534,"Panama"),l.ɵɵelementEnd(),l.ɵɵtext(535,"\n "),l.ɵɵelementStart(536,"option",180),l.ɵɵtext(537,"Papua New Guinea"),l.ɵɵelementEnd(),l.ɵɵtext(538,"\n "),l.ɵɵelementStart(539,"option",181),l.ɵɵtext(540,"Paraguay"),l.ɵɵelementEnd(),l.ɵɵtext(541,"\n "),l.ɵɵelementStart(542,"option",182),l.ɵɵtext(543,"Peru"),l.ɵɵelementEnd(),l.ɵɵtext(544,"\n "),l.ɵɵelementStart(545,"option",183),l.ɵɵtext(546,"Philippines"),l.ɵɵelementEnd(),l.ɵɵtext(547,"\n "),l.ɵɵelementStart(548,"option",184),l.ɵɵtext(549,"Pitcairn"),l.ɵɵelementEnd(),l.ɵɵtext(550,"\n "),l.ɵɵelementStart(551,"option",185),l.ɵɵtext(552,"Poland"),l.ɵɵelementEnd(),l.ɵɵtext(553,"\n "),l.ɵɵelementStart(554,"option",186),l.ɵɵtext(555,"Portugal"),l.ɵɵelementEnd(),l.ɵɵtext(556,"\n "),l.ɵɵelementStart(557,"option",187),l.ɵɵtext(558,"Puerto Rico"),l.ɵɵelementEnd(),l.ɵɵtext(559,"\n "),l.ɵɵelementStart(560,"option",188),l.ɵɵtext(561,"Qatar"),l.ɵɵelementEnd(),l.ɵɵtext(562,"\n "),l.ɵɵelementStart(563,"option",189),l.ɵɵtext(564,"Réunion"),l.ɵɵelementEnd(),l.ɵɵtext(565,"\n "),l.ɵɵelementStart(566,"option",190),l.ɵɵtext(567,"Romania"),l.ɵɵelementEnd(),l.ɵɵtext(568,"\n "),l.ɵɵelementStart(569,"option",191),l.ɵɵtext(570,"Russian Federation"),l.ɵɵelementEnd(),l.ɵɵtext(571,"\n "),l.ɵɵelementStart(572,"option",192),l.ɵɵtext(573,"Rwanda"),l.ɵɵelementEnd(),l.ɵɵtext(574,"\n "),l.ɵɵelementStart(575,"option",193),l.ɵɵtext(576,"Saint Barthélemy"),l.ɵɵelementEnd(),l.ɵɵtext(577,"\n "),l.ɵɵelementStart(578,"option",194),l.ɵɵtext(579,"Saint Helena, Ascension and Tristan da Cunha"),l.ɵɵelementEnd(),l.ɵɵtext(580,"\n "),l.ɵɵelementStart(581,"option",195),l.ɵɵtext(582,"Saint Kitts and Nevis"),l.ɵɵelementEnd(),l.ɵɵtext(583,"\n "),l.ɵɵelementStart(584,"option",196),l.ɵɵtext(585,"Saint Lucia"),l.ɵɵelementEnd(),l.ɵɵtext(586,"\n "),l.ɵɵelementStart(587,"option",197),l.ɵɵtext(588,"Saint Martin (French part)"),l.ɵɵelementEnd(),l.ɵɵtext(589,"\n "),l.ɵɵelementStart(590,"option",198),l.ɵɵtext(591,"Saint Pierre and Miquelon"),l.ɵɵelementEnd(),l.ɵɵtext(592,"\n "),l.ɵɵelementStart(593,"option",199),l.ɵɵtext(594,"Saint Vincent and the Grenadines"),l.ɵɵelementEnd(),l.ɵɵtext(595,"\n "),l.ɵɵelementStart(596,"option",200),l.ɵɵtext(597,"Samoa"),l.ɵɵelementEnd(),l.ɵɵtext(598,"\n "),l.ɵɵelementStart(599,"option",201),l.ɵɵtext(600,"San Marino"),l.ɵɵelementEnd(),l.ɵɵtext(601,"\n ");l.ɵɵelementStart(602,"option",202),l.ɵɵtext(603,"Sao Tome and Principe"),l.ɵɵelementEnd(),l.ɵɵtext(604,"\n "),l.ɵɵelementStart(605,"option",203),l.ɵɵtext(606,"Saudi Arabia"),l.ɵɵelementEnd(),l.ɵɵtext(607,"\n "),l.ɵɵelementStart(608,"option",204),l.ɵɵtext(609,"Senegal"),l.ɵɵelementEnd(),l.ɵɵtext(610,"\n "),l.ɵɵelementStart(611,"option",205),l.ɵɵtext(612,"Serbia"),l.ɵɵelementEnd(),l.ɵɵtext(613,"\n "),l.ɵɵelementStart(614,"option",206),l.ɵɵtext(615,"Seychelles"),l.ɵɵelementEnd(),l.ɵɵtext(616,"\n "),l.ɵɵelementStart(617,"option",207),l.ɵɵtext(618,"Sierra Leone"),l.ɵɵelementEnd(),l.ɵɵtext(619,"\n "),l.ɵɵelementStart(620,"option",208),l.ɵɵtext(621,"Singapore"),l.ɵɵelementEnd(),l.ɵɵtext(622,"\n "),l.ɵɵelementStart(623,"option",209),l.ɵɵtext(624,"Sint Maarten (Dutch part)"),l.ɵɵelementEnd(),l.ɵɵtext(625,"\n "),l.ɵɵelementStart(626,"option",210),l.ɵɵtext(627,"Slovakia"),l.ɵɵelementEnd(),l.ɵɵtext(628,"\n "),l.ɵɵelementStart(629,"option",211),l.ɵɵtext(630,"Slovenia"),l.ɵɵelementEnd(),l.ɵɵtext(631,"\n "),l.ɵɵelementStart(632,"option",212),l.ɵɵtext(633,"Solomon Islands"),l.ɵɵelementEnd(),l.ɵɵtext(634,"\n "),l.ɵɵelementStart(635,"option",213),l.ɵɵtext(636,"Somalia"),l.ɵɵelementEnd(),l.ɵɵtext(637,"\n "),l.ɵɵelementStart(638,"option",214),l.ɵɵtext(639,"South Africa"),l.ɵɵelementEnd(),l.ɵɵtext(640,"\n "),l.ɵɵelementStart(641,"option",215),l.ɵɵtext(642,"South Georgia and the South Sandwich Islands"),l.ɵɵelementEnd(),l.ɵɵtext(643,"\n "),l.ɵɵelementStart(644,"option",216),l.ɵɵtext(645,"South Sudan"),l.ɵɵelementEnd(),l.ɵɵtext(646,"\n "),l.ɵɵelementStart(647,"option",217),l.ɵɵtext(648,"Spain"),l.ɵɵelementEnd(),l.ɵɵtext(649,"\n "),l.ɵɵelementStart(650,"option",218),l.ɵɵtext(651,"Sri Lanka"),l.ɵɵelementEnd(),l.ɵɵtext(652,"\n "),l.ɵɵelementStart(653,"option",219),l.ɵɵtext(654,"Sudan"),l.ɵɵelementEnd(),l.ɵɵtext(655,"\n "),l.ɵɵelementStart(656,"option",220),l.ɵɵtext(657,"Suriname"),l.ɵɵelementEnd(),l.ɵɵtext(658,"\n "),l.ɵɵelementStart(659,"option",221),l.ɵɵtext(660,"Svalbard and Jan Mayen"),l.ɵɵelementEnd(),l.ɵɵtext(661,"\n "),l.ɵɵelementStart(662,"option",222),l.ɵɵtext(663,"Swaziland"),l.ɵɵelementEnd(),l.ɵɵtext(664,"\n "),l.ɵɵelementStart(665,"option",223),l.ɵɵtext(666,"Sweden"),l.ɵɵelementEnd(),l.ɵɵtext(667,"\n "),l.ɵɵelementStart(668,"option",224),l.ɵɵtext(669,"Switzerland"),l.ɵɵelementEnd(),l.ɵɵtext(670,"\n "),l.ɵɵelementStart(671,"option",225),l.ɵɵtext(672,"Syrian Arab Republic"),l.ɵɵelementEnd(),l.ɵɵtext(673,"\n "),l.ɵɵelementStart(674,"option",226),l.ɵɵtext(675,"Taiwan"),l.ɵɵelementEnd(),l.ɵɵtext(676,"\n "),l.ɵɵelementStart(677,"option",227),l.ɵɵtext(678,"Tajikistan"),l.ɵɵelementEnd(),l.ɵɵtext(679,"\n "),l.ɵɵelementStart(680,"option",228),l.ɵɵtext(681,"Tanzania, United Republic of"),l.ɵɵelementEnd(),l.ɵɵtext(682,"\n "),l.ɵɵelementStart(683,"option",229),l.ɵɵtext(684,"Thailand"),l.ɵɵelementEnd(),l.ɵɵtext(685,"\n "),l.ɵɵelementStart(686,"option",230),l.ɵɵtext(687,"Timor-Leste"),l.ɵɵelementEnd(),l.ɵɵtext(688,"\n "),l.ɵɵelementStart(689,"option",231),l.ɵɵtext(690,"Togo"),l.ɵɵelementEnd(),l.ɵɵtext(691,"\n "),l.ɵɵelementStart(692,"option",232),l.ɵɵtext(693,"Tokelau"),l.ɵɵelementEnd(),l.ɵɵtext(694,"\n "),l.ɵɵelementStart(695,"option",233),l.ɵɵtext(696,"Tonga"),l.ɵɵelementEnd(),l.ɵɵtext(697,"\n "),l.ɵɵelementStart(698,"option",234),l.ɵɵtext(699,"Trinidad and Tobago"),l.ɵɵelementEnd(),l.ɵɵtext(700,"\n "),l.ɵɵelementStart(701,"option",235),l.ɵɵtext(702,"Tunisia"),l.ɵɵelementEnd(),l.ɵɵtext(703,"\n "),l.ɵɵelementStart(704,"option",236),l.ɵɵtext(705,"Turkey"),l.ɵɵelementEnd(),l.ɵɵtext(706,"\n "),l.ɵɵelementStart(707,"option",237),l.ɵɵtext(708,"Turkmenistan"),l.ɵɵelementEnd(),l.ɵɵtext(709,"\n "),l.ɵɵelementStart(710,"option",238),l.ɵɵtext(711,"Turks and Caicos Islands"),l.ɵɵelementEnd(),l.ɵɵtext(712,"\n "),l.ɵɵelementStart(713,"option",239),l.ɵɵtext(714,"Tuvalu"),l.ɵɵelementEnd(),l.ɵɵtext(715,"\n "),l.ɵɵelementStart(716,"option",240),l.ɵɵtext(717,"Uganda"),l.ɵɵelementEnd(),l.ɵɵtext(718,"\n "),l.ɵɵelementStart(719,"option",241),l.ɵɵtext(720,"Ukraine"),l.ɵɵelementEnd(),l.ɵɵtext(721,"\n "),l.ɵɵelementStart(722,"option",242),l.ɵɵtext(723,"United Arab Emirates"),l.ɵɵelementEnd(),l.ɵɵtext(724,"\n "),l.ɵɵelementStart(725,"option",243),l.ɵɵtext(726,"United States Minor Outlying Islands"),l.ɵɵelementEnd(),l.ɵɵtext(727,"\n "),l.ɵɵelementStart(728,"option",244),l.ɵɵtext(729,"Uruguay"),l.ɵɵelementEnd(),l.ɵɵtext(730,"\n "),l.ɵɵelementStart(731,"option",245),l.ɵɵtext(732,"Uzbekistan"),l.ɵɵelementEnd(),l.ɵɵtext(733,"\n "),l.ɵɵelementStart(734,"option",246),l.ɵɵtext(735,"Vanuatu"),l.ɵɵelementEnd(),l.ɵɵtext(736,"\n "),l.ɵɵelementStart(737,"option",247),l.ɵɵtext(738,"Venezuela, Bolivarian Republic of"),l.ɵɵelementEnd(),l.ɵɵtext(739,"\n "),l.ɵɵelementStart(740,"option",248),l.ɵɵtext(741,"Viet Nam"),l.ɵɵelementEnd(),l.ɵɵtext(742,"\n "),l.ɵɵelementStart(743,"option",249),l.ɵɵtext(744,"Virgin Islands, British"),l.ɵɵelementEnd(),l.ɵɵtext(745,"\n "),l.ɵɵelementStart(746,"option",250),l.ɵɵtext(747,"Virgin Islands, U.S."),l.ɵɵelementEnd(),l.ɵɵtext(748,"\n "),l.ɵɵelementStart(749,"option",251),l.ɵɵtext(750,"Wallis and Futuna"),l.ɵɵelementEnd(),l.ɵɵtext(751,"\n "),l.ɵɵelementStart(752,"option",252),l.ɵɵtext(753,"Western Sahara"),l.ɵɵelementEnd(),l.ɵɵtext(754,"\n "),l.ɵɵelementStart(755,"option",253),l.ɵɵtext(756,"Yemen"),l.ɵɵelementEnd(),l.ɵɵtext(757,"\n "),l.ɵɵelementStart(758,"option",254),l.ɵɵtext(759,"Zambia"),l.ɵɵelementEnd(),l.ɵɵtext(760,"\n "),l.ɵɵelementStart(761,"option",255),l.ɵɵtext(762,"Zimbabwe"),l.ɵɵelementEnd(),l.ɵɵtext(763,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(764,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(765,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(766,"\n "),l.ɵɵelementStart(767,"div",256),l.ɵɵtext(768,"\n "),l.ɵɵelementStart(769,"div",2),l.ɵɵtext(770,"\n "),l.ɵɵelementStart(771,"label",257),l.ɵɵtext(772),l.ɵɵpipe(773,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(774,"\n "),l.ɵɵelementStart(775,"input",258),l.ɵɵlistener("ngModelChange",(function(e){return t.taxInfo.postalCode=e})),l.ɵɵelementEnd(),l.ɵɵtext(776,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(777,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(778,"\n "),l.ɵɵtemplate(779,h,11,4,"div",259),l.ɵɵtext(780,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(781,"\n"),l.ɵɵtemplate(782,f,14,4,"div",260),l.ɵɵtext(783,"\n"),l.ɵɵtemplate(784,v,50,16,"div",260),l.ɵɵtext(785,"\n")}2&e&&(l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,8,"country")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.taxInfo.country),l.ɵɵadvance(762),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(773,10,"zipPostalCode")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.taxInfo.postalCode)("required","US"===t.taxInfo.country),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",t.organizationId&&"US"!==t.taxInfo.country),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.organizationId&&t.taxInfo.includeTaxId),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.organizationId&&t.taxInfo.includeTaxId))},directives:[u.SelectControlValueAccessor,u.RequiredValidator,u.NgControlStatus,u.NgModel,u.NgSelectOption,u.ɵangular_packages_forms_forms_x,u.DefaultValueAccessor,d.NgIf,u.CheckboxControlValueAccessor],pipes:[m.I18nPipe],encapsulation:2}),e}();t.TaxInfoComponent=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(39),i=n(88),o=n(144),a=n(159),s=n(94),l=function(){function e(e){this.id=null,this.organizationId=null,this.folderId=null,this.name=null,this.notes=null,this.type=null,this.favorite=!1,this.organizationUseTotp=!1,this.edit=!1,this.viewPassword=!0,this.login=new a.LoginView,this.identity=new o.IdentityView,this.card=new i.CardView,this.secureNote=new s.SecureNoteView,this.attachments=null,this.fields=null,this.passwordHistory=null,this.collectionIds=null,this.revisionDate=null,this.deletedDate=null,e&&(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.favorite=e.favorite,this.organizationUseTotp=e.organizationUseTotp,this.edit=e.edit,this.viewPassword=e.viewPassword,this.type=e.type,this.localData=e.localData,this.collectionIds=e.collectionIds,this.revisionDate=e.revisionDate,this.deletedDate=e.deletedDate)}return Object.defineProperty(e.prototype,"subTitle",{get:function(){switch(this.type){case r.CipherType.Login:return this.login.subTitle;case r.CipherType.SecureNote:return this.secureNote.subTitle;case r.CipherType.Card:return this.card.subTitle;case r.CipherType.Identity:return this.identity.subTitle}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPasswordHistory",{get:function(){return this.passwordHistory&&this.passwordHistory.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasAttachments",{get:function(){return this.attachments&&this.attachments.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasOldAttachments",{get:function(){if(this.hasAttachments)for(var e=0;e<this.attachments.length;e++)if(null==this.attachments[e].key)return!0;return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasFields",{get:function(){return this.fields&&this.fields.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"passwordRevisionDisplayDate",{get:function(){return this.type!==r.CipherType.Login||null==this.login||null==this.login.password||""===this.login.password?null:this.login.passwordRevisionDate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDeleted",{get:function(){return null!=this.deletedDate},enumerable:!0,configurable:!0}),e}();t.CipherView=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(30),i=function(){function e(e){this.title=null,this.middleName=null,this.address1=null,this.address2=null,this.address3=null,this.city=null,this.state=null,this.postalCode=null,this.country=null,this.company=null,this.email=null,this.phone=null,this.ssn=null,this.username=null,this.passportNumber=null,this.licenseNumber=null,this._firstName=null,this._lastName=null,this._subTitle=null}return Object.defineProperty(e.prototype,"firstName",{get:function(){return this._firstName},set:function(e){this._firstName=e,this._subTitle=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastName",{get:function(){return this._lastName},set:function(e){this._lastName=e,this._subTitle=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){return null!=this._subTitle||null==this.firstName&&null==this.lastName||(this._subTitle="",null!=this.firstName&&(this._subTitle=this.firstName),null!=this.lastName&&(""!==this._subTitle&&(this._subTitle+=" "),this._subTitle+=this.lastName)),this._subTitle},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullName",{get:function(){if(null!=this.title||null!=this.firstName||null!=this.middleName||null!=this.lastName){var e="";return null!=this.title&&(e+=this.title+" "),null!=this.firstName&&(e+=this.firstName+" "),null!=this.middleName&&(e+=this.middleName+" "),null!=this.lastName&&(e+=this.lastName),e.trim()}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullAddress",{get:function(){var e=this.address1;return r.Utils.isNullOrWhitespace(this.address2)||(r.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address2),r.Utils.isNullOrWhitespace(this.address3)||(r.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address3),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullAddressPart2",{get:function(){if(null==this.city&&null==this.state&&null==this.postalCode)return null;var e=this.city||"-",t=this.state,n=this.postalCode||"-",i=e;return r.Utils.isNullOrWhitespace(t)||(i+=", "+t),i+=", "+n},enumerable:!0,configurable:!0}),e}();t.IdentityView=i},,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.id=e.id,this.organizationId=e.organizationId,this.name=e.name,this.externalId=e.externalId,this.readOnly=e.readOnly};t.CollectionData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(140),i=function(e){this.id=null,this.organizationId=null,this.name=null,this.externalId=null,this.readOnly=null,this.hidePasswords=null,e&&(this.id=e.id,this.organizationId=e.organizationId,this.externalId=e.externalId,e instanceof r.Collection&&(this.readOnly=e.readOnly,this.hidePasswords=e.hidePasswords))};t.CollectionView=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed"}(t.OrganizationUserStatusType||(t.OrganizationUserStatusType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(39),i=n(482),o=n(483),a=n(484),s=n(485),l=n(486),c=n(595),p=n(488),u=function(e,t,n){if(null!=e){switch(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.userId=t,this.edit=e.edit,this.viewPassword=e.viewPassword,this.organizationUseTotp=e.organizationUseTotp,this.favorite=e.favorite,this.revisionDate=e.revisionDate,this.type=e.type,this.name=e.name,this.notes=e.notes,this.collectionIds=null!=n?n:e.collectionIds,this.deletedDate=e.deletedDate,this.type){case r.CipherType.Login:this.login=new l.LoginData(e.login);break;case r.CipherType.SecureNote:this.secureNote=new p.SecureNoteData(e.secureNote);break;case r.CipherType.Card:this.card=new o.CardData(e.card);break;case r.CipherType.Identity:this.identity=new s.IdentityData(e.identity)}null!=e.fields&&(this.fields=e.fields.map((function(e){return new a.FieldData(e)}))),null!=e.attachments&&(this.attachments=e.attachments.map((function(e){return new i.AttachmentData(e)}))),null!=e.passwordHistory&&(this.passwordHistory=e.passwordHistory.map((function(e){return new c.PasswordHistoryData(e)})))}};t.CipherData=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(30),i=function(){function e(e){this.username=null,this.password=null,this.passwordRevisionDate=null,this.totp=null,this.uris=null,e&&(this.passwordRevisionDate=e.passwordRevisionDate)}return Object.defineProperty(e.prototype,"uri",{get:function(){return this.hasUris?this.uris[0].uri:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskedPassword",{get:function(){return null!=this.password?"••••••••":null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){return this.username},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canLaunch",{get:function(){return this.hasUris&&this.uris.some((function(e){return e.canLaunch}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTotp",{get:function(){return!r.Utils.isNullOrWhitespace(this.totp)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"launchUri",{get:function(){if(this.hasUris){var e=this.uris.find((function(e){return e.canLaunch}));if(null!=e)return e.launchUri}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasUris",{get:function(){return null!=this.uris&&this.uris.length>0},enumerable:!0,configurable:!0}),e}();t.LoginView=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Text=0]="Text",e[e.File=1]="File"}(t.SendType||(t.SendType={}))},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(113)),s=(n(6),n(18),n(3),n(79)),l=n(0),c=n(6),p=n(3),u=n(9),d=n(18),m=n(13),h=n(16),f=n(45),v=n(10),y=function(){function e(e,t,n,r){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.onAuthed=new o.EventEmitter}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):(e=new s.PasswordVerificationRequest,t=e,n=this,[4,this.cryptoService.hashPassword(this.masterPassword,null)]);case 1:t.masterPasswordHash=n.masterPasswordHash=i.sent(),i.label=2;case 2:switch(i.trys.push([2,4,,5]),this.type){case-1:this.formPromise=this.apiService.getTwoFactorRecover(e);break;case a.TwoFactorProviderType.Duo:case a.TwoFactorProviderType.OrganizationDuo:null!=this.organizationId?this.formPromise=this.apiService.getTwoFactorOrganizationDuo(this.organizationId,e):this.formPromise=this.apiService.getTwoFactorDuo(e);break;case a.TwoFactorProviderType.Email:this.formPromise=this.apiService.getTwoFactorEmail(e);break;case a.TwoFactorProviderType.WebAuthn:this.formPromise=this.apiService.getTwoFactorWebAuthn(e);break;case a.TwoFactorProviderType.Authenticator:this.formPromise=this.apiService.getTwoFactorAuthenticator(e);break;case a.TwoFactorProviderType.Yubikey:this.formPromise=this.apiService.getTwoFactorYubiKey(e)}return[4,this.formPromise];case 3:return r=i.sent(),this.onAuthed.emit({response:r,masterPasswordHash:this.masterPasswordHash}),[3,5];case 4:return i.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService),l.ɵɵdirectiveInject(d.CryptoService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-two-factor-verify"]],inputs:{type:"type",organizationId:"organizationId"},outputs:{onAuthed:"onAuthed"},decls:34,vars:18,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutoFocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"p"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"label",3),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"input",4),l.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"div",5),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"button",6),l.ɵɵtext(19,"\n "),l.ɵɵelement(20,"i",7),l.ɵɵpipe(21,"i18n"),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"span"),l.ɵɵtext(24),l.ɵɵpipe(25,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"button",8),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n")),2&e){var n=l.ɵɵreference(1);l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,8,"twoStepLoginAuthDesc")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,10,"masterPass")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.masterPassword),l.ɵɵadvance(5),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(21,12,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(25,14,"continue")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(30,16,"close"))}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,m.DefaultValueAccessor,m.RequiredValidator,f.InputVerbatimDirective,m.NgControlStatus,m.NgModel],pipes:[v.I18nPipe],encapsulation:2}),e}();t.TwoFactorVerifyComponent=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.ExportService=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(39),l=n(158),c=n(143),p=n(489),u=n(285),d=n(81),m=n(286),h=n(287),f=n(288),v=n(597),y=n(290),g=function(e){function t(t,n,r){void 0===n&&(n=!1),void 0===r&&(r=null);var i=e.call(this)||this;if(null==t)return i;switch(i.buildDomainModel(i,t,{id:null,userId:null,organizationId:null,folderId:null,name:null,notes:null},n,["id","userId","organizationId","folderId"]),i.type=t.type,i.favorite=t.favorite,i.organizationUseTotp=t.organizationUseTotp,i.edit=t.edit,null!=t.viewPassword?i.viewPassword=t.viewPassword:i.viewPassword=!0,i.revisionDate=null!=t.revisionDate?new Date(t.revisionDate):null,i.collectionIds=t.collectionIds,i.localData=r,i.deletedDate=null!=t.deletedDate?new Date(t.deletedDate):null,i.type){case s.CipherType.Login:i.login=new f.Login(t.login,n);break;case s.CipherType.SecureNote:i.secureNote=new y.SecureNote(t.secureNote,n);break;case s.CipherType.Card:i.card=new u.Card(t.card,n);break;case s.CipherType.Identity:i.identity=new h.Identity(t.identity,n)}return null!=t.attachments?i.attachments=t.attachments.map((function(e){return new p.Attachment(e,n)})):i.attachments=null,null!=t.fields?i.fields=t.fields.map((function(e){return new m.Field(e,n)})):i.fields=null,null!=t.passwordHistory?i.passwordHistory=t.passwordHistory.map((function(e){return new v.Password(e,n)})):i.passwordHistory=null,i}return i(t,e),t.prototype.decrypt=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o,l,p,u,d;return a(this,(function(a){switch(a.label){case 0:return t=new c.CipherView(this),[4,this.decryptObj(t,{name:null,notes:null},this.organizationId,e)];case 1:switch(a.sent(),this.type){case s.CipherType.Login:return[3,2];case s.CipherType.SecureNote:return[3,4];case s.CipherType.Card:return[3,6];case s.CipherType.Identity:return[3,8]}return[3,10];case 2:return n=t,[4,this.login.decrypt(this.organizationId,e)];case 3:return n.login=a.sent(),[3,11];case 4:return r=t,[4,this.secureNote.decrypt(this.organizationId,e)];case 5:return r.secureNote=a.sent(),[3,11];case 6:return i=t,[4,this.card.decrypt(this.organizationId,e)];case 7:return i.card=a.sent(),[3,11];case 8:return o=t,[4,this.identity.decrypt(this.organizationId,e)];case 9:return o.identity=a.sent(),[3,11];case 10:return[3,11];case 11:return l=this.organizationId,null!=this.attachments&&this.attachments.length>0?(p=[],[4,this.attachments.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){p.push(e)}))}),Promise.resolve())]):[3,13];case 12:a.sent(),t.attachments=p,a.label=13;case 13:return null!=this.fields&&this.fields.length>0?(u=[],[4,this.fields.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){u.push(e)}))}),Promise.resolve())]):[3,15];case 14:a.sent(),t.fields=u,a.label=15;case 15:return null!=this.passwordHistory&&this.passwordHistory.length>0?(d=[],[4,this.passwordHistory.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){d.push(e)}))}),Promise.resolve())]):[3,17];case 16:a.sent(),t.passwordHistory=d,a.label=17;case 17:return[2,t]}}))}))},t.prototype.toCipherData=function(e){var t=new l.CipherData;switch(t.id=this.id,t.organizationId=this.organizationId,t.folderId=this.folderId,t.userId=null!=this.organizationId?e:null,t.edit=this.edit,t.viewPassword=this.viewPassword,t.organizationUseTotp=this.organizationUseTotp,t.favorite=this.favorite,t.revisionDate=null!=this.revisionDate?this.revisionDate.toISOString():null,t.type=this.type,t.collectionIds=this.collectionIds,t.deletedDate=null!=this.deletedDate?this.deletedDate.toISOString():null,this.buildDataModel(this,t,{name:null,notes:null}),t.type){case s.CipherType.Login:t.login=this.login.toLoginData();break;case s.CipherType.SecureNote:t.secureNote=this.secureNote.toSecureNoteData();break;case s.CipherType.Card:t.card=this.card.toCardData();break;case s.CipherType.Identity:t.identity=this.identity.toIdentityData()}return null!=this.fields&&(t.fields=this.fields.map((function(e){return e.toFieldData()}))),null!=this.attachments&&(t.attachments=this.attachments.map((function(e){return e.toAttachmentData()}))),null!=this.passwordHistory&&(t.passwordHistory=this.passwordHistory.map((function(e){return e.toPasswordHistoryData()}))),t},t}(d.default);t.Cipher=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.SendService=r},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.name=null,this.value=null,this.type=null,this.newField=!1,this.showValue=!1,e&&(this.type=e.type)}return Object.defineProperty(e.prototype,"maskedValue",{get:function(){return null!=this.value?"••••••••":null},enumerable:!0,configurable:!0}),e}();t.FieldView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(39),i=n(599),o=n(600),a=n(601),s=n(602),l=n(603),c=n(604),p=n(880),u=function(e){var t=this;switch(this.type=e.type,this.folderId=e.folderId,this.organizationId=e.organizationId,this.name=e.name?e.name.encryptedString:null,this.notes=e.notes?e.notes.encryptedString:null,this.favorite=e.favorite,this.lastKnownRevisionDate=e.revisionDate,this.type){case r.CipherType.Login:this.login=new s.LoginApi,this.login.uris=null,this.login.username=e.login.username?e.login.username.encryptedString:null,this.login.password=e.login.password?e.login.password.encryptedString:null,this.login.passwordRevisionDate=null!=e.login.passwordRevisionDate?e.login.passwordRevisionDate.toISOString():null,this.login.totp=e.login.totp?e.login.totp.encryptedString:null,null!=e.login.uris&&(this.login.uris=e.login.uris.map((function(e){var t=new l.LoginUriApi;return t.uri=null!=e.uri?e.uri.encryptedString:null,t.match=null!=e.match?e.match:null,t})));break;case r.CipherType.SecureNote:this.secureNote=new c.SecureNoteApi,this.secureNote.type=e.secureNote.type;break;case r.CipherType.Card:this.card=new i.CardApi,this.card.cardholderName=null!=e.card.cardholderName?e.card.cardholderName.encryptedString:null,this.card.brand=null!=e.card.brand?e.card.brand.encryptedString:null,this.card.number=null!=e.card.number?e.card.number.encryptedString:null,this.card.expMonth=null!=e.card.expMonth?e.card.expMonth.encryptedString:null,this.card.expYear=null!=e.card.expYear?e.card.expYear.encryptedString:null,this.card.code=null!=e.card.code?e.card.code.encryptedString:null;break;case r.CipherType.Identity:this.identity=new a.IdentityApi,this.identity.title=null!=e.identity.title?e.identity.title.encryptedString:null,this.identity.firstName=null!=e.identity.firstName?e.identity.firstName.encryptedString:null,this.identity.middleName=null!=e.identity.middleName?e.identity.middleName.encryptedString:null,this.identity.lastName=null!=e.identity.lastName?e.identity.lastName.encryptedString:null,this.identity.address1=null!=e.identity.address1?e.identity.address1.encryptedString:null,this.identity.address2=null!=e.identity.address2?e.identity.address2.encryptedString:null,this.identity.address3=null!=e.identity.address3?e.identity.address3.encryptedString:null,this.identity.city=null!=e.identity.city?e.identity.city.encryptedString:null,this.identity.state=null!=e.identity.state?e.identity.state.encryptedString:null,this.identity.postalCode=null!=e.identity.postalCode?e.identity.postalCode.encryptedString:null,this.identity.country=null!=e.identity.country?e.identity.country.encryptedString:null,this.identity.company=null!=e.identity.company?e.identity.company.encryptedString:null,this.identity.email=null!=e.identity.email?e.identity.email.encryptedString:null,this.identity.phone=null!=e.identity.phone?e.identity.phone.encryptedString:null,this.identity.ssn=null!=e.identity.ssn?e.identity.ssn.encryptedString:null,this.identity.username=null!=e.identity.username?e.identity.username.encryptedString:null,this.identity.passportNumber=null!=e.identity.passportNumber?e.identity.passportNumber.encryptedString:null,this.identity.licenseNumber=null!=e.identity.licenseNumber?e.identity.licenseNumber.encryptedString:null}null!=e.fields&&(this.fields=e.fields.map((function(e){var t=new o.FieldApi;return t.type=e.type,t.name=e.name?e.name.encryptedString:null,t.value=e.value?e.value.encryptedString:null,t}))),null!=e.passwordHistory&&(this.passwordHistory=[],e.passwordHistory.forEach((function(e){t.passwordHistory.push({lastUsedDate:e.lastUsedDate,password:e.password?e.password.encryptedString:null})}))),null!=e.attachments&&(this.attachments={},this.attachments2={},e.attachments.forEach((function(e){var n=e.fileName?e.fileName.encryptedString:null;t.attachments[e.id]=n;var r=new p.AttachmentRequest;r.fileName=n,null!=e.key&&(r.key=e.key.encryptedString),t.attachments2[e.id]=r})))};t.CipherRequest=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n,r){var i=e.call(this,t)||this,o=null;if(null!=t){var a=i.getResponseProperty("ErrorModel");o=a&&r?a:t}return o?(i.message=i.getResponseProperty("Message",o),i.validationErrors=i.getResponseProperty("ValidationErrors",o)):429===n&&(i.message="Rate limit exceeded. Try again later."),i.statusCode=n,i}return i(t,e),t.prototype.getSingleMessage=function(){if(null==this.validationErrors)return this.message;for(var e in this.validationErrors)if(this.validationErrors.hasOwnProperty(e)&&this.validationErrors[e].length)return this.validationErrors[e][0];return this.message},t.prototype.getAllMessages=function(){var e=[];if(null==this.validationErrors)return e;var t=function(t){if(!n.validationErrors.hasOwnProperty(t))return"continue";n.validationErrors[t].forEach((function(n){var r="";if(t.indexOf("[")>-1&&t.indexOf("]")>-1){var i=t.lastIndexOf(".");r=t.substr(0,i>-1?i:t.length)+": "}e.push(r+n)}))},n=this;for(var r in this.validationErrors)t(r);return e},t}(n(23).BaseResponse);t.ErrorResponse=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(3),n(5);var r=n(0),i=n(3),o=n(5),a=function(){function e(e,t){this.i18nService=e,this.platformUtilsService=t}return e.prototype.showError=function(e){var t=this.i18nService.t("unexpectedError"),n=[];return null!=e&&"string"==typeof e?n.push(e):null==e||"object"!=typeof e?n.push(t):null!=e.validationErrors?n=n.concat(e.getAllMessages()):n.push(e.message?e.message:t),1===n.length?this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n[0]):n.length>1&&this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n,{timeout:5e3*n.length}),n},e.ɵfac=function(t){return new(t||e)(r.ɵɵinject(i.I18nService),r.ɵɵinject(o.PlatformUtilsService))},e.ɵprov=r.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.ValidationService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(72);var r=n(8),i=(n(3),n(0)),o=n(8),a=n(72),s=n(3),l=function(){function e(e,t,n,i){var o=this;this.router=e,this.activatedRoute=t,this.titleService=n,this.previousUrl=void 0,this.currentUrl=void 0,this.currentUrl=this.router.url,e.events.subscribe((function(e){if(e instanceof r.NavigationEnd){o.previousUrl=o.currentUrl,o.currentUrl=e.url;for(var t=i.t("pageTitle","Bitwarden"),n=null,a=null,s=o.activatedRoute.firstChild;null!=s;){if(null==s.firstChild){if(null!=s.snapshot.data&&null!=s.snapshot.data.title){a=s.snapshot.data.title;break}if(null!=s.snapshot.data&&null!=s.snapshot.data.titleId){n=s.snapshot.data.titleId;break}n=null,a=null;break}s=s.firstChild}if(null!=n||null!=a){var l=null!=a?a:i.t(n);null!=l&&""!==l&&(t=l+" | "+t)}o.titleService.setTitle(t)}}))}return e.prototype.getPreviousUrl=function(){return this.previousUrl},e.prototype.setPreviousUrl=function(e){this.previousUrl=e},e.ɵfac=function(t){return new(t||e)(i.ɵɵinject(o.Router),i.ɵɵinject(o.ActivatedRoute),i.ɵɵinject(a.Title),i.ɵɵinject(s.I18nService))},e.ɵprov=i.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.RouterService=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.PBKDF2_SHA256=0]="PBKDF2_SHA256"}(t.KdfType||(t.KdfType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(3);var r=n(0),i=n(3),o=n(4);function a(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵelementContainerEnd()),2&e){var n=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",n.text,"\n ")}}var s=function(e){return{width:e}},l=function(){function e(e){this.i18nService=e,this.showText=!1,this.scoreWidth=0,this.color="bg-danger"}return e.prototype.ngOnChanges=function(){switch(this.scoreWidth=null==this.score?0:20*(this.score+1),this.score){case 4:this.color="bg-success",this.text=this.i18nService.t("strong");break;case 3:this.color="bg-primary",this.text=this.i18nService.t("good");break;case 2:this.color="bg-warning",this.text=this.i18nService.t("weak");break;default:this.color="bg-danger",this.text=null!=this.score?this.i18nService.t("weak"):null}},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(i.I18nService))},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["app-password-strength"]],inputs:{score:"score",showText:"showText"},features:[r.ɵɵNgOnChangesFeature],decls:8,vars:8,consts:[[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle"],[4,"ngIf"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,a,2,1,"ng-container",2),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵclassMapInterpolate1("progress-bar ",t.color,""),r.ɵɵproperty("ngStyle",r.ɵɵpureFunction1(6,s,t.scoreWidth+"%")),r.ɵɵattribute("aria-valuenow",t.scoreWidth),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.showText&&t.text))},directives:[o.NgStyle,o.NgIf],encapsulation:2}),e}();t.PasswordStrengthComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Owner=0]="Owner",e[e.Admin=1]="Admin",e[e.User=2]="User",e[e.Manager=3]="Manager",e[e.Custom=4]="Custom"}(t.OrganizationUserType||(t.OrganizationUserType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(){}return e.prototype.transform=function(e,t,n,r,i){return null==e||0===e.length?[]:null==t||t.length<2?e:(t=t.trim().toLowerCase(),e.filter((function(e){return null!=n&&null!=e[n]&&e[n].toString().toLowerCase().indexOf(t)>-1||(null!=r&&null!=e[r]&&e[r].toString().toLowerCase().indexOf(t)>-1||null!=i&&null!=e[i]&&e[i].toString().toLowerCase().indexOf(t)>-1)})))},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=r.ɵɵdefinePipe({name:"search",type:e,pure:!0}),e}();t.SearchPipe=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(3);var r=n(280),i=n(254),o=n(0),a=n(3),s=function(){function e(e){this.i18nService=e}return e.prototype.getDefaultDateFilters=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59);e.setDate(e.getDate()-30);var n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0);return[this.toDateTimeLocalString(n),this.toDateTimeLocalString(t)]},e.prototype.formatDateFilters=function(e,t){var n=new Date(e),r=new Date(t+":59.999");if(isNaN(n.getTime())||isNaN(r.getTime())||r<n)throw new Error("Invalid date range.");return[n.toISOString(),r.toISOString()]},e.prototype.getEventInfo=function(e,t){void 0===t&&(t=new c);var n=this.getAppInfo(e.deviceType);return{message:this.getEventMessage(e,t),appIcon:n[0],appName:n[1]}},e.prototype.getEventMessage=function(e,t){var n="";switch(e.type){case i.EventType.User_LoggedIn:n=this.i18nService.t("loggedIn");break;case i.EventType.User_ChangedPassword:n=this.i18nService.t("changedPassword");break;case i.EventType.User_Updated2fa:n=this.i18nService.t("enabledUpdated2fa");break;case i.EventType.User_Disabled2fa:n=this.i18nService.t("disabled2fa");break;case i.EventType.User_Recovered2fa:n=this.i18nService.t("recovered2fa");break;case i.EventType.User_FailedLogIn:n=this.i18nService.t("failedLogin");break;case i.EventType.User_FailedLogIn2fa:n=this.i18nService.t("failedLogin2fa");break;case i.EventType.User_ClientExportedVault:n=this.i18nService.t("exportedVault");break;case i.EventType.Cipher_Created:n=this.i18nService.t("createdItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_Updated:n=this.i18nService.t("editedItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_Deleted:n=this.i18nService.t("permanentlyDeletedItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_SoftDeleted:n=this.i18nService.t("deletedItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_Restored:n=this.i18nService.t("restoredItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_AttachmentCreated:n=this.i18nService.t("createdAttachmentForItem",this.formatCipherId(e,t));break;case i.EventType.Cipher_AttachmentDeleted:n=this.i18nService.t("deletedAttachmentForItem",this.formatCipherId(e,t));break;case i.EventType.Cipher_Shared:n=this.i18nService.t("sharedItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientViewed:n=this.i18nService.t("viewedItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientToggledPasswordVisible:n=this.i18nService.t("viewedPasswordItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientToggledHiddenFieldVisible:n=this.i18nService.t("viewedHiddenFieldItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientToggledCardCodeVisible:n=this.i18nService.t("viewedSecurityCodeItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientCopiedHiddenField:n=this.i18nService.t("copiedHiddenFieldItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientCopiedPassword:n=this.i18nService.t("copiedPasswordItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientCopiedCardCode:n=this.i18nService.t("copiedSecurityCodeItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_ClientAutofilled:n=this.i18nService.t("autofilledItemId",this.formatCipherId(e,t));break;case i.EventType.Cipher_UpdatedCollections:n=this.i18nService.t("editedCollectionsForItem",this.formatCipherId(e,t));break;case i.EventType.Collection_Created:n=this.i18nService.t("createdCollectionId",this.formatCollectionId(e));break;case i.EventType.Collection_Updated:n=this.i18nService.t("editedCollectionId",this.formatCollectionId(e));break;case i.EventType.Collection_Deleted:n=this.i18nService.t("deletedCollectionId",this.formatCollectionId(e));break;case i.EventType.Group_Created:n=this.i18nService.t("createdGroupId",this.formatGroupId(e));break;case i.EventType.Group_Updated:n=this.i18nService.t("editedGroupId",this.formatGroupId(e));break;case i.EventType.Group_Deleted:n=this.i18nService.t("deletedGroupId",this.formatGroupId(e));break;case i.EventType.OrganizationUser_Invited:n=this.i18nService.t("invitedUserId",this.formatOrgUserId(e));break;case i.EventType.OrganizationUser_Confirmed:n=this.i18nService.t("confirmedUserId",this.formatOrgUserId(e));break;case i.EventType.OrganizationUser_Updated:n=this.i18nService.t("editedUserId",this.formatOrgUserId(e));break;case i.EventType.OrganizationUser_Removed:n=this.i18nService.t("removedUserId",this.formatOrgUserId(e));break;case i.EventType.OrganizationUser_UpdatedGroups:n=this.i18nService.t("editedGroupsForUser",this.formatOrgUserId(e));break;case i.EventType.OrganizationUser_UnlinkedSso:n=this.i18nService.t("unlinkedSsoUser",this.formatOrgUserId(e));break;case i.EventType.OrganizationUser_ResetPassword_Enroll:n=this.i18nService.t("eventEnrollPasswordReset",this.formatOrgUserId(e));break;case i.EventType.OrganizationUser_ResetPassword_Withdraw:n=this.i18nService.t("eventWithdrawPasswordReset",this.formatOrgUserId(e));break;case i.EventType.Organization_Updated:n=this.i18nService.t("editedOrgSettings");break;case i.EventType.Organization_PurgedVault:n=this.i18nService.t("purgedOrganizationVault");break;case i.EventType.Policy_Updated:n=this.i18nService.t("modifiedPolicy",this.formatPolicyId(e))}return""===n?null:n},e.prototype.getAppInfo=function(e){switch(e){case r.DeviceType.Android:return["fa-android",this.i18nService.t("mobile")+" - Android"];case r.DeviceType.iOS:return["fa-apple",this.i18nService.t("mobile")+" - iOS"];case r.DeviceType.UWP:return["fa-windows",this.i18nService.t("mobile")+" - Windows"];case r.DeviceType.ChromeExtension:return["fa-chrome",this.i18nService.t("extension")+" - Chrome"];case r.DeviceType.FirefoxExtension:return["fa-firefox",this.i18nService.t("extension")+" - Firefox"];case r.DeviceType.OperaExtension:return["fa-opera",this.i18nService.t("extension")+" - Opera"];case r.DeviceType.EdgeExtension:return["fa-edge",this.i18nService.t("extension")+" - Edge"];case r.DeviceType.VivaldiExtension:return["fa-puzzle-piece",this.i18nService.t("extension")+" - Vivaldi"];case r.DeviceType.SafariExtension:return["fa-safari",this.i18nService.t("extension")+" - Safari"];case r.DeviceType.WindowsDesktop:return["fa-windows",this.i18nService.t("desktop")+" - Windows"];case r.DeviceType.MacOsDesktop:return["fa-apple",this.i18nService.t("desktop")+" - macOS"];case r.DeviceType.LinuxDesktop:return["fa-linux",this.i18nService.t("desktop")+" - Linux"];case r.DeviceType.ChromeBrowser:return["fa-globe",this.i18nService.t("webVault")+" - Chrome"];case r.DeviceType.FirefoxBrowser:return["fa-globe",this.i18nService.t("webVault")+" - Firefox"];case r.DeviceType.OperaBrowser:return["fa-globe",this.i18nService.t("webVault")+" - Opera"];case r.DeviceType.SafariBrowser:return["fa-globe",this.i18nService.t("webVault")+" - Safari"];case r.DeviceType.VivaldiBrowser:return["fa-globe",this.i18nService.t("webVault")+" - Vivaldi"];case r.DeviceType.EdgeBrowser:return["fa-globe",this.i18nService.t("webVault")+" - Edge"];case r.DeviceType.IEBrowser:return["fa-globe",this.i18nService.t("webVault")+" - IE"];case r.DeviceType.UnknownBrowser:return["fa-globe",this.i18nService.t("webVault")+" - "+this.i18nService.t("unknown")];default:return["fa-globe",this.i18nService.t("unknown")]}},e.prototype.formatCipherId=function(e,t){var n=this.getShortId(e.cipherId);if(null==e.organizationId||!t.cipherInfo)return"<code>"+n+"</code>";var r=this.makeAnchor(n);return r.setAttribute("href","#/organizations/"+e.organizationId+"/vault?search="+n+"&viewEvents="+e.cipherId),r.outerHTML},e.prototype.formatGroupId=function(e){var t=this.getShortId(e.groupId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/groups?search="+t),n.outerHTML},e.prototype.formatCollectionId=function(e){var t=this.getShortId(e.collectionId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/collections?search="+t),n.outerHTML},e.prototype.formatOrgUserId=function(e){var t=this.getShortId(e.organizationUserId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/people?search="+t+"&viewEvents="+e.organizationUserId),n.outerHTML},e.prototype.formatPolicyId=function(e){var t=this.getShortId(e.policyId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/policies?policyId="+e.policyId),n.outerHTML},e.prototype.makeAnchor=function(e){var t=document.createElement("a");return t.title=this.i18nService.t("view"),t.innerHTML="<code>"+e+"</code>",t},e.prototype.getShortId=function(e){return e.substring(0,8)},e.prototype.toDateTimeLocalString=function(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())+"T"+this.pad(e.getHours())+":"+this.pad(e.getMinutes())},e.prototype.pad=function(e){var t=Math.floor(Math.abs(e));return(t<10?"0":"")+t},e.ɵfac=function(t){return new(t||e)(o.ɵɵinject(a.I18nService))},e.ɵprov=o.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.EventService=s;var l=function(){};t.EventInfo=l;var c=function(){this.cipherInfo=!0};t.EventOptions=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.User_LoggedIn=1e3]="User_LoggedIn",e[e.User_ChangedPassword=1001]="User_ChangedPassword",e[e.User_Updated2fa=1002]="User_Updated2fa",e[e.User_Disabled2fa=1003]="User_Disabled2fa",e[e.User_Recovered2fa=1004]="User_Recovered2fa",e[e.User_FailedLogIn=1005]="User_FailedLogIn",e[e.User_FailedLogIn2fa=1006]="User_FailedLogIn2fa",e[e.User_ClientExportedVault=1007]="User_ClientExportedVault",e[e.Cipher_Created=1100]="Cipher_Created",e[e.Cipher_Updated=1101]="Cipher_Updated",e[e.Cipher_Deleted=1102]="Cipher_Deleted",e[e.Cipher_AttachmentCreated=1103]="Cipher_AttachmentCreated",e[e.Cipher_AttachmentDeleted=1104]="Cipher_AttachmentDeleted",e[e.Cipher_Shared=1105]="Cipher_Shared",e[e.Cipher_UpdatedCollections=1106]="Cipher_UpdatedCollections",e[e.Cipher_ClientViewed=1107]="Cipher_ClientViewed",e[e.Cipher_ClientToggledPasswordVisible=1108]="Cipher_ClientToggledPasswordVisible",e[e.Cipher_ClientToggledHiddenFieldVisible=1109]="Cipher_ClientToggledHiddenFieldVisible",e[e.Cipher_ClientToggledCardCodeVisible=1110]="Cipher_ClientToggledCardCodeVisible",e[e.Cipher_ClientCopiedPassword=1111]="Cipher_ClientCopiedPassword",e[e.Cipher_ClientCopiedHiddenField=1112]="Cipher_ClientCopiedHiddenField",e[e.Cipher_ClientCopiedCardCode=1113]="Cipher_ClientCopiedCardCode",e[e.Cipher_ClientAutofilled=1114]="Cipher_ClientAutofilled",e[e.Cipher_SoftDeleted=1115]="Cipher_SoftDeleted",e[e.Cipher_Restored=1116]="Cipher_Restored",e[e.Collection_Created=1300]="Collection_Created",e[e.Collection_Updated=1301]="Collection_Updated",e[e.Collection_Deleted=1302]="Collection_Deleted",e[e.Group_Created=1400]="Group_Created",e[e.Group_Updated=1401]="Group_Updated",e[e.Group_Deleted=1402]="Group_Deleted",e[e.OrganizationUser_Invited=1500]="OrganizationUser_Invited",e[e.OrganizationUser_Confirmed=1501]="OrganizationUser_Confirmed",e[e.OrganizationUser_Updated=1502]="OrganizationUser_Updated",e[e.OrganizationUser_Removed=1503]="OrganizationUser_Removed",e[e.OrganizationUser_UpdatedGroups=1504]="OrganizationUser_UpdatedGroups",e[e.OrganizationUser_UnlinkedSso=1505]="OrganizationUser_UnlinkedSso",e[e.OrganizationUser_ResetPassword_Enroll=1506]="OrganizationUser_ResetPassword_Enroll",e[e.OrganizationUser_ResetPassword_Withdraw=1507]="OrganizationUser_ResetPassword_Withdraw",e[e.Organization_Updated=1600]="Organization_Updated",e[e.Organization_PurgedVault=1601]="Organization_PurgedVault",e[e.Policy_Updated=1700]="Policy_Updated"}(t.EventType||(t.EventType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Card=0]="Card",e[e.BankAccount=1]="BankAccount",e[e.PayPal=2]="PayPal",e[e.BitPay=3]="BitPay",e[e.Credit=4]="Credit",e[e.WireTransfer=5]="WireTransfer",e[e.AppleInApp=6]="AppleInApp",e[e.GoogleInApp=7]="GoogleInApp",e[e.Check=8]="Check"}(t.PaymentMethodType||(t.PaymentMethodType={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(3),n(5),n(113)),s=n(873),l=n(0),c=n(6),p=n(3),u=n(9),d=n(5),m=function(){function e(e,t,n,r){this.apiService=e,this.i18nService=t,this.toasterService=n,this.platformUtilsService=r,this.onUpdated=new o.EventEmitter,this.twoFactorProviderType=a.TwoFactorProviderType,this.enabled=!1,this.authed=!1}return e.prototype.auth=function(e){this.masterPasswordHash=e.masterPasswordHash,this.authed=!0},e.prototype.enable=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e()];case 1:return t.sent(),this.onUpdated.emit(!0),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.prototype.disable=function(e){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("twoStepDisableDesc"),this.i18nService.t("disable"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2];t.label=2;case 2:return t.trys.push([2,4,,5]),(e=new s.TwoFactorProviderRequest).masterPasswordHash=this.masterPasswordHash,e.type=this.type,[4,null!=this.organizationId?this.apiService.putTwoFactorOrganizationDisable(this.organizationId,e):this.apiService.putTwoFactorDisable(e)];case 3:return t.sent(),this.enabled=!1,this.toasterService.popAsync("success",null,this.i18nService.t("twoStepDisabled")),this.onUpdated.emit(!1),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService),l.ɵɵdirectiveInject(d.PlatformUtilsService))},e.ɵdir=l.ɵɵdefineDirective({type:e,outputs:{onUpdated:"onUpdated"}}),e}();t.TwoFactorBaseComponent=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(84),s=n(481),l=n(260),c=(n(14),n(7),n(0)),p=(n(7),n(14),["cipherAddEdit"]),u=function(){function e(e,t,n,r){this.componentFactoryResolver=e,this.userService=t,this.messagingService=n,this.requiresPaid=r,this.loading=!1,this.hasLoaded=!1,this.ciphers=[],this.modal=null}return e.prototype.load=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading=!0,[4,this.setCiphers()];case 1:return e.sent(),this.loading=!1,this.hasLoaded=!0,[2]}}))}))},e.prototype.selectCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n,o=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);return this.modal=this.cipherAddEditModalRef.createComponent(o).instance,null!=this.organization?(n=this.modal.show(s.AddEditComponent,this.cipherAddEditModalRef)).organization=this.organization:n=this.modal.show(l.AddEditComponent,this.cipherAddEditModalRef),n.cipherId=null==e?null:e.id,null!=this.organization&&(n.organizationId=this.organization.id),n.onSavedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.load()];case 1:return e.sent(),[2]}}))}))})),n.onDeletedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.load()];case 1:return e.sent(),[2]}}))}))})),n.onRestoredCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.load()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){t.modal=null})),n},e.prototype.checkAccess=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null==this.organization?[3,1]:this.requiresPaid&&!this.organization.useTotp?(this.messagingService.send("upgradeOrganization",{organizationId:this.organization.id}),[2,!1]):[3,3];case 1:return[4,this.userService.canAccessPremium()];case 2:if(e=t.sent(),this.requiresPaid&&!e)return this.messagingService.send("premiumRequired"),this.loading=!1,[2,!1];t.label=3;case 3:return[2,!0]}}))}))},e.prototype.setCiphers=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.ciphers=[],[2]}))}))},e.ɵfac=function(e){c.ɵɵinvalidFactory()},e.ɵdir=c.ɵɵdefineDirective({type:e,viewQuery:function(e,t){var n;(1&e&&c.ɵɵstaticViewQuery(p,!0,o.ViewContainerRef),2&e)&&(c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first))}}),e}();t.CipherReportComponent=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(259),i=n(30),o=["https://","http://","ssh://","ftp://","sftp://","irc://","vnc://","rdp://","ms-rd:","chrome://","iosapp://","androidapp://"],a=function(){function e(e){this.match=null,this._uri=null,this._domain=null,this._hostname=null,this._host=null,this._canLaunch=null,e&&(this.match=e.match)}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},set:function(e){this._uri=e,this._domain=null,this._canLaunch=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"domain",{get:function(){return null==this._domain&&null!=this.uri&&(this._domain=i.Utils.getDomain(this.uri),""===this._domain&&(this._domain=null)),this._domain},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostname",{get:function(){return this.match===r.UriMatchType.RegularExpression?null:(null==this._hostname&&null!=this.uri&&(this._hostname=i.Utils.getHostname(this.uri),""===this._hostname&&(this._hostname=null)),this._hostname)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"host",{get:function(){return this.match===r.UriMatchType.RegularExpression?null:(null==this._host&&null!=this.uri&&(this._host=i.Utils.getHost(this.uri),""===this._host&&(this._host=null)),this._host)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostnameOrUri",{get:function(){return null!=this.hostname?this.hostname:this.uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostOrUri",{get:function(){return null!=this.host?this.host:this.uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isWebsite",{get:function(){return null!=this.uri&&(0===this.uri.indexOf("http://")||0===this.uri.indexOf("https://")||this.uri.indexOf("://")<0&&i.Utils.tldEndingRegex.test(this.uri))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canLaunch",{get:function(){if(null!=this._canLaunch)return this._canLaunch;if(null!=this.uri&&this.match!==r.UriMatchType.RegularExpression)for(var e=this.launchUri,t=0;t<o.length;t++)if(0===e.indexOf(o[t]))return this._canLaunch=!0,this._canLaunch;return this._canLaunch=!1,this._canLaunch},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"launchUri",{get:function(){return this.uri.indexOf("://")<0&&i.Utils.tldEndingRegex.test(this.uri)?"http://"+this.uri:this.uri},enumerable:!0,configurable:!0}),e}();t.LoginUriView=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Domain=0]="Domain",e[e.Host=1]="Host",e[e.StartsWith=2]="StartsWith",e[e.Exact=3]="Exact",e[e.RegularExpression=4]="RegularExpression",e[e.Never=5]="Never"}(t.UriMatchType||(t.UriMatchType={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0);var s=n(39),l=n(254),c=(n(87),n(19),n(40),n(71),n(48),n(3),n(14),n(36),n(5),n(43),n(38),n(114),n(7),n(881)),p=n(0),u=n(19),d=n(48),m=n(3),h=n(5),f=n(87),v=n(38),y=n(7),g=n(40),x=n(114),b=n(36),S=n(14),w=n(71),C=n(43),I=n(13),E=n(16),P=n(17),k=n(4),_=n(24),A=n(65),O=n(45),T=n(37),M=n(267),B=n(291),D=n(10);function R(e,t){1&e&&(p.ɵɵelementStart(0,"app-callout",28),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function V(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.value),p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function j(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",16),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",17),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"label",29),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"select",30),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.type=e})),p.ɵɵtext(9,"\n "),p.ɵɵtemplate(10,V,2,2,"option",31),p.ɵɵtext(11,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,4,"whatTypeOfItem")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.type)("disabled",r.cipher.isDeleted),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.typeOptions)}}function F(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.id),p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function U(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",17),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"label",33),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"select",34),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.folderId=e})),p.ɵɵtext(7,"\n "),p.ɵɵtemplate(8,F,2,2,"option",31),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,4,"folder")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.folderId)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.folders)}}function N(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",43),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"button",52),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext(3);return e.copy(e.cipher.login.username,"username","Username")})),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelement(5,"i",46),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(3,1,"copyUsername")))}function z(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"a",59),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(4).generatePassword()})),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",60),p.ɵɵtext(4,"\n "),p.ɵɵelementEnd()}2&e&&p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(1,1,"generatePassword"))}function L(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",53),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,z,5,3,"a",54),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"a",55,56),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(3).checkPassword()})),p.ɵɵpipe(6,"i18n"),p.ɵɵtext(7,"\n "),p.ɵɵelement(8,"i",57),p.ɵɵtext(9,"\n "),p.ɵɵelement(10,"i",58),p.ɵɵpipe(11,"i18n"),p.ɵɵtext(12,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(5),i=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵproperty("ngIf",i.cipher.viewPassword),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(6,6,"checkPassword")),p.ɵɵproperty("appApiAction",i.checkPasswordPromise),p.ɵɵadvance(4),p.ɵɵproperty("hidden",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(11,8,"loading")),p.ɵɵproperty("hidden",!r.loading)}}function G(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"a",63),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(4).premiumRequired()})),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"premium"),"\n "))}function K(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"a",63),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(4).upgradeOrganization()})),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function q(e,t){if(1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"img",61),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵtemplate(5,G,3,3,"a",62),p.ɵɵtext(6,"\n "),p.ɵɵtemplate(7,K,3,3,"a",62),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,3,"verificationCodeTotp")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!n.organization&&!n.cipher.organizationId&&!n.canAccessPremium),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.organization&&!n.organization.useTotp||!n.organization&&!n.canAccessPremium&&n.cipher.organizationId&&!n.cipher.organizationUseTotp)}}var W=function(e){return{"stroke-dashoffset.px":e}};function H(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",64),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"span",65),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"span",66),p.ɵɵtext(5),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵnamespaceSVG(),p.ɵɵelementStart(7,"svg"),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"g"),p.ɵɵtext(10,"\n "),p.ɵɵelement(11,"circle",67),p.ɵɵtext(12,"\n "),p.ɵɵelement(13,"circle",68),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵnamespaceHTML(),p.ɵɵelementStart(18,"span",69),p.ɵɵpipe(19,"i18n"),p.ɵɵtext(20),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"button",70),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext(3);return e.copy(e.totpCode,"verificationCodeTotp","TOTP")})),p.ɵɵpipe(23,"i18n"),p.ɵɵtext(24,"\n "),p.ɵɵelement(25,"i",71),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(3);p.ɵɵadvance(5),p.ɵɵtextInterpolate(r.totpSec),p.ɵɵadvance(6),p.ɵɵproperty("ngStyle",p.ɵɵpureFunction1(9,W,r.totpDash)),p.ɵɵadvance(7),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(19,5,"verificationCodeTotp")),p.ɵɵadvance(2),p.ɵɵtextInterpolate(r.totpCodeFormatted),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function $(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.value),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("",n.name,"\n ")}}function Y(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",82),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit;return p.ɵɵnextContext(4).removeUri(e)})),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",83),p.ɵɵtext(4,"\n "),p.ɵɵelementEnd()}2&e&&p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(1,1,"remove"))}function Q(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",16),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",73),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"label",74),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"div",36),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"input",75),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.uri=e})),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"div",43),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"button",44),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(4).launch(e)})),p.ɵɵpipe(16,"i18n"),p.ɵɵtext(17,"\n "),p.ɵɵelement(18,"i",76),p.ɵɵtext(19,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementStart(21,"button",52),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(4).copy(e.uri,"uri","URI")})),p.ɵɵpipe(22,"i18n"),p.ɵɵtext(23,"\n "),p.ɵɵelement(24,"i",46),p.ɵɵtext(25,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n "),p.ɵɵelementStart(30,"div",77),p.ɵɵtext(31,"\n "),p.ɵɵelementStart(32,"div",39),p.ɵɵtext(33,"\n "),p.ɵɵelementStart(34,"label",74),p.ɵɵtext(35),p.ɵɵpipe(36,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(37,"\n "),p.ɵɵelementStart(38,"a",78),p.ɵɵpipe(39,"i18n"),p.ɵɵtext(40,"\n "),p.ɵɵelement(41,"i",79),p.ɵɵtext(42,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(43,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(44,"\n "),p.ɵɵelementStart(45,"div",39),p.ɵɵtext(46,"\n "),p.ɵɵelementStart(47,"select",80),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.match=e}))("change",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(4).loginUriMatchChanged(e)})),p.ɵɵtext(48,"\n "),p.ɵɵtemplate(49,$,2,2,"option",31),p.ɵɵtext(50,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(51,"\n "),p.ɵɵtemplate(52,Y,5,3,"button",81),p.ɵɵtext(53,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(54,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(55,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=p.ɵɵnextContext(4);p.ɵɵadvance(4),p.ɵɵpropertyInterpolate1("for","loginUri",i,""),p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind2(6,19,"uriPosition",i+1)),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate1("id","loginUri",i,""),p.ɵɵpropertyInterpolate1("name","Login.Uris[",i,"].Uri"),p.ɵɵpropertyInterpolate1("placeholder","",p.ɵɵpipeBind1(11,22,"ex")," https://google.com"),p.ɵɵproperty("ngModel",r.uri)("disabled",o.cipher.isDeleted||o.viewOnly),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(16,24,"launch")),p.ɵɵproperty("disabled",!r.canLaunch),p.ɵɵadvance(6),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(22,26,"copyUri")),p.ɵɵadvance(13),p.ɵɵpropertyInterpolate1("for","loginUriMatch",i,""),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(39,30,"learnMore")),p.ɵɵadvance(9),p.ɵɵpropertyInterpolate1("id","loginUriMatch",i,""),p.ɵɵpropertyInterpolate1("name","Login.Uris[",i,"].Match"),p.ɵɵproperty("ngModel",r.match)("disabled",o.cipher.isDeleted||o.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",o.uriMatchOptions),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly)}}function J(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,Q,56,32,"div",72),p.ɵɵtext(3,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",n.cipher.login.uris)("ngForTrackBy",n.trackByFunction)}}function X(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"a",84),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(3).addUri()})),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",85),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(4,1,"newUri"),"\n "))}var Z=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},ee=function(e){return{low:e}};function te(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",16),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",17),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"label",35),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"div",36),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"input",37),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.login.username=e})),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵtemplate(14,N,8,3,"div",38),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"div",17),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"div",39),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"label",40),p.ɵɵtext(23),p.ɵɵpipe(24,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵtemplate(26,L,14,10,"div",41),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n "),p.ɵɵelementStart(29,"div",36),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"input",42),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.login.password=e})),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n "),p.ɵɵelementStart(33,"div",43),p.ɵɵtext(34,"\n "),p.ɵɵelementStart(35,"button",44),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).togglePassword()})),p.ɵɵpipe(36,"i18n"),p.ɵɵtext(37,"\n "),p.ɵɵelement(38,"i",45),p.ɵɵtext(39,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(40,"\n "),p.ɵɵelementStart(41,"button",44),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext(2);return e.copy(e.cipher.login.password,"password","Password")})),p.ɵɵpipe(42,"i18n"),p.ɵɵtext(43,"\n "),p.ɵɵelement(44,"i",46),p.ɵɵtext(45,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(47,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(49,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(50,"\n "),p.ɵɵelementStart(51,"div",16),p.ɵɵtext(52,"\n "),p.ɵɵelementStart(53,"div",17),p.ɵɵtext(54,"\n "),p.ɵɵelementStart(55,"label",47),p.ɵɵtext(56),p.ɵɵpipe(57,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(58,"\n "),p.ɵɵelementStart(59,"input",48),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.login.totp=e})),p.ɵɵelementEnd(),p.ɵɵtext(60,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(61,"\n "),p.ɵɵelementStart(62,"div",49),p.ɵɵtext(63,"\n "),p.ɵɵtemplate(64,q,9,5,"div",21),p.ɵɵtext(65,"\n "),p.ɵɵtemplate(66,H,28,11,"div",50),p.ɵɵtext(67,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(68,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(69,"\n "),p.ɵɵtemplate(70,J,4,2,"ng-container",21),p.ɵɵtext(71,"\n "),p.ɵɵtemplate(72,X,5,3,"a",51),p.ɵɵtext(73,"\n "),p.ɵɵelementContainerEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,23,"username")),p.ɵɵadvance(5),p.ɵɵproperty("ngModel",r.cipher.login.username)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.cipher.isDeleted),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(24,25,"password")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),p.ɵɵproperty("ngModel",r.cipher.login.password)("disabled",r.cipher.isDeleted||!r.cipher.viewPassword||r.viewOnly),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(36,27,"toggleVisibility")),p.ɵɵproperty("disabled",!r.cipher.viewPassword),p.ɵɵadvance(3),p.ɵɵproperty("ngClass",p.ɵɵpureFunction2(33,Z,!r.showPassword,r.showPassword)),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(42,29,"copyPassword")),p.ɵɵproperty("disabled",!r.cipher.viewPassword),p.ɵɵadvance(15),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("type",r.cipher.viewPassword?"text":"password"),p.ɵɵproperty("ngModel",r.cipher.login.totp)("disabled",r.cipher.isDeleted||!r.cipher.viewPassword||r.viewOnly),p.ɵɵadvance(3),p.ɵɵproperty("ngClass",p.ɵɵpureFunction1(36,ee,r.totpLow)),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.cipher.login.totp||!r.totpCode),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.cipher.login.totp&&r.totpCode),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",r.cipher.login.hasUris),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly)}}function ne(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.value),p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function re(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.value),p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function ie(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",16),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",17),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"label",86),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"input",87),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.card.cardholderName=e})),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"div",17),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"label",88),p.ɵɵtext(16),p.ɵɵpipe(17,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"select",89),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.card.brand=e})),p.ɵɵtext(20,"\n "),p.ɵɵtemplate(21,ne,2,2,"option",31),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"div",16),p.ɵɵtext(27,"\n "),p.ɵɵelementStart(28,"div",17),p.ɵɵtext(29,"\n "),p.ɵɵelementStart(30,"label",90),p.ɵɵtext(31),p.ɵɵpipe(32,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementStart(34,"div",36),p.ɵɵtext(35,"\n "),p.ɵɵelementStart(36,"input",91),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.card.number=e})),p.ɵɵelementEnd(),p.ɵɵtext(37,"\n "),p.ɵɵelementStart(38,"div",43),p.ɵɵtext(39,"\n "),p.ɵɵelementStart(40,"button",52),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext(2);return e.copy(e.cipher.card.number,"number","Number")})),p.ɵɵpipe(41,"i18n"),p.ɵɵtext(42,"\n "),p.ɵɵelement(43,"i",46),p.ɵɵtext(44,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(45,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(47,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n "),p.ɵɵelementStart(49,"div",92),p.ɵɵtext(50,"\n "),p.ɵɵelementStart(51,"label",93),p.ɵɵtext(52),p.ɵɵpipe(53,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(54,"\n "),p.ɵɵelementStart(55,"select",94),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.card.expMonth=e})),p.ɵɵtext(56,"\n "),p.ɵɵtemplate(57,re,2,2,"option",31),p.ɵɵtext(58,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(59,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(60,"\n "),p.ɵɵelementStart(61,"div",92),p.ɵɵtext(62,"\n "),p.ɵɵelementStart(63,"label",95),p.ɵɵtext(64),p.ɵɵpipe(65,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(66,"\n "),p.ɵɵelementStart(67,"input",96),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.card.expYear=e})),p.ɵɵpipe(68,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(69,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(70,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(71,"\n "),p.ɵɵelementStart(72,"div",16),p.ɵɵtext(73,"\n "),p.ɵɵelementStart(74,"div",17),p.ɵɵtext(75,"\n "),p.ɵɵelementStart(76,"label",97),p.ɵɵtext(77),p.ɵɵpipe(78,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(79,"\n "),p.ɵɵelementStart(80,"div",36),p.ɵɵtext(81,"\n "),p.ɵɵelementStart(82,"input",98),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.card.code=e})),p.ɵɵelementEnd(),p.ɵɵtext(83,"\n "),p.ɵɵelementStart(84,"div",43),p.ɵɵtext(85,"\n "),p.ɵɵelementStart(86,"button",52),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).toggleCardCode()})),p.ɵɵpipe(87,"i18n"),p.ɵɵtext(88,"\n "),p.ɵɵelement(89,"i",45),p.ɵɵtext(90,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(91,"\n "),p.ɵɵelementStart(92,"button",52),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext(2);return e.copy(e.cipher.card.code,"securityCode","Security Code")})),p.ɵɵpipe(93,"i18n"),p.ɵɵtext(94,"\n "),p.ɵɵelement(95,"i",46),p.ɵɵtext(96,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(97,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(98,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(99,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(100,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(101,"\n "),p.ɵɵelementContainerEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,26,"cardholderName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.card.cardholderName)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(17,28,"brand")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.card.brand)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.cardBrandOptions),p.ɵɵadvance(10),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(32,30,"number")),p.ɵɵadvance(5),p.ɵɵproperty("ngModel",r.cipher.card.number)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(41,32,"copyNumber")),p.ɵɵadvance(12),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(53,34,"expirationMonth")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.card.expMonth)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.cardExpMonthOptions),p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(65,36,"expirationYear")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate1("placeholder","",p.ɵɵpipeBind1(68,38,"ex")," 2019"),p.ɵɵproperty("ngModel",r.cipher.card.expYear)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(10),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(78,40,"securityCode")),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate("type",r.showCardCode?"text":"password"),p.ɵɵproperty("ngModel",r.cipher.card.code)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(87,42,"toggleVisibility")),p.ɵɵadvance(3),p.ɵɵproperty("ngClass",p.ɵɵpureFunction2(46,Z,!r.showCardCode,r.showCardCode)),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(93,44,"securityCode"))}}function oe(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.value),p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function ae(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",16),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",99),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"label",100),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"select",101),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.title=e})),p.ɵɵtext(11,"\n "),p.ɵɵtemplate(12,oe,2,2,"option",31),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"div",16),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"div",99),p.ɵɵtext(20,"\n "),p.ɵɵelementStart(21,"label",102),p.ɵɵtext(22),p.ɵɵpipe(23,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n "),p.ɵɵelementStart(25,"input",103),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.firstName=e})),p.ɵɵelementEnd(),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementStart(28,"div",99),p.ɵɵtext(29,"\n "),p.ɵɵelementStart(30,"label",104),p.ɵɵtext(31),p.ɵɵpipe(32,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementStart(34,"input",105),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.middleName=e})),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(36,"\n "),p.ɵɵelementStart(37,"div",99),p.ɵɵtext(38,"\n "),p.ɵɵelementStart(39,"label",106),p.ɵɵtext(40),p.ɵɵpipe(41,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(42,"\n "),p.ɵɵelementStart(43,"input",107),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.lastName=e})),p.ɵɵelementEnd(),p.ɵɵtext(44,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(45,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementStart(47,"div",16),p.ɵɵtext(48,"\n "),p.ɵɵelementStart(49,"div",99),p.ɵɵtext(50,"\n "),p.ɵɵelementStart(51,"label",108),p.ɵɵtext(52),p.ɵɵpipe(53,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(54,"\n "),p.ɵɵelementStart(55,"input",109),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.username=e})),p.ɵɵelementEnd(),p.ɵɵtext(56,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(57,"\n "),p.ɵɵelementStart(58,"div",99),p.ɵɵtext(59,"\n "),p.ɵɵelementStart(60,"label",110),p.ɵɵtext(61),p.ɵɵpipe(62,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(63,"\n "),p.ɵɵelementStart(64,"input",111),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.company=e})),p.ɵɵelementEnd(),p.ɵɵtext(65,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(66,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(67,"\n "),p.ɵɵelementStart(68,"div",16),p.ɵɵtext(69,"\n "),p.ɵɵelementStart(70,"div",99),p.ɵɵtext(71,"\n "),p.ɵɵelementStart(72,"label",112),p.ɵɵtext(73),p.ɵɵpipe(74,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(75,"\n "),p.ɵɵelementStart(76,"input",113),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.ssn=e})),p.ɵɵelementEnd(),p.ɵɵtext(77,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(78,"\n "),p.ɵɵelementStart(79,"div",99),p.ɵɵtext(80,"\n "),p.ɵɵelementStart(81,"label",114),p.ɵɵtext(82),p.ɵɵpipe(83,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(84,"\n "),p.ɵɵelementStart(85,"input",115),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.passportNumber=e})),p.ɵɵelementEnd(),p.ɵɵtext(86,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(87,"\n "),p.ɵɵelementStart(88,"div",99),p.ɵɵtext(89,"\n "),p.ɵɵelementStart(90,"label",116),p.ɵɵtext(91),p.ɵɵpipe(92,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(93,"\n "),p.ɵɵelementStart(94,"input",117),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.licenseNumber=e})),p.ɵɵelementEnd(),p.ɵɵtext(95,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(96,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(97,"\n "),p.ɵɵelementStart(98,"div",16),p.ɵɵtext(99,"\n "),p.ɵɵelementStart(100,"div",17),p.ɵɵtext(101,"\n "),p.ɵɵelementStart(102,"label",118),p.ɵɵtext(103),p.ɵɵpipe(104,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(105,"\n "),p.ɵɵelementStart(106,"input",119),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.email=e})),p.ɵɵelementEnd(),p.ɵɵtext(107,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(108,"\n "),p.ɵɵelementStart(109,"div",17),p.ɵɵtext(110,"\n "),p.ɵɵelementStart(111,"label",120),p.ɵɵtext(112),p.ɵɵpipe(113,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(114,"\n "),p.ɵɵelementStart(115,"input",121),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.phone=e})),p.ɵɵelementEnd(),p.ɵɵtext(116,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(117,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(118,"\n "),p.ɵɵelementStart(119,"div",16),p.ɵɵtext(120,"\n "),p.ɵɵelementStart(121,"div",17),p.ɵɵtext(122,"\n "),p.ɵɵelementStart(123,"label",122),p.ɵɵtext(124),p.ɵɵpipe(125,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(126,"\n "),p.ɵɵelementStart(127,"input",123),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.address1=e})),p.ɵɵelementEnd(),p.ɵɵtext(128,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(129,"\n "),p.ɵɵelementStart(130,"div",17),p.ɵɵtext(131,"\n "),p.ɵɵelementStart(132,"label",124),p.ɵɵtext(133),p.ɵɵpipe(134,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(135,"\n "),p.ɵɵelementStart(136,"input",125),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.address2=e})),p.ɵɵelementEnd(),p.ɵɵtext(137,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(138,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(139,"\n "),p.ɵɵelementStart(140,"div",16),p.ɵɵtext(141,"\n "),p.ɵɵelementStart(142,"div",17),p.ɵɵtext(143,"\n "),p.ɵɵelementStart(144,"label",126),p.ɵɵtext(145),p.ɵɵpipe(146,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(147,"\n "),p.ɵɵelementStart(148,"input",127),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.address3=e})),p.ɵɵelementEnd(),p.ɵɵtext(149,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(150,"\n "),p.ɵɵelementStart(151,"div",17),p.ɵɵtext(152,"\n "),p.ɵɵelementStart(153,"label",128),p.ɵɵtext(154),p.ɵɵpipe(155,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(156,"\n "),p.ɵɵelementStart(157,"input",129),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.city=e})),p.ɵɵelementEnd(),p.ɵɵtext(158,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(159,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(160,"\n "),p.ɵɵelementStart(161,"div",16),p.ɵɵtext(162,"\n "),p.ɵɵelementStart(163,"div",17),p.ɵɵtext(164,"\n "),p.ɵɵelementStart(165,"label",130),p.ɵɵtext(166),p.ɵɵpipe(167,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(168,"\n "),p.ɵɵelementStart(169,"input",131),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.state=e})),p.ɵɵelementEnd(),p.ɵɵtext(170,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(171,"\n "),p.ɵɵelementStart(172,"div",17),p.ɵɵtext(173,"\n "),p.ɵɵelementStart(174,"label",132),p.ɵɵtext(175),p.ɵɵpipe(176,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(177,"\n "),p.ɵɵelementStart(178,"input",133),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.postalCode=e})),p.ɵɵelementEnd(),p.ɵɵtext(179,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(180,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(181,"\n "),p.ɵɵelementStart(182,"div",16),p.ɵɵtext(183,"\n "),p.ɵɵelementStart(184,"div",17),p.ɵɵtext(185,"\n "),p.ɵɵelementStart(186,"label",134),p.ɵɵtext(187),p.ɵɵpipe(188,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(189,"\n "),p.ɵɵelementStart(190,"input",135),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.identity.country=e})),p.ɵɵelementEnd(),p.ɵɵtext(191,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(192,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(193,"\n "),p.ɵɵelementContainerEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,55,"title")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.title)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.identityTitleOptions),p.ɵɵadvance(10),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(23,57,"firstName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.firstName)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(32,59,"middleName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.middleName)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(41,61,"lastName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.lastName)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(53,63,"username")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.username)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(62,65,"company")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.company)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(74,67,"ssn")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.ssn)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(83,69,"passportNumber")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.passportNumber)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(92,71,"licenseNumber")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.licenseNumber)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(104,73,"email")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.email)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(113,75,"phone")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.phone)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(125,77,"address1")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.address1)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(134,79,"address2")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.address2)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(146,81,"address3")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.address3)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(155,83,"cityTown")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.city)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(167,85,"stateProvince")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.state)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(176,87,"zipPostalCode")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.postalCode)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(188,89,"country")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.identity.country)("disabled",r.cipher.isDeleted||r.viewOnly)}}function se(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",36),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"input",140),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().$implicit.value=e})),p.ɵɵelementEnd(),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",43),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"button",52),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit;return p.ɵɵnextContext(3).copy(e.value,"value","Field")})),p.ɵɵpipe(7,"i18n"),p.ɵɵtext(8,"\n "),p.ɵɵelement(9,"i",46),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(),i=r.index,o=r.$implicit,a=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵpropertyInterpolate1("id","fieldValue",i,""),p.ɵɵpropertyInterpolate1("name","Field.Value",i,""),p.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(7,5,"copyValue"))}}function le(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",36),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"input",145),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().$implicit.value=e})),p.ɵɵelementEnd(),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",43),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"button",44),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit;return p.ɵɵnextContext(3).toggleFieldValue(e)})),p.ɵɵpipe(7,"i18n"),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"i",45),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"button",44),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit,t=p.ɵɵnextContext(3);return t.copy(e.value,"value",e.type===t.fieldType.Hidden?"H_Field":"Field")})),p.ɵɵpipe(14,"i18n"),p.ɵɵtext(15,"\n "),p.ɵɵelement(16,"i",46),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(),i=r.index,o=r.$implicit,a=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵpropertyInterpolate1("id","fieldValue",i,""),p.ɵɵpropertyInterpolate("type",o.showValue?"text":"password"),p.ɵɵpropertyInterpolate1("name","Field.Value",i,""),p.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly||!a.cipher.viewPassword&&!o.newField),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(7,10,"toggleVisibility")),p.ɵɵproperty("disabled",!a.cipher.viewPassword&&!o.newField),p.ɵɵadvance(3),p.ɵɵproperty("ngClass",p.ɵɵpureFunction2(14,Z,!o.showValue,o.showValue)),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(14,12,"copyValue")),p.ɵɵproperty("disabled",!a.cipher.viewPassword&&!o.newField)}}function ce(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"input",146),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().$implicit.value=e})),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(),i=r.index,o=r.$implicit,a=p.ɵɵnextContext(3);p.ɵɵpropertyInterpolate1("id","fieldValue",i,""),p.ɵɵpropertyInterpolate1("name","Field.Value",i,""),p.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly)}}function pe(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",82),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit;return p.ɵɵnextContext(3).removeField(e)})),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",83),p.ɵɵtext(4,"\n "),p.ɵɵelementEnd()}2&e&&p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(1,1,"remove"))}function ue(e,t){1&e&&(p.ɵɵelementStart(0,"button",147),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",148),p.ɵɵtext(4,"\n "),p.ɵɵelementEnd()),2&e&&p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(1,1,"dragToSort"))}function de(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",138),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",77),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",39),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"label",74),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"a",139),p.ɵɵpipe(11,"i18n"),p.ɵɵtext(12,"\n "),p.ɵɵelement(13,"i",79),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"input",140),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.name=e})),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"div",73),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"label",74),p.ɵɵtext(23),p.ɵɵpipe(24,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"div",64),p.ɵɵtext(27,"\n "),p.ɵɵtemplate(28,se,13,7,"div",141),p.ɵɵtext(29,"\n "),p.ɵɵtemplate(30,le,20,17,"div",141),p.ɵɵtext(31,"\n "),p.ɵɵelementStart(32,"div",142),p.ɵɵtext(33,"\n "),p.ɵɵtemplate(34,ce,1,4,"input",143),p.ɵɵtext(35,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(36,"\n "),p.ɵɵtemplate(37,pe,5,3,"button",81),p.ɵɵtext(38,"\n "),p.ɵɵtemplate(39,ue,5,3,"button",144),p.ɵɵtext(40,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(41,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(42,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=p.ɵɵnextContext(3);p.ɵɵadvance(6),p.ɵɵpropertyInterpolate1("for","fieldName",i,""),p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,14,"name")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(11,16,"learnMore")),p.ɵɵadvance(7),p.ɵɵpropertyInterpolate1("id","fieldName",i,""),p.ɵɵpropertyInterpolate1("name","Field.Name",i,""),p.ɵɵproperty("ngModel",r.name)("disabled",o.cipher.isDeleted||o.viewOnly),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate1("for","fieldValue",i,""),p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(24,18,"value")),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",r.type===o.fieldType.Text),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.type===o.fieldType.Hidden),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",r.type===o.fieldType.Boolean),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly)}}function me(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",136),p.ɵɵlistener("cdkDropListDropped",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).drop(e)})),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,de,43,20,"div",137),p.ɵɵtext(3,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.cipher.fields)("ngForTrackBy",r.trackByFunction)}}function he(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"a",149),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).addField()})),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",85),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(4,1,"newCustomField"),"\n "))}function fe(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.value),p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function ve(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",16),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",150),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"label",151),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"select",152),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).addFieldType=e})),p.ɵɵtext(9,"\n "),p.ɵɵtemplate(10,fe,2,2,"option",31),p.ɵɵtext(11,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,3,"type")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.addFieldType),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.addFieldTypeOptions)}}function ye(e,t){if(1&e&&(p.ɵɵelementStart(0,"option",32),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵproperty("ngValue",n.value),p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function ge(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h3",25),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"div",16),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"div",150),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"label",153),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"select",154),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).cipher.organizationId=e}))("change",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).organizationChanged()})),p.ɵɵtext(15,"\n "),p.ɵɵtemplate(16,ye,2,2,"option",31),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementContainerEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,5,"ownership")),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.organizationId)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",r.ownershipOptions)}}function xe(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function be(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",156),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"input",157),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.checked=e})),p.ɵɵelementEnd(),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"label",158),p.ɵɵtext(5),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=p.ɵɵnextContext(4);p.ɵɵadvance(2),p.ɵɵpropertyInterpolate1("id","collection-",i,""),p.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),p.ɵɵproperty("ngModel",r.checked)("disabled",o.cipher.isDeleted||o.viewOnly),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate1("for","collection-",i,""),p.ɵɵadvance(1),p.ɵɵtextInterpolate(r.name)}}function Se(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,be,7,6,"div",155),p.ɵɵtext(3,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",n.collections)}}function we(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h3",25),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵtemplate(6,xe,3,3,"div",21),p.ɵɵtext(7,"\n "),p.ɵɵtemplate(8,Se,4,1,"ng-container",21),p.ɵɵtext(9,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,3,"collections")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!n.collections||!n.collections.length),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.collections&&n.collections.length)}}function Ce(e,t){if(1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"b",160),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5),p.ɵɵpipe(6,"date"),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(3);p.ɵɵadvance(3),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(6,4,n.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function Ie(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"b",160),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"a",162),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(3).viewHistory()})),p.ɵɵpipe(7,"i18n"),p.ɵɵtext(8),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(3);p.ɵɵadvance(3),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(4,3,"passwordHistory"),":"),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(7,5,"view")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",r.cipher.passwordHistory.length,"\n ")}}function Ee(e,t){if(1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1),p.ɵɵpipe(2,"date"),p.ɵɵelementStart(3,"span",165),p.ɵɵtext(4),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd()),2&e){var n=t.$implicit;p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(2,2,n.lastUsedDate,"short")," -\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(n.password)}}function Pe(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",163),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,Ee,6,5,"div",164),p.ɵɵtext(3,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵproperty("ngForOf",n.cipher.passwordHistory)}}function ke(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",159),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"b",160),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9),p.ɵɵpipe(10,"date"),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵtemplate(12,Ce,7,7,"div",21),p.ɵɵtext(13,"\n "),p.ɵɵtemplate(14,Ie,10,7,"div",21),p.ɵɵtext(15,"\n "),p.ɵɵtemplate(16,Pe,4,1,"div",161),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(7),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(8,5,"dateUpdated"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(10,7,n.cipher.revisionDate,"medium"),"\n "),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",n.showRevisionDate),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.hasPasswordHistory),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.viewingPasswordHistory)}}function _e(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",13),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,R,3,3,"app-callout",14),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,j,14,6,"div",15),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"div",16),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"div",17),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"label",18),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"input",19),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().cipher.name=e})),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵtemplate(17,U,11,6,"div",20),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵtext(20,"\n "),p.ɵɵtemplate(21,te,74,38,"ng-container",21),p.ɵɵtext(22,"\n "),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,ie,102,49,"ng-container",21),p.ɵɵtext(25,"\n "),p.ɵɵtext(26,"\n "),p.ɵɵtemplate(27,ae,194,91,"ng-container",21),p.ɵɵtext(28,"\n "),p.ɵɵelementStart(29,"div",22),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"label",23),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementStart(35,"textarea",24),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().cipher.notes=e})),p.ɵɵelementEnd(),p.ɵɵtext(36,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(37,"\n "),p.ɵɵelementStart(38,"h3",25),p.ɵɵtext(39),p.ɵɵpipe(40,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(41,"\n "),p.ɵɵtemplate(42,me,4,2,"div",26),p.ɵɵtext(43,"\n "),p.ɵɵtemplate(44,he,5,3,"a",27),p.ɵɵtext(45,"\n "),p.ɵɵtemplate(46,ve,14,5,"div",15),p.ɵɵtext(47,"\n "),p.ɵɵtemplate(48,ge,21,9,"ng-container",21),p.ɵɵtext(49,"\n "),p.ɵɵtemplate(50,we,10,5,"ng-container",21),p.ɵɵtext(51,"\n "),p.ɵɵtemplate(52,ke,19,10,"ng-container",21),p.ɵɵtext(53,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.allowOwnershipAssignment()&&!r.allowPersonal),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.editMode&&!r.viewOnly),p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,19,"name")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.name)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!r.organization),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Login),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Card),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Identity),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(33,21,"notes")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.cipher.notes)("disabled",r.cipher.isDeleted||r.viewOnly),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(40,23,"customFields")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",r.cipher.hasFields),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.allowOwnershipAssignment()),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",(!r.editMode||r.cloneMode)&&r.cipher.organizationId),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.editMode)}}function Ae(e,t){if(1&e&&(p.ɵɵelementStart(0,"button",166),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",167),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span"),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(),r=p.ɵɵreference(5);p.ɵɵproperty("disabled",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,3,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,5,null!=n.cipher&&n.cipher.isDeleted?"restore":"save"))}}var Oe=function(e,t){return{"fa-star":e,"fa-star-o":t}};function Te(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",70),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).toggleFavorite()})),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",45),p.ɵɵtext(4,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(1,2,r.cipher.favorite?"unfavorite":"favorite")),p.ɵɵadvance(3),p.ɵɵproperty("ngClass",p.ɵɵpureFunction2(4,Oe,r.cipher.favorite,!r.cipher.favorite))}}function Me(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",171,172),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).delete()})),p.ɵɵpipe(2,"i18n"),p.ɵɵtext(3,"\n "),p.ɵɵelement(4,"i",173),p.ɵɵtext(5,"\n "),p.ɵɵelement(6,"i",174),p.ɵɵpipe(7,"i18n"),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(1),i=p.ɵɵnextContext(2);p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(2,6,i.cipher.isDeleted?"permanentlyDelete":"delete")),p.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),p.ɵɵadvance(4),p.ɵɵproperty("hidden",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(7,8,"loading")),p.ɵɵproperty("hidden",!r.loading)}}function Be(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",168),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,Te,5,7,"button",169),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,Me,9,10,"button",170),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!n.organization&&!n.cipher.isDeleted),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.editMode&&!n.cloneMode)}}var De=function(e){function t(t,n,r,i,o,a,s,l,c,p,u,d,m){var h=e.call(this,t,n,r,i,o,a,s,l,u,d,m)||this;return h.totpService=c,h.passwordGenerationService=p,h.messagingService=u,h.policyService=m,h.showRevisionDate=!1,h.hasPasswordHistory=!1,h.viewingPasswordHistory=!1,h.viewOnly=!1,h}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t,n,r=this;return a(this,(function(i){switch(i.label){case 0:return[4,e.prototype.ngOnInit.call(this)];case 1:return i.sent(),[4,this.load()];case 2:return i.sent(),this.showRevisionDate=null!=this.cipher.passwordRevisionDisplayDate,this.hasPasswordHistory=this.cipher.hasPasswordHistory,this.cleanUp(),t=this,[4,this.userService.canAccessPremium()];case 3:return t.canAccessPremium=i.sent(),this.cipher.type===s.CipherType.Login&&this.cipher.login.totp&&(this.cipher.organizationUseTotp||this.canAccessPremium)?[4,this.totpUpdateCode()]:[3,6];case 4:return i.sent(),n=this.totpService.getTimeInterval(this.cipher.login.totp),[4,this.totpTick(n)];case 5:i.sent(),this.totpInterval=window.setInterval((function(){return o(r,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.totpTick(n)];case 1:return e.sent(),[2]}}))}))}),1e3),i.label=6;case 6:return[2]}}))}))},t.prototype.toggleFavorite=function(){this.cipher.favorite=!this.cipher.favorite},t.prototype.launch=function(e){e.canLaunch&&this.platformUtilsService.launchUri(e.launchUri)},t.prototype.copy=function(e,t,n){null!=e&&(this.platformUtilsService.copyToClipboard(e,{window:window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t(t))),this.editMode&&("password"===t?this.eventService.collect(l.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipherId):"securityCode"===t?this.eventService.collect(l.EventType.Cipher_ClientCopiedCardCode,this.cipherId):"H_Field"===n&&this.eventService.collect(l.EventType.Cipher_ClientCopiedHiddenField,this.cipherId)))},t.prototype.generatePassword=function(){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,e.prototype.generatePassword.call(this)];case 1:return(t=i.sent())?[4,this.passwordGenerationService.getOptions()]:[3,4];case 2:return n=i.sent()[0],r=this.cipher.login,[4,this.passwordGenerationService.generatePassword(n)];case 3:r.password=i.sent(),i.label=4;case 4:return[2,t]}}))}))},t.prototype.premiumRequired=function(){this.canAccessPremium||this.messagingService.send("premiumRequired")},t.prototype.upgradeOrganization=function(){this.messagingService.send("upgradeOrganization",{organizationId:this.cipher.organizationId})},t.prototype.viewHistory=function(){this.viewingPasswordHistory=!this.viewingPasswordHistory},t.prototype.cleanUp=function(){this.totpInterval&&window.clearInterval(this.totpInterval)},t.prototype.totpUpdateCode=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return null==this.cipher||this.cipher.type!==s.CipherType.Login||null==this.cipher.login.totp?(this.totpInterval&&window.clearInterval(this.totpInterval),[2]):(e=this,[4,this.totpService.getCode(this.cipher.login.totp)]);case 1:return e.totpCode=n.sent(),null!=this.totpCode?this.totpCode.length>4?(t=Math.floor(this.totpCode.length/2),this.totpCodeFormatted=this.totpCode.substring(0,t)+" "+this.totpCode.substring(t)):this.totpCodeFormatted=this.totpCode:(this.totpCodeFormatted=null,this.totpInterval&&window.clearInterval(this.totpInterval)),[2]}}))}))},t.prototype.allowOwnershipAssignment=function(){return(!this.editMode||this.cloneMode)&&null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)},t.prototype.totpTick=function(e){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return t=Math.round((new Date).getTime()/1e3),n=t%e,this.totpSec=e-n,this.totpDash=+(Math.round(78.6/e*n+"e+2")+"e-2"),this.totpLow=this.totpSec<=7,0!==n?[3,2]:[4,this.totpUpdateCode()];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(d.FolderService),p.ɵɵdirectiveInject(m.I18nService),p.ɵɵdirectiveInject(h.PlatformUtilsService),p.ɵɵdirectiveInject(f.AuditService),p.ɵɵdirectiveInject(v.StateService),p.ɵɵdirectiveInject(y.UserService),p.ɵɵdirectiveInject(g.CollectionService),p.ɵɵdirectiveInject(x.TotpService),p.ɵɵdirectiveInject(b.PasswordGenerationService),p.ɵɵdirectiveInject(S.MessagingService),p.ɵɵdirectiveInject(w.EventService),p.ɵɵdirectiveInject(C.PolicyService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-vault-add-edit"]],features:[p.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],["cdkDropList","",3,"cdkDropListDropped",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-2",3,"click",4,"ngIf"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 fa-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","fa-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-check-circle",3,"hidden"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-spinner","fa-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],["src","images/totp-countdown.png",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"fa","fa-lg","fa-share"],[1,"col-5","form-group"],["href","https://help.bitwarden.com/article/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-minus-circle","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","type","text","name","Card.Number","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],["cdkDropList","",3,"cdkDropListDropped"],["class","row","cdkDrag","",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"row"],["href","https://help.bitwarden.com/article/custom-fields/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],["class","input-group",4,"ngIf"],[1,"flex-fill"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange",4,"ngIf"],["type","button","class","btn btn-link text-muted cursor-move",3,"appA11yTitle",4,"ngIf"],["appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"id","type","name","ngModel","disabled","ngModelChange"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-link","text-muted","cursor-move",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-bars","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-2",3,"click"],[1,"col-5"],["for","addFieldType",1,"sr-only"],["id","addFieldType","name","AddFieldType",1,"form-control",3,"ngModel","ngModelChange"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"button",6),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"span",7),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵtemplate(20,_e,54,25,"div",8),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"div",9),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,Ae,9,7,"button",10),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"button",11),p.ɵɵtext(27),p.ɵɵpipe(28,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n "),p.ɵɵtemplate(30,Be,6,2,"div",12),p.ɵɵtext(31,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n")),2&e&&(p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate(t.title),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,7,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.cipher),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",!t.viewOnly),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[I.NgControlStatusGroup,I.NgForm,E.ApiActionDirective,P.A11yTitleDirective,k.NgIf,I.DefaultValueAccessor,I.RequiredValidator,I.NgControlStatus,I.NgModel,_.CalloutComponent,I.SelectControlValueAccessor,A.AutofocusDirective,k.NgForOf,I.NgSelectOption,I.ɵangular_packages_forms_forms_x,O.InputVerbatimDirective,k.NgClass,T.StopClickDirective,k.NgStyle,M.CdkDropList,M.CdkDrag,B.TrueFalseValueDirective,I.CheckboxControlValueAccessor],pipes:[D.I18nPipe,k.DatePipe],encapsulation:2}),t}(c.AddEditComponent);t.AddEditComponent=De},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.ImportService=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(498),a=n(23),s=n(883),l=n(599),c=n(600),p=n(601),u=n(602),d=n(604),m=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.getResponseProperty("Id"),n.organizationId=n.getResponseProperty("OrganizationId"),n.folderId=n.getResponseProperty("FolderId")||null,n.type=n.getResponseProperty("Type"),n.name=n.getResponseProperty("Name"),n.notes=n.getResponseProperty("Notes"),n.favorite=n.getResponseProperty("Favorite")||!1,n.edit=!!n.getResponseProperty("Edit"),null==n.getResponseProperty("ViewPassword")?n.viewPassword=!0:n.viewPassword=n.getResponseProperty("ViewPassword"),n.organizationUseTotp=n.getResponseProperty("OrganizationUseTotp"),n.revisionDate=n.getResponseProperty("RevisionDate"),n.collectionIds=n.getResponseProperty("CollectionIds"),n.deletedDate=n.getResponseProperty("DeletedDate");var r=n.getResponseProperty("Login");null!=r&&(n.login=new u.LoginApi(r));var i=n.getResponseProperty("Card");null!=i&&(n.card=new l.CardApi(i));var a=n.getResponseProperty("Identity");null!=a&&(n.identity=new p.IdentityApi(a));var m=n.getResponseProperty("SecureNote");null!=m&&(n.secureNote=new d.SecureNoteApi(m));var h=n.getResponseProperty("Fields");null!=h&&(n.fields=h.map((function(e){return new c.FieldApi(e)})));var f=n.getResponseProperty("Attachments");null!=f&&(n.attachments=f.map((function(e){return new o.AttachmentResponse(e)})));var v=n.getResponseProperty("PasswordHistory");return null!=v&&(n.passwordHistory=v.map((function(e){return new s.PasswordHistoryResponse(e)}))),n}return i(t,e),t}(a.BaseResponse);t.CipherResponse=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=(n(9),n(19),n(71),n(3),n(5),n(80),n(114),n(7),n(886)),c=n(39),p=n(254),u=n(0),d=n(80),m=n(9),h=n(3),f=n(5),v=n(19),y=n(71),g=n(114),x=n(7),b=n(4),S=n(214),w=n(13),C=n(53),I=n(107),E=n(37),P=n(17),k=n(10);function _(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",22),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",23),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"shared")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"shared")))}function A(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",25),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",23),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"attachmentsNeedFix")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"attachmentsNeedFix")))}function O(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",24),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",23),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵtemplate(9,A,9,6,"ng-container",0),u.ɵɵtext(10,"\n "),u.ɵɵelementContainerEnd()),2&e){var n=u.ɵɵnextContext().$implicit,r=u.ɵɵnextContext(3);u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,3,"attachments")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,5,"attachments")),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",r.showFixOldAttachments(n))}}function T(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext(2).$implicit;return u.ɵɵnextContext(3).copy(e,e.login.password,"password","password")})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",26),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"copyPassword"),"\n "))}function M(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext(2).$implicit;return u.ɵɵnextContext(3).copy(e,e.login.totp,"verificationCodeTotp","TOTP")})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",26),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"copyVerificationCode"),"\n "))}function B(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext(2).$implicit;return u.ɵɵnextContext(3).launch(e.login.launchUri)})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",27),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"launch"),"\n "))}function D(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(3).copy(e,e.login.username,"username","username")})),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",26),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵtemplate(8,T,5,3,"a",19),u.ɵɵtext(9,"\n "),u.ɵɵtemplate(10,M,5,3,"a",19),u.ɵɵtext(11,"\n "),u.ɵɵtemplate(12,B,5,3,"a",19),u.ɵɵtext(13,"\n "),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵnextContext().$implicit,i=u.ɵɵnextContext(3);u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(6,4,"copyUsername"),"\n "),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",r.viewPassword),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",i.displayTotpCopyButton(r)),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.login.canLaunch)}}function R(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(3).clone(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",28),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"clone"),"\n "))}function V(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(3).share(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",29),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"share"),"\n "))}function j(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(3).collections(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",30),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"collections"),"\n "))}function F(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(3).events(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",31),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function U(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(3).restore(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",32),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"restore"),"\n "))}function N(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"tr"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"td",5),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).checkCipher(e)})),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"input",6),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),t.$implicit.checked=e})),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"td",7),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).checkCipher(e)})),u.ɵɵtext(8,"\n "),u.ɵɵelement(9,"app-vault-icon",8),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"td",9),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).checkCipher(e)})),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"a",10),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).selectCipher(e)})),u.ɵɵpipe(15,"i18n"),u.ɵɵtext(16),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵtemplate(18,_,9,6,"ng-container",0),u.ɵɵtext(19,"\n "),u.ɵɵtemplate(20,O,11,7,"ng-container",0),u.ɵɵtext(21,"\n "),u.ɵɵelement(22,"br"),u.ɵɵtext(23,"\n "),u.ɵɵelementStart(24,"small",11),u.ɵɵtext(25),u.ɵɵelementEnd(),u.ɵɵtext(26,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵelementStart(28,"td",12),u.ɵɵtext(29,"\n "),u.ɵɵelementStart(30,"div",13),u.ɵɵtext(31,"\n "),u.ɵɵelementStart(32,"button",14),u.ɵɵpipe(33,"i18n"),u.ɵɵtext(34,"\n "),u.ɵɵelement(35,"i",15),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"div",16),u.ɵɵtext(39,"\n "),u.ɵɵtemplate(40,D,14,6,"ng-container",0),u.ɵɵtext(41,"\n "),u.ɵɵelementStart(42,"a",17),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).attachments(e)})),u.ɵɵtext(43,"\n "),u.ɵɵelement(44,"i",18),u.ɵɵtext(45),u.ɵɵpipe(46,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(47,"\n "),u.ɵɵtemplate(48,R,5,3,"a",19),u.ɵɵtext(49,"\n "),u.ɵɵtemplate(50,V,5,3,"a",19),u.ɵɵtext(51,"\n "),u.ɵɵtemplate(52,j,5,3,"a",19),u.ɵɵtext(53,"\n "),u.ɵɵtemplate(54,F,5,3,"a",19),u.ɵɵtext(55,"\n "),u.ɵɵtemplate(56,U,5,3,"a",19),u.ɵɵtext(57,"\n "),u.ɵɵelementStart(58,"a",20),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).delete(e)})),u.ɵɵtext(59,"\n "),u.ɵɵelement(60,"i",21),u.ɵɵtext(61),u.ɵɵpipe(62,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(63,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(66,"\n "),u.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=u.ɵɵnextContext(3);u.ɵɵadvance(4),u.ɵɵproperty("ngModel",r.checked),u.ɵɵadvance(5),u.ɵɵproperty("cipher",r),u.ɵɵadvance(5),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(15,16,"editItem")),u.ɵɵadvance(2),u.ɵɵtextInterpolate(r.name),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!i.organization&&r.organizationId),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.hasAttachments),u.ɵɵadvance(5),u.ɵɵtextInterpolate(r.subTitle),u.ɵɵadvance(7),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(33,18,"options")),u.ɵɵadvance(8),u.ɵɵproperty("ngIf",r.type===i.cipherType.Login&&!r.isDeleted),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(46,20,"attachments"),"\n "),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",(!i.organization&&!r.organizationId||i.organization)&&!r.isDeleted),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!i.organization&&!r.organizationId&&!r.isDeleted),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.organizationId&&!r.isDeleted),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.organizationId&&i.accessEvents),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.isDeleted),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(62,22,r.isDeleted?"permanentlyDelete":"delete"),"\n ")}}function z(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"table",3),u.ɵɵlistener("scrolled",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext(2).loadMore()})),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"tbody"),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,N,67,24,"tr",4),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext().ngIf,i=u.ɵɵnextContext();u.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!i.isPaging()),u.ɵɵadvance(4),u.ɵɵproperty("ngForOf",r)}}function L(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",34),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",23),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function G(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",36),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext(4).addCipher()})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",37),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,1,"addItem")))}function K(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵtemplate(6,G,5,3,"button",35),u.ɵɵtext(7,"\n "),u.ɵɵelementContainerEnd()),2&e){var n=u.ɵɵnextContext(3);u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,2,"noItemsInList")),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",n.showAddNew)}}function q(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",33),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,L,9,6,"ng-container",0),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,K,8,4,"ng-container",0),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext(2);u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!n.loaded),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.loaded)}}function W(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,z,7,3,"table",1),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,q,6,2,"div",2),u.ɵɵtext(5,"\n"),u.ɵɵelementContainerEnd()),2&e){var n=t.ngIf;u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.length),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!n.length)}}var H=function(e){function t(t,n,r,i,o,a,l,p){var u=e.call(this,t)||this;return u.toasterService=n,u.i18nService=r,u.platformUtilsService=i,u.cipherService=o,u.eventService=a,u.totpService=l,u.userService=p,u.showAddNew=!0,u.onAttachmentsClicked=new s.EventEmitter,u.onShareClicked=new s.EventEmitter,u.onCollectionsClicked=new s.EventEmitter,u.onCloneClicked=new s.EventEmitter,u.cipherType=c.CipherType,u.userHasPremiumAccess=!1,u.pageSize=200,u}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return e=this,[4,this.userService.canAccessPremium()];case 1:return e.userHasPremiumAccess=t.sent(),[2]}}))}))},t.prototype.ngOnDestroy=function(){this.selectAll(!1)},t.prototype.launch=function(e){this.platformUtilsService.launchUri(e)},t.prototype.attachments=function(e){this.onAttachmentsClicked.emit(e)},t.prototype.share=function(e){this.onShareClicked.emit(e)},t.prototype.collections=function(e){this.onCollectionsClicked.emit(e)},t.prototype.clone=function(e){this.onCloneClicked.emit(e)},t.prototype.delete=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return null!=this.actionPromise?[2]:(t=e.isDeleted,[4,this.platformUtilsService.showDialog(this.i18nService.t(t?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t(t?"permanentlyDeleteItem":"deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]);case 1:if(!n.sent())return[2,!1];n.label=2;case 2:return n.trys.push([2,4,,5]),this.actionPromise=this.deleteCipher(e.id,t),[4,this.actionPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(t?"permanentlyDeletedItem":"deletedItem")),this.refresh(),[3,5];case 4:return n.sent(),[3,5];case 5:return this.actionPromise=null,[2]}}))}))},t.prototype.restore=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==this.actionPromise&&e.isDeleted?[4,this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),this.actionPromise=this.cipherService.restoreWithServer(e.id),[4,this.actionPromise];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("restoredItem")),this.refresh(),[3,5];case 4:return t.sent(),[3,5];case 5:return this.actionPromise=null,[2]}}))}))},t.prototype.copy=function(e,t,n,r){return o(this,void 0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return null==t||"TOTP"===r&&!this.displayTotpCopyButton(e)?[2]:[3,1];case 1:return t!==e.login.totp?[3,3]:[4,this.totpService.getCode(t)];case 2:t=i.sent(),i.label=3;case 3:return this.platformUtilsService.copyToClipboard(t,{window:window}),this.toasterService.popAsync("info",null,this.i18nService.t("valueCopied",this.i18nService.t(n))),"password"===n||"verificationCodeTotp"===n?this.eventService.collect(p.EventType.Cipher_ClientToggledHiddenFieldVisible,e.id):"securityCode"===n&&this.eventService.collect(p.EventType.Cipher_ClientCopiedCardCode,e.id),[2]}}))}))},t.prototype.selectAll=function(e){e&&this.selectAll(!1);for(var t=e&&this.ciphers.length>500?500:this.ciphers.length,n=0;n<t;n++)this.checkCipher(this.ciphers[n],e)},t.prototype.checkCipher=function(e,t){e.checked=null==t?!e.checked:t},t.prototype.getSelected=function(){return null==this.ciphers?[]:this.ciphers.filter((function(e){return!!e.checked}))},t.prototype.getSelectedIds=function(){return this.getSelected().map((function(e){return e.id}))},t.prototype.displayTotpCopyButton=function(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.login)||void 0===t?void 0:t.hasTotp)&&void 0!==n&&n&&(e.organizationUseTotp||this.userHasPremiumAccess)},t.prototype.deleteCipher=function(e,t){return t?this.cipherService.deleteWithServer(e):this.cipherService.softDeleteWithServer(e)},t.prototype.showFixOldAttachments=function(e){return e.hasOldAttachments&&null==e.organizationId},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.SearchService),u.ɵɵdirectiveInject(m.ToasterService),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(f.PlatformUtilsService),u.ɵɵdirectiveInject(v.CipherService),u.ɵɵdirectiveInject(y.EventService),u.ɵɵdirectiveInject(g.TotpService),u.ɵɵdirectiveInject(x.UserService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-vault-ciphers"]],inputs:{showAddNew:"showAddNew"},outputs:{onAttachmentsClicked:"onAttachmentsClicked",onShareClicked:"onShareClicked",onCollectionsClicked:"onCollectionsClicked",onCloneClicked:"onCloneClicked"},features:[u.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],["class","table table-hover table-list table-ciphers","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["class","no-items",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list","table-ciphers",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],[1,"table-list-icon",3,"click"],[3,"cipher"],[1,"reduced-lh","wrap",3,"click"],["href","#","appStopClick","","appStopProp","",3,"title","click"],["appStopProp",""],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-paperclip"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-exclamation-triangle","text-warning",3,"title"],["aria-hidden","true",1,"fa","fa-fw","fa-clone"],["aria-hidden","true",1,"fa","fa-fw","fa-share-square-o"],["aria-hidden","true",1,"fa","fa-fw","fa-files-o"],["aria-hidden","true",1,"fa","fa-fw","fa-share-alt"],["aria-hidden","true",1,"fa","fa-fw","fa-cubes"],["aria-hidden","true",1,"fa","fa-fw","fa-file-text-o"],["aria-hidden","true",1,"fa","fa-fw","fa-undo"],[1,"no-items"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],["class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary",3,"click"],[1,"fa","fa-plus","fa-fw"]],template:function(e,t){1&e&&(u.ɵɵtemplate(0,W,6,2,"ng-container",0),u.ɵɵtext(1,"\n")),2&e&&u.ɵɵproperty("ngIf",t.isPaging()?t.pagedCiphers:t.ciphers)},directives:[b.NgIf,S.InfiniteScrollDirective,b.NgForOf,w.CheckboxControlValueAccessor,C.StopPropDirective,w.NgControlStatus,w.NgModel,I.IconComponent,E.StopClickDirective,P.A11yTitleDirective],pipes:[k.I18nPipe],encapsulation:2}),t}(l.CiphersComponent);t.CiphersComponent=H},,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.AesCbc256_B64=0]="AesCbc256_B64",e[e.AesCbc128_HmacSha256_B64=1]="AesCbc128_HmacSha256_B64",e[e.AesCbc256_HmacSha256_B64=2]="AesCbc256_HmacSha256_B64",e[e.Rsa2048_OaepSha256_B64=3]="Rsa2048_OaepSha256_B64",e[e.Rsa2048_OaepSha1_B64=4]="Rsa2048_OaepSha1_B64",e[e.Rsa2048_OaepSha256_HmacSha256_B64=5]="Rsa2048_OaepSha256_HmacSha256_B64",e[e.Rsa2048_OaepSha1_HmacSha256_B64=6]="Rsa2048_OaepSha1_HmacSha256_B64"}(t.EncryptionType||(t.EncryptionType={}))},function(e,t,n){"use strict";var r,i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(113),s=n(559),l=n(849),c=n(461),p=n(850),u=n(851);t.TwoFactorProviders=((r={})[a.TwoFactorProviderType.Authenticator]={type:a.TwoFactorProviderType.Authenticator,name:null,description:null,priority:1,sort:1,premium:!1},r[a.TwoFactorProviderType.Yubikey]={type:a.TwoFactorProviderType.Yubikey,name:null,description:null,priority:3,sort:2,premium:!0},r[a.TwoFactorProviderType.Duo]={type:a.TwoFactorProviderType.Duo,name:"Duo",description:null,priority:2,sort:3,premium:!0},r[a.TwoFactorProviderType.OrganizationDuo]={type:a.TwoFactorProviderType.OrganizationDuo,name:"Duo (Organization)",description:null,priority:10,sort:4,premium:!1},r[a.TwoFactorProviderType.Email]={type:a.TwoFactorProviderType.Email,name:null,description:null,priority:0,sort:6,premium:!1},r[a.TwoFactorProviderType.WebAuthn]={type:a.TwoFactorProviderType.WebAuthn,name:null,description:null,priority:4,sort:5,premium:!0},r);var d=function(){function e(e,t,n,r,i,o,a,s,l,c,p){void 0===p&&(p=!0),this.cryptoService=e,this.apiService=t,this.userService=n,this.tokenService=r,this.appIdService=i,this.i18nService=o,this.platformUtilsService=a,this.messagingService=s,this.vaultTimeoutService=l,this.logService=c,this.setCryptoKeys=p,this.selectedTwoFactorProviderType=null}return e.prototype.init=function(){t.TwoFactorProviders[a.TwoFactorProviderType.Email].name=this.i18nService.t("emailTitle"),t.TwoFactorProviders[a.TwoFactorProviderType.Email].description=this.i18nService.t("emailDesc"),t.TwoFactorProviders[a.TwoFactorProviderType.Authenticator].name=this.i18nService.t("authenticatorAppTitle"),t.TwoFactorProviders[a.TwoFactorProviderType.Authenticator].description=this.i18nService.t("authenticatorAppDesc"),t.TwoFactorProviders[a.TwoFactorProviderType.Duo].description=this.i18nService.t("duoDesc"),t.TwoFactorProviders[a.TwoFactorProviderType.OrganizationDuo].name="Duo ("+this.i18nService.t("organization")+")",t.TwoFactorProviders[a.TwoFactorProviderType.OrganizationDuo].description=this.i18nService.t("duoOrganizationDesc"),t.TwoFactorProviders[a.TwoFactorProviderType.WebAuthn].name=this.i18nService.t("webAuthnTitle"),t.TwoFactorProviders[a.TwoFactorProviderType.WebAuthn].description=this.i18nService.t("webAuthnDesc"),t.TwoFactorProviders[a.TwoFactorProviderType.Yubikey].name=this.i18nService.t("yubiKeyTitle"),t.TwoFactorProviders[a.TwoFactorProviderType.Yubikey].description=this.i18nService.t("yubiKeyDesc")},e.prototype.logIn=function(e,t){return i(this,void 0,void 0,(function(){var n,r;return o(this,(function(i){switch(i.label){case 0:return this.selectedTwoFactorProviderType=null,[4,this.makePreloginKey(t,e)];case 1:return n=i.sent(),[4,this.cryptoService.hashPassword(t,n)];case 2:return r=i.sent(),[4,this.logInHelper(e,r,null,null,null,null,null,n,null,null,null)];case 3:return[2,i.sent()]}}))}))},e.prototype.logInSso=function(e,t,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return this.selectedTwoFactorProviderType=null,[4,this.logInHelper(null,null,e,t,n,null,null,null,null,null,null)];case 1:return[2,r.sent()]}}))}))},e.prototype.logInApiKey=function(e,t){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return this.selectedTwoFactorProviderType=null,[4,this.logInHelper(null,null,null,null,null,e,t,null,null,null,null)];case 1:return[2,n.sent()]}}))}))},e.prototype.logInTwoFactor=function(e,t,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.logInHelper(this.email,this.masterPasswordHash,this.code,this.codeVerifier,this.ssoRedirectUrl,this.clientId,this.clientSecret,this.key,e,t,n)];case 1:return[2,r.sent()]}}))}))},e.prototype.logInComplete=function(e,t,n,r,a){return i(this,void 0,void 0,(function(){var i,s;return o(this,(function(o){switch(o.label){case 0:return this.selectedTwoFactorProviderType=null,[4,this.makePreloginKey(t,e)];case 1:return i=o.sent(),[4,this.cryptoService.hashPassword(t,i)];case 2:return s=o.sent(),[4,this.logInHelper(e,s,null,null,null,null,null,i,n,r,a)];case 3:return[2,o.sent()]}}))}))},e.prototype.logInSsoComplete=function(e,t,n,r,a,s){return i(this,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return this.selectedTwoFactorProviderType=null,[4,this.logInHelper(null,null,e,t,n,null,null,null,r,a,s)];case 1:return[2,i.sent()]}}))}))},e.prototype.logInApiKeyComplete=function(e,t,n,r,a){return i(this,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return this.selectedTwoFactorProviderType=null,[4,this.logInHelper(null,null,null,null,null,e,t,null,n,r,a)];case 1:return[2,i.sent()]}}))}))},e.prototype.logOut=function(e){e(),this.messagingService.send("loggedOut")},e.prototype.getSupportedTwoFactorProviders=function(e){var n=[];return null==this.twoFactorProvidersData||(this.twoFactorProvidersData.has(a.TwoFactorProviderType.OrganizationDuo)&&this.platformUtilsService.supportsDuo()&&n.push(t.TwoFactorProviders[a.TwoFactorProviderType.OrganizationDuo]),this.twoFactorProvidersData.has(a.TwoFactorProviderType.Authenticator)&&n.push(t.TwoFactorProviders[a.TwoFactorProviderType.Authenticator]),this.twoFactorProvidersData.has(a.TwoFactorProviderType.Yubikey)&&n.push(t.TwoFactorProviders[a.TwoFactorProviderType.Yubikey]),this.twoFactorProvidersData.has(a.TwoFactorProviderType.Duo)&&this.platformUtilsService.supportsDuo()&&n.push(t.TwoFactorProviders[a.TwoFactorProviderType.Duo]),this.twoFactorProvidersData.has(a.TwoFactorProviderType.WebAuthn)&&this.platformUtilsService.supportsWebAuthn(e)&&n.push(t.TwoFactorProviders[a.TwoFactorProviderType.WebAuthn]),this.twoFactorProvidersData.has(a.TwoFactorProviderType.Email)&&n.push(t.TwoFactorProviders[a.TwoFactorProviderType.Email])),n},e.prototype.getDefaultTwoFactorProvider=function(e){if(null==this.twoFactorProvidersData)return null;if(null!=this.selectedTwoFactorProviderType&&this.twoFactorProvidersData.has(this.selectedTwoFactorProviderType))return this.selectedTwoFactorProviderType;var n=null,r=-1;return this.twoFactorProvidersData.forEach((function(i,o){var s=t.TwoFactorProviders[o];if(null!=s&&s.priority>r){if(o===a.TwoFactorProviderType.WebAuthn&&!e)return;n=o,r=s.priority}})),n},e.prototype.makePreloginKey=function(e,t){return i(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:t=t.trim().toLowerCase(),n=null,r=null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.apiService.postPrelogin(new p.PreloginRequest(t))];case 2:return null!=(i=o.sent())&&(n=i.kdf,r=i.kdfIterations),[3,4];case 3:if(null==(a=o.sent())||404!==a.statusCode)throw a;return[3,4];case 4:return[2,this.cryptoService.makeKey(e,t,n,r)]}}))}))},e.prototype.authingWithApiKey=function(){return null!=this.clientId&&null!=this.clientSecret},e.prototype.authingWithSso=function(){return null!=this.code&&null!=this.codeVerifier&&null!=this.ssoRedirectUrl},e.prototype.authingWithPassword=function(){return null!=this.email&&null!=this.masterPasswordHash},e.prototype.logInHelper=function(e,t,n,r,p,d,m,h,f,v,y){return i(this,void 0,void 0,(function(){var i,g,x,b,S,w,C,I,E,P,k,_,A;return o(this,(function(o){switch(o.label){case 0:return[4,this.tokenService.getTwoFactorToken(e)];case 1:return i=o.sent(),[4,this.appIdService.getAppId()];case 2:return g=o.sent(),x=new l.DeviceRequest(g,this.platformUtilsService),b=[],S=[],w=[],b=null!=e&&null!=t?[e,t]:null,S=null!=n&&null!=r&&null!=p?[n,r,p]:null,w=null!=d&&null!=m?[d,m]:null,C=null!=v&&null!=f?new u.TokenRequest(b,S,w,f,v,y,x):null!=i?new u.TokenRequest(b,S,w,a.TwoFactorProviderType.Remember,i,!1,x):new u.TokenRequest(b,S,w,null,null,!1,x),[4,this.apiService.postIdentityToken(C)];case 3:return I=o.sent(),this.clearState(),(E=new s.AuthResult).twoFactor=!I.accessToken,E.twoFactor?(P=I,this.email=e,this.masterPasswordHash=t,this.code=n,this.codeVerifier=r,this.ssoRedirectUrl=p,this.clientId=d,this.clientSecret=m,this.key=this.setCryptoKeys?h:null,this.twoFactorProvidersData=P.twoFactorProviders2,E.twoFactorProviders=P.twoFactorProviders2,[2,E]):(k=I,E.resetMasterPassword=k.resetMasterPassword,null==k.twoFactorToken?[3,5]:[4,this.tokenService.setTwoFactorToken(k.twoFactorToken,e)]);case 4:o.sent(),o.label=5;case 5:return[4,this.tokenService.setTokens(k.accessToken,k.refreshToken)];case 6:return o.sent(),[4,this.userService.setInformation(this.tokenService.getUserId(),this.tokenService.getEmail(),k.kdf,k.kdfIterations)];case 7:return o.sent(),this.setCryptoKeys?null==h?[3,9]:[4,this.cryptoService.setKey(h)]:[3,19];case 8:o.sent(),o.label=9;case 9:return null==t?[3,11]:[4,this.cryptoService.setKeyHash(t)];case 10:o.sent(),o.label=11;case 11:return null!=n&&null==k.key?[3,19]:[4,this.cryptoService.setEncKey(k.key)];case 12:if(o.sent(),null!=k.privateKey)return[3,17];o.label=13;case 13:return o.trys.push([13,16,,17]),[4,this.cryptoService.makeKeyPair()];case 14:return _=o.sent(),[4,this.apiService.postAccountKeys(new c.KeysRequest(_[0],_[1].encryptedString))];case 15:return o.sent(),k.privateKey=_[1].encryptedString,[3,17];case 16:return A=o.sent(),this.logService.error(A),[3,17];case 17:return[4,this.cryptoService.setEncPrivateKey(k.privateKey)];case 18:o.sent(),o.label=19;case 19:return null!=this.vaultTimeoutService&&(this.vaultTimeoutService.biometricLocked=!1),this.messagingService.send("loggedIn"),[2,E]}}))}))},e.prototype.clearState=function(){this.key=null,this.email=null,this.masterPasswordHash=null,this.code=null,this.codeVerifier=null,this.ssoRedirectUrl=null,this.clientId=null,this.clientSecret=null,this.twoFactorProvidersData=null,this.selectedTwoFactorProviderType=null},e}();t.AuthService=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){this.id=e,this.readOnly=t,this.hidePasswords=n};t.SelectionReadOnlyRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Android=0]="Android",e[e.iOS=1]="iOS",e[e.ChromeExtension=2]="ChromeExtension",e[e.FirefoxExtension=3]="FirefoxExtension",e[e.OperaExtension=4]="OperaExtension",e[e.EdgeExtension=5]="EdgeExtension",e[e.WindowsDesktop=6]="WindowsDesktop",e[e.MacOsDesktop=7]="MacOsDesktop",e[e.LinuxDesktop=8]="LinuxDesktop",e[e.ChromeBrowser=9]="ChromeBrowser",e[e.FirefoxBrowser=10]="FirefoxBrowser",e[e.OperaBrowser=11]="OperaBrowser",e[e.EdgeBrowser=12]="EdgeBrowser",e[e.IEBrowser=13]="IEBrowser",e[e.UnknownBrowser=14]="UnknownBrowser",e[e.AndroidAmazon=15]="AndroidAmazon",e[e.UWP=16]="UWP",e[e.SafariBrowser=17]="SafariBrowser",e[e.VivaldiBrowser=18]="VivaldiBrowser",e[e.VivaldiExtension=19]="VivaldiExtension",e[e.SafariExtension=20]="SafariExtension"}(t.DeviceType||(t.DeviceType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.SettingsService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Free=0]="Free",e[e.FamiliesAnnually2019=1]="FamiliesAnnually2019",e[e.TeamsMonthly2019=2]="TeamsMonthly2019",e[e.TeamsAnnually2019=3]="TeamsAnnually2019",e[e.EnterpriseMonthly2019=4]="EnterpriseMonthly2019",e[e.EnterpriseAnnually2019=5]="EnterpriseAnnually2019",e[e.Custom=6]="Custom",e[e.FamiliesAnnually=7]="FamiliesAnnually",e[e.TeamsMonthly=8]="TeamsMonthly",e[e.TeamsAnnually=9]="TeamsAnnually",e[e.EnterpriseMonthly=10]="EnterpriseMonthly",e[e.EnterpriseAnnually=11]="EnterpriseAnnually"}(t.PlanType||(t.PlanType={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(9),n(255)),s=(n(6),n(18),n(3),n(5),n(43),n(61),n(7),n(117)),l=n(142),c=n(157),p=n(251),u=n(282),d=n(141),m=n(475),h=n(868),f=n(869),v=n(0),y=n(6),g=n(3),x=n(9),b=n(5),S=n(18),w=n(8),C=n(61),I=n(43),E=n(7),P=n(4),k=n(13),_=n(16),A=n(142),O=n(117),T=n(24),M=n(10);function B(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",2),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",3),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n"),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function D(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"p"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"form",4,5),v.ɵɵlistener("ngSubmit",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext().submit()})),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"div",6),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"label",7),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(14,"\n "),v.ɵɵelement(15,"input",8),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"small",9),v.ɵɵtext(18),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementStart(22,"button",10),v.ɵɵtext(23,"\n "),v.ɵɵelement(24,"i",11),v.ɵɵpipe(25,"i18n"),v.ɵɵtext(26,"\n "),v.ɵɵelementStart(27,"span"),v.ɵɵtext(28),v.ɵɵpipe(29,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(30,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n"),v.ɵɵelementContainerEnd()}if(2&e){var r=v.ɵɵreference(7),i=v.ɵɵnextContext();v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,7,"uploadLicenseFileOrg")),v.ɵɵadvance(3),v.ɵɵproperty("appApiAction",i.formPromise),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(13,9,"licenseFile")),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(19,11,"licenseFileDesc","bitwarden_organization_license.json")),v.ɵɵadvance(4),v.ɵɵproperty("disabled",r.loading),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(25,14,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(29,16,"submit"))}}function R(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",21),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",22),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",23),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",24),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).name=e})),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"div",22),v.ɵɵtext(12,"\n "),v.ɵɵelementStart(13,"label",25),v.ɵɵtext(14),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"input",26),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).billingEmail=e})),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(19,"\n "),v.ɵɵelementEnd()}if(2&e){var r=v.ɵɵnextContext(2);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,4,"organizationName")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",r.name),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(15,6,"billingEmail")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",r.billingEmail)}}function V(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",21),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",22),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",27),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",28),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).businessName=e})),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd()}if(2&e){var r=v.ɵɵnextContext(2);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,2,"businessName")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",r.businessName)}}function j(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"onPremHostingOptional"),""))}function F(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"includeSsoAuthentication"),""))}function U(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"includeEnterprisePolicies"),""))}function N(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"xDayFreeTrial",n.trialPeriodDays),"\n ")}}function z(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"small"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵtemplate(6,j,3,3,"small",0),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,F,3,3,"small",0),v.ɵɵtext(9,"\n "),v.ɵɵtemplate(10,U,3,3,"small",0),v.ɵɵtext(11,"\n "),v.ɵɵtemplate(12,N,3,4,"small",0),v.ɵɵtext(13,"\n "),v.ɵɵelementContainerEnd()),2&e){var n=v.ɵɵnextContext().$implicit,r=v.ɵɵnextContext(2);v.ɵɵadvance(3),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(4,5,"includeAllTeamsFeatures"),""),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",n.hasSelfHost),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasSso),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasPolicies),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.trialPeriodDays&&r.createOrganization)}}function L(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"limitedUsers",n.maxUsers),"")}}function G(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"addShareLimitedUsers",n.maxUsers),"")}}function K(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind1(2,1,"addShareUnlimitedUsers"),""))}function q(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"limitedCollections",n.maxCollections),"")}}function W(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"addShareLimitedUsers",n.maxAdditionalSeats),"")}}function H(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"createUnlimitedCollections"),""))}function $(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"gbEncryptedFileStorage",n.baseStorageGb+"GB"),"")}}function Y(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"controlAccessWithGroups"),""))}function Q(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"trackAuditLogs"),""))}function J(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"syncUsersFromDirectory"),""))}function X(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"onPremHostingOptional"),""))}function Z(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"usersGetPremium"),""))}function ee(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind1(2,1,"priorityCustomerSupport"),""))}function te(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"xDayFreeTrial",n.trialPeriodDays),"\n ")}}function ne(e,t){if(1&e&&(v.ɵɵtext(0,"\n "),v.ɵɵtemplate(1,L,3,4,"small",0),v.ɵɵtext(2,"\n "),v.ɵɵtemplate(3,G,3,4,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,K,3,3,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,q,3,4,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,W,3,4,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,H,3,3,"small",0),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,$,3,4,"small",0),v.ɵɵtext(14,"\n "),v.ɵɵtemplate(15,Y,3,3,"small",0),v.ɵɵtext(16,"\n "),v.ɵɵtemplate(17,Q,3,3,"small",0),v.ɵɵtext(18,"\n "),v.ɵɵtemplate(19,J,3,3,"small",0),v.ɵɵtext(20,"\n "),v.ɵɵtemplate(21,X,3,3,"small",0),v.ɵɵtext(22,"\n "),v.ɵɵtemplate(23,Z,3,3,"small",0),v.ɵɵtext(24,"\n "),v.ɵɵtemplate(25,ee,3,3,"small",0),v.ɵɵtext(26,"\n "),v.ɵɵtemplate(27,te,3,4,"small",0),v.ɵɵtext(28,"\n ")),2&e){var n=v.ɵɵnextContext().$implicit,r=v.ɵɵnextContext(2);v.ɵɵadvance(1),v.ɵɵproperty("ngIf",n.product==r.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.product!=r.productTypes.Free&&n.maxUsers),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!n.maxUsers),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.maxCollections),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.maxAdditionalSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!n.maxCollections),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.baseStorageGb),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasGroups),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasApi),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasDirectory),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasSelfHost),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.usersGetPremium),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.product!=r.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.trialPeriodDays&&r.createOrganization)}}function re(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵelementContainerEnd()),2&e){var n=v.ɵɵnextContext(3).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind1(2,3,"additionalUsers").toLowerCase(),"\n ",v.ɵɵpipeBind2(3,5,n.seatPrice/12,"$")," /",v.ɵɵpipeBind1(4,8,"month"),"\n ")}}function ie(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"currency"),v.ɵɵpipe(3,"i18n"),v.ɵɵpipe(4,"i18n"),v.ɵɵtemplate(5,re,5,10,"ng-container",0),v.ɵɵtext(6,"\n "),v.ɵɵelementContainerEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind2(2,4,n.basePrice/12,"$")," /",v.ɵɵpipeBind1(3,7,"month"),",\n ",v.ɵɵpipeBind2(4,9,"includesXUsers",n.baseSeats),"\n "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",n.hasAdditionalSeatsOption)}}function oe(e,t){if(1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,ie,7,12,"ng-container",0),v.ɵɵtext(3,"\n "),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext().$implicit;v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.basePrice)}}function ae(e,t){if(1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext().$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind2(2,2,"costPerUser",v.ɵɵpipeBind2(3,5,n.seatPrice/12,"$"))," /",v.ɵɵpipeBind1(4,8,"month"),"\n ")}}function se(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"freeForever")))}function le(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",29),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"input",30),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).product=e}))("change",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).changedProduct()})),v.ɵɵelementEnd(),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",31),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementStart(7,"small",32),v.ɵɵtext(8),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,z,14,7,"ng-container",33),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,ne,29,14,"ng-template",null,34,v.ɵɵtemplateRefExtractor),v.ɵɵtext(15,"\n "),v.ɵɵtemplate(16,oe,4,1,"span",0),v.ɵɵtext(17,"\n "),v.ɵɵtemplate(18,ae,5,10,"span",0),v.ɵɵtext(19,"\n "),v.ɵɵtemplate(20,se,3,3,"span",0),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=v.ɵɵreference(14),o=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("id","product",r.product,""),v.ɵɵproperty("value",r.product)("ngModel",o.product),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("for","product",r.product,""),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,11,r.nameLocalizationKey),"\n "),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(9,13,r.descriptionLocalizationKey,"1")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",r.product===o.productTypes.Enterprise)("ngIfElse",i),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",r.product!=o.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!r.basePrice&&r.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.product==o.productTypes.Free)}}function ce(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"h2",12),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"div",21),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",50),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"label",51),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"input",52),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(3).additionalSeats=e})),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"small",37),v.ɵɵtext(18),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementContainerEnd()}if(2&e){var r=v.ɵɵnextContext(3);v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,5,"users")),v.ɵɵadvance(8),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,7,"userSeats")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(15,9,"userSeatsDesc")),v.ɵɵproperty("ngModel",r.additionalSeats),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(19,11,"userSeatsHowManyDesc"))}}function pe(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",21),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",22),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",51),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",53),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(3).additionalSeats=e})),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"small",37),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵpipe(14,"currency"),v.ɵɵelementEnd(),v.ɵɵtext(15,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd()}if(2&e){var r=v.ɵɵnextContext(3);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,4,"additionalUserSeats")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(9,6,"userSeatsDesc")),v.ɵɵproperty("ngModel",r.additionalSeats),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind3(13,8,"userSeatsAdditionalDesc",r.selectedPlan.baseSeats,v.ɵɵpipeBind2(14,12,r.seatPriceMonthly(r.selectedPlan),"$")))}}function ue(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",22),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",54),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"input",55),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(3).premiumAccessAddon=e})),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"label",56),v.ɵɵtext(7),v.ɵɵpipe(8,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"small",37),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵpipe(14,"currency"),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd()}if(2&e){var r=v.ɵɵnextContext(3);v.ɵɵadvance(4),v.ɵɵproperty("ngModel",r.premiumAccessAddon),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(8,3,"premiumAccess")),v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind3(13,5,"premiumAccessDesc",v.ɵɵpipeBind2(14,9,3.33,"$"),v.ɵɵpipeBind1(15,12,"month")))}}function de(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"basePrice"),": ",v.ɵɵpipeBind2(3,7,n.basePrice/12,"$")," × 12\n ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n ",v.ɵɵpipeBind2(5,12,n.basePrice,"$"),"\n /",v.ɵɵpipeBind1(6,15,"year"),"\n ")}}function me(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"additionalUsers"),":"))}function he(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"users"),":"))}function fe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,me,3,3,"span",0),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,he,3,3,"span",0),v.ɵɵtext(5),v.ɵɵpipe(6,"currency"),v.ɵɵpipe(7,"i18n"),v.ɵɵpipe(8,"currency"),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit,r=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.baseSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!n.baseSeats),v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",r.additionalSeats||0," × ",v.ɵɵpipeBind2(6,7,n.seatPrice/12,"$")," × 12\n ",v.ɵɵpipeBind1(7,10,"monthAbbr")," = ",v.ɵɵpipeBind2(8,12,r.seatTotal(n),"$")," /",v.ɵɵpipeBind1(9,15,"year"),"\n ")}}function ve(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit,r=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate6("\n ",v.ɵɵpipeBind1(2,6,"additionalStorageGb"),": ",r.additionalStorage||0," ×\n ",v.ɵɵpipeBind2(3,8,n.additionalStoragePricePerGb/12,"$")," × 12 ",v.ɵɵpipeBind1(4,11,"monthAbbr")," = ",v.ɵɵpipeBind2(5,13,r.additionalStorageTotal(n),"$"),"\n /",v.ɵɵpipeBind1(6,16,"year"),"\n ")}}function ye(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"premiumAccess"),":\n ",v.ɵɵpipeBind2(3,7,n.premiumAccessOptionCost/12,"$")," × 12 ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n ",v.ɵɵpipeBind2(5,12,40,"$"),"\n /",v.ɵɵpipeBind1(6,15,"year"),"\n ")}}function ge(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵtemplate(3,de,7,17,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,fe,10,17,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,ve,7,18,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,ye,7,17,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵelementContainerEnd()),2&e){var n=v.ɵɵnextContext().$implicit,r=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,5,"annually"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.basePrice),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasAdditionalStorageOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasPremiumAccessOption&&r.premiumAccessAddon)}}function xe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"basePrice"),": ",v.ɵɵpipeBind2(3,7,n.basePrice,"$")," ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n ",v.ɵɵpipeBind2(5,12,n.basePrice,"$"),"\n /",v.ɵɵpipeBind1(6,15,"month"),"\n ")}}function be(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"additionalUsers"),":"))}function Se(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"users"),":"))}function we(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,be,3,3,"span",0),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,Se,3,3,"span",0),v.ɵɵtext(5),v.ɵɵpipe(6,"currency"),v.ɵɵpipe(7,"i18n"),v.ɵɵpipe(8,"currency"),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit,r=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.baseSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!n.baseSeats),v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",r.additionalSeats||0," × ",v.ɵɵpipeBind2(6,7,n.seatPrice,"$"),"\n ",v.ɵɵpipeBind1(7,10,"monthAbbr")," = ",v.ɵɵpipeBind2(8,12,r.seatTotal(n),"$")," /",v.ɵɵpipeBind1(9,15,"month"),"\n ")}}function Ce(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit,r=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate6("\n ",v.ɵɵpipeBind1(2,6,"additionalStorageGb"),": ",r.additionalStorage||0," ×\n ",v.ɵɵpipeBind2(3,8,n.additionalStoragePricePerGb,"$")," ",v.ɵɵpipeBind1(4,11,"monthAbbr")," = ",v.ɵɵpipeBind2(5,13,r.additionalStorageTotal(n),"$"),"\n /",v.ɵɵpipeBind1(6,16,"month"),"\n ")}}function Ie(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"premiumAccess"),":\n ",v.ɵɵpipeBind2(3,7,n.premiumAccessOptionCost,"$")," ",v.ɵɵpipeBind1(4,10,"monthAbbr")," =\n ",v.ɵɵpipeBind2(5,12,40,"$"),"\n /",v.ɵɵpipeBind1(6,15,"month"),"\n ")}}function Ee(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵtemplate(3,xe,7,17,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,we,10,17,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,Ce,7,18,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,Ie,7,17,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵelementContainerEnd()),2&e){var n=v.ɵɵnextContext().$implicit,r=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,5,"monthly"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.basePrice),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasAdditionalStorageOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.hasPremiumAccessOption&&r.premiumAccessAddon)}}function Pe(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",29),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"input",57),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(3).plan=e})),v.ɵɵelementEnd(),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",31),v.ɵɵtext(5,"\n "),v.ɵɵtemplate(6,ge,11,7,"ng-container",0),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,Ee,11,7,"ng-container",0),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("id","interval",r.type,""),v.ɵɵproperty("value",r.type)("ngModel",i.plan),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("for","interval",r.type,""),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.isAnnual),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!r.isAnnual)}}function ke(e,t){1&e&&v.ɵɵelement(0,"app-payment",58),2&e&&v.ɵɵproperty("hideCredit",!0)}function _e(e,t){if(1&e&&(v.ɵɵelementStart(0,"small",59),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind2(2,1,"paymentChargedWithTrial",v.ɵɵpipeBind1(3,4,n.selectedPlanInterval)),"\n ")}}function Ae(e,t){if(1&e&&(v.ɵɵtext(0,"\n "),v.ɵɵelementStart(1,"small",60),v.ɵɵtext(2),v.ɵɵpipe(3,"i18n"),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n ")),2&e){var n=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind2(3,1,"paymentCharged",v.ɵɵpipeBind1(4,4,n.selectedPlanInterval)),"\n ")}}function Oe(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"app-payment",61),v.ɵɵtext(3,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵproperty("showMethods",!1))}function Te(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,ce,23,13,"ng-container",0),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"h2",12),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,pe,17,15,"div",13),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"div",21),v.ɵɵtext(11,"\n "),v.ɵɵelementStart(12,"div",22),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"label",35),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementStart(18,"input",36),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).additionalStorage=e})),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementStart(21,"small",37),v.ɵɵtext(22),v.ɵɵpipe(23,"i18n"),v.ɵɵpipe(24,"currency"),v.ɵɵpipe(25,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(26,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(27,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(28,"\n "),v.ɵɵelementStart(29,"div",21),v.ɵɵtext(30,"\n "),v.ɵɵtemplate(31,ue,17,14,"div",38),v.ɵɵtext(32,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(33,"\n "),v.ɵɵelementStart(34,"h2",39),v.ɵɵtext(35),v.ɵɵpipe(36,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(37,"\n "),v.ɵɵtemplate(38,Pe,11,6,"div",17),v.ɵɵtext(39,"\n "),v.ɵɵelement(40,"hr",40),v.ɵɵtext(41,"\n "),v.ɵɵelementStart(42,"h2",41),v.ɵɵtext(43),v.ɵɵpipe(44,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(45,"\n "),v.ɵɵtemplate(46,ke,1,1,"app-payment",42),v.ɵɵtext(47,"\n "),v.ɵɵelementStart(48,"app-tax-info",43),v.ɵɵlistener("onCountryChanged",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).changedCountry()})),v.ɵɵelementEnd(),v.ɵɵtext(49,"\n "),v.ɵɵelementStart(50,"div",44),v.ɵɵtext(51,"\n "),v.ɵɵelementStart(52,"div",45),v.ɵɵtext(53),v.ɵɵpipe(54,"i18n"),v.ɵɵpipe(55,"currency"),v.ɵɵelement(56,"br"),v.ɵɵtext(57,"\n "),v.ɵɵelementContainerStart(58),v.ɵɵtext(59),v.ɵɵpipe(60,"i18n"),v.ɵɵpipe(61,"currency"),v.ɵɵelementContainerEnd(),v.ɵɵtext(62,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(63,"\n "),v.ɵɵelement(64,"hr",46),v.ɵɵtext(65,"\n "),v.ɵɵelementStart(66,"p",47),v.ɵɵelementStart(67,"strong"),v.ɵɵtext(68),v.ɵɵpipe(69,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(70),v.ɵɵpipe(71,"currency"),v.ɵɵpipe(72,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(73,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(74,"\n "),v.ɵɵtemplate(75,_e,4,6,"small",48),v.ɵɵtext(76,"\n "),v.ɵɵtemplate(77,Ae,6,6,"ng-template",null,49,v.ɵɵtemplateRefExtractor),v.ɵɵtext(79,"\n "),v.ɵɵtemplate(80,Oe,4,1,"ng-container",0),v.ɵɵtext(81,"\n "),v.ɵɵelementEnd()}if(2&e){var r=v.ɵɵreference(78),i=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",i.selectedPlan.hasAdditionalSeatsOption&&!i.selectedPlan.baseSeats),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,22,"addons")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",i.selectedPlan.hasAdditionalSeatsOption&&i.selectedPlan.baseSeats),v.ɵɵadvance(7),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(16,24,"additionalStorageGb")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(19,26,"additionalStorageGbDesc")),v.ɵɵproperty("ngModel",i.additionalStorage),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind4(23,28,"additionalStorageIntervalDesc","1 GB",v.ɵɵpipeBind2(24,33,i.additionalStoragePriceMonthly(i.selectedPlan),"$"),v.ɵɵpipeBind1(25,36,"month"))),v.ɵɵadvance(9),v.ɵɵproperty("ngIf",i.selectedPlan.hasPremiumAccessOption),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(36,38,"summary")),v.ɵɵadvance(3),v.ɵɵproperty("ngForOf",i.selectablePlans),v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(44,40,i.createOrganization?"paymentInformation":"billingInformation")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",i.createOrganization),v.ɵɵadvance(7),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind1(54,42,"planPrice"),": ",v.ɵɵpipeBind2(55,44,i.subtotal,"USD $"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind1(60,47,"estimatedTax"),": ",v.ɵɵpipeBind2(61,49,i.taxCharges,"USD $"),"\n "),v.ɵɵadvance(9),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(69,52,"total"),":"),v.ɵɵadvance(2),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind2(71,54,i.total,"USD $"),"/",v.ɵɵpipeBind1(72,57,i.selectedPlanInterval),""),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",i.freeTrial&&i.createOrganization)("ngIfElse",r),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",!i.createOrganization)}}function Me(e,t){1&e&&(v.ɵɵelementStart(0,"div",19),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"app-callout",62),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵproperty("type","error"),v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,2,"singleOrgBlockCreateMessage")))}function Be(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"button",63),v.ɵɵlistener("click",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).cancel()})),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,1,"cancel"),"\n "))}function De(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"form",4,5),v.ɵɵlistener("ngSubmit",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext().submit()})),v.ɵɵtext(2,"\n "),v.ɵɵelementStart(3,"h2",12),v.ɵɵtext(4),v.ɵɵpipe(5,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,R,20,8,"div",13),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"div",14),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"input",15),v.ɵɵlistener("ngModelChange",(function(e){return v.ɵɵrestoreView(n),v.ɵɵnextContext().ownedBusiness=e}))("change",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext().changedOwnedBusiness()})),v.ɵɵelementEnd(),v.ɵɵtext(12,"\n "),v.ɵɵelementStart(13,"label",16),v.ɵɵtext(14),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵtemplate(18,V,11,4,"div",13),v.ɵɵtext(19,"\n "),v.ɵɵelementStart(20,"h2",12),v.ɵɵtext(21),v.ɵɵpipe(22,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(23,"\n "),v.ɵɵtemplate(24,le,23,16,"div",17),v.ɵɵtext(25,"\n "),v.ɵɵtemplate(26,Te,82,59,"div",0),v.ɵɵtext(27,"\n "),v.ɵɵtemplate(28,Me,6,4,"div",18),v.ɵɵtext(29,"\n "),v.ɵɵelementStart(30,"div",19),v.ɵɵtext(31,"\n "),v.ɵɵelementStart(32,"button",10),v.ɵɵtext(33,"\n "),v.ɵɵelement(34,"i",11),v.ɵɵpipe(35,"i18n"),v.ɵɵtext(36,"\n "),v.ɵɵelementStart(37,"span"),v.ɵɵtext(38),v.ɵɵpipe(39,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(40,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(41,"\n "),v.ɵɵtemplate(42,Be,3,3,"button",20),v.ɵɵtext(43,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(44,"\n"),v.ɵɵelementEnd()}if(2&e){var r=v.ɵɵreference(1),i=v.ɵɵnextContext();v.ɵɵproperty("appApiAction",i.formPromise),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(5,14,"generalInformation")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",i.createOrganization),v.ɵɵadvance(4),v.ɵɵproperty("ngModel",i.ownedBusiness),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(15,16,"accountOwnedBusiness")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",i.ownedBusiness),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(22,18,"chooseYourPlan")),v.ɵɵadvance(3),v.ɵɵproperty("ngForOf",i.selectableProducts),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",i.product!==i.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",i.singleOrgPolicyBlock),v.ɵɵadvance(4),v.ɵɵproperty("disabled",r.loading),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(35,20,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(39,22,"submit")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",i.showCancel)}}var Re=function(){function e(e,t,n,r,i,a,s,l,c){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=i,this.router=a,this.syncService=s,this.policyService=l,this.userService=c,this.showFree=!0,this.showCancel=!1,this.product=m.ProductType.Free,this.plan=u.PlanType.Free,this.onSuccess=new o.EventEmitter,this.onCanceled=new o.EventEmitter,this.loading=!0,this.selfHosted=!1,this.ownedBusiness=!1,this.premiumAccessAddon=!1,this.additionalStorage=0,this.additionalSeats=0,this.productTypes=m.ProductType,this.singleOrgPolicyBlock=!1,this.freeTrial=!1,this.selfHosted=r.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.selfHosted?[3,2]:[4,this.apiService.getPlans()];case 1:e=t.sent(),this.plans=e.data,this.product!==m.ProductType.Enterprise&&this.product!==m.ProductType.Teams||(this.ownedBusiness=!0),t.label=2;case 2:return this.loading=!1,[2]}}))}))},Object.defineProperty(e.prototype,"createOrganization",{get:function(){return null==this.organizationId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedPlan",{get:function(){var e=this;return this.plans.find((function(t){return t.type===e.plan}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedPlanInterval",{get:function(){return this.selectedPlan.isAnnual?"year":"month"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectableProducts",{get:function(){var e=this,t=this.plans.filter((function(e){return e.type!==u.PlanType.Custom}));return this.ownedBusiness&&(t=t.filter((function(e){return e.canBeUsedByBusiness}))),this.showFree||(t=t.filter((function(e){return e.product!==m.ProductType.Free}))),t=t.filter((function(t){return!t.legacyYear&&!t.disabled&&(t.isAnnual||t.product===e.productTypes.Free)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectablePlans",{get:function(){var e=this;return this.plans.filter((function(t){return!t.legacyYear&&!t.disabled&&t.product===e.product}))},enumerable:!0,configurable:!0}),e.prototype.additionalStoragePriceMonthly=function(e){return e.isAnnual?e.additionalStoragePricePerGb/12:e.additionalStoragePricePerGb},e.prototype.seatPriceMonthly=function(e){return e.isAnnual?e.seatPrice/12:e.seatPrice},e.prototype.additionalStorageTotal=function(e){return e.hasAdditionalStorageOption?e.additionalStoragePricePerGb*Math.abs(this.additionalStorage||0):0},e.prototype.seatTotal=function(e){return e.hasAdditionalSeatsOption?e.seatPrice*Math.abs(this.additionalSeats||0):0},Object.defineProperty(e.prototype,"subtotal",{get:function(){var e=this.selectedPlan.basePrice;return this.selectedPlan.hasAdditionalSeatsOption&&this.additionalSeats&&(e+=this.seatTotal(this.selectedPlan)),this.selectedPlan.hasAdditionalStorageOption&&this.additionalStorage&&(e+=this.additionalStorageTotal(this.selectedPlan)),this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon&&(e+=this.selectedPlan.premiumAccessOptionPrice),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"taxCharges",{get:function(){return null!=this.taxComponent&&null!=this.taxComponent.taxRate?this.taxComponent.taxRate/100*this.subtotal:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.subtotal+this.taxCharges||0},enumerable:!0,configurable:!0}),e.prototype.changedProduct=function(){this.plan=this.selectablePlans[0].type,this.selectedPlan.hasPremiumAccessOption||(this.premiumAccessAddon=!1),this.selectedPlan.hasAdditionalStorageOption||(this.additionalStorage=0),this.selectedPlan.hasAdditionalSeatsOption?this.additionalSeats||this.selectedPlan.baseSeats||!this.selectedPlan.hasAdditionalSeatsOption||(this.additionalSeats=1):this.additionalSeats=0,this.freeTrial=null!=this.selectedPlan.trialPeriodDays},e.prototype.changedOwnedBusiness=function(){this.ownedBusiness&&!this.selectedPlan.canBeUsedByBusiness&&(this.product=m.ProductType.Teams,this.plan=u.PlanType.TeamsAnnually)},e.prototype.changedCountry=function(){this.paymentComponent.hideBank="US"!==this.taxComponent.taxInfo.country,this.paymentComponent.hideBank&&this.paymentComponent.method===a.PaymentMethodType.BankAccount&&(this.paymentComponent.method=a.PaymentMethodType.Card,this.paymentComponent.changeMethod())},e.prototype.cancel=function(){this.onCanceled.emit()},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,o,a,s,l=this;return i(this,(function(m){switch(m.label){case 0:return this.singleOrgPolicyBlock?[2]:[3,1];case 1:return[4,this.policyService.getAll(d.PolicyType.SingleOrg)];case 2:return e=m.sent(),[4,this.userService.getAllOrganizations()];case 3:if(t=m.sent(),n=e.filter((function(e){return e.enabled&&e.type===d.PolicyType.SingleOrg})).map((function(e){return e.organizationId})),this.singleOrgPolicyBlock=t.some((function(e){return e.type!==p.OrganizationUserType.Owner&&e.type!==p.OrganizationUserType.Admin&&e.status!==c.OrganizationUserStatusType.Invited&&n.includes(e.id)})),this.singleOrgPolicyBlock)return[2];m.label=4;case 4:if(o=null,this.createOrganization&&this.selfHosted&&(a=document.getElementById("file"),null==(o=a.files)||0===o.length))return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),[2];m.label=5;case 5:return m.trys.push([5,7,,8]),s=function(){return r(l,void 0,void 0,(function(){var e,t,n,r,a,s,l,c,p,d;return i(this,(function(i){switch(i.label){case 0:return e=null,this.createOrganization?(t=null,this.selfHosted||this.plan===u.PlanType.Free?[3,2]:[4,this.paymentComponent.createPaymentToken()]):[3,9];case 1:t=i.sent(),i.label=2;case 2:return[4,this.cryptoService.makeShareKey()];case 3:return n=i.sent(),r=n[0].encryptedString,[4,this.cryptoService.encrypt(this.i18nService.t("defaultCollection"),n[1])];case 4:return a=i.sent(),s=a.encryptedString,this.selfHosted?((l=new FormData).append("license",o[0]),l.append("key",r),l.append("collectionName",s),[4,this.apiService.postOrganizationLicense(l)]):[3,6];case 5:return c=i.sent(),e=c.id,[3,8];case 6:return(p=new h.OrganizationCreateRequest).key=r,p.collectionName=s,p.name=this.name,p.billingEmail=this.billingEmail,this.selectedPlan.type===u.PlanType.Free?p.planType=u.PlanType.Free:(p.paymentToken=t[0],p.paymentMethodType=t[1],p.businessName=this.ownedBusiness?this.businessName:null,p.additionalSeats=this.additionalSeats,p.additionalStorageGb=this.additionalStorage,p.premiumAccessAddon=this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon,p.planType=this.selectedPlan.type,p.billingAddressPostalCode=this.taxComponent.taxInfo.postalCode,p.billingAddressCountry=this.taxComponent.taxInfo.country,this.taxComponent.taxInfo.includeTaxId&&(p.taxIdNumber=this.taxComponent.taxInfo.taxId,p.billingAddressLine1=this.taxComponent.taxInfo.line1,p.billingAddressLine2=this.taxComponent.taxInfo.line2,p.billingAddressCity=this.taxComponent.taxInfo.city,p.billingAddressState=this.taxComponent.taxInfo.state)),[4,this.apiService.postOrganization(p)];case 7:c=i.sent(),e=c.id,i.label=8;case 8:return[3,13];case 9:return(p=new f.OrganizationUpgradeRequest).businessName=this.ownedBusiness?this.businessName:null,p.additionalSeats=this.additionalSeats,p.additionalStorageGb=this.additionalStorage,p.premiumAccessAddon=this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon,p.planType=this.selectedPlan.type,p.billingAddressCountry=this.taxComponent.taxInfo.country,p.billingAddressPostalCode=this.taxComponent.taxInfo.postalCode,[4,this.apiService.postOrganizationUpgrade(this.organizationId,p)];case 10:return(d=i.sent()).success||null==d.paymentIntentClientSecret?[3,12]:[4,this.paymentComponent.handleStripeCardPayment(d.paymentIntentClientSecret,null)];case 11:i.sent(),i.label=12;case 12:e=this.organizationId,i.label=13;case 13:return null==e?[3,16]:[4,this.apiService.refreshIdentityToken()];case 14:return i.sent(),[4,this.syncService.fullSync(!0)];case 15:i.sent(),this.createOrganization?this.toasterService.popAsync("success",this.i18nService.t("organizationCreated"),this.i18nService.t("organizationReadyToGo")):this.toasterService.popAsync("success",null,this.i18nService.t("organizationUpgraded")),this.router.navigate(["/organizations/"+e]),i.label=16;case 16:return[2]}}))}))},this.formPromise=s(),[4,this.formPromise];case 6:return m.sent(),this.onSuccess.emit(),[3,8];case 7:return m.sent(),[3,8];case 8:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(v.ɵɵdirectiveInject(y.ApiService),v.ɵɵdirectiveInject(g.I18nService),v.ɵɵdirectiveInject(x.ToasterService),v.ɵɵdirectiveInject(b.PlatformUtilsService),v.ɵɵdirectiveInject(S.CryptoService),v.ɵɵdirectiveInject(w.Router),v.ɵɵdirectiveInject(C.SyncService),v.ɵɵdirectiveInject(I.PolicyService),v.ɵɵdirectiveInject(E.UserService))},e.ɵcmp=v.ɵɵdefineComponent({type:e,selectors:[["app-organization-plans"]],viewQuery:function(e,t){var n;(1&e&&(v.ɵɵviewQuery(s.PaymentComponent,!0),v.ɵɵviewQuery(l.TaxInfoComponent,!0)),2&e)&&(v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.paymentComponent=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.taxComponent=n.first))},inputs:{organizationId:"organizationId",showFree:"showFree",showCancel:"showCancel",product:"product",plan:"plan"},outputs:{onSuccess:"onSuccess",onCanceled:"onCanceled"},decls:6,vars:3,consts:[[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"mt-5"],["class","row",4,"ngIf"],[1,"form-group","form-check"],["id","ownedBusiness","type","checkbox","name","OwnedBusiness",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","ownedBusiness",1,"form-check-label"],["class","form-check form-check-block",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"mt-4"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","businessName"],["id","businessName","type","text","name","BusinessName",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-check","form-check-block"],["type","radio","name","product",1,"form-check-input",3,"id","value","ngModel","ngModelChange","change"],[1,"form-check-label",3,"for"],[1,"mb-1"],[4,"ngIf","ngIfElse"],["fullFeatureList",""],["for","additionalStorage"],["id","additionalStorage","type","number","name","AdditionalStorageGb","min","0","max","99","step","1",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"text-muted","form-text"],["class","form-group col-6",4,"ngIf"],[1,"spaced-header"],[1,"my-3"],[1,"spaced-header","mb-4"],[3,"hideCredit",4,"ngIf"],[3,"onCountryChanged"],["id","price",1,"my-4"],[1,"text-muted","text-sm"],[1,"my-1","col-3","ml-0"],[1,"text-lg"],["class","text-muted font-italic",4,"ngIf","ngIfElse"],["paymentChargedImmediately",""],[1,"col-6"],["for","additionalSeats"],["id","additionalSeats","type","number","name","AdditionalSeats","min","1","max","100000","required","",1,"form-control",3,"ngModel","placeholder","ngModelChange"],["id","additionalSeats","type","number","name","AdditionalSeats","min","0","max","100000",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"form-check"],["id","premiumAccess","type","checkbox","name","PremiumAccessAddon",1,"form-check-input",3,"ngModel","ngModelChange"],["for","premiumAccess",1,"form-check-label","bold"],["type","radio","name","BillingInterval",1,"form-check-input",3,"id","value","ngModel","ngModelChange"],[3,"hideCredit"],[1,"text-muted","font-italic"],[1,"text-muted","font-italic","mt-2","d-block"],[3,"showMethods"],[3,"type"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){1&e&&(v.ɵɵtemplate(0,B,9,6,"ng-container",0),v.ɵɵtext(1,"\n"),v.ɵɵtemplate(2,D,33,18,"ng-container",0),v.ɵɵtext(3,"\n"),v.ɵɵtemplate(4,De,45,24,"form",1),v.ɵɵtext(5,"\n")),2&e&&(v.ɵɵproperty("ngIf",t.loading),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.createOrganization&&t.selfHosted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.loading&&!t.selfHosted&&t.plans))},directives:[P.NgIf,k.NgControlStatusGroup,k.NgForm,_.ApiActionDirective,k.CheckboxControlValueAccessor,k.NgControlStatus,k.NgModel,P.NgForOf,k.DefaultValueAccessor,k.RequiredValidator,k.RadioControlValueAccessor,k.NumberValueAccessor,A.TaxInfoComponent,O.PaymentComponent,T.CalloutComponent],pipes:[M.I18nPipe,P.CurrencyPipe],encapsulation:2}),e}();t.OrganizationPlansComponent=Re},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(277),i=n(30),o=function(e,t){if(null==e)throw new Error("Must provide key");if(null==t)if(32===e.byteLength)t=r.EncryptionType.AesCbc256_B64;else{if(64!==e.byteLength)throw new Error("Unable to determine encType.");t=r.EncryptionType.AesCbc256_HmacSha256_B64}if(this.key=e,this.encType=t,t===r.EncryptionType.AesCbc256_B64&&32===e.byteLength)this.encKey=e,this.macKey=null;else if(t===r.EncryptionType.AesCbc128_HmacSha256_B64&&32===e.byteLength)this.encKey=e.slice(0,16),this.macKey=e.slice(16,32);else{if(t!==r.EncryptionType.AesCbc256_HmacSha256_B64||64!==e.byteLength)throw new Error("Unsupported encType/key length.");this.encKey=e.slice(0,32),this.macKey=e.slice(32,64)}null!=this.key&&(this.keyB64=i.Utils.fromBufferToB64(this.key)),null!=this.encKey&&(this.encKeyB64=i.Utils.fromBufferToB64(this.encKey)),null!=this.macKey&&(this.macKeyB64=i.Utils.fromBufferToB64(this.macKey))};t.SymmetricCryptoKey=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(483),a=n(81),s=n(88),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},n,[]),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.CardView(this),{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},e,t)},t.prototype.toCardData=function(){var e=new o.CardData;return this.buildDataModel(this,e,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null}),e},t}(a.default);t.Card=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(484),a=n(81),s=n(209),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.type=t.type,r.buildDomainModel(r,t,{name:null,value:null},n,[])),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.FieldView(this),{name:null,value:null},e,t)},t.prototype.toFieldData=function(){var e=new o.FieldData;return this.buildDataModel(this,e,{name:null,value:null,type:null},["type"]),e},t}(a.default);t.Field=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(485),a=n(81),s=n(144),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},n,[]),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.IdentityView(this),{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},e,t)},t.prototype.toIdentityData=function(){var e=new o.IdentityData;return this.buildDataModel(this,e,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null}),e},t}(a.default);t.Identity=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(289),l=n(486),c=n(159),p=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.passwordRevisionDate=null!=t.passwordRevisionDate?new Date(t.passwordRevisionDate):null,r.buildDomainModel(r,t,{username:null,password:null,totp:null},n,[]),t.uris&&(r.uris=[],t.uris.forEach((function(e){r.uris.push(new s.LoginUri(e,n))})))),r}return i(t,e),t.prototype.decrypt=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.decryptObj(new c.LoginView(this),{username:null,password:null,totp:null},e,t)];case 1:if(n=o.sent(),null==this.uris)return[3,5];n.uris=[],r=0,o.label=2;case 2:return r<this.uris.length?[4,this.uris[r].decrypt(e,t)]:[3,5];case 3:i=o.sent(),n.uris.push(i),o.label=4;case 4:return r++,[3,2];case 5:return[2,n]}}))}))},t.prototype.toLoginData=function(){var e=new l.LoginData;return e.passwordRevisionDate=null!=this.passwordRevisionDate?this.passwordRevisionDate.toISOString():null,this.buildDataModel(this,e,{username:null,password:null,totp:null}),null!=this.uris&&this.uris.length>0&&(e.uris=[],this.uris.forEach((function(t){e.uris.push(t.toLoginUriData())}))),e},t}(n(81).default);t.Login=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(487),a=n(258),s=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.match=t.match,r.buildDomainModel(r,t,{uri:null},n,[])),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new a.LoginUriView(this),{uri:null},e,t)},t.prototype.toLoginUriData=function(){var e=new o.LoginUriData;return this.buildDataModel(this,e,{uri:null},["match"]),e},t}(n(81).default);t.LoginUri=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(488),a=n(81),s=n(94),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.type=t.type),r}return i(t,e),t.prototype.decrypt=function(e,t){return Promise.resolve(new s.SecureNoteView(this))},t.prototype.toSecureNoteData=function(){var e=new o.SecureNoteData;return e.type=this.type,e},t}(a.default);t.SecureNote=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(13),o=n(0),a=function(){function e(e,t){this.elementRef=e,this.renderer=t,this.trueValue=!0,this.falseValue=!1,this.propagateChange=function(e){}}return e.prototype.onHostChange=function(e){this.propagateChange(e.target.checked?this.trueValue:this.falseValue)},e.prototype.writeValue=function(e){e===this.trueValue?this.renderer.setProperty(this.elementRef.nativeElement,"checked",!0):this.renderer.setProperty(this.elementRef.nativeElement,"checked",!1)},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(o.ElementRef),o.ɵɵdirectiveInject(o.Renderer2))},e.ɵdir=o.ɵɵdefineDirective({type:e,selectors:[["input","type","checkbox","appTrueFalseValue",""]],hostBindings:function(e,t){1&e&&o.ɵɵlistener("change",(function(e){return t.onHostChange(e)}))},inputs:{trueValue:"trueValue",falseValue:"falseValue"},features:[o.ɵɵProvidersFeature([{provide:i.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((function(){return e})),multi:!0}])]}),e}();t.TrueFalseValueDirective=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.readOnly=n.getResponseProperty("ReadOnly"),n.hidePasswords=n.getResponseProperty("HidePasswords"),n}return i(t,e),t}(n(23).BaseResponse);t.SelectionReadOnlyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(619),s=function(e){function t(t){var n=e.call(this,t)||this;n.organizations=[],n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.emailVerified=n.getResponseProperty("EmailVerified"),n.masterPasswordHint=n.getResponseProperty("MasterPasswordHint"),n.premium=n.getResponseProperty("Premium"),n.culture=n.getResponseProperty("Culture"),n.twoFactorEnabled=n.getResponseProperty("TwoFactorEnabled"),n.key=n.getResponseProperty("Key"),n.privateKey=n.getResponseProperty("PrivateKey"),n.securityStamp=n.getResponseProperty("SecurityStamp");var r=n.getResponseProperty("Organizations");return null!=r&&(n.organizations=r.map((function(e){return new a.ProfileOrganizationResponse(e)}))),n}return i(t,e),t}(o.BaseResponse);t.ProfileResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(40),n(48),n(41),n(7),n(888)),s=n(0),l=n(40),c=n(48),p=n(41),u=n(7),d=n(17),m=n(13),h=n(65),f=n(4),v=n(37),y=n(10),g=function(e){return{active:e}};function x(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",8),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().selectFavorites()})),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",17),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(4,g,r.selectedFavorites)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(6,2,"favorites"),"\n ")}}function b(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",8),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().selectTrash()})),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",18),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(4,g,r.selectedTrash)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(6,2,"trash"),"\n ")}}function S(e,t){1&e&&(s.ɵɵelementStart(0,"p",19),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",20),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",21),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}var w=function(e,t){return{"fa-caret-right":e,"fa-caret-down":t}};function C(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"i",32),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).collapse(e.node)})),s.ɵɵpipe(1,"i18n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext().$implicit,i=s.ɵɵnextContext(4);s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"toggleCollapse")),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(4,w,i.isCollapsed(r.node),!i.isCollapsed(r.node)))}}function I(e,t){1&e&&s.ɵɵelement(0,"i",33)}function E(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).editFolder(e.node)})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",35),s.ɵɵtext(4,"\n "),s.ɵɵelementEnd()}2&e&&s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,1,"editFolder"))}function P(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementContainerEnd())}var k=function(e){return{$implicit:e}};function _(e,t){if(1&e&&(s.ɵɵelementStart(0,"ul",36),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,P,2,0,"ng-container",26),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit;s.ɵɵnextContext(2);var r=s.ɵɵreference(15);s.ɵɵadvance(2),s.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",s.ɵɵpureFunction1(2,k,n.children))}}function A(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",22),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,C,2,7,"i",28),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"a",8),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=t.$implicit;return s.ɵɵnextContext(4).selectFolder(e.node)})),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,I,1,0,"i",29),s.ɵɵtext(9),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵtemplate(11,E,5,3,"a",30),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,_,4,4,"ul",31),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=s.ɵɵnextContext(4);s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(6,g,i.selectedFolder&&r.node.id===i.selectedFolderId)),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",r.children.length),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",0===r.children.length),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("",r.node.name,"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.node.id),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",r.children.length&&!i.isCollapsed(r.node))}}function O(e,t){if(1&e&&(s.ɵɵtext(0,"\n "),s.ɵɵtemplate(1,A,16,8,"li",27),s.ɵɵtext(2,"\n ")),2&e){var n=t.$implicit;s.ɵɵadvance(1),s.ɵɵproperty("ngForOf",n)}}function T(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementContainerEnd())}function M(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3",22),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementStart(5,"a",23),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).addFolder()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",24),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"ul",6),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,O,3,1,"ng-template",null,25,s.ɵɵtemplateRefExtractor),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,T,2,0,"ng-container",26),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵreference(15),i=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,4,"folders"),"\n "),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,6,"addFolder")),s.ɵɵadvance(12),s.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",s.ɵɵpureFunction1(8,k,i.nestedFolders))}}function B(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"i",32),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).collapse(e.node)})),s.ɵɵpipe(1,"i18n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext().$implicit,i=s.ɵɵnextContext(4);s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"toggleCollapse")),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(4,w,i.isCollapsed(r.node),!i.isCollapsed(r.node)))}}function D(e,t){1&e&&s.ɵɵelement(0,"i",39)}function R(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementContainerEnd())}function V(e,t){if(1&e&&(s.ɵɵelementStart(0,"ul",36),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,R,2,0,"ng-container",26),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit;s.ɵɵnextContext(2);var r=s.ɵɵreference(9);s.ɵɵadvance(2),s.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",s.ɵɵpureFunction1(2,k,n.children))}}function j(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,B,2,7,"i",28),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"a",8),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=t.$implicit;return s.ɵɵnextContext(4).selectCollection(e.node)})),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,D,1,0,"i",38),s.ɵɵtext(7),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵtemplate(9,V,4,4,"ul",31),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=s.ɵɵnextContext(4);s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(5,g,r.node.id===i.selectedCollectionId)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.children.length),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",0===r.children.length),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("",r.node.name,"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.children.length&&!i.isCollapsed(r.node))}}function F(e,t){if(1&e&&(s.ɵɵtext(0,"\n "),s.ɵɵtemplate(1,j,11,7,"li",27),s.ɵɵtext(2,"\n ")),2&e){var n=t.$implicit;s.ɵɵadvance(1),s.ɵɵproperty("ngForOf",n)}}function U(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementContainerEnd())}function N(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"ul",6),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,F,3,1,"ng-template",null,37,s.ɵɵtemplateRefExtractor),s.ɵɵtext(10,"\n "),s.ɵɵtemplate(11,U,2,0,"ng-container",26),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵreference(9),r=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"collections")),s.ɵɵadvance(8),s.ɵɵproperty("ngTemplateOutlet",n)("ngTemplateOutletContext",s.ɵɵpureFunction1(5,k,r.nestedCollections))}}function z(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,M,20,10,"ng-container",16),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,N,14,7,"ng-container",16),s.ɵɵtext(5,"\n "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showFolders),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showCollections&&n.collections&&n.collections.length)}}var L=function(e){function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a.onSearchTextChanged=new o.EventEmitter,a.searchText="",a.searchPlaceholder=null,a}return i(t,e),t.prototype.searchTextChanged=function(){this.onSearchTextChanged.emit(this.searchText)},t.ɵfac=function(e){return new(e||t)(s.ɵɵdirectiveInject(l.CollectionService),s.ɵɵdirectiveInject(c.FolderService),s.ɵɵdirectiveInject(p.StorageService),s.ɵɵdirectiveInject(u.UserService))},t.ɵcmp=s.ɵɵdefineComponent({type:t,selectors:[["app-vault-groupings"]],outputs:{onSearchTextChanged:"onSearchTextChanged"},features:[s.ɵɵInheritDefinitionFeature],decls:82,vars:47,consts:[[1,"card","vault-filters"],[1,"card-header","d-flex"],["href","https://help.bitwarden.com/article/searching-vault/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"fa-ul","card-ul"],[3,"ngClass"],["href","#","appStopClick","",3,"click"],[1,"fa-li","fa","fa-fw","fa-th"],[3,"ngClass",4,"ngIf"],[1,"fa-li","fa","fa-fw","fa-globe"],[1,"fa-li","fa","fa-fw","fa-credit-card"],[1,"fa-li","fa","fa-fw","fa-id-card-o"],[1,"fa-li","fa","fa-fw","fa-sticky-note-o"],["class","text-muted",4,"ngIf"],[4,"ngIf"],[1,"fa-li","fa","fa-fw","fa-star"],[1,"fa-li","fa","fa-fw","fa-trash-o"],[1,"text-muted"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"sr-only"],[1,"d-flex"],["href","#","appStopClick","",1,"text-muted","ml-auto",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["recursiveFolders",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass",4,"ngFor","ngForOf"],["class","fa-li fa",3,"title","ngClass","click",4,"ngIf"],["class","fa-li fa fa-folder-o","aria-hidden","true",4,"ngIf"],["href","#","class","text-muted ml-auto show-active","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["class","fa-ul card-ul carets",4,"ngIf"],[1,"fa-li","fa",3,"title","ngClass","click"],["aria-hidden","true",1,"fa-li","fa","fa-folder-o"],["href","#","appStopClick","",1,"text-muted","ml-auto","show-active",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-pencil","fa-fw"],[1,"fa-ul","card-ul","carets"],["recursiveCollections",""],["class","fa-li fa fa-cube","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"fa-li","fa","fa-cube"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementStart(5,"a",2),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",3),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",4),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"input",5),s.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"ul",6),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"li",7),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"a",8),s.ɵɵlistener("click",(function(){return t.selectAll()})),s.ɵɵtext(22,"\n "),s.ɵɵelement(23,"i",9),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵtemplate(28,x,8,6,"li",10),s.ɵɵtext(29,"\n "),s.ɵɵtemplate(30,b,8,6,"li",10),s.ɵɵtext(31,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"h3"),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"ul",6),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"li",7),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Login)})),s.ɵɵtext(42,"\n "),s.ɵɵelement(43,"i",11),s.ɵɵtext(44),s.ɵɵpipe(45,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementStart(48,"li",7),s.ɵɵtext(49,"\n "),s.ɵɵelementStart(50,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Card)})),s.ɵɵtext(51,"\n "),s.ɵɵelement(52,"i",12),s.ɵɵtext(53),s.ɵɵpipe(54,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"li",7),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Identity)})),s.ɵɵtext(60,"\n "),s.ɵɵelement(61,"i",13),s.ɵɵtext(62),s.ɵɵpipe(63,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n "),s.ɵɵelementStart(66,"li",7),s.ɵɵtext(67,"\n "),s.ɵɵelementStart(68,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.SecureNote)})),s.ɵɵtext(69,"\n "),s.ɵɵelement(70,"i",14),s.ɵɵtext(71),s.ɵɵpipe(72,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(74,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵtemplate(76,S,9,6,"p",15),s.ɵɵtext(77,"\n "),s.ɵɵtemplate(78,z,6,2,"ng-container",16),s.ɵɵtext(79,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(80,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(81,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,19,"filters"),"\n "),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,21,"learnMore")),s.ɵɵadvance(9),s.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||s.ɵɵpipeBind1(15,23,"searchVault")),s.ɵɵproperty("ngModel",t.searchText),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(37,g,t.selectedAll)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(25,25,"allItems"),"\n "),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.showFavorites),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showTrash),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,27,"types")),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(39,g,t.selectedType===t.cipherType.Login)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(45,29,"typeLogin"),"\n "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(41,g,t.selectedType===t.cipherType.Card)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(54,31,"typeCard"),"\n "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(43,g,t.selectedType===t.cipherType.Identity)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(63,33,"typeIdentity"),"\n "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(45,g,t.selectedType===t.cipherType.SecureNote)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(72,35,"typeSecureNote"),"\n "),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.loaded))},directives:[d.A11yTitleDirective,m.DefaultValueAccessor,h.AutofocusDirective,m.NgControlStatus,m.NgModel,f.NgClass,v.StopClickDirective,f.NgIf,f.NgTemplateOutlet,f.NgForOf],pipes:[y.I18nPipe],encapsulation:2}),t}(a.GroupingsComponent);t.GroupingsComponent=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(157),i=n(251),o=function(){function e(e){null!=e&&(this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.usePolicies=e.usePolicies,this.useGroups=e.useGroups,this.useDirectory=e.useDirectory,this.useEvents=e.useEvents,this.useTotp=e.useTotp,this.use2fa=e.use2fa,this.useApi=e.useApi,this.useBusinessPortal=e.useBusinessPortal,this.useSso=e.useSso,this.selfHost=e.selfHost,this.usersGetPremium=e.usersGetPremium,this.seats=e.seats,this.maxCollections=e.maxCollections,this.maxStorageGb=e.maxStorageGb,this.ssoBound=e.ssoBound,this.identifier=e.identifier,this.permissions=e.permissions,this.resetPasswordKey=e.resetPasswordKey,this.userId=e.userId)}return Object.defineProperty(e.prototype,"canAccess",{get:function(){return this.type===i.OrganizationUserType.Owner||this.enabled&&this.status===r.OrganizationUserStatusType.Confirmed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isManager",{get:function(){return this.type===i.OrganizationUserType.Manager||this.type===i.OrganizationUserType.Owner||this.type===i.OrganizationUserType.Admin},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAdmin",{get:function(){return this.type===i.OrganizationUserType.Owner||this.type===i.OrganizationUserType.Admin},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOwner",{get:function(){return this.type===i.OrganizationUserType.Owner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canAccessBusinessPortal",{get:function(){return this.isAdmin||this.permissions.accessBusinessPortal},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canAccessEventLogs",{get:function(){return this.isAdmin||this.permissions.accessEventLogs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canAccessImportExport",{get:function(){return this.isAdmin||this.permissions.accessImportExport},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canAccessReports",{get:function(){return this.isAdmin||this.permissions.accessReports},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canManageAllCollections",{get:function(){return this.isAdmin||this.permissions.manageAllCollections},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canManageAssignedCollections",{get:function(){return this.isManager||this.permissions.manageAssignedCollections},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canManageGroups",{get:function(){return this.isAdmin||this.permissions.manageGroups},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canManageSso",{get:function(){return this.isAdmin||this.permissions.manageSso},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canManagePolicies",{get:function(){return this.isAdmin||this.permissions.managePolicies},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canManageUsers",{get:function(){return this.isAdmin||this.permissions.manageUsers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isResetPasswordEnrolled",{get:function(){return null!=this.resetPasswordKey},enumerable:!0,configurable:!0}),e}();t.Organization=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.id=null,this.size=null,this.sizeName=null,this.fileName=null,e&&(this.id=e.id,this.size=e.size,this.sizeName=e.sizeName)}return Object.defineProperty(e.prototype,"fileSize",{get:function(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0},enumerable:!0,configurable:!0}),e}();t.SendFileView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.text=null,e&&(this.hidden=e.hidden)}return Object.defineProperty(e.prototype,"maskedText",{get:function(){return null!=this.text?"••••••••":null},enumerable:!0,configurable:!0}),e}();t.SendTextView=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(18),n(3),n(5),n(61),n(7);var o=n(30),a=n(643),s=n(0),l=n(7),c=n(5),p=n(3),u=n(6),d=n(9),m=n(61),h=n(18),f=n(4),v=n(8),y=n(16),g=n(139),x=n(17),b=n(37),S=n(53),w=n(650),C=n(10);function I(e,t){1&e&&(s.ɵɵelementStart(0,"p",4),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",5),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function E(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",12),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"organizationIsDisabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"organizationIsDisabled")))}var P=function(e){return["/organizations",e]};function k(e,t){if(1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",10),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",11),s.ɵɵtext(5),s.ɵɵtemplate(6,E,9,6,"ng-container",0),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){var n=t.$implicit;s.ɵɵadvance(2),s.ɵɵproperty("routerLink",s.ɵɵpureFunction1(3,P,n.id)),s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",n.name,"\n "),s.ɵɵadvance(1),s.ɵɵproperty("ngIf",!n.enabled)}}function _(e,t){if(1&e&&(s.ɵɵelementStart(0,"ul",8),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,k,9,5,"li",9),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",n.organizations)}}function A(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noOrganizationsList")))}function O(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,_,4,1,"ul",7),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,A,3,3,"p",0),s.ɵɵtext(5,"\n "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.organizations&&n.organizations.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.organizations||!n.organizations.length)}}function T(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,I,9,6,"p",1),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,O,6,2,"ng-container",0),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"a",2),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",3),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n"),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.loaded),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,3,"newOrganization"),"\n ")}}function M(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",17),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function B(e,t){1&e&&(s.ɵɵelementStart(0,"a",18),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",3),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"newOrganization"),"\n "))}function D(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",17),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function R(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"a",20),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",3),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"noOrganizationsList")),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,4,"newOrganization"),"\n "))}function V(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",12),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"organizationIsDisabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"organizationIsDisabled")))}function j(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",33),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"enrolledPasswordReset")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"enrolledPasswordReset")))}function F(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).toggleResetPasswordEnrollment(e)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",35),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"enrollPasswordReset"),"\n "))}function U(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).toggleResetPasswordEnrollment(e)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",36),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"withdrawPasswordReset"),"\n "))}function N(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext(2).$implicit;return s.ɵɵnextContext(4).unlinkSso(e)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",39),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"unlinkSso"),"\n "))}function z(e,t){if(1&e&&(s.ɵɵtext(0,"\n "),s.ɵɵelementStart(1,"app-link-sso",40),s.ɵɵtext(2,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n ")),2&e){var n=s.ɵɵnextContext(2).$implicit;s.ɵɵadvance(1),s.ɵɵproperty("organization",n)}}function L(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,N,5,3,"a",37),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,z,4,1,"ng-template",null,38,s.ɵɵtemplateRefExtractor),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵreference(5),r=s.ɵɵnextContext().$implicit;s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.ssoBound)("ngIfElse",n)}}function G(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",22),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"app-avatar",23),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"td"),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"a",24),s.ɵɵtext(10),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,V,9,6,"ng-container",0),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,j,9,6,"ng-container",0),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"td",25),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",26),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"button",27),s.ɵɵpipe(22,"i18n"),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"i",28),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",29),s.ɵɵtext(28,"\n "),s.ɵɵtemplate(29,F,5,3,"a",30),s.ɵɵtext(30,"\n "),s.ɵɵtemplate(31,U,5,3,"a",30),s.ɵɵtext(32,"\n "),s.ɵɵtemplate(33,L,7,2,"ng-container",0),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"a",31),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=t.$implicit;return s.ɵɵnextContext(4).leave(e)})),s.ɵɵtext(36,"\n "),s.ɵɵelement(37,"i",32),s.ɵɵtext(38),s.ɵɵpipe(39,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=s.ɵɵnextContext(4);s.ɵɵadvance(4),s.ɵɵproperty("data",r.name)("circle",!0)("fontSize",14),s.ɵɵadvance(5),s.ɵɵproperty("routerLink",s.ɵɵpureFunction1(16,P,r.id)),s.ɵɵadvance(1),s.ɵɵtextInterpolate(r.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!r.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.isResetPasswordEnrolled),s.ɵɵadvance(7),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(22,12,"options")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",!r.isResetPasswordEnrolled&&i.resetPasswordFeatureFlag),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.isResetPasswordEnrolled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.useSso&&r.identifier),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(39,14,"leave"),"\n ")}}function K(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",21),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,G,44,18,"tr",9),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",n.organizations)}}function q(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,R,12,6,"ng-container",0),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,K,7,1,"table",19),s.ɵɵtext(5,"\n "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.organizations||!n.organizations.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.organizations&&n.organizations.length)}}function W(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",13),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"h1"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementStart(7,"small",14,15),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,M,9,6,"ng-container",0),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,B,5,3,"a",16),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,D,9,6,"ng-container",0),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,q,6,2,"ng-container",0),s.ɵɵtext(20,"\n"),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵreference(8),r=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(6,6,"organizations"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("appApiAction",r.actionPromise),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",n.loading),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!r.loaded||r.organizations&&r.organizations.length),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!r.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.loaded)}}var H=function(){function e(e,t,n,r,i,o,a){this.userService=e,this.platformUtilsService=t,this.i18nService=n,this.apiService=r,this.toasterService=i,this.syncService=o,this.cryptoService=a,this.vault=!1,this.loaded=!1,this.resetPasswordFeatureFlag=!1}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.vault?[3,3]:[4,this.syncService.fullSync(!0)];case 1:return e.sent(),[4,this.load()];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.userService.getAllOrganizations()];case 1:return(e=t.sent()).sort(o.Utils.getSortFunction(this.i18nService,"name")),this.organizations=e,this.loaded=!0,[2]}}))}))},e.prototype.unlinkSso=function(e){return r(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.platformUtilsService.showDialog("Are you sure you want to unlink SSO for this organization?",e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!n.sent())return[2,!1];n.label=2;case 2:return n.trys.push([2,5,,6]),this.actionPromise=this.apiService.deleteSsoUser(e.id).then((function(){return t.syncService.fullSync(!0)})),[4,this.actionPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,"Unlinked SSO"),[4,this.load()];case 4:return n.sent(),[3,6];case 5:return n.sent(),[3,6];case 6:return[2]}}))}))},e.prototype.leave=function(e){return r(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("leaveOrganizationConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!n.sent())return[2,!1];n.label=2;case 2:return n.trys.push([2,5,,6]),this.actionPromise=this.apiService.postLeaveOrganization(e.id).then((function(){return t.syncService.fullSync(!0)})),[4,this.actionPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("leftOrganization")),[4,this.load()];case 4:return n.sent(),[3,6];case 5:return n.sent(),[3,6];case 6:return[2]}}))}))},e.prototype.toggleResetPasswordEnrollment=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,s,l,c=this;return i(this,(function(i){switch(i.label){case 0:return this.resetPasswordFeatureFlag?(t=null,n="withdrawPasswordResetSuccess",e.isResetPasswordEnrolled?[3,4]:[4,this.cryptoService.getEncKey()]):[2];case 1:return r=i.sent(),[4,this.cryptoService.getOrgKey(e.id)];case 2:return o=i.sent(),[4,this.cryptoService.encrypt(r.key,o)];case 3:s=i.sent(),t=s.encryptedString,n="enrollPasswordResetSuccess",i.label=4;case 4:return i.trys.push([4,7,,8]),(l=new a.OrganizationUserResetPasswordEnrollmentRequest).resetPasswordKey=t,this.actionPromise=this.apiService.putOrganizationUserResetPasswordEnrollment(e.id,e.userId,l).then((function(){return c.syncService.fullSync(!0)})),[4,this.actionPromise];case 5:return i.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t(n)),[4,this.load()];case 6:return i.sent(),[3,8];case 7:return i.sent(),[3,8];case 8:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.UserService),s.ɵɵdirectiveInject(c.PlatformUtilsService),s.ɵɵdirectiveInject(p.I18nService),s.ɵɵdirectiveInject(u.ApiService),s.ɵɵdirectiveInject(d.ToasterService),s.ɵɵdirectiveInject(m.SyncService),s.ɵɵdirectiveInject(h.CryptoService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-organizations"]],inputs:{vault:"vault"},decls:4,vars:2,consts:[[4,"ngIf"],["class","text-muted",4,"ngIf"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-block","btn-outline-primary"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[1,"text-muted"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"sr-only"],["class","fa-ul card-ul carets",4,"ngIf"],[1,"fa-ul","card-ul","carets"],[4,"ngFor","ngForOf"],[1,"text-body",3,"routerLink"],["aria-hidden","true",1,"fa-li","fa","fa-caret-right"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","text-danger",3,"title"],[1,"page-header","d-flex"],[3,"appApiAction"],["action",""],["href","#","routerLink","/settings/create-organization","class","btn btn-sm btn-outline-primary ml-auto",4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-sm","btn-outline-primary","ml-auto"],["class","table table-hover table-list",4,"ngIf"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-outline-primary"],[1,"table","table-hover","table-list"],["width","30"],["size","25",3,"data","circle","fontSize"],["href","#",3,"routerLink"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-sign-out"],["appStopProp","","aria-hidden","true",1,"fa","fa-key",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-key"],["aria-hidden","true",1,"fa","fa-fw","fa-undo"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf","ngIfElse"],["linkSso",""],["aria-hidden","true",1,"fa","fa-fw","fa-chain-broken"],[3,"organization"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,T,12,5,"ng-container",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,W,21,8,"ng-container",0),s.ɵɵtext(3,"\n")),2&e&&(s.ɵɵproperty("ngIf",t.vault),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.vault))},directives:[f.NgIf,v.RouterLinkWithHref,f.NgForOf,y.ApiActionDirective,g.AvatarComponent,x.A11yTitleDirective,b.StopClickDirective,S.StopPropDirective,w.LinkSsoComponent],pipes:[C.I18nPipe],encapsulation:2}),e}();t.OrganizationsComponent=H},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(14),n(5),n(103);var o=n(0),a=n(14),s=n(5),l=n(103),c=n(4),p=n(8),u=n(17),d=n(53),m=n(139),h=n(10);function f(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",27),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"app-avatar",28),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",29),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"small",30),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("data",n.name)("email",n.email)("circle",!0),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"loggedInAs")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(n.name)}}var v=function(e){return{"bg-secondary-alt":e}},y=function(){function e(e,t,n){this.messagingService=e,this.platformUtilsService=t,this.tokenService=n,this.selfHosted=!1,this.selfHosted=this.platformUtilsService.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=this,[4,this.tokenService.getName()];case 1:return e.name=n.sent(),t=this,[4,this.tokenService.getEmail()];case 2:return t.email=n.sent(),null!=this.name&&""!==this.name.trim()||(this.name=this.email),[2]}}))}))},e.prototype.lock=function(){this.messagingService.send("lockVault")},e.prototype.logOut=function(){this.messagingService.send("logout")},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.MessagingService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.TokenService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-navbar"]],decls:96,vars:35,consts:[[1,"navbar","navbar-expand","navbar-dark","bg-primary",3,"ngClass"],[1,"container"],["routerLink","/",1,"navbar-brand",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-shield"],[1,"collapse","navbar-collapse"],[1,"navbar-nav"],["routerLinkActive","active",1,"nav-item"],["routerLink","/vault",1,"nav-link"],["routerLink","/sends",1,"nav-link"],["routerLink","/tools",1,"nav-link"],["routerLink","/settings",1,"nav-link"],[1,"navbar-nav","flex-row","ml-md-auto","d-none","d-md-flex"],[1,"nav-item","dropdown"],["href","#","id","nav-profile","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"nav-item","nav-link","dropdown-toggle"],["aria-hidden","true",1,"fa","fa-user-circle","fa-lg"],["aria-labelledby","nav-profile",1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item-text d-flex align-items-center","appStopProp","",4,"ngIf"],[1,"dropdown-divider"],["href","#","routerLink","/settings/account",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-user"],["href","https://help.bitwarden.com","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-question-circle"],["href","https://bitwarden.com/download/","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-download"],["type","button",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-lock"],["aria-hidden","true",1,"fa","fa-fw","fa-sign-out"],["appStopProp","",1,"dropdown-item-text","d-flex","align-items-center"],["size","25","fontSize","14",3,"data","email","circle"],[1,"ml-2","overflow-hidden"],[1,"text-muted"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"nav",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"a",2),o.ɵɵpipe(5,"i18n"),o.ɵɵtext(6,"\n "),o.ɵɵelement(7,"i",3),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"div",4),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"ul",5),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"li",6),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"a",7),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"li",6),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"a",8),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"li",6),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"a",9),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"li",6),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"a",10),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementStart(44,"ul",11),o.ɵɵtext(45,"\n "),o.ɵɵelementStart(46,"li",12),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"a",13),o.ɵɵtext(49,"\n "),o.ɵɵelement(50,"i",14),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelementStart(53,"div",15),o.ɵɵtext(54,"\n "),o.ɵɵtemplate(55,f,14,7,"div",16),o.ɵɵtext(56,"\n "),o.ɵɵelement(57,"div",17),o.ɵɵtext(58,"\n "),o.ɵɵelementStart(59,"a",18),o.ɵɵtext(60,"\n "),o.ɵɵelement(61,"i",19),o.ɵɵtext(62),o.ɵɵpipe(63,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementStart(65,"a",20),o.ɵɵtext(66,"\n "),o.ɵɵelement(67,"i",21),o.ɵɵtext(68),o.ɵɵpipe(69,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(70,"\n "),o.ɵɵelementStart(71,"a",22),o.ɵɵtext(72,"\n "),o.ɵɵelement(73,"i",23),o.ɵɵtext(74),o.ɵɵpipe(75,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(76,"\n "),o.ɵɵelement(77,"div",17),o.ɵɵtext(78,"\n "),o.ɵɵelementStart(79,"button",24),o.ɵɵlistener("click",(function(){return t.lock()})),o.ɵɵtext(80,"\n "),o.ɵɵelement(81,"i",25),o.ɵɵtext(82),o.ɵɵpipe(83,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(84,"\n "),o.ɵɵelementStart(85,"button",24),o.ɵɵlistener("click",(function(){return t.logOut()})),o.ɵɵtext(86,"\n "),o.ɵɵelement(87,"i",26),o.ɵɵtext(88),o.ɵɵpipe(89,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(90,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(91,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(92,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(93,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(94,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(95,"\n")),2&e&&(o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(33,v,t.selfHosted)),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind2(5,12,"pageTitle","Bitwarden")),o.ɵɵadvance(13),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(18,15,"myVault")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(25,17,"send")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,19,"tools")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(39,21,"settings")),o.ɵɵadvance(17),o.ɵɵproperty("ngIf",t.name),o.ɵɵadvance(7),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(63,23,"myAccount"),"\n "),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(69,25,"getHelp"),"\n "),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(75,27,"getApps"),"\n "),o.ɵɵadvance(8),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(83,29,"lockNow"),"\n "),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(89,31,"logOut"),"\n "))},directives:[c.NgClass,p.RouterLinkWithHref,u.A11yTitleDirective,p.RouterLinkActive,c.NgIf,d.StopPropDirective,m.AvatarComponent],pipes:[h.I18nPipe],encapsulation:2}),e}();t.NavbarComponent=y},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(5);var o=n(0),a=n(5),s=n(10),l=function(){function e(e){this.platformUtilsService=e,this.year="2015"}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.year=(new Date).getFullYear().toString(),e=this,[4,this.platformUtilsService.getApplicationVersion()];case 1:return e.version=t.sent(),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.PlatformUtilsService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-footer"]],decls:15,vars:5,consts:[[1,"container","footer","text-muted"],[1,"row"],[1,"col"],[1,"col","text-center"],[1,"col","text-right"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelement(7,"div",3),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"div",4),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n")),2&e&&(o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n © ",t.year,", Bitwarden Inc.\n "),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(11,2,"versionNumber",t.version),"\n "))},pipes:[s.I18nPipe],encapsulation:2}),e}();t.FooterComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.publicKey=e,this.encryptedPrivateKey=t};t.KeysRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this)||this;return null==t||(n.id=t.id,n.organizationId=t.organizationId,n.type=t.type,n.data=t.data,n.enabled=t.enabled),n}return i(t,e),t}(n(81).default);t.Policy=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.id=e.id,this.organizationId=e.organizationId,this.type=e.type,this.data=e.data,this.enabled=e.enabled};t.PolicyData=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(3),s=n(18),l=n(14),c=n(7),p=n(36),u=n(5),d=n(43),m=function(){function e(e,t,n,r,i,o,a){this.i18nService=e,this.cryptoService=t,this.messagingService=n,this.userService=r,this.passwordGenerationService=i,this.platformUtilsService=o,this.policyService=a}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=this,[4,this.userService.getEmail()];case 1:return e.email=n.sent(),t=this,[4,this.policyService.getMasterPasswordPolicyOptions()];case 2:return t.enforcedPolicyOptions=n.sent(),[2]}}))}))},e.prototype.getPasswordScoreAlertDisplay=function(){if(null==this.enforcedPolicyOptions)return"";var e;switch(this.enforcedPolicyOptions.minComplexity){case 4:e=this.i18nService.t("strong");break;case 3:e=this.i18nService.t("good");break;default:e=this.i18nService.t("weak")}return e+" ("+this.enforcedPolicyOptions.minComplexity+")"},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return[4,this.strongPassword()];case 1:return i.sent()?[4,this.setupSubmitActions()]:[2];case 2:return i.sent()?[4,this.userService.getEmail()]:[2];case 3:return e=i.sent(),null!=this.kdf?[3,5]:(t=this,[4,this.userService.getKdf()]);case 4:t.kdf=i.sent(),i.label=5;case 5:return null!=this.kdfIterations?[3,7]:(n=this,[4,this.userService.getKdfIterations()]);case 6:n.kdfIterations=i.sent(),i.label=7;case 7:return[4,this.cryptoService.makeKey(this.masterPassword,e.trim().toLowerCase(),this.kdf,this.kdfIterations)];case 8:return r=i.sent(),[4,this.cryptoService.hashPassword(this.masterPassword,r)];case 9:return o=i.sent(),a=null,[4,this.cryptoService.getEncKey()];case 10:return null!=i.sent()?[3,12]:[4,this.cryptoService.makeEncKey(r)];case 11:return a=i.sent(),[3,14];case 12:return[4,this.cryptoService.remakeEncKey(r)];case 13:a=i.sent(),i.label=14;case 14:return[4,this.performSubmitActions(o,r,a)];case 15:return i.sent(),[2]}}))}))},e.prototype.setupSubmitActions=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,!0]}))}))},e.prototype.performSubmitActions=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2]}))}))},e.prototype.strongPassword=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2,!1]):this.masterPassword.length<8?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength")),[2,!1]):this.masterPassword!==this.masterPasswordRetype?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassDoesntMatch")),[2,!1]):(e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput()),null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(e.score,this.masterPassword,this.enforcedPolicyOptions)?null!=e&&e.score<3?[4,this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[3,2]:(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet")),[2,!1]));case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return[2,!0]}}))}))},e.prototype.updatePasswordStrength=function(){var e=this;null!=this.masterPasswordStrengthTimeout&&clearTimeout(this.masterPasswordStrengthTimeout),this.masterPasswordStrengthTimeout=setTimeout((function(){var t=e.passwordGenerationService.passwordStrength(e.masterPassword,e.getPasswordStrengthUserInput());e.masterPasswordScore=null==t?null:t.score}),300)},e.prototype.logOut=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel"))];case 1:return e.sent()&&this.messagingService.send("logout"),[2]}}))}))},e.prototype.getPasswordStrengthUserInput=function(){var e=[],t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),e},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.CryptoService),o.ɵɵdirectiveInject(l.MessagingService),o.ɵɵdirectiveInject(c.UserService),o.ɵɵdirectiveInject(p.PasswordGenerationService),o.ɵɵdirectiveInject(u.PlatformUtilsService),o.ɵɵdirectiveInject(d.PolicyService))},e.ɵdir=o.ɵɵdefineDirective({type:e}),e}();t.ChangePasswordComponent=m},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(3),n(157)),s=n(251),l=n(279),c=n(30),p=n(0),u=n(6),d=n(3),m=n(9),h=n(13),f=n(16),v=n(17),y=n(4),g=n(53),x=n(139),b=n(10),S=n(252);function w(e,t){1&e&&(p.ɵɵelementStart(0,"div",13),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",14),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",15),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function C(e,t){if(1&e&&(p.ɵɵelementStart(0,"span",24),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.selectedCount)}}function I(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"hr"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,1,"noUsersInList"),"\n "))}function E(e,t){1&e&&(p.ɵɵelementStart(0,"th"),p.ɵɵtext(1," "),p.ɵɵelementEnd())}function P(e,t){1&e&&(p.ɵɵelementStart(0,"th",28),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"hidePasswords")))}function k(e,t){1&e&&(p.ɵɵelementStart(0,"th",28),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"readOnly")))}function _(e,t){1&e&&(p.ɵɵelementStart(0,"span",37),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"invited")))}function A(e,t){1&e&&(p.ɵɵelementStart(0,"span",38),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"accepted")))}function O(e,t){if(1&e&&(p.ɵɵelementStart(0,"small",39),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext().$implicit;p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function T(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",40),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",15),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"userAccessAllItems")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"userAccessAllItems")))}function M(e,t){if(1&e&&(p.ɵɵelementStart(0,"td"),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,T,9,6,"ng-container",23),p.ɵɵtext(3,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext().$implicit;p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.accessAll)}}function B(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"owner")))}function D(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"admin")))}function R(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"manager")))}function V(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"user")))}function j(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"custom")))}function F(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"td",41),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"input",42),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().$implicit.hidePasswords=e})),p.ɵɵelementEnd(),p.ɵɵtext(3,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext().$implicit;p.ɵɵadvance(2),p.ɵɵpropertyInterpolate1("name","",r.id.substr(0,8),"_HidePasswords"),p.ɵɵproperty("ngModel",r.hidePasswords)("disabled",r.accessAll||!r.checked)}}function U(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"td",41),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"input",42),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().$implicit.readOnly=e})),p.ɵɵelementEnd(),p.ɵɵtext(3,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext().$implicit;p.ɵɵadvance(2),p.ɵɵpropertyInterpolate1("name","",r.id.substr(0,8),"_ReadOnly"),p.ɵɵproperty("ngModel",r.readOnly)("disabled",r.accessAll||!r.checked)}}function N(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"td",29),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(3).check(e)})),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"input",30),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.checked=e}))("change",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(3).selectedChanged(e)})),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"td",31),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(3).check(e)})),p.ɵɵtext(8,"\n "),p.ɵɵelement(9,"app-avatar",32),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"td"),p.ɵɵtext(13),p.ɵɵtemplate(14,_,3,3,"span",33),p.ɵɵtext(15,"\n "),p.ɵɵtemplate(16,A,3,3,"span",34),p.ɵɵtext(17,"\n "),p.ɵɵtemplate(18,O,2,1,"small",35),p.ɵɵtext(19,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵtemplate(21,M,4,1,"td",23),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"td"),p.ɵɵtext(24,"\n "),p.ɵɵtemplate(25,B,3,3,"span",23),p.ɵɵtext(26,"\n "),p.ɵɵtemplate(27,D,3,3,"span",23),p.ɵɵtext(28,"\n "),p.ɵɵtemplate(29,R,3,3,"span",23),p.ɵɵtext(30,"\n "),p.ɵɵtemplate(31,V,3,3,"span",23),p.ɵɵtext(32,"\n "),p.ɵɵtemplate(33,j,3,3,"span",23),p.ɵɵtext(34,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n "),p.ɵɵtemplate(36,F,4,3,"td",36),p.ɵɵtext(37,"\n "),p.ɵɵtemplate(38,U,4,3,"td",36),p.ɵɵtext(39,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=p.ɵɵnextContext(3);p.ɵɵadvance(4),p.ɵɵpropertyInterpolate1("name","",r.id.substr(0,8),"_Checked"),p.ɵɵproperty("ngModel",r.checked)("disabled","collection"===i.entity&&r.accessAll),p.ɵɵadvance(5),p.ɵɵproperty("data",r.name||r.email)("email",r.email)("circle",!0)("fontSize",14),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",r.email,"\n "),p.ɵɵadvance(1),p.ɵɵproperty("ngIf",r.status===i.organizationUserStatusType.Invited),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.status===i.organizationUserStatusType.Accepted),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.name),p.ɵɵadvance(3),p.ɵɵproperty("ngIf","collection"===i.entity),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",r.type===i.organizationUserType.Owner),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.type===i.organizationUserType.Admin),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.type===i.organizationUserType.Manager),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.type===i.organizationUserType.User),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.type===i.organizationUserType.Custom),p.ɵɵadvance(3),p.ɵɵproperty("ngIf","collection"===i.entity),p.ɵɵadvance(2),p.ɵɵproperty("ngIf","collection"===i.entity)}}function z(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"table",25),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"thead"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"tr"),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"th"),p.ɵɵtext(9," "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"th"),p.ɵɵtext(12," "),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"th"),p.ɵɵtext(15),p.ɵɵpipe(16,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵtemplate(18,E,2,0,"th",23),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"th"),p.ɵɵtext(21),p.ɵɵpipe(22,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,P,3,3,"th",26),p.ɵɵtext(25,"\n "),p.ɵɵtemplate(26,k,3,3,"th",26),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n "),p.ɵɵelementStart(30,"tbody"),p.ɵɵtext(31,"\n "),p.ɵɵtemplate(32,N,40,19,"tr",27),p.ɵɵtext(33,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext().ngIf,r=p.ɵɵnextContext();p.ɵɵadvance(15),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(16,6,"name")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf","collection"===r.entity),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(22,8,"userType")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf","collection"===r.entity),p.ɵɵadvance(2),p.ɵɵproperty("ngIf","collection"===r.entity),p.ɵɵadvance(6),p.ɵɵproperty("ngForOf",n)}}var L=function(e){return{active:e}};function G(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",13),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",16),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",17),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"label",18),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"input",19),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().searchText=e})),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"div",20),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"button",21),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().filterSelected(!1)})),p.ɵɵtext(17),p.ɵɵpipe(18,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"button",21),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().filterSelected(!0)})),p.ɵɵtext(21),p.ɵɵpipe(22,"i18n"),p.ɵɵtemplate(23,C,2,1,"span",22),p.ɵɵtext(24,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵtemplate(28,I,5,3,"ng-container",23),p.ɵɵtext(29,"\n "),p.ɵɵtemplate(30,z,36,10,"ng-container",23),p.ɵɵtext(31,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.ngIf,i=p.ɵɵnextContext();p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,10,"search")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("placeholder",p.ɵɵpipeBind1(11,12,"search")),p.ɵɵproperty("ngModel",i.searchText),p.ɵɵadvance(6),p.ɵɵproperty("ngClass",p.ɵɵpureFunction1(18,L,!i.showSelected)),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(18,14,"all"),"\n "),p.ɵɵadvance(3),p.ɵɵproperty("ngClass",p.ɵɵpureFunction1(20,L,i.showSelected)),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(22,16,"selected"),"\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",i.selectedCount),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",!r.length),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.length)}}var K=function(e,t){return[e,t,"name","email","id"]},q=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n,this.onEditedUsers=new o.EventEmitter,this.organizationUserType=s.OrganizationUserType,this.organizationUserStatusType=a.OrganizationUserStatusType,this.showSelected=!1,this.loading=!0,this.selectedCount=0,this.allUsers=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loadUsers()];case 1:return e.sent(),this.loading=!1,[2]}}))}))},Object.defineProperty(e.prototype,"users",{get:function(){return this.showSelected?this.allUsers.filter((function(e){return e.checked})):this.allUsers},enumerable:!0,configurable:!0}),e.prototype.loadUsers=function(){return r(this,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getOrganizationUsers(this.organizationId)];case 1:return e=r.sent(),this.allUsers=e.data.map((function(e){return e})).sort(c.Utils.getSortFunction(this.i18nService,"email")),"group"!==this.entity?[3,3]:[4,this.apiService.getGroupUsers(this.organizationId,this.entityId)];case 2:return null!=(t=r.sent())&&e.data.length>0&&t.forEach((function(t){var n=e.data.filter((function(e){return e.id===t}));null!=n&&n.length>0&&(n[0].checked=!0)})),[3,5];case 3:return"collection"!==this.entity?[3,5]:[4,this.apiService.getCollectionUsers(this.organizationId,this.entityId)];case 4:null!=(t=r.sent())&&e.data.length>0&&t.forEach((function(t){var n=e.data.filter((function(e){return!e.accessAll&&e.id===t.id}));null!=n&&n.length>0&&(n[0].checked=!0,n[0].readOnly=t.readOnly,n[0].hidePasswords=t.hidePasswords)})),r.label=5;case 5:return this.allUsers.forEach((function(e){"collection"===n.entity&&e.accessAll&&(e.checked=!0),e.checked&&n.selectedCount++})),[2]}}))}))},e.prototype.check=function(e){"collection"===this.entity&&e.accessAll||(e.checked=!e.checked,this.selectedChanged(e))},e.prototype.selectedChanged=function(e){e.checked?this.selectedCount++:("collection"===this.entity&&(e.readOnly=!1,e.hidePasswords=!1),this.selectedCount--)},e.prototype.filterSelected=function(e){this.showSelected=e},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),"group"===this.entity?(e=this.users.filter((function(e){return e.checked})).map((function(e){return e.id})),this.formPromise=this.apiService.putGroupUsers(this.organizationId,this.entityId,e)):(e=this.users.filter((function(e){return e.checked&&!e.accessAll})).map((function(e){return new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)})),this.formPromise=this.apiService.putCollectionUsers(this.organizationId,this.entityId,e)),[4,this.formPromise];case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("updatedUsers")),this.onEditedUsers.emit(),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-entity-users"]],inputs:{entity:"entity",entityId:"entityId",entityName:"entityName",organizationId:"organizationId"},outputs:{onEditedUsers:"onEditedUsers"},decls:49,vars:29,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","userAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAccessTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"mr-3"],["for","search",1,"sr-only"],["type","search","id","search","name","SearchText",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],[4,"ngIf"],[1,"badge","badge-pill","badge-info"],[1,"table","table-hover","table-list","mb-0"],["width","100","class","text-center",4,"ngIf"],[4,"ngFor","ngForOf"],["width","100",1,"text-center"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange","change"],["width","30",3,"click"],["size","25",3,"data","email","circle","fontSize"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"fa","fa-th",3,"title"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementStart(12,"small"),p.ɵɵtext(13),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"button",6),p.ɵɵpipe(17,"i18n"),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"span",7),p.ɵɵtext(20,"×"),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,w,9,6,"div",8),p.ɵɵtext(25,"\n "),p.ɵɵtemplate(26,G,32,22,"div",8),p.ɵɵpipe(27,"search"),p.ɵɵtext(28,"\n "),p.ɵɵelementStart(29,"div",9),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"button",10),p.ɵɵtext(32,"\n "),p.ɵɵelement(33,"i",11),p.ɵɵpipe(34,"i18n"),p.ɵɵtext(35,"\n "),p.ɵɵelementStart(36,"span"),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(40,"\n "),p.ɵɵelementStart(41,"button",12),p.ɵɵtext(42),p.ɵɵpipe(43,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(44,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(45,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(47,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(11,10,"userAccess"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(t.entityName),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(17,12,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading||!t.users),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&t.users&&p.ɵɵpipeBindV(27,14,p.ɵɵpureFunction2(26,K,t.users,t.searchText))),p.ɵɵadvance(5),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(34,20,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,22,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(43,24,"close"))}},directives:[h.NgControlStatusGroup,h.NgForm,f.ApiActionDirective,v.A11yTitleDirective,y.NgIf,h.DefaultValueAccessor,h.NgControlStatus,h.NgModel,y.NgClass,y.NgForOf,h.CheckboxControlValueAccessor,g.StopPropDirective,x.AvatarComponent],pipes:[b.I18nPipe,S.SearchPipe],encapsulation:2}),e}();t.EntityUsersComponent=q},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3),n(253);var o=n(0),a=n(6),s=n(3),l=n(253),c=n(9),p=n(4),u=n(17),d=n(13),m=n(16),h=n(10);function f(e,t){if(1&e&&(o.ɵɵelementStart(0,"small",11),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate(n.name)}}function v(e,t){1&e&&(o.ɵɵelementStart(0,"div",12),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",13),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",14),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"noEventsInList"),"\n "))}function g(e,t){1&e&&(o.ɵɵelementStart(0,"th",34),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"user")))}function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"td"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"span",37),o.ɵɵtext(3),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",n.userEmail),o.ɵɵadvance(1),o.ɵɵtextInterpolate(n.userName)}}function b(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",35),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"span",14),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,x,5,2,"td",25),o.ɵɵtext(15,"\n "),o.ɵɵelement(16,"td",36),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()),2&e){var n=t.$implicit,r=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,10,n.date,"medium")),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("text-muted fa fa-lg ",n.appIcon,""),o.ɵɵpropertyInterpolate2("title","",n.appName,", ",n.ip,""),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",n.appName,", ",n.ip,""),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",r.showUser),o.ɵɵadvance(2),o.ɵɵproperty("innerHTML",n.message,o.ɵɵsanitizeHtml)}}function S(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",28),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"thead"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"tr"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"th",29),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",30),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span",14),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,g,3,3,"th",31),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"th",32),o.ɵɵtext(20),o.ɵɵpipe(21,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"tbody"),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,b,18,13,"tr",33),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"timestamp")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"device")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",n.showUser),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(21,9,"event")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",n.events)}}function w(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",38,39),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(2).loadEvents(!1)})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",40),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){var r=o.ɵɵreference(1),i=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",i.morePromise)("disabled",i.loaded&&r.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"loadMore"))}}var C=function(e){return{"fa-spin":e}};function I(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",12),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",15),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",16),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",17),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"input",18),o.ɵɵlistener("ngModelChange",(function(e){return o.ɵɵrestoreView(n),o.ɵɵnextContext().start=e})),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"span",19),o.ɵɵtext(14,"-"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"label",20),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"input",21),o.ɵɵlistener("ngModelChange",(function(e){return o.ɵɵrestoreView(n),o.ɵɵnextContext().end=e})),o.ɵɵpipe(21,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"button",22,23),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext().loadEvents(!0)})),o.ɵɵtext(26,"\n "),o.ɵɵelement(27,"i",24),o.ɵɵtext(28),o.ɵɵpipe(29,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelement(32,"hr"),o.ɵɵtext(33,"\n "),o.ɵɵtemplate(34,y,3,3,"div",25),o.ɵɵtext(35,"\n "),o.ɵɵtemplate(36,S,30,11,"table",26),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,w,10,8,"button",27),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd()}if(2&e){var r=o.ɵɵreference(25),i=o.ɵɵnextContext();o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,13,"startDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(11,15,"startDate")),o.ɵɵproperty("ngModel",i.start),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(18,17,"endDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(21,19,"endDate")),o.ɵɵproperty("ngModel",i.end),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",i.refreshPromise)("disabled",i.loaded&&r.loading),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(23,C,i.loaded&&r.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(29,21,"refresh"),"\n "),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",!i.events||!i.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",i.events&&i.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",i.continuationToken)}}var E=function(){function e(e,t,n,r){this.apiService=e,this.i18nService=t,this.eventService=n,this.toasterService=r,this.showUser=!1,this.loading=!0,this.loaded=!1,this.orgUsersUserIdMap=new Map,this.orgUsersIdMap=new Map}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this.eventService.getDefaultDateFilters(),this.start=e[0],this.end=e[1],[4,this.load()];case 1:return t.sent(),[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){switch(t.label){case 0:return this.showUser?[4,this.apiService.getOrganizationUsers(this.organizationId)]:[3,2];case 1:t.sent().data.forEach((function(t){var n=null==t.name||""===t.name.trim()?t.email:t.name;e.orgUsersIdMap.set(t.id,{name:n,email:t.email}),e.orgUsersUserIdMap.set(t.userId,{name:n,email:t.email})})),t.label=2;case 2:return[4,this.loadEvents(!0)];case 3:return t.sent(),this.loaded=!0,[2]}}))}))},e.prototype.loadEvents=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a=this;return i(this,(function(i){switch(i.label){case 0:if(null!=this.refreshPromise||null!=this.morePromise)return[2];t=null;try{t=this.eventService.formatDateFilters(this.start,this.end)}catch(s){return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange")),[2]}this.loading=!0,i.label=1;case 1:return i.trys.push([1,3,,4]),r=void 0,r="user"===this.entity?this.apiService.getEventsOrganizationUser(this.organizationId,this.entityId,t[0],t[1],e?null:this.continuationToken):this.apiService.getEventsCipher(this.entityId,t[0],t[1],e?null:this.continuationToken),e?this.refreshPromise=r:this.morePromise=r,[4,r];case 2:return n=i.sent(),[3,4];case 3:return i.sent(),[3,4];case 4:return this.continuationToken=n.continuationToken,o=n.data.map((function(e){var t=null==e.actingUserId?e.userId:e.actingUserId,n=a.eventService.getEventInfo(e),r=a.showUser&&null!=t&&a.orgUsersUserIdMap.has(t)?a.orgUsersUserIdMap.get(t):null;return{message:n.message,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=r?r.name:a.showUser?a.i18nService.t("unknown"):null,userEmail:null!=r?r.email:a.showUser?"":null,date:e.date,ip:e.ipAddress,type:e.type}})),!e&&null!=this.events&&this.events.length>0?this.events=this.events.concat(o):this.events=o,this.loading=!1,this.morePromise=null,this.refreshPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.EventService),o.ɵɵdirectiveInject(c.ToasterService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-entity-events"]],inputs:{name:"name",entity:"entity",entityId:"entityId",organizationId:"organizationId",showUser:"showUser"},decls:36,vars:12,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","eventLogsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","eventLogsTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"appApiAction","disabled","click"],["refreshBtn",""],["aria-hidden","true",1,"fa","fa-refresh","fa-fw",3,"ngClass"],[4,"ngIf"],["class","table table-hover mb-0",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover","mb-0"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["class","border-top-0","width","150",4,"ngIf"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["width","150",1,"border-top-0"],["aria-hidden","true",3,"title"],[3,"innerHTML"],[3,"appA11yTitle"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"h2",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵtemplate(11,f,2,1,"small",5),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"button",6),o.ɵɵpipe(15,"i18n"),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"span",7),o.ɵɵtext(18,"×"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,v,9,6,"div",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,I,40,25,"div",8),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",9),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"button",10),o.ɵɵtext(29),o.ɵɵpipe(30,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,6,"eventLogs"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.name),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(15,8,"close")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(30,10,"close")))},directives:[p.NgIf,u.A11yTitleDirective,d.DefaultValueAccessor,d.NgControlStatus,d.NgModel,m.ApiActionDirective,p.NgClass,p.NgForOf],pipes:[h.I18nPipe,p.DatePipe],encapsulation:2}),e}();t.EntityEventsComponent=E},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.accessBusinessPortal=n.getResponseProperty("AccessBusinessPortal"),n.accessEventLogs=n.getResponseProperty("AccessEventLogs"),n.accessImportExport=n.getResponseProperty("AccessImportExport"),n.accessReports=n.getResponseProperty("AccessReports"),n.manageAllCollections=n.getResponseProperty("ManageAllCollections"),n.manageAssignedCollections=n.getResponseProperty("ManageAssignedCollections"),n.manageCiphers=n.getResponseProperty("ManageCiphers"),n.manageGroups=n.getResponseProperty("ManageGroups"),n.manageSso=n.getResponseProperty("ManageSso"),n.managePolicies=n.getResponseProperty("ManagePolicies"),n.manageUsers=n.getResponseProperty("ManageUsers"),n.manageResetPassword=n.getResponseProperty("ManageResetPassword")),n}return i(t,e),t}(n(23).BaseResponse);t.PermissionsApi=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(18),n(3);var o=n(79),a=n(0),s=n(3),l=n(9),c=n(18),p=n(13),u=n(16),d=n(17),m=n(4),h=n(65),f=n(45),v=n(24),y=n(10);function g(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"label",15),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"input",16),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext();a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.masterPassword)}}function x(e,t){if(1&e&&(a.ɵɵelementStart(0,"app-callout",17),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,n.apiKeyWarning))}}function b(e,t){if(1&e&&(a.ɵɵelementStart(0,"app-callout",18),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"p",19),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"strong"),a.ɵɵtext(6,"client_id:"),a.ɵɵelementEnd(),a.ɵɵelement(7,"br"),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"code"),a.ɵɵtext(10),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"p",19),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"strong"),a.ɵɵtext(16,"client_secret:"),a.ɵɵelementEnd(),a.ɵɵelement(17,"br"),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"code"),a.ɵɵtext(20),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p",19),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"strong"),a.ɵɵtext(26,"scope:"),a.ɵɵelementEnd(),a.ɵɵelement(27,"br"),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"code"),a.ɵɵtext(30),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"p",20),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"strong"),a.ɵɵtext(36,"grant_type:"),a.ɵɵelementEnd(),a.ɵɵelement(37,"br"),a.ɵɵtext(38,"\n "),a.ɵɵelementStart(39,"code"),a.ɵɵtext(40),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,5,"oauth2ClientCredentials")),a.ɵɵadvance(10),a.ɵɵtextInterpolate(n.clientId),a.ɵɵadvance(10),a.ɵɵtextInterpolate(n.clientSecret),a.ɵɵadvance(10),a.ɵɵtextInterpolate(n.scope),a.ɵɵadvance(10),a.ɵɵtextInterpolate(n.grantType)}}function S(e,t){if(1&e&&(a.ɵɵelementStart(0,"button",21),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",22),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span"),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(),r=a.ɵɵreference(5);a.ɵɵproperty("disabled",r.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,5,n.isRotation?"rotateApiKey":"viewApiKey"))}}var w=function(){function e(e,t,n){this.i18nService=e,this.toasterService=t,this.cryptoService=n}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):(e=new o.PasswordVerificationRequest,t=e,[4,this.cryptoService.hashPassword(this.masterPassword,null)]);case 1:t.masterPasswordHash=r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),this.formPromise=this.postKey(this.entityId,e),[4,this.formPromise];case 3:return n=r.sent(),this.clientSecret=n.apiKey,this.clientId=this.keyType+"."+this.entityId,[3,5];case 4:return r.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.I18nService),a.ɵɵdirectiveInject(l.ToasterService),a.ɵɵdirectiveInject(c.CryptoService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-api-key"]],decls:46,vars:17,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","apiKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","apiKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[4,"ngIf"],["type","warning",4,"ngIf"],["type","info","icon","fa-key",3,"title",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["type","warning"],["type","info","icon","fa-key",3,"title"],[1,"mb-1"],[1,"mb-0"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p"),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵtemplate(27,g,8,4,"ng-container",9),a.ɵɵtext(28,"\n "),a.ɵɵtemplate(29,x,3,3,"app-callout",10),a.ɵɵtext(30,"\n "),a.ɵɵtemplate(31,b,43,7,"app-callout",11),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementStart(34,"div",12),a.ɵɵtext(35,"\n "),a.ɵɵtemplate(36,S,9,7,"button",13),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"button",14),a.ɵɵtext(39),a.ɵɵpipe(40,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(45,"\n")),2&e&&(a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,9,t.apiKeyTitle)),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,11,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,13,t.apiKeyDescription)),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.clientSecret),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.clientSecret),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.clientSecret),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!t.clientSecret),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(40,15,"close")))},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,d.A11yTitleDirective,m.NgIf,p.DefaultValueAccessor,p.RequiredValidator,h.AutofocusDirective,f.InputVerbatimDirective,p.NgControlStatus,p.NgModel,v.CalloutComponent],pipes:[y.I18nPipe],encapsulation:2}),e}();t.ApiKeyComponent=w},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(18),n(3);var o=n(79),a=n(0),s=n(6),l=n(3),c=n(9),p=n(18),u=n(8),d=n(13),m=n(16),h=n(17),f=n(24),v=n(65),y=n(45),g=n(10),x=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.router=i,this.organizationId=null}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):(e=new o.PasswordVerificationRequest,t=e,[4,this.cryptoService.hashPassword(this.masterPassword,null)]);case 1:t.masterPasswordHash=n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),this.formPromise=this.apiService.postPurgeCiphers(e,this.organizationId),[4,this.formPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("vaultPurged")),null!=this.organizationId?this.router.navigate(["organizations",this.organizationId,"vault"]):this.router.navigate(["vault"]),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.CryptoService),a.ɵɵdirectiveInject(u.Router))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-purge-vault"]],inputs:{organizationId:"organizationId"},decls:58,vars:27,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","purgeVaultTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","purgeVaultTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p"),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"app-callout",9),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"label",10),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"input",11),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",12),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"button",13),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"i",14),a.ɵɵpipe(43,"i18n"),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"span"),a.ɵɵtext(46),a.ɵɵpipe(47,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"button",15),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,11,"purgeVault")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,13,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,15,t.organizationId?"purgeOrgVaultDesc":"purgeVaultDesc")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,17,"purgeVaultWarning")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(33,19,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(43,21,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(47,23,"purgeVault")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,25,"close"))}},directives:[d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.A11yTitleDirective,f.CalloutComponent,d.DefaultValueAccessor,d.RequiredValidator,v.AutofocusDirective,y.InputVerbatimDirective,d.NgControlStatus,d.NgModel],pipes:[g.I18nPipe],encapsulation:2}),e}();t.PurgeVaultComponent=x},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3),n(5);var o=n(255),a=n(864),s=n(865),l=n(0),c=n(6),p=n(3),u=n(9),d=n(5),m=n(4),h=n(472),f=n(24),v=n(13),y=n(16),g=n(473),x=n(17),b=n(10),S=function(e){return{"fa-spin":e}};function w(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",3),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext().load()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext();l.ɵɵproperty("disabled",r.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(5,S,r.loading)),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,3,"refresh"),"\n ")}}function C(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",5),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",6),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function I(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",14),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).addCredit()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"addCredit"),"\n "))}function E(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-add-credit",15),l.ɵɵlistener("onAdded",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closeAddCredit(!0)}))("onCanceled",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closeAddCredit(!1)})),l.ɵɵtext(1,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵproperty("organizationId",r.organizationId)}}function P(e,t){1&e&&(l.ɵɵelementStart(0,"p"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"noPaymentMethod")))}function k(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-callout",18),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"p"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"form",19,20),l.ɵɵlistener("ngSubmit",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).verifyBank()})),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"label",21),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"div",22),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"div",23),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"div",24),l.ɵɵtext(20,"$0."),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"input",25),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).verifyAmount1=e})),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"label",26),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"div",22),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"div",23),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"div",24),l.ɵɵtext(35,"$0."),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"input",27),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).verifyAmount2=e})),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"button",28),l.ɵɵtext(42,"\n "),l.ɵɵelement(43,"i",29),l.ɵɵpipe(44,"i18n"),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"span"),l.ɵɵtext(47),l.ɵɵpipe(48,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(51,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(9),i=l.ɵɵnextContext(3);l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,11,"verifyBankAccount")),l.ɵɵadvance(4),l.ɵɵtextInterpolate2("",l.ɵɵpipeBind1(5,13,"verifyBankAccountDesc")," ",l.ɵɵpipeBind1(6,15,"verifyBankAccountFailureWarning"),""),l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",i.verifyBankPromise),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(13,17,"amount","1")),l.ɵɵadvance(11),l.ɵɵproperty("ngModel",i.verifyAmount1),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(28,20,"amount","2")),l.ɵɵadvance(11),l.ɵɵproperty("ngModel",i.verifyAmount2),l.ɵɵadvance(3),l.ɵɵproperty("disabled",r.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(44,23,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(48,25,"verifyBankAccount"))}}function _(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"inAppPurchase")))}var A=function(e,t,n,r,i,o){return{"fa-credit-card":e,"fa-university":t,"fa-money":n,"fa-paypal text-primary":r,"fa-apple text-muted":i,"fa-google text-muted":o}};function O(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,k,52,27,"app-callout",16),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"p"),l.ɵɵtext(5,"\n "),l.ɵɵelement(6,"i",17),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,_,3,3,"span",2),l.ɵɵtext(9),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.paymentSource.type===n.paymentMethodType.BankAccount&&n.paymentSource.needsVerification),l.ɵɵadvance(4),l.ɵɵproperty("ngClass",l.ɵɵpureFunction6(4,A,n.paymentSource.type===n.paymentMethodType.Card,n.paymentSource.type===n.paymentMethodType.BankAccount,n.paymentSource.type===n.paymentMethodType.Check,n.paymentSource.type===n.paymentMethodType.PayPal,n.paymentSource.type===n.paymentMethodType.AppleInApp,n.paymentSource.type===n.paymentMethodType.GoogleInApp)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.paymentSourceInApp),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",n.paymentSource.description,"\n ")}}function T(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",14),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).changePayment()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,r.paymentSource?"changePaymentMethod":"addPaymentMethod"),"\n ")}}function M(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-adjust-payment",30),l.ɵɵlistener("onAdjusted",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closePayment(!0)}))("onCanceled",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closePayment(!1)})),l.ɵɵtext(1,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵproperty("currentType",null!=r.paymentSource?r.paymentSource.type:null)("organizationId",r.organizationId)}}function B(e,t){1&e&&(l.ɵɵelementStart(0,"p"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"noInvoices")))}function D(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",36),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,1,"paid"),"\n "))}function R(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",37),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,1,"unpaid"),"\n "))}function V(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td"),l.ɵɵtext(3),l.ɵɵpipe(4,"date"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"td"),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"a",33),l.ɵɵpipe(9,"i18n"),l.ɵɵtext(10,"\n "),l.ɵɵelement(11,"i",34),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"a",35),l.ɵɵpipe(14,"i18n"),l.ɵɵtext(15),l.ɵɵpipe(16,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"td"),l.ɵɵtext(20),l.ɵɵpipe(21,"currency"),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"td"),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,D,5,3,"span",2),l.ɵɵtext(26,"\n "),l.ɵɵtemplate(27,R,5,3,"span",2),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(4,9,n.date,"mediumDate")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("href",n.pdfUrl,l.ɵɵsanitizeUrl),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(9,12,"downloadInvoice")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("href",n.url,l.ɵɵsanitizeUrl),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(14,14,"viewInvoice")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(16,16,"invoiceNumber",n.number),""),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(21,19,n.amount,"$")),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",n.paid),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.paid)}}function j(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",31),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,V,30,22,"tr",32),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.invoices)}}function F(e,t){1&e&&(l.ɵɵelementStart(0,"p"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"noTransactions")))}function U(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"chargeNoun"),"\n "))}function N(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"refundNoun")))}var z=function(e,t,n,r){return{"fa-credit-card":e,"fa-university":t,"fa-bitcoin text-warning":n,"fa-paypal text-primary":r}};function L(e,t){if(1&e&&l.ɵɵelement(0,"i",40),2&e){var n=l.ɵɵnextContext().$implicit,r=l.ɵɵnextContext(3);l.ɵɵproperty("ngClass",l.ɵɵpureFunction4(1,z,n.paymentMethodType===r.paymentMethodType.Card,n.paymentMethodType===r.paymentMethodType.BankAccount||n.paymentMethodType===r.paymentMethodType.WireTransfer,n.paymentMethodType===r.paymentMethodType.BitPay,n.paymentMethodType===r.paymentMethodType.PayPal))}}var G=function(e){return{"text-strike":e}};function K(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td"),l.ɵɵtext(3),l.ɵɵpipe(4,"date"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"td"),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,U,3,3,"span",2),l.ɵɵtext(9,"\n "),l.ɵɵtemplate(10,N,3,3,"span",2),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"td"),l.ɵɵtext(14,"\n "),l.ɵɵtemplate(15,L,1,6,"i",38),l.ɵɵtext(16),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"td",39),l.ɵɵpipe(19,"i18n"),l.ɵɵtext(20),l.ɵɵpipe(21,"currency"),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit,r=l.ɵɵnextContext(3);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(4,8,n.createdDate,"mediumDate")),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",n.type===r.transactionType.Charge||n.type===r.transactionType.Credit),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.type===r.transactionType.Refund),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",n.paymentMethodType),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",n.details,"\n "),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(19,11,n.refunded?"refunded":"")),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(16,G,n.refunded)),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(21,13,n.amount,"$"),"")}}function q(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",31),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,K,23,18,"tr",32),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.transactions)}}function W(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h2"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"p",7),l.ɵɵelementStart(7,"strong"),l.ɵɵtext(8),l.ɵɵpipe(9,"currency"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"p"),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵtemplate(15,I,3,3,"button",8),l.ɵɵtext(16,"\n "),l.ɵɵtemplate(17,E,2,1,"app-add-credit",9),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"h2",10),l.ɵɵtext(20),l.ɵɵpipe(21,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵtemplate(23,P,3,3,"p",2),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,O,11,11,"ng-container",2),l.ɵɵtext(26,"\n "),l.ɵɵtemplate(27,T,3,3,"button",8),l.ɵɵtext(28,"\n "),l.ɵɵtemplate(29,M,2,2,"app-adjust-payment",11),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"h2",10),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,B,3,3,"p",2),l.ɵɵtext(36,"\n "),l.ɵɵtemplate(37,j,7,1,"table",12),l.ɵɵtext(38,"\n "),l.ɵɵelementStart(39,"h2",10),l.ɵɵtext(40),l.ɵɵpipe(41,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵtemplate(43,F,3,3,"p",2),l.ɵɵtext(44,"\n "),l.ɵɵtemplate(45,q,7,1,"table",12),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"small",13),l.ɵɵtext(48),l.ɵɵpipe(49,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n"),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,17,n.isCreditBalance?"accountCredit":"accountBalance")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(9,19,n.creditOrBalance,"$")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(13,22,"creditAppliedDesc")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.showAddCredit),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.showAddCredit),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(21,24,"paymentMethod")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.paymentSource),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.paymentSource),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.showAdjustPayment),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.showAdjustPayment),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(33,26,"invoices")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.invoices||!n.invoices.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.invoices&&n.invoices.length),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(41,28,"transactions")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.transactions||!n.transactions.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.transactions&&n.transactions.length),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("* ",l.ɵɵpipeBind2(49,30,"chargesStatement","BITWARDEN"),"")}}var H=function(){function e(e,t,n,r){this.apiService=e,this.i18nService=t,this.toasterService=n,this.platformUtilsService=r,this.loading=!1,this.firstLoaded=!1,this.showAdjustPayment=!1,this.showAddCredit=!1,this.paymentMethodType=o.PaymentMethodType,this.transactionType=a.TransactionType}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.loading?[2]:(this.loading=!0,null==this.organizationId?[3,2]:(e=this,[4,this.apiService.getOrganizationBilling(this.organizationId)]));case 1:return e.billing=n.sent(),[3,4];case 2:return t=this,[4,this.apiService.getUserBilling()];case 3:t.billing=n.sent(),n.label=4;case 4:return this.loading=!1,[2]}}))}))},e.prototype.verifyBank=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(this.loading)return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),(e=new s.VerifyBankRequest).amount1=this.verifyAmount1,e.amount2=this.verifyAmount2,this.verifyBankPromise=this.apiService.postOrganizationVerifyBank(this.organizationId,e),[4,this.verifyBankPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("verifiedBankAccount")),this.load(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.addCredit=function(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("addCredit"),null,null,"warning"):this.showAddCredit=!0},e.prototype.closeAddCredit=function(e){this.showAddCredit=!1,e&&this.load()},e.prototype.changePayment=function(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("changePaymentMethod"),null,null,"warning"):this.showAdjustPayment=!0},e.prototype.closePayment=function(e){this.showAdjustPayment=!1,e&&this.load()},Object.defineProperty(e.prototype,"isCreditBalance",{get:function(){return null==this.billing||this.billing.balance<=0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"creditOrBalance",{get:function(){return Math.abs(null!=this.billing?this.billing.balance:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paymentSource",{get:function(){return null!=this.billing?this.billing.paymentSource:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paymentSourceInApp",{get:function(){return null!=this.paymentSource&&(this.paymentSource.type===o.PaymentMethodType.AppleInApp||this.paymentSource.type===o.PaymentMethodType.GoogleInApp)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"invoices",{get:function(){return null!=this.billing?this.billing.invoices:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transactions",{get:function(){return null!=this.billing?this.billing.transactions:null},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService),l.ɵɵdirectiveInject(d.PlatformUtilsService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-user-billing"]],decls:13,vars:6,consts:[[1,"page-header","d-flex"],["class","btn btn-sm btn-outline-primary ml-auto",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[1,"btn","btn-sm","btn-outline-primary","ml-auto",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-refresh","fa-fw",3,"ngClass"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"text-lg"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[3,"organizationId","onAdded","onCanceled",4,"ngIf"],[1,"spaced-header"],[3,"currentType","organizationId","onAdjusted","onCanceled",4,"ngIf"],["class","table mb-2",4,"ngIf"],[1,"text-muted"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[3,"organizationId","onAdded","onCanceled"],["type","warning",3,"title",4,"ngIf"],[1,"fa","fa-fw",3,"ngClass"],["type","warning",3,"title"],["ngNativeValidate","",1,"form-inline",3,"appApiAction","ngSubmit"],["verifyForm",""],["for","verifyAmount1",1,"sr-only"],[1,"input-group","mr-2"],[1,"input-group-prepend"],[1,"input-group-text"],["type","number","id","verifyAmount1","placeholder","xx","name","Amount1","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","verifyAmount2",1,"sr-only"],["type","number","id","verifyAmount2","placeholder","xx","name","Amount2","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-outline-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[3,"currentType","organizationId","onAdjusted","onCanceled"],[1,"table","mb-2"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener",1,"mr-2",3,"href","appA11yTitle"],["aria-hidden","true",1,"fa","fa-file-pdf-o"],["target","_blank","rel","noopener",3,"href","title"],["aria-hidden","true",1,"fa","fa-check","text-success"],["aria-hidden","true",1,"fa","fa-exclamation-circle","text-muted"],["class","fa fa-fw","aria-hidden","true",3,"ngClass",4,"ngIf"],[3,"ngClass","title"],["aria-hidden","true",1,"fa","fa-fw",3,"ngClass"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,w,5,7,"button",1),l.ɵɵtext(7,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵtemplate(9,C,9,6,"ng-container",2),l.ɵɵtext(10,"\n"),l.ɵɵtemplate(11,W,51,33,"ng-container",2),l.ɵɵtext(12,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,4,"billing"),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.firstLoaded),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.billing))},directives:[m.NgIf,m.NgClass,h.AddCreditComponent,f.CalloutComponent,v.NgControlStatusGroup,v.NgForm,y.ApiActionDirective,v.NumberValueAccessor,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,g.AdjustPaymentComponent,m.NgForOf,x.A11yTitleDirective],pipes:[b.I18nPipe,m.CurrencyPipe,m.DatePipe],encapsulation:2}),e}();t.UserBillingComponent=H},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(6),n(5),n(7),n(255)),s=n(866),l=n(581),c=n(0),p=n(7),u=n(6),d=n(5),m=n(13),h=n(16),f=n(17),v=n(4),y=n(10),g=["ppButtonForm"];function x(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",36),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",37),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",38),c.ɵɵlistener("ngModelChange",(function(e){return c.ɵɵrestoreView(n),c.ɵɵnextContext().method=e})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",39),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"i",40),c.ɵɵtext(9," PayPal"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"div",37),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",41),c.ɵɵlistener("ngModelChange",(function(e){return c.ɵɵrestoreView(n),c.ɵɵnextContext().method=e})),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"label",42),c.ɵɵtext(17,"\n "),c.ɵɵelement(18,"i",43),c.ɵɵtext(19," Bitcoin"),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd()}if(2&e){var r=c.ɵɵnextContext();c.ɵɵadvance(4),c.ɵɵproperty("value",r.paymentMethodType.PayPal)("ngModel",r.method),c.ɵɵadvance(10),c.ɵɵproperty("value",r.paymentMethodType.BitPay)("ngModel",r.method)}}var b=function(){function e(e,t,n){this.userService=e,this.apiService=t,this.platformUtilsService=n,this.showOptions=!0,this.method=a.PaymentMethodType.PayPal,this.onAdded=new o.EventEmitter,this.onCanceled=new o.EventEmitter,this.paymentMethodType=a.PaymentMethodType,this.ppButtonFormAction=l.WebConstants.paypal.buttonActionProduction,this.ppButtonBusinessId=l.WebConstants.paypal.businessIdProduction,this.ppLoading=!1,n.isDev()&&(this.ppButtonFormAction=l.WebConstants.paypal.buttonActionSandbox,this.ppButtonBusinessId=l.WebConstants.paypal.businessIdSandbox)}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return null==this.organizationId?[3,2]:(null==this.creditAmount&&(this.creditAmount="20.00"),this.ppButtonCustomField="organization_id:"+this.organizationId,[4,this.userService.getOrganization(this.organizationId)]);case 1:return null!=(e=r.sent())&&(this.subject=e.name,this.name=e.name),[3,5];case 2:return null==this.creditAmount&&(this.creditAmount="10.00"),t=this,[4,this.userService.getUserId()];case 3:return t.userId=r.sent(),n=this,[4,this.userService.getEmail()];case 4:n.subject=r.sent(),this.email=this.subject,this.ppButtonCustomField="user_id:"+this.userId,r.label=5;case 5:return this.ppButtonCustomField+=",account_credit:1",this.returnUrl=window.location.href,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null==this.creditAmount||""===this.creditAmount)return[2];if(this.method===a.PaymentMethodType.PayPal)return this.ppButtonFormRef.nativeElement.submit(),this.ppLoading=!0,[2];if(this.method!==a.PaymentMethodType.BitPay)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),(e=new s.BitPayInvoiceRequest).email=this.email,e.name=this.name,e.credit=!0,e.amount=this.creditAmountNumber,e.organizationId=this.organizationId,e.userId=this.userId,e.returnUrl=this.returnUrl,this.formPromise=this.apiService.postBitPayInvoice(e),[4,this.formPromise];case 2:return t=n.sent(),this.platformUtilsService.launchUri(t),[3,4];case 3:return n.sent(),[3,4];case 4:return[2];case 5:try{this.onAdded.emit()}catch(r){}return[2]}}))}))},e.prototype.cancel=function(){this.onCanceled.emit()},e.prototype.formatAmount=function(){try{if(null!=this.creditAmount&&""!==this.creditAmount){var e=Math.abs(parseFloat(this.creditAmount));if(e>0)return void(this.creditAmount=parseFloat((Math.round(100*e)/100).toString()).toFixed(2).toString())}}catch(t){}this.creditAmount=""},Object.defineProperty(e.prototype,"creditAmountNumber",{get:function(){if(null!=this.creditAmount&&""!==this.creditAmount)try{return parseFloat(this.creditAmount)}catch(e){}return null},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.UserService),c.ɵɵdirectiveInject(u.ApiService),c.ɵɵdirectiveInject(d.PlatformUtilsService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-add-credit"]],viewQuery:function(e,t){var n;(1&e&&c.ɵɵstaticViewQuery(g,!0,o.ElementRef),2&e)&&(c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.ppButtonFormRef=n.first))},inputs:{creditAmount:"creditAmount",showOptions:"showOptions",method:"method",organizationId:"organizationId"},outputs:{onAdded:"onAdded",onCanceled:"onCanceled"},decls:92,vars:32,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],["class","mb-4 text-lg",4,"ngIf"],[1,"form-group"],[1,"row"],[1,"col-4"],["for","creditAmount"],[1,"input-group"],[1,"input-group-prepend"],[1,"input-group-text"],["id","creditAmount","type","text","name","CreditAmount","required","",1,"form-control",3,"ngModel","ngModelChange","blur"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["method","post","target","_top",3,"action"],["ppButtonForm",""],["type","hidden","name","cmd","value","_xclick"],["type","hidden","name","business",3,"value"],["type","hidden","name","button_subtype","value","services"],["type","hidden","name","no_note","value","1"],["type","hidden","name","no_shipping","value","1"],["type","hidden","name","rm","value","1"],["type","hidden","name","return",3,"value"],["type","hidden","name","cancel_return",3,"value"],["type","hidden","name","currency_code","value","USD"],["type","hidden","name","image_url","value","https://bitwarden.com/images/paypal-banner.png"],["type","hidden","name","bn","value","PP-BuyNowBF:btn_buynow_LG.gif:NonHosted"],["type","hidden","name","amount",3,"value"],["type","hidden","name","custom",3,"value"],["type","hidden","name","item_name","value","Bitwarden Account Credit"],["type","hidden","name","item_number",3,"value"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","credit-method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-paypal",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-paypal"],["type","radio","name","Method","id","credit-method-bitcoin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-bitcoin",1,"form-check-label"],["aria-hidden","true",1,"fa","fa-fw","fa-bitcoin"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"form",0,1),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(2,"\n "),c.ɵɵelementStart(3,"div",2),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"button",3),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵpipe(6,"i18n"),c.ɵɵelementStart(7,"span",4),c.ɵɵtext(8,"×"),c.ɵɵelementEnd(),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"h3",5),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,x,22,4,"div",6),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"div",7),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"div",8),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"div",9),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"label",10),c.ɵɵtext(23),c.ɵɵpipe(24,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",11),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"div",12),c.ɵɵelementStart(29,"span",13),c.ɵɵtext(30,"$USD"),c.ɵɵelementEnd(),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵelementStart(32,"input",14),c.ɵɵlistener("ngModelChange",(function(e){return t.creditAmount=e}))("blur",(function(){return t.formatAmount()})),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n "),c.ɵɵelementStart(37,"small",15),c.ɵɵtext(38),c.ɵɵpipe(39,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(40,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(41,"\n "),c.ɵɵelementStart(42,"button",16),c.ɵɵtext(43,"\n "),c.ɵɵelement(44,"i",17),c.ɵɵpipe(45,"i18n"),c.ɵɵtext(46,"\n "),c.ɵɵelementStart(47,"span"),c.ɵɵtext(48),c.ɵɵpipe(49,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementStart(52,"button",18),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵtext(53),c.ɵɵpipe(54,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(55,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(56,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(57,"\n"),c.ɵɵelementStart(58,"form",19,20),c.ɵɵtext(60,"\n "),c.ɵɵelement(61,"input",21),c.ɵɵtext(62,"\n "),c.ɵɵelement(63,"input",22),c.ɵɵtext(64,"\n "),c.ɵɵelement(65,"input",23),c.ɵɵtext(66,"\n "),c.ɵɵelement(67,"input",24),c.ɵɵtext(68,"\n "),c.ɵɵelement(69,"input",25),c.ɵɵtext(70,"\n "),c.ɵɵelement(71,"input",26),c.ɵɵtext(72,"\n "),c.ɵɵelement(73,"input",27),c.ɵɵtext(74,"\n "),c.ɵɵelement(75,"input",28),c.ɵɵtext(76,"\n "),c.ɵɵelement(77,"input",29),c.ɵɵtext(78,"\n "),c.ɵɵelement(79,"input",30),c.ɵɵtext(80,"\n "),c.ɵɵelement(81,"input",31),c.ɵɵtext(82,"\n "),c.ɵɵelement(83,"input",32),c.ɵɵtext(84,"\n "),c.ɵɵelement(85,"input",33),c.ɵɵtext(86,"\n "),c.ɵɵelement(87,"input",34),c.ɵɵtext(88,"\n "),c.ɵɵelement(89,"input",35),c.ɵɵtext(90,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(91,"\n")),2&e){var n=c.ɵɵreference(1);c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(6,18,"cancel")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,20,"addCredit")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.showOptions),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(24,22,"amount")),c.ɵɵadvance(9),c.ɵɵproperty("ngModel",t.creditAmount),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(39,24,"creditDelayed")),c.ɵɵadvance(4),c.ɵɵproperty("disabled",n.loading||t.ppLoading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(45,26,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(49,28,"submit")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(54,30,"cancel"),"\n "),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("action",t.ppButtonFormAction,c.ɵɵsanitizeUrl),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("value",t.ppButtonBusinessId),c.ɵɵadvance(10),c.ɵɵpropertyInterpolate("value",t.returnUrl),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("value",t.returnUrl),c.ɵɵadvance(8),c.ɵɵpropertyInterpolate("value",t.creditAmount),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("value",t.ppButtonCustomField),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("value",t.subject)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,f.A11yTitleDirective,v.NgIf,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,m.ɵangular_packages_forms_forms_y,m.RadioControlValueAccessor],pipes:[y.I18nPipe],encapsulation:2}),e}();t.AddCreditComponent=b},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(3),n(867)),s=n(255),l=n(117),c=n(142),p=n(0),u=n(6),d=n(3),m=n(9),h=n(13),f=n(16),v=n(17),y=n(117),g=n(142),x=n(10),b=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n,this.onAdjusted=new o.EventEmitter,this.onCanceled=new o.EventEmitter,this.paymentMethodType=s.PaymentMethodType}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=new a.PaymentRequest,this.formPromise=this.paymentComponent.createPaymentToken().then((function(n){return e.paymentToken=n[0],e.paymentMethodType=n[1],e.postalCode=t.taxInfoComponent.taxInfo.postalCode,e.country=t.taxInfoComponent.taxInfo.country,null==t.organizationId?t.apiService.postAccountPayment(e):(e.taxId=t.taxInfoComponent.taxInfo.taxId,e.state=t.taxInfoComponent.taxInfo.state,e.line1=t.taxInfoComponent.taxInfo.line1,e.line2=t.taxInfoComponent.taxInfo.line2,e.city=t.taxInfoComponent.taxInfo.city,e.state=t.taxInfoComponent.taxInfo.state,t.apiService.postOrganizationPayment(t.organizationId,e))})),[4,this.formPromise];case 1:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("updatedPaymentMethod")),this.onAdjusted.emit(),[3,3];case 2:return n.sent(),[3,3];case 3:return[2]}}))}))},e.prototype.cancel=function(){this.onCanceled.emit()},e.prototype.changeCountry=function(){"US"===this.taxInfoComponent.taxInfo.country?this.paymentComponent.hideBank=!this.organizationId:(this.paymentComponent.hideBank=!0,this.paymentComponent.method===s.PaymentMethodType.BankAccount&&(this.paymentComponent.method=s.PaymentMethodType.Card,this.paymentComponent.changeMethod()))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-adjust-payment"]],viewQuery:function(e,t){var n;(1&e&&(p.ɵɵstaticViewQuery(l.PaymentComponent,!0),p.ɵɵstaticViewQuery(c.TaxInfoComponent,!0)),2&e)&&(p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.paymentComponent=n.first),p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.taxInfoComponent=n.first))},inputs:{currentType:"currentType",organizationId:"organizationId"},outputs:{onAdjusted:"onAdjusted",onCanceled:"onCanceled"},decls:34,vars:19,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"hideBank","hideCredit"],[3,"onCountryChanged"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"form",0,1),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",2),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"button",3),p.ɵɵlistener("click",(function(){return t.cancel()})),p.ɵɵpipe(6,"i18n"),p.ɵɵelementStart(7,"span",4),p.ɵɵtext(8,"×"),p.ɵɵelementEnd(),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"h3",5),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelement(14,"app-payment",6),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"app-tax-info",7),p.ɵɵlistener("onCountryChanged",(function(){return t.changeCountry()})),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"button",8),p.ɵɵtext(19,"\n "),p.ɵɵelement(20,"i",9),p.ɵɵpipe(21,"i18n"),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"span"),p.ɵɵtext(24),p.ɵɵpipe(25,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementStart(28,"button",10),p.ɵɵlistener("click",(function(){return t.cancel()})),p.ɵɵtext(29),p.ɵɵpipe(30,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(31,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n")),2&e){var n=p.ɵɵreference(1);p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(6,9,"cancel")),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,11,null!=t.currentType?"changePaymentMethod":"addPaymentMethod")),p.ɵɵadvance(3),p.ɵɵproperty("hideBank",!t.organizationId)("hideCredit",!0),p.ɵɵadvance(4),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(21,13,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(25,15,"submit")),p.ɵɵadvance(5),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(30,17,"cancel"),"\n ")}},directives:[h.NgControlStatusGroup,h.NgForm,f.ApiActionDirective,v.A11yTitleDirective,y.PaymentComponent,g.TaxInfoComponent],pipes:[x.I18nPipe],encapsulation:2}),e}();t.AdjustPaymentComponent=b},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(3),n(0)),s=n(6),l=n(3),c=n(9),p=n(13),u=n(16),d=n(10),m=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n,this.onUpdated=new o.EventEmitter,this.onCanceled=new o.EventEmitter}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o=this;return i(this,(function(i){switch(i.label){case 0:if(e=document.getElementById("file"),null==(t=e.files)||0===t.length)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),(n=new FormData).append("license",t[0]),r=null,r=null==this.organizationId?this.apiService.postAccountLicense(n):this.apiService.postOrganizationLicenseUpdate(this.organizationId,n),this.formPromise=r.then((function(){return o.apiService.refreshIdentityToken()})),[4,this.formPromise];case 2:return i.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("updatedLicense")),this.onUpdated.emit(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.cancel=function(){this.onCanceled.emit()},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ToasterService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-update-license"]],inputs:{organizationId:"organizationId"},outputs:{onUpdated:"onUpdated",onCanceled:"onCanceled"},decls:31,vars:18,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"label",3),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelement(9,"input",4),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"small",5),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"button",6),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"i",7),a.ɵɵpipe(19,"i18n"),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"span"),a.ɵɵtext(22),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"button",8),a.ɵɵlistener("click",(function(){return t.cancel()})),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n")),2&e){var n=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,7,"licenseFile")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(13,9,"licenseFileDesc",t.organizationId?"bitwarden_organization_license.json":"bitwarden_premium_license.json")),a.ɵɵadvance(4),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(19,12,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(23,14,"submit")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(28,16,"cancel"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective],pipes:[d.I18nPipe],encapsulation:2}),e}();t.UpdateLicenseComponent=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Free=0]="Free",e[e.Families=1]="Families",e[e.Teams=2]="Teams",e[e.Enterprise=3]="Enterprise"}(t.ProductType||(t.ProductType={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(9),n(6),n(3),n(871)),s=n(117),l=n(0),c=n(6),p=n(3),u=n(9),d=n(8),m=n(13),h=n(16),f=n(17),v=n(4),y=n(117),g=n(10);function x(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",16),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"strong"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5),l.ɵɵpipe(6,"currency"),l.ɵɵpipe(7,"currency"),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(4,5,"total"),":"),l.ɵɵadvance(2),l.ɵɵtextInterpolate4(" ",n.storageAdjustment||0," GB × ",l.ɵɵpipeBind2(6,7,n.storageGbPrice,"$"),"\n = ",l.ɵɵpipeBind2(7,10,n.adjustedStorageTotal,"$")," /",l.ɵɵpipeBind1(8,13,n.interval),"\n ")}}var b=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.router=r,this.activatedRoute=i,this.storageGbPrice=0,this.add=!0,this.interval="year",this.onAdjusted=new o.EventEmitter,this.onCanceled=new o.EventEmitter,this.storageAdjustment=0}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,o=this;return i(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),(e=new a.StorageRequest).storageGbAdjustment=this.storageAdjustment,this.add||(e.storageGbAdjustment*=-1),t=!1,n=function(){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,null==this.organizationId?this.formPromise=this.apiService.postAccountStorage(e):this.formPromise=this.apiService.postOrganizationStorage(this.organizationId,e)];case 1:if(null==(n=r.sent())||null==n.paymentIntentClientSecret)return[3,5];r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.paymentComponent.handleStripeCardPayment(n.paymentIntentClientSecret,null)];case 3:return r.sent(),[3,5];case 4:return r.sent(),t=!0,[3,5];case 5:return[2]}}))}))},this.formPromise=n(),[4,this.formPromise];case 1:return s.sent(),this.onAdjusted.emit(this.storageAdjustment),t?(this.toasterService.popAsync({body:this.i18nService.t("couldNotChargeCardPayInvoice"),type:"warning",timeout:1e4}),this.router.navigate(["../billing"],{relativeTo:this.activatedRoute})):this.toasterService.popAsync("success",null,this.i18nService.t("adjustedStorage",e.storageGbAdjustment.toString())),[3,3];case 2:return s.sent(),[3,3];case 3:return[2]}}))}))},e.prototype.cancel=function(){this.onCanceled.emit()},Object.defineProperty(e.prototype,"adjustedStorageTotal",{get:function(){return this.storageGbPrice*this.storageAdjustment},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService),l.ɵɵdirectiveInject(d.Router),l.ɵɵdirectiveInject(d.ActivatedRoute))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-adjust-storage"]],viewQuery:function(e,t){var n;(1&e&&l.ɵɵstaticViewQuery(s.PaymentComponent,!0),2&e)&&(l.ɵɵqueryRefresh(n=l.ɵɵloadQuery())&&(t.paymentComponent=n.first))},inputs:{storageGbPrice:"storageGbPrice",add:"add",organizationId:"organizationId",interval:"interval"},outputs:{onAdjusted:"onAdjusted",onCanceled:"onCanceled"},decls:50,vars:26,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"row"],[1,"form-group","col-6"],["for","storageAdjustment"],["id","storageAdjustment","type","number","name","StroageGbAdjustment","min","0","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["class","mb-3",4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"d-block","text-muted","mt-3"],[3,"showMethods"],[1,"mb-3"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"button",3),l.ɵɵlistener("click",(function(){return t.cancel()})),l.ɵɵpipe(6,"i18n"),l.ɵɵelementStart(7,"span",4),l.ɵɵtext(8,"×"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"h3",5),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"div",6),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"div",7),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"label",8),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"input",9),l.ɵɵlistener("ngModelChange",(function(e){return t.storageAdjustment=e})),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,x,9,15,"div",10),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"button",11),l.ɵɵtext(29,"\n "),l.ɵɵelement(30,"i",12),l.ɵɵpipe(31,"i18n"),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"span"),l.ɵɵtext(34),l.ɵɵpipe(35,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"button",13),l.ɵɵlistener("click",(function(){return t.cancel()})),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"small",14),l.ɵɵtext(43),l.ɵɵpipe(44,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n"),l.ɵɵelement(48,"app-payment",15),l.ɵɵtext(49,"\n")),2&e){var n=l.ɵɵreference(1);l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(6,12,"cancel")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,14,t.add?"addStorage":"removeStorage")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,16,t.add?"gbStorageAdd":"gbStorageRemove")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.storageAdjustment),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",t.add),l.ɵɵadvance(2),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(31,18,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(35,20,"submit")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(40,22,"cancel"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(44,24,t.add?"storageAddNote":"storageRemoveNote"),"\n "),l.ɵɵadvance(5),l.ɵɵproperty("showMethods",!1)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,f.A11yTitleDirective,m.NumberValueAccessor,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,v.NgIf,y.PaymentComponent],pipes:[g.I18nPipe,v.CurrencyPipe],encapsulation:2}),e}();t.AdjustStorageComponent=b},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3),n(5);var s=n(113),l=n(872),c=n(256),p=n(0),u=n(6),d=n(3),m=n(9),h=n(5),f=n(17),v=n(4),y=n(188),g=n(13),x=n(16),b=n(24),S=n(45),w=n(10);function C(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"app-two-factor-verify",9),p.ɵɵlistener("onAuthed",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().auth(e)})),p.ɵɵtext(1,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵproperty("organizationId",r.organizationId)("type",r.type)}}function I(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"app-callout",18),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4),p.ɵɵpipe(5,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelement(7,"img",19),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"strong"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12),p.ɵɵelement(13,"br"),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"strong"),p.ɵɵtext(16),p.ɵɵpipe(17,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(18),p.ɵɵelement(19,"br"),p.ɵɵtext(20,"\n "),p.ɵɵelementStart(21,"strong"),p.ɵɵtext(22),p.ɵɵpipe(23,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(24),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,8,"enabled")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(5,10,"twoStepLoginProviderEnabled"),"\n "),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(11,12,"twoFactorDuoIntegrationKey"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1(" ",n.ikey,"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(17,14,"twoFactorDuoSecretKey"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1(" ",n.skey,"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(23,16,"twoFactorDuoApiHostname"),":"),p.ɵɵadvance(2),p.ɵɵtextInterpolate1(" ",n.host,"\n ")}}function E(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"img",19),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"p"),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"div",20),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"label",21),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"input",22),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).ikey=e})),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"div",20),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"label",23),p.ɵɵtext(20),p.ɵɵpipe(21,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"input",24),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).skey=e})),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"div",20),p.ɵɵtext(27,"\n "),p.ɵɵelementStart(28,"label",25),p.ɵɵtext(29),p.ɵɵpipe(30,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(31,"\n "),p.ɵɵelementStart(32,"input",26),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).host=e})),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n "),p.ɵɵelementContainerEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,8,"twoFactorDuoDesc")),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,10,"twoFactorDuoIntegrationKey")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.ikey),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(21,12,"twoFactorDuoSecretKey")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.skey),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(30,14,"twoFactorDuoApiHostname")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate1("placeholder","",p.ɵɵpipeBind1(33,16,"ex")," api-xxxxxxxx.duosecurity.com"),p.ɵɵproperty("ngModel",r.host)}}function P(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"enable")))}function k(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"disable")))}function _(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",10,11),p.ɵɵlistener("ngSubmit",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().submit()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",12),p.ɵɵtext(4,"\n "),p.ɵɵtemplate(5,I,25,18,"ng-container",13),p.ɵɵtext(6,"\n "),p.ɵɵtemplate(7,E,36,18,"ng-container",13),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"div",14),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"button",15),p.ɵɵtext(13,"\n "),p.ɵɵelement(14,"i",16),p.ɵɵpipe(15,"i18n"),p.ɵɵtext(16,"\n "),p.ɵɵtemplate(17,P,3,3,"span",13),p.ɵɵtext(18,"\n "),p.ɵɵtemplate(19,k,3,3,"span",13),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"button",17),p.ɵɵtext(23),p.ɵɵpipe(24,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(1),i=p.ɵɵnextContext();p.ɵɵproperty("appApiAction",i.formPromise),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",i.enabled),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!i.enabled),p.ɵɵadvance(5),p.ɵɵproperty("disabled",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(15,8,"loading")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!i.enabled),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",i.enabled),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(24,10,"close"))}}var A=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.type=s.TwoFactorProviderType.Duo,o}return i(t,e),t.prototype.auth=function(t){e.prototype.auth.call(this,t),this.processResponse(t.response)},t.prototype.submit=function(){return this.enabled?e.prototype.disable.call(this,this.formPromise):this.enable()},t.prototype.enable=function(){var t=this,n=new l.UpdateTwoFactorDuoRequest;return n.masterPasswordHash=this.masterPasswordHash,n.integrationKey=this.ikey,n.secretKey=this.skey,n.host=this.host,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return null!=this.organizationId?this.formPromise=this.apiService.putTwoFactorOrganizationDuo(this.organizationId,n):this.formPromise=this.apiService.putTwoFactorDuo(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),[2]}}))}))}))},t.prototype.processResponse=function(e){this.ikey=e.integrationKey,this.skey=e.secretKey,this.host=e.host,this.enabled=e.enabled},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(h.PlatformUtilsService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-duo"]],features:[p.ɵɵInheritDefinitionFeature],decls:30,vars:8,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faDuoTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["title","2faDuoTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","fa-check-circle",3,"title"],["src","images/2.png","alt","",1,"float-right","ml-3"],[1,"form-group"],["for","ikey"],["id","ikey","type","text","name","IntegrationKey","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","skey"],["id","skey","type","password","name","SecretKey","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["for","host"],["id","host","type","text","name","Host","required","","appInputVerbatim","",1,"form-control",3,"ngModel","placeholder","ngModelChange"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",2),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"div",3),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"h2",4),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementStart(11,"small"),p.ɵɵtext(12,"Duo"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"button",5),p.ɵɵpipe(16,"i18n"),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"span",6),p.ɵɵtext(19,"×"),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵtemplate(23,C,2,2,"app-two-factor-verify",7),p.ɵɵtext(24,"\n "),p.ɵɵtemplate(25,_,27,12,"form",8),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n")),2&e&&(p.ɵɵadvance(9),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(10,4,"twoStepLogin"),"\n "),p.ɵɵadvance(6),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(16,6,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",!t.authed),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.authed))},directives:[f.A11yTitleDirective,v.NgIf,y.TwoFactorVerifyComponent,g.NgControlStatusGroup,g.NgForm,x.ApiActionDirective,b.CalloutComponent,g.DefaultValueAccessor,g.RequiredValidator,S.InputVerbatimDirective,g.NgControlStatus,g.NgModel],pipes:[w.I18nPipe],encapsulation:2}),t}(c.TwoFactorBaseComponent);t.TwoFactorDuoComponent=A},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(6),n(14),n(43),n(7),n(278)),s=n(141),l=n(113),c=n(84),p=n(588),u=n(477),d=n(589),m=n(590),h=n(591),f=n(592),v=n(0),y=n(6),g=n(7),x=n(14),b=n(43),S=n(4),w=n(24),C=n(37),I=n(10),E=["recoveryTemplate"],P=["authenticatorTemplate"],k=["yubikeyTemplate"],_=["duoTemplate"],A=["emailTemplate"],O=["webAuthnTemplate"];function T(e,t){1&e&&(v.ɵɵelementStart(0,"p"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"twoStepLoginDesc")))}function M(e,t){1&e&&(v.ɵɵelementStart(0,"p"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"twoStepLoginOrganizationDesc")))}function B(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"app-callout",12),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"p"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"button",13),v.ɵɵlistener("click",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext().recoveryCode()})),v.ɵɵtext(7),v.ɵɵpipe(8,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,2,"twoStepLoginRecoveryWarning")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(8,4,"viewRecoveryCode")))}function D(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",14),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",15),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function R(e,t){1&e&&(v.ɵɵelementStart(0,"app-callout",12),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,1,"twoStepLoginPolicyUserWarning"),"\n"))}function V(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",24),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",15),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"enabled")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"enabled")))}function j(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",25),v.ɵɵlistener("click",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).premiumRequired()})),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,1,"premium"),"\n "))}function F(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"li",16),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",17),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"img",18),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n "),v.ɵɵelementStart(7,"div",19),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"h3",20),v.ɵɵtext(10),v.ɵɵtemplate(11,V,9,6,"ng-container",1),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,j,3,3,"a",21),v.ɵɵtext(14,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(15),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"div",22),v.ɵɵtext(18,"\n "),v.ɵɵelementStart(19,"button",23),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=t.$implicit;return v.ɵɵnextContext().manage(e.type)})),v.ɵɵtext(20),v.ɵɵpipe(21,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(23,"\n "),v.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=v.ɵɵnextContext();v.ɵɵadvance(4),v.ɵɵproperty("src","images/two-factor/"+r.type+".png",v.ɵɵsanitizeUrl),v.ɵɵadvance(6),v.ɵɵtextInterpolate1("\n ",r.name,"\n "),v.ɵɵadvance(1),v.ɵɵproperty("ngIf",r.enabled),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!i.canAccessPremium&&r.premium),v.ɵɵadvance(2),v.ɵɵtextInterpolate1("\n ",r.description,"\n "),v.ɵɵadvance(4),v.ɵɵproperty("disabled",!i.canAccessPremium&&r.premium),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(21,7,"manage"),"\n ")}}function U(e,t){}function N(e,t){}function z(e,t){}function L(e,t){}function G(e,t){}function K(e,t){}var q=function(e){return{"mt-5":e}},W=function(){function e(e,t,n,r,i){this.apiService=e,this.userService=t,this.componentFactoryResolver=n,this.messagingService=r,this.policyService=i,this.providers=[],this.showPolicyWarning=!1,this.loading=!0,this.modal=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e=this,[4,this.userService.canAccessPremium()];case 1:for(t in e.canAccessPremium=r.sent(),a.TwoFactorProviders)a.TwoFactorProviders.hasOwnProperty(t)&&(n=a.TwoFactorProviders[t],this.filterProvider(n.type)||this.providers.push({type:n.type,name:n.name,description:n.description,enabled:!1,premium:n.premium,sort:n.sort}));return this.providers.sort((function(e,t){return e.sort-t.sort})),[4,this.load()];case 2:return r.sent(),[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){switch(t.label){case 0:return this.loading=!0,[4,this.getTwoFactorProviders()];case 1:return t.sent().data.forEach((function(t){e.providers.forEach((function(e){t.type===e.type&&(e.enabled=t.enabled)}))})),this.evaluatePolicies(),this.loading=!1,[2]}}))}))},e.prototype.manage=function(e){var t=this;switch(e){case l.TwoFactorProviderType.Authenticator:this.openModal(this.authenticatorModalRef,p.TwoFactorAuthenticatorComponent).onUpdated.subscribe((function(e){t.updateStatus(e,l.TwoFactorProviderType.Authenticator)}));break;case l.TwoFactorProviderType.Yubikey:this.openModal(this.yubikeyModalRef,f.TwoFactorYubiKeyComponent).onUpdated.subscribe((function(e){t.updateStatus(e,l.TwoFactorProviderType.Yubikey)}));break;case l.TwoFactorProviderType.Duo:this.openModal(this.duoModalRef,u.TwoFactorDuoComponent).onUpdated.subscribe((function(e){t.updateStatus(e,l.TwoFactorProviderType.Duo)}));break;case l.TwoFactorProviderType.Email:this.openModal(this.emailModalRef,d.TwoFactorEmailComponent).onUpdated.subscribe((function(e){t.updateStatus(e,l.TwoFactorProviderType.Email)}));break;case l.TwoFactorProviderType.WebAuthn:this.openModal(this.webAuthnModalRef,h.TwoFactorWebAuthnComponent).onUpdated.subscribe((function(e){t.updateStatus(e,l.TwoFactorProviderType.WebAuthn)}))}},e.prototype.recoveryCode=function(){this.openModal(this.recoveryModalRef,m.TwoFactorRecoveryComponent)},e.prototype.premiumRequired=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.canAccessPremium||this.messagingService.send("premiumRequired"),[2]}))}))},e.prototype.getTwoFactorProviders=function(){return this.apiService.getTwoFactorProviders()},e.prototype.filterProvider=function(e){return e===l.TwoFactorProviderType.OrganizationDuo},e.prototype.openModal=function(e,t){var n=this;null!=this.modal&&this.modal.close();var r=this.componentFactoryResolver.resolveComponentFactory(c.ModalComponent);this.modal=e.createComponent(r).instance;var i=this.modal.show(t,e);return this.modal.onClosed.subscribe((function(){n.modal=null})),i},e.prototype.updateStatus=function(e,t){e||null==this.modal||this.modal.close(),this.providers.forEach((function(n){n.type===t&&(n.enabled=e)})),this.evaluatePolicies()},e.prototype.evaluatePolicies=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.organizationId||1!==this.providers.filter((function(e){return e.enabled})).length?[3,2]:[4,this.policyService.getAll(s.PolicyType.TwoFactorAuthentication)];case 1:return e=t.sent(),this.showPolicyWarning=null!=e&&e.some((function(e){return e.enabled})),[3,3];case 2:this.showPolicyWarning=!1,t.label=3;case 3:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(v.ɵɵdirectiveInject(y.ApiService),v.ɵɵdirectiveInject(g.UserService),v.ɵɵdirectiveInject(v.ComponentFactoryResolver),v.ɵɵdirectiveInject(x.MessagingService),v.ɵɵdirectiveInject(b.PolicyService))},e.ɵcmp=v.ɵɵdefineComponent({type:e,selectors:[["app-two-factor-setup"]],viewQuery:function(e,t){var n;(1&e&&(v.ɵɵstaticViewQuery(E,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(P,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(k,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(_,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(A,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(O,!0,o.ViewContainerRef)),2&e)&&(v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.recoveryModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.authenticatorModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.yubikeyModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.duoModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.emailModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.webAuthnModalRef=n.first))},decls:44,vars:15,consts:[[1,"page-header"],[4,"ngIf"],["type","warning",4,"ngIf"],[3,"ngClass"],[1,"list-group","list-group-2fa"],["class","list-group-item d-flex align-items-center",4,"ngFor","ngForOf"],["authenticatorTemplate",""],["recoveryTemplate",""],["duoTemplate",""],["emailTemplate",""],["yubikeyTemplate",""],["webAuthnTemplate",""],["type","warning"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-fw","text-muted",3,"title"],[1,"sr-only"],[1,"list-group-item","d-flex","align-items-center"],[1,"logo-2fa","d-flex","justify-content-center"],["alt","",3,"src"],[1,"mx-4"],[1,"mb-0"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-check","text-success","fa-fw",3,"title"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"]],template:function(e,t){1&e&&(v.ɵɵelementStart(0,"div",0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"h1"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n"),v.ɵɵtemplate(7,T,3,3,"p",1),v.ɵɵtext(8,"\n"),v.ɵɵtemplate(9,M,3,3,"p",1),v.ɵɵtext(10,"\n"),v.ɵɵtemplate(11,B,10,6,"app-callout",2),v.ɵɵtext(12,"\n"),v.ɵɵelementStart(13,"h2",3),v.ɵɵtext(14),v.ɵɵpipe(15,"i18n"),v.ɵɵtemplate(16,D,9,6,"small",1),v.ɵɵtext(17,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n"),v.ɵɵtemplate(19,R,3,3,"app-callout",2),v.ɵɵtext(20,"\n"),v.ɵɵelementStart(21,"ul",4),v.ɵɵtext(22,"\n "),v.ɵɵtemplate(23,F,24,9,"li",5),v.ɵɵtext(24,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(25,"\n\n"),v.ɵɵtemplate(26,U,0,0,"ng-template",null,6,v.ɵɵtemplateRefExtractor),v.ɵɵtext(28,"\n"),v.ɵɵtemplate(29,N,0,0,"ng-template",null,7,v.ɵɵtemplateRefExtractor),v.ɵɵtext(31,"\n"),v.ɵɵtemplate(32,z,0,0,"ng-template",null,8,v.ɵɵtemplateRefExtractor),v.ɵɵtext(34,"\n"),v.ɵɵtemplate(35,L,0,0,"ng-template",null,9,v.ɵɵtemplateRefExtractor),v.ɵɵtext(37,"\n"),v.ɵɵtemplate(38,G,0,0,"ng-template",null,10,v.ɵɵtemplateRefExtractor),v.ɵɵtext(40,"\n"),v.ɵɵtemplate(41,K,0,0,"ng-template",null,11,v.ɵɵtemplateRefExtractor),v.ɵɵtext(43,"\n")),2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,9,"twoStepLogin")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",!t.organizationId),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.organizationId),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.organizationId),v.ɵɵadvance(2),v.ɵɵproperty("ngClass",v.ɵɵpureFunction1(13,q,!t.organizationId)),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(15,11,"providers"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.loading),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",t.showPolicyWarning),v.ɵɵadvance(4),v.ɵɵproperty("ngForOf",t.providers))},directives:[S.NgIf,S.NgClass,S.NgForOf,w.CalloutComponent,C.StopClickDirective],pipes:[I.I18nPipe],encapsulation:2}),e}();t.TwoFactorSetupComponent=W},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(18),n(71),n(189),n(3),n(5);var o=n(879),a=n(0),s=n(18),l=n(3),c=n(5),p=n(189),u=n(71),d=n(13),m=n(16),h=n(45),f=n(10),v=function(e){function t(t,n,r,i,o){return e.call(this,t,n,r,i,o,window)||this}return i(t,e),t.prototype.saved=function(){e.prototype.saved.call(this),this.masterPassword=null,this.platformUtilsService.showToast("success",null,this.i18nService.t("exportSuccess"))},t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.CryptoService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(p.ExportService),a.ɵɵdirectiveInject(u.EventService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-export"]],features:[a.ɵɵInheritDefinitionFeature],decls:59,vars:22,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"page-header"],[1,"row"],[1,"form-group","col-6"],["for","format"],["id","format","name","Format",1,"form-control",3,"ngModel","ngModelChange"],["value","json"],["value","csv"],["value","encrypted_json"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPassword","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"h1"),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"p"),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"div",3),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"div",4),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"label",5),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"select",6),a.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"option",7),a.ɵɵtext(25,".json"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"option",8),a.ɵɵtext(28,".csv"),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"option",9),a.ɵɵtext(31,".json (Encrypted)"),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"div",3),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",4),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"label",10),a.ɵɵtext(41),a.ɵɵpipe(42,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelementStart(44,"input",11),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(45,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"button",12),a.ɵɵtext(49,"\n "),a.ɵɵelement(50,"i",13),a.ɵɵpipe(51,"i18n"),a.ɵɵtext(52,"\n "),a.ɵɵelementStart(53,"span"),a.ɵɵtext(54),a.ɵɵpipe(55,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n")),2&e){var n=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,10,"exportVault")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,12,"exportMasterPassword")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(20,14,"fileFormat")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.format),a.ɵɵadvance(19),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(42,16,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(4),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(51,18,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(55,20,"exportVault"))}},directives:[d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,d.SelectControlValueAccessor,d.NgControlStatus,d.NgModel,d.NgSelectOption,d.ɵangular_packages_forms_forms_x,d.DefaultValueAccessor,d.RequiredValidator,h.InputVerbatimDirective],pipes:[f.I18nPipe],encapsulation:2}),t}(o.ExportComponent);t.ExportComponent=v},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(87),n(19),n(14),n(7);var s=n(39),l=n(257),c=n(0),p=n(19),u=n(87),d=n(14),m=n(7),h=n(4),f=n(24),v=n(107),y=n(37),g=n(53),x=n(10);function b(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",8),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"goodNews")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"noExposedPasswords"),"\n "))}function S(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"a",19),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).selectCipher(e)})),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementContainerEnd()}if(2&e){var r=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"editItem")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(r.name)}}function w(e,t){if(1&e&&(c.ɵɵtext(0,"\n "),c.ɵɵelementStart(1,"span"),c.ɵɵtext(2),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n ")),2&e){var n=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵtextInterpolate(n.name)}}function C(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",20),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",21),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"shared")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",22),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",21),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"attachments")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",12),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"app-vault-icon",13),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",14),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,S,6,4,"ng-container",15),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,w,4,1,"ng-template",null,16,c.ɵɵtemplateRefExtractor),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,C,9,6,"ng-container",7),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,I,9,6,"ng-container",7),c.ɵɵtext(17,"\n "),c.ɵɵelement(18,"br"),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"small"),c.ɵɵtext(21),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"td",17),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"span",18),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵpipe(29,"number"),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd()),2&e){var n=t.$implicit,r=c.ɵɵreference(12),i=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("cipher",n),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(n))("ngIfElse",r),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!i.organization&&n.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.hasAttachments),c.ɵɵadvance(5),c.ɵɵtextInterpolate(n.subTitle),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(28,7,"exposedXTimes",c.ɵɵpipeBind1(29,10,i.exposedPasswordMap.get(n.id))),"\n ")}}function P(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"app-callout",9),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵpipe(5,"i18n"),c.ɵɵpipe(6,"number"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"table",10),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"tbody"),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,E,32,12,"tr",11),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementContainerEnd()),2&e){var n=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"exposedPasswordsFound")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(5,5,"exposedPasswordsFoundDesc",c.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),c.ɵɵadvance(8),c.ɵɵproperty("ngForOf",n.ciphers)}}function k(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",5),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,b,4,6,"app-callout",6),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,P,16,10,"ng-container",7),c.ɵɵtext(5,"\n"),c.ɵɵelementEnd()),2&e){var n=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.ciphers.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.ciphers.length)}}function _(e,t){}var A=function(e){function t(t,n,r,i,o){var a=e.call(this,r,o,i,!0)||this;return a.cipherService=t,a.auditService=n,a.exposedPasswordMap=new Map,a}return i(t,e),t.prototype.ngOnInit=function(){this.checkAccess()},t.prototype.load=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.checkAccess()];case 1:return t.sent()&&e.prototype.load.call(this),[2]}}))}))},t.prototype.setCiphers=function(){return o(this,void 0,void 0,(function(){var e,t,n,r=this;return a(this,(function(i){switch(i.label){case 0:return[4,this.getAllCiphers()];case 1:return e=i.sent(),t=[],n=[],e.forEach((function(e){if(e.type===s.CipherType.Login&&null!=e.login.password&&""!==e.login.password&&!e.isDeleted){var i=r.auditService.passwordLeaked(e.login.password).then((function(n){n>0&&(t.push(e),r.exposedPasswordMap.set(e.id,n))}));n.push(i)}})),[4,Promise.all(n)];case 2:return i.sent(),this.ciphers=t,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(p.CipherService),c.ɵɵdirectiveInject(u.AuditService),c.ɵɵdirectiveInject(c.ComponentFactoryResolver),c.ɵɵdirectiveInject(d.MessagingService),c.ɵɵdirectiveInject(m.UserService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-exposed-passwords-report"]],features:[c.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["type","button",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],[4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n"),c.ɵɵelementStart(7,"p"),c.ɵɵtext(8),c.ɵɵpipe(9,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n"),c.ɵɵelementStart(11,"button",1),c.ɵɵlistener("click",(function(){return t.load()})),c.ɵɵtext(12,"\n "),c.ɵɵelement(13,"i",2),c.ɵɵpipe(14,"i18n"),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"span"),c.ɵɵtext(17),c.ɵɵpipe(18,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n"),c.ɵɵtemplate(21,k,6,2,"div",3),c.ɵɵtext(22,"\n"),c.ɵɵtemplate(23,_,0,0,"ng-template",null,4,c.ɵɵtemplateRefExtractor),c.ɵɵtext(25,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),c.ɵɵadvance(3),c.ɵɵproperty("disabled",t.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(14,10,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(18,12,"checkExposedPasswords")),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,f.CalloutComponent,h.NgForOf,v.IconComponent,y.StopClickDirective,g.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(l.CipherReportComponent);t.ExposedPasswordsReportComponent=A},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(6),n(87),n(19),n(40),n(71),n(48),n(3),n(14),n(36),n(5),n(43),n(38),n(114),n(7);var s=n(158),l=n(190),c=n(598),p=n(210),u=n(260),d=n(0),m=n(19),h=n(48),f=n(3),v=n(5),y=n(87),g=n(38),x=n(7),b=n(40),S=n(114),w=n(36),C=n(6),I=n(14),E=n(71),P=n(43),k=n(13),_=n(16),A=n(17),O=n(4),T=n(24),M=n(65),B=n(45),D=n(37),R=n(267),V=n(291),j=n(10);function F(e,t){1&e&&(d.ɵɵelementStart(0,"app-callout",28),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function U(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.value),d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function N(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",16),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",17),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"label",29),d.ɵɵtext(5),d.ɵɵpipe(6,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"select",30),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.type=e})),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,U,2,2,"option",31),d.ɵɵtext(11,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(6,4,"whatTypeOfItem")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.type)("disabled",r.cipher.isDeleted),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.typeOptions)}}function z(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.id),d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function L(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",17),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"label",33),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"select",34),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.folderId=e})),d.ɵɵtext(7,"\n "),d.ɵɵtemplate(8,z,2,2,"option",31),d.ɵɵtext(9,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(10,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,4,"folder")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.folderId)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.folders)}}function G(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",43),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"button",52),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext(3);return e.copy(e.cipher.login.username,"username","Username")})),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelement(5,"i",46),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(3,1,"copyUsername")))}function K(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",59),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(4).generatePassword()})),d.ɵɵpipe(1,"i18n"),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"i",60),d.ɵɵtext(4,"\n "),d.ɵɵelementEnd()}2&e&&d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(1,1,"generatePassword"))}function q(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",53),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,K,5,3,"a",54),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"a",55,56),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(3).checkPassword()})),d.ɵɵpipe(6,"i18n"),d.ɵɵtext(7,"\n "),d.ɵɵelement(8,"i",57),d.ɵɵtext(9,"\n "),d.ɵɵelement(10,"i",58),d.ɵɵpipe(11,"i18n"),d.ɵɵtext(12,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵreference(5),i=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵproperty("ngIf",i.cipher.viewPassword),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(6,6,"checkPassword")),d.ɵɵproperty("appApiAction",i.checkPasswordPromise),d.ɵɵadvance(4),d.ɵɵproperty("hidden",r.loading),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(11,8,"loading")),d.ɵɵproperty("hidden",!r.loading)}}function W(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",63),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(4).premiumRequired()})),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(2,1,"premium"),"\n "))}function H(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",63),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(4).upgradeOrganization()})),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function $(e,t){if(1&e&&(d.ɵɵelementStart(0,"div"),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"img",61),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵtemplate(5,W,3,3,"a",62),d.ɵɵtext(6,"\n "),d.ɵɵtemplate(7,H,3,3,"a",62),d.ɵɵtext(8,"\n "),d.ɵɵelementEnd()),2&e){var n=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,3,"verificationCodeTotp")),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!n.organization&&!n.cipher.organizationId&&!n.canAccessPremium),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.organization&&!n.organization.useTotp||!n.organization&&!n.canAccessPremium&&n.cipher.organizationId&&!n.cipher.organizationUseTotp)}}var Y=function(e){return{"stroke-dashoffset.px":e}};function Q(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",64),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"span",65),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"span",66),d.ɵɵtext(5),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵnamespaceSVG(),d.ɵɵelementStart(7,"svg"),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"g"),d.ɵɵtext(10,"\n "),d.ɵɵelement(11,"circle",67),d.ɵɵtext(12,"\n "),d.ɵɵelement(13,"circle",68),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(17,"\n "),d.ɵɵnamespaceHTML(),d.ɵɵelementStart(18,"span",69),d.ɵɵpipe(19,"i18n"),d.ɵɵtext(20),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelementStart(22,"button",70),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext(3);return e.copy(e.totpCode,"verificationCodeTotp","TOTP")})),d.ɵɵpipe(23,"i18n"),d.ɵɵtext(24,"\n "),d.ɵɵelement(25,"i",71),d.ɵɵtext(26,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(27,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(3);d.ɵɵadvance(5),d.ɵɵtextInterpolate(r.totpSec),d.ɵɵadvance(6),d.ɵɵproperty("ngStyle",d.ɵɵpureFunction1(9,Y,r.totpDash)),d.ɵɵadvance(7),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(19,5,"verificationCodeTotp")),d.ɵɵadvance(2),d.ɵɵtextInterpolate(r.totpCodeFormatted),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function J(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.value),d.ɵɵadvance(1),d.ɵɵtextInterpolate1("",n.name,"\n ")}}function X(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",82),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext().$implicit;return d.ɵɵnextContext(4).removeUri(e)})),d.ɵɵpipe(1,"i18n"),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"i",83),d.ɵɵtext(4,"\n "),d.ɵɵelementEnd()}2&e&&d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(1,1,"remove"))}function Z(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",16),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",73),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"label",74),d.ɵɵtext(5),d.ɵɵpipe(6,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",36),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"input",75),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),t.$implicit.uri=e})),d.ɵɵpipe(11,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementStart(13,"div",43),d.ɵɵtext(14,"\n "),d.ɵɵelementStart(15,"button",44),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=t.$implicit;return d.ɵɵnextContext(4).launch(e)})),d.ɵɵpipe(16,"i18n"),d.ɵɵtext(17,"\n "),d.ɵɵelement(18,"i",76),d.ɵɵtext(19,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n "),d.ɵɵelementStart(21,"button",52),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=t.$implicit;return d.ɵɵnextContext(4).copy(e.uri,"uri","URI")})),d.ɵɵpipe(22,"i18n"),d.ɵɵtext(23,"\n "),d.ɵɵelement(24,"i",46),d.ɵɵtext(25,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(26,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(27,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(28,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(29,"\n "),d.ɵɵelementStart(30,"div",77),d.ɵɵtext(31,"\n "),d.ɵɵelementStart(32,"div",39),d.ɵɵtext(33,"\n "),d.ɵɵelementStart(34,"label",74),d.ɵɵtext(35),d.ɵɵpipe(36,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(37,"\n "),d.ɵɵelementStart(38,"a",78),d.ɵɵpipe(39,"i18n"),d.ɵɵtext(40,"\n "),d.ɵɵelement(41,"i",79),d.ɵɵtext(42,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(43,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(44,"\n "),d.ɵɵelementStart(45,"div",39),d.ɵɵtext(46,"\n "),d.ɵɵelementStart(47,"select",80),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),t.$implicit.match=e}))("change",(function(){d.ɵɵrestoreView(n);var e=t.$implicit;return d.ɵɵnextContext(4).loginUriMatchChanged(e)})),d.ɵɵtext(48,"\n "),d.ɵɵtemplate(49,J,2,2,"option",31),d.ɵɵtext(50,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(51,"\n "),d.ɵɵtemplate(52,X,5,3,"button",81),d.ɵɵtext(53,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(54,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(55,"\n "),d.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=d.ɵɵnextContext(4);d.ɵɵadvance(4),d.ɵɵpropertyInterpolate1("for","loginUri",i,""),d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind2(6,19,"uriPosition",i+1)),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate1("id","loginUri",i,""),d.ɵɵpropertyInterpolate1("name","Login.Uris[",i,"].Uri"),d.ɵɵpropertyInterpolate1("placeholder","",d.ɵɵpipeBind1(11,22,"ex")," https://google.com"),d.ɵɵproperty("ngModel",r.uri)("disabled",o.cipher.isDeleted||o.viewOnly),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(16,24,"launch")),d.ɵɵproperty("disabled",!r.canLaunch),d.ɵɵadvance(6),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(22,26,"copyUri")),d.ɵɵadvance(13),d.ɵɵpropertyInterpolate1("for","loginUriMatch",i,""),d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(39,30,"learnMore")),d.ɵɵadvance(9),d.ɵɵpropertyInterpolate1("id","loginUriMatch",i,""),d.ɵɵpropertyInterpolate1("name","Login.Uris[",i,"].Match"),d.ɵɵproperty("ngModel",r.match)("disabled",o.cipher.isDeleted||o.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",o.uriMatchOptions),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly)}}function ee(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,Z,56,32,"div",72),d.ɵɵtext(3,"\n "),d.ɵɵelementContainerEnd()),2&e){var n=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",n.cipher.login.uris)("ngForTrackBy",n.trackByFunction)}}function te(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",84),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(3).addUri()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",85),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(4,1,"newUri"),"\n "))}var ne=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},re=function(e){return{low:e}};function ie(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",16),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",17),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"label",35),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"div",36),d.ɵɵtext(11,"\n "),d.ɵɵelementStart(12,"input",37),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.login.username=e})),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵtemplate(14,G,8,3,"div",38),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(17,"\n "),d.ɵɵelementStart(18,"div",17),d.ɵɵtext(19,"\n "),d.ɵɵelementStart(20,"div",39),d.ɵɵtext(21,"\n "),d.ɵɵelementStart(22,"label",40),d.ɵɵtext(23),d.ɵɵpipe(24,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(25,"\n "),d.ɵɵtemplate(26,q,14,10,"div",41),d.ɵɵtext(27,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(28,"\n "),d.ɵɵelementStart(29,"div",36),d.ɵɵtext(30,"\n "),d.ɵɵelementStart(31,"input",42),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.login.password=e})),d.ɵɵelementEnd(),d.ɵɵtext(32,"\n "),d.ɵɵelementStart(33,"div",43),d.ɵɵtext(34,"\n "),d.ɵɵelementStart(35,"button",44),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).togglePassword()})),d.ɵɵpipe(36,"i18n"),d.ɵɵtext(37,"\n "),d.ɵɵelement(38,"i",45),d.ɵɵtext(39,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(40,"\n "),d.ɵɵelementStart(41,"button",44),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext(2);return e.copy(e.cipher.login.password,"password","Password")})),d.ɵɵpipe(42,"i18n"),d.ɵɵtext(43,"\n "),d.ɵɵelement(44,"i",46),d.ɵɵtext(45,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(46,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(47,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(48,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(49,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(50,"\n "),d.ɵɵelementStart(51,"div",16),d.ɵɵtext(52,"\n "),d.ɵɵelementStart(53,"div",17),d.ɵɵtext(54,"\n "),d.ɵɵelementStart(55,"label",47),d.ɵɵtext(56),d.ɵɵpipe(57,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(58,"\n "),d.ɵɵelementStart(59,"input",48),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.login.totp=e})),d.ɵɵelementEnd(),d.ɵɵtext(60,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(61,"\n "),d.ɵɵelementStart(62,"div",49),d.ɵɵtext(63,"\n "),d.ɵɵtemplate(64,$,9,5,"div",21),d.ɵɵtext(65,"\n "),d.ɵɵtemplate(66,Q,28,11,"div",50),d.ɵɵtext(67,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(68,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(69,"\n "),d.ɵɵtemplate(70,ee,4,2,"ng-container",21),d.ɵɵtext(71,"\n "),d.ɵɵtemplate(72,te,5,3,"a",51),d.ɵɵtext(73,"\n "),d.ɵɵelementContainerEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(8,23,"username")),d.ɵɵadvance(5),d.ɵɵproperty("ngModel",r.cipher.login.username)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!r.cipher.isDeleted),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(24,25,"password")),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),d.ɵɵproperty("ngModel",r.cipher.login.password)("disabled",r.cipher.isDeleted||!r.cipher.viewPassword||r.viewOnly),d.ɵɵadvance(4),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(36,27,"toggleVisibility")),d.ɵɵproperty("disabled",!r.cipher.viewPassword),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(33,ne,!r.showPassword,r.showPassword)),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(42,29,"copyPassword")),d.ɵɵproperty("disabled",!r.cipher.viewPassword),d.ɵɵadvance(15),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("type",r.cipher.viewPassword?"text":"password"),d.ɵɵproperty("ngModel",r.cipher.login.totp)("disabled",r.cipher.isDeleted||!r.cipher.viewPassword||r.viewOnly),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction1(36,re,r.totpLow)),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!r.cipher.login.totp||!r.totpCode),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",r.cipher.login.totp&&r.totpCode),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",r.cipher.login.hasUris),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly)}}function oe(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.value),d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function ae(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.value),d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function se(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",16),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",17),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"label",86),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"input",87),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.card.cardholderName=e})),d.ɵɵelementEnd(),d.ɵɵtext(11,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementStart(13,"div",17),d.ɵɵtext(14,"\n "),d.ɵɵelementStart(15,"label",88),d.ɵɵtext(16),d.ɵɵpipe(17,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementStart(19,"select",89),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.card.brand=e})),d.ɵɵtext(20,"\n "),d.ɵɵtemplate(21,oe,2,2,"option",31),d.ɵɵtext(22,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(23,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(24,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(25,"\n "),d.ɵɵelementStart(26,"div",16),d.ɵɵtext(27,"\n "),d.ɵɵelementStart(28,"div",17),d.ɵɵtext(29,"\n "),d.ɵɵelementStart(30,"label",90),d.ɵɵtext(31),d.ɵɵpipe(32,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n "),d.ɵɵelementStart(34,"div",36),d.ɵɵtext(35,"\n "),d.ɵɵelementStart(36,"input",91),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.card.number=e})),d.ɵɵelementEnd(),d.ɵɵtext(37,"\n "),d.ɵɵelementStart(38,"div",43),d.ɵɵtext(39,"\n "),d.ɵɵelementStart(40,"button",52),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext(2);return e.copy(e.cipher.card.number,"number","Number")})),d.ɵɵpipe(41,"i18n"),d.ɵɵtext(42,"\n "),d.ɵɵelement(43,"i",46),d.ɵɵtext(44,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(45,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(46,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(47,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(48,"\n "),d.ɵɵelementStart(49,"div",92),d.ɵɵtext(50,"\n "),d.ɵɵelementStart(51,"label",93),d.ɵɵtext(52),d.ɵɵpipe(53,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(54,"\n "),d.ɵɵelementStart(55,"select",94),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.card.expMonth=e})),d.ɵɵtext(56,"\n "),d.ɵɵtemplate(57,ae,2,2,"option",31),d.ɵɵtext(58,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(59,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(60,"\n "),d.ɵɵelementStart(61,"div",92),d.ɵɵtext(62,"\n "),d.ɵɵelementStart(63,"label",95),d.ɵɵtext(64),d.ɵɵpipe(65,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(66,"\n "),d.ɵɵelementStart(67,"input",96),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.card.expYear=e})),d.ɵɵpipe(68,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(69,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(70,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(71,"\n "),d.ɵɵelementStart(72,"div",16),d.ɵɵtext(73,"\n "),d.ɵɵelementStart(74,"div",17),d.ɵɵtext(75,"\n "),d.ɵɵelementStart(76,"label",97),d.ɵɵtext(77),d.ɵɵpipe(78,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(79,"\n "),d.ɵɵelementStart(80,"div",36),d.ɵɵtext(81,"\n "),d.ɵɵelementStart(82,"input",98),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.card.code=e})),d.ɵɵelementEnd(),d.ɵɵtext(83,"\n "),d.ɵɵelementStart(84,"div",43),d.ɵɵtext(85,"\n "),d.ɵɵelementStart(86,"button",52),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).toggleCardCode()})),d.ɵɵpipe(87,"i18n"),d.ɵɵtext(88,"\n "),d.ɵɵelement(89,"i",45),d.ɵɵtext(90,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(91,"\n "),d.ɵɵelementStart(92,"button",52),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext(2);return e.copy(e.cipher.card.code,"securityCode","Security Code")})),d.ɵɵpipe(93,"i18n"),d.ɵɵtext(94,"\n "),d.ɵɵelement(95,"i",46),d.ɵɵtext(96,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(97,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(98,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(99,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(100,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(101,"\n "),d.ɵɵelementContainerEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(8,26,"cardholderName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.card.cardholderName)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(17,28,"brand")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.card.brand)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.cardBrandOptions),d.ɵɵadvance(10),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(32,30,"number")),d.ɵɵadvance(5),d.ɵɵproperty("ngModel",r.cipher.card.number)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(4),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(41,32,"copyNumber")),d.ɵɵadvance(12),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(53,34,"expirationMonth")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.card.expMonth)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.cardExpMonthOptions),d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(65,36,"expirationYear")),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate1("placeholder","",d.ɵɵpipeBind1(68,38,"ex")," 2019"),d.ɵɵproperty("ngModel",r.cipher.card.expYear)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(10),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(78,40,"securityCode")),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate("type",r.showCardCode?"text":"password"),d.ɵɵproperty("ngModel",r.cipher.card.code)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(4),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(87,42,"toggleVisibility")),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(46,ne,!r.showCardCode,r.showCardCode)),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(93,44,"securityCode"))}}function le(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.value),d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function ce(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",16),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",99),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"label",100),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"select",101),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.title=e})),d.ɵɵtext(11,"\n "),d.ɵɵtemplate(12,le,2,2,"option",31),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementStart(17,"div",16),d.ɵɵtext(18,"\n "),d.ɵɵelementStart(19,"div",99),d.ɵɵtext(20,"\n "),d.ɵɵelementStart(21,"label",102),d.ɵɵtext(22),d.ɵɵpipe(23,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(24,"\n "),d.ɵɵelementStart(25,"input",103),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.firstName=e})),d.ɵɵelementEnd(),d.ɵɵtext(26,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(27,"\n "),d.ɵɵelementStart(28,"div",99),d.ɵɵtext(29,"\n "),d.ɵɵelementStart(30,"label",104),d.ɵɵtext(31),d.ɵɵpipe(32,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n "),d.ɵɵelementStart(34,"input",105),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.middleName=e})),d.ɵɵelementEnd(),d.ɵɵtext(35,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(36,"\n "),d.ɵɵelementStart(37,"div",99),d.ɵɵtext(38,"\n "),d.ɵɵelementStart(39,"label",106),d.ɵɵtext(40),d.ɵɵpipe(41,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(42,"\n "),d.ɵɵelementStart(43,"input",107),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.lastName=e})),d.ɵɵelementEnd(),d.ɵɵtext(44,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(45,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(46,"\n "),d.ɵɵelementStart(47,"div",16),d.ɵɵtext(48,"\n "),d.ɵɵelementStart(49,"div",99),d.ɵɵtext(50,"\n "),d.ɵɵelementStart(51,"label",108),d.ɵɵtext(52),d.ɵɵpipe(53,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(54,"\n "),d.ɵɵelementStart(55,"input",109),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.username=e})),d.ɵɵelementEnd(),d.ɵɵtext(56,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(57,"\n "),d.ɵɵelementStart(58,"div",99),d.ɵɵtext(59,"\n "),d.ɵɵelementStart(60,"label",110),d.ɵɵtext(61),d.ɵɵpipe(62,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(63,"\n "),d.ɵɵelementStart(64,"input",111),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.company=e})),d.ɵɵelementEnd(),d.ɵɵtext(65,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(66,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(67,"\n "),d.ɵɵelementStart(68,"div",16),d.ɵɵtext(69,"\n "),d.ɵɵelementStart(70,"div",99),d.ɵɵtext(71,"\n "),d.ɵɵelementStart(72,"label",112),d.ɵɵtext(73),d.ɵɵpipe(74,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(75,"\n "),d.ɵɵelementStart(76,"input",113),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.ssn=e})),d.ɵɵelementEnd(),d.ɵɵtext(77,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(78,"\n "),d.ɵɵelementStart(79,"div",99),d.ɵɵtext(80,"\n "),d.ɵɵelementStart(81,"label",114),d.ɵɵtext(82),d.ɵɵpipe(83,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(84,"\n "),d.ɵɵelementStart(85,"input",115),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.passportNumber=e})),d.ɵɵelementEnd(),d.ɵɵtext(86,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(87,"\n "),d.ɵɵelementStart(88,"div",99),d.ɵɵtext(89,"\n "),d.ɵɵelementStart(90,"label",116),d.ɵɵtext(91),d.ɵɵpipe(92,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(93,"\n "),d.ɵɵelementStart(94,"input",117),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.licenseNumber=e})),d.ɵɵelementEnd(),d.ɵɵtext(95,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(96,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(97,"\n "),d.ɵɵelementStart(98,"div",16),d.ɵɵtext(99,"\n "),d.ɵɵelementStart(100,"div",17),d.ɵɵtext(101,"\n "),d.ɵɵelementStart(102,"label",118),d.ɵɵtext(103),d.ɵɵpipe(104,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(105,"\n "),d.ɵɵelementStart(106,"input",119),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.email=e})),d.ɵɵelementEnd(),d.ɵɵtext(107,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(108,"\n "),d.ɵɵelementStart(109,"div",17),d.ɵɵtext(110,"\n "),d.ɵɵelementStart(111,"label",120),d.ɵɵtext(112),d.ɵɵpipe(113,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(114,"\n "),d.ɵɵelementStart(115,"input",121),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.phone=e})),d.ɵɵelementEnd(),d.ɵɵtext(116,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(117,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(118,"\n "),d.ɵɵelementStart(119,"div",16),d.ɵɵtext(120,"\n "),d.ɵɵelementStart(121,"div",17),d.ɵɵtext(122,"\n "),d.ɵɵelementStart(123,"label",122),d.ɵɵtext(124),d.ɵɵpipe(125,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(126,"\n "),d.ɵɵelementStart(127,"input",123),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.address1=e})),d.ɵɵelementEnd(),d.ɵɵtext(128,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(129,"\n "),d.ɵɵelementStart(130,"div",17),d.ɵɵtext(131,"\n "),d.ɵɵelementStart(132,"label",124),d.ɵɵtext(133),d.ɵɵpipe(134,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(135,"\n "),d.ɵɵelementStart(136,"input",125),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.address2=e})),d.ɵɵelementEnd(),d.ɵɵtext(137,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(138,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(139,"\n "),d.ɵɵelementStart(140,"div",16),d.ɵɵtext(141,"\n "),d.ɵɵelementStart(142,"div",17),d.ɵɵtext(143,"\n "),d.ɵɵelementStart(144,"label",126),d.ɵɵtext(145),d.ɵɵpipe(146,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(147,"\n "),d.ɵɵelementStart(148,"input",127),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.address3=e})),d.ɵɵelementEnd(),d.ɵɵtext(149,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(150,"\n "),d.ɵɵelementStart(151,"div",17),d.ɵɵtext(152,"\n "),d.ɵɵelementStart(153,"label",128),d.ɵɵtext(154),d.ɵɵpipe(155,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(156,"\n "),d.ɵɵelementStart(157,"input",129),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.city=e})),d.ɵɵelementEnd(),d.ɵɵtext(158,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(159,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(160,"\n "),d.ɵɵelementStart(161,"div",16),d.ɵɵtext(162,"\n "),d.ɵɵelementStart(163,"div",17),d.ɵɵtext(164,"\n "),d.ɵɵelementStart(165,"label",130),d.ɵɵtext(166),d.ɵɵpipe(167,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(168,"\n "),d.ɵɵelementStart(169,"input",131),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.state=e})),d.ɵɵelementEnd(),d.ɵɵtext(170,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(171,"\n "),d.ɵɵelementStart(172,"div",17),d.ɵɵtext(173,"\n "),d.ɵɵelementStart(174,"label",132),d.ɵɵtext(175),d.ɵɵpipe(176,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(177,"\n "),d.ɵɵelementStart(178,"input",133),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.postalCode=e})),d.ɵɵelementEnd(),d.ɵɵtext(179,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(180,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(181,"\n "),d.ɵɵelementStart(182,"div",16),d.ɵɵtext(183,"\n "),d.ɵɵelementStart(184,"div",17),d.ɵɵtext(185,"\n "),d.ɵɵelementStart(186,"label",134),d.ɵɵtext(187),d.ɵɵpipe(188,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(189,"\n "),d.ɵɵelementStart(190,"input",135),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.identity.country=e})),d.ɵɵelementEnd(),d.ɵɵtext(191,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(192,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(193,"\n "),d.ɵɵelementContainerEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(8,55,"title")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.title)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.identityTitleOptions),d.ɵɵadvance(10),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(23,57,"firstName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.firstName)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(32,59,"middleName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.middleName)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(41,61,"lastName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.lastName)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(53,63,"username")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.username)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(62,65,"company")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.company)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(74,67,"ssn")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.ssn)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(83,69,"passportNumber")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.passportNumber)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(92,71,"licenseNumber")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.licenseNumber)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(104,73,"email")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.email)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(113,75,"phone")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.phone)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(125,77,"address1")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.address1)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(134,79,"address2")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.address2)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(146,81,"address3")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.address3)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(155,83,"cityTown")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.city)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(167,85,"stateProvince")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.state)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(176,87,"zipPostalCode")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.postalCode)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(188,89,"country")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.identity.country)("disabled",r.cipher.isDeleted||r.viewOnly)}}function pe(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",36),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"input",140),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().$implicit.value=e})),d.ɵɵelementEnd(),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",43),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"button",52),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext().$implicit;return d.ɵɵnextContext(3).copy(e.value,"value","Field")})),d.ɵɵpipe(7,"i18n"),d.ɵɵtext(8,"\n "),d.ɵɵelement(9,"i",46),d.ɵɵtext(10,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(11,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(),i=r.index,o=r.$implicit,a=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵpropertyInterpolate1("id","fieldValue",i,""),d.ɵɵpropertyInterpolate1("name","Field.Value",i,""),d.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly),d.ɵɵadvance(4),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(7,5,"copyValue"))}}function ue(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",36),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"input",145),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().$implicit.value=e})),d.ɵɵelementEnd(),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",43),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"button",44),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext().$implicit;return d.ɵɵnextContext(3).toggleFieldValue(e)})),d.ɵɵpipe(7,"i18n"),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"i",45),d.ɵɵtext(10,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(11,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementStart(13,"button",44),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext().$implicit,t=d.ɵɵnextContext(3);return t.copy(e.value,"value",e.type===t.fieldType.Hidden?"H_Field":"Field")})),d.ɵɵpipe(14,"i18n"),d.ɵɵtext(15,"\n "),d.ɵɵelement(16,"i",46),d.ɵɵtext(17,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(19,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(),i=r.index,o=r.$implicit,a=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵpropertyInterpolate1("id","fieldValue",i,""),d.ɵɵpropertyInterpolate("type",o.showValue?"text":"password"),d.ɵɵpropertyInterpolate1("name","Field.Value",i,""),d.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly||!a.cipher.viewPassword&&!o.newField),d.ɵɵadvance(4),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(7,10,"toggleVisibility")),d.ɵɵproperty("disabled",!a.cipher.viewPassword&&!o.newField),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(14,ne,!o.showValue,o.showValue)),d.ɵɵadvance(4),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(14,12,"copyValue")),d.ɵɵproperty("disabled",!a.cipher.viewPassword&&!o.newField)}}function de(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"input",146),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().$implicit.value=e})),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(),i=r.index,o=r.$implicit,a=d.ɵɵnextContext(3);d.ɵɵpropertyInterpolate1("id","fieldValue",i,""),d.ɵɵpropertyInterpolate1("name","Field.Value",i,""),d.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly)}}function me(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",82),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext().$implicit;return d.ɵɵnextContext(3).removeField(e)})),d.ɵɵpipe(1,"i18n"),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"i",83),d.ɵɵtext(4,"\n "),d.ɵɵelementEnd()}2&e&&d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(1,1,"remove"))}function he(e,t){1&e&&(d.ɵɵelementStart(0,"button",147),d.ɵɵpipe(1,"i18n"),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"i",148),d.ɵɵtext(4,"\n "),d.ɵɵelementEnd()),2&e&&d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(1,1,"dragToSort"))}function fe(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",138),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",77),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",39),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"label",74),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"a",139),d.ɵɵpipe(11,"i18n"),d.ɵɵtext(12,"\n "),d.ɵɵelement(13,"i",79),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementStart(17,"input",140),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),t.$implicit.name=e})),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(19,"\n "),d.ɵɵelementStart(20,"div",73),d.ɵɵtext(21,"\n "),d.ɵɵelementStart(22,"label",74),d.ɵɵtext(23),d.ɵɵpipe(24,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(25,"\n "),d.ɵɵelementStart(26,"div",64),d.ɵɵtext(27,"\n "),d.ɵɵtemplate(28,pe,13,7,"div",141),d.ɵɵtext(29,"\n "),d.ɵɵtemplate(30,ue,20,17,"div",141),d.ɵɵtext(31,"\n "),d.ɵɵelementStart(32,"div",142),d.ɵɵtext(33,"\n "),d.ɵɵtemplate(34,de,1,4,"input",143),d.ɵɵtext(35,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(36,"\n "),d.ɵɵtemplate(37,me,5,3,"button",81),d.ɵɵtext(38,"\n "),d.ɵɵtemplate(39,he,5,3,"button",144),d.ɵɵtext(40,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(41,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(42,"\n "),d.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=d.ɵɵnextContext(3);d.ɵɵadvance(6),d.ɵɵpropertyInterpolate1("for","fieldName",i,""),d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(8,14,"name")),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(11,16,"learnMore")),d.ɵɵadvance(7),d.ɵɵpropertyInterpolate1("id","fieldName",i,""),d.ɵɵpropertyInterpolate1("name","Field.Name",i,""),d.ɵɵproperty("ngModel",r.name)("disabled",o.cipher.isDeleted||o.viewOnly),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate1("for","fieldValue",i,""),d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(24,18,"value")),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",r.type===o.fieldType.Text),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",r.type===o.fieldType.Hidden),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",r.type===o.fieldType.Boolean),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly)}}function ve(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",136),d.ɵɵlistener("cdkDropListDropped",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).drop(e)})),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,fe,43,20,"div",137),d.ɵɵtext(3,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.cipher.fields)("ngForTrackBy",r.trackByFunction)}}function ye(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",149),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).addField()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",85),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(4,1,"newCustomField"),"\n "))}function ge(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.value),d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function xe(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",16),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",150),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"label",151),d.ɵɵtext(5),d.ɵɵpipe(6,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"select",152),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).addFieldType=e})),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,ge,2,2,"option",31),d.ɵɵtext(11,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(6,3,"type")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.addFieldType),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.addFieldTypeOptions)}}function be(e,t){if(1&e&&(d.ɵɵelementStart(0,"option",32),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵproperty("ngValue",n.value),d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function Se(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"h3",25),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"div",16),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",150),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"label",153),d.ɵɵtext(11),d.ɵɵpipe(12,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementStart(14,"select",154),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).cipher.organizationId=e}))("change",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).organizationChanged()})),d.ɵɵtext(15,"\n "),d.ɵɵtemplate(16,be,2,2,"option",31),d.ɵɵtext(17,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(19,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n "),d.ɵɵelementContainerEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,5,"ownership")),d.ɵɵadvance(8),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.organizationId)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",r.ownershipOptions)}}function we(e,t){1&e&&(d.ɵɵelementStart(0,"div"),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function Ce(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",156),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"input",157),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),t.$implicit.checked=e})),d.ɵɵelementEnd(),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"label",158),d.ɵɵtext(5),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=d.ɵɵnextContext(4);d.ɵɵadvance(2),d.ɵɵpropertyInterpolate1("id","collection-",i,""),d.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),d.ɵɵproperty("ngModel",r.checked)("disabled",o.cipher.isDeleted||o.viewOnly),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate1("for","collection-",i,""),d.ɵɵadvance(1),d.ɵɵtextInterpolate(r.name)}}function Ie(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,Ce,7,6,"div",155),d.ɵɵtext(3,"\n "),d.ɵɵelementContainerEnd()),2&e){var n=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",n.collections)}}function Ee(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"h3",25),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵtemplate(6,we,3,3,"div",21),d.ɵɵtext(7,"\n "),d.ɵɵtemplate(8,Ie,4,1,"ng-container",21),d.ɵɵtext(9,"\n "),d.ɵɵelementContainerEnd()),2&e){var n=d.ɵɵnextContext(2);d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,3,"collections")),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!n.collections||!n.collections.length),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.collections&&n.collections.length)}}function Pe(e,t){if(1&e&&(d.ɵɵelementStart(0,"div"),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"b",160),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5),d.ɵɵpipe(6,"date"),d.ɵɵelementEnd()),2&e){var n=d.ɵɵnextContext(3);d.ɵɵadvance(3),d.ɵɵtextInterpolate1("",d.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),d.ɵɵadvance(2),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind2(6,4,n.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function ke(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div"),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"b",160),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"a",162),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(3).viewHistory()})),d.ɵɵpipe(7,"i18n"),d.ɵɵtext(8),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(3);d.ɵɵadvance(3),d.ɵɵtextInterpolate1("",d.ɵɵpipeBind1(4,3,"passwordHistory"),":"),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(7,5,"view")),d.ɵɵadvance(2),d.ɵɵtextInterpolate1("\n ",r.cipher.passwordHistory.length,"\n ")}}function _e(e,t){if(1&e&&(d.ɵɵelementStart(0,"div"),d.ɵɵtext(1),d.ɵɵpipe(2,"date"),d.ɵɵelementStart(3,"span",165),d.ɵɵtext(4),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementEnd()),2&e){var n=t.$implicit;d.ɵɵadvance(1),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind2(2,2,n.lastUsedDate,"short")," -\n "),d.ɵɵadvance(3),d.ɵɵtextInterpolate(n.password)}}function Ae(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",163),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,_e,6,5,"div",164),d.ɵɵtext(3,"\n "),d.ɵɵelementEnd()),2&e){var n=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵproperty("ngForOf",n.cipher.passwordHistory)}}function Oe(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",159),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div"),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"b",160),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9),d.ɵɵpipe(10,"date"),d.ɵɵelementEnd(),d.ɵɵtext(11,"\n "),d.ɵɵtemplate(12,Pe,7,7,"div",21),d.ɵɵtext(13,"\n "),d.ɵɵtemplate(14,ke,10,7,"div",21),d.ɵɵtext(15,"\n "),d.ɵɵtemplate(16,Ae,4,1,"div",161),d.ɵɵtext(17,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementContainerEnd()),2&e){var n=d.ɵɵnextContext(2);d.ɵɵadvance(7),d.ɵɵtextInterpolate1("",d.ɵɵpipeBind1(8,5,"dateUpdated"),":"),d.ɵɵadvance(2),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind2(10,7,n.cipher.revisionDate,"medium"),"\n "),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",n.showRevisionDate),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.hasPasswordHistory),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.viewingPasswordHistory)}}function Te(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",13),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,F,3,3,"app-callout",14),d.ɵɵtext(3,"\n "),d.ɵɵtemplate(4,N,14,6,"div",15),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"div",16),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",17),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"label",18),d.ɵɵtext(11),d.ɵɵpipe(12,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementStart(14,"input",19),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().cipher.name=e})),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵtemplate(17,L,11,6,"div",20),d.ɵɵtext(18,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(19,"\n "),d.ɵɵtext(20,"\n "),d.ɵɵtemplate(21,ie,74,38,"ng-container",21),d.ɵɵtext(22,"\n "),d.ɵɵtext(23,"\n "),d.ɵɵtemplate(24,se,102,49,"ng-container",21),d.ɵɵtext(25,"\n "),d.ɵɵtext(26,"\n "),d.ɵɵtemplate(27,ce,194,91,"ng-container",21),d.ɵɵtext(28,"\n "),d.ɵɵelementStart(29,"div",22),d.ɵɵtext(30,"\n "),d.ɵɵelementStart(31,"label",23),d.ɵɵtext(32),d.ɵɵpipe(33,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(34,"\n "),d.ɵɵelementStart(35,"textarea",24),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().cipher.notes=e})),d.ɵɵelementEnd(),d.ɵɵtext(36,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(37,"\n "),d.ɵɵelementStart(38,"h3",25),d.ɵɵtext(39),d.ɵɵpipe(40,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(41,"\n "),d.ɵɵtemplate(42,ve,4,2,"div",26),d.ɵɵtext(43,"\n "),d.ɵɵtemplate(44,ye,5,3,"a",27),d.ɵɵtext(45,"\n "),d.ɵɵtemplate(46,xe,14,5,"div",15),d.ɵɵtext(47,"\n "),d.ɵɵtemplate(48,Se,21,9,"ng-container",21),d.ɵɵtext(49,"\n "),d.ɵɵtemplate(50,Ee,10,5,"ng-container",21),d.ɵɵtext(51,"\n "),d.ɵɵtemplate(52,Oe,19,10,"ng-container",21),d.ɵɵtext(53,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext();d.ɵɵadvance(2),d.ɵɵproperty("ngIf",r.allowOwnershipAssignment()&&!r.allowPersonal),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!r.editMode&&!r.viewOnly),d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(12,19,"name")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.name)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!r.organization),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Login),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Card),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Identity),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(33,21,"notes")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",r.cipher.notes)("disabled",r.cipher.isDeleted||r.viewOnly),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(40,23,"customFields")),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",r.cipher.hasFields),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",r.allowOwnershipAssignment()),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",(!r.editMode||r.cloneMode)&&r.cipher.organizationId),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",r.editMode)}}function Me(e,t){if(1&e&&(d.ɵɵelementStart(0,"button",166),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",167),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span"),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementEnd()),2&e){var n=d.ɵɵnextContext(),r=d.ɵɵreference(5);d.ɵɵproperty("disabled",r.loading),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,3,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,5,null!=n.cipher&&n.cipher.isDeleted?"restore":"save"))}}var Be=function(e,t){return{"fa-star":e,"fa-star-o":t}};function De(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",70),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).toggleFavorite()})),d.ɵɵpipe(1,"i18n"),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"i",45),d.ɵɵtext(4,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext(2);d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(1,2,r.cipher.favorite?"unfavorite":"favorite")),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(4,Be,r.cipher.favorite,!r.cipher.favorite))}}function Re(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",171,172),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).delete()})),d.ɵɵpipe(2,"i18n"),d.ɵɵtext(3,"\n "),d.ɵɵelement(4,"i",173),d.ɵɵtext(5,"\n "),d.ɵɵelement(6,"i",174),d.ɵɵpipe(7,"i18n"),d.ɵɵtext(8,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵreference(1),i=d.ɵɵnextContext(2);d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(2,6,i.cipher.isDeleted?"permanentlyDelete":"delete")),d.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),d.ɵɵadvance(4),d.ɵɵproperty("hidden",r.loading),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(7,8,"loading")),d.ɵɵproperty("hidden",!r.loading)}}function Ve(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",168),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,De,5,7,"button",169),d.ɵɵtext(3,"\n "),d.ɵɵtemplate(4,Re,9,10,"button",170),d.ɵɵtext(5,"\n "),d.ɵɵelementEnd()),2&e){var n=d.ɵɵnextContext();d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!n.organization&&!n.cipher.isDeleted),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.editMode&&!n.cloneMode)}}var je=function(e){function t(t,n,r,i,o,a,s,l,c,p,u,d,m,h){var f=e.call(this,t,n,r,i,o,a,s,l,c,p,d,m,h)||this;return f.apiService=u,f.originalCipher=null,f}return i(t,e),t.prototype.allowOwnershipAssignment=function(){return null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)&&(null!=this.organization?this.cloneMode&&this.organization.canManageAllCollections:!this.editMode||this.cloneMode)},t.prototype.loadCollections=function(){return this.organization.canManageAllCollections?Promise.resolve(this.collections):e.prototype.loadCollections.call(this)},t.prototype.loadCipher=function(){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return this.organization.canManageAllCollections?[3,2]:[4,e.prototype.loadCipher.call(this)];case 1:return[2,r.sent()];case 2:return[4,this.apiService.getCipherAdmin(this.cipherId)];case 3:return t=r.sent(),n=new s.CipherData(t),this.originalCipher=new l.Cipher(n),[2,new l.Cipher(n)]}}))}))},t.prototype.encryptCipher=function(){return this.organization.canManageAllCollections?this.cipherService.encrypt(this.cipher,null,this.originalCipher):e.prototype.encryptCipher.call(this)},t.prototype.saveCipher=function(t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){return this.organization.canManageAllCollections&&null!=t.organizationId?this.editMode&&!this.cloneMode?(n=new p.CipherRequest(t),[2,this.apiService.putCipherAdmin(this.cipherId,n)]):(n=new c.CipherCreateRequest(t),[2,this.apiService.postCipherAdmin(n)]):[2,e.prototype.saveCipher.call(this,t)]}))}))},t.prototype.deleteCipher=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return this.organization.canManageAllCollections?[2,this.cipher.isDeleted?this.apiService.deleteCipherAdmin(this.cipherId):this.apiService.putDeleteCipherAdmin(this.cipherId)]:[2,e.prototype.deleteCipher.call(this)]}))}))},t.ɵfac=function(e){return new(e||t)(d.ɵɵdirectiveInject(m.CipherService),d.ɵɵdirectiveInject(h.FolderService),d.ɵɵdirectiveInject(f.I18nService),d.ɵɵdirectiveInject(v.PlatformUtilsService),d.ɵɵdirectiveInject(y.AuditService),d.ɵɵdirectiveInject(g.StateService),d.ɵɵdirectiveInject(x.UserService),d.ɵɵdirectiveInject(b.CollectionService),d.ɵɵdirectiveInject(S.TotpService),d.ɵɵdirectiveInject(w.PasswordGenerationService),d.ɵɵdirectiveInject(C.ApiService),d.ɵɵdirectiveInject(I.MessagingService),d.ɵɵdirectiveInject(E.EventService),d.ɵɵdirectiveInject(P.PolicyService))},t.ɵcmp=d.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-add-edit"]],features:[d.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],["cdkDropList","",3,"cdkDropListDropped",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-2",3,"click",4,"ngIf"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 fa-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","fa-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-check-circle",3,"hidden"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-spinner","fa-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],["src","images/totp-countdown.png",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"fa","fa-lg","fa-share"],[1,"col-5","form-group"],["href","https://help.bitwarden.com/article/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-minus-circle","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","type","text","name","Card.Number","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],["cdkDropList","",3,"cdkDropListDropped"],["class","row","cdkDrag","",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"row"],["href","https://help.bitwarden.com/article/custom-fields/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],["class","input-group",4,"ngIf"],[1,"flex-fill"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange",4,"ngIf"],["type","button","class","btn btn-link text-muted cursor-move",3,"appA11yTitle",4,"ngIf"],["appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"id","type","name","ngModel","disabled","ngModelChange"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-link","text-muted","cursor-move",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-bars","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-2",3,"click"],[1,"col-5"],["for","addFieldType",1,"sr-only"],["id","addFieldType","name","AddFieldType",1,"form-control",3,"ngModel","ngModelChange"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",1),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"form",2,3),d.ɵɵlistener("ngSubmit",(function(){return t.submit()})),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"div",4),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"h2",5),d.ɵɵtext(10),d.ɵɵelementEnd(),d.ɵɵtext(11,"\n "),d.ɵɵelementStart(12,"button",6),d.ɵɵpipe(13,"i18n"),d.ɵɵtext(14,"\n "),d.ɵɵelementStart(15,"span",7),d.ɵɵtext(16,"×"),d.ɵɵelementEnd(),d.ɵɵtext(17,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(19,"\n "),d.ɵɵtemplate(20,Te,54,25,"div",8),d.ɵɵtext(21,"\n "),d.ɵɵelementStart(22,"div",9),d.ɵɵtext(23,"\n "),d.ɵɵtemplate(24,Me,9,7,"button",10),d.ɵɵtext(25,"\n "),d.ɵɵelementStart(26,"button",11),d.ɵɵtext(27),d.ɵɵpipe(28,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(29,"\n "),d.ɵɵtemplate(30,Ve,6,2,"div",12),d.ɵɵtext(31,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(32,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(34,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(35,"\n")),2&e&&(d.ɵɵadvance(4),d.ɵɵproperty("appApiAction",t.formPromise),d.ɵɵadvance(6),d.ɵɵtextInterpolate(t.title),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(13,7,"close")),d.ɵɵadvance(8),d.ɵɵproperty("ngIf",t.cipher),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",!t.viewOnly),d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[k.NgControlStatusGroup,k.NgForm,_.ApiActionDirective,A.A11yTitleDirective,O.NgIf,k.DefaultValueAccessor,k.RequiredValidator,k.NgControlStatus,k.NgModel,T.CalloutComponent,k.SelectControlValueAccessor,M.AutofocusDirective,O.NgForOf,k.NgSelectOption,k.ɵangular_packages_forms_forms_x,B.InputVerbatimDirective,O.NgClass,D.StopClickDirective,O.NgStyle,R.CdkDropList,R.CdkDrag,V.TrueFalseValueDirective,k.CheckboxControlValueAccessor],pipes:[j.I18nPipe,O.DatePipe],encapsulation:2}),t}(u.AddEditComponent);t.AddEditComponent=je},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.id=e.id,this.url=e.url,this.fileName=e.fileName,this.key=e.key,this.size=e.size,this.sizeName=e.sizeName)};t.AttachmentData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.cardholderName=e.cardholderName,this.brand=e.brand,this.number=e.number,this.expMonth=e.expMonth,this.expYear=e.expYear,this.code=e.code)};t.CardData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.type=e.type,this.name=e.name,this.value=e.value)};t.FieldData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.title=e.title,this.firstName=e.firstName,this.middleName=e.middleName,this.lastName=e.lastName,this.address1=e.address1,this.address2=e.address2,this.address3=e.address3,this.city=e.city,this.state=e.state,this.postalCode=e.postalCode,this.country=e.country,this.company=e.company,this.email=e.email,this.phone=e.phone,this.ssn=e.ssn,this.username=e.username,this.passportNumber=e.passportNumber,this.licenseNumber=e.licenseNumber)};t.IdentityData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(487),i=function(e){null!=e&&(this.username=e.username,this.password=e.password,this.passwordRevisionDate=e.passwordRevisionDate,this.totp=e.totp,e.uris&&(this.uris=e.uris.map((function(e){return new r.LoginUriData(e)}))))};t.LoginData=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.match=null,null!=e&&(this.uri=e.uri,this.match=e.match)};t.LoginUriData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.type=e.type)};t.SecureNoteData=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(482),l=n(596),c=n(81),p=n(284),u=n(30),d=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.size=t.size,r.buildDomainModel(r,t,{id:null,url:null,sizeName:null,fileName:null,key:null},n,["id","url","sizeName"])),r}return i(t,e),t.prototype.decrypt=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return[4,this.decryptObj(new l.AttachmentView(this),{fileName:null},e,t)];case 1:if(n=a.sent(),null==this.key)return[3,6];if(r=void 0,!(i=u.Utils.global.bitwardenContainerService))throw new Error("global bitwardenContainerService not initialized.");r=i.getCryptoService(),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,r.getOrgKey(e)];case 3:return o=a.sent(),[4,r.decryptToBytes(this.key,null!=o?o:t)];case 4:return s=a.sent(),n.key=new p.SymmetricCryptoKey(s),[3,6];case 5:return a.sent(),[3,6];case 6:return[2,n]}}))}))},t.prototype.toAttachmentData=function(){var e=new s.AttachmentData;return e.size=this.size,this.buildDataModel(this,e,{id:null,url:null,sizeName:null,fileName:null,key:null},["id","url","sizeName"]),e},t}(c.default);t.Attachment=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.password=null,this.lastUsedDate=null,e&&(this.lastUsedDate=e.lastUsedDate)};t.PasswordHistoryView=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(3),n(261),n(5);var a=n(492),s=n(0),l=n(3),c=n(9),p=n(261),u=n(8),d=n(5),m=n(13),h=n(4),f=n(24),v=n(10);function y(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",17),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=t.$implicit;s.ɵɵproperty("ngValue",n.id),s.ɵɵadvance(1),s.ɵɵtextInterpolate(n.name)}}function g(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",17),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=t.$implicit;s.ɵɵproperty("ngValue",n.id),s.ɵɵadvance(1),s.ɵɵtextInterpolate(n.name)}}function x(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"option",18),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,g,2,2,"option",8),s.ɵɵtext(5,"\n "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",n.importOptions)}}function b(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",20),s.ɵɵtext(3,"\n https://help.bitwarden.com/article/export-your-data/"),s.ɵɵelementEnd(),s.ɵɵtext(4,"\n "),s.ɵɵelementContainerEnd())}function S(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",21),s.ɵɵtext(3,"\n https://help.bitwarden.com/article/import-from-lastpass/"),s.ɵɵelementEnd(),s.ɵɵtext(4,"\n "),s.ɵɵelementContainerEnd())}function w(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the KeePassX desktop application, navigate to "Database" → "Export to CSV file" and save the CSV\n file.\n '),s.ɵɵelementContainerEnd())}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n In the Avira web vault, go to "Settings" → "My Data" → "Export data" and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n In the Blur web vault, click your username at the top and go to "Settings" → "Export Data", then click\n "Export CSV"\n for your "Accounts".\n '),s.ɵɵelementContainerEnd())}function E(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the SaveInCloud desktop application, navigate to "File" → "Export" → "As XML" and save the\n XML file.\n '),s.ɵɵelementContainerEnd())}function P(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Padlock desktop application, click the hamburger icon in the top left corner and navigate to\n "Settings" →\n "Export" button and save the file "As CSV".\n '),s.ɵɵelementContainerEnd())}function k(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the KeePass 2 desktop application, navigate to "File" → "Export" and select the "KeePass XML\n (2.x)" option.\n '),s.ɵɵelementContainerEnd())}function _(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Universal Password Manager desktop application, navigate to "Database" → "Export" and save\n the CSV file.\n '),s.ɵɵelementContainerEnd())}function A(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the SaferPass browser extension, click the hamburger icon in the top left corner and navigate to\n "Settings". Click the "Export accounts" button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function O(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Meldium web vault, navigate to "Settings". Locate the "Export data" function and click "Show me my\n data" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function T(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Navigate to "Backup" (top right) and find the\n "Export to .csv File" option. Click "Export Now" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function M(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1,"\n The process is exactly the same as importing from Google Chrome.\n "),s.ɵɵelementEnd())}function B(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,M,2,0,"span",9),s.ɵɵtext(3,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(4,"a",22),s.ɵɵtext(5,"\n https://help.bitwarden.com/article/import-from-chrome/"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf","chromecsv"!==n.format)}}function D(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",23),s.ɵɵtext(3,"\n https://bitwarden.com/help/article/import-from-firefox/"),s.ɵɵelementEnd(),s.ɵɵtext(4,".\n "),s.ɵɵelementContainerEnd())}function R(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),s.ɵɵelementStart(2,"a",24),s.ɵɵtext(3,"\n https://help.bitwarden.com/article/import-from-1password/"),s.ɵɵelementEnd(),s.ɵɵtext(4,".\n "),s.ɵɵelementContainerEnd())}function V(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Dragon desktop application, navigate to "File" → "Export" → "To XML". In the\n dialog that pops up select "All Rows" and check all fields. Click the "Export" button and save the XML file.\n '),s.ɵɵelementContainerEnd())}function j(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Enpass desktop application, navigate to "File" → "Export" → "As CSV". Select "OK" to the\n warning alert and save the CSV file. Note that the importer only supports files exported while Enpass is set\n to the English language, so adjust your settings accordingly.\n '),s.ɵɵelementContainerEnd())}function F(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Enpass 6 desktop application, click the menu button and navigate to "File" → "Export".\n Select the ".json" file format option and save the JSON file.\n '),s.ɵɵelementContainerEnd())}function U(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Safe desktop application, navigate to "File" → "Export To" → "XML format..."\n and save the XML file.\n '),s.ɵɵelementContainerEnd())}function N(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Dashlane desktop application, navigate to "File" → "Export" → "Unsecured archive\n (readable) in JSON format" and save the JSON file.\n '),s.ɵɵelementContainerEnd())}function z(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the mSecure desktop application, navigate to "File" → "Export" → "CSV File..." and save the\n CSV file.\n '),s.ɵɵelementContainerEnd())}function L(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Sticky Password desktop application, navigate to "Menu" (top right) → "Export" → "Export\n all". Select the unencrypted format XML option and save the XML file.\n '),s.ɵɵelementContainerEnd())}function G(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the True Key desktop application, click the gear icon (top right) and then navigate to "App Settings".\n Click the "Export" button, enter your password and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function K(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Clipperz web application (clipperz.is/app). Click the hamburger menu icon in the top right to\n expand the navigation bar. Navigate to "Data" → "Export". Click the "download HTML+JSON" button to save\n the HTML file.\n '),s.ɵɵelementContainerEnd())}function q(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the RoboForm Editor desktop application, navigate to "RoboForm" (top left) → "Options" →\n "Account & Data" and click the "Export" button. Select all of your data, change the "Format" to "CSV\n file" and then click the "Export" button to save the CSV file. Note: RoboForm only allows you to export\n Logins. Other items will not be exported.\n '),s.ɵɵelementContainerEnd())}function W(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Passbolt web vault and navigate to the "Passwords" listing. Select all of the passwords you\n would like to export and click the "Export" button at the top of the listing. Choose the "csv (lastpass)"\n export format and click the "Export" button.\n '),s.ɵɵelementContainerEnd())}function H(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Ascendo DataVault desktop application, navigate to "Tools" → "Export". In the dialog that\n pops up, select the "All Items (DVX, CSV)" option. Click the "Ok" button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function $(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Boss desktop application, navigate to "File" → "Export data" → "Password Boss\n JSON - not encrypted" and save the JSON file.\n '),s.ɵɵelementContainerEnd())}function Y(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Zoho web vault (vault.zoho.com). Navigate to "Tools" → "Export Secrets". Select "All\n Secrets" and click the "Zoho Vault Format CSV" button. Highlight and copy the data from the textarea. Open a\n text editor like Notepad and paste the data. Save the data from the text editor as\n '),s.ɵɵelementStart(2,"code"),s.ɵɵtext(3,"zoho_export.csv"),s.ɵɵelementEnd(),s.ɵɵtext(4,".\n "),s.ɵɵelementContainerEnd())}function Q(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the SplashID Safe desktop application, click on the SplashID blue lock logo in the top right corner.\n Navigate to "Export" → "Export as CSV" and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function J(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the PassKeep mobile app, navigate to "Backup/Restore". Locate the "CSV Backup/Restore" section and\n click "Backup to CSV" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function X(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n Make sure you have python-keyring and python-gnomekeyring installed. Save the\n "),s.ɵɵelementStart(2,"a",25),s.ɵɵtext(3,"GNOME Keyring Import/Export"),s.ɵɵelementEnd(),s.ɵɵtext(4," python\n script to your desktop as "),s.ɵɵelementStart(5,"code"),s.ɵɵtext(6,"pw_helper.py"),s.ɵɵelementEnd(),s.ɵɵtext(7,". Open terminal and run\n "),s.ɵɵelementStart(8,"code"),s.ɵɵtext(9,"chmod +rx Desktop/pw_helper.py"),s.ɵɵelementEnd(),s.ɵɵtext(10," and then\n "),s.ɵɵelementStart(11,"code"),s.ɵɵtext(12,"python Desktop/pw_helper.py export Desktop/my_passwords.json"),s.ɵɵelementEnd(),s.ɵɵtext(13,". Then upload the resulting\n "),s.ɵɵelementStart(14,"code"),s.ɵɵtext(15,"my_passwords.json"),s.ɵɵelementEnd(),s.ɵɵtext(16," file here to Bitwarden.\n "),s.ɵɵelementContainerEnd())}function Z(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Using the Password Agent desktop application navigate to "File" → "Export", select the "Fields to\n export" button and check all of the fields, change the "Output format" to "CSV", and then click the "Start"\n button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function ee(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Log into the Passpack website vault and navigate to "Settings" → "Export", then click the "Download"\n button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function te(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open your Passman vault and click on "Settings" in the bottom left corner. In the "Settings" window switch\n to the "Export credentials" tab and choose "JSON" as the export type. Enter your vault\'s passphrase and\n click the "Export" button to save the JSON file.\n '),s.ɵɵelementContainerEnd())}function ne(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export data". Select\n the "Export" button for the "Export to CSV file" option to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function re(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export data". Select\n the "Export" button for the "Export to JSON file" option to save the JSON file.\n '),s.ɵɵelementContainerEnd())}function ie(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the F-Secure KEY desktop application and navigate to "Settings" → "Export Passwords". Select the\n "Export" button, enter your master password, and save the FSK file.\n '),s.ɵɵelementContainerEnd())}function oe(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Kaspersky Password Manager desktop application and navigate to "Settings" → "Import/Export".\n Locate the "Export to text file" section and select the "Export" button to save the TXT file.\n '),s.ɵɵelementContainerEnd())}function ae(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the RememBear desktop application and navigate to "Settings" → "Account" → "Export".\n Enter your master password and select the "Export Anyway" button to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function se(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the PasswordWallet desktop application and navigate to "File" → "Export" →\n "Visible entries to text file". Enter your password and select the "Ok" button to save the TXT file.\n '),s.ɵɵelementContainerEnd())}function le(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Myki desktop browser extension and navigate to "Advanced" → "Export Accounts" and then scan\n the QR code with your mobile device. Various CSV files will then be saved to your computer\'s\n downloads folder.\n '),s.ɵɵelementContainerEnd())}function ce(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n Export your SecureSafe password safe to a CSV file with a comma delimiter.\n "),s.ɵɵelementContainerEnd())}function pe(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the LogMeOnce browser extension, then navigate to "Open Menu" → "Export To" and\n select "CSV File" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function ue(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the BlackBerry Password Keeper application, then navigate to "Settings" → "Import/Export".\n Select "Export Passwords" and follow the instructions on screen to save the unencrypted CSV file.\n '),s.ɵɵelementContainerEnd())}function de(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Buttercup desktop application and unlock your vault. Right click on your vault\'s icon and\n select "Export" to save the CSV file.\n '),s.ɵɵelementContainerEnd())}function me(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n Open the Codebook desktop application and log in. Navigate to "File" → "Export all", then click\n "Yes" on the dialog and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function he(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n Open the newest version of the Encryptr desktop application and allow all of your data to sync.\n Once syncing of your data is complete, the download icon in the top right corner will turn pink. Click\n the download icon and save the CSV file.\n "),s.ɵɵelementContainerEnd())}function fe(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,'\n From the Yoti browser extension, click on "Settings", then "Export Saved Logins" and save the CSV file.\n '),s.ɵɵelementContainerEnd())}function ve(e,t){if(1&e&&(s.ɵɵelementStart(0,"app-callout",19),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,b,5,0,"ng-container",9),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,S,5,0,"ng-container",9),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,w,2,0,"ng-container",9),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,C,2,0,"ng-container",9),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,I,2,0,"ng-container",9),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,E,2,0,"ng-container",9),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,P,2,0,"ng-container",9),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,k,2,0,"ng-container",9),s.ɵɵtext(17,"\n "),s.ɵɵtemplate(18,_,2,0,"ng-container",9),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,A,2,0,"ng-container",9),s.ɵɵtext(21,"\n "),s.ɵɵtemplate(22,O,2,0,"ng-container",9),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,T,2,0,"ng-container",9),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,B,7,1,"ng-container",9),s.ɵɵtext(27,"\n "),s.ɵɵtemplate(28,D,5,0,"ng-container",9),s.ɵɵtext(29,"\n "),s.ɵɵtemplate(30,R,5,0,"ng-container",9),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,V,2,0,"ng-container",9),s.ɵɵtext(33,"\n "),s.ɵɵtemplate(34,j,2,0,"ng-container",9),s.ɵɵtext(35,"\n "),s.ɵɵtemplate(36,F,2,0,"ng-container",9),s.ɵɵtext(37,"\n "),s.ɵɵtemplate(38,U,2,0,"ng-container",9),s.ɵɵtext(39,"\n "),s.ɵɵtemplate(40,N,2,0,"ng-container",9),s.ɵɵtext(41,"\n "),s.ɵɵtemplate(42,z,2,0,"ng-container",9),s.ɵɵtext(43,"\n "),s.ɵɵtemplate(44,L,2,0,"ng-container",9),s.ɵɵtext(45,"\n "),s.ɵɵtemplate(46,G,2,0,"ng-container",9),s.ɵɵtext(47,"\n "),s.ɵɵtemplate(48,K,2,0,"ng-container",9),s.ɵɵtext(49,"\n "),s.ɵɵtemplate(50,q,2,0,"ng-container",9),s.ɵɵtext(51,"\n "),s.ɵɵtemplate(52,W,2,0,"ng-container",9),s.ɵɵtext(53,"\n "),s.ɵɵtemplate(54,H,2,0,"ng-container",9),s.ɵɵtext(55,"\n "),s.ɵɵtemplate(56,$,2,0,"ng-container",9),s.ɵɵtext(57,"\n "),s.ɵɵtemplate(58,Y,5,0,"ng-container",9),s.ɵɵtext(59,"\n "),s.ɵɵtemplate(60,Q,2,0,"ng-container",9),s.ɵɵtext(61,"\n "),s.ɵɵtemplate(62,J,2,0,"ng-container",9),s.ɵɵtext(63,"\n "),s.ɵɵtemplate(64,X,17,0,"ng-container",9),s.ɵɵtext(65,"\n "),s.ɵɵtemplate(66,Z,2,0,"ng-container",9),s.ɵɵtext(67,"\n "),s.ɵɵtemplate(68,ee,2,0,"ng-container",9),s.ɵɵtext(69,"\n "),s.ɵɵtemplate(70,te,2,0,"ng-container",9),s.ɵɵtext(71,"\n "),s.ɵɵtemplate(72,ne,2,0,"ng-container",9),s.ɵɵtext(73,"\n "),s.ɵɵtemplate(74,re,2,0,"ng-container",9),s.ɵɵtext(75,"\n "),s.ɵɵtemplate(76,ie,2,0,"ng-container",9),s.ɵɵtext(77,"\n "),s.ɵɵtemplate(78,oe,2,0,"ng-container",9),s.ɵɵtext(79,"\n "),s.ɵɵtemplate(80,ae,2,0,"ng-container",9),s.ɵɵtext(81,"\n "),s.ɵɵtemplate(82,se,2,0,"ng-container",9),s.ɵɵtext(83,"\n "),s.ɵɵtemplate(84,le,2,0,"ng-container",9),s.ɵɵtext(85,"\n "),s.ɵɵtemplate(86,ce,2,0,"ng-container",9),s.ɵɵtext(87,"\n "),s.ɵɵtemplate(88,pe,2,0,"ng-container",9),s.ɵɵtext(89,"\n "),s.ɵɵtemplate(90,ue,2,0,"ng-container",9),s.ɵɵtext(91,"\n "),s.ɵɵtemplate(92,de,2,0,"ng-container",9),s.ɵɵtext(93,"\n "),s.ɵɵtemplate(94,me,2,0,"ng-container",9),s.ɵɵtext(95,"\n "),s.ɵɵtemplate(96,he,2,0,"ng-container",9),s.ɵɵtext(97,"\n "),s.ɵɵtemplate(98,fe,2,0,"ng-container",9),s.ɵɵtext(99,"\n "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵpropertyInterpolate("title",n.getFormatInstructionTitle()),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","bitwardencsv"===n.format||"bitwardenjson"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","lastpasscsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","keepassxcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","aviracsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","blurcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","safeincloudxml"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","padlockcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","keepass2xml"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","upmcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","saferpasscsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","meldiumcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","keepercsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","chromecsv"===n.format||"operacsv"===n.format||"vivaldicsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","firefoxcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","1password1pif"===n.format||"1passwordwincsv"===n.format||"1passwordmaccsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passworddragonxml"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","enpasscsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","enpassjson"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","pwsafexml"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","dashlanejson"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","msecurecsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","stickypasswordxml"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","truekeycsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","clipperzhtml"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","roboformcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passboltcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","ascendocsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passwordbossjson"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","zohovaultcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","splashidcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passkeepcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","gnomejson"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passwordagentcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passpackcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passmanjson"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","avastcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","avastjson"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","fsecurefsk"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","kasperskytxt"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","remembearcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","passwordwallettxt"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","mykicsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","securesafecsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","logmeoncecsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","blackberrycsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","buttercupcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","codebookcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","encryptrcsv"===n.format),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","yoticsv"===n.format)}}var ye=function(){function e(e,t,n,r,i){this.i18nService=e,this.toasterService=t,this.importService=n,this.router=r,this.platformUtilsService=i,this.format=null,this.loading=!1,this.organizationId=null,this.successNavigate=["vault"]}return e.prototype.ngOnInit=function(){var e=this;this.setImportOptions(),this.importOptions.sort((function(t,n){return null==t.name&&null!=n.name?-1:null!=t.name&&null==n.name?1:null==t.name&&null==n.name?0:e.i18nService.collator?e.i18nService.collator.compare(t.name,n.name):t.name.localeCompare(n.name)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:if(this.loading=!0,null===(e=this.importService.getImporter(this.format,this.organizationId)))return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFormat")),this.loading=!1,[2];if(t=document.getElementById("file"),!(null!=(n=t.files)&&0!==n.length||null!=this.fileContents&&""!==this.fileContents))return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),this.loading=!1,[2];if(r=this.fileContents,!(null!=n&&n.length>0))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.getFileContents(n[0])];case 2:return null!=(o=i.sent())&&(r=o),[3,4];case 3:return i.sent(),[3,4];case 4:if(null==r||""===r)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),this.loading=!1,[2];i.label=5;case 5:return i.trys.push([5,7,,8]),this.formPromise=this.importService.import(e,r,this.organizationId),[4,this.formPromise];case 6:return null!=(a=i.sent())?(this.error(a),this.loading=!1,[2]):(this.toasterService.popAsync("success",null,this.i18nService.t("importSuccess")),this.router.navigate(this.successNavigate),[3,8]);case 7:return i.sent(),[3,8];case 8:return this.loading=!1,[2]}}))}))},e.prototype.getFormatInstructionTitle=function(){var e=this;if(null==this.format)return null;var t=this.featuredImportOptions.concat(this.importOptions).filter((function(t){return t.id===e.format}));return t.length>0?this.i18nService.t("instructionsFor",t[0].name):null},e.prototype.setImportOptions=function(){this.featuredImportOptions=o([{id:null,name:"-- "+this.i18nService.t("select")+" --"}],this.importService.featuredImportOptions),this.importOptions=this.importService.regularImportOptions},e.prototype.error=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.default.fire({heightAuto:!1,buttonsStyling:!1,icon:"error",iconHtml:'<i class="swal-custom-icon fa fa-bolt text-danger"></i>',input:"textarea",inputValue:e.message,inputAttributes:{readonly:"true"},title:this.i18nService.t("importError"),text:this.i18nService.t("importErrorDesc"),showConfirmButton:!0,confirmButtonText:this.i18nService.t("ok"),onOpen:function(e){e.querySelector(".swal2-textarea").scrollTo(0,0)}})];case 1:return t.sent(),[2]}}))}))},e.prototype.getFileContents=function(e){var t=this;return new Promise((function(n,r){var i=new FileReader;i.readAsText(e,"utf-8"),i.onload=function(i){if("lastpasscsv"===t.format&&"text/html"===e.type){var o=(new DOMParser).parseFromString(i.target.result,"text/html").querySelector("pre");return null!=o?void n(o.textContent):void r()}n(i.target.result)},i.onerror=function(){r()}}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.I18nService),s.ɵɵdirectiveInject(c.ToasterService),s.ɵɵdirectiveInject(p.ImportService),s.ɵɵdirectiveInject(u.Router),s.ɵɵdirectiveInject(d.PlatformUtilsService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-import"]],decls:67,vars:24,consts:[[1,"page-header"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[4,"ngIf"],["type","info",3,"title",4,"ngIf"],["for","file"],["type","file","id","file","name","file",1,"form-control-file"],["for","fileContents"],["id","fileContents","name","FileContents",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[3,"ngValue"],["value","-","disabled",""],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/export-your-data/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/import-from-firefox/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵelementStart(7,"form",1,2),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",3),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",4),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",5),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"label",6),s.ɵɵtext(17),s.ɵɵpipe(18,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"select",7),s.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),s.ɵɵtext(21,"\n "),s.ɵɵtemplate(22,y,2,2,"option",8),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,x,6,1,"ng-container",9),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵtemplate(30,ve,100,50,"app-callout",10),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"div",3),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",4),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"div",5),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"label",11),s.ɵɵtext(39),s.ɵɵpipe(40,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelement(42,"input",12),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"div",5),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"label",13),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"textarea",14),s.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementStart(56,"button",15),s.ɵɵtext(57,"\n "),s.ɵɵelement(58,"i",16),s.ɵɵpipe(59,"i18n"),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"span"),s.ɵɵtext(62),s.ɵɵpipe(63,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,12,"importData")),s.ɵɵadvance(14),s.ɵɵtextInterpolate1("1. ",s.ɵɵpipeBind1(18,14,"selectFormat"),""),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.format),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.featuredImportOptions),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),s.ɵɵadvance(6),s.ɵɵproperty("ngIf",t.format),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("2. ",s.ɵɵpipeBind1(40,16,"selectImportFile"),""),s.ɵɵadvance(11),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(51,18,"orCopyPasteFileContents")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.fileContents),s.ɵɵadvance(3),s.ɵɵproperty("disabled",t.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(59,20,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(63,22,"importData")))},directives:[m.NgControlStatusGroup,m.NgForm,m.SelectControlValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,h.NgForOf,h.NgIf,m.DefaultValueAccessor,m.NgSelectOption,m.ɵangular_packages_forms_forms_x,f.CalloutComponent],pipes:[v.I18nPipe],encapsulation:2}),e}();t.ImportComponent=ye},,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(19),n(14),n(7);var s=n(39),l=n(30),c=n(257),p=n(0),u=n(19),d=n(14),m=n(7),h=n(4),f=n(24),v=n(107),y=n(37),g=n(53),x=n(10);function b(e,t){1&e&&(p.ɵɵelementStart(0,"small"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",4),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",5),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",4),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",5),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(p.ɵɵelementStart(0,"app-callout",8),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2),p.ɵɵpipe(3,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(1,2,"goodNews")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(3,4,"noInactive2fa"),"\n "))}function C(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",18),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",5),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"shared")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",19),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",5),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"attachments")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(p.ɵɵelementStart(0,"a",20),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext().$implicit,r=p.ɵɵnextContext(3);p.ɵɵpropertyInterpolate("href",r.cipherDocs.get(n.id),p.ɵɵsanitizeUrl),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,2,"instructions"),"")}}function P(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"td",12),p.ɵɵtext(3,"\n "),p.ɵɵelement(4,"app-vault-icon",13),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"td",14),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"a",15),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(3).selectCipher(e)})),p.ɵɵpipe(10,"i18n"),p.ɵɵtext(11),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵtemplate(13,C,9,6,"ng-container",1),p.ɵɵtext(14,"\n "),p.ɵɵtemplate(15,I,9,6,"ng-container",1),p.ɵɵtext(16,"\n "),p.ɵɵelement(17,"br"),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"small"),p.ɵɵtext(20),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"td",16),p.ɵɵtext(24,"\n "),p.ɵɵtemplate(25,E,3,4,"a",17),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=p.ɵɵnextContext(3);p.ɵɵadvance(4),p.ɵɵproperty("cipher",r),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(10,7,"editItem")),p.ɵɵadvance(2),p.ɵɵtextInterpolate(r.name),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!i.organization&&r.organizationId),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.hasAttachments),p.ɵɵadvance(5),p.ɵɵtextInterpolate(r.subTitle),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",i.cipherDocs.has(r.id))}}function k(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"app-callout",9),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4),p.ɵɵpipe(5,"i18n"),p.ɵɵpipe(6,"number"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"table",10),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"tbody"),p.ɵɵtext(11,"\n "),p.ɵɵtemplate(12,P,28,9,"tr",11),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,3,"inactive2faFound")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind2(5,5,"inactive2faFoundDesc",p.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),p.ɵɵadvance(8),p.ɵɵproperty("ngForOf",n.ciphers)}}function _(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",6),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,w,4,6,"app-callout",7),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,k,16,10,"ng-container",1),p.ɵɵtext(5,"\n"),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!n.ciphers.length),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.ciphers.length)}}function A(e,t){}var O=function(e){function t(t,n,r,i){var o=e.call(this,n,i,r,!0)||this;return o.cipherService=t,o.services=new Map,o.cipherDocs=new Map,o}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.checkAccess()];case 1:return t.sent()?[4,e.prototype.load.call(this)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.setCiphers=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i=this;return a(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.load2fa()];case 1:return o.sent(),[3,3];case 2:return o.sent(),[3,3];case 3:return this.services.size>0?[4,this.getAllCiphers()]:[3,6];case 4:return e=o.sent(),t=[],n=[],r=new Map,e.forEach((function(e){if(e.type===s.CipherType.Login&&(null==e.login.totp||""===e.login.totp)&&e.login.hasUris&&!e.isDeleted)for(var n=0;n<e.login.uris.length;n++){var o=e.login.uris[n];if(null!=o.uri&&""!==o.uri){var a=l.Utils.getHostname(o.uri);if(null!=a&&i.services.has(a)){null!=i.services.get(a)&&r.set(e.id,i.services.get(a)),t.push(e);break}}}})),[4,Promise.all(n)];case 5:o.sent(),this.ciphers=t,this.cipherDocs=r,o.label=6;case 6:return[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.load2fa=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return this.services.size>0?[2]:[4,fetch(new Request("https://2fa.directory/api/v2/totp.json"))];case 1:if(200!==(e=a.sent()).status)throw new Error;return[4,e.json()];case 2:for(n in t=a.sent())if(t.hasOwnProperty(n))for(i in r=t[n])r.hasOwnProperty(i)&&null!=(o=r[i]).url&&null!=(s=l.Utils.getHostname(o.url))&&this.services.set(s,o.doc);return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(d.MessagingService),p.ɵɵdirectiveInject(m.UserService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-inactive-two-factor-report"]],features:[p.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"text-right"],["class","badge badge-primary","target","_blank","rel","noopener",3,"href",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵtemplate(5,b,9,6,"small",1),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n"),p.ɵɵtemplate(13,S,9,6,"div",1),p.ɵɵtext(14,"\n"),p.ɵɵtemplate(15,_,6,2,"div",2),p.ɵɵtext(16,"\n"),p.ɵɵtemplate(17,A,0,0,"ng-template",null,3,p.ɵɵtemplateRefExtractor),p.ɵɵtext(19,"\n")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,5,"inactive2faReport"),"\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,f.CalloutComponent,h.NgForOf,v.IconComponent,y.StopClickDirective,g.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(c.CipherReportComponent);t.InactiveTwoFactorReportComponent=O},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(19),n(14),n(7);var s=n(39),l=n(257),c=n(0),p=n(19),u=n(14),d=n(7),m=n(4),h=n(24),f=n(107),v=n(37),y=n(53),g=n(10);function x(e,t){1&e&&(c.ɵɵelementStart(0,"small"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",4),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",4),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",8),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"goodNews")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"noReusedPasswords"),"\n "))}function w(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"a",19),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).selectCipher(e)})),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementContainerEnd()}if(2&e){var r=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"editItem")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(r.name)}}function C(e,t){if(1&e&&(c.ɵɵtext(0,"\n "),c.ɵɵelementStart(1,"span"),c.ɵɵtext(2),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n ")),2&e){var n=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵtextInterpolate(n.name)}}function I(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",20),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"shared")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",21),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"attachments")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e&&(c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",12),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"app-vault-icon",13),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",14),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,w,6,4,"ng-container",15),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,C,4,1,"ng-template",null,16,c.ɵɵtemplateRefExtractor),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,I,9,6,"ng-container",1),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,E,9,6,"ng-container",1),c.ɵɵtext(17,"\n "),c.ɵɵelement(18,"br"),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"small"),c.ɵɵtext(21),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"td",17),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"span",18),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n "),c.ɵɵelementEnd()),2&e){var n=t.$implicit,r=c.ɵɵreference(12),i=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("cipher",n),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(n))("ngIfElse",r),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!i.organization&&n.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.hasAttachments),c.ɵɵadvance(5),c.ɵɵtextInterpolate(n.subTitle),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(28,7,"reusedXTimes",i.passwordUseMap.get(n.login.password)),"\n ")}}function k(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"app-callout",9),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵpipe(5,"i18n"),c.ɵɵpipe(6,"number"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"table",10),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"tbody"),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,P,31,10,"tr",11),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementContainerEnd()),2&e){var n=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"reusedPasswordsFound")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(5,5,"reusedPasswordsFoundDesc",c.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),c.ɵɵadvance(8),c.ɵɵproperty("ngForOf",n.ciphers)}}function _(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",6),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,S,4,6,"app-callout",7),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,k,16,10,"ng-container",1),c.ɵɵtext(5,"\n"),c.ɵɵelementEnd()),2&e){var n=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.ciphers.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.ciphers.length)}}function A(e,t){}var O=function(e){function t(t,n,r,i){var o=e.call(this,n,i,r,!0)||this;return o.cipherService=t,o}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.checkAccess()];case 1:return t.sent()?[4,e.prototype.load.call(this)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.setCiphers=function(){return o(this,void 0,void 0,(function(){var e,t,n,r=this;return a(this,(function(i){switch(i.label){case 0:return[4,this.getAllCiphers()];case 1:return e=i.sent(),t=[],this.passwordUseMap=new Map,e.forEach((function(e){e.type!==s.CipherType.Login||null==e.login.password||""===e.login.password||e.isDeleted||(t.push(e),r.passwordUseMap.has(e.login.password)?r.passwordUseMap.set(e.login.password,r.passwordUseMap.get(e.login.password)+1):r.passwordUseMap.set(e.login.password,1))})),n=t.filter((function(e){return r.passwordUseMap.has(e.login.password)&&r.passwordUseMap.get(e.login.password)>1})),this.ciphers=n,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(p.CipherService),c.ɵɵdirectiveInject(c.ComponentFactoryResolver),c.ɵɵdirectiveInject(u.MessagingService),c.ɵɵdirectiveInject(d.UserService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-reused-passwords-report"]],features:[c.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵtemplate(5,x,9,6,"small",1),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementStart(9,"p"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n"),c.ɵɵtemplate(13,b,9,6,"div",1),c.ɵɵtext(14,"\n"),c.ɵɵtemplate(15,_,6,2,"div",2),c.ɵɵtext(16,"\n"),c.ɵɵtemplate(17,A,0,0,"ng-template",null,3,c.ɵɵtemplateRefExtractor),c.ɵɵtext(19,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,5,"reusedPasswordsReport"),"\n "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,f.IconComponent,v.StopClickDirective,y.StopPropDirective],pipes:[g.I18nPipe,m.DecimalPipe],encapsulation:2}),t}(l.CipherReportComponent);t.ReusedPasswordsReportComponent=O},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(19),n(14),n(7);var s=n(39),l=n(257),c=n(0),p=n(19),u=n(14),d=n(7),m=n(4),h=n(24),f=n(107),v=n(37),y=n(53),g=n(10);function x(e,t){1&e&&(c.ɵɵelementStart(0,"small"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",4),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",4),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",8),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"goodNews")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"noUnsecuredWebsites"),"\n "))}function w(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",16),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"shared")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",17),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"attachments")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"attachments")))}function I(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",12),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"app-vault-icon",13),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",14),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"a",15),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=t.$implicit;return c.ɵɵnextContext(3).selectCipher(e)})),c.ɵɵpipe(10,"i18n"),c.ɵɵtext(11),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵtemplate(13,w,9,6,"ng-container",1),c.ɵɵtext(14,"\n "),c.ɵɵtemplate(15,C,9,6,"ng-container",1),c.ɵɵtext(16,"\n "),c.ɵɵelement(17,"br"),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"small"),c.ɵɵtext(20),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("cipher",r),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(10,6,"editItem")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(r.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!i.organization&&r.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",r.hasAttachments),c.ɵɵadvance(5),c.ɵɵtextInterpolate(r.subTitle)}}function E(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"app-callout",9),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵpipe(5,"i18n"),c.ɵɵpipe(6,"number"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"table",10),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"tbody"),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,I,23,8,"tr",11),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementContainerEnd()),2&e){var n=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"unsecuredWebsitesFound")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(5,5,"unsecuredWebsitesFoundDesc",c.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),c.ɵɵadvance(8),c.ɵɵproperty("ngForOf",n.ciphers)}}function P(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",6),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,S,4,6,"app-callout",7),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,E,16,10,"ng-container",1),c.ɵɵtext(5,"\n"),c.ɵɵelementEnd()),2&e){var n=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.ciphers.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.ciphers.length)}}function k(e,t){}var _=function(e){function t(t,n,r,i){var o=e.call(this,n,i,r,!0)||this;return o.cipherService=t,o}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.checkAccess()];case 1:return t.sent()?[4,e.prototype.load.call(this)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.setCiphers=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return[4,this.getAllCiphers()];case 1:return e=n.sent(),t=e.filter((function(e){return!(e.type!==s.CipherType.Login||!e.login.hasUris||e.isDeleted)&&e.login.uris.some((function(e){return null!=e.uri&&0===e.uri.indexOf("http://")}))})),this.ciphers=t,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(p.CipherService),c.ɵɵdirectiveInject(c.ComponentFactoryResolver),c.ɵɵdirectiveInject(u.MessagingService),c.ɵɵdirectiveInject(d.UserService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-unsecured-websites-report"]],features:[c.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵtemplate(5,x,9,6,"small",1),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementStart(9,"p"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n"),c.ɵɵtemplate(13,b,9,6,"div",1),c.ɵɵtext(14,"\n"),c.ɵɵtemplate(15,P,6,2,"div",2),c.ɵɵtext(16,"\n"),c.ɵɵtemplate(17,k,0,0,"ng-template",null,3,c.ɵɵtemplateRefExtractor),c.ɵɵtext(19,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,5,"unsecuredWebsitesReport"),"\n "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,7,"unsecuredWebsitesReportDesc")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,f.IconComponent,v.StopClickDirective,y.StopPropDirective],pipes:[g.I18nPipe,m.DecimalPipe],encapsulation:2}),t}(l.CipherReportComponent);t.UnsecuredWebsitesReportComponent=_},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(19),n(14),n(36),n(7);var s=n(39),l=n(257),c=n(0),p=n(19),u=n(36),d=n(14),m=n(7),h=n(4),f=n(24),v=n(107),y=n(37),g=n(53),x=n(10);function b(e,t){1&e&&(c.ɵɵelementStart(0,"small"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",4),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",4),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",8),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"goodNews")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"noWeakPasswords"),"\n "))}function C(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"a",18),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).selectCipher(e)})),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementContainerEnd()}if(2&e){var r=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"editItem")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(r.name)}}function I(e,t){if(1&e&&(c.ɵɵtext(0,"\n "),c.ɵɵelementStart(1,"span"),c.ɵɵtext(2),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n ")),2&e){var n=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵtextInterpolate(n.name)}}function E(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",19),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"shared")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"shared")))}function P(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",20),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",5),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"attachments")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"attachments")))}function k(e,t){if(1&e&&(c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",12),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"app-vault-icon",13),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",14),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,C,6,4,"ng-container",15),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,I,4,1,"ng-template",null,16,c.ɵɵtemplateRefExtractor),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,E,9,6,"ng-container",1),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,P,9,6,"ng-container",1),c.ɵɵtext(17,"\n "),c.ɵɵelement(18,"br"),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"small"),c.ɵɵtext(21),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"td",17),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"span"),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n "),c.ɵɵelementEnd()),2&e){var n=t.$implicit,r=c.ɵɵreference(12),i=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("cipher",n),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(n))("ngIfElse",r),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!i.organization&&n.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.hasAttachments),c.ɵɵadvance(5),c.ɵɵtextInterpolate(n.subTitle),c.ɵɵadvance(5),c.ɵɵclassMapInterpolate1("badge badge-",i.passwordStrengthMap.get(n.id)[1],""),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(28,10,i.passwordStrengthMap.get(n.id)[0]),"\n ")}}function _(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"app-callout",9),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵpipe(5,"i18n"),c.ɵɵpipe(6,"number"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"table",10),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"tbody"),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,k,31,12,"tr",11),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementContainerEnd()),2&e){var n=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"weakPasswordsFound")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(5,5,"weakPasswordsFoundDesc",c.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),c.ɵɵadvance(8),c.ɵɵproperty("ngForOf",n.ciphers)}}function A(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",6),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,w,4,6,"app-callout",7),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,_,16,10,"ng-container",1),c.ɵɵtext(5,"\n"),c.ɵɵelementEnd()),2&e){var n=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.ciphers.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.ciphers.length)}}function O(e,t){}var T=function(e){function t(t,n,r,i,o){var a=e.call(this,r,o,i,!0)||this;return a.cipherService=t,a.passwordGenerationService=n,a.passwordStrengthMap=new Map,a.passwordStrengthCache=new Map,a}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.checkAccess()];case 1:return t.sent()?[4,e.prototype.load.call(this)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.setCiphers=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i=this;return a(this,(function(o){switch(o.label){case 0:return[4,this.getAllCiphers()];case 1:return e=o.sent(),t=[],n=function(e){return null!=e.login.username&&""!==e.login.username.trim()},r=function(e){return e.login.password+"_____"+(n(e)?e.login.username:"")},e.forEach((function(e){if(e.type===s.CipherType.Login&&null!=e.login.password&&""!==e.login.password&&!e.isDeleted){var o=n(e),a=r(e);if(!i.passwordStrengthCache.has(a)){var l=[];if(o){var c=e.login.username.indexOf("@");l=c>-1?l.concat(e.login.username.substr(0,c).trim().toLowerCase().split(/[^A-Za-z0-9]/)).filter((function(e){return e.length>=3})):e.login.username.trim().toLowerCase().split(/[^A-Za-z0-9]/).filter((function(e){return e.length>=3}))}var p=i.passwordGenerationService.passwordStrength(e.login.password,l.length>0?l:null);i.passwordStrengthCache.set(a,p.score)}var u=i.passwordStrengthCache.get(a);null!=u&&u<=2&&(i.passwordStrengthMap.set(e.id,i.scoreKey(u)),t.push(e))}})),t.sort((function(e,t){return i.passwordStrengthCache.get(r(e))-i.passwordStrengthCache.get(r(t))})),this.ciphers=t,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.prototype.scoreKey=function(e){switch(e){case 4:return["strong","success"];case 3:return["good","primary"];case 2:return["weak","warning"];default:return["veryWeak","danger"]}},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(p.CipherService),c.ɵɵdirectiveInject(u.PasswordGenerationService),c.ɵɵdirectiveInject(c.ComponentFactoryResolver),c.ɵɵdirectiveInject(d.MessagingService),c.ɵɵdirectiveInject(m.UserService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-weak-passwords-report"]],features:[c.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵtemplate(5,b,9,6,"small",1),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementStart(9,"p"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n"),c.ɵɵtemplate(13,S,9,6,"div",1),c.ɵɵtext(14,"\n"),c.ɵɵtemplate(15,A,6,2,"div",2),c.ɵɵtext(16,"\n"),c.ɵɵtemplate(17,O,0,0,"ng-template",null,3,c.ɵɵtemplateRefExtractor),c.ɵɵtext(19,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,5,"weakPasswordsReport"),"\n "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,f.CalloutComponent,h.NgForOf,v.IconComponent,y.StopClickDirective,g.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(l.CipherReportComponent);t.WeakPasswordsReportComponent=T},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(6),n(19),n(18),n(3),n(5),n(7);var s=n(614),l=n(0),c=n(19),p=n(3),u=n(18),d=n(7),m=n(5),h=n(6),f=n(13),v=n(16),y=n(4),g=n(17),x=n(37),b=n(10);function S(e,t){if(1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.cipher.name)}}function w(e,t){1&e&&l.ɵɵelement(0,"i",24)}function C(e,t){1&e&&l.ɵɵelement(0,"i",25)}function I(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",26),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"a",27),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"i",28),l.ɵɵpipe(5,"i18n"),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"span",29),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"button",30,31),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(2).reupload(e)})),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(12),i=l.ɵɵnextContext().$implicit,o=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(5,5,"attachmentFixDesc")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(9,7,"attachmentFixDesc")),l.ɵɵadvance(3),l.ɵɵproperty("appApiAction",o.reuploadPromises[i.id])("disabled",r.loading),l.ɵɵadvance(2),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,9,"fix"))}}function E(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"td",32),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"button",33,34),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(2).delete(e)})),l.ɵɵpipe(4,"i18n"),l.ɵɵtext(5,"\n "),l.ɵɵelement(6,"i",35),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"i",36),l.ɵɵpipe(9,"i18n"),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(3),i=l.ɵɵnextContext().$implicit,o=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(4,6,"delete")),l.ɵɵproperty("appApiAction",o.deletePromises[i.id])("disabled",r.loading),l.ɵɵadvance(4),l.ɵɵproperty("hidden",r.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(9,8,"loading")),l.ɵɵproperty("hidden",!r.loading)}}function P(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",16),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,w,1,0,"i",17),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,C,1,0,"i",18),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td",19),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"div",20),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"a",21),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(2).download(e)})),l.ɵɵtext(14),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,I,16,11,"div",22),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"small"),l.ɵɵtext(20),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵtemplate(23,E,12,10,"td",23),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("ngIf",!r.downloading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.downloading),l.ɵɵadvance(8),l.ɵɵtextInterpolate(r.fileName),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",i.showFixOldAttachments(r)),l.ɵɵadvance(4),l.ɵɵtextInterpolate(r.sizeName),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!i.viewOnly)}}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",14),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,P,25,6,"tr",15),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.cipher.attachments)}}function _(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h3"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",37),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelement(10,"input",38),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"small",39),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"newAttachment")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,5,"file")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,7,"maxFileSize")))}function A(e,t){if(1&e&&(l.ɵɵelementStart(0,"button",40),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",41),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e){l.ɵɵnextContext();var n=l.ɵɵreference(5);l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,5,"save"))}}var O=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o,a,window)||this;return s.viewOnly=!1,s}return i(t,e),t.prototype.reupload=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return this.showFixOldAttachments(e)?[4,this.reuploadCipherAttachment(e,!1)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.showFixOldAttachments=function(e){return null==e.key&&null==this.cipher.organizationId},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.CryptoService),l.ɵɵdirectiveInject(d.UserService),l.ɵɵdirectiveInject(m.PlatformUtilsService),l.ɵɵdirectiveInject(h.ApiService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-vault-attachments"]],features:[l.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","fa fa-fw fa-lg fa-file-o","aria-hidden","true",4,"ngIf"],["class","fa fa-spinner fa-lg fa-fw fa-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"fa","fa-fw","fa-lg","fa-file-o"],["aria-hidden","true",1,"fa","fa-spinner","fa-lg","fa-fw","fa-spin"],[1,"ml-2"],["href","https://help.bitwarden.com/article/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,S,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,k,7,1,"table",10),l.ɵɵtext(26,"\n "),l.ɵɵtemplate(27,_,16,9,"div",6),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"div",11),l.ɵɵtext(31,"\n "),l.ɵɵtemplate(32,A,9,7,"button",12),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"button",13),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n")),2&e&&(l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,8,"attachments"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.cipher),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,10,"close")),l.ɵɵadvance(10),l.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.viewOnly),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!t.viewOnly),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,12,"close")))},directives:[f.NgControlStatusGroup,f.NgForm,v.ApiActionDirective,y.NgIf,g.A11yTitleDirective,y.NgForOf,x.StopClickDirective],pipes:[b.I18nPipe],encapsulation:2}),t}(s.AttachmentsComponent);t.AttachmentsComponent=O},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.url=n.getResponseProperty("Url"),n.fileName=n.getResponseProperty("FileName"),n.key=n.getResponseProperty("Key"),n.size=n.getResponseProperty("Size"),n.sizeName=n.getResponseProperty("SizeName"),n}return i(t,e),t}(n(23).BaseResponse);t.AttachmentResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(292),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.organizationId=n.getResponseProperty("OrganizationId"),n.name=n.getResponseProperty("Name"),n.externalId=n.getResponseProperty("ExternalId"),n}return i(t,e),t}(o.BaseResponse);t.CollectionResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.readOnly=n.getResponseProperty("ReadOnly")||!1,n}return i(t,e),t}(s);t.CollectionDetailsResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;n.groups=[];var r=n.getResponseProperty("Groups");return null!=r&&(n.groups=r.map((function(e){return new a.SelectionReadOnlyResponse(e)}))),n}return i(t,e),t}(s);t.CollectionGroupDetailsResponse=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(615),s=function(e){function t(t){var n=e.call(this,t)||this;n.globalEquivalentDomains=[],n.equivalentDomains=n.getResponseProperty("EquivalentDomains");var r=n.getResponseProperty("GlobalEquivalentDomains");return n.globalEquivalentDomains=null!=r?r.map((function(e){return new a.GlobalDomainResponse(e)})):[],n}return i(t,e),t}(o.BaseResponse);t.DomainsResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.revisionDate=n.getResponseProperty("RevisionDate"),n}return i(t,e),t}(n(23).BaseResponse);t.FolderResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(503),s=n(504),l=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.getResponseProperty("Id"),n.accessId=n.getResponseProperty("AccessId"),n.type=n.getResponseProperty("Type"),n.name=n.getResponseProperty("Name"),n.notes=n.getResponseProperty("Notes"),n.key=n.getResponseProperty("Key"),n.maxAccessCount=n.getResponseProperty("MaxAccessCount"),n.accessCount=n.getResponseProperty("AccessCount"),n.revisionDate=n.getResponseProperty("RevisionDate"),n.expirationDate=n.getResponseProperty("ExpirationDate"),n.deletionDate=n.getResponseProperty("DeletionDate"),n.password=n.getResponseProperty("Password"),n.disable=n.getResponseProperty("Disabled")||!1,n.hideEmail=n.getResponseProperty("HideEmail")||!1;var r=n.getResponseProperty("Text");null!=r&&(n.text=new s.SendTextApi(r));var i=n.getResponseProperty("File");return null!=i&&(n.file=new a.SendFileApi(i)),n}return i(t,e),t}(o.BaseResponse);t.SendResponse=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.id=n.getResponseProperty("Id"),n.fileName=n.getResponseProperty("FileName"),n.key=n.getResponseProperty("Key"),n.size=n.getResponseProperty("Size"),n.sizeName=n.getResponseProperty("SizeName")),n}return i(t,e),t}(n(23).BaseResponse);t.SendFileApi=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.text=n.getResponseProperty("Text"),n.hidden=n.getResponseProperty("Hidden")||!1),n}return i(t,e),t}(n(23).BaseResponse);t.SendTextApi=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=(n(9),n(6),n(19),n(71),n(3),n(5),n(80),n(114),n(7),n(263)),c=n(0),p=n(80),u=n(9),d=n(3),m=n(5),h=n(19),f=n(6),v=n(71),y=n(114),g=n(7),x=n(4),b=n(214),S=n(13),w=n(53),C=n(107),I=n(37),E=n(17),P=n(10);function k(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",22),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"shared")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"shared")))}function _(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",25),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"attachmentsNeedFix")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"attachmentsNeedFix")))}function A(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",24),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,_,9,6,"ng-container",0),c.ɵɵtext(10,"\n "),c.ɵɵelementContainerEnd()),2&e){var n=c.ɵɵnextContext().$implicit,r=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"attachments")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,5,"attachments")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",r.showFixOldAttachments(n))}}function O(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext(2).$implicit;return c.ɵɵnextContext(3).copy(e,e.login.password,"password","password")})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",26),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"copyPassword"),"\n "))}function T(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext(2).$implicit;return c.ɵɵnextContext(3).copy(e,e.login.totp,"verificationCodeTotp","TOTP")})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",26),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"copyVerificationCode"),"\n "))}function M(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext(2).$implicit;return c.ɵɵnextContext(3).launch(e.login.launchUri)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",27),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"launch"),"\n "))}function B(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).copy(e,e.login.username,"username","username")})),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",26),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,O,5,3,"a",19),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,T,5,3,"a",19),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,M,5,3,"a",19),c.ɵɵtext(13,"\n "),c.ɵɵelementContainerEnd()}if(2&e){var r=c.ɵɵnextContext().$implicit,i=c.ɵɵnextContext(3);c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(6,4,"copyUsername"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",r.viewPassword),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",i.displayTotpCopyButton(r)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",r.login.canLaunch)}}function D(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).clone(e)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",28),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"clone"),"\n "))}function R(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).share(e)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",29),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"share"),"\n "))}function V(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).collections(e)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",30),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"collections"),"\n "))}function j(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).events(e)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",31),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function F(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).restore(e)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",32),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"restore"),"\n "))}function U(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",5),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=t.$implicit;return c.ɵɵnextContext(3).checkCipher(e)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",6),c.ɵɵlistener("ngModelChange",(function(e){return c.ɵɵrestoreView(n),t.$implicit.checked=e})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",7),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=t.$implicit;return c.ɵɵnextContext(3).checkCipher(e)})),c.ɵɵtext(8,"\n "),c.ɵɵelement(9,"app-vault-icon",8),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"td",9),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=t.$implicit;return c.ɵɵnextContext(3).checkCipher(e)})),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"a",10),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=t.$implicit;return c.ɵɵnextContext(3).selectCipher(e)})),c.ɵɵpipe(15,"i18n"),c.ɵɵtext(16),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,k,9,6,"ng-container",0),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,A,11,7,"ng-container",0),c.ɵɵtext(21,"\n "),c.ɵɵelement(22,"br"),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"small",11),c.ɵɵtext(25),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"td",12),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"div",13),c.ɵɵtext(31,"\n "),c.ɵɵelementStart(32,"button",14),c.ɵɵpipe(33,"i18n"),c.ɵɵtext(34,"\n "),c.ɵɵelement(35,"i",15),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"div",16),c.ɵɵtext(39,"\n "),c.ɵɵtemplate(40,B,14,6,"ng-container",0),c.ɵɵtext(41,"\n "),c.ɵɵelementStart(42,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=t.$implicit;return c.ɵɵnextContext(3).attachments(e)})),c.ɵɵtext(43,"\n "),c.ɵɵelement(44,"i",18),c.ɵɵtext(45),c.ɵɵpipe(46,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵtemplate(48,D,5,3,"a",19),c.ɵɵtext(49,"\n "),c.ɵɵtemplate(50,R,5,3,"a",19),c.ɵɵtext(51,"\n "),c.ɵɵtemplate(52,V,5,3,"a",19),c.ɵɵtext(53,"\n "),c.ɵɵtemplate(54,j,5,3,"a",19),c.ɵɵtext(55,"\n "),c.ɵɵtemplate(56,F,5,3,"a",19),c.ɵɵtext(57,"\n "),c.ɵɵelementStart(58,"a",20),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=t.$implicit;return c.ɵɵnextContext(3).delete(e)})),c.ɵɵtext(59,"\n "),c.ɵɵelement(60,"i",21),c.ɵɵtext(61),c.ɵɵpipe(62,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(63,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(64,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(66,"\n "),c.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("ngModel",r.checked),c.ɵɵadvance(5),c.ɵɵproperty("cipher",r),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(15,16,"editItem")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(r.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!i.organization&&r.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",r.hasAttachments),c.ɵɵadvance(5),c.ɵɵtextInterpolate(r.subTitle),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(33,18,"options")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",r.type===i.cipherType.Login&&!r.isDeleted),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(46,20,"attachments"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",(!i.organization&&!r.organizationId||i.organization)&&!r.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!i.organization&&!r.organizationId&&!r.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",r.organizationId&&!r.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",r.organizationId&&i.accessEvents),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",r.isDeleted),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(62,22,r.isDeleted?"permanentlyDelete":"delete"),"\n ")}}function N(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"table",3),c.ɵɵlistener("scrolled",(function(){return c.ɵɵrestoreView(n),c.ɵɵnextContext(2).loadMore()})),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"tbody"),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,U,67,24,"tr",4),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd()}if(2&e){var r=c.ɵɵnextContext().ngIf,i=c.ɵɵnextContext();c.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!i.isPaging()),c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",r)}}function z(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",34),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function L(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",36),c.ɵɵlistener("click",(function(){return c.ɵɵrestoreView(n),c.ɵɵnextContext(4).addCipher()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",37),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,1,"addItem")))}function G(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,L,5,3,"button",35),c.ɵɵtext(7,"\n "),c.ɵɵelementContainerEnd()),2&e){var n=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,2,"noItemsInList")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",n.showAddNew)}}function K(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",33),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,z,9,6,"ng-container",0),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,G,8,4,"ng-container",0),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){var n=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.loaded),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.loaded)}}function q(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,N,7,3,"table",1),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,K,6,2,"div",2),c.ɵɵtext(5,"\n"),c.ɵɵelementContainerEnd()),2&e){var n=t.ngIf;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.length)}}var W=function(e){function t(t,n,r,i,o,a,l,c,p){var u=e.call(this,t,n,r,i,o,l,c,p)||this;return u.apiService=a,u.onEventsClicked=new s.EventEmitter,u.accessEvents=!1,u.allCiphers=[],u}return i(t,e),t.prototype.load=function(e){return void 0===e&&(e=null),o(this,void 0,void 0,(function(){var t,n,r=this;return a(this,(function(i){switch(i.label){case 0:return this.organization.canManageAllCollections?(this.accessEvents=this.organization.useEvents,t=this,[4,this.cipherService.getAllFromApiForOrganization(this.organization.id)]):[3,2];case 1:return t.allCiphers=i.sent(),[3,4];case 2:return n=this,[4,this.cipherService.getAllDecrypted()];case 3:n.allCiphers=i.sent().filter((function(e){return e.organizationId===r.organization.id})),i.label=4;case 4:return[4,this.searchService.indexCiphers(this.organization.id,this.allCiphers)];case 5:return i.sent(),[4,this.applyFilter(e)];case 6:return i.sent(),this.loaded=!0,[2]}}))}))},t.prototype.applyFilter=function(t){return void 0===t&&(t=null),o(this,void 0,void 0,(function(){var n,r=this;return a(this,(function(i){switch(i.label){case 0:return this.organization.canManageAllCollections?[4,e.prototype.applyFilter.call(this,t)]:[3,2];case 1:return i.sent(),[3,4];case 2:return n=function(e){return e.organizationId===r.organization.id&&(null==t||t(e))},[4,e.prototype.applyFilter.call(this,n)];case 3:i.sent(),i.label=4;case 4:return[2]}}))}))},t.prototype.search=function(t){return void 0===t&&(t=null),o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,e.prototype.search.call(this,t,this.allCiphers)];case 1:return n.sent(),[2]}}))}))},t.prototype.events=function(e){this.onEventsClicked.emit(e)},t.prototype.deleteCipher=function(t){return this.organization.canManageAllCollections?this.deleted?this.apiService.deleteCipherAdmin(t):this.apiService.putDeleteCipherAdmin(t):e.prototype.deleteCipher.call(this,t,this.deleted)},t.prototype.showFixOldAttachments=function(e){return this.organization.canManageAllCollections&&e.hasOldAttachments},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(p.SearchService),c.ɵɵdirectiveInject(u.ToasterService),c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(h.CipherService),c.ɵɵdirectiveInject(f.ApiService),c.ɵɵdirectiveInject(v.EventService),c.ɵɵdirectiveInject(y.TotpService),c.ɵɵdirectiveInject(g.UserService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-ciphers"]],outputs:{onEventsClicked:"onEventsClicked"},features:[c.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],["class","table table-hover table-list table-ciphers","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["class","no-items",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list","table-ciphers",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],[1,"table-list-icon",3,"click"],[3,"cipher"],[1,"reduced-lh","wrap",3,"click"],["href","#","appStopClick","","appStopProp","",3,"title","click"],["appStopProp",""],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-paperclip"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-exclamation-triangle","text-warning",3,"title"],["aria-hidden","true",1,"fa","fa-fw","fa-clone"],["aria-hidden","true",1,"fa","fa-fw","fa-share-square-o"],["aria-hidden","true",1,"fa","fa-fw","fa-files-o"],["aria-hidden","true",1,"fa","fa-fw","fa-share-alt"],["aria-hidden","true",1,"fa","fa-fw","fa-cubes"],["aria-hidden","true",1,"fa","fa-fw","fa-file-text-o"],["aria-hidden","true",1,"fa","fa-fw","fa-undo"],[1,"no-items"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],["class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary",3,"click"],[1,"fa","fa-plus","fa-fw"]],template:function(e,t){1&e&&(c.ɵɵtemplate(0,q,6,2,"ng-container",0),c.ɵɵtext(1,"\n")),2&e&&c.ɵɵproperty("ngIf",t.isPaging()?t.pagedCiphers:t.ciphers)},directives:[x.NgIf,b.InfiniteScrollDirective,x.NgForOf,S.CheckboxControlValueAccessor,w.StopPropDirective,S.NgControlStatus,S.NgModel,C.IconComponent,I.StopClickDirective,E.A11yTitleDirective],pipes:[P.I18nPipe],encapsulation:2}),t}(l.CiphersComponent);t.CiphersComponent=W},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(19),n(40),n(3),n(5);var o=n(887),a=n(0),s=n(40),l=n(5),c=n(3),p=n(19),u=n(13),d=n(16),m=n(4),h=n(17),f=n(53),v=n(10);function y(e,t){if(1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵtextInterpolate(n.cipher.name)}}function g(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",17),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"button",18),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().selectAll(!0)})),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"button",18),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().selectAll(!1)})),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,2,"selectAll"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function x(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function b(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr",21),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=t.$implicit;return a.ɵɵnextContext(2).check(e)})),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",22),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"input",23),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),t.$implicit.checked=e})),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td"),a.ɵɵtext(8),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;a.ɵɵadvance(4),a.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),a.ɵɵproperty("ngModel",r.checked),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",r.name,"\n ")}}function S(e,t){if(1&e&&(a.ɵɵelementStart(0,"table",19),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,b,10,3,"tr",20),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",n.collections)}}var w=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return i(t,e),t.prototype.ngOnDestroy=function(){this.selectAll(!1)},t.prototype.check=function(e,t){e.checked=null==t?!e.checked:t},t.prototype.selectAll=function(e){var t=this;this.collections.forEach((function(n){return t.check(n,e)}))},t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.CollectionService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.CipherService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-vault-collections"]],features:[a.ɵɵInheritDefinitionFeature],decls:63,vars:27,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","collectionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵtemplate(12,y,2,1,"small",6),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"button",7),a.ɵɵpipe(16,"i18n"),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"span",8),a.ɵɵtext(19,"×"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"div",9),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"p"),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"div",10),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"h3"),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵtemplate(35,g,10,6,"div",11),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵtemplate(38,x,3,3,"div",6),a.ɵɵtext(39,"\n "),a.ɵɵtemplate(40,S,7,1,"table",12),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"div",13),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"button",14),a.ɵɵtext(46,"\n "),a.ɵɵelement(47,"i",15),a.ɵɵpipe(48,"i18n"),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"span"),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementStart(55,"button",16),a.ɵɵtext(56),a.ɵɵpipe(57,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(60,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(61,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(62,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,13,"collections"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.cipher),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(16,15,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(27,17,"collectionsDesc")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(33,19,"collections")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.collections&&t.collections.length),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.collections||!t.collections.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.collections&&t.collections.length),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(48,21,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,23,"save")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(57,25,"cancel"))}},directives:[u.ɵangular_packages_forms_forms_y,u.NgControlStatusGroup,u.NgForm,d.ApiActionDirective,m.NgIf,h.A11yTitleDirective,m.NgForOf,u.CheckboxControlValueAccessor,f.StopPropDirective,u.NgControlStatus,u.NgModel],pipes:[v.I18nPipe],encapsulation:2}),t}(o.CollectionsComponent);t.CollectionsComponent=w},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(6),n(40),n(48),n(3),n(41),n(7);var s=n(155),l=n(140),c=n(156),p=n(294),u=n(0),d=n(40),m=n(48),h=n(41),f=n(7),v=n(6),y=n(3),g=n(17),x=n(13),b=n(65),S=n(4),w=n(37),C=n(10),I=function(e){return{active:e}};function E(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"li",7),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"a",8),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().selectFavorites()})),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",17),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(4,I,r.selectedFavorites)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(6,2,"favorites"),"\n ")}}function P(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"li",7),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"a",8),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().selectTrash()})),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",18),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(4,I,r.selectedTrash)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(6,2,"trash"),"\n ")}}function k(e,t){1&e&&(u.ɵɵelementStart(0,"p",19),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",20),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",21),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}var _=function(e,t){return{"fa-caret-right":e,"fa-caret-down":t}};function A(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"i",32),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(4).collapse(e.node)})),u.ɵɵpipe(1,"i18n"),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext().$implicit,i=u.ɵɵnextContext(4);u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(1,2,"toggleCollapse")),u.ɵɵproperty("ngClass",u.ɵɵpureFunction2(4,_,i.isCollapsed(r.node),!i.isCollapsed(r.node)))}}function O(e,t){1&e&&u.ɵɵelement(0,"i",33)}function T(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",34),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(4).editFolder(e.node)})),u.ɵɵpipe(1,"i18n"),u.ɵɵtext(2,"\n "),u.ɵɵelement(3,"i",35),u.ɵɵtext(4,"\n "),u.ɵɵelementEnd()}2&e&&u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(1,1,"editFolder"))}function M(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementContainerEnd())}var B=function(e){return{$implicit:e}};function D(e,t){if(1&e&&(u.ɵɵelementStart(0,"ul",36),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,M,2,0,"ng-container",26),u.ɵɵtext(3,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext().$implicit;u.ɵɵnextContext(2);var r=u.ɵɵreference(15);u.ɵɵadvance(2),u.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",u.ɵɵpureFunction1(2,B,n.children))}}function R(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"li",7),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",22),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,A,2,7,"i",28),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"a",8),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(4).selectFolder(e.node)})),u.ɵɵtext(7,"\n "),u.ɵɵtemplate(8,O,1,0,"i",29),u.ɵɵtext(9),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵtemplate(11,T,5,3,"a",30),u.ɵɵtext(12,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵtemplate(14,D,4,4,"ul",31),u.ɵɵtext(15,"\n "),u.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=u.ɵɵnextContext(4);u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(6,I,i.selectedFolder&&r.node.id===i.selectedFolderId)),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",r.children.length),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",0===r.children.length),u.ɵɵadvance(1),u.ɵɵtextInterpolate1("",r.node.name,"\n "),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.node.id),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",r.children.length&&!i.isCollapsed(r.node))}}function V(e,t){if(1&e&&(u.ɵɵtext(0,"\n "),u.ɵɵtemplate(1,R,16,8,"li",27),u.ɵɵtext(2,"\n ")),2&e){var n=t.$implicit;u.ɵɵadvance(1),u.ɵɵproperty("ngForOf",n)}}function j(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementContainerEnd())}function F(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h3",22),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementStart(5,"a",23),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext(2).addFolder()})),u.ɵɵpipe(6,"i18n"),u.ɵɵtext(7,"\n "),u.ɵɵelement(8,"i",24),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"ul",6),u.ɵɵtext(13,"\n "),u.ɵɵtemplate(14,V,3,1,"ng-template",null,25,u.ɵɵtemplateRefExtractor),u.ɵɵtext(16,"\n "),u.ɵɵtemplate(17,j,2,0,"ng-container",26),u.ɵɵtext(18,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵreference(15),i=u.ɵɵnextContext(2);u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,4,"folders"),"\n "),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(6,6,"addFolder")),u.ɵɵadvance(12),u.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",u.ɵɵpureFunction1(8,B,i.nestedFolders))}}function U(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"i",32),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(4).collapse(e.node)})),u.ɵɵpipe(1,"i18n"),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext().$implicit,i=u.ɵɵnextContext(4);u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(1,2,"toggleCollapse")),u.ɵɵproperty("ngClass",u.ɵɵpureFunction2(4,_,i.isCollapsed(r.node),!i.isCollapsed(r.node)))}}function N(e,t){1&e&&u.ɵɵelement(0,"i",39)}function z(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementContainerEnd())}function L(e,t){if(1&e&&(u.ɵɵelementStart(0,"ul",36),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,z,2,0,"ng-container",26),u.ɵɵtext(3,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext().$implicit;u.ɵɵnextContext(2);var r=u.ɵɵreference(9);u.ɵɵadvance(2),u.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",u.ɵɵpureFunction1(2,B,n.children))}}function G(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"li",7),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,U,2,7,"i",28),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"a",8),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(4).selectCollection(e.node)})),u.ɵɵtext(5,"\n "),u.ɵɵtemplate(6,N,1,0,"i",38),u.ɵɵtext(7),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵtemplate(9,L,4,4,"ul",31),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=u.ɵɵnextContext(4);u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(5,I,r.node.id===i.selectedCollectionId)),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.children.length),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",0===r.children.length),u.ɵɵadvance(1),u.ɵɵtextInterpolate1("",r.node.name,"\n "),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.children.length&&!i.isCollapsed(r.node))}}function K(e,t){if(1&e&&(u.ɵɵtext(0,"\n "),u.ɵɵtemplate(1,G,11,7,"li",27),u.ɵɵtext(2,"\n ")),2&e){var n=t.$implicit;u.ɵɵadvance(1),u.ɵɵproperty("ngForOf",n)}}function q(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementContainerEnd())}function W(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h3"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"ul",6),u.ɵɵtext(7,"\n "),u.ɵɵtemplate(8,K,3,1,"ng-template",null,37,u.ɵɵtemplateRefExtractor),u.ɵɵtext(10,"\n "),u.ɵɵtemplate(11,q,2,0,"ng-container",26),u.ɵɵtext(12,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementContainerEnd()),2&e){var n=u.ɵɵreference(9),r=u.ɵɵnextContext(2);u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,3,"collections")),u.ɵɵadvance(8),u.ɵɵproperty("ngTemplateOutlet",n)("ngTemplateOutletContext",u.ɵɵpureFunction1(5,B,r.nestedCollections))}}function H(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,F,20,10,"ng-container",16),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,W,14,7,"ng-container",16),u.ɵɵtext(5,"\n "),u.ɵɵelementContainerEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.showFolders),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.showCollections&&n.collections&&n.collections.length)}}var $=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i)||this;return s.apiService=o,s.i18nService=a,s}return i(t,e),t.prototype.loadCollections=function(){return o(this,void 0,void 0,(function(){var t,n,r,i,o;return a(this,(function(a){switch(a.label){case 0:return this.organization.canManageAllCollections?[3,2]:[4,e.prototype.loadCollections.call(this,this.organization.id)];case 1:return a.sent(),[2];case 2:return[4,this.apiService.getCollections(this.organization.id)];case 3:return null!=(t=a.sent())&&null!=t.data&&t.data.length?(n=t.data.map((function(e){return new l.Collection(new s.CollectionData(e))})),r=this,[4,this.collectionService.decryptMany(n)]):[3,5];case 4:return r.collections=a.sent(),[3,6];case 5:this.collections=[],a.label=6;case 6:return(i=new c.CollectionView).name=this.i18nService.t("unassigned"),i.id="unassigned",i.organizationId=this.organization.id,i.readOnly=!0,this.collections.push(i),o=this,[4,this.collectionService.getAllNested(this.collections)];case 7:return o.nestedCollections=a.sent(),[2]}}))}))},t.prototype.collapse=function(t){e.prototype.collapse.call(this,t,"org_")},t.prototype.isCollapsed=function(t){return e.prototype.isCollapsed.call(this,t,"org_")},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.CollectionService),u.ɵɵdirectiveInject(m.FolderService),u.ɵɵdirectiveInject(h.StorageService),u.ɵɵdirectiveInject(f.UserService),u.ɵɵdirectiveInject(v.ApiService),u.ɵɵdirectiveInject(y.I18nService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-groupings"]],features:[u.ɵɵInheritDefinitionFeature],decls:82,vars:47,consts:[[1,"card","vault-filters"],[1,"card-header","d-flex"],["href","https://help.bitwarden.com/article/searching-vault/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"fa-ul","card-ul"],[3,"ngClass"],["href","#","appStopClick","",3,"click"],[1,"fa-li","fa","fa-fw","fa-th"],[3,"ngClass",4,"ngIf"],[1,"fa-li","fa","fa-fw","fa-globe"],[1,"fa-li","fa","fa-fw","fa-credit-card"],[1,"fa-li","fa","fa-fw","fa-id-card-o"],[1,"fa-li","fa","fa-fw","fa-sticky-note-o"],["class","text-muted",4,"ngIf"],[4,"ngIf"],[1,"fa-li","fa","fa-fw","fa-star"],[1,"fa-li","fa","fa-fw","fa-trash-o"],[1,"text-muted"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"sr-only"],[1,"d-flex"],["href","#","appStopClick","",1,"text-muted","ml-auto",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["recursiveFolders",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass",4,"ngFor","ngForOf"],["class","fa-li fa",3,"title","ngClass","click",4,"ngIf"],["class","fa-li fa fa-folder-o","aria-hidden","true",4,"ngIf"],["href","#","class","text-muted ml-auto show-active","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["class","fa-ul card-ul carets",4,"ngIf"],[1,"fa-li","fa",3,"title","ngClass","click"],["aria-hidden","true",1,"fa-li","fa","fa-folder-o"],["href","#","appStopClick","",1,"text-muted","ml-auto","show-active",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-pencil","fa-fw"],[1,"fa-ul","card-ul","carets"],["recursiveCollections",""],["class","fa-li fa fa-cube","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"fa-li","fa","fa-cube"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementStart(5,"a",2),u.ɵɵpipe(6,"i18n"),u.ɵɵtext(7,"\n "),u.ɵɵelement(8,"i",3),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"div",4),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"input",5),u.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),u.ɵɵpipe(15,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"ul",6),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"li",7),u.ɵɵtext(20,"\n "),u.ɵɵelementStart(21,"a",8),u.ɵɵlistener("click",(function(){return t.selectAll()})),u.ɵɵtext(22,"\n "),u.ɵɵelement(23,"i",9),u.ɵɵtext(24),u.ɵɵpipe(25,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(26,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵtemplate(28,E,8,6,"li",10),u.ɵɵtext(29,"\n "),u.ɵɵtemplate(30,P,8,6,"li",10),u.ɵɵtext(31,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"h3"),u.ɵɵtext(34),u.ɵɵpipe(35,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n "),u.ɵɵelementStart(37,"ul",6),u.ɵɵtext(38,"\n "),u.ɵɵelementStart(39,"li",7),u.ɵɵtext(40,"\n "),u.ɵɵelementStart(41,"a",8),u.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Login)})),u.ɵɵtext(42,"\n "),u.ɵɵelement(43,"i",11),u.ɵɵtext(44),u.ɵɵpipe(45,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(46,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(47,"\n "),u.ɵɵelementStart(48,"li",7),u.ɵɵtext(49,"\n "),u.ɵɵelementStart(50,"a",8),u.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Card)})),u.ɵɵtext(51,"\n "),u.ɵɵelement(52,"i",12),u.ɵɵtext(53),u.ɵɵpipe(54,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(55,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(56,"\n "),u.ɵɵelementStart(57,"li",7),u.ɵɵtext(58,"\n "),u.ɵɵelementStart(59,"a",8),u.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Identity)})),u.ɵɵtext(60,"\n "),u.ɵɵelement(61,"i",13),u.ɵɵtext(62),u.ɵɵpipe(63,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n "),u.ɵɵelementStart(66,"li",7),u.ɵɵtext(67,"\n "),u.ɵɵelementStart(68,"a",8),u.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.SecureNote)})),u.ɵɵtext(69,"\n "),u.ɵɵelement(70,"i",14),u.ɵɵtext(71),u.ɵɵpipe(72,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(73,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(74,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(75,"\n "),u.ɵɵtemplate(76,k,9,6,"p",15),u.ɵɵtext(77,"\n "),u.ɵɵtemplate(78,H,6,2,"ng-container",16),u.ɵɵtext(79,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(80,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(81,"\n")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,19,"filters"),"\n "),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(6,21,"learnMore")),u.ɵɵadvance(9),u.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||u.ɵɵpipeBind1(15,23,"searchVault")),u.ɵɵproperty("ngModel",t.searchText),u.ɵɵadvance(5),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(37,I,t.selectedAll)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(25,25,"allItems"),"\n "),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",t.showFavorites),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.showTrash),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(35,27,"types")),u.ɵɵadvance(5),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(39,I,t.selectedType===t.cipherType.Login)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(45,29,"typeLogin"),"\n "),u.ɵɵadvance(4),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(41,I,t.selectedType===t.cipherType.Card)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(54,31,"typeCard"),"\n "),u.ɵɵadvance(4),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(43,I,t.selectedType===t.cipherType.Identity)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(63,33,"typeIdentity"),"\n "),u.ɵɵadvance(4),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(45,I,t.selectedType===t.cipherType.SecureNote)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(72,35,"typeSecureNote"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",!t.loaded),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.loaded))},directives:[g.A11yTitleDirective,x.DefaultValueAccessor,b.AutofocusDirective,x.NgControlStatus,x.NgModel,S.NgClass,w.StopClickDirective,S.NgIf,S.NgTemplateOutlet,S.NgForOf],pipes:[C.I18nPipe],encapsulation:2}),t}(p.GroupingsComponent);t.GroupingsComponent=$},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(3),n(295),n(84)),s=n(624),l=n(626),c=n(627),p=n(628),u=(n(263),n(0)),d=n(9),m=n(3),h=n(17),f=n(4),v=n(37),y=n(10),g=["bulkDeleteTemplate"],x=["bulkRestoreTemplate"],b=["bulkMoveTemplate"],S=["bulkShareTemplate"];function w(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",9),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().bulkMove()})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",16),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"moveSelected"),"\n "))}function C(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",9),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().bulkShare()})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",17),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"shareSelected"),"\n "))}function I(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",18),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().bulkRestore()})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",19),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"restoreSelected"),"\n "))}function E(e,t){}function P(e,t){}function k(e,t){}function _(e,t){}var A=function(){function e(e,t,n){this.toasterService=e,this.i18nService=t,this.componentFactoryResolver=n}return e.prototype.bulkDelete=function(){var e=this,t=this.ciphersComponent.getSelectedIds();if(0!==t.length){null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.bulkDeleteModalRef.createComponent(n).instance;var o=this.modal.show(s.BulkDeleteComponent,this.bulkDeleteModalRef);o.permanent=this.deleted,o.cipherIds=t,o.organization=this.organization,o.onDeleted.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){e.modal=null}))}else this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"))},e.prototype.bulkRestore=function(){var e=this,t=this.ciphersComponent.getSelectedIds();if(0!==t.length){null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.bulkRestoreModalRef.createComponent(n).instance;var o=this.modal.show(c.BulkRestoreComponent,this.bulkRestoreModalRef);o.cipherIds=t,o.onRestored.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){e.modal=null}))}else this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"))},e.prototype.bulkShare=function(){var e=this,t=this.ciphersComponent.getSelected();if(0!==t.length){null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.bulkShareModalRef.createComponent(n).instance;var o=this.modal.show(p.BulkShareComponent,this.bulkShareModalRef);o.ciphers=t,o.onShared.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))}else this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"))},e.prototype.bulkMove=function(){var e=this,t=this.ciphersComponent.getSelectedIds();if(0!==t.length){null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.bulkMoveModalRef.createComponent(n).instance;var o=this.modal.show(l.BulkMoveComponent,this.bulkMoveModalRef);o.cipherIds=t,o.onMoved.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){e.modal=null}))}else this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"))},e.prototype.selectAll=function(e){this.ciphersComponent.selectAll(e)},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.ToasterService),u.ɵɵdirectiveInject(m.I18nService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver))},e.ɵcmp=u.ɵɵdefineComponent({type:e,selectors:[["app-vault-bulk-actions"]],viewQuery:function(e,t){var n;(1&e&&(u.ɵɵstaticViewQuery(g,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(x,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(b,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(S,!0,o.ViewContainerRef)),2&e)&&(u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.bulkDeleteModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.bulkRestoreModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.bulkMoveModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.bulkShareModalRef=n.first))},inputs:{ciphersComponent:"ciphersComponent",modal:"modal",deleted:"deleted",organization:"organization"},decls:50,vars:15,consts:[["appListDropdown","",1,"dropdown","mr-2"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item",3,"click",4,"ngIf"],[1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"],[1,"dropdown-divider"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-check-square-o"],["aria-hidden","true",1,"fa","fa-fw","fa-minus-square-o"],["bulkDeleteTemplate",""],["bulkRestoreTemplate",""],["bulkMoveTemplate",""],["bulkShareTemplate",""],["aria-hidden","true",1,"fa","fa-fw","fa-share"],["aria-hidden","true",1,"fa","fa-fw","fa-share-alt"],[1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-undo"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"button",1),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelement(5,"i",2),u.ɵɵtext(6,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",3),u.ɵɵtext(9,"\n "),u.ɵɵtemplate(10,w,5,3,"button",4),u.ɵɵtext(11,"\n "),u.ɵɵtemplate(12,C,5,3,"button",4),u.ɵɵtext(13,"\n "),u.ɵɵtemplate(14,I,5,3,"button",5),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"button",6),u.ɵɵlistener("click",(function(){return t.bulkDelete()})),u.ɵɵtext(17,"\n "),u.ɵɵelement(18,"i",7),u.ɵɵtext(19),u.ɵɵpipe(20,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelement(22,"div",8),u.ɵɵtext(23,"\n "),u.ɵɵelementStart(24,"button",9),u.ɵɵlistener("click",(function(){return t.selectAll(!0)})),u.ɵɵtext(25,"\n "),u.ɵɵelement(26,"i",10),u.ɵɵtext(27),u.ɵɵpipe(28,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(29,"\n "),u.ɵɵelementStart(30,"button",9),u.ɵɵlistener("click",(function(){return t.selectAll(!1)})),u.ɵɵtext(31,"\n "),u.ɵɵelement(32,"i",11),u.ɵɵtext(33),u.ɵɵpipe(34,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(35,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n\n"),u.ɵɵtemplate(38,E,0,0,"ng-template",null,12,u.ɵɵtemplateRefExtractor),u.ɵɵtext(40,"\n"),u.ɵɵtemplate(41,P,0,0,"ng-template",null,13,u.ɵɵtemplateRefExtractor),u.ɵɵtext(43,"\n"),u.ɵɵtemplate(44,k,0,0,"ng-template",null,14,u.ɵɵtemplateRefExtractor),u.ɵɵtext(46,"\n"),u.ɵɵtemplate(47,_,0,0,"ng-template",null,15,u.ɵɵtemplateRefExtractor),u.ɵɵtext(49,"\n")),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(3,7,"options")),u.ɵɵadvance(8),u.ɵɵproperty("ngIf",!t.deleted&&!t.organization),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.deleted&&!t.organization),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.deleted&&!t.organization),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(20,9,t.deleted?"permanentlyDeleteSelected":"deleteSelected"),"\n "),u.ɵɵadvance(8),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(28,11,"selectAll"),"\n "),u.ɵɵadvance(6),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(34,13,"unselectAll"),"\n "))},directives:[h.A11yTitleDirective,f.NgIf,v.StopClickDirective],pipes:[y.I18nPipe],encapsulation:2}),e}();t.BulkActionsComponent=A},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(81),l=n(296),c=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.size=t.size,r.buildDomainModel(r,t,{id:null,sizeName:null,fileName:null},n,["id","sizeName"])),r}return i(t,e),t.prototype.decrypt=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.decryptObj(new l.SendFileView(this),{fileName:null},null,e)];case 1:return[2,t.sent()]}}))}))},t}(s.default);t.SendFile=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(81),a=n(297),s=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.hidden=t.hidden,r.buildDomainModel(r,t,{text:null},n,[])),r}return i(t,e),t.prototype.decrypt=function(e){return this.decryptObj(new a.SendTextView(this),{text:null},null,e)},t}(o.default);t.SendText=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=t.id,n}return i(t,e),t}(n(210).CipherRequest);t.CipherWithIdRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.name=e.name?e.name.encryptedString:null};t.FolderRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(5);var r=n(0),i=n(5),o=function(){function e(e,t){this.el=e,this.platformUtilsService=t}return e.prototype.onCopy=function(){if(null!=window){for(var e="",t=window.getSelection(),n=0;n<t.rangeCount;n++){var r=t.getRangeAt(n).toString(),i=r.length,o=r.search(/(?:\r\n|\r|\n)/);if(o>-1)""===r.substr(o).trim()&&(i=o);e+=r.substring(0,i)}this.platformUtilsService.copyToClipboard(e,{window:window})}},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(r.ElementRef),r.ɵɵdirectiveInject(i.PlatformUtilsService))},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appSelectCopy",""]],hostBindings:function(e,t){1&e&&r.ɵɵlistener("copy",(function(){return t.onCopy()}))}}),e}();t.SelectCopyDirective=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(){}return e.prototype.transform=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n],i=!1;switch(r){case"&":r="&amp;",i=!0;break;case"<":r="&lt;",i=!0;break;case">":r="&gt;",i=!0;break;case" ":r="&nbsp;",i=!0}var o="letter";i||r.match(/[^\w ]/)?o="special":r.match(/\d/)&&(o="number"),t+='<span class="password-'+o+'">'+r+"</span>"}return t},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=r.ɵɵdefinePipe({name:"colorPassword",type:e,pure:!0}),e}();t.ColorPasswordPipe=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.userId=t,this.name=e.name,this.id=e.id,this.revisionDate=e.revisionDate};t.FolderData=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(127),a=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.buildDomainModel(r,t,{id:null,name:null},n,["id"]),r.revisionDate=null!=t.revisionDate?new Date(t.revisionDate):null),r}return i(t,e),t.prototype.decrypt=function(){return this.decryptObj(new o.FolderView(this),{name:null},null)},t}(n(81).default);t.Folder=a},,,,,,function(e,t){},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.NotificationsService=r},,,,function(e,t){function n(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=529},,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(5);var o=n(0),a=n(5),s=n(8),l=n(10),c=function(){function e(e){this.platformUtilsService=e,this.year="2015"}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.year=(new Date).getFullYear().toString(),e=this,[4,this.platformUtilsService.getApplicationVersion()];case 1:return e.version=t.sent(),document.body.classList.add("layout_frontend"),[2]}}))}))},e.prototype.ngOnDestroy=function(){document.body.classList.remove("layout_frontend")},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.PlatformUtilsService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-frontend-layout"]],decls:8,vars:5,consts:[[1,"container","my-5","text-muted","text-center"]],template:function(e,t){1&e&&(o.ɵɵelement(0,"router-outlet"),o.ɵɵtext(1,"\n"),o.ɵɵelementStart(2,"div",0),o.ɵɵtext(3),o.ɵɵelement(4,"br"),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n © ",t.year,", Bitwarden Inc.\n "),o.ɵɵadvance(2),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind2(6,2,"versionNumber",t.version),"\n"))},directives:[s.RouterOutlet],pipes:[l.I18nPipe],encapsulation:2}),e}();t.FrontendLayoutComponent=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(112),n(6),n(64),n(5),n(7);var o=n(0),a=n(8),s=n(7),l=n(112),c=n(6),p=n(5),u=n(64),d=n(459),m=n(4),h=n(460),f=n(139),v=n(16),y=n(10);function g(e,t){1&e&&(o.ɵɵelementStart(0,"div",12),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",13),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",14),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,1,"organizationIsDisabled"),"\n "))}function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"li",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",20),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",21),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("routerLink",n.manageRoute),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,2,"manage"),"\n ")}}function b(e,t){if(1&e&&(o.ɵɵelementStart(0,"li",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",20),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",22),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("routerLink",n.toolsRoute),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,2,"tools"),"\n ")}}function S(e,t){1&e&&(o.ɵɵelementStart(0,"li",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",23),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",24),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,1,"settings"),"\n "))}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"ul",15),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"li",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"a",17),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",18),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,x,8,4,"li",19),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,b,8,4,"li",19),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,S,8,3,"li",19),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,4,"vault"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",n.showManageTab),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.showToolsTab),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.organization.isOwner)}}function C(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",25,26),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(2).goToBusinessPortal()})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",27),o.ɵɵtext(4,"\n "),o.ɵɵelement(5,"i",28),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd()}if(2&e){var r=o.ɵɵreference(1),i=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",i.businessTokenPromise),o.ɵɵadvance(3),o.ɵɵproperty("hidden",r.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(6,5,"loading")),o.ɵɵproperty("hidden",!r.loading),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,7,"businessPortal")," →\n ")}}function I(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",1),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",2),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",3),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",4),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"app-avatar",5),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"div",6),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span"),o.ɵɵtext(13),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"small",7),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,g,8,3,"div",8),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵtemplate(23,w,17,6,"ul",9),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",10),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,C,9,9,"button",11),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n"),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(8),o.ɵɵproperty("data",n.organization.name)("circle",!0),o.ɵɵadvance(5),o.ɵɵtextInterpolate(n.organization.name),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,7,"organization")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!n.organization.enabled),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",n.showMenuBar),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",n.showBusinessPortalButton)}}var E=function(){function e(e,t,n,r,i,o,a){this.route=e,this.userService=t,this.broadcasterService=n,this.ngZone=r,this.apiService=i,this.platformUtilsService=o,this.environmentService=a}return e.prototype.ngOnInit=function(){var e=this;this.businessUrl="https://portal.bitwarden.com",null!=this.environmentService.enterpriseUrl?this.businessUrl=this.environmentService.enterpriseUrl:null!=this.environmentService.baseUrl&&(this.businessUrl=this.environmentService.baseUrl+"/portal"),document.body.classList.remove("layout_frontend"),this.route.params.subscribe((function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.organizationId=t.organizationId,[4,this.load()];case 1:return e.sent(),[2]}}))}))})),this.broadcasterService.subscribe("OrganizationLayoutComponent",(function(t){e.ngZone.run((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:switch(t.command){case"updatedOrgLicense":return[3,1]}return[3,3];case 1:return[4,this.load()];case 2:return e.sent(),[3,3];case 3:return[2]}}))}))}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe("OrganizationLayoutComponent")},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.userService.getOrganization(this.organizationId)];case 1:return e.organization=t.sent(),[2]}}))}))},e.prototype.goToBusinessPortal=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null!=this.businessTokenPromise)return[2];n.label=1;case 1:return n.trys.push([1,5,,6]),this.businessTokenPromise=this.apiService.getEnterprisePortalSignInToken(),[4,this.businessTokenPromise];case 2:return null==(e=n.sent())?[3,4]:[4,this.userService.getUserId()];case 3:t=n.sent(),this.platformUtilsService.launchUri(this.businessUrl+"/login?userId="+t+"&token="+window.encodeURIComponent(e)+"&organizationId="+this.organization.id),n.label=4;case 4:return[3,6];case 5:return n.sent(),[3,6];case 6:return this.businessTokenPromise=null,[2]}}))}))},Object.defineProperty(e.prototype,"showMenuBar",{get:function(){return this.showManageTab||this.showToolsTab||this.organization.isOwner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showManageTab",{get:function(){return this.organization.canManageUsers||this.organization.canManageAssignedCollections||this.organization.canManageAllCollections||this.organization.canManageGroups||this.organization.canManagePolicies||this.organization.canAccessEventLogs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showToolsTab",{get:function(){return this.organization.canAccessImportExport||this.organization.canAccessReports},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showBusinessPortalButton",{get:function(){return this.organization.useBusinessPortal&&this.organization.canAccessBusinessPortal},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toolsRoute",{get:function(){return this.organization.canAccessImportExport?"tools/import":"tools/exposed-passwords-report"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"manageRoute",{get:function(){var e;switch(!0){case this.organization.canManageUsers:e="manage/people";break;case this.organization.canManageAssignedCollections||this.organization.canManageAllCollections:e="manage/collections";break;case this.organization.canManageGroups:e="manage/groups";break;case this.organization.canManagePolicies:e="manage/policies";break;case this.organization.canAccessEventLogs:e="manage/events"}return e},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.ActivatedRoute),o.ɵɵdirectiveInject(s.UserService),o.ɵɵdirectiveInject(l.BroadcasterService),o.ɵɵdirectiveInject(o.NgZone),o.ɵɵdirectiveInject(c.ApiService),o.ɵɵdirectiveInject(p.PlatformUtilsService),o.ɵɵdirectiveInject(u.EnvironmentService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-organization-layout"]],decls:8,vars:1,consts:[["class","org-nav",4,"ngIf"],[1,"org-nav"],[1,"container","d-flex"],[1,"d-flex","flex-column"],[1,"my-auto","d-flex","align-items-center","pl-1"],["size","45",3,"data","circle"],[1,"org-name","ml-3"],[1,"text-muted"],["class","ml-3 card border-danger text-danger bg-transparent",4,"ngIf"],["class","nav nav-tabs",4,"ngIf"],[1,"ml-auto","d-flex","align-items-center"],["class","btn btn-primary",3,"appApiAction","click",4,"ngIf"],[1,"ml-3","card","border-danger","text-danger","bg-transparent"],[1,"card-body","py-2"],["aria-hidden","true",1,"fa","fa-exclamation-triangle"],[1,"nav","nav-tabs"],[1,"nav-item"],["routerLink","vault","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"fa","fa-lock"],["class","nav-item",4,"ngIf"],["routerLinkActive","active",1,"nav-link",3,"routerLink"],["aria-hidden","true",1,"fa","fa-sliders"],["aria-hidden","true",1,"fa","fa-wrench"],["routerLink","settings","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"fa","fa-cogs"],[1,"btn","btn-primary",3,"appApiAction","click"],["businessBtn",""],["aria-hidden","true",1,"fa","fa-bank","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(o.ɵɵelement(0,"app-navbar"),o.ɵɵtext(1,"\n"),o.ɵɵtemplate(2,I,32,9,"div",0),o.ɵɵtext(3,"\n"),o.ɵɵelement(4,"router-outlet"),o.ɵɵtext(5,"\n"),o.ɵɵelement(6,"app-footer"),o.ɵɵtext(7,"\n")),2&e&&(o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.organization))},directives:[d.NavbarComponent,m.NgIf,a.RouterOutlet,h.FooterComponent,f.AvatarComponent,a.RouterLinkWithHref,a.RouterLinkActive,v.ApiActionDirective],pipes:[y.I18nPipe],encapsulation:2}),e}();t.OrganizationLayoutComponent=E},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=n(459),o=n(8),a=n(460),s=function(){function e(){}return e.prototype.ngOnInit=function(){document.body.classList.remove("layout_frontend")},e.ɵfac=function(t){return new(t||e)},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["app-user-layout"]],decls:6,vars:0,template:function(e,t){1&e&&(r.ɵɵelement(0,"app-navbar"),r.ɵɵtext(1,"\n"),r.ɵɵelement(2,"router-outlet"),r.ɵɵtext(3,"\n"),r.ɵɵelement(4,"app-footer"),r.ɵɵtext(5,"\n"))},directives:[i.NavbarComponent,o.RouterOutlet,a.FooterComponent],encapsulation:2}),e}();t.UserLayoutComponent=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(38),n(7);var o=n(833),a=n(0),s=n(8),l=n(9),c=n(3),p=n(6),u=n(7),d=n(38),m=n(4),h=n(10);function f(e,t){1&e&&(a.ɵɵelementStart(0,"div",2),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",3),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",4),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",5),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",6),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))}var v=function(e){return{email:e}};function y(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",8),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",9),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",10),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"div",11),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",12),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"p",4),a.ɵɵtext(15),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"p"),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelement(21,"hr"),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"div",13),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"a",14),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"a",15),a.ɵɵtext(30),a.ɵɵpipe(31,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n"),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,7,"emergencyAccess")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",n.name,"\n "),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(19,9,"acceptEmergencyAccess")),a.ɵɵadvance(7),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(15,v,n.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(27,11,"logIn"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(17,v,n.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(31,13,"createAccount"),"\n ")}}var g=function(){function e(e,t,n,r,i,o,a){this.router=e,this.toasterService=t,this.i18nService=n,this.route=r,this.apiService=i,this.userService=o,this.stateService=a,this.loading=!0,this.authed=!1}return e.prototype.ngOnInit=function(){var e=this,t=!1;this.route.queryParams.subscribe((function(n){return r(e,void 0,void 0,(function(){var e,r,a,s,l,c;return i(this,(function(i){switch(i.label){case 0:return t?[2]:(t=!0,[4,this.stateService.remove("emergencyInvitation")]);case 1:return i.sent(),e=null==n.id||null==n.name||null==n.email||null==n.token,r=null,e?[3,9]:(a=this,[4,this.userService.isAuthenticated()]);case 2:if(a.authed=i.sent(),!this.authed)return[3,7];(s=new o.EmergencyAccessAcceptRequest).token=n.token,i.label=3;case 3:return i.trys.push([3,5,,6]),this.actionPromise=this.apiService.postEmergencyAccessAccept(n.id,s),[4,this.actionPromise];case 4:return i.sent(),c={type:"success",title:this.i18nService.t("inviteAccepted"),body:this.i18nService.t("emergencyInviteAcceptedDesc"),timeout:1e4},this.toasterService.popAsync(c),this.router.navigate(["/vault"]),[3,6];case 5:return l=i.sent(),e=!0,r=l.message,[3,6];case 6:return[3,9];case 7:return[4,this.stateService.save("emergencyInvitation",n)];case 8:i.sent(),this.email=n.email,this.name=n.name,null!=this.name&&(this.name=this.name.replace(/\+/g," ")),i.label=9;case 9:return e&&(c={type:"error",title:null,body:null!=r?this.i18nService.t("emergencyInviteAcceptFailedShort",r):this.i18nService.t("emergencyInviteAcceptFailed"),timeout:1e4},this.toasterService.popAsync(c),this.router.navigate(["/"])),this.loading=!1,[2]}}))}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ToasterService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(u.UserService),a.ɵɵdirectiveInject(d.StateService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-accept-emergency"]],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["src","images/logo-dark@2x.png","alt","Bitwarden",1,"mb-4","logo"],[1,"text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"d-flex"],["routerLink","/",1,"btn","btn-primary","btn-block",3,"queryParams"],["routerLink","/register",1,"btn","btn-primary","btn-block","ml-2","mt-0",3,"queryParams"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,f,17,6,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,y,38,19,"div",1),a.ɵɵtext(3,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[m.NgIf,s.RouterLinkWithHref],pipes:[h.I18nPipe],encapsulation:2}),e}();t.AcceptEmergencyComponent=g},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(38),n(7);var o=n(834),a=n(0),s=n(8),l=n(9),c=n(3),p=n(6),u=n(7),d=n(38),m=n(4),h=n(10);function f(e,t){1&e&&(a.ɵɵelementStart(0,"div",2),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",3),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",4),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",5),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",6),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))}var v=function(e){return{email:e}};function y(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",8),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",9),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",10),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"div",11),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",12),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"p",4),a.ɵɵtext(15),a.ɵɵelementStart(16,"strong",13),a.ɵɵtext(17),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"p"),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelement(24,"hr"),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"div",14),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"a",15),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"a",16),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n"),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,8,"joinOrganization")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",n.orgName,"\n "),a.ɵɵadvance(2),a.ɵɵtextInterpolate(n.email),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,10,"joinOrganizationDesc")),a.ɵɵadvance(7),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(16,v,n.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,12,"logIn"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(18,v,n.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(34,14,"createAccount"),"\n ")}}var g=function(){function e(e,t,n,r,i,o,a){this.router=e,this.toasterService=t,this.i18nService=n,this.route=r,this.apiService=i,this.userService=o,this.stateService=a,this.loading=!0,this.authed=!1}return e.prototype.ngOnInit=function(){var e=this,t=!1;this.route.queryParams.subscribe((function(n){return r(e,void 0,void 0,(function(){var e,r,a,s,l,c;return i(this,(function(i){switch(i.label){case 0:return t?[2]:(t=!0,[4,this.stateService.remove("orgInvitation")]);case 1:return i.sent(),e=null==n.organizationId||null==n.organizationUserId||null==n.token,r=null,e?[3,9]:(a=this,[4,this.userService.isAuthenticated()]);case 2:if(a.authed=i.sent(),!this.authed)return[3,7];(s=new o.OrganizationUserAcceptRequest).token=n.token,i.label=3;case 3:return i.trys.push([3,5,,6]),this.actionPromise=this.apiService.postOrganizationUserAccept(n.organizationId,n.organizationUserId,s),[4,this.actionPromise];case 4:return i.sent(),c={type:"success",title:this.i18nService.t("inviteAccepted"),body:this.i18nService.t("inviteAcceptedDesc"),timeout:1e4},this.toasterService.popAsync(c),this.router.navigate(["/vault"]),[3,6];case 5:return l=i.sent(),e=!0,r=l.message,[3,6];case 6:return[3,9];case 7:return[4,this.stateService.save("orgInvitation",n)];case 8:i.sent(),this.email=n.email,this.orgName=n.organizationName,null!=this.orgName&&(this.orgName=this.orgName.replace(/\+/g," ")),i.label=9;case 9:return e&&(c={type:"error",title:null,body:null!=r?this.i18nService.t("inviteAcceptFailedShort",r):this.i18nService.t("inviteAcceptFailed"),timeout:1e4},this.toasterService.popAsync(c),this.router.navigate(["/"])),this.loading=!1,[2]}}))}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ToasterService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(u.UserService),a.ɵɵdirectiveInject(d.StateService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-accept-organization"]],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["src","images/logo-dark@2x.png","alt","Bitwarden",1,"mb-4","logo"],[1,"text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"d-block","mt-2"],[1,"d-flex"],["routerLink","/",1,"btn","btn-primary","btn-block",3,"queryParams"],["routerLink","/register",1,"btn","btn-primary","btn-block","ml-2","mt-0",3,"queryParams"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,f,17,6,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,y,41,20,"div",1),a.ɵɵtext(3,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[m.NgIf,s.RouterLinkWithHref],pipes:[h.I18nPipe],encapsulation:2}),e}();t.AcceptOrganizationComponent=g},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(3),n(5);var o=n(835),a=n(0),s=n(8),l=n(3),c=n(6),p=n(5),u=n(13),d=n(16),m=n(65),h=n(45),f=n(10),v=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ApiService),a.ɵɵdirectiveInject(p.PlatformUtilsService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-hint"]],features:[a.ɵɵInheritDefinitionFeature],decls:52,vars:22,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],[3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"p",4),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"div",7),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"label",8),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"input",9),a.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"small",10),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelement(28,"hr"),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",11),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"button",12),a.ɵɵtext(33,"\n "),a.ɵɵelementStart(34,"span",13),a.ɵɵtext(35),a.ɵɵpipe(36,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelement(38,"i",14),a.ɵɵpipe(39,"i18n"),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementStart(42,"a",15),a.ɵɵtext(43),a.ɵɵpipe(44,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(45,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n")),2&e){var n=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,10,"passwordHint")),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(19,12,"emailAddress")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.email),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,14,"enterEmailToGetHint")),a.ɵɵadvance(8),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵproperty("hidden",n.loading),a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(36,16,"submit")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(39,18,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(44,20,"cancel"),"\n ")}},directives:[u.NgControlStatusGroup,u.NgForm,d.ApiActionDirective,u.DefaultValueAccessor,u.RequiredValidator,m.AutofocusDirective,h.InputVerbatimDirective,u.NgControlStatus,u.NgModel,s.RouterLinkWithHref],pipes:[f.I18nPipe],encapsulation:2}),t}(o.HintComponent);t.HintComponent=v},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(18),n(64),n(3),n(14),n(5),n(38),n(41),n(7),n(93),n(248);var s=n(837),l=n(0),c=n(8),p=n(3),u=n(5),d=n(14),m=n(7),h=n(18),f=n(41),v=n(93),y=n(64),g=n(248),x=n(38),b=n(6),S=n(13),w=n(16),C=n(65),I=n(45),E=n(17),P=n(4),k=n(10),_=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},A=function(e){function t(t,n,r,i,o,a,s,l,c,p,u,d){var m=e.call(this,t,n,r,i,o,a,s,l,c,u,d)||this;return m.routerService=p,m}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(n){switch(n.label){case 0:return[4,e.prototype.ngOnInit.call(this)];case 1:return n.sent(),this.onSuccessfulSubmit=function(){var e=t.routerService.getPreviousUrl();"/"!==e&&-1===e.indexOf("lock")&&(t.successRoute=e),t.router.navigate([t.successRoute])},[2]}}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.Router),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.PlatformUtilsService),l.ɵɵdirectiveInject(d.MessagingService),l.ɵɵdirectiveInject(m.UserService),l.ɵɵdirectiveInject(h.CryptoService),l.ɵɵdirectiveInject(f.StorageService),l.ɵɵdirectiveInject(v.VaultTimeoutService),l.ɵɵdirectiveInject(y.EnvironmentService),l.ɵɵdirectiveInject(g.RouterService),l.ɵɵdirectiveInject(x.StateService),l.ɵɵdirectiveInject(b.ApiService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-lock"]],features:[l.ɵɵInheritDefinitionFeature],decls:68,vars:31,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"text-center","mb-4"],["aria-hidden","true",1,"fa","fa-lock","fa-4x","text-muted"],[1,"lead","text-center","mx-4","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"form-group"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appAutofocus","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],[1,"text-muted","form-text"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-unlock-alt"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"div",3),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"p",4),l.ɵɵtext(8,"\n "),l.ɵɵelement(9,"i",5),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"p",6),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"div",7),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"div",8),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",9),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"label",10),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",11),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"input",12),l.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"button",13),l.ɵɵlistener("click",(function(){return t.togglePassword()})),l.ɵɵpipe(31,"i18n"),l.ɵɵtext(32,"\n "),l.ɵɵelement(33,"i",14),l.ɵɵtext(34,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"small",15),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelement(42,"hr"),l.ɵɵtext(43,"\n "),l.ɵɵelementStart(44,"div",11),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"button",16),l.ɵɵtext(47,"\n "),l.ɵɵelementStart(48,"span"),l.ɵɵtext(49,"\n "),l.ɵɵelement(50,"i",17),l.ɵɵtext(51),l.ɵɵpipe(52,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(53,"\n "),l.ɵɵelement(54,"i",18),l.ɵɵpipe(55,"i18n"),l.ɵɵtext(56,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(57,"\n "),l.ɵɵelementStart(58,"button",19),l.ɵɵlistener("click",(function(){return t.logOut()})),l.ɵɵtext(59),l.ɵɵpipe(60,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(61,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(63,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(64,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(65,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(66,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(67,"\n")),2&e){var n=l.ɵɵreference(1);l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(13),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,12,"yourVaultIsLocked")),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(24,14,"masterPass")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),l.ɵɵproperty("ngModel",t.masterPassword),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(31,16,"toggleVisibility")),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(28,_,!t.showPassword,t.showPassword)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind3(39,18,"loggedInAsEmailOn",t.email,t.webVaultHostname),"\n "),l.ɵɵadvance(8),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(5),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(52,22,"unlock"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(55,24,"loading")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(60,26,"logOut"),"\n ")}},directives:[S.NgControlStatusGroup,S.NgForm,w.ApiActionDirective,S.DefaultValueAccessor,S.RequiredValidator,C.AutofocusDirective,I.InputVerbatimDirective,S.NgControlStatus,S.NgModel,E.A11yTitleDirective,P.NgClass],pipes:[k.I18nPipe],encapsulation:2}),t}(s.LockComponent);t.LockComponent=A},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(58),n(104),n(64),n(3),n(36),n(5),n(38),n(41);var s=n(838),l=n(0),c=n(58),p=n(8),u=n(3),d=n(41),m=n(38),h=n(5),f=n(64),v=n(36),y=n(104),g=n(13),x=n(16),b=n(45),S=n(17),w=n(4),C=n(10),I=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},E=function(e){return{email:e}},P=function(e){function t(t,n,r,i,o,a,s,l,c,p){var u=e.call(this,t,n,s,r,a,l,c,p,o)||this;return u.route=i,u.onSuccessfulLoginNavigate=u.goAfterLogIn,u}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t,n=this;return a(this,(function(r){return t=this.route.queryParams.subscribe((function(r){return o(n,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return null!=r.email&&r.email.indexOf("@")>-1&&(this.email=r.email),null!=r.premium?this.stateService.save("loginRedirect",{route:"/settings/premium"}):null!=r.org&&this.stateService.save("loginRedirect",{route:"/settings/create-organization",qParams:{plan:r.org}}),[4,e.prototype.ngOnInit.call(this)];case 1:return n.sent(),null!=t&&t.unsubscribe(),[2]}}))}))})),[2]}))}))},t.prototype.goAfterLogIn=function(){return o(this,void 0,void 0,(function(){var e,t,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.stateService.get("orgInvitation")];case 1:return e=r.sent(),[4,this.stateService.get("emergencyInvitation")];case 2:return t=r.sent(),null==e?[3,3]:(this.router.navigate(["accept-organization"],{queryParams:e}),[3,8]);case 3:return null==t?[3,4]:(this.router.navigate(["accept-emergency"],{queryParams:t}),[3,8]);case 4:return[4,this.stateService.get("loginRedirect")];case 5:return null==(n=r.sent())?[3,7]:(this.router.navigate([n.route],{queryParams:n.qParams}),[4,this.stateService.remove("loginRedirect")]);case 6:return r.sent(),[3,8];case 7:this.router.navigate([this.successRoute]),r.label=8;case 8:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.AuthService),l.ɵɵdirectiveInject(p.Router),l.ɵɵdirectiveInject(u.I18nService),l.ɵɵdirectiveInject(p.ActivatedRoute),l.ɵɵdirectiveInject(d.StorageService),l.ɵɵdirectiveInject(m.StateService),l.ɵɵdirectiveInject(h.PlatformUtilsService),l.ɵɵdirectiveInject(f.EnvironmentService),l.ɵɵdirectiveInject(v.PasswordGenerationService),l.ɵɵdirectiveInject(y.CryptoFunctionService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-login"]],features:[l.ɵɵInheritDefinitionFeature],decls:97,vars:43,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["src","images/logo-dark@2x.png","alt","Bitwarden",1,"logo","mb-2"],[1,"lead","text-center","mx-4","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],[1,"form-text"],["routerLink","/hint"],[1,"form-check"],["type","checkbox","id","rememberEmail","name","RememberEmail",1,"form-check-input",3,"ngModel","ngModelChange"],["for","rememberEmail",1,"form-check-label"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-sign-in"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/register",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"queryParams"],["aria-hidden","true",1,"fa","fa-pencil-square-o"],["routerLink","/sso",1,"btn","btn-outline-secondary","btn-block","mt-2"],["aria-hidden","true",1,"fa","fa-bank"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"div",3),l.ɵɵtext(6,"\n "),l.ɵɵelement(7,"img",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"p",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"div",6),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"div",7),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"div",8),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"label",9),l.ɵɵtext(20),l.ɵɵpipe(21,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"input",10),l.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",8),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"label",11),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"div",12),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"input",13),l.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"button",14),l.ɵɵlistener("click",(function(){return t.togglePassword()})),l.ɵɵpipe(37,"i18n"),l.ɵɵtext(38,"\n "),l.ɵɵelement(39,"i",15),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementStart(43,"small",16),l.ɵɵtext(44,"\n "),l.ɵɵelementStart(45,"a",17),l.ɵɵtext(46),l.ɵɵpipe(47,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"div",18),l.ɵɵtext(52,"\n "),l.ɵɵelementStart(53,"input",19),l.ɵɵlistener("ngModelChange",(function(e){return t.rememberEmail=e})),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"label",20),l.ɵɵtext(56),l.ɵɵpipe(57,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(59,"\n "),l.ɵɵelement(60,"hr"),l.ɵɵtext(61,"\n "),l.ɵɵelementStart(62,"div",12),l.ɵɵtext(63,"\n "),l.ɵɵelementStart(64,"button",21),l.ɵɵtext(65,"\n "),l.ɵɵelementStart(66,"span"),l.ɵɵtext(67,"\n "),l.ɵɵelement(68,"i",22),l.ɵɵtext(69),l.ɵɵpipe(70,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(71,"\n "),l.ɵɵelement(72,"i",23),l.ɵɵpipe(73,"i18n"),l.ɵɵtext(74,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(75,"\n "),l.ɵɵelementStart(76,"a",24),l.ɵɵtext(77,"\n "),l.ɵɵelement(78,"i",25),l.ɵɵtext(79),l.ɵɵpipe(80,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(81,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(82,"\n "),l.ɵɵelementStart(83,"div",12),l.ɵɵtext(84,"\n "),l.ɵɵelementStart(85,"a",26),l.ɵɵtext(86,"\n "),l.ɵɵelement(87,"i",27),l.ɵɵtext(88),l.ɵɵpipe(89,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(90,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(91,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(92,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(93,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(94,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(95,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(96,"\n")),2&e){var n=l.ɵɵreference(1);l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,18,"loginOrCreateNewAccount")),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(21,20,"emailAddress")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.email),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(30,22,"masterPass")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),l.ɵɵproperty("ngModel",t.masterPassword),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(37,24,"toggleVisibility")),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(38,I,!t.showPassword,t.showPassword)),l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(47,26,"getMasterPasswordHint")),l.ɵɵadvance(7),l.ɵɵproperty("ngModel",t.rememberEmail),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(57,28,"rememberEmail")),l.ɵɵadvance(8),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(5),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(70,30,"logIn"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(73,32,"loading")),l.ɵɵadvance(4),l.ɵɵproperty("queryParams",l.ɵɵpureFunction1(41,E,t.email)),l.ɵɵadvance(3),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(80,34,"createAccount"),"\n "),l.ɵɵadvance(9),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(89,36,"enterpriseSingleSignOn"),"\n ")}},directives:[g.NgControlStatusGroup,g.NgForm,x.ApiActionDirective,g.DefaultValueAccessor,g.RequiredValidator,b.InputVerbatimDirective,g.NgControlStatus,g.NgModel,S.A11yTitleDirective,w.NgClass,p.RouterLinkWithHref,g.CheckboxControlValueAccessor],pipes:[C.I18nPipe],encapsulation:2}),t}(s.LoginComponent);t.LoginComponent=P},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3);var o=n(839),a=n(0),s=n(8),l=n(6),c=n(9),p=n(3),u=n(13),d=n(16),m=n(65),h=n(45),f=n(10),v=function(){function e(e,t,n,r){this.router=e,this.apiService=t,this.toasterService=n,this.i18nService=r}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),(e=new o.DeleteRecoverRequest).email=this.email.trim().toLowerCase(),this.formPromise=this.apiService.postAccountRecoverDelete(e),[4,this.formPromise];case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deleteRecoverEmailSent")),this.router.navigate(["/"]),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.I18nService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-recover-delete"]],decls:52,vars:21,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"p",4),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"p"),a.ɵɵtext(16),a.ɵɵpipe(17,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"div",7),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"label",8),a.ɵɵtext(22),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"input",9),a.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelement(28,"hr"),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",10),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"button",11),a.ɵɵtext(33,"\n "),a.ɵɵelementStart(34,"span"),a.ɵɵtext(35),a.ɵɵpipe(36,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelement(38,"i",12),a.ɵɵpipe(39,"i18n"),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementStart(42,"a",13),a.ɵɵtext(43),a.ɵɵpipe(44,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(45,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n")),2&e){var n=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,9,"deleteAccount")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(17,11,"deleteRecoverDesc")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(23,13,"emailAddress")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.email),a.ɵɵadvance(7),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(36,15,"submit")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(39,17,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(44,19,"cancel"),"\n ")}},directives:[u.NgControlStatusGroup,u.NgForm,d.ApiActionDirective,u.DefaultValueAccessor,u.RequiredValidator,m.AutofocusDirective,h.InputVerbatimDirective,u.NgControlStatus,u.NgModel,s.RouterLinkWithHref],pipes:[f.I18nPipe],encapsulation:2}),e}();t.RecoverDeleteComponent=v},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(58),n(18),n(3);var o=n(840),a=n(0),s=n(8),l=n(6),c=n(9),p=n(3),u=n(18),d=n(58),m=n(13),h=n(16),f=n(65),v=n(45),y=n(10),g=function(){function e(e,t,n,r,i,o){this.router=e,this.apiService=t,this.toasterService=n,this.i18nService=r,this.cryptoService=i,this.authService=o}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),(e=new o.TwoFactorRecoveryRequest).recoveryCode=this.recoveryCode.replace(/\s/g,"").toLowerCase(),e.email=this.email.trim().toLowerCase(),[4,this.authService.makePreloginKey(this.masterPassword,e.email)];case 1:return t=r.sent(),n=e,[4,this.cryptoService.hashPassword(this.masterPassword,t)];case 2:return n.masterPasswordHash=r.sent(),this.formPromise=this.apiService.postTwoFactorRecover(e),[4,this.formPromise];case 3:return r.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("twoStepRecoverDisabled")),this.router.navigate(["/"]),[3,5];case 4:return r.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.I18nService),a.ɵɵdirectiveInject(u.CryptoService),a.ɵɵdirectiveInject(d.AuthService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-recover-two-factor"]],decls:74,vars:32,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],["href","https://help.bitwarden.com/article/lost-two-step-device/","target","_blank","rel","noopener"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPassword","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","recoveryCode"],["id","recoveryCode","type","text","name","RecoveryCode","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"p",4),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"p"),a.ɵɵtext(16),a.ɵɵpipe(17,"i18n"),a.ɵɵelementStart(18,"a",7),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"div",8),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"label",9),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"input",10),a.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"div",8),a.ɵɵtext(33,"\n "),a.ɵɵelementStart(34,"label",11),a.ɵɵtext(35),a.ɵɵpipe(36,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"input",12),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementStart(41,"div",8),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"label",13),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementStart(47,"input",14),a.ɵɵlistener("ngModelChange",(function(e){return t.recoveryCode=e})),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelement(50,"hr"),a.ɵɵtext(51,"\n "),a.ɵɵelementStart(52,"div",15),a.ɵɵtext(53,"\n "),a.ɵɵelementStart(54,"button",16),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"span"),a.ɵɵtext(57),a.ɵɵpipe(58,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelement(60,"i",17),a.ɵɵpipe(61,"i18n"),a.ɵɵtext(62,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(63,"\n "),a.ɵɵelementStart(64,"a",18),a.ɵɵtext(65),a.ɵɵpipe(66,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(68,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(69,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(70,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(71,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(72,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(73,"\n")),2&e){var n=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,14,"recoverAccountTwoStep")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(17,16,"recoverAccountTwoStepDesc"),"\n "),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(20,18,"learnMore")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(27,20,"emailAddress")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.email),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(36,22,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(45,24,"recoveryCodeTitle")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.recoveryCode),a.ɵɵadvance(7),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(58,26,"submit")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(61,28,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(66,30,"cancel"),"\n ")}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,m.DefaultValueAccessor,m.RequiredValidator,f.AutofocusDirective,v.InputVerbatimDirective,m.NgControlStatus,m.NgModel,s.RouterLinkWithHref],pipes:[y.I18nPipe],encapsulation:2}),e}();t.RecoverTwoFactorComponent=g},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(58),n(18),n(3),n(36),n(5),n(43),n(38);var s=n(841),l=n(462),c=n(463),p=n(843),u=n(0),d=n(58),m=n(8),h=n(3),f=n(18),v=n(6),y=n(38),g=n(5),x=n(36),b=n(43),S=n(4),w=n(13),C=n(16),I=n(45),E=n(65),P=n(250),k=n(17),_=n(24),A=n(10);function O(e,t){1&e&&(u.ɵɵelementStart(0,"header",36),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",37),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",4),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",38),u.ɵɵtext(7,"\n "),u.ɵɵelement(8,"img",39),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementEnd())}function T(e,t){1&e&&(u.ɵɵelementStart(0,"div"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h2"),u.ɵɵtext(3,"Companies globally trust Bitwarden for password management."),u.ɵɵelementEnd(),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"p"),u.ɵɵtext(6,"Start your 7-day free trial!"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"p",42),u.ɵɵtext(9,"Quickly deploy your "),u.ɵɵelementStart(10,"b"),u.ɵɵtext(11,"organization"),u.ɵɵelementEnd(),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementStart(13,"p"),u.ɵɵtext(14,"Use Bitwarden across all platforms"),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"p"),u.ɵɵtext(17,"Collaborate and share securely"),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"figure"),u.ɵɵtext(20,"\n "),u.ɵɵelementStart(21,"figcaption"),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"cite"),u.ɵɵtext(24,"\n "),u.ɵɵelement(25,"img",43),u.ɵɵtext(26,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"blockquote"),u.ɵɵtext(30,'\n "Bitwarden has become a popular choice among open-source software advocates. After using\n it for a few months, I can see why." - February 2020\n '),u.ɵɵelementEnd(),u.ɵɵtext(31,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementEnd())}function M(e,t){1&e&&(u.ɵɵelementStart(0,"div"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p"),u.ɵɵtext(3,"Enterprise 3 layout"),u.ɵɵelementEnd(),u.ɵɵtext(4,"\n "),u.ɵɵelementEnd())}function B(e,t){1&e&&(u.ɵɵelementStart(0,"div"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p"),u.ɵɵtext(3,"Enterprise 4 layout"),u.ɵɵelementEnd(),u.ɵɵtext(4,"\n "),u.ɵɵelementEnd())}function D(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",38),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",40),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,T,33,0,"div",41),u.ɵɵtext(5,"\n "),u.ɵɵtemplate(6,M,5,0,"div",41),u.ɵɵtext(7,"\n "),u.ɵɵtemplate(8,B,5,0,"div",41),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(4),u.ɵɵproperty("ngIf","enterprise2"===n.layout),u.ɵɵadvance(2),u.ɵɵproperty("ngIf","enterprise3"===n.layout),u.ɵɵadvance(2),u.ɵɵproperty("ngIf","enterprise4"===n.layout)}}function R(e,t){1&e&&(u.ɵɵelementStart(0,"p",44),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(2,1,"createAccount")))}function V(e,t){1&e&&(u.ɵɵelementStart(0,"app-callout",45),u.ɵɵpipe(1,"i18n"),u.ɵɵtext(2),u.ɵɵpipe(3,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(1,2,"createOrganizationStep1")),u.ɵɵadvance(2),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(3,4,"createOrganizationCreatePersonalAccount"),"\n "))}function j(e,t){if(1&e&&(u.ɵɵelementStart(0,"li"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext(2);u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind2(2,1,"policyInEffectMinComplexity",n.getPasswordScoreAlertDisplay()),"\n ")}}function F(e,t){if(1&e&&(u.ɵɵelementStart(0,"li"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext(2);u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind2(2,1,"policyInEffectMinLength",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength.toString()),"\n ")}}function U(e,t){1&e&&(u.ɵɵelementStart(0,"li"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"policyInEffectUppercase"),""))}function N(e,t){1&e&&(u.ɵɵelementStart(0,"li"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"policyInEffectLowercase"),""))}function z(e,t){1&e&&(u.ɵɵelementStart(0,"li"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"policyInEffectNumbers"),""))}function L(e,t){1&e&&(u.ɵɵelementStart(0,"li"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind2(2,1,"policyInEffectSpecial","!@#$%^&*"),""))}function G(e,t){if(1&e&&(u.ɵɵelementStart(0,"app-callout",46),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementStart(3,"ul",47),u.ɵɵtext(4,"\n "),u.ɵɵtemplate(5,j,3,4,"li",41),u.ɵɵtext(6,"\n "),u.ɵɵtemplate(7,F,3,4,"li",41),u.ɵɵtext(8,"\n "),u.ɵɵtemplate(9,U,3,3,"li",41),u.ɵɵtext(10,"\n "),u.ɵɵtemplate(11,N,3,3,"li",41),u.ɵɵtext(12,"\n "),u.ɵɵtemplate(13,z,3,3,"li",41),u.ɵɵtext(14,"\n "),u.ɵɵtemplate(15,L,3,4,"li",41),u.ɵɵtext(16,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,7,"masterPasswordPolicyInEffect"),"\n "),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minComplexity)>0),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}function K(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",12),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",48),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"input",49),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().acceptPolicies=e})),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"label",50),u.ɵɵtext(7),u.ɵɵpipe(8,"i18n"),u.ɵɵelement(9,"br"),u.ɵɵtext(10,"\n "),u.ɵɵelementStart(11,"a",51),u.ɵɵtext(12),u.ɵɵpipe(13,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(14,",\n "),u.ɵɵelementStart(15,"a",52),u.ɵɵtext(16),u.ɵɵpipe(17,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵadvance(4),u.ɵɵproperty("ngModel",r.acceptPolicies),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(8,4,"acceptPolicies"),""),u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(13,6,"termsOfService")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(17,8,"privacyPolicy"))}}var q=function(e){return["layout",e]},W=function(e,t){return{"col-5":e,"col-12":t}},H=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},$=function(e){function t(t,n,r,i,o,a,s,l,c,p){var u=e.call(this,t,n,r,i,o,s,l,c)||this;return u.route=a,u.policyService=p,u.showCreateOrgMessage=!1,u.layout="",u}return i(t,e),t.prototype.getPasswordScoreAlertDisplay=function(){if(null==this.enforcedPolicyOptions)return"";var e;switch(this.enforcedPolicyOptions.minComplexity){case 4:e=this.i18nService.t("strong");break;case 3:e=this.i18nService.t("good");break;default:e=this.i18nService.t("weak")}return e+" ("+this.enforcedPolicyOptions.minComplexity+")"},t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o=this;return a(this,(function(a){switch(a.label){case 0:return e=this.route.queryParams.subscribe((function(t){o.referenceData=new p.ReferenceEventRequest,null!=t.email&&t.email.indexOf("@")>-1&&(o.email=t.email),null!=t.premium?o.stateService.save("loginRedirect",{route:"/settings/premium"}):null!=t.org&&(o.showCreateOrgMessage=!0,o.referenceData.flow=t.org,o.stateService.save("loginRedirect",{route:"/settings/create-organization",qParams:{plan:t.org}})),null!=t.layout&&(o.layout=o.referenceData.layout=t.layout),null!=t.reference?o.referenceData.id=t.reference:o.referenceData.id=("; "+document.cookie).split("; reference=").pop().split(";").shift(),""===o.referenceData.id&&(o.referenceData.id=null),null!=e&&e.unsubscribe()})),[4,this.stateService.get("orgInvitation")];case 1:if(null==(t=a.sent()))return[3,5];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.apiService.getPoliciesByToken(t.organizationId,t.token,t.email,t.organizationUserId)];case 3:return null!=(n=a.sent()).data&&(r=n.data.map((function(e){return new c.PolicyData(e)})),this.policies=r.map((function(e){return new l.Policy(e)}))),[3,5];case 4:return a.sent(),[3,5];case 5:return null==this.policies?[3,7]:(i=this,[4,this.policyService.getMasterPasswordPolicyOptions(this.policies)]);case 6:i.enforcedPolicyOptions=a.sent(),a.label=7;case 7:return[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.masterPassword,this.enforcedPolicyOptions)?[4,e.prototype.submit.call(this)]:(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet")),[2]);case 1:return t.sent(),[2]}}))}))},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.AuthService),u.ɵɵdirectiveInject(m.Router),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(f.CryptoService),u.ɵɵdirectiveInject(v.ApiService),u.ɵɵdirectiveInject(m.ActivatedRoute),u.ɵɵdirectiveInject(y.StateService),u.ɵɵdirectiveInject(g.PlatformUtilsService),u.ɵɵdirectiveInject(x.PasswordGenerationService),u.ɵɵdirectiveInject(b.PolicyService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-register"]],features:[u.ɵɵInheritDefinitionFeature],decls:146,vars:80,consts:[[1,"layout",3,"ngClass"],["class","header",4,"ngIf"],["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],["class","col-7",4,"ngIf"],[3,"ngClass"],[1,"row","justify-content-md-center","mt-5"],["class","lead text-center mb-4",4,"ngIf"],[1,"card","d-block"],[1,"card-body"],["type","info","icon","fa-thumb-tack",3,"title",4,"ngIf"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],[1,"form-text","text-muted"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],["type","info",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],[1,"progress-bar","invisible"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],["class","form-group",4,"ngIf"],[1,"d-flex","mb-2"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"header"],[1,"container"],[1,"col-7"],["alt","Bitwarden","src","images/logo-horizontal-white.png",1,"logo","mb-2"],[1,"mt-5"],[4,"ngIf"],[1,"highlight"],["src","images/wired-logo.png","alt","Wired"],[1,"lead","text-center","mb-4"],["type","info","icon","fa-thumb-tack",3,"title"],["type","info"],[1,"mb-0"],[1,"form-check"],["type","checkbox","id","acceptPolicies","name","AcceptPolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","acceptPolicies",1,"form-check-label","small","text-muted"],["href","https://bitwarden.com/terms/","target","_blank","rel","noopener"],["href","https://bitwarden.com/privacy/","target","_blank","rel","noopener"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,O,13,0,"header",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"form",2,3),u.ɵɵlistener("ngSubmit",(function(){return t.submit()})),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"div",4),u.ɵɵtext(8,"\n "),u.ɵɵtemplate(9,D,11,3,"div",5),u.ɵɵtext(10,"\n "),u.ɵɵelementStart(11,"div",6),u.ɵɵtext(12,"\n "),u.ɵɵelementStart(13,"div",7),u.ɵɵtext(14,"\n "),u.ɵɵelementStart(15,"div",6),u.ɵɵtext(16,"\n "),u.ɵɵtemplate(17,R,3,3,"p",8),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"div",9),u.ɵɵtext(20,"\n "),u.ɵɵelementStart(21,"div",10),u.ɵɵtext(22,"\n "),u.ɵɵtemplate(23,V,4,6,"app-callout",11),u.ɵɵtext(24,"\n "),u.ɵɵelementStart(25,"div",12),u.ɵɵtext(26,"\n "),u.ɵɵelementStart(27,"label",13),u.ɵɵtext(28),u.ɵɵpipe(29,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"input",14),u.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"small",15),u.ɵɵtext(34),u.ɵɵpipe(35,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"div",12),u.ɵɵtext(39,"\n "),u.ɵɵelementStart(40,"label",16),u.ɵɵtext(41),u.ɵɵpipe(42,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(43,"\n "),u.ɵɵelementStart(44,"input",17),u.ɵɵlistener("ngModelChange",(function(e){return t.name=e})),u.ɵɵelementEnd(),u.ɵɵtext(45,"\n "),u.ɵɵelementStart(46,"small",15),u.ɵɵtext(47),u.ɵɵpipe(48,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(49,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n "),u.ɵɵelementStart(51,"div",12),u.ɵɵtext(52,"\n "),u.ɵɵtemplate(53,G,18,9,"app-callout",18),u.ɵɵtext(54,"\n "),u.ɵɵelementStart(55,"label",19),u.ɵɵtext(56),u.ɵɵpipe(57,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(58,"\n "),u.ɵɵelementStart(59,"div",20),u.ɵɵtext(60,"\n "),u.ɵɵelementStart(61,"div",21),u.ɵɵtext(62,"\n "),u.ɵɵelementStart(63,"input",22),u.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementStart(65,"app-password-strength",23),u.ɵɵtext(66,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(67,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(68,"\n "),u.ɵɵelementStart(69,"div"),u.ɵɵtext(70,"\n "),u.ɵɵelementStart(71,"button",24),u.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),u.ɵɵpipe(72,"i18n"),u.ɵɵtext(73,"\n "),u.ɵɵelement(74,"i",25),u.ɵɵtext(75,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(76,"\n "),u.ɵɵelement(77,"div",26),u.ɵɵtext(78,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(79,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(80,"\n "),u.ɵɵelementStart(81,"small",15),u.ɵɵtext(82),u.ɵɵpipe(83,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(84,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(85,"\n "),u.ɵɵelementStart(86,"div",12),u.ɵɵtext(87,"\n "),u.ɵɵelementStart(88,"label",27),u.ɵɵtext(89),u.ɵɵpipe(90,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(91,"\n "),u.ɵɵelementStart(92,"div",20),u.ɵɵtext(93,"\n "),u.ɵɵelementStart(94,"input",28),u.ɵɵlistener("ngModelChange",(function(e){return t.confirmMasterPassword=e})),u.ɵɵelementEnd(),u.ɵɵtext(95,"\n "),u.ɵɵelementStart(96,"button",24),u.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),u.ɵɵpipe(97,"i18n"),u.ɵɵtext(98,"\n "),u.ɵɵelement(99,"i",25),u.ɵɵtext(100,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(101,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(102,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(103,"\n "),u.ɵɵelementStart(104,"div",12),u.ɵɵtext(105,"\n "),u.ɵɵelementStart(106,"label",29),u.ɵɵtext(107),u.ɵɵpipe(108,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(109,"\n "),u.ɵɵelementStart(110,"input",30),u.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),u.ɵɵelementEnd(),u.ɵɵtext(111,"\n "),u.ɵɵelementStart(112,"small",15),u.ɵɵtext(113),u.ɵɵpipe(114,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(115,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(116,"\n "),u.ɵɵtemplate(117,K,21,10,"div",31),u.ɵɵtext(118,"\n "),u.ɵɵelement(119,"hr"),u.ɵɵtext(120,"\n "),u.ɵɵelementStart(121,"div",32),u.ɵɵtext(122,"\n "),u.ɵɵelementStart(123,"button",33),u.ɵɵtext(124,"\n "),u.ɵɵelementStart(125,"span"),u.ɵɵtext(126),u.ɵɵpipe(127,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(128,"\n "),u.ɵɵelement(129,"i",34),u.ɵɵpipe(130,"i18n"),u.ɵɵtext(131,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(132,"\n "),u.ɵɵelementStart(133,"a",35),u.ɵɵtext(134),u.ɵɵpipe(135,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(136,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(137,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(138,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(139,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(140,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(141,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(142,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(143,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(144,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(145,"\n")),2&e){var n=u.ɵɵreference(5);u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(66,q,t.layout)),u.ɵɵadvance(2),u.ɵɵproperty("ngIf","enterprise2"===t.layout),u.ɵɵadvance(2),u.ɵɵproperty("appApiAction",t.formPromise),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",t.layout),u.ɵɵadvance(2),u.ɵɵproperty("ngClass",u.ɵɵpureFunction2(68,W,t.layout,!t.layout)),u.ɵɵadvance(4),u.ɵɵproperty("ngClass",u.ɵɵpureFunction2(71,W,!t.layout,t.layout)),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.layout),u.ɵɵadvance(6),u.ɵɵproperty("ngIf",t.showCreateOrgMessage),u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(29,38,"emailAddress")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",t.email)("appAutofocus",""===t.email),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(35,40,"emailAddressDesc")),u.ɵɵadvance(7),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(42,42,"yourName")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",t.name)("appAutofocus",""!==t.email),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(48,44,"yourNameDesc")),u.ɵɵadvance(6),u.ɵɵproperty("ngIf",t.enforcedPolicyOptions),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(57,46,"masterPass")),u.ɵɵadvance(7),u.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),u.ɵɵproperty("ngModel",t.masterPassword),u.ɵɵadvance(2),u.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),u.ɵɵadvance(6),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(72,48,"toggleVisibility")),u.ɵɵadvance(3),u.ɵɵproperty("ngClass",u.ɵɵpureFunction2(74,H,!t.showPassword,t.showPassword)),u.ɵɵadvance(8),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(83,50,"masterPassDesc")),u.ɵɵadvance(7),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(90,52,"reTypeMasterPass")),u.ɵɵadvance(5),u.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),u.ɵɵproperty("ngModel",t.confirmMasterPassword),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(97,54,"toggleVisibility")),u.ɵɵadvance(3),u.ɵɵproperty("ngClass",u.ɵɵpureFunction2(77,H,!t.showPassword,t.showPassword)),u.ɵɵadvance(8),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(108,56,"masterPassHint")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",t.hint),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(114,58,"masterPassHintDesc")),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",t.showTerms),u.ɵɵadvance(6),u.ɵɵproperty("disabled",n.loading),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(127,60,"submit")),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(130,62,"loading")),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(135,64,"cancel"),"\n ")}},directives:[S.NgClass,S.NgIf,w.NgControlStatusGroup,w.NgForm,C.ApiActionDirective,w.DefaultValueAccessor,w.RequiredValidator,I.InputVerbatimDirective,w.NgControlStatus,w.NgModel,E.AutofocusDirective,P.PasswordStrengthComponent,k.A11yTitleDirective,m.RouterLinkWithHref,_.CalloutComponent,w.CheckboxControlValueAccessor],pipes:[A.I18nPipe],encapsulation:2}),t}(s.RegisterComponent);t.RegisterComponent=$},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(18),n(3),n(14),n(36),n(5),n(43),n(61),n(7);var o=n(844),a=n(0),s=n(6),l=n(3),c=n(18),p=n(14),u=n(7),d=n(36),m=n(5),h=n(43),f=n(8),v=n(61),y=n(13),g=n(16),x=n(4),b=n(24),S=n(45),w=n(250),C=n(17),I=n(10);function E(e,t){1&e&&(a.ɵɵelementStart(0,"div",8),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(5,4,"loading"),"\n "))}function P(e,t){if(1&e&&(a.ɵɵelementStart(0,"li"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(2,1,"policyInEffectMinComplexity",n.getPasswordScoreAlertDisplay()),"\n ")}}function k(e,t){if(1&e&&(a.ɵɵelementStart(0,"li"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(2,1,"policyInEffectMinLength",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength.toString()),"\n ")}}function _(e,t){1&e&&(a.ɵɵelementStart(0,"li"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"policyInEffectUppercase"),""))}function A(e,t){1&e&&(a.ɵɵelementStart(0,"li"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"policyInEffectLowercase"),""))}function O(e,t){1&e&&(a.ɵɵelementStart(0,"li"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"policyInEffectNumbers"),""))}function T(e,t){1&e&&(a.ɵɵelementStart(0,"li"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(2,1,"policyInEffectSpecial","!@#$%^&*"),""))}function M(e,t){if(1&e&&(a.ɵɵelementStart(0,"app-callout",11),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementStart(3,"ul",29),a.ɵɵtext(4,"\n "),a.ɵɵtemplate(5,P,3,4,"li",30),a.ɵɵtext(6,"\n "),a.ɵɵtemplate(7,k,3,4,"li",30),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,_,3,3,"li",30),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,A,3,3,"li",30),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,O,3,3,"li",30),a.ɵɵtext(14,"\n "),a.ɵɵtemplate(15,T,3,4,"li",30),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,7,"masterPasswordPolicyInEffect"),"\n "),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minComplexity)>0),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var B=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}};function D(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",10),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",11),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",12),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,M,18,9,"app-callout",13),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"label",14),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"div",15),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"div",16),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"input",17),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().masterPassword=e}))("input",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().updatePasswordStrength()})),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"app-password-strength",18),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"div"),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"button",19),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().togglePassword(!1)})),a.ɵɵpipe(27,"i18n"),a.ɵɵtext(28,"\n "),a.ɵɵelement(29,"i",20),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelement(32,"div",21),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"small",22),a.ɵɵtext(37),a.ɵɵpipe(38,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementStart(41,"div",12),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"label",23),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementStart(47,"div",15),a.ɵɵtext(48,"\n "),a.ɵɵelementStart(49,"input",24),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().masterPasswordRetype=e})),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementStart(51,"button",19),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().togglePassword(!0)})),a.ɵɵpipe(52,"i18n"),a.ɵɵtext(53,"\n "),a.ɵɵelement(54,"i",20),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n "),a.ɵɵelementStart(59,"div",12),a.ɵɵtext(60,"\n "),a.ɵɵelementStart(61,"label",25),a.ɵɵtext(62),a.ɵɵpipe(63,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(64,"\n "),a.ɵɵelementStart(65,"input",26),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().hint=e})),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementStart(67,"small",22),a.ɵɵtext(68),a.ɵɵpipe(69,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(70,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(71,"\n "),a.ɵɵelement(72,"hr"),a.ɵɵtext(73,"\n "),a.ɵɵelementStart(74,"div",15),a.ɵɵtext(75,"\n "),a.ɵɵelementStart(76,"button",27),a.ɵɵtext(77,"\n "),a.ɵɵelement(78,"i",9),a.ɵɵpipe(79,"i18n"),a.ɵɵtext(80,"\n "),a.ɵɵelementStart(81,"span"),a.ɵɵtext(82),a.ɵɵpipe(83,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(84,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(85,"\n "),a.ɵɵelementStart(86,"button",28),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().logOut()})),a.ɵɵtext(87),a.ɵɵpipe(88,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(89,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(90,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(),i=a.ɵɵreference(1);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,22,"ssoCompleteRegistration")),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",r.enforcedPolicyOptions),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,24,"masterPass")),a.ɵɵadvance(7),a.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),a.ɵɵproperty("ngModel",r.masterPassword),a.ɵɵadvance(2),a.ɵɵproperty("score",r.masterPasswordScore)("showText",!0),a.ɵɵadvance(6),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(27,26,"toggleVisibility")),a.ɵɵadvance(3),a.ɵɵproperty("ngClass",a.ɵɵpureFunction2(44,B,!r.showPassword,r.showPassword)),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(38,28,"masterPassDesc")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(45,30,"reTypeMasterPass")),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),a.ɵɵproperty("ngModel",r.masterPasswordRetype),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(52,32,"toggleVisibility")),a.ɵɵadvance(3),a.ɵɵproperty("ngClass",a.ɵɵpureFunction2(47,B,!r.showPassword,r.showPassword)),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(63,34,"masterPassHint")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.hint),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(69,36,"masterPassHintDesc")),a.ɵɵadvance(8),a.ɵɵproperty("disabled",i.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(79,38,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(83,40,"submit")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(88,42,"logOut"),"\n ")}}var R=function(e){function t(t,n,r,i,o,a,s,l,c,p,u){return e.call(this,n,r,i,o,a,s,l,c,t,p,u)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.CryptoService),a.ɵɵdirectiveInject(p.MessagingService),a.ɵɵdirectiveInject(u.UserService),a.ɵɵdirectiveInject(d.PasswordGenerationService),a.ɵɵdirectiveInject(m.PlatformUtilsService),a.ɵɵdirectiveInject(h.PolicyService),a.ɵɵdirectiveInject(f.Router),a.ɵɵdirectiveInject(v.SyncService),a.ɵɵdirectiveInject(f.ActivatedRoute))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-set-password"]],features:[a.ɵɵInheritDefinitionFeature],decls:21,vars:6,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],["class","card-body text-center",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"card-body","text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"card-body"],["type","info"],[1,"form-group"],["type","info",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPasswordHash","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],[1,"progress-bar","invisible"],[1,"form-text","text-muted"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"],[1,"mb-0"],[4,"ngIf"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"p",4),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,E,6,6,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵtemplate(15,D,91,50,"div",7),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n")),2&e&&(a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,4,"setMasterPassword")),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",t.syncLoading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.syncLoading))},directives:[y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.NgIf,b.CalloutComponent,y.DefaultValueAccessor,y.RequiredValidator,S.InputVerbatimDirective,y.NgControlStatus,y.NgModel,w.PasswordStrengthComponent,C.A11yTitleDirective,x.NgClass],pipes:[I.I18nPipe],encapsulation:2}),t}(o.SetPasswordComponent);t.SetPasswordComponent=R},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(58),n(104),n(3),n(36),n(5),n(38),n(41);var s=n(555),l=n(0),c=n(58),p=n(8),u=n(3),d=n(41),m=n(38),h=n(5),f=n(6),v=n(104),y=n(36),g=n(13),x=n(16),b=n(4),S=n(65),w=n(10);function C(e,t){1&e&&(l.ɵɵelementStart(0,"div",7),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",8),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,4,"loading"),"\n "))}function I(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",7),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",9),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"label",10),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"input",11),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().identifier=e})),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelement(15,"hr"),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"div",12),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"button",13),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"span"),l.ɵɵtext(22,"\n "),l.ɵɵelement(23,"i",14),l.ɵɵtext(24),l.ɵɵpipe(25,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelement(27,"i",8),l.ɵɵpipe(28,"i18n"),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"a",15),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(),i=l.ɵɵreference(1);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,7,"ssoLogInWithOrgIdentifier")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,9,"organizationIdentifier")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.identifier),l.ɵɵadvance(7),l.ɵɵproperty("disabled",i.loading),l.ɵɵadvance(5),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(25,11,"logIn"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(28,13,"loading")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(33,15,"cancel"),"\n ")}}var E=function(e){function t(t,n,r,i,o,a,s,l,c,p){var u=e.call(this,t,n,r,i,o,a,s,l,c,p)||this;return u.redirectUri=window.location.origin+"/sso-connector.html",u.clientId="web",u}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t,n=this;return a(this,(function(r){return e.prototype.ngOnInit.call(this),t=this.route.queryParams.subscribe((function(e){return o(n,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return null==e.identifier?[3,1]:(this.identifier=e.identifier,[3,3]);case 1:return[4,this.storageService.get("ssoOrgIdentifier")];case 2:null!=(n=r.sent())&&(this.identifier=n),r.label=3;case 3:return null!=t&&t.unsubscribe(),[2]}}))}))})),[2]}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.storageService.save("ssoOrgIdentifier",this.identifier)];case 1:return t.sent(),"browser"===this.clientId&&(document.cookie="ssoHandOffMessage="+this.i18nService.t("ssoHandOff")+";SameSite=strict"),e.prototype.submit.call(this),[2]}}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.AuthService),l.ɵɵdirectiveInject(p.Router),l.ɵɵdirectiveInject(u.I18nService),l.ɵɵdirectiveInject(p.ActivatedRoute),l.ɵɵdirectiveInject(d.StorageService),l.ɵɵdirectiveInject(m.StateService),l.ɵɵdirectiveInject(h.PlatformUtilsService),l.ɵɵdirectiveInject(f.ApiService),l.ɵɵdirectiveInject(v.CryptoFunctionService),l.ɵɵdirectiveInject(y.PasswordGenerationService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-sso"]],features:[l.ɵɵInheritDefinitionFeature],decls:19,vars:3,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["src","images/logo-dark@2x.png","alt","Bitwarden",1,"logo","mb-2"],[1,"card","d-block","mt-4"],["class","card-body",4,"ngIf"],[1,"card-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"form-group"],["for","identifier"],["id","identifier","type","text","name","Identifier","required","","appAutofocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-sign-in"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"div",3),l.ɵɵtext(6,"\n "),l.ɵɵelement(7,"img",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"div",5),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,C,6,6,"div",6),l.ɵɵtext(12,"\n "),l.ɵɵtemplate(13,I,36,17,"div",6),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n")),2&e&&(l.ɵɵproperty("appApiAction",t.initiateSsoFormPromise),l.ɵɵadvance(11),l.ɵɵproperty("ngIf",t.loggingIn),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loggingIn))},directives:[g.NgControlStatusGroup,g.NgForm,x.ApiActionDirective,b.NgIf,g.DefaultValueAccessor,g.RequiredValidator,S.AutofocusDirective,g.NgControlStatus,g.NgModel,p.RouterLinkWithHref],pipes:[w.I18nPipe],encapsulation:2}),t}(s.SsoComponent);t.SsoComponent=E},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(30),s=n(0),l=n(58),c=n(8),p=n(3),u=n(41),d=n(38),m=n(5),h=n(6),f=n(104),v=n(36),y=function(){function e(e,t,n,r,i,o,a,s,l,c){this.authService=e,this.router=t,this.i18nService=n,this.route=r,this.storageService=i,this.stateService=o,this.platformUtilsService=a,this.apiService=s,this.cryptoFunctionService=l,this.passwordGenerationService=c,this.loggingIn=!1,this.twoFactorRoute="2fa",this.successRoute="lock",this.changePasswordRoute="set-password"}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){return e=this.route.queryParams.subscribe((function(n){return r(t,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return null==n.code||null==n.state?[3,7]:[4,this.storageService.get(o.ConstantsService.ssoCodeVerifierKey)];case 1:return t=i.sent(),[4,this.storageService.get(o.ConstantsService.ssoStateKey)];case 2:return r=i.sent(),[4,this.storageService.remove(o.ConstantsService.ssoCodeVerifierKey)];case 3:return i.sent(),[4,this.storageService.remove(o.ConstantsService.ssoStateKey)];case 4:return i.sent(),null!=n.code&&null!=t&&null!=r&&this.checkState(r,n.state)?[4,this.logIn(n.code,t,this.getOrgIdentiferFromState(n.state))]:[3,6];case 5:i.sent(),i.label=6;case 6:return[3,8];case 7:null!=n.clientId&&null!=n.redirectUri&&null!=n.state&&null!=n.codeChallenge&&(this.redirectUri=n.redirectUri,this.state=n.state,this.codeChallenge=n.codeChallenge,this.clientId=n.clientId),i.label=8;case 8:return null!=e&&e.unsubscribe(),[2]}}))}))})),[2]}))}))},e.prototype.submit=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.initiateSsoFormPromise=this.preValidate(),[4,this.initiateSsoFormPromise];case 1:return r.sent()?[4,this.buildAuthorizeUrl(e,t)]:[3,3];case 2:n=r.sent(),this.platformUtilsService.launchUri(n,{sameWindow:!0}),r.label=3;case 3:return[2]}}))}))},e.prototype.preValidate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null==this.identifier||""===this.identifier?(this.platformUtilsService.showToast("error",this.i18nService.t("ssoValidationFailed"),this.i18nService.t("ssoIdentifierRequired")),[2,!1]):[4,this.apiService.preValidateSso(this.identifier)];case 1:return[2,e.sent()]}}))}))},e.prototype.buildAuthorizeUrl=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s,l,c,p,u;return i(this,(function(i){switch(i.label){case 0:return n=this.codeChallenge,r=this.state,s={type:"password",length:64,uppercase:!0,lowercase:!0,numbers:!0,special:!1},null!=n?[3,4]:[4,this.passwordGenerationService.generatePassword(s)];case 1:return l=i.sent(),[4,this.cryptoFunctionService.hash(l,"sha256")];case 2:return c=i.sent(),n=a.Utils.fromBufferToUrlB64(c),[4,this.storageService.save(o.ConstantsService.ssoCodeVerifierKey,l)];case 3:i.sent(),i.label=4;case 4:return null!=r?[3,6]:[4,this.passwordGenerationService.generatePassword(s)];case 5:r=i.sent(),e&&(r+="_returnUri='"+e+"'"),i.label=6;case 6:return r+="_identifier="+this.identifier,[4,this.storageService.save(o.ConstantsService.ssoStateKey,r)];case 7:return i.sent(),p=this.apiService.identityBaseUrl+"/connect/authorize?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&scope=api offline_access&state="+r+"&code_challenge="+n+"&code_challenge_method=S256&response_mode=query&domain_hint="+encodeURIComponent(this.identifier),t?[4,this.apiService.getSsoUserIdentifier()]:[3,9];case 8:u=i.sent(),p+="&user_identifier="+encodeURIComponent(u),i.label=9;case 9:return[2,p]}}))}))},e.prototype.logIn=function(e,t,n){return r(this,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:this.loggingIn=!0,i.label=1;case 1:return i.trys.push([1,8,,9]),this.formPromise=this.authService.logInSso(e,t,this.redirectUri),[4,this.formPromise];case 2:return(r=i.sent()).twoFactor?(null!=this.onSuccessfulLoginTwoFactorNavigate?this.onSuccessfulLoginTwoFactorNavigate():this.router.navigate([this.twoFactorRoute],{queryParams:{identifier:n,sso:"true"}}),[3,7]):[3,3];case 3:return r.resetMasterPassword?(null!=this.onSuccessfulLoginChangePasswordNavigate?this.onSuccessfulLoginChangePasswordNavigate():this.router.navigate([this.changePasswordRoute],{queryParams:{identifier:n}}),[3,7]):[3,4];case 4:return[4,this.storageService.get(o.ConstantsService.disableFaviconKey)];case 5:return a=i.sent(),[4,this.stateService.save(o.ConstantsService.disableFaviconKey,!!a)];case 6:i.sent(),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute]),i.label=7;case 7:return[3,9];case 8:return i.sent(),[3,9];case 9:return this.loggingIn=!1,[2]}}))}))},e.prototype.getOrgIdentiferFromState=function(e){if(null==e)return null;var t=e.split("_identifier=");return t.length>1?t[1]:null},e.prototype.checkState=function(e,t){if(null==e)return!1;if(null==t)return!1;var n=e.split("_identifier="),r=t.split("_identifier=");return n[0]===r[0]},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(p.I18nService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(u.StorageService),s.ɵɵdirectiveInject(d.StateService),s.ɵɵdirectiveInject(m.PlatformUtilsService),s.ɵɵdirectiveInject(h.ApiService),s.ɵɵdirectiveInject(f.CryptoFunctionService),s.ɵɵdirectiveInject(v.PasswordGenerationService))},e.ɵdir=s.ɵɵdefineDirective({type:e}),e}();t.SsoComponent=y},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=(n(8),n(557)),c=n(84),p=(n(6),n(58),n(64),n(3),n(5),n(38),n(41),n(848)),u=n(0),d=n(58),m=n(8),h=n(3),f=n(6),v=n(5),y=n(38),g=n(64),x=n(41),b=n(13),S=n(16),w=n(4),C=n(37),I=n(65),E=n(45),P=n(10),k=["twoFactorOptions"];function _(e,t){1&e&&(u.ɵɵelementStart(0,"p"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"enterVerificationCodeApp"),""))}function A(e,t){if(1&e&&(u.ɵɵelementStart(0,"p"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext(2);u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind2(2,1,"enterVerificationCodeEmail",n.twoFactorEmail),"\n ")}}function O(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",22),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext(3).sendEmail(!0)})),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext(3);u.ɵɵproperty("appApiAction",r.emailPromise),u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,2,"sendVerificationCodeEmailAgain"),"\n ")}}function T(e,t){if(1&e&&(u.ɵɵelementStart(0,"small",20),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,O,3,4,"a",21),u.ɵɵtext(3,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext(2);u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.selectedProviderType===n.providerType.Email)}}function M(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,_,3,3,"p",7),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,A,3,4,"p",7),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",16),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"label",17),u.ɵɵtext(9),u.ɵɵpipe(10,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"input",18),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().token=e})),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵtemplate(14,T,4,1,"small",19),u.ɵɵtext(15,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.selectedProviderType===r.providerType.Authenticator),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.selectedProviderType===r.providerType.Email),u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(10,5,"verificationCode")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",r.token),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.selectedProviderType===r.providerType.Email)}}function B(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p",13),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelement(6,"img",23),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",16),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"label",17),u.ɵɵtext(11),u.ɵɵpipe(12,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"input",24),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().token=e})),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,3,"insertYubiKey")),u.ɵɵadvance(8),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(12,5,"verificationCode")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",r.token)}}function D(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",25),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"iframe",26),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementContainerEnd())}function R(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",27),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"iframe",28),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementContainerEnd())}function V(e,t){1&e&&(u.ɵɵelement(0,"i",29),u.ɵɵpipe(1,"i18n")),2&e&&u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(1,1,"loading"))}function j(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",30),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"input",31),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().remember=e})),u.ɵɵelementEnd(),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"label",32),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵadvance(2),u.ɵɵproperty("ngModel",r.remember),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(6,2,"rememberMe"))}}function F(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"p"),u.ɵɵtext(7),u.ɵɵpipe(8,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,2,"noTwoStepProviders")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(8,4,"noTwoStepProviders2")))}function U(e,t){if(1&e&&(u.ɵɵelementStart(0,"button",33),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"span"),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",34),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelement(8,"i",35),u.ɵɵpipe(9,"i18n"),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd()),2&e){u.ɵɵnextContext();var n=u.ɵɵreference(1);u.ɵɵproperty("disabled",n.loading),u.ɵɵadvance(5),u.ɵɵtextInterpolate1(" ",u.ɵɵpipeBind1(6,3,"continue"),"\n "),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(9,5,"loading"))}}function N(e,t){}var z=function(e){return{"col-9":e}},L=function(e){function t(t,n,r,i,o,a,s,l,c,p){var u=e.call(this,t,n,r,i,o,window,s,a,c,p)||this;return u.componentFactoryResolver=l,u.onSuccessfulLoginNavigate=u.goAfterLogIn,u}return i(t,e),t.prototype.anotherMethod=function(){var e=this,t=this.componentFactoryResolver.resolveComponentFactory(c.ModalComponent),n=this.twoFactorOptionsModal.createComponent(t).instance,r=n.show(l.TwoFactorOptionsComponent,this.twoFactorOptionsModal);r.onProviderSelected.subscribe((function(t){return o(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return n.close(),this.selectedProviderType=t,[4,this.init()];case 1:return e.sent(),[2]}}))}))})),r.onRecoverSelected.subscribe((function(){n.close()}))},t.prototype.goAfterLogIn=function(){return o(this,void 0,void 0,(function(){var e,t,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.stateService.get("orgInvitation")];case 1:return e=r.sent(),[4,this.stateService.get("emergencyInvitation")];case 2:return t=r.sent(),null==e?[3,3]:(this.router.navigate(["accept-organization"],{queryParams:e}),[3,8]);case 3:return null==t?[3,4]:(this.router.navigate(["accept-emergency"],{queryParams:t}),[3,8]);case 4:return[4,this.stateService.get("loginRedirect")];case 5:return null==(n=r.sent())?[3,7]:(this.router.navigate([n.route],{queryParams:n.qParams}),[4,this.stateService.remove("loginRedirect")]);case 6:return r.sent(),[3,8];case 7:this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}}),r.label=8;case 8:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.AuthService),u.ɵɵdirectiveInject(m.Router),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(f.ApiService),u.ɵɵdirectiveInject(v.PlatformUtilsService),u.ɵɵdirectiveInject(y.StateService),u.ɵɵdirectiveInject(g.EnvironmentService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver),u.ɵɵdirectiveInject(x.StorageService),u.ɵɵdirectiveInject(m.ActivatedRoute))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-two-factor"]],viewQuery:function(e,t){var n;(1&e&&u.ɵɵstaticViewQuery(k,!0,s.ViewContainerRef),2&e)&&(u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.twoFactorOptionsModal=n.first))},features:[u.ɵɵInheritDefinitionFeature],decls:54,vars:19,consts:[["ngNativeValidate","","autocomplete","off",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5",3,"ngClass"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[4,"ngIf"],["class","fa fa-spinner text-muted fa-spin pull-right","aria-hidden","true",3,"title",4,"ngIf"],["class","form-check",4,"ngIf"],[1,"d-flex","mb-3"],["type","submit","class","btn btn-primary btn-block btn-submit",3,"disabled",4,"ngIf"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"text-center"],["href","#","appStopClick","",3,"click"],["twoFactorOptions",""],[1,"form-group"],["for","code",1,"sr-only"],["id","code","type","text","name","Code","required","","appAutofocus","","inputmode","tel","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["class","form-text",4,"ngIf"],[1,"form-text"],["href","#","appStopClick","",3,"appApiAction","click",4,"ngIf"],["href","#","appStopClick","",3,"appApiAction","click"],["src","images/yubikey.jpg","alt","",1,"rounded","img-fluid","mb-3"],["id","code","type","password","name","Code","required","","appAutofocus","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["id","web-authn-frame",1,"mb-3"],["id","webauthn_iframe"],["id","duo-frame",1,"mb-3"],["id","duo_iframe"],["aria-hidden","true",1,"fa","fa-spinner","text-muted","fa-spin","pull-right",3,"title"],[1,"form-check"],["id","remember","type","checkbox","name","Remember",1,"form-check-input",3,"ngModel","ngModelChange"],["for","remember",1,"form-check-label"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-sign-in"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"form",0,1),u.ɵɵlistener("ngSubmit",(function(){return t.submit()})),u.ɵɵtext(2,"\n "),u.ɵɵelementStart(3,"div",2),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"div",3),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"p",4),u.ɵɵtext(8),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",5),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"div",6),u.ɵɵtext(13,"\n "),u.ɵɵtemplate(14,M,17,7,"ng-container",7),u.ɵɵtext(15,"\n "),u.ɵɵtemplate(16,B,17,7,"ng-container",7),u.ɵɵtext(17,"\n "),u.ɵɵtemplate(18,D,7,0,"ng-container",7),u.ɵɵtext(19,"\n "),u.ɵɵtemplate(20,R,7,0,"ng-container",7),u.ɵɵtext(21,"\n "),u.ɵɵtemplate(22,V,2,3,"i",8),u.ɵɵtext(23,"\n "),u.ɵɵtemplate(24,j,8,4,"div",9),u.ɵɵtext(25,"\n "),u.ɵɵtemplate(26,F,10,6,"ng-container",7),u.ɵɵtext(27,"\n "),u.ɵɵelement(28,"hr"),u.ɵɵtext(29,"\n "),u.ɵɵelementStart(30,"div",10),u.ɵɵtext(31,"\n "),u.ɵɵtemplate(32,U,11,7,"button",11),u.ɵɵtext(33,"\n "),u.ɵɵelementStart(34,"a",12),u.ɵɵtext(35),u.ɵɵpipe(36,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(38,"\n "),u.ɵɵelementStart(39,"div",13),u.ɵɵtext(40,"\n "),u.ɵɵelementStart(41,"a",14),u.ɵɵlistener("click",(function(){return t.anotherMethod()})),u.ɵɵtext(42),u.ɵɵpipe(43,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(44,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(45,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(46,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(47,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(48,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(49,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n"),u.ɵɵtemplate(51,N,0,0,"ng-template",null,15,u.ɵɵtemplateRefExtractor),u.ɵɵtext(53,"\n")),2&e){var n=u.ɵɵreference(1);u.ɵɵproperty("appApiAction",t.formPromise),u.ɵɵadvance(5),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(17,z,t.selectedProviderType===t.providerType.Duo||t.selectedProviderType===t.providerType.OrganizationDuo)),u.ɵɵadvance(3),u.ɵɵtextInterpolate(t.title),u.ɵɵadvance(6),u.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Email||t.selectedProviderType===t.providerType.Authenticator),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Yubikey),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.WebAuthn),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Duo||t.selectedProviderType===t.providerType.OrganizationDuo),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.loading&&t.selectedProviderType===t.providerType.WebAuthn),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",null!=t.selectedProviderType),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",null==t.selectedProviderType),u.ɵɵadvance(6),u.ɵɵproperty("ngIf",null!=t.selectedProviderType&&t.selectedProviderType!==t.providerType.Duo&&t.selectedProviderType!==t.providerType.OrganizationDuo&&t.selectedProviderType!==t.providerType.WebAuthn),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(36,13,"cancel"),"\n "),u.ɵɵadvance(7),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(43,15,"useAnotherTwoStepMethod"))}},directives:[b.NgControlStatusGroup,b.NgForm,S.ApiActionDirective,w.NgClass,w.NgIf,m.RouterLinkWithHref,C.StopClickDirective,b.DefaultValueAccessor,b.RequiredValidator,I.AutofocusDirective,E.InputVerbatimDirective,b.NgControlStatus,b.NgModel,b.CheckboxControlValueAccessor],pipes:[P.I18nPipe],encapsulation:2}),t}(p.TwoFactorComponent);t.TwoFactorComponent=L},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(58),n(3),n(5);var o=n(846),a=n(0),s=n(58),l=n(8),c=n(3),p=n(5),u=n(17),d=n(4),m=n(37),h=n(10);function f(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",9),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=t.$implicit;return a.ɵɵnextContext().choose(e)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"img",12),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"h3"),a.ɵɵtext(5),a.ɵɵelementEnd(),a.ɵɵtext(6),a.ɵɵelementEnd()}if(2&e){var r=t.$implicit;a.ɵɵadvance(2),a.ɵɵproperty("src","images/two-factor/"+r.type+".png",a.ɵɵsanitizeUrl),a.ɵɵadvance(3),a.ɵɵtextInterpolate(r.name),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",r.description,"\n ")}}var v=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i,window)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.AuthService),a.ɵɵdirectiveInject(l.Router),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.PlatformUtilsService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-options"]],features:[a.ɵɵInheritDefinitionFeature],decls:43,vars:16,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","twoStepOptionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","twoStepOptionsTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"list-group","list-group-flush"],["href","#","appStopClick","","class","list-group-item list-group-item-action",3,"click",4,"ngFor","ngForOf"],["href","#","appStopClick","",1,"list-group-item","list-group-item-action",3,"click"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["alt","",1,"pull-right",3,"src"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"h2",4),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"button",5),a.ɵɵpipe(13,"i18n"),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"span",6),a.ɵɵtext(16,"×"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"div",7),a.ɵɵtext(21,"\n "),a.ɵɵtemplate(22,f,7,3,"a",8),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"a",9),a.ɵɵlistener("click",(function(){return t.recover()})),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"h3"),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"div",10),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"button",11),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n")),2&e&&(a.ɵɵadvance(9),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,6,"twoStepOptions")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(13,8,"close")),a.ɵɵadvance(10),a.ɵɵproperty("ngForOf",t.providers),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(28,10,"recoveryCodeTitle")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,12,"recoveryCodeDesc"),"\n "),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,14,"close")))},directives:[u.A11yTitleDirective,d.NgForOf,m.StopClickDirective],pipes:[h.I18nPipe],encapsulation:2}),t}(o.TwoFactorOptionsComponent);t.TwoFactorOptionsComponent=v},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var r=e.call(this)||this;return r.masterPasswordHash=n,r.email=t,r}return i(t,e),t}(n(79).PasswordVerificationRequest);t.TwoFactorEmailRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.twoFactor=!1,this.resetMasterPassword=!1,this.twoFactorProviders=null};t.AuthResult=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(7);var o=n(853),a=n(0),s=n(8),l=n(9),c=n(3),p=n(6),u=n(7),d=n(10),m=function(){function e(e,t,n,r,i,o){this.router=e,this.toasterService=t,this.i18nService=n,this.route=r,this.apiService=i,this.userService=o}return e.prototype.ngOnInit=function(){var e=this,t=!1;this.route.queryParams.subscribe((function(n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(t)return[2];if(t=!0,null==n.userId||null==n.token)return[3,7];e.label=1;case 1:return e.trys.push([1,6,,7]),[4,this.apiService.postAccountVerifyEmailToken(new o.VerifyEmailRequest(n.userId,n.token))];case 2:return e.sent(),[4,this.userService.isAuthenticated()];case 3:return e.sent()?[4,this.apiService.refreshIdentityToken()]:[3,5];case 4:e.sent(),e.label=5;case 5:return this.toasterService.popAsync("success",null,this.i18nService.t("emailVerified")),this.router.navigate(["/"]),[2];case 6:return e.sent(),[3,7];case 7:return this.toasterService.popAsync("error",null,this.i18nService.t("emailVerifiedFailed")),this.router.navigate(["/"]),[2]}}))}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ToasterService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(u.UserService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-verify-email-token"]],decls:18,vars:6,consts:[[1,"mt-5","d-flex","justify-content-center"],["src","images/logo-dark@2x.png","alt","Bitwarden",1,"mb-4","logo"],[1,"text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-2x","text-muted",3,"title"],[1,"sr-only"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",1),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",2),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",3),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",4),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n")),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))},pipes:[d.I18nPipe],encapsulation:2}),e}();t.VerifyEmailTokenComponent=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3);var o=n(854),a=n(0),s=n(8),l=n(6),c=n(9),p=n(3),u=n(13),d=n(16),m=n(24),h=n(10),f=function(){function e(e,t,n,r,i){this.router=e,this.apiService=t,this.toasterService=n,this.i18nService=r,this.route=i}return e.prototype.ngOnInit=function(){var e=this,t=!1;this.route.queryParams.subscribe((function(n){return r(e,void 0,void 0,(function(){return i(this,(function(e){return t||(t=!0,null!=n.userId&&null!=n.token&&null!=n.email?(this.userId=n.userId,this.token=n.token,this.email=n.email):this.router.navigate(["/"])),[2]}))}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=new o.VerifyDeleteRecoverRequest(this.userId,this.token),this.formPromise=this.apiService.postAccountRecoverDeleteToken(e),[4,this.formPromise];case 1:return t.sent(),this.toasterService.popAsync("success",this.i18nService.t("accountDeleted"),this.i18nService.t("accountDeletedDesc")),this.router.navigate(["/"]),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-verify-recover-delete"]],decls:53,vars:21,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],["type","warning"],[1,"text-center"],[1,"d-flex"],["type","submit",1,"btn","btn-danger","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"p",4),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"app-callout",7),a.ɵɵtext(16),a.ɵɵpipe(17,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"p",8),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"strong"),a.ɵɵtext(22),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"p"),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelement(29,"hr"),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",9),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"button",10),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"span"),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelement(39,"i",11),a.ɵɵpipe(40,"i18n"),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"a",12),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(52,"\n")),2&e){var n=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,9,"deleteAccount")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(17,11,"deleteAccountWarning")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(t.email),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(27,13,"deleteRecoverConfirmDesc")),a.ɵɵadvance(7),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,15,"deleteAccount")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(40,17,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(45,19,"cancel"),"\n ")}},directives:[u.NgControlStatusGroup,u.NgForm,d.ApiActionDirective,m.CalloutComponent,s.RouterLinkWithHref],pipes:[h.I18nPipe],encapsulation:2}),e}();t.VerifyRecoverDeleteComponent=f},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(9),n(6),n(40),n(3),n(5),n(80),n(7),n(155)),s=n(140),l=n(84),c=n(563),p=n(466),u=n(0),d=n(6),m=n(8),h=n(40),f=n(9),v=n(3),y=n(5),g=n(7),x=n(80),b=n(13),S=n(4),w=n(214),C=n(37),I=n(17),E=n(10),P=n(252),k=["addEdit"],_=["usersTemplate"];function A(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",9),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",10),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n"),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function O(e,t){1&e&&(u.ɵɵelementStart(0,"p"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(2,1,"noCollectionsInList")))}function T(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"tr"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"td"),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"a",14),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).edit(e)})),u.ɵɵtext(5),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"td",15),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",16),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"button",17),u.ɵɵpipe(13,"i18n"),u.ɵɵtext(14,"\n "),u.ɵɵelement(15,"i",18),u.ɵɵtext(16,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementStart(18,"div",19),u.ɵɵtext(19,"\n "),u.ɵɵelementStart(20,"a",20),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).users(e)})),u.ɵɵtext(21,"\n "),u.ɵɵelement(22,"i",21),u.ɵɵtext(23),u.ɵɵpipe(24,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(25,"\n "),u.ɵɵelementStart(26,"a",22),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(3).delete(e)})),u.ɵɵtext(27,"\n "),u.ɵɵelement(28,"i",23),u.ɵɵtext(29),u.ɵɵpipe(30,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(31,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(33,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(34,"\n "),u.ɵɵelementEnd()}if(2&e){var r=t.$implicit;u.ɵɵadvance(5),u.ɵɵtextInterpolate(r.name),u.ɵɵadvance(7),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(13,4,"options")),u.ɵɵadvance(11),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(24,6,"users"),"\n "),u.ɵɵadvance(6),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(30,8,"delete"),"\n ")}}function M(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"table",12),u.ɵɵlistener("scrolled",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext(2).loadMore()})),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"tbody"),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,T,35,10,"tr",13),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext().ngIf,i=u.ɵɵnextContext();u.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!i.isPaging()),u.ɵɵadvance(4),u.ɵɵproperty("ngForOf",r)}}function B(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,O,3,3,"p",6),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,M,7,3,"table",11),u.ɵɵtext(5,"\n"),u.ɵɵelementContainerEnd()),2&e){var n=t.ngIf;u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!n.length),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.length)}}function D(e,t){}function R(e,t){}var V=function(){function e(e,t,n,r,i,o,a,s,l){this.apiService=e,this.route=t,this.collectionService=n,this.componentFactoryResolver=r,this.toasterService=i,this.i18nService=o,this.platformUtilsService=a,this.userService=s,this.searchService=l,this.loading=!0,this.didScroll=!1,this.pageSize=100,this.pagedCollectionsCount=0,this.modal=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e,n=this;return i(this,(function(o){switch(o.label){case 0:return this.organizationId=t.organizationId,[4,this.load()];case 1:return o.sent(),e=this.route.queryParams.subscribe((function(t){return r(n,void 0,void 0,(function(){return i(this,(function(n){return this.searchText=t.search,null!=e&&e.unsubscribe(),[2]}))}))})),[2]}}))}))})),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getOrganization(this.organizationId)];case 1:return i.sent().canManageAllCollections?[4,this.apiService.getCollections(this.organizationId)]:[3,3];case 2:return e=i.sent(),[3,5];case 3:return[4,this.apiService.getUserCollections()];case 4:e=i.sent(),i.label=5;case 5:return t=e.data.filter((function(e){return e.organizationId===r.organizationId})).map((function(e){return new s.Collection(new a.CollectionData(e))})),n=this,[4,this.collectionService.decryptMany(t)];case 6:return n.collections=i.sent(),this.resetPaging(),this.loading=!1,[2]}}))}))},e.prototype.loadMore=function(){if(this.collections&&!(this.collections.length<=this.pageSize)){var e=this.pagedCollections.length,t=this.pageSize;0===e&&this.pagedCollectionsCount>this.pageSize&&(t=this.pagedCollectionsCount),this.collections.length>e&&(this.pagedCollections=this.pagedCollections.concat(this.collections.slice(e,e+t))),this.pagedCollectionsCount=this.pagedCollections.length,this.didScroll=this.pagedCollections.length>this.pageSize}},e.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent);this.modal=this.addEditModalRef.createComponent(n).instance;var r=this.modal.show(c.CollectionAddEditComponent,this.addEditModalRef);r.organizationId=this.organizationId,r.collectionId=null!=e?e.id:null,r.onSavedCollection.subscribe((function(){t.modal.close(),t.load()})),r.onDeletedCollection.subscribe((function(){t.modal.close(),t.removeCollection(e)})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.add=function(){this.edit(null)},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteCollection(this.organizationId,e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedCollectionId",e.name)),this.removeCollection(e),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.users=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent);this.modal=this.usersModalRef.createComponent(n).instance;var r=this.modal.show(p.EntityUsersComponent,this.usersModalRef);r.organizationId=this.organizationId,r.entity="collection",r.entityId=e.id,r.entityName=e.name,r.onEditedUsers.subscribe((function(){t.load(),t.modal.close()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedCollections=[],this.loadMore(),[2]}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.collections&&this.collections.length>this.pageSize},e.prototype.removeCollection=function(e){var t=this.collections.indexOf(e);t>-1&&(this.collections.splice(t,1),this.resetPaging())},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.ApiService),u.ɵɵdirectiveInject(m.ActivatedRoute),u.ɵɵdirectiveInject(h.CollectionService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver),u.ɵɵdirectiveInject(f.ToasterService),u.ɵɵdirectiveInject(v.I18nService),u.ɵɵdirectiveInject(y.PlatformUtilsService),u.ɵɵdirectiveInject(g.UserService),u.ɵɵdirectiveInject(x.SearchService))},e.ɵcmp=u.ɵɵdefineComponent({type:e,selectors:[["app-org-manage-collections"]],viewQuery:function(e,t){var n;(1&e&&(u.ɵɵstaticViewQuery(k,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(_,!0,o.ViewContainerRef)),2&e)&&(u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.addEditModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.usersModalRef=n.first))},decls:37,vars:20,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h1"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",1),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div"),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"label",2),u.ɵɵtext(11),u.ɵɵpipe(12,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"input",3),u.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),u.ɵɵpipe(15,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementStart(18,"button",4),u.ɵɵlistener("click",(function(){return t.add()})),u.ɵɵtext(19,"\n "),u.ɵɵelement(20,"i",5),u.ɵɵtext(21),u.ɵɵpipe(22,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(23,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(24,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(25,"\n"),u.ɵɵtemplate(26,A,9,6,"ng-container",6),u.ɵɵtext(27,"\n"),u.ɵɵtemplate(28,B,6,2,"ng-container",6),u.ɵɵpipe(29,"search"),u.ɵɵtext(30,"\n"),u.ɵɵtemplate(31,D,0,0,"ng-template",null,7,u.ɵɵtemplateRefExtractor),u.ɵɵtext(33,"\n"),u.ɵɵtemplate(34,R,0,0,"ng-template",null,8,u.ɵɵtemplateRefExtractor),u.ɵɵtext(36,"\n")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,7,"collections")),u.ɵɵadvance(8),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(12,9,"search")),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("placeholder",u.ɵɵpipeBind1(15,11,"search")),u.ɵɵproperty("ngModel",t.searchText),u.ɵɵadvance(7),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(22,13,"newCollection"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedCollections:u.ɵɵpipeBind4(29,15,t.collections,t.searchText,"name","id"))))},directives:[b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,S.NgIf,w.InfiniteScrollDirective,S.NgForOf,C.StopClickDirective,I.A11yTitleDirective],pipes:[E.I18nPipe,P.SearchPipe],encapsulation:2}),e}();t.CollectionsComponent=V},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(18),n(3),n(5),n(7),n(105)),s=n(564),l=n(279),c=n(30),p=n(0),u=n(6),d=n(3),m=n(9),h=n(5),f=n(18),v=n(7),y=n(13),g=n(16),x=n(17),b=n(4),S=n(65),w=n(53),C=n(10);function I(e,t){1&e&&(p.ɵɵelementStart(0,"div",15),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",16),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",17),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function E(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",13),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"button",28),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(3).selectAll(!0)})),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"button",28),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(3).selectAll(!1)})),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,2,"selectAll"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function P(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"noGroupsInList"),"\n "))}function k(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",37),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",17),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"groupAccessAllItems")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"groupAccessAllItems")))}function _(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"td",32),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(4).check(e)})),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"input",33),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.checked=e})),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"td",34),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(4).check(e)})),p.ɵɵtext(8),p.ɵɵtemplate(9,k,9,6,"ng-container",24),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"td",35),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"input",36),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.hidePasswords=e})),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"td",35),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"input",36),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.readOnly=e})),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;p.ɵɵadvance(4),p.ɵɵpropertyInterpolate1("name","Groups[",i,"].Checked"),p.ɵɵproperty("ngModel",r.checked)("disabled",r.accessAll),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",r.name,"\n "),p.ɵɵadvance(1),p.ɵɵproperty("ngIf",r.accessAll),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate1("name","Groups[",i,"].HidePasswords"),p.ɵɵproperty("ngModel",r.hidePasswords)("disabled",!r.checked||r.accessAll),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate1("name","Groups[",i,"].ReadOnly"),p.ɵɵproperty("ngModel",r.readOnly)("disabled",!r.checked||r.accessAll)}}function A(e,t){if(1&e&&(p.ɵɵelementStart(0,"table",29),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"thead"),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"tr"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"th"),p.ɵɵtext(7," "),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"th"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"th",30),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"th",30),p.ɵɵtext(18),p.ɵɵpipe(19,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"tbody"),p.ɵɵtext(24,"\n "),p.ɵɵtemplate(25,_,22,11,"tr",31),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(3);p.ɵɵadvance(10),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,4,"name")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(15,6,"hidePasswords")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(19,8,"readOnly")),p.ɵɵadvance(7),p.ɵɵproperty("ngForOf",n.groups)}}function O(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h3",25),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵtemplate(5,E,10,6,"div",26),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵtemplate(8,P,3,3,"div",24),p.ɵɵtext(9,"\n "),p.ɵɵtemplate(10,A,28,10,"table",27),p.ɵɵtext(11,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,4,"groupAccess"),"\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.groups&&n.groups.length),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!n.groups||!n.groups.length),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.groups&&n.groups.length)}}function T(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",15),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",18),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"label",19),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"input",20),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().name=e})),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"div",18),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"label",21),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"input",22),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().externalId=e})),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"small",23),p.ɵɵtext(20),p.ɵɵpipe(21,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,O,12,6,"ng-container",24),p.ɵɵtext(25,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,6,"name")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.name),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(15,8,"externalId")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.externalId),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(21,10,"externalIdDesc")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",r.accessGroups)}}function M(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",38,39),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().delete()})),p.ɵɵpipe(2,"i18n"),p.ɵɵtext(3,"\n "),p.ɵɵelement(4,"i",40),p.ɵɵtext(5,"\n "),p.ɵɵelement(6,"i",41),p.ɵɵpipe(7,"i18n"),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(1),i=p.ɵɵnextContext();p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(2,6,"delete")),p.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),p.ɵɵadvance(4),p.ɵɵproperty("hidden",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(7,8,"loading")),p.ɵɵproperty("hidden",!r.loading)}}var B=function(){function e(e,t,n,r,i,a){this.apiService=e,this.i18nService=t,this.toasterService=n,this.platformUtilsService=r,this.cryptoService=i,this.userService=a,this.onSavedCollection=new o.EventEmitter,this.onDeletedCollection=new o.EventEmitter,this.loading=!0,this.editMode=!1,this.accessGroups=!1,this.groups=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o,s=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getOrganization(this.organizationId)];case 1:return e=i.sent(),this.accessGroups=e.useGroups,this.editMode=this.loading=null!=this.collectionId,this.accessGroups?[4,this.apiService.getGroups(this.organizationId)]:[3,3];case 2:t=i.sent(),this.groups=t.data.map((function(e){return e})).sort(c.Utils.getSortFunction(this.i18nService,"name")),i.label=3;case 3:return n=this,[4,this.cryptoService.getOrgKey(this.organizationId)];case 4:if(n.orgKey=i.sent(),!this.editMode)return[3,10];this.editMode=!0,this.title=this.i18nService.t("editCollection"),i.label=5;case 5:return i.trys.push([5,8,,9]),[4,this.apiService.getCollectionDetails(this.organizationId,this.collectionId)];case 6:return r=i.sent(),o=this,[4,this.cryptoService.decryptToUtf8(new a.EncString(r.name),this.orgKey)];case 7:return o.name=i.sent(),this.externalId=r.externalId,null!=r.groups&&this.groups.length>0&&r.groups.forEach((function(e){var t=s.groups.filter((function(t){return!t.accessAll&&t.id===e.id}));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)})),[3,9];case 8:return i.sent(),[3,9];case 9:return[3,11];case 10:this.title=this.i18nService.t("addCollection"),i.label=11;case 11:return this.groups.forEach((function(e){e.accessAll&&(e.checked=!0)})),this.loading=!1,[2]}}))}))},e.prototype.check=function(e,t){e.accessAll||(e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1,e.hidePasswords=!1))},e.prototype.selectAll=function(e){var t=this;this.groups.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null==this.orgKey)throw new Error("No encryption key for this organization.");return e=new s.CollectionRequest,t=e,[4,this.cryptoService.encrypt(this.name,this.orgKey)];case 1:t.name=n.sent().encryptedString,e.externalId=this.externalId,e.groups=this.groups.filter((function(e){return e.checked&&!e.accessAll})).map((function(e){return new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)})),n.label=2;case 2:return n.trys.push([2,4,,5]),this.editMode?this.formPromise=this.apiService.putCollection(this.organizationId,this.collectionId,e):this.formPromise=this.apiService.postCollection(this.organizationId,e),[4,this.formPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedCollectionId":"createdCollectionId",this.name)),this.onSavedCollection.emit(),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteCollection(this.organizationId,this.collectionId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedCollectionId",this.name)),this.onDeletedCollection.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(h.PlatformUtilsService),p.ɵɵdirectiveInject(f.CryptoService),p.ɵɵdirectiveInject(v.UserService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-collection-add-edit"]],inputs:{collectionId:"collectionId",organizationId:"organizationId"},outputs:{onSavedCollection:"onSavedCollection",onDeletedCollection:"onDeletedCollection"},decls:49,vars:18,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","collectionAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","","appAutofocus","",1,"form-control",3,"ngModel","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[4,"ngIf"],[1,"mt-4","d-flex","mb-0"],["class","ml-auto",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["aria-hidden","true",1,"fa","fa-th","text-muted","fa-fw",3,"title"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"button",6),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"span",7),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵtemplate(20,I,9,6,"div",8),p.ɵɵtext(21,"\n "),p.ɵɵtemplate(22,T,26,12,"div",8),p.ɵɵtext(23,"\n "),p.ɵɵelementStart(24,"div",9),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"button",10),p.ɵɵtext(27,"\n "),p.ɵɵelement(28,"i",11),p.ɵɵpipe(29,"i18n"),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"span"),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n "),p.ɵɵelementStart(36,"button",12),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39,"\n "),p.ɵɵelementStart(40,"div",13),p.ɵɵtext(41,"\n "),p.ɵɵtemplate(42,M,9,10,"button",14),p.ɵɵtext(43,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(44,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(45,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(47,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate(t.title),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,10,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading),p.ɵɵadvance(4),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(29,12,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(33,14,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,16,"cancel")),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",t.editMode)}},directives:[y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.A11yTitleDirective,b.NgIf,y.DefaultValueAccessor,y.RequiredValidator,S.AutofocusDirective,y.NgControlStatus,y.NgModel,b.NgForOf,y.CheckboxControlValueAccessor,w.StopPropDirective],pipes:[C.I18nPipe],encapsulation:2}),e}();t.CollectionAddEditComponent=B},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.groups=[],null!=e&&(this.name=e.name?e.name.encryptedString:null,this.externalId=e.externalId)};t.CollectionRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(7),n(253);var o=n(0),a=n(6),s=n(8),l=n(253),c=n(3),p=n(9),u=n(7),d=n(13),m=n(16),h=n(4),f=n(10);function v(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",12),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",13),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noEventsInList")))}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",22),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"span",13),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"td"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",23),o.ɵɵtext(17),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelement(20,"td",24),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd()),2&e){var n=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,11,n.date,"medium")),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("text-muted fa fa-lg ",n.appIcon,""),o.ɵɵpropertyInterpolate2("title","",n.appName,", ",n.ip,""),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",n.appName,", ",n.ip,""),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",n.userEmail),o.ɵɵadvance(1),o.ɵɵtextInterpolate(n.userName),o.ɵɵadvance(3),o.ɵɵproperty("innerHTML",n.message,o.ɵɵsanitizeHtml)}}function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"thead"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"tr"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"th",17),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",18),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span",13),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"th",19),o.ɵɵtext(18),o.ɵɵpipe(19,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"th",20),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"tbody"),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,g,22,14,"tr",21),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"timestamp")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"device")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(19,9,"user")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,11,"event")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",n.events)}}function b(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",25,26),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(2).loadEvents(!1)})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",27),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){var r=o.ɵɵreference(1),i=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",i.morePromise)("disabled",i.loaded&&r.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"loadMore"))}}function S(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,y,3,3,"p",11),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,x,32,13,"table",14),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,b,10,8,"button",15),o.ɵɵtext(7,"\n"),o.ɵɵelementContainerEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.events||!n.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.events&&n.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.continuationToken)}}var w=function(e){return{"fa-spin":e}},C=function(){function e(e,t,n,r,i,o,a){this.apiService=e,this.route=t,this.eventService=n,this.i18nService=r,this.toasterService=i,this.userService=o,this.router=a,this.loading=!0,this.loaded=!1,this.orgUsersUserIdMap=new Map,this.orgUsersIdMap=new Map}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.organizationId=t.organizationId,[4,this.userService.getOrganization(this.organizationId)];case 1:return null!=(e=r.sent())&&e.useEvents?(n=this.eventService.getDefaultDateFilters(),this.start=n[0],this.end=n[1],[4,this.load()]):(this.router.navigate(["/organizations",this.organizationId]),[2]);case 2:return r.sent(),[2]}}))}))})),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.getOrganizationUsers(this.organizationId)];case 1:return t.sent().data.forEach((function(t){var n=null==t.name||""===t.name.trim()?t.email:t.name;e.orgUsersIdMap.set(t.id,{name:n,email:t.email}),e.orgUsersUserIdMap.set(t.userId,{name:n,email:t.email})})),[4,this.loadEvents(!0)];case 2:return t.sent(),this.loaded=!0,[2]}}))}))},e.prototype.loadEvents=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a=this;return i(this,(function(i){switch(i.label){case 0:if(null!=this.refreshPromise||null!=this.morePromise)return[2];t=null;try{t=this.eventService.formatDateFilters(this.start,this.end)}catch(s){return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange")),[2]}this.loading=!0,i.label=1;case 1:return i.trys.push([1,3,,4]),r=this.apiService.getEventsOrganization(this.organizationId,t[0],t[1],e?null:this.continuationToken),e?this.refreshPromise=r:this.morePromise=r,[4,r];case 2:return n=i.sent(),[3,4];case 3:return i.sent(),[3,4];case 4:return this.continuationToken=n.continuationToken,o=n.data.map((function(e){var t=null==e.actingUserId?e.userId:e.actingUserId,n=a.eventService.getEventInfo(e),r=null!=t&&a.orgUsersUserIdMap.has(t)?a.orgUsersUserIdMap.get(t):null;return{message:n.message,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=r?r.name:a.i18nService.t("unknown"),userEmail:null!=r?r.email:"",date:e.date,ip:e.ipAddress,type:e.type}})),!e&&null!=this.events&&this.events.length>0?this.events=this.events.concat(o):this.events=o,this.loading=!1,this.morePromise=null,this.refreshPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.ActivatedRoute),o.ɵɵdirectiveInject(l.EventService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(p.ToasterService),o.ɵɵdirectiveInject(u.UserService),o.ɵɵdirectiveInject(s.Router))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-org-events"]],decls:41,vars:27,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"appApiAction","disabled","click"],["refreshBtn",""],["aria-hidden","true",1,"fa","fa-refresh","fa-fw",3,"ngClass"],[4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["width","150",1,"border-top-0"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["aria-hidden","true",3,"title"],[3,"title"],[3,"innerHTML"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",1),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",2),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",3),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",4),o.ɵɵlistener("ngModelChange",(function(e){return t.start=e})),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"span",5),o.ɵɵtext(18,"-"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"label",6),o.ɵɵtext(21),o.ɵɵpipe(22,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"input",7),o.ɵɵlistener("ngModelChange",(function(e){return t.end=e})),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"button",8,9),o.ɵɵlistener("click",(function(){return t.loadEvents(!0)})),o.ɵɵtext(30,"\n "),o.ɵɵelement(31,"i",10),o.ɵɵtext(32),o.ɵɵpipe(33,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n"),o.ɵɵtemplate(37,v,9,6,"ng-container",11),o.ɵɵtext(38,"\n"),o.ɵɵtemplate(39,S,8,3,"ng-container",11),o.ɵɵtext(40,"\n")),2&e){var n=o.ɵɵreference(29);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,13,"eventLogs")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,15,"startDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(15,17,"startDate")),o.ɵɵproperty("ngModel",t.start),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(22,19,"endDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(25,21,"endDate")),o.ɵɵproperty("ngModel",t.end),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.refreshPromise)("disabled",t.loaded&&n.loading),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(25,w,t.loaded&&n.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(33,23,"refresh"),"\n "),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded)}},directives:[d.DefaultValueAccessor,d.NgControlStatus,d.NgModel,m.ApiActionDirective,h.NgClass,h.NgIf,h.NgForOf],pipes:[f.I18nPipe,h.DatePipe],encapsulation:2}),e}();t.EventsComponent=C},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(9),n(6),n(3),n(5),n(80),n(7),n(30)),s=n(84),l=n(466),c=n(567),p=n(0),u=n(6),d=n(8),m=n(3),h=n(9),f=n(5),v=n(7),y=n(80),g=n(13),x=n(4),b=n(214),S=n(37),w=n(17),C=n(10),I=n(252),E=["addEdit"],P=["usersTemplate"];function k(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",9),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",10),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function _(e,t){1&e&&(p.ɵɵelementStart(0,"p"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"noGroupsInList")))}function A(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"td"),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"a",14),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(3).edit(e)})),p.ɵɵtext(5),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"td",15),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"div",16),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"button",17),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14,"\n "),p.ɵɵelement(15,"i",18),p.ɵɵtext(16,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"div",19),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"a",20),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(3).users(e)})),p.ɵɵtext(21,"\n "),p.ɵɵelement(22,"i",21),p.ɵɵtext(23),p.ɵɵpipe(24,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"a",22),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(3).delete(e)})),p.ɵɵtext(27,"\n "),p.ɵɵelement(28,"i",23),p.ɵɵtext(29),p.ɵɵpipe(30,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(31,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit;p.ɵɵadvance(5),p.ɵɵtextInterpolate(r.name),p.ɵɵadvance(7),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,4,"options")),p.ɵɵadvance(11),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(24,6,"users"),"\n "),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(30,8,"delete"),"\n ")}}function O(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"table",12),p.ɵɵlistener("scrolled",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).loadMore()})),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"tbody"),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,A,35,10,"tr",13),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext().ngIf,i=p.ɵɵnextContext();p.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!i.isPaging()),p.ɵɵadvance(4),p.ɵɵproperty("ngForOf",r)}}function T(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,_,3,3,"p",6),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,O,7,3,"table",11),p.ɵɵtext(5,"\n"),p.ɵɵelementContainerEnd()),2&e){var n=t.ngIf;p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!n.length),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.length)}}function M(e,t){}function B(e,t){}var D=function(){function e(e,t,n,r,i,o,a,s,l){this.apiService=e,this.route=t,this.i18nService=n,this.componentFactoryResolver=r,this.toasterService=i,this.platformUtilsService=o,this.userService=a,this.router=s,this.searchService=l,this.loading=!0,this.didScroll=!1,this.pageSize=100,this.pagedGroupsCount=0,this.modal=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e,n,o=this;return i(this,(function(a){switch(a.label){case 0:return this.organizationId=t.organizationId,[4,this.userService.getOrganization(this.organizationId)];case 1:return null!=(e=a.sent())&&e.useGroups?[4,this.load()]:(this.router.navigate(["/organizations",this.organizationId]),[2]);case 2:return a.sent(),n=this.route.queryParams.subscribe((function(e){return r(o,void 0,void 0,(function(){return i(this,(function(t){return this.searchText=e.search,null!=n&&n.unsubscribe(),[2]}))}))})),[2]}}))}))})),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.apiService.getGroups(this.organizationId)];case 1:return e=n.sent(),(t=null!=e.data&&e.data.length>0?e.data:[]).sort(a.Utils.getSortFunction(this.i18nService,"name")),this.groups=t,this.resetPaging(),this.loading=!1,[2]}}))}))},e.prototype.loadMore=function(){if(this.groups&&!(this.groups.length<=this.pageSize)){var e=this.pagedGroups.length,t=this.pageSize;0===e&&this.pagedGroupsCount>this.pageSize&&(t=this.pagedGroupsCount),this.groups.length>e&&(this.pagedGroups=this.pagedGroups.concat(this.groups.slice(e,e+t))),this.pagedGroupsCount=this.pagedGroups.length,this.didScroll=this.pagedGroups.length>this.pageSize}},e.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.addEditModalRef.createComponent(n).instance;var r=this.modal.show(c.GroupAddEditComponent,this.addEditModalRef);r.organizationId=this.organizationId,r.groupId=null!=e?e.id:null,r.onSavedGroup.subscribe((function(){t.modal.close(),t.load()})),r.onDeletedGroup.subscribe((function(){t.modal.close(),t.removeGroup(e)})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.add=function(){this.edit(null)},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteGroup(this.organizationId,e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedGroupId",e.name)),this.removeGroup(e),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.users=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.usersModalRef.createComponent(n).instance;var r=this.modal.show(l.EntityUsersComponent,this.usersModalRef);r.organizationId=this.organizationId,r.entity="group",r.entityId=e.id,r.entityName=e.name,r.onEditedUsers.subscribe((function(){t.modal.close()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedGroups=[],this.loadMore(),[2]}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.groups&&this.groups.length>this.pageSize},e.prototype.removeGroup=function(e){var t=this.groups.indexOf(e);t>-1&&(this.groups.splice(t,1),this.resetPaging())},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.ActivatedRoute),p.ɵɵdirectiveInject(m.I18nService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(h.ToasterService),p.ɵɵdirectiveInject(f.PlatformUtilsService),p.ɵɵdirectiveInject(v.UserService),p.ɵɵdirectiveInject(d.Router),p.ɵɵdirectiveInject(y.SearchService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-org-groups"]],viewQuery:function(e,t){var n;(1&e&&(p.ɵɵstaticViewQuery(E,!0,o.ViewContainerRef),p.ɵɵstaticViewQuery(P,!0,o.ViewContainerRef)),2&e)&&(p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.addEditModalRef=n.first),p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.usersModalRef=n.first))},decls:37,vars:20,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"div",1),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"div"),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"label",2),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementStart(14,"input",3),p.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"button",4),p.ɵɵlistener("click",(function(){return t.add()})),p.ɵɵtext(19,"\n "),p.ɵɵelement(20,"i",5),p.ɵɵtext(21),p.ɵɵpipe(22,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n"),p.ɵɵtemplate(26,k,9,6,"ng-container",6),p.ɵɵtext(27,"\n"),p.ɵɵtemplate(28,T,6,2,"ng-container",6),p.ɵɵpipe(29,"search"),p.ɵɵtext(30,"\n"),p.ɵɵtemplate(31,M,0,0,"ng-template",null,7,p.ɵɵtemplateRefExtractor),p.ɵɵtext(33,"\n"),p.ɵɵtemplate(34,B,0,0,"ng-template",null,8,p.ɵɵtemplateRefExtractor),p.ɵɵtext(36,"\n")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,7,"groups")),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,9,"search")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("placeholder",p.ɵɵpipeBind1(15,11,"search")),p.ɵɵproperty("ngModel",t.searchText),p.ɵɵadvance(7),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(22,13,"newGroup"),"\n "),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedGroups:p.ɵɵpipeBind4(29,15,t.groups,t.searchText,"name","id"))))},directives:[g.DefaultValueAccessor,g.NgControlStatus,g.NgModel,x.NgIf,b.InfiniteScrollDirective,x.NgForOf,S.StopClickDirective,w.A11yTitleDirective],pipes:[C.I18nPipe,I.SearchPipe],encapsulation:2}),e}();t.GroupsComponent=D},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(40),n(3),n(5),n(155)),s=n(140),l=n(855),c=n(279),p=n(0),u=n(6),d=n(3),m=n(9),h=n(40),f=n(5),v=n(13),y=n(16),g=n(17),x=n(4),b=n(53),S=n(10);function w(e,t){1&e&&(p.ɵɵelementStart(0,"div",15),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",16),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",17),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function C(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",13),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"button",36),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).selectAll(!0)})),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"button",36),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).selectAll(!1)})),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,2,"selectAll"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function I(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function E(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"td",41),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(4).check(e)})),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"input",42),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.checked=e})),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"td",43),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(4).check(e)})),p.ɵɵtext(8),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"td",44),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"input",45),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.hidePasswords=e})),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"td",44),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"input",45),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),t.$implicit.readOnly=e})),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;p.ɵɵadvance(4),p.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),p.ɵɵproperty("ngModel",r.checked),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",r.name,"\n "),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate1("name","Collection[",i,"].HidePasswords"),p.ɵɵproperty("ngModel",r.hidePasswords)("disabled",!r.checked),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate1("name","Collection[",i,"].ReadOnly"),p.ɵɵproperty("ngModel",r.readOnly)("disabled",!r.checked)}}function P(e,t){if(1&e&&(p.ɵɵelementStart(0,"table",38),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"thead"),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"tr"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"th"),p.ɵɵtext(7," "),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"th"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"th",39),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"th",39),p.ɵɵtext(18),p.ɵɵpipe(19,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"tbody"),p.ɵɵtext(24,"\n "),p.ɵɵtemplate(25,E,20,9,"tr",40),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(3);p.ɵɵadvance(10),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,4,"name")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(15,6,"hidePasswords")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(19,8,"readOnly")),p.ɵɵadvance(7),p.ɵɵproperty("ngForOf",n.collections)}}function k(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,I,3,3,"div",35),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,P,28,10,"table",37),p.ɵɵtext(5,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!n.collections||!n.collections.length),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.collections&&n.collections.length)}}var _=function(e){return{"mb-0":e}};function A(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",15),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",18),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"label",19),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"input",20),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().name=e})),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"div",18),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"label",21),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"input",22),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().externalId=e})),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"small",23),p.ɵɵtext(20),p.ɵɵpipe(21,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementStart(24,"h3",24),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"div",25),p.ɵɵtext(27),p.ɵɵpipe(28,"i18n"),p.ɵɵelementStart(29,"a",26),p.ɵɵpipe(30,"i18n"),p.ɵɵtext(31,"\n "),p.ɵɵelement(32,"i",27),p.ɵɵtext(33,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n "),p.ɵɵtemplate(36,C,10,6,"div",28),p.ɵɵtext(37,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(38,"\n "),p.ɵɵelementStart(39,"div",29),p.ɵɵtext(40,"\n "),p.ɵɵelementStart(41,"div",30),p.ɵɵtext(42,"\n "),p.ɵɵelementStart(43,"input",31),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().access=e})),p.ɵɵelementEnd(),p.ɵɵtext(44,"\n "),p.ɵɵelementStart(45,"label",32),p.ɵɵtext(46),p.ɵɵpipe(47,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(49,"\n "),p.ɵɵelementStart(50,"div",30),p.ɵɵtext(51,"\n "),p.ɵɵelementStart(52,"input",33),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().access=e})),p.ɵɵelementEnd(),p.ɵɵtext(53,"\n "),p.ɵɵelementStart(54,"label",34),p.ɵɵtext(55),p.ɵɵpipe(56,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(57,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(58,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(59,"\n "),p.ɵɵtemplate(60,k,6,2,"ng-container",35),p.ɵɵtext(61,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,14,"name")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.name),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(15,16,"externalId")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.externalId),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(21,18,"externalIdDesc")),p.ɵɵadvance(7),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(28,20,"accessControl"),"\n "),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(30,22,"learnMore")),p.ɵɵadvance(7),p.ɵɵproperty("ngIf","selected"===r.access&&r.collections&&r.collections.length),p.ɵɵadvance(3),p.ɵɵproperty("ngClass",p.ɵɵpureFunction1(28,_,"selected"!==r.access)),p.ɵɵadvance(4),p.ɵɵproperty("ngModel",r.access),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(47,24,"groupAccessAllItems"),"\n "),p.ɵɵadvance(6),p.ɵɵproperty("ngModel",r.access),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(56,26,"groupAccessSelectedCollections"),"\n "),p.ɵɵadvance(5),p.ɵɵproperty("ngIf","selected"===r.access)}}function O(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",46,47),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().delete()})),p.ɵɵpipe(2,"i18n"),p.ɵɵtext(3,"\n "),p.ɵɵelement(4,"i",48),p.ɵɵtext(5,"\n "),p.ɵɵelement(6,"i",49),p.ɵɵpipe(7,"i18n"),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(1),i=p.ɵɵnextContext();p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(2,6,"delete")),p.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),p.ɵɵadvance(4),p.ɵɵproperty("hidden",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(7,8,"loading")),p.ɵɵproperty("hidden",!r.loading)}}var T=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.collectionService=r,this.platformUtilsService=i,this.onSavedGroup=new o.EventEmitter,this.onDeletedGroup=new o.EventEmitter,this.loading=!0,this.editMode=!1,this.access="selected",this.collections=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return this.editMode=this.loading=null!=this.groupId,[4,this.loadCollections()];case 1:if(n.sent(),!this.editMode)return[3,6];this.editMode=!0,this.title=this.i18nService.t("editGroup"),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.apiService.getGroupDetails(this.organizationId,this.groupId)];case 3:return e=n.sent(),this.access=e.accessAll?"all":"selected",this.name=e.name,this.externalId=e.externalId,null!=e.collections&&null!=this.collections&&e.collections.forEach((function(e){var n=t.collections.filter((function(t){return t.id===e.id}));null!=n&&n.length>0&&(n[0].checked=!0,n[0].readOnly=e.readOnly,n[0].hidePasswords=e.hidePasswords)})),[3,5];case 4:return n.sent(),[3,5];case 5:return[3,7];case 6:this.title=this.i18nService.t("addGroup"),n.label=7;case 7:return this.loading=!1,[2]}}))}))},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getCollections(this.organizationId)];case 1:return e=r.sent(),t=e.data.map((function(e){return new s.Collection(new a.CollectionData(e))})),n=this,[4,this.collectionService.decryptMany(t)];case 2:return n.collections=r.sent(),[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.collections.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:(e=new l.GroupRequest).name=this.name,e.externalId=this.externalId,e.accessAll="all"===this.access,e.accessAll||(e.collections=this.collections.filter((function(e){return e.checked})).map((function(e){return new c.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)}))),t.label=1;case 1:return t.trys.push([1,3,,4]),this.editMode?this.formPromise=this.apiService.putGroup(this.organizationId,this.groupId,e):this.formPromise=this.apiService.postGroup(this.organizationId,e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedGroupId":"createdGroupId",this.name)),this.onSavedGroup.emit(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteGroup(this.organizationId,this.groupId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedGroupId",this.name)),this.onDeletedGroup.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(h.CollectionService),p.ɵɵdirectiveInject(f.PlatformUtilsService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-group-add-edit"]],inputs:{groupId:"groupId",organizationId:"organizationId"},outputs:{onSavedGroup:"onSavedGroup",onDeletedGroup:"onDeletedGroup"},decls:49,vars:18,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","groupAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[1,"mt-4","d-flex"],[1,"mb-2"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/user-types-access-control/#access-control",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[4,"ngIf"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"button",6),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"span",7),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵtemplate(20,w,9,6,"div",8),p.ɵɵtext(21,"\n "),p.ɵɵtemplate(22,A,62,30,"div",8),p.ɵɵtext(23,"\n "),p.ɵɵelementStart(24,"div",9),p.ɵɵtext(25,"\n "),p.ɵɵelementStart(26,"button",10),p.ɵɵtext(27,"\n "),p.ɵɵelement(28,"i",11),p.ɵɵpipe(29,"i18n"),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"span"),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(35,"\n "),p.ɵɵelementStart(36,"button",12),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39,"\n "),p.ɵɵelementStart(40,"div",13),p.ɵɵtext(41,"\n "),p.ɵɵtemplate(42,O,9,10,"button",14),p.ɵɵtext(43,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(44,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(45,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(47,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate(t.title),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,10,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading),p.ɵɵadvance(4),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(29,12,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(33,14,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,16,"cancel")),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",t.editMode)}},directives:[v.NgControlStatusGroup,v.NgForm,y.ApiActionDirective,g.A11yTitleDirective,x.NgIf,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,x.NgClass,v.RadioControlValueAccessor,x.NgForOf,v.CheckboxControlValueAccessor,b.StopPropDirective],pipes:[S.I18nPipe],encapsulation:2}),e}();t.GroupAddEditComponent=T},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(7);var o=n(0),a=n(8),s=n(7),l=n(4),c=n(10);function p(e,t){1&e&&(o.ɵɵelementStart(0,"a",13),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"people"),"\n "))}function u(e,t){1&e&&(o.ɵɵelementStart(0,"a",14),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"collections"),"\n "))}function d(e,t){1&e&&(o.ɵɵelementStart(0,"a",15),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"groups"),"\n "))}function m(e,t){1&e&&(o.ɵɵelementStart(0,"a",16),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"policies"),"\n "))}function h(e,t){1&e&&(o.ɵɵelementStart(0,"a",17),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"eventLogs"),"\n "))}function f(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",5),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",6),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",7),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,p,3,3,"a",8),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,u,3,3,"a",9),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,d,3,3,"a",10),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,m,3,3,"a",11),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,h,3,3,"a",12),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,6,"manage")),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",n.organization.canManageUsers),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.organization.canManageAssignedCollections||n.organization.canManageAllCollections),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.organization.canManageGroups&&n.accessGroups),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.organization.canManagePolicies&&n.accessPolicies),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.organization.canAccessEventLogs&&n.accessEvents)}}var v=function(){function e(e,t){this.route=e,this.userService=t,this.accessPolicies=!1,this.accessGroups=!1,this.accessEvents=!1}return e.prototype.ngOnInit=function(){var e=this;this.route.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this,[4,this.userService.getOrganization(t.organizationId)];case 1:return e.organization=n.sent(),this.accessPolicies=this.organization.usePolicies,this.accessEvents=this.organization.useEvents,this.accessGroups=this.organization.useGroups,[2]}}))}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.ActivatedRoute),o.ɵɵdirectiveInject(s.UserService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-org-manage"]],decls:16,vars:1,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","people","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","collections","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","groups","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","policies","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","events","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","people","routerLinkActive","active",1,"list-group-item"],["routerLink","collections","routerLinkActive","active",1,"list-group-item"],["routerLink","groups","routerLinkActive","active",1,"list-group-item"],["routerLink","policies","routerLinkActive","active",1,"list-group-item"],["routerLink","events","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,f,19,8,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"div",4),o.ɵɵtext(10,"\n "),o.ɵɵelement(11,"router-outlet"),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(6),o.ɵɵproperty("ngIf",t.organization))},directives:[l.NgIf,a.RouterOutlet,a.RouterLinkWithHref,a.RouterLinkActive],pipes:[c.I18nPipe],encapsulation:2}),e}();t.ManageComponent=v},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(9),n(247),n(70)),s=(n(6),n(18),n(3),n(5),n(80),n(41),n(7),n(856)),l=n(157),c=n(251),p=n(30),u=n(84),d=n(467),m=n(570),h=n(571),f=n(572),v=n(0),y=n(6),g=n(8),x=n(3),b=n(5),S=n(9),w=n(18),C=n(7),I=n(41),E=n(80),P=n(247),k=n(4),_=n(13),A=n(214),O=n(24),T=n(139),M=n(37),B=n(17),D=n(10),R=n(252),V=["addEdit"],j=["groupsTemplate"],F=["eventsTemplate"],U=["confirmTemplate"];function N(e,t){if(1&e&&(v.ɵɵelementStart(0,"span",16),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext();v.ɵɵadvance(1),v.ɵɵtextInterpolate(n.allCount)}}function z(e,t){if(1&e&&(v.ɵɵelementStart(0,"span",16),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext();v.ɵɵadvance(1),v.ɵɵtextInterpolate(n.invitedCount)}}function L(e,t){if(1&e&&(v.ɵɵelementStart(0,"span",17),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext();v.ɵɵadvance(1),v.ɵɵtextInterpolate(n.acceptedCount)}}function G(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",18),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",19),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n"),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function K(e,t){1&e&&(v.ɵɵelementStart(0,"p"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"noUsersInList")))}function q(e,t){1&e&&(v.ɵɵelementStart(0,"app-callout",23),v.ɵɵpipe(1,"i18n"),v.ɵɵtext(2),v.ɵɵpipe(3,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(1,2,"confirmUsers")),v.ɵɵadvance(2),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(3,4,"usersNeedConfirmed"),"\n "))}function W(e,t){1&e&&(v.ɵɵelementStart(0,"span",39),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"invited")))}function H(e,t){1&e&&(v.ɵɵelementStart(0,"span",40),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"accepted")))}function $(e,t){if(1&e&&(v.ɵɵelementStart(0,"small",41),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext().$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate(n.name)}}function Y(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",42),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",19),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"userUsingTwoStep")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"userUsingTwoStep")))}function Q(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"owner")))}function J(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"admin")))}function X(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"manager")))}function Z(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"user")))}function ee(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"custom")))}function te(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",43),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(3).reinvite(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",44),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function ne(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",45),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(3).confirm(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",46),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function re(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",43),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(3).groups(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",47),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"groups"),"\n "))}function ie(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",43),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(3).events(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",48),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function oe(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"tr"),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"td",24),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"app-avatar",25),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n "),v.ɵɵelementStart(7,"td"),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"a",26),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=t.$implicit;return v.ɵɵnextContext(3).edit(e)})),v.ɵɵtext(10),v.ɵɵelementEnd(),v.ɵɵtext(11,"\n "),v.ɵɵtemplate(12,W,3,3,"span",27),v.ɵɵtext(13,"\n "),v.ɵɵtemplate(14,H,3,3,"span",28),v.ɵɵtext(15,"\n "),v.ɵɵtemplate(16,$,2,1,"small",29),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementStart(19,"td"),v.ɵɵtext(20,"\n "),v.ɵɵtemplate(21,Y,9,6,"ng-container",11),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(23,"\n "),v.ɵɵelementStart(24,"td"),v.ɵɵtext(25,"\n "),v.ɵɵtemplate(26,Q,3,3,"span",11),v.ɵɵtext(27,"\n "),v.ɵɵtemplate(28,J,3,3,"span",11),v.ɵɵtext(29,"\n "),v.ɵɵtemplate(30,X,3,3,"span",11),v.ɵɵtext(31,"\n "),v.ɵɵtemplate(32,Z,3,3,"span",11),v.ɵɵtext(33,"\n "),v.ɵɵtemplate(34,ee,3,3,"span",11),v.ɵɵtext(35,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(36,"\n "),v.ɵɵelementStart(37,"td",30),v.ɵɵtext(38,"\n "),v.ɵɵelementStart(39,"div",31),v.ɵɵtext(40,"\n "),v.ɵɵelementStart(41,"button",32),v.ɵɵpipe(42,"i18n"),v.ɵɵtext(43,"\n "),v.ɵɵelement(44,"i",33),v.ɵɵtext(45,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(46,"\n "),v.ɵɵelementStart(47,"div",34),v.ɵɵtext(48,"\n "),v.ɵɵtemplate(49,te,5,3,"a",35),v.ɵɵtext(50,"\n "),v.ɵɵtemplate(51,ne,5,3,"a",36),v.ɵɵtext(52,"\n "),v.ɵɵtemplate(53,re,5,3,"a",35),v.ɵɵtext(54,"\n "),v.ɵɵtemplate(55,ie,5,3,"a",35),v.ɵɵtext(56,"\n "),v.ɵɵelementStart(57,"a",37),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=t.$implicit;return v.ɵɵnextContext(3).remove(e)})),v.ɵɵtext(58,"\n "),v.ɵɵelement(59,"i",38),v.ɵɵtext(60),v.ɵɵpipe(61,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(62,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(63,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(64,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(65,"\n "),v.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=v.ɵɵnextContext(3);v.ɵɵadvance(4),v.ɵɵproperty("data",r.name||r.email)("email",r.email)("circle",!0)("fontSize",14),v.ɵɵadvance(6),v.ɵɵtextInterpolate(r.email),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.organizationUserStatusType.Invited),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.organizationUserStatusType.Accepted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.name),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",r.twoFactorEnabled),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",r.type===i.organizationUserType.Owner),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.organizationUserType.Admin),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.organizationUserType.Manager),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.organizationUserType.User),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.organizationUserType.Custom),v.ɵɵadvance(7),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(42,20,"options")),v.ɵɵadvance(8),v.ɵɵproperty("ngIf",r.status===i.organizationUserStatusType.Invited),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.organizationUserStatusType.Accepted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",i.accessGroups),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",i.accessEvents&&r.status===i.organizationUserStatusType.Confirmed),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(61,22,"remove"),"\n ")}}function ae(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,q,4,6,"app-callout",20),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"table",21),v.ɵɵlistener("scrolled",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext(2).loadMore()})),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"tbody"),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,oe,66,24,"tr",22),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(11,"\n "),v.ɵɵelementContainerEnd()}if(2&e){var r=v.ɵɵnextContext().ngIf,i=v.ɵɵnextContext();v.ɵɵadvance(2),v.ɵɵproperty("ngIf",i.showConfirmUsers),v.ɵɵadvance(2),v.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!i.isPaging()),v.ɵɵadvance(4),v.ɵɵproperty("ngForOf",r)}}function se(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,K,3,3,"p",11),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,ae,12,4,"ng-container",11),v.ɵɵtext(5,"\n"),v.ɵɵelementContainerEnd()),2&e){var n=t.ngIf;v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!n.length),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",n.length)}}function le(e,t){}function ce(e,t){}function pe(e,t){}function ue(e,t){}var de=function(e){return{active:e}},me=function(e,t){return[e,t,"name","email","id"]},he=function(){function e(e,t,n,r,i,o,a,s,p,u,d,m){this.apiService=e,this.route=t,this.i18nService=n,this.componentFactoryResolver=r,this.platformUtilsService=i,this.toasterService=o,this.cryptoService=a,this.userService=s,this.router=p,this.storageService=u,this.searchService=d,this.validationService=m,this.loading=!0,this.status=null,this.statusMap=new Map,this.organizationUserType=c.OrganizationUserType,this.organizationUserStatusType=l.OrganizationUserStatusType,this.accessEvents=!1,this.accessGroups=!1,this.didScroll=!1,this.pageSize=100,this.pagedUsersCount=0,this.modal=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e,n,o=this;return i(this,(function(a){switch(a.label){case 0:return this.organizationId=t.organizationId,[4,this.userService.getOrganization(this.organizationId)];case 1:return(e=a.sent()).canManageUsers?(this.accessEvents=e.useEvents,this.accessGroups=e.useGroups,[4,this.load()]):(this.router.navigate(["../collections"],{relativeTo:this.route}),[2]);case 2:return a.sent(),n=this.route.queryParams.subscribe((function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(r){return this.searchText=e.search,null!=e.viewEvents&&(t=this.users.filter((function(t){return t.id===e.viewEvents}))).length>0&&t[0].status===l.OrganizationUserStatusType.Confirmed&&this.events(t[0]),null!=n&&n.unsubscribe(),[2]}))}))})),[2]}}))}))})),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.apiService.getOrganizationUsers(this.organizationId)];case 1:return e=n.sent(),this.statusMap.clear(),this.allUsers=null!=e.data&&e.data.length>0?e.data:[],this.allUsers.sort(p.Utils.getSortFunction(this.i18nService,"email")),this.allUsers.forEach((function(e){t.statusMap.has(e.status)?t.statusMap.get(e.status).push(e):t.statusMap.set(e.status,[e])})),this.filter(this.status),this.loading=!1,[2]}}))}))},e.prototype.filter=function(e){this.status=e,null!=this.status?this.users=this.statusMap.get(this.status):this.users=this.allUsers,this.resetPaging()},e.prototype.loadMore=function(){if(this.users&&!(this.users.length<=this.pageSize)){var e=this.pagedUsers.length,t=this.pageSize;0===e&&this.pagedUsersCount>this.pageSize&&(t=this.pagedUsersCount),this.users.length>e&&(this.pagedUsers=this.pagedUsers.concat(this.users.slice(e,e+t))),this.pagedUsersCount=this.pagedUsers.length,this.didScroll=this.pagedUsers.length>this.pageSize}},Object.defineProperty(e.prototype,"allCount",{get:function(){return null!=this.allUsers?this.allUsers.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"invitedCount",{get:function(){return this.statusMap.has(l.OrganizationUserStatusType.Invited)?this.statusMap.get(l.OrganizationUserStatusType.Invited).length:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"acceptedCount",{get:function(){return this.statusMap.has(l.OrganizationUserStatusType.Accepted)?this.statusMap.get(l.OrganizationUserStatusType.Accepted).length:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"confirmedCount",{get:function(){return this.statusMap.has(l.OrganizationUserStatusType.Confirmed)?this.statusMap.get(l.OrganizationUserStatusType.Confirmed).length:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showConfirmUsers",{get:function(){return null!=this.allUsers&&null!=this.statusMap&&this.allUsers.length>1&&this.confirmedCount>0&&this.confirmedCount<3&&this.acceptedCount>0},enumerable:!0,configurable:!0}),e.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(u.ModalComponent);this.modal=this.addEditModalRef.createComponent(n).instance;var r=this.modal.show(m.UserAddEditComponent,this.addEditModalRef);r.name=null!=e?e.name||e.email:null,r.organizationId=this.organizationId,r.organizationUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.modal.close(),t.load()})),r.onDeletedUser.subscribe((function(){t.modal.close(),t.removeUser(e)})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.invite=function(){this.edit(null)},e.prototype.groups=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(u.ModalComponent);this.modal=this.groupsModalRef.createComponent(n).instance;var r=this.modal.show(f.UserGroupsComponent,this.groupsModalRef);r.name=null!=e?e.name||e.email:null,r.organizationId=this.organizationId,r.organizationUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.modal.close()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.remove=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),e.name||e.email,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteOrganizationUser(this.organizationId,e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("removedUserId",e.name||e.email)),this.removeUser(e),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.reinvite=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise?[2]:(this.actionPromise=this.apiService.postOrganizationUserReinvite(this.organizationId,e.id),[4,this.actionPromise]);case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("hasBeenReinvited",e.name||e.email)),this.actionPromise=null,[2]}}))}))},e.prototype.confirm=function(e){return r(this,void 0,void 0,(function(){var t,n,o,s,c,d,m,f,v,y,g=this;return i(this,(function(x){switch(x.label){case 0:return t=function(t){return r(g,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,3,4]),this.actionPromise=this.doConfirmation(e,t),[4,this.actionPromise];case 1:return r.sent(),function(t){e.status=l.OrganizationUserStatusType.Confirmed;var n=t.statusMap.get(l.OrganizationUserStatusType.Accepted).indexOf(e);n>-1&&(t.statusMap.get(l.OrganizationUserStatusType.Accepted).splice(n,1),t.statusMap.get(l.OrganizationUserStatusType.Confirmed).push(e))}(this),this.toasterService.popAsync("success",null,this.i18nService.t("hasBeenConfirmed",e.name||e.email)),[3,4];case 2:throw n=r.sent(),this.validationService.showError(n),n;case 3:return this.actionPromise=null,[7];case 4:return[2]}}))}))},null!=this.actionPromise?[2]:[4,this.storageService.get(a.ConstantsService.autoConfirmFingerprints)];case 1:if(null==(n=x.sent())||!n)return null!=this.modal&&this.modal.close(),o=this.componentFactoryResolver.resolveComponentFactory(u.ModalComponent),this.modal=this.confirmModalRef.createComponent(o).instance,(s=this.modal.show(h.UserConfirmComponent,this.confirmModalRef)).name=null!=e?e.name||e.email:null,s.organizationId=this.organizationId,s.organizationUserId=null!=e?e.id:null,s.userId=null!=e?e.userId:null,s.onConfirmedUser.subscribe((function(e){return r(g,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,t(e)];case 1:return r.sent(),this.modal.close(),[3,3];case 2:return n=r.sent(),console.error("Handled exception:",n),[3,3];case 3:return[2]}}))}))})),this.modal.onClosed.subscribe((function(){g.modal=null})),[2];x.label=2;case 2:return x.trys.push([2,9,,10]),[4,this.apiService.getUserPublicKey(e.userId)];case 3:c=x.sent(),d=p.Utils.fromB64ToArray(c.publicKey),x.label=4;case 4:return x.trys.push([4,6,,7]),f=(m=console).log,v="User's fingerprint: ",[4,this.cryptoService.getFingerprint(e.userId,d.buffer)];case 5:return f.apply(m,[v+x.sent().join("-")]),[3,7];case 6:return x.sent(),[3,7];case 7:return[4,t(d)];case 8:return x.sent(),[3,10];case 9:return y=x.sent(),console.error("Handled exception:",y),[3,10];case 10:return[2]}}))}))},e.prototype.events=function(e){return r(this,void 0,void 0,(function(){var t,n,r=this;return i(this,(function(i){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(u.ModalComponent),this.modal=this.eventsModalRef.createComponent(t).instance,(n=this.modal.show(d.EntityEventsComponent,this.eventsModalRef)).name=e.name||e.email,n.organizationId=this.organizationId,n.entityId=e.id,n.showUser=!1,n.entity="user",this.modal.onClosed.subscribe((function(){r.modal=null})),[2]}))}))},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedUsers=[],this.loadMore(),[2]}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.users&&this.users.length>this.pageSize},e.prototype.doConfirmation=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.getOrgKey(this.organizationId)];case 1:return n=i.sent(),[4,this.cryptoService.rsaEncrypt(n.key,t.buffer)];case 2:return r=i.sent(),(o=new s.OrganizationUserConfirmRequest).key=r.encryptedString,[4,this.apiService.postOrganizationUserConfirm(this.organizationId,e.id,o)];case 3:return i.sent(),[2]}}))}))},e.prototype.removeUser=function(e){var t=this.users.indexOf(e);t>-1&&(this.users.splice(t,1),this.resetPaging()),this.statusMap.has(l.OrganizationUserStatusType.Accepted)&&(t=this.statusMap.get(l.OrganizationUserStatusType.Accepted).indexOf(e))>-1&&this.statusMap.get(l.OrganizationUserStatusType.Accepted).splice(t,1),this.statusMap.has(l.OrganizationUserStatusType.Invited)&&(t=this.statusMap.get(l.OrganizationUserStatusType.Invited).indexOf(e))>-1&&this.statusMap.get(l.OrganizationUserStatusType.Invited).splice(t,1),this.statusMap.has(l.OrganizationUserStatusType.Confirmed)&&(t=this.statusMap.get(l.OrganizationUserStatusType.Confirmed).indexOf(e))>-1&&this.statusMap.get(l.OrganizationUserStatusType.Confirmed).splice(t,1)},e.ɵfac=function(t){return new(t||e)(v.ɵɵdirectiveInject(y.ApiService),v.ɵɵdirectiveInject(g.ActivatedRoute),v.ɵɵdirectiveInject(x.I18nService),v.ɵɵdirectiveInject(v.ComponentFactoryResolver),v.ɵɵdirectiveInject(b.PlatformUtilsService),v.ɵɵdirectiveInject(S.ToasterService),v.ɵɵdirectiveInject(w.CryptoService),v.ɵɵdirectiveInject(C.UserService),v.ɵɵdirectiveInject(g.Router),v.ɵɵdirectiveInject(I.StorageService),v.ɵɵdirectiveInject(E.SearchService),v.ɵɵdirectiveInject(P.ValidationService))},e.ɵcmp=v.ɵɵdefineComponent({type:e,selectors:[["app-org-people"]],viewQuery:function(e,t){var n;(1&e&&(v.ɵɵstaticViewQuery(V,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(j,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(F,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(U,!0,o.ViewContainerRef)),2&e)&&(v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.addEditModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.groupsModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.eventsModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.confirmModalRef=n.first))},decls:64,vars:45,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],["class","badge badge-pill badge-warning",4,"ngIf"],[1,"ml-3"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["groupsTemplate",""],["eventsTemplate",""],["confirmTemplate",""],[1,"badge","badge-pill","badge-info"],[1,"badge","badge-pill","badge-warning"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","fa-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","fa-check-circle",3,"title"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"fa","fa-lock",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-envelope-o"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-check"],["aria-hidden","true",1,"fa","fa-fw","fa-sitemap"],["aria-hidden","true",1,"fa","fa-fw","fa-file-text-o"]],template:function(e,t){1&e&&(v.ɵɵelementStart(0,"div",0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"h1"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"div",1),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",2),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"button",3),v.ɵɵlistener("click",(function(){return t.filter(null)})),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵtemplate(13,N,2,1,"span",4),v.ɵɵtext(14,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(15,"\n "),v.ɵɵelementStart(16,"button",3),v.ɵɵlistener("click",(function(){return t.filter(t.organizationUserStatusType.Invited)})),v.ɵɵtext(17),v.ɵɵpipe(18,"i18n"),v.ɵɵtemplate(19,z,2,1,"span",4),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementStart(22,"button",3),v.ɵɵlistener("click",(function(){return t.filter(t.organizationUserStatusType.Accepted)})),v.ɵɵtext(23),v.ɵɵpipe(24,"i18n"),v.ɵɵtemplate(25,L,2,1,"span",5),v.ɵɵtext(26,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(27,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(28,"\n "),v.ɵɵelementStart(29,"div",6),v.ɵɵtext(30,"\n "),v.ɵɵelementStart(31,"label",7),v.ɵɵtext(32),v.ɵɵpipe(33,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(34,"\n "),v.ɵɵelementStart(35,"input",8),v.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),v.ɵɵpipe(36,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(37,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(38,"\n "),v.ɵɵelementStart(39,"button",9),v.ɵɵlistener("click",(function(){return t.invite()})),v.ɵɵtext(40,"\n "),v.ɵɵelement(41,"i",10),v.ɵɵtext(42),v.ɵɵpipe(43,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(44,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(45,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(46,"\n"),v.ɵɵtemplate(47,G,9,6,"ng-container",11),v.ɵɵtext(48,"\n"),v.ɵɵtemplate(49,se,6,2,"ng-container",11),v.ɵɵpipe(50,"search"),v.ɵɵtext(51,"\n"),v.ɵɵtemplate(52,le,0,0,"ng-template",null,12,v.ɵɵtemplateRefExtractor),v.ɵɵtext(54,"\n"),v.ɵɵtemplate(55,ce,0,0,"ng-template",null,13,v.ɵɵtemplateRefExtractor),v.ɵɵtext(57,"\n"),v.ɵɵtemplate(58,pe,0,0,"ng-template",null,14,v.ɵɵtemplateRefExtractor),v.ɵɵtext(60,"\n"),v.ɵɵtemplate(61,ue,0,0,"ng-template",null,15,v.ɵɵtemplateRefExtractor),v.ɵɵtext(63,"\n")),2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,16,"people")),v.ɵɵadvance(7),v.ɵɵproperty("ngClass",v.ɵɵpureFunction1(36,de,null==t.status)),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(12,18,"all"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.allCount),v.ɵɵadvance(3),v.ɵɵproperty("ngClass",v.ɵɵpureFunction1(38,de,t.status==t.organizationUserStatusType.Invited)),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(18,20,"invited"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.invitedCount),v.ɵɵadvance(3),v.ɵɵproperty("ngClass",v.ɵɵpureFunction1(40,de,t.status==t.organizationUserStatusType.Accepted)),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(24,22,"accepted"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.acceptedCount),v.ɵɵadvance(7),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(33,24,"search")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(36,26,"search")),v.ɵɵproperty("ngModel",t.searchText),v.ɵɵadvance(7),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(43,28,"inviteUser"),"\n "),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",t.loading),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:v.ɵɵpipeBindV(50,30,v.ɵɵpureFunction2(42,me,t.users,t.searchText)))))},directives:[k.NgClass,k.NgIf,_.DefaultValueAccessor,_.NgControlStatus,_.NgModel,A.InfiniteScrollDirective,k.NgForOf,O.CalloutComponent,T.AvatarComponent,M.StopClickDirective,B.A11yTitleDirective],pipes:[D.I18nPipe,R.SearchPipe],encapsulation:2}),e}();t.PeopleComponent=he},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(40),n(3),n(5),n(155)),s=n(140),l=n(857),c=n(858),p=n(279),u=n(251),d=n(468),m=n(0),h=n(6),f=n(3),v=n(9),y=n(40),g=n(5),x=n(13),b=n(16),S=n(4),w=n(17),C=n(53),I=n(10);function E(e,t){if(1&e&&(m.ɵɵelementStart(0,"small",16),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){var n=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate(n.name)}}function P(e,t){1&e&&(m.ɵɵelementStart(0,"div",17),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",18),m.ɵɵpipe(3,"i18n"),m.ɵɵtext(4,"\n "),m.ɵɵelementStart(5,"span",19),m.ɵɵtext(6),m.ɵɵpipe(7,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(3,2,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(7,4,"loading")))}function k(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementContainerStart(0),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"p"),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(5,"\n "),m.ɵɵelementStart(6,"div",44),m.ɵɵtext(7,"\n "),m.ɵɵelementStart(8,"label",45),m.ɵɵtext(9),m.ɵɵpipe(10,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(11,"\n "),m.ɵɵelementStart(12,"input",46),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).emails=e})),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵelementStart(14,"small",16),m.ɵɵtext(15),m.ɵɵpipe(16,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(17,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(18,"\n "),m.ɵɵelementContainerEnd()}if(2&e){var r=m.ɵɵnextContext(2);m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(4,4,"inviteUserDesc")),m.ɵɵadvance(6),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(10,6,"email")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",r.emails),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind2(16,8,"inviteMultipleEmailDesc","20"))}}function _(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementContainerStart(0),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"h3",34),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(5,"\n "),m.ɵɵelementStart(6,"div",47),m.ɵɵtext(7,"\n "),m.ɵɵelementStart(8,"div",48),m.ɵɵtext(9,"\n "),m.ɵɵelementStart(10,"div",35),m.ɵɵtext(11,"\n "),m.ɵɵelementStart(12,"label",49),m.ɵɵtext(13,"Manager Permissions"),m.ɵɵelementEnd(),m.ɵɵtext(14,"\n "),m.ɵɵelement(15,"hr",50),m.ɵɵtext(16,"\n "),m.ɵɵelementStart(17,"div",51),m.ɵɵtext(18,"\n "),m.ɵɵelementStart(19,"div",52),m.ɵɵtext(20,"\n "),m.ɵɵelementStart(21,"input",53),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.manageAssignedCollections=e})),m.ɵɵelementEnd(),m.ɵɵtext(22,"\n "),m.ɵɵelementStart(23,"label",54),m.ɵɵtext(24),m.ɵɵpipe(25,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(26,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(27,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(28,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(29,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(30,"\n "),m.ɵɵelementStart(31,"div",48),m.ɵɵtext(32,"\n "),m.ɵɵelementStart(33,"div",35),m.ɵɵtext(34,"\n "),m.ɵɵelementStart(35,"label",49),m.ɵɵtext(36,"Admin Permissions"),m.ɵɵelementEnd(),m.ɵɵtext(37,"\n "),m.ɵɵelement(38,"hr",50),m.ɵɵtext(39,"\n "),m.ɵɵelementStart(40,"div",51),m.ɵɵtext(41,"\n "),m.ɵɵelementStart(42,"div",52),m.ɵɵtext(43,"\n "),m.ɵɵelementStart(44,"input",55),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.accessBusinessPortal=e})),m.ɵɵelementEnd(),m.ɵɵtext(45,"\n "),m.ɵɵelementStart(46,"label",56),m.ɵɵtext(47),m.ɵɵpipe(48,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(49,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(50,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(51,"\n "),m.ɵɵelementStart(52,"div",51),m.ɵɵtext(53,"\n "),m.ɵɵelementStart(54,"div",52),m.ɵɵtext(55,"\n "),m.ɵɵelementStart(56,"input",57),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.accessEventLogs=e})),m.ɵɵelementEnd(),m.ɵɵtext(57,"\n "),m.ɵɵelementStart(58,"label",58),m.ɵɵtext(59),m.ɵɵpipe(60,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(61,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(62,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(63,"\n "),m.ɵɵelementStart(64,"div",51),m.ɵɵtext(65,"\n "),m.ɵɵelementStart(66,"div",52),m.ɵɵtext(67,"\n "),m.ɵɵelementStart(68,"input",59),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.accessImportExport=e})),m.ɵɵelementEnd(),m.ɵɵtext(69,"\n "),m.ɵɵelementStart(70,"label",60),m.ɵɵtext(71),m.ɵɵpipe(72,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(73,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(74,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(75,"\n "),m.ɵɵelementStart(76,"div",51),m.ɵɵtext(77,"\n "),m.ɵɵelementStart(78,"div",52),m.ɵɵtext(79,"\n "),m.ɵɵelementStart(80,"input",61),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.accessReports=e})),m.ɵɵelementEnd(),m.ɵɵtext(81,"\n "),m.ɵɵelementStart(82,"label",62),m.ɵɵtext(83),m.ɵɵpipe(84,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(85,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(86,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(87,"\n "),m.ɵɵelementStart(88,"div",51),m.ɵɵtext(89,"\n "),m.ɵɵelementStart(90,"div",52),m.ɵɵtext(91,"\n "),m.ɵɵelementStart(92,"input",63),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.manageAllCollections=e})),m.ɵɵelementEnd(),m.ɵɵtext(93,"\n "),m.ɵɵelementStart(94,"label",64),m.ɵɵtext(95),m.ɵɵpipe(96,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(97,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(98,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(99,"\n "),m.ɵɵelementStart(100,"div",51),m.ɵɵtext(101,"\n "),m.ɵɵelementStart(102,"div",52),m.ɵɵtext(103,"\n "),m.ɵɵelementStart(104,"input",65),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.manageGroups=e})),m.ɵɵelementEnd(),m.ɵɵtext(105,"\n "),m.ɵɵelementStart(106,"label",66),m.ɵɵtext(107),m.ɵɵpipe(108,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(109,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(110,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(111,"\n "),m.ɵɵelementStart(112,"div",51),m.ɵɵtext(113,"\n "),m.ɵɵelementStart(114,"div",52),m.ɵɵtext(115,"\n "),m.ɵɵelementStart(116,"input",67),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.manageSso=e})),m.ɵɵelementEnd(),m.ɵɵtext(117,"\n "),m.ɵɵelementStart(118,"label",68),m.ɵɵtext(119),m.ɵɵpipe(120,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(121,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(122,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(123,"\n "),m.ɵɵelementStart(124,"div",51),m.ɵɵtext(125,"\n "),m.ɵɵelementStart(126,"div",52),m.ɵɵtext(127,"\n "),m.ɵɵelementStart(128,"input",69),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.managePolicies=e})),m.ɵɵelementEnd(),m.ɵɵtext(129,"\n "),m.ɵɵelementStart(130,"label",70),m.ɵɵtext(131),m.ɵɵpipe(132,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(133,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(134,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(135,"\n "),m.ɵɵelementStart(136,"div",51),m.ɵɵtext(137,"\n "),m.ɵɵelementStart(138,"div",52),m.ɵɵtext(139,"\n "),m.ɵɵelementStart(140,"input",71),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.manageUsers=e})),m.ɵɵelementEnd(),m.ɵɵtext(141,"\n "),m.ɵɵelementStart(142,"label",72),m.ɵɵtext(143),m.ɵɵpipe(144,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(145,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(146,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(147,"\n "),m.ɵɵelementStart(148,"div",51),m.ɵɵtext(149,"\n "),m.ɵɵelementStart(150,"div",52),m.ɵɵtext(151,"\n "),m.ɵɵelementStart(152,"input",73),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).permissions.manageResetPassword=e})),m.ɵɵelementEnd(),m.ɵɵtext(153,"\n "),m.ɵɵelementStart(154,"label",74),m.ɵɵtext(155),m.ɵɵpipe(156,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(157,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(158,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(159,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(160,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(161,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(162,"\n "),m.ɵɵelementContainerEnd()}if(2&e){var r=m.ɵɵnextContext(2);m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,23,"permissions"),"\n "),m.ɵɵadvance(18),m.ɵɵproperty("ngModel",r.permissions.manageAssignedCollections),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(25,25,"manageAssignedCollections"),"\n "),m.ɵɵadvance(20),m.ɵɵproperty("ngModel",r.permissions.accessBusinessPortal),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(48,27,"accessBusinessPortal"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.accessEventLogs),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(60,29,"accessEventLogs"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.accessImportExport),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(72,31,"accessImportExport"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.accessReports),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(84,33,"accessReports"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.manageAllCollections),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(96,35,"manageAllCollections"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.manageGroups),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(108,37,"manageGroups"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.manageSso),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(120,39,"manageSso"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.managePolicies),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(132,41,"managePolicies"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.manageUsers),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(144,43,"manageUsers"),"\n "),m.ɵɵadvance(9),m.ɵɵproperty("ngModel",r.permissions.manageResetPassword),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(156,45,"manageResetPassword"),"\n ")}}function A(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",14),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"button",75),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).selectAll(!0)})),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(5,"\n "),m.ɵɵelementStart(6,"button",75),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).selectAll(!1)})),m.ɵɵtext(7),m.ɵɵpipe(8,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(9,"\n "),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,2,"selectAll"),"\n "),m.ɵɵadvance(4),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function O(e,t){1&e&&(m.ɵɵelementStart(0,"div"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function T(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"tr"),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"td",80),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(n);var e=t.$implicit;return m.ɵɵnextContext(4).check(e)})),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"input",81),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),t.$implicit.checked=e})),m.ɵɵelementEnd(),m.ɵɵtext(5,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(6,"\n "),m.ɵɵelementStart(7,"td",82),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(n);var e=t.$implicit;return m.ɵɵnextContext(4).check(e)})),m.ɵɵtext(8),m.ɵɵelementEnd(),m.ɵɵtext(9,"\n "),m.ɵɵelementStart(10,"td",83),m.ɵɵtext(11,"\n "),m.ɵɵelementStart(12,"input",84),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),t.$implicit.hidePasswords=e})),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(14,"\n "),m.ɵɵelementStart(15,"td",83),m.ɵɵtext(16,"\n "),m.ɵɵelementStart(17,"input",84),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),t.$implicit.readOnly=e})),m.ɵɵelementEnd(),m.ɵɵtext(18,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(19,"\n "),m.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;m.ɵɵadvance(4),m.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),m.ɵɵproperty("ngModel",r.checked),m.ɵɵadvance(4),m.ɵɵtextInterpolate1("\n ",r.name,"\n "),m.ɵɵadvance(4),m.ɵɵpropertyInterpolate1("name","Collection[",i,"].HidePasswords"),m.ɵɵproperty("ngModel",r.hidePasswords)("disabled",!r.checked),m.ɵɵadvance(5),m.ɵɵpropertyInterpolate1("name","Collection[",i,"].ReadOnly"),m.ɵɵproperty("ngModel",r.readOnly)("disabled",!r.checked)}}function M(e,t){if(1&e&&(m.ɵɵelementStart(0,"table",77),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"thead"),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"tr"),m.ɵɵtext(5,"\n "),m.ɵɵelementStart(6,"th"),m.ɵɵtext(7," "),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementStart(9,"th"),m.ɵɵtext(10),m.ɵɵpipe(11,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(12,"\n "),m.ɵɵelementStart(13,"th",78),m.ɵɵtext(14),m.ɵɵpipe(15,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(16,"\n "),m.ɵɵelementStart(17,"th",78),m.ɵɵtext(18),m.ɵɵpipe(19,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(20,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(21,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(22,"\n "),m.ɵɵelementStart(23,"tbody"),m.ɵɵtext(24,"\n "),m.ɵɵtemplate(25,T,20,9,"tr",79),m.ɵɵtext(26,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(27,"\n "),m.ɵɵelementEnd()),2&e){var n=m.ɵɵnextContext(3);m.ɵɵadvance(10),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(11,4,"name")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(15,6,"hidePasswords")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(19,8,"readOnly")),m.ɵɵadvance(7),m.ɵɵproperty("ngForOf",n.collections)}}function B(e,t){if(1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1,"\n "),m.ɵɵtemplate(2,O,3,3,"div",20),m.ɵɵtext(3,"\n "),m.ɵɵtemplate(4,M,28,10,"table",76),m.ɵɵtext(5,"\n "),m.ɵɵelementContainerEnd()),2&e){var n=m.ɵɵnextContext(2);m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!n.collections||!n.collections.length),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",n.collections&&n.collections.length)}}var D=function(e){return{"mb-0":e}};function R(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"div",17),m.ɵɵtext(1,"\n "),m.ɵɵtemplate(2,k,19,11,"ng-container",20),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"h3"),m.ɵɵtext(5),m.ɵɵpipe(6,"i18n"),m.ɵɵelementStart(7,"a",21),m.ɵɵpipe(8,"i18n"),m.ɵɵtext(9,"\n "),m.ɵɵelement(10,"i",22),m.ɵɵtext(11,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(12,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵelementStart(14,"div",23),m.ɵɵtext(15,"\n "),m.ɵɵelementStart(16,"input",24),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().type=e})),m.ɵɵelementEnd(),m.ɵɵtext(17,"\n "),m.ɵɵelementStart(18,"label",25),m.ɵɵtext(19),m.ɵɵpipe(20,"i18n"),m.ɵɵelementStart(21,"small"),m.ɵɵtext(22),m.ɵɵpipe(23,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(24,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(25,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(26,"\n "),m.ɵɵelementStart(27,"div",23),m.ɵɵtext(28,"\n "),m.ɵɵelementStart(29,"input",26),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().type=e})),m.ɵɵelementEnd(),m.ɵɵtext(30,"\n "),m.ɵɵelementStart(31,"label",27),m.ɵɵtext(32),m.ɵɵpipe(33,"i18n"),m.ɵɵelementStart(34,"small"),m.ɵɵtext(35),m.ɵɵpipe(36,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(37,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(38,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(39,"\n "),m.ɵɵelementStart(40,"div",23),m.ɵɵtext(41,"\n "),m.ɵɵelementStart(42,"input",28),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().type=e})),m.ɵɵelementEnd(),m.ɵɵtext(43,"\n "),m.ɵɵelementStart(44,"label",29),m.ɵɵtext(45),m.ɵɵpipe(46,"i18n"),m.ɵɵelementStart(47,"small"),m.ɵɵtext(48),m.ɵɵpipe(49,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(50,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(51,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(52,"\n "),m.ɵɵelementStart(53,"div",23),m.ɵɵtext(54,"\n "),m.ɵɵelementStart(55,"input",30),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().type=e})),m.ɵɵelementEnd(),m.ɵɵtext(56,"\n "),m.ɵɵelementStart(57,"label",31),m.ɵɵtext(58),m.ɵɵpipe(59,"i18n"),m.ɵɵelementStart(60,"small"),m.ɵɵtext(61),m.ɵɵpipe(62,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(63,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(64,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(65,"\n "),m.ɵɵelementStart(66,"div",23),m.ɵɵtext(67,"\n "),m.ɵɵelementStart(68,"input",32),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().type=e})),m.ɵɵelementEnd(),m.ɵɵtext(69,"\n "),m.ɵɵelementStart(70,"label",33),m.ɵɵtext(71),m.ɵɵpipe(72,"i18n"),m.ɵɵelementStart(73,"small"),m.ɵɵtext(74),m.ɵɵpipe(75,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(76,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(77,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(78,"\n "),m.ɵɵtemplate(79,_,163,47,"ng-container",20),m.ɵɵtext(80,"\n "),m.ɵɵelementStart(81,"h3",34),m.ɵɵtext(82,"\n "),m.ɵɵelementStart(83,"div",35),m.ɵɵtext(84),m.ɵɵpipe(85,"i18n"),m.ɵɵelementStart(86,"a",36),m.ɵɵpipe(87,"i18n"),m.ɵɵtext(88,"\n "),m.ɵɵelement(89,"i",22),m.ɵɵtext(90,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(91,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(92,"\n "),m.ɵɵtemplate(93,A,10,6,"div",37),m.ɵɵtext(94,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(95,"\n "),m.ɵɵelementStart(96,"div",38),m.ɵɵtext(97,"\n "),m.ɵɵelementStart(98,"div",39),m.ɵɵtext(99,"\n "),m.ɵɵelementStart(100,"input",40),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().access=e})),m.ɵɵelementEnd(),m.ɵɵtext(101,"\n "),m.ɵɵelementStart(102,"label",41),m.ɵɵtext(103),m.ɵɵpipe(104,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(105,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(106,"\n "),m.ɵɵelementStart(107,"div",39),m.ɵɵtext(108,"\n "),m.ɵɵelementStart(109,"input",42),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().access=e})),m.ɵɵelementEnd(),m.ɵɵtext(110,"\n "),m.ɵɵelementStart(111,"label",43),m.ɵɵtext(112),m.ɵɵpipe(113,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(114,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(115,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(116,"\n "),m.ɵɵtemplate(117,B,6,2,"ng-container",20),m.ɵɵtext(118,"\n "),m.ɵɵelementEnd()}if(2&e){var r=m.ɵɵnextContext();m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!r.editMode),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(6,33,"userType"),"\n "),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(8,35,"learnMore")),m.ɵɵadvance(9),m.ɵɵproperty("value",r.organizationUserType.User)("ngModel",r.type),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(20,37,"user"),"\n "),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(23,39,"userDesc")),m.ɵɵadvance(7),m.ɵɵproperty("value",r.organizationUserType.Manager)("ngModel",r.type),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(33,41,"manager"),"\n "),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(36,43,"managerDesc")),m.ɵɵadvance(7),m.ɵɵproperty("value",r.organizationUserType.Admin)("ngModel",r.type),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(46,45,"admin"),"\n "),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(49,47,"adminDesc")),m.ɵɵadvance(7),m.ɵɵproperty("value",r.organizationUserType.Owner)("ngModel",r.type),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(59,49,"owner"),"\n "),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(62,51,"ownerDesc")),m.ɵɵadvance(7),m.ɵɵproperty("value",r.organizationUserType.Custom)("ngModel",r.type),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(72,53,"custom"),"\n "),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(75,55,"customDesc")),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",r.customUserTypeSelected),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(85,57,"accessControl"),"\n "),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(87,59,"learnMore")),m.ɵɵadvance(7),m.ɵɵproperty("ngIf","selected"===r.access&&r.collections&&r.collections.length),m.ɵɵadvance(3),m.ɵɵproperty("ngClass",m.ɵɵpureFunction1(65,D,"selected"!==r.access)),m.ɵɵadvance(4),m.ɵɵproperty("ngModel",r.access),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(104,61,"userAccessAllItems"),"\n "),m.ɵɵadvance(6),m.ɵɵproperty("ngModel",r.access),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(113,63,"userAccessSelectedCollections"),"\n "),m.ɵɵadvance(5),m.ɵɵproperty("ngIf","selected"===r.access)}}function V(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",85,86),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext().delete()})),m.ɵɵpipe(2,"i18n"),m.ɵɵtext(3,"\n "),m.ɵɵelement(4,"i",87),m.ɵɵtext(5,"\n "),m.ɵɵelement(6,"i",88),m.ɵɵpipe(7,"i18n"),m.ɵɵtext(8,"\n "),m.ɵɵelementEnd()}if(2&e){var r=m.ɵɵreference(1),i=m.ɵɵnextContext();m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(2,6,"delete")),m.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),m.ɵɵadvance(4),m.ɵɵproperty("hidden",r.loading),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(7,8,"loading")),m.ɵɵproperty("hidden",!r.loading)}}var j=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.collectionService=r,this.platformUtilsService=i,this.onSavedUser=new o.EventEmitter,this.onDeletedUser=new o.EventEmitter,this.loading=!0,this.editMode=!1,this.type=u.OrganizationUserType.User,this.permissions=new d.PermissionsApi,this.showCustom=!1,this.access="selected",this.collections=[],this.organizationUserType=u.OrganizationUserType}return Object.defineProperty(e.prototype,"customUserTypeSelected",{get:function(){return this.type===u.OrganizationUserType.Custom},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return this.editMode=this.loading=null!=this.organizationUserId,[4,this.loadCollections()];case 1:if(n.sent(),!this.editMode)return[3,6];this.editMode=!0,this.title=this.i18nService.t("editUser"),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.apiService.getOrganizationUser(this.organizationId,this.organizationUserId)];case 3:return e=n.sent(),this.access=e.accessAll?"all":"selected",this.type=e.type,e.type===u.OrganizationUserType.Custom&&(this.permissions=e.permissions),null!=e.collections&&null!=this.collections&&e.collections.forEach((function(e){var n=t.collections.filter((function(t){return t.id===e.id}));null!=n&&n.length>0&&(n[0].checked=!0,n[0].readOnly=e.readOnly,n[0].hidePasswords=e.hidePasswords)})),[3,5];case 4:return n.sent(),[3,5];case 5:return[3,7];case 6:this.title=this.i18nService.t("inviteUser"),n.label=7;case 7:return this.loading=!1,[2]}}))}))},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getCollections(this.organizationId)];case 1:return e=r.sent(),t=e.data.map((function(e){return new s.Collection(new a.CollectionData(e))})),n=this,[4,this.collectionService.decryptMany(t)];case 2:return n.collections=r.sent(),[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.collections.forEach((function(n){return t.check(n,e)}))},e.prototype.setRequestPermissions=function(e,t){return e.accessBusinessPortal=!t&&this.permissions.accessBusinessPortal,e.accessEventLogs=this.permissions.accessEventLogs=!t&&this.permissions.accessEventLogs,e.accessImportExport=!t&&this.permissions.accessImportExport,e.accessReports=!t&&this.permissions.accessReports,e.manageAllCollections=!t&&this.permissions.manageAllCollections,e.manageAssignedCollections=!t&&this.permissions.manageAssignedCollections,e.manageGroups=!t&&this.permissions.manageGroups,e.manageSso=!t&&this.permissions.manageSso,e.managePolicies=!t&&this.permissions.managePolicies,e.manageUsers=!t&&this.permissions.manageUsers,e.manageResetPassword=!t&&this.permissions.manageResetPassword,e},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:n=null,"all"!==this.access&&(n=this.collections.filter((function(e){return e.checked})).map((function(e){return new p.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)}))),i.label=1;case 1:return i.trys.push([1,3,,4]),this.editMode?((r=new c.OrganizationUserUpdateRequest).accessAll="all"===this.access,r.type=this.type,r.collections=n,r.permissions=this.setRequestPermissions(null!==(e=r.permissions)&&void 0!==e?e:new d.PermissionsApi,r.type!==u.OrganizationUserType.Custom),this.formPromise=this.apiService.putOrganizationUser(this.organizationId,this.organizationUserId,r)):((r=new l.OrganizationUserInviteRequest).emails=this.emails.trim().split(/\s*,\s*/),r.accessAll="all"===this.access,r.type=this.type,r.permissions=this.setRequestPermissions(null!==(t=r.permissions)&&void 0!==t?t:new d.PermissionsApi,r.type!==u.OrganizationUserType.Custom),r.collections=n,this.formPromise=this.apiService.postOrganizationUserInvite(this.organizationId,r)),[4,this.formPromise];case 2:return i.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSavedUser.emit(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteOrganizationUser(this.organizationId,this.organizationUserId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("removedUserId",this.name)),this.onDeletedUser.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(h.ApiService),m.ɵɵdirectiveInject(f.I18nService),m.ɵɵdirectiveInject(v.ToasterService),m.ɵɵdirectiveInject(y.CollectionService),m.ɵɵdirectiveInject(g.PlatformUtilsService))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["app-user-add-edit"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:51,vars:19,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/user-types-access-control/#user-types",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","userTypeUser",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeUser",1,"form-check-label"],["type","radio","name","userType","id","userTypeManager",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeManager",1,"form-check-label"],["type","radio","name","userType","id","userTypeAdmin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeAdmin",1,"form-check-label"],["type","radio","name","userType","id","userTypeOwner",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeOwner",1,"form-check-label"],["type","radio","name","userType","id","userTypeCustom",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeCustom",1,"form-check-label"],[1,"mt-4","d-flex"],[1,"mb-3"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/user-types-access-control/#access-control",3,"appA11yTitle"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[1,"form-group","mb-4"],["for","emails"],["id","emails","type","text","name","Emails","required","","appAutoFocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"row"],[1,"col-6"],[1,"font-weight-bold","mb-0"],[1,"my-0","mr-2"],[1,"form-group","mb-0"],[1,"form-check","mt-1","form-check-block"],["type","checkbox","name","manageAssignedCollections","id","manageAssignedCollections",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageAssignedCollections",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessBusinessPortal","id","accessBusinessPortal",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessBusinessPortal",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessEventLogs","id","accessEventLogs",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessEventLogs",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessImportExport","id","accessImportExport",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessImportExport",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessReports","id","accessReports",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessReports",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageAllCollections","id","manageAllCollections",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageAllCollections",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageGroups","id","manageGroups",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageGroups",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageSso","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageSso",1,"form-check-label","font-weight-normal"],["type","checkbox","name","managePolicies","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","managePolicies",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageUsers","id","manageUsers",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageUsers",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageResetPassword","id","manageResetPassword",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageResetPassword",1,"form-check-label","font-weight-normal"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6,"\n "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8,"\n "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵtemplate(11,E,2,1,"small",6),m.ɵɵtext(12,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵelementStart(14,"button",7),m.ɵɵpipe(15,"i18n"),m.ɵɵtext(16,"\n "),m.ɵɵelementStart(17,"span",8),m.ɵɵtext(18,"×"),m.ɵɵelementEnd(),m.ɵɵtext(19,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(20,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(21,"\n "),m.ɵɵtemplate(22,P,9,6,"div",9),m.ɵɵtext(23,"\n "),m.ɵɵtemplate(24,R,119,67,"div",9),m.ɵɵtext(25,"\n "),m.ɵɵelementStart(26,"div",10),m.ɵɵtext(27,"\n "),m.ɵɵelementStart(28,"button",11),m.ɵɵtext(29,"\n "),m.ɵɵelement(30,"i",12),m.ɵɵpipe(31,"i18n"),m.ɵɵtext(32,"\n "),m.ɵɵelementStart(33,"span"),m.ɵɵtext(34),m.ɵɵpipe(35,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(36,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(37,"\n "),m.ɵɵelementStart(38,"button",13),m.ɵɵtext(39),m.ɵɵpipe(40,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(41,"\n "),m.ɵɵelementStart(42,"div",14),m.ɵɵtext(43,"\n "),m.ɵɵtemplate(44,V,9,10,"button",15),m.ɵɵtext(45,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(46,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(47,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(48,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(49,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(50,"\n")),2&e){var n=m.ɵɵreference(5);m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate1("\n ",t.title,"\n "),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.name),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(15,11,"close")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",t.loading),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.loading),m.ɵɵadvance(4),m.ɵɵproperty("disabled",n.loading),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(31,13,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(35,15,"save")),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(40,17,"cancel"),"\n "),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",t.editMode)}},directives:[x.NgControlStatusGroup,x.NgForm,b.ApiActionDirective,S.NgIf,w.A11yTitleDirective,x.RadioControlValueAccessor,x.DefaultValueAccessor,x.NgControlStatus,x.NgModel,S.NgClass,x.RequiredValidator,x.CheckboxControlValueAccessor,S.NgForOf,C.StopPropDirective],pipes:[I.I18nPipe],encapsulation:2}),e}();t.UserAddEditComponent=j},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(70),s=(n(6),n(18),n(41),n(30)),l=n(0),c=n(6),p=n(18),u=n(41),d=n(13),m=n(4),h=n(17),f=n(10);function v(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}var y=function(){function e(e,t,n){this.apiService=e,this.cryptoService=t,this.storageService=n,this.onConfirmedUser=new o.EventEmitter,this.dontAskAgain=!1,this.loading=!0,this.publicKey=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,4,,5]),[4,this.apiService.getUserPublicKey(this.userId)];case 1:return null==(e=n.sent())?[3,3]:(this.publicKey=s.Utils.fromB64ToArray(e.publicKey),[4,this.cryptoService.getFingerprint(this.userId,this.publicKey.buffer)]);case 2:null!=(t=n.sent())&&(this.fingerprint=t.join("-")),n.label=3;case 3:return[3,5];case 4:return n.sent(),[3,5];case 5:return this.loading=!1,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.dontAskAgain?[4,this.storageService.save(a.ConstantsService.autoConfirmFingerprints,!0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return this.onConfirmedUser.emit(this.publicKey),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.CryptoService),l.ɵɵdirectiveInject(u.StorageService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-user-confirm"]],inputs:{name:"name",userId:"userId",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onConfirmedUser:"onConfirmedUser"},decls:67,vars:28,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://help.bitwarden.com/article/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"form-check"],["type","checkbox","id","dontAskAgain","name","DontAskAgain",1,"form-check-input",3,"ngModel","ngModelChange"],["for","dontAskAgain",1,"form-check-label"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,v,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"p"),l.ɵɵtext(26),l.ɵɵpipe(27,"i18n"),l.ɵɵelementStart(28,"a",10),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"p"),l.ɵɵelementStart(34,"code"),l.ɵɵtext(35),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"div",11),l.ɵɵtext(38,"\n "),l.ɵɵelementStart(39,"input",12),l.ɵɵlistener("ngModelChange",(function(e){return t.dontAskAgain=e})),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"label",13),l.ɵɵtext(42),l.ɵɵpipe(43,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"div",14),l.ɵɵtext(48,"\n "),l.ɵɵelementStart(49,"button",15),l.ɵɵtext(50,"\n "),l.ɵɵelement(51,"i",16),l.ɵɵpipe(52,"i18n"),l.ɵɵtext(53,"\n "),l.ɵɵelementStart(54,"span"),l.ɵɵtext(55),l.ɵɵpipe(56,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(57,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementStart(59,"button",17),l.ɵɵtext(60),l.ɵɵpipe(61,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(63,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(64,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(65,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(66,"\n")),2&e){var n=l.ɵɵreference(5);l.ɵɵadvance(10),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,12,"confirmUser"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,14,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(27,16,"fingerprintEnsureIntegrityVerify"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(30,18,"learnMore"),""),l.ɵɵadvance(6),l.ɵɵtextInterpolate(t.fingerprint),l.ɵɵadvance(4),l.ɵɵproperty("ngModel",t.dontAskAgain),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(43,20,"dontAskFingerprintAgain"),"\n "),l.ɵɵadvance(7),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(52,22,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(56,24,"confirm")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(61,26,"cancel"))}},directives:[d.ɵangular_packages_forms_forms_y,d.NgControlStatusGroup,d.NgForm,m.NgIf,h.A11yTitleDirective,d.CheckboxControlValueAccessor,d.NgControlStatus,d.NgModel],pipes:[f.I18nPipe],encapsulation:2}),e}();t.UserConfirmComponent=y},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(3),n(859)),s=n(30),l=n(0),c=n(6),p=n(3),u=n(9),d=n(13),m=n(16),h=n(4),f=n(17),v=n(53),y=n(10);function g(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",14),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function x(e,t){1&e&&(l.ɵɵelementStart(0,"div",15),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",17),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noGroupsInList"),"\n "))}function S(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",22),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(3).check(e)})),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"input",23),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),t.$implicit.checked=e})),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td",24),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(3).check(e)})),l.ɵɵtext(8),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;l.ɵɵadvance(4),l.ɵɵpropertyInterpolate1("name","Groups[",i,"].Checked"),l.ɵɵproperty("ngModel",r.checked),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",r.name,"\n ")}}function w(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",20),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,S,10,3,"tr",21),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.groups)}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",15),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,b,3,3,"div",18),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,w,7,1,"table",19),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"groupAccessUserDesc")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.groups||!n.groups.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.groups&&n.groups.length)}}var I=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n,this.onSavedUser=new o.EventEmitter,this.loading=!0,this.groups=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.apiService.getGroups(this.organizationId)];case 1:e=i.sent(),(t=e.data.map((function(e){return e}))).sort(s.Utils.getSortFunction(this.i18nService,"name")),this.groups=t,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.apiService.getOrganizationUserGroups(this.organizationId,this.organizationUserId)];case 3:return null!=(n=i.sent())&&null!=this.groups&&n.forEach((function(e){var t=r.groups.filter((function(t){return t.id===e}));null!=t&&t.length>0&&(t[0].checked=!0)})),[3,5];case 4:return i.sent(),[3,5];case 5:return this.loading=!1,[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.groups.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:(e=new a.OrganizationUserUpdateGroupsRequest).groupIds=this.groups.filter((function(e){return e.checked})).map((function(e){return e.id})),t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.apiService.putOrganizationUserGroups(this.organizationId,this.organizationUserId,e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("editedGroupsForUser",this.name)),this.onSavedUser.emit(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-user-groups"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser"},decls:47,vars:20,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","groupAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAccessTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,g,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵtemplate(23,x,9,6,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,C,10,5,"div",9),l.ɵɵtext(26,"\n "),l.ɵɵelementStart(27,"div",10),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"button",11),l.ɵɵtext(30,"\n "),l.ɵɵelement(31,"i",12),l.ɵɵpipe(32,"i18n"),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"span"),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelementStart(39,"button",13),l.ɵɵtext(40),l.ɵɵpipe(41,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n")),2&e){var n=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,10,"groupAccess"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,12,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading),l.ɵɵadvance(4),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(32,14,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,16,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(41,18,"cancel"))}},directives:[d.ɵangular_packages_forms_forms_y,d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.NgIf,f.A11yTitleDirective,h.NgForOf,d.CheckboxControlValueAccessor,v.StopPropDirective,d.NgControlStatus,d.NgModel],pipes:[y.I18nPipe],encapsulation:2}),e}();t.UserGroupsComponent=I},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(141)),s=(n(574),n(6),n(3),n(5),n(7),n(84)),l=n(575),c=n(0),p=n(6),u=n(8),d=n(3),m=n(5),h=n(7),f=n(574),v=n(4),y=n(24),g=n(37),x=n(10),b=["editTemplate"];function S(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"app-callout",5),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"button",6),c.ɵɵlistener("click",(function(){return c.ɵɵrestoreView(n),c.ɵɵnextContext().goToEnterprisePortal()})),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵproperty("type","warning"),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,3,"webPoliciesDeprecationWarning")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,5,"businessPortal")))}function w(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",7),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",8),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function C(e,t){1&e&&(c.ɵɵelementStart(0,"span",14),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"enabled")))}function I(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"td"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"a",11),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(n);var e=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(2).edit(e)})),c.ɵɵtext(3),c.ɵɵelementEnd(),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,C,3,3,"span",12),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"small",13),c.ɵɵtext(8),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}if(2&e){var r=c.ɵɵnextContext().$implicit;c.ɵɵadvance(3),c.ɵɵtextInterpolate(r.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",r.enabled),c.ɵɵadvance(3),c.ɵɵtextInterpolate(r.description)}}function E(e,t){if(1&e&&(c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,I,10,3,"td",2),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()),2&e){var n=t.$implicit;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.display)}}function P(e,t){if(1&e&&(c.ɵɵelementStart(0,"table",9),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"tbody"),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,E,4,1,"tr",10),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n"),c.ɵɵelementEnd()),2&e){var n=c.ɵɵnextContext();c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",n.policies)}}function k(e,t){}var _=function(){function e(e,t,n,r,i,o,a,s){this.apiService=e,this.route=t,this.i18nService=n,this.componentFactoryResolver=r,this.platformUtilsService=i,this.userService=o,this.router=a,this.environmentService=s,this.loading=!0,this.userCanAccessBusinessPortal=!1,this.modal=null,this.policiesEnabledMap=new Map}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e,n,o=this;return i(this,(function(s){switch(s.label){case 0:return this.organizationId=t.organizationId,[4,this.userService.getOrganization(this.organizationId)];case 1:return null!=(e=s.sent())&&e.usePolicies?(this.userCanAccessBusinessPortal=e.canAccessBusinessPortal,this.policies=[{name:this.i18nService.t("twoStepLogin"),description:this.i18nService.t("twoStepLoginPolicyDesc"),type:a.PolicyType.TwoFactorAuthentication,enabled:!1,display:!0},{name:this.i18nService.t("masterPass"),description:this.i18nService.t("masterPassPolicyDesc"),type:a.PolicyType.MasterPassword,enabled:!1,display:!0},{name:this.i18nService.t("passwordGenerator"),description:this.i18nService.t("passwordGeneratorPolicyDesc"),type:a.PolicyType.PasswordGenerator,enabled:!1,display:!0},{name:this.i18nService.t("singleOrg"),description:this.i18nService.t("singleOrgDesc"),type:a.PolicyType.SingleOrg,enabled:!1,display:!0},{name:this.i18nService.t("requireSso"),description:this.i18nService.t("requireSsoPolicyDesc"),type:a.PolicyType.RequireSso,enabled:!1,display:e.useSso},{name:this.i18nService.t("personalOwnership"),description:this.i18nService.t("personalOwnershipPolicyDesc"),type:a.PolicyType.PersonalOwnership,enabled:!1,display:!0},{name:this.i18nService.t("disableSend"),description:this.i18nService.t("disableSendPolicyDesc"),type:a.PolicyType.DisableSend,enabled:!1,display:!0},{name:this.i18nService.t("sendOptions"),description:this.i18nService.t("sendOptionsPolicyDesc"),type:a.PolicyType.SendOptions,enabled:!1,display:!0}],[4,this.load()]):(this.router.navigate(["/organizations",this.organizationId]),[2]);case 2:return s.sent(),n=this.route.queryParams.subscribe((function(e){return r(o,void 0,void 0,(function(){var t,r,o,a,s;return i(this,(function(i){if(null!=e.policyId)for(t=e.policyId,r=0,o=this.orgPolicies;r<o.length;r++)if((a=o[r]).id===t){for(s=0;s<this.policies.length;s++)if(this.policies[s].type===a.type){this.edit(this.policies[s]);break}break}return null!=n&&n.unsubscribe(),[2]}))}))})),[2]}}))}))})),this.enterpriseUrl="https://portal.bitwarden.com",null!=this.environmentService.enterpriseUrl?this.enterpriseUrl=this.environmentService.enterpriseUrl:null!=this.environmentService.baseUrl&&(this.enterpriseUrl=this.environmentService.baseUrl+"/portal"),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.apiService.getPolicies(this.organizationId)];case 1:return e=n.sent(),this.orgPolicies=null!=e.data&&e.data.length>0?e.data:[],this.orgPolicies.forEach((function(e){t.policiesEnabledMap.set(e.type,e.enabled)})),this.policies.forEach((function(e){e.enabled=t.policiesEnabledMap.has(e.type)&&t.policiesEnabledMap.get(e.type)})),this.loading=!1,[2]}}))}))},e.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.editModalRef.createComponent(n).instance;var r=this.modal.show(l.PolicyEditComponent,this.editModalRef);r.name=e.name,r.description=e.description,r.type=e.type,r.organizationId=this.organizationId,r.policiesEnabledMap=this.policiesEnabledMap,r.onSavedPolicy.subscribe((function(){t.modal.close(),t.load()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.goToEnterprisePortal=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null!=this.enterpriseTokenPromise)return[2];n.label=1;case 1:return n.trys.push([1,5,,6]),this.enterpriseTokenPromise=this.apiService.getEnterprisePortalSignInToken(),[4,this.enterpriseTokenPromise];case 2:return null==(e=n.sent())?[3,4]:[4,this.userService.getUserId()];case 3:t=n.sent(),this.platformUtilsService.launchUri(this.enterpriseUrl+"/login?userId="+t+"&token="+window.encodeURIComponent(e)+"&organizationId="+this.organizationId),n.label=4;case 4:return[3,6];case 5:return n.sent(),[3,6];case 6:return this.enterpriseTokenPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.ActivatedRoute),c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(c.ComponentFactoryResolver),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(h.UserService),c.ɵɵdirectiveInject(u.Router),c.ɵɵdirectiveInject(f.EnvironmentService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-org-policies"]],viewQuery:function(e,t){var n;(1&e&&c.ɵɵstaticViewQuery(b,!0,o.ViewContainerRef),2&e)&&(c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.editModalRef=n.first))},decls:16,vars:6,consts:[[3,"type",4,"ngIf"],[1,"page-header","d-flex"],[4,"ngIf"],["class","table table-hover table-list",4,"ngIf"],["editTemplate",""],[3,"type"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],["class","badge badge-success",4,"ngIf"],[1,"text-muted","d-block"],[1,"badge","badge-success"]],template:function(e,t){1&e&&(c.ɵɵtemplate(0,S,10,7,"app-callout",0),c.ɵɵtext(1,"\n"),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"h1"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵtemplate(9,w,9,6,"ng-container",2),c.ɵɵtext(10,"\n"),c.ɵɵtemplate(11,P,7,1,"table",3),c.ɵɵtext(12,"\n"),c.ɵɵtemplate(13,k,0,0,"ng-template",null,4,c.ɵɵtemplateRefExtractor),c.ɵɵtext(15,"\n")),2&e&&(c.ɵɵproperty("ngIf",t.userCanAccessBusinessPortal),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,4,"policies")),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading))},directives:[v.NgIf,y.CalloutComponent,v.NgForOf,g.StopClickDirective],pipes:[x.I18nPipe],encapsulation:2}),e}();t.PoliciesComponent=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);t.ApiService=r.ApiService;var i=n(860);t.AppIdService=i.AppIdService;var o=n(87);t.AuditService=o.AuditService;var a=n(58);t.AuthService=a.AuthService;var s=n(19);t.CipherService=s.CipherService;var l=n(40);t.CollectionService=l.CollectionService;var c=n(18);t.CryptoService=c.CryptoService;var p=n(64);t.EnvironmentService=p.EnvironmentService;var u=n(48);t.FolderService=u.FolderService;var d=n(3);t.I18nService=d.I18nService;var m=n(861);t.LogService=m.LogService;var h=n(14);t.MessagingService=h.MessagingService;var f=n(36);t.PasswordGenerationService=f.PasswordGenerationService;var v=n(5);t.PlatformUtilsService=v.PlatformUtilsService;var y=n(80);t.SearchService=y.SearchService;var g=n(281);t.SettingsService=g.SettingsService;var x=n(41);t.StorageService=x.StorageService;var b=n(38);t.StateService=b.StateService;var S=n(61);t.SyncService=S.SyncService;var w=n(103);t.TokenService=w.TokenService;var C=n(114);t.TotpService=C.TotpService;var I=n(7);t.UserService=I.UserService;var E=n(93);t.VaultTimeoutService=E.VaultTimeoutService},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(3),n(141)),s=n(862),l=n(0),c=n(6),p=n(3),u=n(9),d=n(13),m=n(16),h=n(17),f=n(4),v=n(24),y=n(10);function g(e,t){1&e&&(l.ɵɵelementStart(0,"div",13),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",14),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",15),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",23),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"warning")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(3,4,"twoStepLoginPolicyWarning"),"\n "))}function b(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",23),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"warning")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(3,4,"singleOrgPolicyWarning"),"\n "))}function S(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",24),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"app-callout",25),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"prerequisite")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,5,"requireSsoPolicyReq"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(9,7,"requireSsoExemption"),"\n "))}function w(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",25),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"personalOwnershipExemption"),"\n "))}function C(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",25),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"disableSendExemption"),"\n "))}function I(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",25),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"sendOptionsExemption"),"\n "))}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",41),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function P(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",26),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",27),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",28),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"select",29),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).masterPassMinComplexity=e})),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,E,2,2,"option",30),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"div",27),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"label",31),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"input",32),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).masterPassMinLength=e})),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",20),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"input",33),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).masterPassRequireUpper=e})),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"label",34),l.ɵɵtext(31,"A-Z"),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"div",20),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"input",35),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).masterPassRequireLower=e})),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"label",36),l.ɵɵtext(39,"a-z"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"div",20),l.ɵɵtext(43,"\n "),l.ɵɵelementStart(44,"input",37),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).masterPassRequireNumbers=e})),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"label",38),l.ɵɵtext(47,"0-9"),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementStart(50,"div",20),l.ɵɵtext(51,"\n "),l.ɵɵelementStart(52,"input",39),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).masterPassRequireSpecial=e})),l.ɵɵelementEnd(),l.ɵɵtext(53,"\n "),l.ɵɵelementStart(54,"label",40),l.ɵɵtext(55,"!@#$%^&*"),l.ɵɵelementEnd(),l.ɵɵtext(56,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(57,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,9,"minComplexityScore")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.masterPassMinComplexity),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.passwordScores),l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,11,"minLength")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.masterPassMinLength),l.ɵɵadvance(6),l.ɵɵproperty("ngModel",r.masterPassRequireUpper),l.ɵɵadvance(8),l.ɵɵproperty("ngModel",r.masterPassRequireLower),l.ɵɵadvance(8),l.ɵɵproperty("ngModel",r.masterPassRequireNumbers),l.ɵɵadvance(8),l.ɵɵproperty("ngModel",r.masterPassRequireSpecial)}}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",41),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function _(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",26),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",42),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",43),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"select",44),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenDefaultType=e})),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,k,2,2,"option",30),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"h3",45),l.ɵɵtext(18),l.ɵɵpipe(19,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"div",26),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",27),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"label",46),l.ɵɵtext(26),l.ɵɵpipe(27,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"input",47),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenMinLength=e})),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",26),l.ɵɵtext(34,"\n "),l.ɵɵelementStart(35,"div",27),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"label",48),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"input",49),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenMinNumbers=e})),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementStart(44,"div",27),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"label",50),l.ɵɵtext(47),l.ɵɵpipe(48,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementStart(50,"input",51),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenMinSpecial=e})),l.ɵɵelementEnd(),l.ɵɵtext(51,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(52,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(53,"\n "),l.ɵɵelementStart(54,"div",20),l.ɵɵtext(55,"\n "),l.ɵɵelementStart(56,"input",52),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenUseUpper=e})),l.ɵɵelementEnd(),l.ɵɵtext(57,"\n "),l.ɵɵelementStart(58,"label",53),l.ɵɵtext(59,"A-Z"),l.ɵɵelementEnd(),l.ɵɵtext(60,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(61,"\n "),l.ɵɵelementStart(62,"div",20),l.ɵɵtext(63,"\n "),l.ɵɵelementStart(64,"input",54),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenUseLower=e})),l.ɵɵelementEnd(),l.ɵɵtext(65,"\n "),l.ɵɵelementStart(66,"label",55),l.ɵɵtext(67,"a-z"),l.ɵɵelementEnd(),l.ɵɵtext(68,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(69,"\n "),l.ɵɵelementStart(70,"div",20),l.ɵɵtext(71,"\n "),l.ɵɵelementStart(72,"input",56),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenUseNumbers=e})),l.ɵɵelementEnd(),l.ɵɵtext(73,"\n "),l.ɵɵelementStart(74,"label",57),l.ɵɵtext(75,"0-9"),l.ɵɵelementEnd(),l.ɵɵtext(76,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(77,"\n "),l.ɵɵelementStart(78,"div",20),l.ɵɵtext(79,"\n "),l.ɵɵelementStart(80,"input",58),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenUseSpecial=e})),l.ɵɵelementEnd(),l.ɵɵtext(81,"\n "),l.ɵɵelementStart(82,"label",59),l.ɵɵtext(83,"!@#$%^&*"),l.ɵɵelementEnd(),l.ɵɵtext(84,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(85,"\n "),l.ɵɵelementStart(86,"h3",45),l.ɵɵtext(87),l.ɵɵpipe(88,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(89,"\n "),l.ɵɵelementStart(90,"div",26),l.ɵɵtext(91,"\n "),l.ɵɵelementStart(92,"div",27),l.ɵɵtext(93,"\n "),l.ɵɵelementStart(94,"label",60),l.ɵɵtext(95),l.ɵɵpipe(96,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(97,"\n "),l.ɵɵelementStart(98,"input",61),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenMinNumberWords=e})),l.ɵɵelementEnd(),l.ɵɵtext(99,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(100,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(101,"\n "),l.ɵɵelementStart(102,"div",20),l.ɵɵtext(103,"\n "),l.ɵɵelementStart(104,"input",62),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenCapitalize=e})),l.ɵɵelementEnd(),l.ɵɵtext(105,"\n "),l.ɵɵelementStart(106,"label",63),l.ɵɵtext(107),l.ɵɵpipe(108,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(109,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(110,"\n "),l.ɵɵelementStart(111,"div",20),l.ɵɵtext(112,"\n "),l.ɵɵelementStart(113,"input",64),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).passGenIncludeNumber=e})),l.ɵɵelementEnd(),l.ɵɵtext(114,"\n "),l.ɵɵelementStart(115,"label",65),l.ɵɵtext(116),l.ɵɵpipe(117,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(118,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(119,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,21,"defaultType")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.passGenDefaultType),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.defaultTypes),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(19,23,"password")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(27,25,"minLength")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.passGenMinLength),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(39,27,"minNumbers")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.passGenMinNumbers),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(48,29,"minSpecial")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.passGenMinSpecial),l.ɵɵadvance(6),l.ɵɵproperty("ngModel",r.passGenUseUpper),l.ɵɵadvance(8),l.ɵɵproperty("ngModel",r.passGenUseLower),l.ɵɵadvance(8),l.ɵɵproperty("ngModel",r.passGenUseNumbers),l.ɵɵadvance(8),l.ɵɵproperty("ngModel",r.passGenUseSpecial),l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(88,31,"passphrase")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(96,33,"minimumNumberOfWords")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.passGenMinNumberWords),l.ɵɵadvance(6),l.ɵɵproperty("ngModel",r.passGenCapitalize),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(108,35,"capitalize")),l.ɵɵadvance(6),l.ɵɵproperty("ngModel",r.passGenIncludeNumber),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(117,37,"includeNumber"))}}function A(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h3",45),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",20),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"input",66),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).sendDisableHideEmail=e})),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"label",67),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"options")),l.ɵɵadvance(5),l.ɵɵproperty("ngModel",r.sendDisableHideEmail),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,5,"disableHideEmail"))}}function O(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",13),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵelementEnd(),l.ɵɵtext(4,"\n "),l.ɵɵtemplate(5,x,4,6,"app-callout",16),l.ɵɵtext(6,"\n "),l.ɵɵtemplate(7,b,4,6,"app-callout",16),l.ɵɵtext(8,"\n "),l.ɵɵtemplate(9,S,11,9,"ng-container",17),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,w,3,3,"app-callout",18),l.ɵɵtext(12,"\n "),l.ɵɵtemplate(13,C,3,3,"app-callout",18),l.ɵɵtext(14,"\n "),l.ɵɵtemplate(15,I,3,3,"app-callout",18),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"div",19),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"div",20),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"input",21),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().enabled=e})),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"label",22),l.ɵɵtext(24),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,P,58,13,"ng-container",17),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,_,120,39,"ng-container",17),l.ɵɵtext(31,"\n "),l.ɵɵtemplate(32,A,15,7,"ng-container",17),l.ɵɵtext(33,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate(r.description),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.TwoFactorAuthentication),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.SingleOrg),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.RequireSso),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.PersonalOwnership),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.DisableSend),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.SendOptions),l.ɵɵadvance(6),l.ɵɵproperty("ngModel",r.enabled),l.ɵɵadvance(3),l.ɵɵtextInterpolate(r.checkboxDesc),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",r.type===r.policyType.MasterPassword),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.PasswordGenerator),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===r.policyType.SendOptions)}}var T=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n,this.policiesEnabledMap=new Map,this.onSavedPolicy=new o.EventEmitter,this.policyType=a.PolicyType,this.loading=!0,this.enabled=!1,this.masterPassMinComplexity=null,this.passwordScores=[{name:"-- "+t.t("select")+" --",value:null},{name:t.t("weak")+" (0)",value:0},{name:t.t("weak")+" (1)",value:1},{name:t.t("weak")+" (2)",value:2},{name:t.t("good")+" (3)",value:3},{name:t.t("strong")+" (4)",value:4}],this.defaultTypes=[{name:t.t("userPreference"),value:null},{name:t.t("password"),value:"password"},{name:t.t("passphrase"),value:"passphrase"}]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.loading=!1,[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this,[4,this.apiService.getPolicy(this.organizationId,this.type)];case 1:if(e.policy=n.sent(),null!=this.policy&&(this.enabled=this.policy.enabled,null!=this.policy.data))switch(this.type){case a.PolicyType.PasswordGenerator:this.passGenDefaultType=this.policy.data.defaultType,this.passGenMinLength=this.policy.data.minLength,this.passGenUseUpper=this.policy.data.useUpper,this.passGenUseLower=this.policy.data.useLower,this.passGenUseNumbers=this.policy.data.useNumbers,this.passGenUseSpecial=this.policy.data.useSpecial,this.passGenMinNumbers=this.policy.data.minNumbers,this.passGenMinSpecial=this.policy.data.minSpecial,this.passGenMinNumberWords=this.policy.data.minNumberWords,this.passGenCapitalize=this.policy.data.capitalize,this.passGenIncludeNumber=this.policy.data.includeNumber;break;case a.PolicyType.MasterPassword:this.masterPassMinComplexity=this.policy.data.minComplexity,this.masterPassMinLength=this.policy.data.minLength,this.masterPassRequireUpper=this.policy.data.requireUpper,this.masterPassRequireLower=this.policy.data.requireLower,this.masterPassRequireNumbers=this.policy.data.requireNumbers,this.masterPassRequireSpecial=this.policy.data.requireSpecial;break;case a.PolicyType.SendOptions:this.sendDisableHideEmail=this.policy.data.disableHideEmail}return[3,3];case 2:if(404!==(t=n.sent()).statusCode)throw t;return this.enabled=!1,[3,3];case 3:return[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(!this.preValidate())return[3,4];switch((e=new s.PolicyRequest).enabled=this.enabled,e.type=this.type,e.data=null,this.type){case a.PolicyType.PasswordGenerator:e.data={defaultType:this.passGenDefaultType,minLength:this.passGenMinLength||null,useUpper:this.passGenUseUpper,useLower:this.passGenUseLower,useNumbers:this.passGenUseNumbers,useSpecial:this.passGenUseSpecial,minNumbers:this.passGenMinNumbers||null,minSpecial:this.passGenMinSpecial||null,minNumberWords:this.passGenMinNumberWords||null,capitalize:this.passGenCapitalize,includeNumber:this.passGenIncludeNumber};break;case a.PolicyType.MasterPassword:e.data={minComplexity:this.masterPassMinComplexity||null,minLength:this.masterPassMinLength||null,requireUpper:this.masterPassRequireUpper,requireLower:this.masterPassRequireLower,requireNumbers:this.masterPassRequireNumbers,requireSpecial:this.masterPassRequireSpecial};break;case a.PolicyType.SendOptions:e.data={disableHideEmail:this.sendDisableHideEmail}}t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.apiService.putPolicy(this.organizationId,this.type,e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("editedPolicyId",this.name)),this.onSavedPolicy.emit(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},Object.defineProperty(e.prototype,"checkboxDesc",{get:function(){return this.type===a.PolicyType.PersonalOwnership?this.i18nService.t("personalOwnershipCheckboxDesc"):this.i18nService.t("enabled")},enumerable:!0,configurable:!0}),e.prototype.preValidate=function(){switch(this.type){case a.PolicyType.RequireSso:return!this.enabled||(!(!this.policiesEnabledMap.has(a.PolicyType.SingleOrg)||!this.policiesEnabledMap.get(a.PolicyType.SingleOrg))||(this.toasterService.popAsync("error",null,this.i18nService.t("requireSsoPolicyReqError")),!1));case a.PolicyType.SingleOrg:return!!this.enabled||(!this.policiesEnabledMap.has(a.PolicyType.RequireSso)||!this.policiesEnabledMap.get(a.PolicyType.RequireSso)||(this.toasterService.popAsync("error",null,this.i18nService.t("disableRequireSsoError")),!1));default:return!0}},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-policy-edit"]],inputs:{name:"name",description:"description",type:"type",organizationId:"organizationId",policiesEnabledMap:"policiesEnabledMap"},outputs:{onSavedPolicy:"onSavedPolicy"},decls:45,vars:20,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","policiesEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","policiesEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","warning","icon","fa-warning",3,"title",4,"ngIf"],[4,"ngIf"],["type","warning",4,"ngIf"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"ngModel","ngModelChange"],["for","enabled",1,"form-check-label"],["type","warning","icon","fa-warning",3,"title"],["type","tip",3,"title"],["type","warning"],[1,"row"],[1,"col-6","form-group"],["for","masterPassMinComplexity"],["id","masterPassMinComplexity","name","MasterPassMinComplexity",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],["for","masterPassMinLength"],["id","masterPassMinLength","type","number","min","8","name","MasterPassMinLength",1,"form-control",3,"ngModel","ngModelChange"],["type","checkbox","id","masterPassRequireUpper","name","MasterPassRequireUpper",1,"form-check-input",3,"ngModel","ngModelChange"],["for","masterPassRequireUpper",1,"form-check-label"],["type","checkbox","id","masterPassRequireLower","name","MasterPassRequireLower",1,"form-check-input",3,"ngModel","ngModelChange"],["for","masterPassRequireLower",1,"form-check-label"],["type","checkbox","id","masterPassRequireNumbers","name","MasterPassRequireNumbers",1,"form-check-input",3,"ngModel","ngModelChange"],["for","masterPassRequireNumbers",1,"form-check-label"],["type","checkbox","id","masterPassRequireSpecial","name","MasterPassRequireSpecial",1,"form-check-input",3,"ngModel","ngModelChange"],["for","masterPassRequireSpecial",1,"form-check-label"],[3,"ngValue"],[1,"col-6","form-group","mb-0"],["for","passGenDefaultType"],["id","passGenDefaultType","name","PassGenDefaultType",1,"form-control",3,"ngModel","ngModelChange"],[1,"mt-4"],["for","passGenMinLength"],["id","passGenMinLength","type","number","name","PassGenMinLength","min","5","max","128",1,"form-control",3,"ngModel","ngModelChange"],["for","passGenMinNumbers"],["id","passGenMinNumbers","type","number","name","PassGenMinNumbers","min","0","max","9",1,"form-control",3,"ngModel","ngModelChange"],["for","passGenMinSpecial"],["id","passGenMinSpecial","type","number","name","PassGenMinSpecial","min","0","max","9",1,"form-control",3,"ngModel","ngModelChange"],["type","checkbox","id","passGenUseUpper","name","PassGenUseUpper",1,"form-check-input",3,"ngModel","ngModelChange"],["for","passGenUseUpper",1,"form-check-label"],["type","checkbox","id","passGenUseLower","name","PassGenUseLower",1,"form-check-input",3,"ngModel","ngModelChange"],["for","passGenUseLower",1,"form-check-label"],["type","checkbox","id","passGenUseNumbers","name","PassGenUseNumbers",1,"form-check-input",3,"ngModel","ngModelChange"],["for","passGenUseNumbers",1,"form-check-label"],["type","checkbox","id","passGenUseSpecial","name","PassGenUseSpecial",1,"form-check-input",3,"ngModel","ngModelChange"],["for","passGenUseSpecial",1,"form-check-label"],["for","passGenMinNumberWords"],["id","passGenMinNumberWords","type","number","name","PassGenMinNumberWords","min","3","max","20",1,"form-control",3,"ngModel","ngModelChange"],["type","checkbox","id","passGenCapitalize","name","PassGenCapitalize",1,"form-check-input",3,"ngModel","ngModelChange"],["for","passGenCapitalize",1,"form-check-label"],["type","checkbox","id","passGenIncludeNumber","name","PassGenIncludeNumber",1,"form-check-input",3,"ngModel","ngModelChange"],["for","passGenIncludeNumber",1,"form-check-label"],["type","checkbox","id","sendDisableHideEmail","name","SendDisableHideEmail",1,"form-check-input",3,"ngModel","ngModelChange"],["for","sendDisableHideEmail",1,"form-check-label"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"button",6),l.ɵɵpipe(14,"i18n"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"span",7),l.ɵɵtext(17,"×"),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵtemplate(21,g,9,6,"div",8),l.ɵɵtext(22,"\n "),l.ɵɵtemplate(23,O,34,12,"div",8),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"div",9),l.ɵɵtext(26,"\n "),l.ɵɵelementStart(27,"button",10),l.ɵɵtext(28,"\n "),l.ɵɵelement(29,"i",11),l.ɵɵpipe(30,"i18n"),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"span"),l.ɵɵtext(33),l.ɵɵpipe(34,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"button",12),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n")),2&e){var n=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate2("",l.ɵɵpipeBind1(11,10,"editPolicy")," - ",t.name,""),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(14,12,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading),l.ɵɵadvance(4),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(30,14,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(34,16,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(39,18,"cancel"))}},directives:[d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.A11yTitleDirective,f.NgIf,d.CheckboxControlValueAccessor,d.NgControlStatus,d.NgModel,v.CalloutComponent,d.SelectControlValueAccessor,f.NgForOf,d.NumberValueAccessor,d.DefaultValueAccessor,d.NgSelectOption,d.ɵangular_packages_forms_forms_x],pipes:[y.I18nPipe],encapsulation:2}),e}();t.PolicyEditComponent=T},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(9),n(6),n(3),n(5),n(61),n(863)),s=n(84),l=n(469),c=n(470),p=n(142),u=n(579),d=n(0),m=n(6),h=n(3),f=n(9),v=n(8),y=n(61),g=n(5),x=n(4),b=n(13),S=n(16),w=n(139),C=n(142),I=n(10),E=["deleteOrganizationTemplate"],P=["purgeOrganizationTemplate"],k=["apiKeyTemplate"],_=["rotateApiKeyTemplate"];function A(e,t){1&e&&(d.ɵɵelementStart(0,"div"),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",12),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",13),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"loading")))}function O(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"form",14,15),d.ɵɵlistener("ngSubmit",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext().submit()})),d.ɵɵtext(2,"\n "),d.ɵɵelementStart(3,"div",16),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"div",17),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"div",18),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"label",19),d.ɵɵtext(10),d.ɵɵpipe(11,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementStart(13,"input",20),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().org.name=e})),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementStart(16,"div",18),d.ɵɵtext(17,"\n "),d.ɵɵelementStart(18,"label",21),d.ɵɵtext(19),d.ɵɵpipe(20,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelementStart(22,"input",22),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().org.billingEmail=e})),d.ɵɵelementEnd(),d.ɵɵtext(23,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(24,"\n "),d.ɵɵelementStart(25,"div",18),d.ɵɵtext(26,"\n "),d.ɵɵelementStart(27,"label",23),d.ɵɵtext(28),d.ɵɵpipe(29,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(30,"\n "),d.ɵɵelementStart(31,"input",24),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().org.businessName=e})),d.ɵɵelementEnd(),d.ɵɵtext(32,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n "),d.ɵɵelementStart(34,"div",18),d.ɵɵtext(35,"\n "),d.ɵɵelementStart(36,"label",25),d.ɵɵtext(37),d.ɵɵpipe(38,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(39,"\n "),d.ɵɵelementStart(40,"input",26),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().org.identifier=e})),d.ɵɵelementEnd(),d.ɵɵtext(41,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(42,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(43,"\n "),d.ɵɵelementStart(44,"div",17),d.ɵɵtext(45,"\n "),d.ɵɵelement(46,"app-avatar",27),d.ɵɵtext(47,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(48,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(49,"\n "),d.ɵɵelementStart(50,"button",28),d.ɵɵtext(51,"\n "),d.ɵɵelement(52,"i",29),d.ɵɵpipe(53,"i18n"),d.ɵɵtext(54,"\n "),d.ɵɵelementStart(55,"span"),d.ɵɵtext(56),d.ɵɵpipe(57,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(58,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(59,"\n"),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵreference(1),i=d.ɵɵnextContext();d.ɵɵproperty("appApiAction",i.formPromise),d.ɵɵadvance(10),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(11,16,"organizationName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",i.org.name)("disabled",i.selfHosted),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(20,18,"billingEmail")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",i.org.billingEmail)("disabled",i.selfHosted),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(29,20,"businessName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",i.org.businessName)("disabled",i.selfHosted),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(38,22,"identifier")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",i.org.identifier),d.ɵɵadvance(6),d.ɵɵpropertyInterpolate("data",i.org.name),d.ɵɵadvance(4),d.ɵɵproperty("disabled",r.loading),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(53,24,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(57,26,"save"))}}function T(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",3),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"h1"),d.ɵɵtext(5),d.ɵɵpipe(6,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"p"),d.ɵɵtext(10),d.ɵɵpipe(11,"i18n"),d.ɵɵelementStart(12,"a",30),d.ɵɵtext(13),d.ɵɵpipe(14,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementStart(17,"button",31),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext().viewApiKey()})),d.ɵɵtext(18),d.ɵɵpipe(19,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n "),d.ɵɵelementStart(21,"button",31),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext().rotateApiKey()})),d.ɵɵtext(22),d.ɵɵpipe(23,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(24,"\n"),d.ɵɵelementContainerEnd()}2&e&&(d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(6,5,"apiKey")),d.ɵɵadvance(5),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(11,7,"apiKeyDesc"),"\n "),d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(14,9,"learnMore"),"\n "),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(19,11,"viewApiKey")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(23,13,"rotateApiKey")))}function M(e,t){1&e&&(d.ɵɵelementStart(0,"div"),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",12),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",13),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"loading")))}function B(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"form",14,32),d.ɵɵlistener("ngSubmit",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext().submitTaxInfo()})),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"app-tax-info"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"button",28),d.ɵɵtext(6,"\n "),d.ɵɵelement(7,"i",29),d.ɵɵpipe(8,"i18n"),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"span"),d.ɵɵtext(11),d.ɵɵpipe(12,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n"),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵreference(1),i=d.ɵɵnextContext();d.ɵɵproperty("appApiAction",i.taxFormPromise),d.ɵɵadvance(5),d.ɵɵproperty("disabled",r.loading),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(8,4,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(12,6,"save"))}}function D(e,t){}function R(e,t){}function V(e,t){}function j(e,t){}var F=function(){function e(e,t,n,r,i,o,a){this.componentFactoryResolver=e,this.apiService=t,this.i18nService=n,this.toasterService=r,this.route=i,this.syncService=o,this.platformUtilsService=a,this.selfHosted=!1,this.loading=!0,this.canUseApi=!1,this.modal=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.selfHosted=this.platformUtilsService.isSelfHost(),this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:this.organizationId=t.organizationId,n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,this.apiService.getOrganization(this.organizationId)];case 2:return e.org=n.sent(),this.canUseApi=this.org.useApi,[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}}))}))})),this.loading=!1,[2]}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),(e=new a.OrganizationUpdateRequest).name=this.org.name,e.businessName=this.org.businessName,e.billingEmail=this.org.billingEmail,e.identifier=this.org.identifier,this.formPromise=this.apiService.putOrganization(this.organizationId,e).then((function(){return t.syncService.fullSync(!0)})),[4,this.formPromise];case 1:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("organizationUpdated")),[3,3];case 2:return n.sent(),[3,3];case 3:return[2]}}))}))},e.prototype.submitTaxInfo=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.taxFormPromise=this.taxInfo.submitTaxInfo(),[4,this.taxFormPromise];case 1:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("taxInfoUpdated")),[2]}}))}))},e.prototype.deleteOrganization=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.deleteModalRef.createComponent(t).instance,this.modal.show(u.DeleteOrganizationComponent,this.deleteModalRef).organizationId=this.organizationId,this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.purgeVault=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.purgeModalRef.createComponent(t).instance,this.modal.show(c.PurgeVaultComponent,this.purgeModalRef).organizationId=this.organizationId,this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.viewApiKey=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.apiKeyModalRef.createComponent(t).instance;var n=this.modal.show(l.ApiKeyComponent,this.apiKeyModalRef);n.keyType="organization",n.entityId=this.organizationId,n.postKey=this.apiService.postOrganizationApiKey.bind(this.apiService),n.scope="api.organization",n.grantType="client_credentials",n.apiKeyTitle="apiKey",n.apiKeyWarning="apiKeyWarning",n.apiKeyDescription="apiKeyDesc",this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.rotateApiKey=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.rotateApiKeyModalRef.createComponent(t).instance;var n=this.modal.show(l.ApiKeyComponent,this.rotateApiKeyModalRef);n.keyType="organization",n.isRotation=!0,n.entityId=this.organizationId,n.postKey=this.apiService.postOrganizationRotateApiKey.bind(this.apiService),n.scope="api.organization",n.grantType="client_credentials",n.apiKeyTitle="apiKey",n.apiKeyWarning="apiKeyWarning",n.apiKeyDescription="apiKeyRotateDesc",this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.ɵfac=function(t){return new(t||e)(d.ɵɵdirectiveInject(d.ComponentFactoryResolver),d.ɵɵdirectiveInject(m.ApiService),d.ɵɵdirectiveInject(h.I18nService),d.ɵɵdirectiveInject(f.ToasterService),d.ɵɵdirectiveInject(v.ActivatedRoute),d.ɵɵdirectiveInject(y.SyncService),d.ɵɵdirectiveInject(g.PlatformUtilsService))},e.ɵcmp=d.ɵɵdefineComponent({type:e,selectors:[["app-org-account"]],viewQuery:function(e,t){var n;(1&e&&(d.ɵɵstaticViewQuery(E,!0,o.ViewContainerRef),d.ɵɵstaticViewQuery(P,!0,o.ViewContainerRef),d.ɵɵstaticViewQuery(k,!0,o.ViewContainerRef),d.ɵɵstaticViewQuery(_,!0,o.ViewContainerRef),d.ɵɵviewQuery(p.TaxInfoComponent,!0)),2&e)&&(d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.deleteModalRef=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.purgeModalRef=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.apiKeyModalRef=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.rotateApiKeyModalRef=n.first),d.ɵɵqueryRefresh(n=d.ɵɵloadQuery())&&(t.taxInfo=n.first))},decls:65,vars:26,consts:[[1,"page-header"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[1,"secondary-header","border-0","mb-0"],[1,"secondary-header","text-danger","border-0","mb-0"],[1,"card","border-danger"],[1,"card-body"],["type","button",1,"btn","btn-outline-danger",3,"click"],["deleteOrganizationTemplate",""],["purgeOrganizationTemplate",""],["apiKeyTemplate",""],["rotateApiKeyTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","businessName"],["id","businessName","type","text","name","BusinessName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","identifier"],["id","identifier","type","text","name","Identifier",1,"form-control",3,"ngModel","ngModelChange"],["dynamic","true","size","75","fontSize","35",3,"data"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["href","https://docs.bitwarden.com","target","_blank","rel","noopener"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["formTax",""]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"h1"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n"),d.ɵɵtemplate(7,A,9,6,"div",1),d.ɵɵtext(8,"\n"),d.ɵɵtemplate(9,O,60,28,"form",2),d.ɵɵtext(10,"\n"),d.ɵɵtemplate(11,T,25,15,"ng-container",1),d.ɵɵtext(12,"\n"),d.ɵɵelementStart(13,"div",3),d.ɵɵtext(14,"\n "),d.ɵɵelementStart(15,"h1"),d.ɵɵtext(16),d.ɵɵpipe(17,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(19,"\n"),d.ɵɵelementStart(20,"p"),d.ɵɵtext(21),d.ɵɵpipe(22,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(23,"\n"),d.ɵɵtemplate(24,M,9,6,"div",1),d.ɵɵtext(25,"\n"),d.ɵɵtemplate(26,B,15,8,"form",2),d.ɵɵtext(27,"\n"),d.ɵɵelementStart(28,"div",4),d.ɵɵtext(29,"\n "),d.ɵɵelementStart(30,"h1"),d.ɵɵtext(31),d.ɵɵpipe(32,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(34,"\n"),d.ɵɵelementStart(35,"div",5),d.ɵɵtext(36,"\n "),d.ɵɵelementStart(37,"div",6),d.ɵɵtext(38,"\n "),d.ɵɵelementStart(39,"p"),d.ɵɵtext(40),d.ɵɵpipe(41,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(42,"\n "),d.ɵɵelementStart(43,"button",7),d.ɵɵlistener("click",(function(){return t.deleteOrganization()})),d.ɵɵtext(44),d.ɵɵpipe(45,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(46,"\n "),d.ɵɵelementStart(47,"button",7),d.ɵɵlistener("click",(function(){return t.purgeVault()})),d.ɵɵtext(48),d.ɵɵpipe(49,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(50,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(51,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(52,"\n"),d.ɵɵtemplate(53,D,0,0,"ng-template",null,8,d.ɵɵtemplateRefExtractor),d.ɵɵtext(55,"\n"),d.ɵɵtemplate(56,R,0,0,"ng-template",null,9,d.ɵɵtemplateRefExtractor),d.ɵɵtext(58,"\n"),d.ɵɵtemplate(59,V,0,0,"ng-template",null,10,d.ɵɵtemplateRefExtractor),d.ɵɵtext(61,"\n"),d.ɵɵtemplate(62,j,0,0,"ng-template",null,11,d.ɵɵtemplateRefExtractor),d.ɵɵtext(64,"\n")),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,12,"myOrganization")),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",t.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.org&&!t.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.canUseApi),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(17,14,"taxInformation")),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(22,16,"taxInformationDesc")),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",!t.org||t.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.org&&!t.loading),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(32,18,"dangerZone")),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(41,20,"dangerZoneDesc")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(45,22,"deleteOrganization")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(49,24,"purgeVault")))},directives:[x.NgIf,b.NgControlStatusGroup,b.NgForm,S.ApiActionDirective,b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,w.AvatarComponent,C.TaxInfoComponent],pipes:[I.I18nPipe],encapsulation:2}),e}();t.AccountComponent=F},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(578).TaxInfoUpdateRequest);t.OrganizationTaxInfoUpdateRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.TaxInfoUpdateRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(18),n(3);var o=n(79),a=n(0),s=n(6),l=n(3),c=n(9),p=n(18),u=n(8),d=n(13),m=n(16),h=n(17),f=n(24),v=n(65),y=n(45),g=n(10),x=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.router=i}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):(e=new o.PasswordVerificationRequest,t=e,[4,this.cryptoService.hashPassword(this.masterPassword,null)]);case 1:t.masterPasswordHash=n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),this.formPromise=this.apiService.deleteOrganization(this.organizationId,e),[4,this.formPromise];case 3:return n.sent(),this.toasterService.popAsync("success",this.i18nService.t("organizationDeleted"),this.i18nService.t("organizationDeletedDesc")),this.router.navigate(["/"]),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.CryptoService),a.ɵɵdirectiveInject(u.Router))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-delete-organization"]],decls:58,vars:27,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","deleteOrganizationTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteOrganizationTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p"),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"app-callout",9),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"label",10),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"input",11),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",12),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"button",13),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"i",14),a.ɵɵpipe(43,"i18n"),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"span"),a.ɵɵtext(46),a.ɵɵpipe(47,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"button",15),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,11,"deleteOrganization")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,13,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,15,"deleteOrganizationDesc")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,17,"deleteOrganizationWarning")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(33,19,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(43,21,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(47,23,"deleteOrganization")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,25,"close"))}},directives:[d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.A11yTitleDirective,f.CalloutComponent,d.DefaultValueAccessor,d.RequiredValidator,v.AutofocusDirective,y.InputVerbatimDirective,d.NgControlStatus,d.NgModel],pipes:[g.I18nPipe],encapsulation:2}),e}();t.DeleteOrganizationComponent=x},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(5);var s=n(471),l=n(0),c=n(6),p=n(3),u=n(9),d=n(8),m=n(5),h=n(4),f=n(472),v=n(24),y=n(13),g=n(16),x=n(473),b=n(17),S=n(10),w=function(e){return{"fa-spin":e}};function C(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",3),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext().load()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext();l.ɵɵproperty("disabled",r.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(5,w,r.loading)),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,3,"refresh"),"\n ")}}function I(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",5),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",6),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function E(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",14),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).addCredit()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"addCredit"),"\n "))}function P(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-add-credit",15),l.ɵɵlistener("onAdded",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closeAddCredit(!0)}))("onCanceled",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closeAddCredit(!1)})),l.ɵɵtext(1,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵproperty("organizationId",r.organizationId)}}function k(e,t){1&e&&(l.ɵɵelementStart(0,"p"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"noPaymentMethod")))}function _(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-callout",18),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"p"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"form",19,20),l.ɵɵlistener("ngSubmit",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).verifyBank()})),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"label",21),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"div",22),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"div",23),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"div",24),l.ɵɵtext(20,"$0."),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"input",25),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).verifyAmount1=e})),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"label",26),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"div",22),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"div",23),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"div",24),l.ɵɵtext(35,"$0."),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"input",27),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).verifyAmount2=e})),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"button",28),l.ɵɵtext(42,"\n "),l.ɵɵelement(43,"i",29),l.ɵɵpipe(44,"i18n"),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"span"),l.ɵɵtext(47),l.ɵɵpipe(48,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(51,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(9),i=l.ɵɵnextContext(3);l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,11,"verifyBankAccount")),l.ɵɵadvance(4),l.ɵɵtextInterpolate2("",l.ɵɵpipeBind1(5,13,"verifyBankAccountDesc")," ",l.ɵɵpipeBind1(6,15,"verifyBankAccountFailureWarning"),""),l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",i.verifyBankPromise),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(13,17,"amount","1")),l.ɵɵadvance(11),l.ɵɵproperty("ngModel",i.verifyAmount1),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(28,20,"amount","2")),l.ɵɵadvance(11),l.ɵɵproperty("ngModel",i.verifyAmount2),l.ɵɵadvance(3),l.ɵɵproperty("disabled",r.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(44,23,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(48,25,"verifyBankAccount"))}}function A(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"inAppPurchase")))}var O=function(e,t,n,r,i,o){return{"fa-credit-card":e,"fa-university":t,"fa-money":n,"fa-paypal text-primary":r,"fa-apple text-muted":i,"fa-google text-muted":o}};function T(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,_,52,27,"app-callout",16),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"p"),l.ɵɵtext(5,"\n "),l.ɵɵelement(6,"i",17),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,A,3,3,"span",2),l.ɵɵtext(9),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.paymentSource.type===n.paymentMethodType.BankAccount&&n.paymentSource.needsVerification),l.ɵɵadvance(4),l.ɵɵproperty("ngClass",l.ɵɵpureFunction6(4,O,n.paymentSource.type===n.paymentMethodType.Card,n.paymentSource.type===n.paymentMethodType.BankAccount,n.paymentSource.type===n.paymentMethodType.Check,n.paymentSource.type===n.paymentMethodType.PayPal,n.paymentSource.type===n.paymentMethodType.AppleInApp,n.paymentSource.type===n.paymentMethodType.GoogleInApp)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.paymentSourceInApp),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",n.paymentSource.description,"\n ")}}function M(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",14),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).changePayment()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,r.paymentSource?"changePaymentMethod":"addPaymentMethod"),"\n ")}}function B(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-adjust-payment",30),l.ɵɵlistener("onAdjusted",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closePayment(!0)}))("onCanceled",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).closePayment(!1)})),l.ɵɵtext(1,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵproperty("currentType",null!=r.paymentSource?r.paymentSource.type:null)("organizationId",r.organizationId)}}function D(e,t){1&e&&(l.ɵɵelementStart(0,"p"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"noInvoices")))}function R(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",36),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,1,"paid"),"\n "))}function V(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",37),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,1,"unpaid"),"\n "))}function j(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td"),l.ɵɵtext(3),l.ɵɵpipe(4,"date"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"td"),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"a",33),l.ɵɵpipe(9,"i18n"),l.ɵɵtext(10,"\n "),l.ɵɵelement(11,"i",34),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"a",35),l.ɵɵpipe(14,"i18n"),l.ɵɵtext(15),l.ɵɵpipe(16,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"td"),l.ɵɵtext(20),l.ɵɵpipe(21,"currency"),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"td"),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,R,5,3,"span",2),l.ɵɵtext(26,"\n "),l.ɵɵtemplate(27,V,5,3,"span",2),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(4,9,n.date,"mediumDate")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("href",n.pdfUrl,l.ɵɵsanitizeUrl),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(9,12,"downloadInvoice")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("href",n.url,l.ɵɵsanitizeUrl),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(14,14,"viewInvoice")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(16,16,"invoiceNumber",n.number),""),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(21,19,n.amount,"$")),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",n.paid),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.paid)}}function F(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",31),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,j,30,22,"tr",32),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.invoices)}}function U(e,t){1&e&&(l.ɵɵelementStart(0,"p"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"noTransactions")))}function N(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"chargeNoun"),"\n "))}function z(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"refundNoun")))}var L=function(e,t,n,r){return{"fa-credit-card":e,"fa-university":t,"fa-bitcoin text-warning":n,"fa-paypal text-primary":r}};function G(e,t){if(1&e&&l.ɵɵelement(0,"i",40),2&e){var n=l.ɵɵnextContext().$implicit,r=l.ɵɵnextContext(3);l.ɵɵproperty("ngClass",l.ɵɵpureFunction4(1,L,n.paymentMethodType===r.paymentMethodType.Card,n.paymentMethodType===r.paymentMethodType.BankAccount||n.paymentMethodType===r.paymentMethodType.WireTransfer,n.paymentMethodType===r.paymentMethodType.BitPay,n.paymentMethodType===r.paymentMethodType.PayPal))}}var K=function(e){return{"text-strike":e}};function q(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td"),l.ɵɵtext(3),l.ɵɵpipe(4,"date"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"td"),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,N,3,3,"span",2),l.ɵɵtext(9,"\n "),l.ɵɵtemplate(10,z,3,3,"span",2),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"td"),l.ɵɵtext(14,"\n "),l.ɵɵtemplate(15,G,1,6,"i",38),l.ɵɵtext(16),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"td",39),l.ɵɵpipe(19,"i18n"),l.ɵɵtext(20),l.ɵɵpipe(21,"currency"),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit,r=l.ɵɵnextContext(3);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(4,8,n.createdDate,"mediumDate")),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",n.type===r.transactionType.Charge||n.type===r.transactionType.Credit),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.type===r.transactionType.Refund),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",n.paymentMethodType),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",n.details,"\n "),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(19,11,n.refunded?"refunded":"")),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(16,K,n.refunded)),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(21,13,n.amount,"$"),"")}}function W(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",31),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,q,23,18,"tr",32),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.transactions)}}function H(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h2"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"p",7),l.ɵɵelementStart(7,"strong"),l.ɵɵtext(8),l.ɵɵpipe(9,"currency"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"p"),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵtemplate(15,E,3,3,"button",8),l.ɵɵtext(16,"\n "),l.ɵɵtemplate(17,P,2,1,"app-add-credit",9),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"h2",10),l.ɵɵtext(20),l.ɵɵpipe(21,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵtemplate(23,k,3,3,"p",2),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,T,11,11,"ng-container",2),l.ɵɵtext(26,"\n "),l.ɵɵtemplate(27,M,3,3,"button",8),l.ɵɵtext(28,"\n "),l.ɵɵtemplate(29,B,2,2,"app-adjust-payment",11),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"h2",10),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,D,3,3,"p",2),l.ɵɵtext(36,"\n "),l.ɵɵtemplate(37,F,7,1,"table",12),l.ɵɵtext(38,"\n "),l.ɵɵelementStart(39,"h2",10),l.ɵɵtext(40),l.ɵɵpipe(41,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵtemplate(43,U,3,3,"p",2),l.ɵɵtext(44,"\n "),l.ɵɵtemplate(45,W,7,1,"table",12),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"small",13),l.ɵɵtext(48),l.ɵɵpipe(49,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n"),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,17,n.isCreditBalance?"accountCredit":"accountBalance")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(9,19,n.creditOrBalance,"$")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(13,22,"creditAppliedDesc")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.showAddCredit),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.showAddCredit),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(21,24,"paymentMethod")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.paymentSource),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.paymentSource),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.showAdjustPayment),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.showAdjustPayment),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(33,26,"invoices")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.invoices||!n.invoices.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.invoices&&n.invoices.length),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(41,28,"transactions")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.transactions||!n.transactions.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.transactions&&n.transactions.length),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("* ",l.ɵɵpipeBind2(49,30,"chargesStatement","BITWARDEN"),"")}}var $=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,o)||this;return a.route=i,a}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var e=this;return a(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return o(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.organizationId=t.organizationId,[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))})),[2]}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService),l.ɵɵdirectiveInject(d.ActivatedRoute),l.ɵɵdirectiveInject(m.PlatformUtilsService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-org-billing"]],features:[l.ɵɵInheritDefinitionFeature],decls:13,vars:6,consts:[[1,"page-header","d-flex"],["class","btn btn-sm btn-outline-primary ml-auto",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[1,"btn","btn-sm","btn-outline-primary","ml-auto",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-refresh","fa-fw",3,"ngClass"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"text-lg"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[3,"organizationId","onAdded","onCanceled",4,"ngIf"],[1,"spaced-header"],[3,"currentType","organizationId","onAdjusted","onCanceled",4,"ngIf"],["class","table mb-2",4,"ngIf"],[1,"text-muted"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[3,"organizationId","onAdded","onCanceled"],["type","warning",3,"title",4,"ngIf"],[1,"fa","fa-fw",3,"ngClass"],["type","warning",3,"title"],["ngNativeValidate","",1,"form-inline",3,"appApiAction","ngSubmit"],["verifyForm",""],["for","verifyAmount1",1,"sr-only"],[1,"input-group","mr-2"],[1,"input-group-prepend"],[1,"input-group-text"],["type","number","id","verifyAmount1","placeholder","xx","name","Amount1","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","verifyAmount2",1,"sr-only"],["type","number","id","verifyAmount2","placeholder","xx","name","Amount2","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-outline-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[3,"currentType","organizationId","onAdjusted","onCanceled"],[1,"table","mb-2"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener",1,"mr-2",3,"href","appA11yTitle"],["aria-hidden","true",1,"fa","fa-file-pdf-o"],["target","_blank","rel","noopener",3,"href","title"],["aria-hidden","true",1,"fa","fa-check","text-success"],["aria-hidden","true",1,"fa","fa-exclamation-circle","text-muted"],["class","fa fa-fw","aria-hidden","true",3,"ngClass",4,"ngIf"],[3,"ngClass","title"],["aria-hidden","true",1,"fa","fa-fw",3,"ngClass"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,C,5,7,"button",1),l.ɵɵtext(7,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵtemplate(9,I,9,6,"ng-container",2),l.ɵɵtext(10,"\n"),l.ɵɵtemplate(11,H,51,33,"ng-container",2),l.ɵɵtext(12,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,4,"billing"),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.firstLoaded),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.billing))},directives:[h.NgIf,h.NgClass,f.AddCreditComponent,v.CalloutComponent,y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,y.NumberValueAccessor,y.DefaultValueAccessor,y.RequiredValidator,y.NgControlStatus,y.NgModel,x.AdjustPaymentComponent,h.NgForOf,b.A11yTitleDirective],pipes:[S.I18nPipe,h.CurrencyPipe,h.DatePipe],encapsulation:2}),t}(s.UserBillingComponent);t.OrganizationBillingComponent=$},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.stripeTestKey="pk_test_KPoCfZXu7mznb9uSCPZ2JpTD",e.stripeLiveKey="pk_live_bpN0P37nMxrMQkcaHXtAybJk",e.btSandboxKey="sandbox_r72q8jq6_9pnxkwm75f87sdc2",e.btProductionKey="production_qfbsv8kc_njj2zjtyngtjmbjd",e.paypal={businessIdProduction:"4ZDA7DLUUJGMN",businessIdSandbox:"AD3LAUZSNVPJY",buttonActionProduction:"https://www.paypal.com/cgi-bin/webscr",buttonActionSandbox:"https://www.sandbox.paypal.com/cgi-bin/webscr"},e}();t.WebConstants=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(14),n(5);var o=n(282),a=n(0),s=n(6),l=n(5),c=n(3),p=n(9),u=n(14),d=n(8),m=n(4),h=n(24),f=n(16),v=n(17),y=n(474),g=n(583),x=n(584),b=n(585),S=n(476),w=n(10);function C(e,t){1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",2),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",3),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function I(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",3),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function E(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",7),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"canceled")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"subscriptionCanceled"),""))}function P(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"app-callout",7),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"p"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"button",8,9),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).reinstate()})),a.ɵɵtext(9,"\n "),a.ɵɵelement(10,"i",10),a.ɵɵpipe(11,"i18n"),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"span"),a.ɵɵtext(14),a.ɵɵpipe(15,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵreference(8),i=a.ɵɵnextContext(2);a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,6,"pendingCancellation")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(5,8,"subscriptionPendingCanceled")),a.ɵɵadvance(3),a.ɵɵproperty("appApiAction",i.reinstatePromise)("disabled",r.loading),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(11,10,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(15,12,"reinstateSubscription"))}}function k(e,t){1&e&&(a.ɵɵelementStart(0,"span",12),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",13),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"licenseIsExpired"),"\n "))}function _(e,t){if(1&e&&(a.ɵɵelementStart(0,"dd"),a.ɵɵtext(1),a.ɵɵpipe(2,"date"),a.ɵɵtemplate(3,k,5,3,"span",11),a.ɵɵtext(4,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(2,2,n.sub.expiration,"mediumDate"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.isExpired)}}function A(e,t){1&e&&(a.ɵɵelementStart(0,"dd"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,"neverExpires")))}function O(e,t){if(1&e&&(a.ɵɵelementStart(0,"dl"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"dt"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"dd"),a.ɵɵtext(7),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"dt"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,_,5,5,"dd",1),a.ɵɵtext(14,"\n "),a.ɵɵtemplate(15,A,3,3,"dd",1),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,5,"billingPlan")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(n.sub.plan.name),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,7,"expiration")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",n.sub.expiration),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.sub.expiration)}}function T(e,t){1&e&&(a.ɵɵelementStart(0,"span",19),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,"pendingCancellation")))}function M(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"dt"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"dd"),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"span",17),a.ɵɵtext(9),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,T,3,3,"span",18),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"dt"),a.ɵɵtext(15),a.ɵɵpipe(16,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"dd"),a.ɵɵtext(19),a.ɵɵpipe(20,"date"),a.ɵɵpipe(21,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,5,"status")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(n.subscription.status||"-"),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(16,7,"nextCharge")),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("",n.nextInvoice?a.ɵɵpipeBind2(20,9,n.nextInvoice.date,"mediumDate")+", "+a.ɵɵpipeBind2(21,12,n.nextInvoice.amount,"$"):"-","\n ")}}function B(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td"),a.ɵɵtext(3),a.ɵɵpipe(4,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"td"),a.ɵɵtext(7),a.ɵɵpipe(8,"currency"),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵadvance(3),a.ɵɵtextInterpolate3("\n ",n.name," ",n.quantity>1?"×"+n.quantity:""," @ ",a.ɵɵpipeBind2(4,5,n.amount,"$"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate2("\n ",a.ɵɵpipeBind2(8,8,n.quantity*n.amount,"$")," /",a.ɵɵpipeBind1(9,11,n.interval),"\n ")}}function D(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",20),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"strong",21),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"table",22),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"tbody"),a.ɵɵtext(9,"\n "),a.ɵɵtemplate(10,B,11,13,"tr",23),a.ɵɵtext(11,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"details")),a.ɵɵadvance(7),a.ɵɵproperty("ngForOf",n.subscription.items)}}function R(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",14),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",15),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"dl"),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"dt"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"dd"),a.ɵɵtext(11),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,M,23,15,"ng-container",1),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵtemplate(17,D,14,4,"div",16),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,4,"billingPlan")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(n.sub.plan.name),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscription),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",n.subscription)}}function V(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",27),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",28),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"button",29),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!1)})),a.ɵɵpipe(5,"i18n"),a.ɵɵelementStart(6,"span",30),a.ɵɵtext(7,"×"),a.ɵɵelementEnd(),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h3",31),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"app-update-license",32),a.ɵɵlistener("onUpdated",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!1)})),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(5,3,"cancel")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,5,"updateLicense")),a.ɵɵadvance(3),a.ɵɵproperty("organizationId",r.organizationId)}}function j(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"button",24),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).updateLicense()})),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"a",25),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,V,16,7,"div",26),a.ɵɵtext(14,"\n "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(6,3,"updateLicense"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(10,5,"manageSubscription"),"\n "),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",r.showUpdateLicense)}}function F(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",24),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).changePlan()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"changeBillingPlan"),"\n "))}function U(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",42),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).downloadLicense()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵproperty("disabled",r.showDownloadLicense),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,2,"downloadLicense"),"\n ")}}function N(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",43,44),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).cancel()})),a.ɵɵtext(2,"\n "),a.ɵɵelement(3,"i",10),a.ɵɵpipe(4,"i18n"),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"span"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵreference(1),i=a.ɵɵnextContext(3);a.ɵɵproperty("appApiAction",i.cancelPromise)("disabled",r.loading),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(4,4,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function z(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"app-change-plan",45),a.ɵɵlistener("onChanged",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeChangePlan(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeChangePlan(!1)})),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵproperty("organizationId",r.organizationId)}}function L(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",46),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-download-license",47),a.ɵɵlistener("onDownloaded",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeDownloadLicense()}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeDownloadLicense()})),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵproperty("organizationId",r.organizationId)}}function G(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",33),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"button",24),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustSeats(!0)})),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"button",50),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustSeats(!1)})),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,2,"addSeats"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(8,4,"removeSeats"),"\n "))}function K(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"app-adjust-seats",51),a.ɵɵlistener("onAdjusted",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeSeats(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeSeats(!1)})),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("seatPrice",r.seatPrice)("add",r.adjustSeatsAdd)("organizationId",r.organizationId)("interval",r.billingInterval)}}function q(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",46),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,G,10,6,"div",48),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,K,1,4,"app-adjust-seats",49),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!n.showAdjustSeats),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.showAdjustSeats)}}function W(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",33),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"button",24),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustStorage(!0)})),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"button",50),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustStorage(!1)})),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,2,"addStorage"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(8,4,"removeStorage"),"\n "))}function H(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"app-adjust-storage",53),a.ɵɵlistener("onAdjusted",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeStorage(!1)})),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("storageGbPrice",r.storageGbPrice)("add",r.adjustStorageAdd)("organizationId",r.organizationId)("interval",r.billingInterval)}}function $(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",46),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,W,10,6,"div",48),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,H,1,4,"app-adjust-storage",52),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!n.showAdjustStorage),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.showAdjustStorage)}}var Y=function(e){return{width:e}};function Q(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",33),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,F,3,3,"button",34),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,U,3,4,"button",35),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,N,10,8,"button",36),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,z,1,1,"app-change-plan",37),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,L,4,1,"div",38),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"h2",39),a.ɵɵtext(16),a.ɵɵpipe(17,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"p"),a.ɵɵtext(20),a.ɵɵpipe(21,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵtemplate(23,q,9,2,"ng-container",1),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"h2",39),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"p"),a.ɵɵtext(30),a.ɵɵpipe(31,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"div",40),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"div",41),a.ɵɵtext(36),a.ɵɵpipe(37,"percent"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵtemplate(40,$,9,2,"ng-container",1),a.ɵɵtext(41,"\n "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!n.showChangePlan),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.canDownloadLicense),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",n.showChangePlan),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.showDownloadLicense),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(17,14,"userSeats")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(21,16,"subscriptionUserSeats",n.sub.seats)),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",n.subscription&&n.canAdjustSeats&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(27,19,"storage")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind3(31,21,"subscriptionStorage",n.sub.maxStorageGb||0,n.sub.storageName||"0 MB")),a.ɵɵadvance(5),a.ɵɵproperty("ngStyle",a.ɵɵpureFunction1(27,Y,n.storageProgressWidth+"%")),a.ɵɵattribute("aria-valuenow",n.storagePercentage),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(37,25,n.storagePercentage/100),""),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel)}}function J(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,E,4,6,"app-callout",5),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,P,18,14,"app-callout",5),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,O,17,9,"dl",1),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,R,19,6,"div",6),a.ɵɵtext(9,"\n "),a.ɵɵtemplate(10,j,15,7,"ng-container",1),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,Q,42,29,"ng-container",1),a.ɵɵtext(13,"\n"),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscription&&n.subscription.cancelled),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.selfHosted)}}var X=function(){function e(e,t,n,r,i,o){this.apiService=e,this.platformUtilsService=t,this.i18nService=n,this.toasterService=r,this.messagingService=i,this.route=o,this.loading=!1,this.firstLoaded=!1,this.adjustSeatsAdd=!0,this.showAdjustSeats=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.showDownloadLicense=!1,this.showChangePlan=!1,this.selfHosted=!1,this.selfHosted=t.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.organizationId=t.organizationId,[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))})),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.loading?[2]:(this.loading=!0,e=this,[4,this.apiService.getOrganizationSubscription(this.organizationId)]);case 1:return e.sub=t.sent(),this.loading=!1,[2]}}))}))},e.prototype.reinstate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel"))];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.reinstatePromise=this.apiService.postOrganizationReinstate(this.organizationId),[4,this.reinstatePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("reinstated")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.cancel=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.cancelPromise=this.apiService.postOrganizationCancel(this.organizationId),[4,this.cancelPromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("canceledSubscription")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.changePlan=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null==this.subscription&&this.sub.planType===o.PlanType.Free?(this.showChangePlan=!this.showChangePlan,[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("changeBillingPlanDesc"),this.i18nService.t("changeBillingPlan"),this.i18nService.t("contactSupport"),this.i18nService.t("close"))];case 1:return e.sent()&&this.platformUtilsService.launchUri("https://bitwarden.com/contact"),[2]}}))}))},e.prototype.closeChangePlan=function(e){this.showChangePlan=!1},e.prototype.downloadLicense=function(){this.showDownloadLicense=!this.showDownloadLicense},e.prototype.closeDownloadLicense=function(){this.showDownloadLicense=!1},e.prototype.updateLicense=function(){this.loading||(this.showUpdateLicense=!0)},e.prototype.closeUpdateLicense=function(e){this.showUpdateLicense=!1,e&&(this.load(),this.messagingService.send("updatedOrgLicense"))},e.prototype.adjustSeats=function(e){this.adjustSeatsAdd=e,this.showAdjustSeats=!0},e.prototype.closeSeats=function(e){this.showAdjustSeats=!1,e&&this.load()},e.prototype.adjustStorage=function(e){this.adjustStorageAdd=e,this.showAdjustStorage=!0},e.prototype.closeStorage=function(e){this.showAdjustStorage=!1,e&&this.load()},Object.defineProperty(e.prototype,"isExpired",{get:function(){return null!=this.sub&&null!=this.sub.expiration&&new Date(this.sub.expiration)<new Date},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subscriptionMarkedForCancel",{get:function(){return null!=this.subscription&&!this.subscription.cancelled&&this.subscription.cancelAtEndDate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subscription",{get:function(){return null!=this.sub?this.sub.subscription:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextInvoice",{get:function(){return null!=this.sub?this.sub.upcomingInvoice:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storagePercentage",{get:function(){return null!=this.sub&&this.sub.maxStorageGb?+(this.sub.storageGb/this.sub.maxStorageGb*100).toFixed(2):0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storageProgressWidth",{get:function(){return this.storagePercentage<5?5:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"billingInterval",{get:function(){return!this.sub.plan.isAnnual?"month":"year"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storageGbPrice",{get:function(){return this.sub.plan.additionalStoragePricePerGb},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seatPrice",{get:function(){return this.sub.plan.seatPrice},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canAdjustSeats",{get:function(){return this.sub.plan.hasAdditionalSeatsOption},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"canDownloadLicense",{get:function(){return this.sub.planType!==o.PlanType.Free&&null==this.subscription||null!=this.subscription&&!this.subscription.cancelled},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.ToasterService),a.ɵɵdirectiveInject(u.MessagingService),a.ɵɵdirectiveInject(d.ActivatedRoute))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-org-subscription"]],decls:13,vars:6,consts:[[1,"page-header"],[4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],["type","warning",3,"title",4,"ngIf"],["class","row",4,"ngIf"],["type","warning",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["reinstateBtn",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["class","text-danger ml-2",4,"ngIf"],[1,"text-danger","ml-2"],["aria-hidden","true",1,"fa","fa-exclamation-triangle"],[1,"row"],[1,"col-4"],["class","col-8",4,"ngIf"],[1,"text-capitalize"],["class","badge badge-warning",4,"ngIf"],[1,"badge","badge-warning"],[1,"col-8"],[1,"d-block","mb-1"],[1,"table"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["href","https://vault.bitwarden.com","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["class","card mt-3",4,"ngIf"],[1,"card","mt-3"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"organizationId","onUpdated","onCanceled"],[1,"d-flex"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","button","class","btn btn-outline-secondary ml-1",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-outline-danger btn-submit ml-auto",3,"appApiAction","disabled","click",4,"ngIf"],[3,"organizationId","onChanged","onCanceled",4,"ngIf"],["class","mt-3",4,"ngIf"],[1,"spaced-header"],[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","bg-success",3,"ngStyle"],["type","button",1,"btn","btn-outline-secondary","ml-1",3,"disabled","click"],["type","button",1,"btn","btn-outline-danger","btn-submit","ml-auto",3,"appApiAction","disabled","click"],["cancelBtn",""],[3,"organizationId","onChanged","onCanceled"],[1,"mt-3"],[3,"organizationId","onDownloaded","onCanceled"],["class","d-flex",4,"ngIf"],[3,"seatPrice","add","organizationId","interval","onAdjusted","onCanceled",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","ml-1",3,"click"],[3,"seatPrice","add","organizationId","interval","onAdjusted","onCanceled"],[3,"storageGbPrice","add","organizationId","interval","onAdjusted","onCanceled",4,"ngIf"],[3,"storageGbPrice","add","organizationId","interval","onAdjusted","onCanceled"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,C,9,6,"small",1),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵtemplate(9,I,9,6,"ng-container",1),a.ɵɵtext(10,"\n"),a.ɵɵtemplate(11,J,14,6,"ng-container",1),a.ɵɵtext(12,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,4,"subscription"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.sub))},directives:[m.NgIf,h.CalloutComponent,f.ApiActionDirective,m.NgForOf,v.A11yTitleDirective,y.UpdateLicenseComponent,m.NgStyle,g.ChangePlanComponent,x.DownloadLicenseComponent,b.AdjustSeatsComponent,S.AdjustStorageComponent],pipes:[w.I18nPipe,m.DatePipe,m.CurrencyPipe,m.PercentPipe],encapsulation:2}),e}();t.OrganizationSubscriptionComponent=X},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(6),n(5),n(282)),s=n(475),l=n(0),c=n(6),p=n(5),u=n(17),d=n(283),m=n(10),h=function(){function e(e,t){this.apiService=e,this.platformUtilsService=t,this.onChanged=new o.EventEmitter,this.onCanceled=new o.EventEmitter,this.defaultUpgradePlan=a.PlanType.FamiliesAnnually,this.defaultUpgradeProduct=s.ProductType.Families}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){try{this.onChanged.emit()}catch(t){}return[2]}))}))},e.prototype.cancel=function(){this.onCanceled.emit()},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.PlatformUtilsService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-change-plan"]],inputs:{organizationId:"organizationId"},outputs:{onChanged:"onChanged",onCanceled:"onCanceled"},decls:22,vars:14,consts:[[1,"card","card-org-plans"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"mb-0"],[3,"showFree","showCancel","plan","product","organizationId","onCanceled"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"button",2),l.ɵɵlistener("click",(function(){return t.cancel()})),l.ɵɵpipe(5,"i18n"),l.ɵɵelementStart(6,"span",3),l.ɵɵtext(7,"×"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",4),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"p",5),l.ɵɵtext(14),l.ɵɵpipe(15,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"app-organization-plans",6),l.ɵɵlistener("onCanceled",(function(){return t.cancel()})),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n")),2&e&&(l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(5,8,"cancel")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,10,"changeBillingPlan")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(15,12,"changeBillingPlanUpgrade")),l.ɵɵadvance(3),l.ɵɵproperty("showFree",!1)("showCancel",!0)("plan",t.defaultUpgradePlan)("product",t.defaultUpgradeProduct)("organizationId",t.organizationId))},directives:[u.A11yTitleDirective,d.OrganizationPlansComponent],pipes:[m.I18nPipe],encapsulation:2}),e}();t.ChangePlanComponent=h},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(6),n(5),n(0)),s=n(6),l=n(5),c=n(13),p=n(16),u=n(17),d=n(10),m=function(){function e(e,t){this.apiService=e,this.platformUtilsService=t,this.onDownloaded=new o.EventEmitter,this.onCanceled=new o.EventEmitter}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null==this.installationId||""===this.installationId)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),this.formPromise=this.apiService.getOrganizationLicense(this.organizationId,this.installationId),[4,this.formPromise];case 2:return e=n.sent(),t=JSON.stringify(e,null,2),this.platformUtilsService.saveFile(window,t,null,"bitwarden_organization_license.json"),this.onDownloaded.emit(),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.cancel=function(){this.onCanceled.emit()},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.PlatformUtilsService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-download-license"]],inputs:{organizationId:"organizationId"},outputs:{onDownloaded:"onDownloaded",onCanceled:"onCanceled"},decls:51,vars:24,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"row"],[1,"form-group","col-6"],[1,"d-flex"],["for","installationId"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/licensing-on-premise/#organization-account-sharing",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["id","installationId","type","text","name","InstallationId","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"button",3),a.ɵɵlistener("click",(function(){return t.cancel()})),a.ɵɵpipe(6,"i18n"),a.ɵɵelementStart(7,"span",4),a.ɵɵtext(8,"×"),a.ɵɵelementEnd(),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"h3",5),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"div",6),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"div",7),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",8),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"label",9),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"a",10),a.ɵɵpipe(25,"i18n"),a.ɵɵtext(26,"\n "),a.ɵɵelement(27,"i",11),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"input",12),a.ɵɵlistener("ngModelChange",(function(e){return t.installationId=e})),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"button",13),a.ɵɵtext(36,"\n "),a.ɵɵelement(37,"i",14),a.ɵɵpipe(38,"i18n"),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"span"),a.ɵɵtext(41),a.ɵɵpipe(42,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"button",15),a.ɵɵlistener("click",(function(){return t.cancel()})),a.ɵɵtext(46),a.ɵɵpipe(47,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n")),2&e){var n=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(6,10,"cancel")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,12,"downloadLicense")),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,14,"enterInstallationId")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(25,16,"learnMore")),a.ɵɵadvance(7),a.ɵɵproperty("ngModel",t.installationId),a.ɵɵadvance(4),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(38,18,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(42,20,"submit")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(47,22,"cancel"),"\n ")}},directives:[c.NgControlStatusGroup,c.NgForm,p.ApiActionDirective,u.A11yTitleDirective,c.DefaultValueAccessor,c.RequiredValidator,c.NgControlStatus,c.NgModel],pipes:[d.I18nPipe],encapsulation:2}),e}();t.DownloadLicenseComponent=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(9),n(6),n(3),n(870)),s=n(117),l=n(0),c=n(6),p=n(3),u=n(9),d=n(8),m=n(13),h=n(16),f=n(17),v=n(4),y=n(117),g=n(10);function x(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",16),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"strong"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5),l.ɵɵpipe(6,"currency"),l.ɵɵpipe(7,"currency"),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(4,5,"total"),":"),l.ɵɵadvance(2),l.ɵɵtextInterpolate4(" ",n.seatAdjustment||0," × ",l.ɵɵpipeBind2(6,7,n.seatPrice,"$")," = ",l.ɵɵpipeBind2(7,10,n.adjustedSeatTotal,"$")," /",l.ɵɵpipeBind1(8,13,n.interval),"\n ")}}var b=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.router=r,this.activatedRoute=i,this.seatPrice=0,this.add=!0,this.interval="year",this.onAdjusted=new o.EventEmitter,this.onCanceled=new o.EventEmitter,this.seatAdjustment=0}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,o=this;return i(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),(e=new a.SeatRequest).seatAdjustment=this.seatAdjustment,this.add||(e.seatAdjustment*=-1),t=!1,n=function(){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.postOrganizationSeat(this.organizationId,e)];case 1:if(null==(n=r.sent())||null==n.paymentIntentClientSecret)return[3,5];r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.paymentComponent.handleStripeCardPayment(n.paymentIntentClientSecret,null)];case 3:return r.sent(),[3,5];case 4:return r.sent(),t=!0,[3,5];case 5:return[2]}}))}))},this.formPromise=n(),[4,this.formPromise];case 1:return s.sent(),this.onAdjusted.emit(this.seatAdjustment),t?(this.toasterService.popAsync({body:this.i18nService.t("couldNotChargeCardPayInvoice"),type:"warning",timeout:1e4}),this.router.navigate(["../billing"],{relativeTo:this.activatedRoute})):this.toasterService.popAsync("success",null,this.i18nService.t("adjustedSeats",e.seatAdjustment.toString())),[3,3];case 2:return s.sent(),[3,3];case 3:return[2]}}))}))},e.prototype.cancel=function(){this.onCanceled.emit()},Object.defineProperty(e.prototype,"adjustedSeatTotal",{get:function(){return this.seatAdjustment*this.seatPrice},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService),l.ɵɵdirectiveInject(d.Router),l.ɵɵdirectiveInject(d.ActivatedRoute))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-adjust-seats"]],viewQuery:function(e,t){var n;(1&e&&l.ɵɵstaticViewQuery(s.PaymentComponent,!0),2&e)&&(l.ɵɵqueryRefresh(n=l.ɵɵloadQuery())&&(t.paymentComponent=n.first))},inputs:{seatPrice:"seatPrice",add:"add",organizationId:"organizationId",interval:"interval"},outputs:{onAdjusted:"onAdjusted",onCanceled:"onCanceled"},decls:50,vars:26,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"row"],[1,"form-group","col-6"],["for","seatAdjustment"],["id","seatAdjustment","type","number","name","SeatAdjustment","min","0","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["class","mb-3",4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"d-block","text-muted","mt-3"],[3,"showMethods"],[1,"mb-3"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"button",3),l.ɵɵlistener("click",(function(){return t.cancel()})),l.ɵɵpipe(6,"i18n"),l.ɵɵelementStart(7,"span",4),l.ɵɵtext(8,"×"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"h3",5),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"div",6),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"div",7),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"label",8),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"input",9),l.ɵɵlistener("ngModelChange",(function(e){return t.seatAdjustment=e})),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,x,9,15,"div",10),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"button",11),l.ɵɵtext(29,"\n "),l.ɵɵelement(30,"i",12),l.ɵɵpipe(31,"i18n"),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"span"),l.ɵɵtext(34),l.ɵɵpipe(35,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"button",13),l.ɵɵlistener("click",(function(){return t.cancel()})),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"small",14),l.ɵɵtext(43),l.ɵɵpipe(44,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n"),l.ɵɵelement(48,"app-payment",15),l.ɵɵtext(49,"\n")),2&e){var n=l.ɵɵreference(1);l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(6,12,"cancel")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,14,t.add?"addSeats":"removeSeats")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,16,t.add?"seatsToAdd":"seatsToRemove")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.seatAdjustment),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",t.add),l.ɵɵadvance(2),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(31,18,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(35,20,"submit")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(40,22,"cancel"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(44,24,t.add?"seatsAddNote":"seatsRemoveNote"),"\n "),l.ɵɵadvance(5),l.ɵɵproperty("showMethods",!1)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,f.A11yTitleDirective,m.NumberValueAccessor,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,v.NgIf,y.PaymentComponent],pipes:[g.I18nPipe,v.CurrencyPipe],encapsulation:2}),e}();t.AdjustSeatsComponent=b},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(5),n(7);var o=n(0),a=n(8),s=n(7),l=n(5),c=n(4),p=n(10);function u(e,t){1&e&&(o.ɵɵelementStart(0,"a",11),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"billing"),"\n "))}function d(e,t){1&e&&(o.ɵɵelementStart(0,"a",12),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"twoStepLogin"),"\n "))}var m=function(){function e(e,t,n){this.route=e,this.userService=t,this.platformUtilsService=n,this.access2fa=!1}return e.prototype.ngOnInit=function(){var e=this;this.route.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=this,[4,this.platformUtilsService.isSelfHost()];case 1:return e.selfHosted=r.sent(),[4,this.userService.getOrganization(t.organizationId)];case 2:return n=r.sent(),this.access2fa=n.use2fa,[2]}}))}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.ActivatedRoute),o.ɵɵdirectiveInject(s.UserService),o.ɵɵdirectiveInject(l.PlatformUtilsService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-org-settings"]],decls:36,vars:11,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],["routerLink","subscription","routerLinkActive","active",1,"list-group-item"],["routerLink","billing","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","two-factor","class","list-group-item","routerLinkActive","active",4,"ngIf"],[1,"col-9"],["routerLink","billing","routerLinkActive","active",1,"list-group-item"],["routerLink","two-factor","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",5),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"a",6),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"a",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,u,3,3,"a",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,d,3,3,"a",9),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",10),o.ɵɵtext(30,"\n "),o.ɵɵelement(31,"router-outlet"),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,5,"settings")),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(16,7,"myOrganization"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(20,9,"subscription"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.selfHosted),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.access2fa))},directives:[a.RouterLinkWithHref,a.RouterLinkActive,c.NgIf,a.RouterOutlet],pipes:[p.I18nPipe],encapsulation:2}),e}();t.SettingsComponent=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(14),n(43),n(7);var s=n(113),l=n(477),c=n(478),p=n(0),u=n(6),d=n(7),m=n(14),h=n(43),f=n(8),v=n(4),y=n(24),g=n(37),x=n(10);function b(e,t){1&e&&(p.ɵɵelementStart(0,"p"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"twoStepLoginDesc")))}function S(e,t){1&e&&(p.ɵɵelementStart(0,"p"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"twoStepLoginOrganizationDesc")))}function w(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"app-callout",12),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"p"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"button",13),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().recoveryCode()})),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n"),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,2,"twoStepLoginRecoveryWarning")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,4,"viewRecoveryCode")))}function C(e,t){1&e&&(p.ɵɵelementStart(0,"small"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",14),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",15),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function I(e,t){1&e&&(p.ɵɵelementStart(0,"app-callout",12),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"twoStepLoginPolicyUserWarning"),"\n"))}function E(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",24),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",15),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"enabled")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"enabled")))}function P(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"a",25),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).premiumRequired()})),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()}2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"premium"),"\n "))}function k(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"li",16),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",17),p.ɵɵtext(3,"\n "),p.ɵɵelement(4,"img",18),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",19),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"h3",20),p.ɵɵtext(10),p.ɵɵtemplate(11,E,9,6,"ng-container",1),p.ɵɵtext(12,"\n "),p.ɵɵtemplate(13,P,3,3,"a",21),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"div",22),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"button",23),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext().manage(e.type)})),p.ɵɵtext(20),p.ɵɵpipe(21,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=p.ɵɵnextContext();p.ɵɵadvance(4),p.ɵɵproperty("src","images/two-factor/"+r.type+".png",p.ɵɵsanitizeUrl),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("\n ",r.name,"\n "),p.ɵɵadvance(1),p.ɵɵproperty("ngIf",r.enabled),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!i.canAccessPremium&&r.premium),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",r.description,"\n "),p.ɵɵadvance(4),p.ɵɵproperty("disabled",!i.canAccessPremium&&r.premium),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(21,7,"manage"),"\n ")}}function _(e,t){}function A(e,t){}function O(e,t){}function T(e,t){}function M(e,t){}function B(e,t){}var D=function(e){return{"mt-5":e}},R=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o)||this;return s.route=a,s}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(n){return this.route.parent.parent.params.subscribe((function(n){return o(t,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return this.organizationId=n.organizationId,[4,e.prototype.ngOnInit.call(this)];case 1:return t.sent(),[2]}}))}))})),[2]}))}))},t.prototype.manage=function(e){var t=this;switch(e){case s.TwoFactorProviderType.OrganizationDuo:var n=this.openModal(this.duoModalRef,l.TwoFactorDuoComponent);n.type=s.TwoFactorProviderType.OrganizationDuo,n.organizationId=this.organizationId,n.onUpdated.subscribe((function(e){t.updateStatus(e,s.TwoFactorProviderType.OrganizationDuo)}))}},t.prototype.getTwoFactorProviders=function(){return this.apiService.getTwoFactorOrganizationProviders(this.organizationId)},t.prototype.filterProvider=function(e){return e!==s.TwoFactorProviderType.OrganizationDuo},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.UserService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(m.MessagingService),p.ɵɵdirectiveInject(h.PolicyService),p.ɵɵdirectiveInject(f.ActivatedRoute))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-setup"]],features:[p.ɵɵInheritDefinitionFeature],decls:44,vars:15,consts:[[1,"page-header"],[4,"ngIf"],["type","warning",4,"ngIf"],[3,"ngClass"],[1,"list-group","list-group-2fa"],["class","list-group-item d-flex align-items-center",4,"ngFor","ngForOf"],["authenticatorTemplate",""],["recoveryTemplate",""],["duoTemplate",""],["emailTemplate",""],["yubikeyTemplate",""],["webAuthnTemplate",""],["type","warning"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-fw","text-muted",3,"title"],[1,"sr-only"],[1,"list-group-item","d-flex","align-items-center"],[1,"logo-2fa","d-flex","justify-content-center"],["alt","",3,"src"],[1,"mx-4"],[1,"mb-0"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-check","text-success","fa-fw",3,"title"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n"),p.ɵɵtemplate(7,b,3,3,"p",1),p.ɵɵtext(8,"\n"),p.ɵɵtemplate(9,S,3,3,"p",1),p.ɵɵtext(10,"\n"),p.ɵɵtemplate(11,w,10,6,"app-callout",2),p.ɵɵtext(12,"\n"),p.ɵɵelementStart(13,"h2",3),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵtemplate(16,C,9,6,"small",1),p.ɵɵtext(17,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n"),p.ɵɵtemplate(19,I,3,3,"app-callout",2),p.ɵɵtext(20,"\n"),p.ɵɵelementStart(21,"ul",4),p.ɵɵtext(22,"\n "),p.ɵɵtemplate(23,k,24,9,"li",5),p.ɵɵtext(24,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(25,"\n\n"),p.ɵɵtemplate(26,_,0,0,"ng-template",null,6,p.ɵɵtemplateRefExtractor),p.ɵɵtext(28,"\n"),p.ɵɵtemplate(29,A,0,0,"ng-template",null,7,p.ɵɵtemplateRefExtractor),p.ɵɵtext(31,"\n"),p.ɵɵtemplate(32,O,0,0,"ng-template",null,8,p.ɵɵtemplateRefExtractor),p.ɵɵtext(34,"\n"),p.ɵɵtemplate(35,T,0,0,"ng-template",null,9,p.ɵɵtemplateRefExtractor),p.ɵɵtext(37,"\n"),p.ɵɵtemplate(38,M,0,0,"ng-template",null,10,p.ɵɵtemplateRefExtractor),p.ɵɵtext(40,"\n"),p.ɵɵtemplate(41,B,0,0,"ng-template",null,11,p.ɵɵtemplateRefExtractor),p.ɵɵtext(43,"\n")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,9,"twoStepLogin")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",!t.organizationId),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.organizationId),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.organizationId),p.ɵɵadvance(2),p.ɵɵproperty("ngClass",p.ɵɵpureFunction1(13,D,!t.organizationId)),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(15,11,"providers"),"\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",t.showPolicyWarning),p.ɵɵadvance(4),p.ɵɵproperty("ngForOf",t.providers))},directives:[v.NgIf,v.NgClass,v.NgForOf,y.CalloutComponent,g.StopClickDirective],pipes:[x.I18nPipe],encapsulation:2}),t}(c.TwoFactorSetupComponent);t.TwoFactorSetupComponent=R},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3),n(5),n(7);var s=n(874),l=n(113),c=n(256),p=n(0),u=n(6),d=n(3),m=n(9),h=n(7),f=n(5),v=n(17),y=n(4),g=n(188),x=n(13),b=n(16),S=n(24),w=n(45),C=n(10);function I(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"app-two-factor-verify",9),p.ɵɵlistener("onAuthed",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().auth(e)})),p.ɵɵtext(1,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵproperty("organizationId",r.organizationId)("type",r.type)}}function E(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"img",28),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"p"),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"p"),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"strong"),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,2,"twoStepAuthenticatorDesc")),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("1. ",p.ɵɵpipeBind1(12,4,"twoStepAuthenticatorDownloadApp"),""))}function P(e,t){1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"app-callout",29),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"p"),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8),p.ɵɵpipe(9,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelement(11,"img",28),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"p"),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementContainerEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,4,"enabled")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,6,"twoStepLoginProviderEnabled")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(9,8,"twoStepAuthenticatorReaddDesc"),"\n "),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(15,10,"twoStepAuthenticatorNeedApp")))}function k(e,t){1&e&&(p.ɵɵelementStart(0,"p"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"strong"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1("2. ",p.ɵɵpipeBind1(4,1,"twoStepAuthenticatorScanCode"),""))}function _(e,t){1&e&&p.ɵɵelement(0,"hr")}function A(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"label",30),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"input",31),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).token=e})),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementContainerEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(3),p.ɵɵtextInterpolate1("3. ",p.ɵɵpipeBind1(4,2,"twoStepAuthenticatorEnterCode"),""),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.token)}}function O(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"enable")))}function T(e,t){1&e&&(p.ɵɵelementStart(0,"span"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"disable")))}var M=function(e){return{"mb-0":e}};function B(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",10,11),p.ɵɵlistener("ngSubmit",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().submit()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",12),p.ɵɵtext(4,"\n "),p.ɵɵtemplate(5,E,15,6,"ng-container",13),p.ɵɵtext(6,"\n "),p.ɵɵtemplate(7,P,17,12,"ng-container",13),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"ul",14),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"li"),p.ɵɵtext(12,"\n "),p.ɵɵelement(13,"i",15),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementStart(16,"a",16),p.ɵɵtext(17,"Authy"),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"li"),p.ɵɵtext(21,"\n "),p.ɵɵelement(22,"i",17),p.ɵɵtext(23),p.ɵɵpipe(24,"i18n"),p.ɵɵelementStart(25,"a",18),p.ɵɵtext(26,"Authy"),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n "),p.ɵɵelementStart(29,"li"),p.ɵɵtext(30,"\n "),p.ɵɵelement(31,"i",19),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementStart(34,"a",20),p.ɵɵtext(35,"Microsoft Authenticator"),p.ɵɵelementEnd(),p.ɵɵtext(36,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(37,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(38,"\n "),p.ɵɵelementStart(39,"p"),p.ɵɵtext(40),p.ɵɵpipe(41,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(42,"\n "),p.ɵɵtemplate(43,k,6,3,"p",13),p.ɵɵtext(44,"\n "),p.ɵɵtemplate(45,_,1,0,"hr",13),p.ɵɵtext(46,"\n "),p.ɵɵelementStart(47,"p",21),p.ɵɵtext(48,"\n "),p.ɵɵelement(49,"canvas",22),p.ɵɵelement(50,"br"),p.ɵɵtext(51,"\n "),p.ɵɵelementStart(52,"code",23),p.ɵɵpipe(53,"i18n"),p.ɵɵtext(54),p.ɵɵelementEnd(),p.ɵɵtext(55,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(56,"\n "),p.ɵɵtemplate(57,A,8,4,"ng-container",13),p.ɵɵtext(58,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(59,"\n "),p.ɵɵelementStart(60,"div",24),p.ɵɵtext(61,"\n "),p.ɵɵelementStart(62,"button",25),p.ɵɵtext(63,"\n "),p.ɵɵelement(64,"i",26),p.ɵɵpipe(65,"i18n"),p.ɵɵtext(66,"\n "),p.ɵɵtemplate(67,O,3,3,"span",13),p.ɵɵtext(68,"\n "),p.ɵɵtemplate(69,T,3,3,"span",13),p.ɵɵtext(70,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(71,"\n "),p.ɵɵelementStart(72,"button",27),p.ɵɵtext(73),p.ɵɵpipe(74,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(75,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(76,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(1),i=p.ɵɵnextContext();p.ɵɵproperty("appApiAction",i.formPromise),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",!i.enabled),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",i.enabled),p.ɵɵadvance(7),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(15,18,"iosDevices"),":\n "),p.ɵɵadvance(9),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(24,20,"androidDevices"),":\n "),p.ɵɵadvance(9),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(33,22,"windowsDevices"),":\n "),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(41,24,"twoStepAuthenticatorAppsRecommended")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!i.enabled),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",i.enabled),p.ɵɵadvance(2),p.ɵɵproperty("ngClass",p.ɵɵpureFunction1(32,M,i.enabled)),p.ɵɵadvance(5),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(53,26,"key")),p.ɵɵadvance(2),p.ɵɵtextInterpolate(i.key),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!i.enabled),p.ɵɵadvance(5),p.ɵɵproperty("disabled",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(65,28,"loading")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!i.enabled),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",i.enabled),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(74,30,"close"))}}var D=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,o)||this;return a.userService=i,a.type=l.TwoFactorProviderType.Authenticator,a.qrScript=window.document.createElement("script"),a.qrScript.src="scripts/qrious.min.js",a.qrScript.async=!0,a}return i(t,e),t.prototype.ngOnInit=function(){window.document.body.appendChild(this.qrScript)},t.prototype.ngOnDestroy=function(){window.document.body.removeChild(this.qrScript)},t.prototype.auth=function(t){return e.prototype.auth.call(this,t),this.processResponse(t.response)},t.prototype.submit=function(){return this.enabled?e.prototype.disable.call(this,this.formPromise):this.enable()},t.prototype.enable=function(){var t=this,n=new s.UpdateTwoFactorAuthenticatorRequest;return n.masterPasswordHash=this.masterPasswordHash,n.token=this.token,n.key=this.key,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorAuthenticator(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),[2]}}))}))}))},t.prototype.processResponse=function(e){return o(this,void 0,void 0,(function(){var t,n=this;return a(this,(function(r){switch(r.label){case 0:return this.token=null,this.enabled=e.enabled,this.key=e.key,[4,this.userService.getEmail()];case 1:return t=r.sent(),window.setTimeout((function(){new window.QRious({element:document.getElementById("qr"),value:"otpauth://totp/Bitwarden:"+encodeURIComponent(t)+"?secret="+encodeURIComponent(n.key)+"&issuer=Bitwarden",size:160})}),100),[2]}}))}))},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(h.UserService),p.ɵɵdirectiveInject(f.PlatformUtilsService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-authenticator"]],features:[p.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faAuthenticatorTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faAuthenticatorTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"fa-ul"],[1,"fa-li","fa","fa-apple"],["href","https://itunes.apple.com/us/app/authy/id494168017?mt=8","target","_blank","rel","noopener"],[1,"fa-li","fa","fa-android"],["href","https://play.google.com/store/apps/details?id=com.authy.authy","target","_blank","rel","noopener"],[1,"fa-li","fa","fa-windows"],["href","https://www.microsoft.com/p/authenticator/9wzdncrfj3rj","target","_blank","rel","noopener"],[1,"text-center",3,"ngClass"],["id","qr"],[3,"appA11yTitle"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["src","images/0.png","alt","",1,"float-right"],["type","success","icon","fa-check-circle",3,"title"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",2),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"div",3),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"h2",4),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementStart(11,"small"),p.ɵɵtext(12),p.ɵɵpipe(13,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"button",5),p.ɵɵpipe(17,"i18n"),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"span",6),p.ɵɵtext(20,"×"),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,I,2,2,"app-two-factor-verify",7),p.ɵɵtext(25,"\n "),p.ɵɵtemplate(26,B,77,34,"form",8),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(30,"\n")),2&e&&(p.ɵɵadvance(9),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(13,7,"authenticatorAppTitle")),p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(17,9,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",!t.authed),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.authed))},directives:[v.A11yTitleDirective,y.NgIf,g.TwoFactorVerifyComponent,x.NgControlStatusGroup,x.NgForm,b.ApiActionDirective,y.NgClass,S.CalloutComponent,x.DefaultValueAccessor,x.RequiredValidator,w.InputVerbatimDirective,x.NgControlStatus,x.NgModel],pipes:[C.I18nPipe],encapsulation:2}),t}(c.TwoFactorBaseComponent);t.TwoFactorAuthenticatorComponent=D},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3),n(5),n(7);var s=n(558),l=n(113),c=n(875),p=n(256),u=n(0),d=n(6),m=n(3),h=n(9),f=n(5),v=n(7),y=n(17),g=n(4),x=n(188),b=n(13),S=n(16),w=n(24),C=n(45),I=n(10);function E(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"app-two-factor-verify",9),u.ɵɵlistener("onAuthed",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().auth(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵproperty("organizationId",r.organizationId)("type",r.type)}}function P(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"app-callout",18),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4),u.ɵɵpipe(5,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"strong"),u.ɵɵtext(8),u.ɵɵpipe(9,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(10),u.ɵɵelementContainerEnd()),2&e){var n=u.ɵɵnextContext(2);u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,4,"enabled")),u.ɵɵadvance(2),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(5,6,"twoStepLoginProviderEnabled"),"\n "),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(9,8,"email"),":"),u.ɵɵadvance(2),u.ɵɵtextInterpolate1(" ",n.email,"\n ")}}function k(e,t){if(1&e&&(u.ɵɵelementStart(0,"span",31),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext(3);u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind2(2,1,"verificationCodeEmailSent",n.sentEmail),"\n ")}}function _(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p",19),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"span",20),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelement(8,"img",21),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementStart(11,"div",22),u.ɵɵtext(12,"\n "),u.ɵɵelementStart(13,"label",23),u.ɵɵtext(14),u.ɵɵpipe(15,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"input",24),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext(2).email=e})),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementStart(20,"div",25),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"button",26,27),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext(2).sendEmail()})),u.ɵɵtext(24,"\n "),u.ɵɵelement(25,"i",16),u.ɵɵpipe(26,"i18n"),u.ɵɵtext(27,"\n "),u.ɵɵelementStart(28,"span"),u.ɵɵtext(29),u.ɵɵpipe(30,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(31,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵtemplate(33,k,3,4,"span",28),u.ɵɵtext(34,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(35,"\n "),u.ɵɵelementStart(36,"div",22),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"label",29),u.ɵɵtext(39),u.ɵɵpipe(40,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵelementStart(42,"input",30),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext(2).token=e})),u.ɵɵelementEnd(),u.ɵɵtext(43,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(44,"\n "),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵreference(23),i=u.ɵɵnextContext(2);u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(6,10,"twoFactorEmailDesc")),u.ɵɵadvance(9),u.ɵɵtextInterpolate1("1. ",u.ɵɵpipeBind1(15,12,"twoFactorEmailEnterEmail"),""),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",i.email),u.ɵɵadvance(5),u.ɵɵproperty("appApiAction",i.emailPromise)("disabled",r.loading),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(26,14,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(30,16,"sendEmail")),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",i.sentEmail),u.ɵɵadvance(6),u.ɵɵtextInterpolate1("2. ",u.ɵɵpipeBind1(40,18,"twoFactorEmailEnterCode"),""),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",i.token)}}function A(e,t){1&e&&(u.ɵɵelementStart(0,"span"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(2,1,"enable")))}function O(e,t){1&e&&(u.ɵɵelementStart(0,"span"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(2,1,"disable")))}function T(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"form",10,11),u.ɵɵlistener("ngSubmit",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().submit()})),u.ɵɵtext(2,"\n "),u.ɵɵelementStart(3,"div",12),u.ɵɵtext(4,"\n "),u.ɵɵtemplate(5,P,11,10,"ng-container",13),u.ɵɵtext(6,"\n "),u.ɵɵtemplate(7,_,45,20,"ng-container",13),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",14),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"button",15),u.ɵɵtext(13,"\n "),u.ɵɵelement(14,"i",16),u.ɵɵpipe(15,"i18n"),u.ɵɵtext(16,"\n "),u.ɵɵtemplate(17,A,3,3,"span",13),u.ɵɵtext(18,"\n "),u.ɵɵtemplate(19,O,3,3,"span",13),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"button",17),u.ɵɵtext(23),u.ɵɵpipe(24,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(25,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(26,"\n "),u.ɵɵelementEnd()}if(2&e){var r=u.ɵɵreference(1),i=u.ɵɵnextContext();u.ɵɵproperty("appApiAction",i.formPromise),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",i.enabled),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!i.enabled),u.ɵɵadvance(5),u.ɵɵproperty("disabled",r.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(15,8,"loading")),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",!i.enabled),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",i.enabled),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(24,10,"close"))}}var M=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.userService=o,a.type=l.TwoFactorProviderType.Email,a}return i(t,e),t.prototype.auth=function(t){return e.prototype.auth.call(this,t),this.processResponse(t.response)},t.prototype.submit=function(){return this.enabled?e.prototype.disable.call(this,this.formPromise):this.enable()},t.prototype.sendEmail=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=new s.TwoFactorEmailRequest(this.email,this.masterPasswordHash),this.emailPromise=this.apiService.postTwoFactorEmailSetup(e),[4,this.emailPromise];case 1:return t.sent(),this.sentEmail=this.email,[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},t.prototype.enable=function(){var t=this,n=new c.UpdateTwoFactorEmailRequest;return n.masterPasswordHash=this.masterPasswordHash,n.email=this.email,n.token=this.token,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorEmail(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),[2]}}))}))}))},t.prototype.processResponse=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return this.token=null,this.email=e.email,this.enabled=e.enabled,this.enabled||null!=this.email&&""!==this.email?[3,2]:(t=this,[4,this.userService.getEmail()]);case 1:t.email=n.sent(),n.label=2;case 2:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.ApiService),u.ɵɵdirectiveInject(m.I18nService),u.ɵɵdirectiveInject(h.ToasterService),u.ɵɵdirectiveInject(f.PlatformUtilsService),u.ɵɵdirectiveInject(v.UserService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-email"]],features:[u.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faEmailTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faEmailTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","fa-check-circle",3,"title"],[1,"d-flex"],[1,"mr-3"],["src","images/1.png","alt","",1,"float-right","ml-auto"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"mb-3","d-flex"],["type","button",1,"btn","btn-outline-primary","btn-sm","btn-submit","align-self-start",3,"appApiAction","disabled","click"],["sendBtn",""],["class","text-success ml-3",4,"ngIf"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"text-success","ml-3"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",2),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",3),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"h2",4),u.ɵɵtext(9),u.ɵɵpipe(10,"i18n"),u.ɵɵelementStart(11,"small"),u.ɵɵtext(12),u.ɵɵpipe(13,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"button",5),u.ɵɵpipe(17,"i18n"),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"span",6),u.ɵɵtext(20,"×"),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(22,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(23,"\n "),u.ɵɵtemplate(24,E,2,2,"app-two-factor-verify",7),u.ɵɵtext(25,"\n "),u.ɵɵtemplate(26,T,27,12,"form",8),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(29,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(30,"\n")),2&e&&(u.ɵɵadvance(9),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(13,7,"emailTitle")),u.ɵɵadvance(4),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(17,9,"close")),u.ɵɵadvance(8),u.ɵɵproperty("ngIf",!t.authed),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.authed))},directives:[y.A11yTitleDirective,g.NgIf,x.TwoFactorVerifyComponent,b.NgControlStatusGroup,b.NgForm,S.ApiActionDirective,w.CalloutComponent,b.DefaultValueAccessor,b.RequiredValidator,C.InputVerbatimDirective,b.NgControlStatus,b.NgModel],pipes:[I.I18nPipe],encapsulation:2}),t}(p.TwoFactorBaseComponent);t.TwoFactorEmailComponent=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0),n(3);var r=n(113),i=n(0),o=n(3),a=n(17),s=n(4),l=n(188),c=n(10);function p(e,t){if(1&e){var n=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"app-two-factor-verify",9),i.ɵɵlistener("onAuthed",(function(e){return i.ɵɵrestoreView(n),i.ɵɵnextContext().auth(e)})),i.ɵɵtext(1,"\n "),i.ɵɵelementEnd()}if(2&e){var r=i.ɵɵnextContext();i.ɵɵproperty("organizationId",r.organizationId)("type",r.type)}}function u(e,t){if(1&e&&(i.ɵɵelementContainerStart(0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"p"),i.ɵɵtext(3),i.ɵɵpipe(4,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(5,"\n "),i.ɵɵelementStart(6,"code",14),i.ɵɵtext(7),i.ɵɵelementEnd(),i.ɵɵtext(8,"\n "),i.ɵɵelementContainerEnd()),2&e){var n=i.ɵɵnextContext(2);i.ɵɵadvance(3),i.ɵɵtextInterpolate1("",i.ɵɵpipeBind1(4,2,"twoFactorRecoveryYourCode"),":"),i.ɵɵadvance(4),i.ɵɵtextInterpolate(n.code)}}function d(e,t){1&e&&(i.ɵɵelementContainerStart(0),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementContainerEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"twoFactorRecoveryNoCode"),"\n "))}function m(e,t){if(1&e){var n=i.ɵɵgetCurrentView();i.ɵɵelementStart(0,"button",15),i.ɵɵlistener("click",(function(){return i.ɵɵrestoreView(n),i.ɵɵnextContext(2).print()})),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()}2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate(i.ɵɵpipeBind1(2,1,"printCode")))}function h(e,t){if(1&e&&(i.ɵɵelementContainerStart(0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"div",10),i.ɵɵtext(3,"\n "),i.ɵɵtemplate(4,u,9,4,"ng-container",8),i.ɵɵtext(5,"\n "),i.ɵɵtemplate(6,d,3,3,"ng-container",8),i.ɵɵtext(7,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(8,"\n "),i.ɵɵelementStart(9,"div",11),i.ɵɵtext(10,"\n "),i.ɵɵtemplate(11,m,3,3,"button",12),i.ɵɵtext(12,"\n "),i.ɵɵelementStart(13,"button",13),i.ɵɵtext(14),i.ɵɵpipe(15,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(16,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(17,"\n "),i.ɵɵelementContainerEnd()),2&e){var n=i.ɵɵnextContext();i.ɵɵadvance(4),i.ɵɵproperty("ngIf",n.code),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",!n.code),i.ɵɵadvance(5),i.ɵɵproperty("ngIf",n.code),i.ɵɵadvance(3),i.ɵɵtextInterpolate(i.ɵɵpipeBind1(15,4,"close"))}}var f=function(){function e(e){this.i18nService=e,this.type=-1,this.twoFactorProviderType=r.TwoFactorProviderType}return e.prototype.auth=function(e){this.authed=!0,this.processResponse(e.response)},e.prototype.print=function(){var e=window.open();e.document.write('<div style="font-size: 18px; text-align: center;"><p>'+this.i18nService.t("twoFactorRecoveryYourCode")+":</p><code style=\"font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;\">"+this.code+'</code></div><p style="text-align: center;">'+new Date+"</p>"),e.onafterprint=function(){return e.close()},e.print()},e.prototype.formatString=function(e){return null==e?null:e.replace(/(.{4})/g,"$1 ").trim().toUpperCase()},e.prototype.processResponse=function(e){this.code=this.formatString(e.code)},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(o.I18nService))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["app-two-factor-recovery"]],decls:31,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faRecoveryTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faRecoveryTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],[4,"ngIf"],[3,"organizationId","type","onAuthed"],[1,"modal-body","text-center"],[1,"modal-footer"],["type","button","class","btn btn-primary",3,"click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-lg"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"div",1),i.ɵɵtext(3,"\n "),i.ɵɵelementStart(4,"div",2),i.ɵɵtext(5,"\n "),i.ɵɵelementStart(6,"div",3),i.ɵɵtext(7,"\n "),i.ɵɵelementStart(8,"h2",4),i.ɵɵtext(9),i.ɵɵpipe(10,"i18n"),i.ɵɵelementStart(11,"small"),i.ɵɵtext(12),i.ɵɵpipe(13,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(14,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(15,"\n "),i.ɵɵelementStart(16,"button",5),i.ɵɵpipe(17,"i18n"),i.ɵɵtext(18,"\n "),i.ɵɵelementStart(19,"span",6),i.ɵɵtext(20,"×"),i.ɵɵelementEnd(),i.ɵɵtext(21,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(22,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(23,"\n "),i.ɵɵtemplate(24,p,2,2,"app-two-factor-verify",7),i.ɵɵtext(25,"\n "),i.ɵɵtemplate(26,h,18,6,"ng-container",8),i.ɵɵtext(27,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(28,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(29,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(30,"\n")),2&e&&(i.ɵɵadvance(9),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),i.ɵɵadvance(3),i.ɵɵtextInterpolate(i.ɵɵpipeBind1(13,7,"recoveryCodeTitle")),i.ɵɵadvance(4),i.ɵɵpropertyInterpolate("appA11yTitle",i.ɵɵpipeBind1(17,9,"close")),i.ɵɵadvance(8),i.ɵɵproperty("ngIf",!t.authed),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.authed))},directives:[a.A11yTitleDirective,s.NgIf,l.TwoFactorVerifyComponent],pipes:[c.I18nPipe],encapsulation:2}),e}();t.TwoFactorRecoveryComponent=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3),n(5);var s=n(113),l=n(79),c=n(876),p=n(877),u=n(256),d=n(0),m=n(6),h=n(3),f=n(9),v=n(5),y=n(17),g=n(4),x=n(188),b=n(13),S=n(16),w=n(24),C=n(37),I=n(10);function E(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"app-two-factor-verify",9),d.ɵɵlistener("onAuthed",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().auth(e)})),d.ɵɵtext(1,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext();d.ɵɵproperty("organizationId",r.organizationId)("type",r.type)}}function P(e,t){1&e&&(d.ɵɵelementStart(0,"app-callout",31),d.ɵɵpipe(1,"i18n"),d.ɵɵtext(2),d.ɵɵpipe(3,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(1,2,"enabled")),d.ɵɵadvance(2),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(3,4,"twoStepLoginProviderEnabled"),"\n "))}function k(e,t){if(1&e&&(d.ɵɵelementStart(0,"strong"),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e){var n=d.ɵɵnextContext().index;d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind2(2,1,"webAuthnkeyX",n+1))}}function _(e,t){if(1&e&&(d.ɵɵelementStart(0,"strong"),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){var n=d.ɵɵnextContext().$implicit;d.ɵɵadvance(1),d.ɵɵtextInterpolate(n.name)}}function A(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"span"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,1,"webAuthnMigrated")))}function O(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,A,6,3,"ng-container",25),d.ɵɵtext(3,"\n "),d.ɵɵelementContainerEnd()),2&e){var n=d.ɵɵnextContext().$implicit;d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.migrated)}}function T(e,t){1&e&&(d.ɵɵelement(0,"i",37),d.ɵɵpipe(1,"i18n")),2&e&&d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(1,1,"loading"))}function M(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,T,2,3,"i",35),d.ɵɵtext(3,"\n -\n "),d.ɵɵelementStart(4,"a",36),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(n);var e=d.ɵɵnextContext().$implicit;return d.ɵɵnextContext(2).remove(e)})),d.ɵɵtext(5),d.ɵɵpipe(6,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementContainerEnd()}if(2&e){d.ɵɵnextContext();var r=d.ɵɵreference(1);d.ɵɵadvance(2),d.ɵɵproperty("ngIf",r.loading),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(6,2,"remove"))}}function B(e,t){if(1&e&&(d.ɵɵelementStart(0,"li",32,33),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"i",34),d.ɵɵtext(4,"\n "),d.ɵɵtemplate(5,k,3,4,"strong",25),d.ɵɵtext(6,"\n "),d.ɵɵtemplate(7,_,2,1,"strong",25),d.ɵɵtext(8,"\n "),d.ɵɵtemplate(9,O,4,1,"ng-container",25),d.ɵɵtext(10,"\n "),d.ɵɵtemplate(11,M,8,4,"ng-container",25),d.ɵɵtext(12,"\n "),d.ɵɵelementEnd()),2&e){var n=t.$implicit,r=d.ɵɵreference(1),i=d.ɵɵnextContext(2);d.ɵɵproperty("appApiAction",n.removePromise),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",!n.configured||!n.name),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.configured&&n.name),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.configured&&!r.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",i.keysConfiguredCount>1&&n.configured)}}function D(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",38),d.ɵɵtext(3,"\n "),d.ɵɵelementContainerEnd())}function R(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",38),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"twoFactorU2fWaiting"),"...\n "))}function V(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",39),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"twoFactorU2fClickSave"),"\n "))}function j(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",40),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"twoFactorU2fProblemReadingTryAgain"),"\n "))}function F(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,R,5,3,"ng-container",25),d.ɵɵtext(3,"\n "),d.ɵɵtemplate(4,V,5,3,"ng-container",25),d.ɵɵtext(5,"\n "),d.ɵɵtemplate(6,j,5,3,"ng-container",25),d.ɵɵtext(7,"\n "),d.ɵɵelementContainerEnd()),2&e){var n=d.ɵɵnextContext(2);d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.webAuthnListening),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.webAuthnResponse),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",n.webAuthnError)}}function U(e,t){1&e&&(d.ɵɵelement(0,"i",41),d.ɵɵpipe(1,"i18n")),2&e&&d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(1,1,"loading"))}function N(e,t){1&e&&(d.ɵɵelementStart(0,"span"),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(2,1,"save")))}function z(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",42,43),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext(2).disable()})),d.ɵɵtext(2,"\n "),d.ɵɵelement(3,"i",41),d.ɵɵpipe(4,"i18n"),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"span"),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵreference(1),i=d.ɵɵnextContext(2);d.ɵɵproperty("appApiAction",i.disablePromise)("disabled",r.loading),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(4,4,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function L(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"form",10,11),d.ɵɵlistener("ngSubmit",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext().submit()})),d.ɵɵtext(2,"\n "),d.ɵɵelementStart(3,"div",12),d.ɵɵtext(4,"\n "),d.ɵɵtemplate(5,P,4,6,"app-callout",13),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"app-callout",14),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"p"),d.ɵɵtext(10),d.ɵɵpipe(11,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementStart(13,"ul",15),d.ɵɵtext(14,"\n "),d.ɵɵelementStart(15,"li"),d.ɵɵtext(16),d.ɵɵpipe(17,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(18,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(19,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n "),d.ɵɵelement(21,"img",16),d.ɵɵtext(22,"\n "),d.ɵɵelementStart(23,"ul",17),d.ɵɵtext(24,"\n "),d.ɵɵtemplate(25,B,13,5,"li",18),d.ɵɵtext(26,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(27,"\n "),d.ɵɵelement(28,"hr"),d.ɵɵtext(29,"\n "),d.ɵɵelementStart(30,"p"),d.ɵɵtext(31),d.ɵɵpipe(32,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(33,"\n "),d.ɵɵelementStart(34,"ol"),d.ɵɵtext(35,"\n "),d.ɵɵelementStart(36,"li"),d.ɵɵtext(37),d.ɵɵpipe(38,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(39,"\n "),d.ɵɵelementStart(40,"li"),d.ɵɵtext(41),d.ɵɵpipe(42,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(43,"\n "),d.ɵɵelementStart(44,"li"),d.ɵɵtext(45),d.ɵɵpipe(46,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(47,"\n "),d.ɵɵelementStart(48,"li"),d.ɵɵtext(49),d.ɵɵpipe(50,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(51,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(52,"\n "),d.ɵɵelementStart(53,"div",19),d.ɵɵtext(54,"\n "),d.ɵɵelementStart(55,"div",20),d.ɵɵtext(56,"\n "),d.ɵɵelementStart(57,"label",21),d.ɵɵtext(58),d.ɵɵpipe(59,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(60,"\n "),d.ɵɵelementStart(61,"input",22),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().name=e})),d.ɵɵelementEnd(),d.ɵɵtext(62,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(63,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(64,"\n "),d.ɵɵelementStart(65,"button",23,24),d.ɵɵlistener("click",(function(){return d.ɵɵrestoreView(n),d.ɵɵnextContext().readKey()})),d.ɵɵtext(67),d.ɵɵpipe(68,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(69,"\n "),d.ɵɵtemplate(70,D,4,0,"ng-container",25),d.ɵɵtext(71,"\n "),d.ɵɵtemplate(72,F,8,3,"ng-container",25),d.ɵɵtext(73,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(74,"\n "),d.ɵɵelementStart(75,"div",26),d.ɵɵtext(76,"\n "),d.ɵɵelementStart(77,"button",27),d.ɵɵtext(78,"\n "),d.ɵɵtemplate(79,U,2,3,"i",28),d.ɵɵtext(80,"\n "),d.ɵɵtemplate(81,N,3,3,"span",25),d.ɵɵtext(82,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(83,"\n "),d.ɵɵtemplate(84,z,10,8,"button",29),d.ɵɵtext(85,"\n "),d.ɵɵelementStart(86,"button",30),d.ɵɵtext(87),d.ɵɵpipe(88,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(89,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(90,"\n "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵreference(1),i=d.ɵɵreference(66),o=d.ɵɵnextContext();d.ɵɵproperty("appApiAction",o.formPromise),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",o.enabled),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(11,23,"twoFactorWebAuthnWarning")),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(17,25,"twoFactorWebAuthnSupportWeb")),d.ɵɵadvance(9),d.ɵɵproperty("ngForOf",o.keys),d.ɵɵadvance(6),d.ɵɵtextInterpolate1("",d.ɵɵpipeBind1(32,27,"twoFactorWebAuthnAdd"),":"),d.ɵɵadvance(6),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(38,29,"twoFactorU2fGiveName")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(42,31,"twoFactorU2fPlugInReadKey")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(46,33,"twoFactorU2fTouchButton")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(50,35,"twoFactorU2fSaveForm")),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(59,37,"name")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",o.name)("disabled",!o.keyIdAvailable),d.ɵɵadvance(4),d.ɵɵproperty("disabled",i.loading||o.webAuthnListening||!o.keyIdAvailable)("appApiAction",o.challengePromise),d.ɵɵadvance(2),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(68,39,"readKey"),"\n "),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",i.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!i.loading),d.ɵɵadvance(5),d.ɵɵproperty("disabled",r.loading||!o.webAuthnResponse),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",r.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!r.loading),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",o.enabled),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(88,41,"close"))}}var G=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.ngZone=o,a.type=s.TwoFactorProviderType.WebAuthn,a.keyIdAvailable=null,a.keysConfiguredCount=0,a}return i(t,e),t.prototype.auth=function(t){e.prototype.auth.call(this,t),this.processResponse(t.response)},t.prototype.submit=function(){var t=this;if(null==this.webAuthnResponse||null==this.keyIdAvailable)return Promise.reject();var n=new p.UpdateTwoFactorWebAuthnRequest;return n.masterPasswordHash=this.masterPasswordHash,n.deviceResponse=this.webAuthnResponse,n.id=this.keyIdAvailable,n.name=this.name,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorWebAuthn(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),[2]}}))}))}))},t.prototype.disable=function(){return e.prototype.disable.call(this,this.formPromise)},t.prototype.remove=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return this.keysConfiguredCount<=1||null!=e.removePromise?[2]:(t=null!=e.name?e.name:this.i18nService.t("webAuthnkeyX",e.id),[4,this.platformUtilsService.showDialog(this.i18nService.t("removeU2fConfirmation"),t,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]);case 1:if(!i.sent())return[2];(n=new c.UpdateTwoFactorWebAuthnDeleteRequest).id=e.id,n.masterPasswordHash=this.masterPasswordHash,i.label=2;case 2:return i.trys.push([2,5,,6]),e.removePromise=this.apiService.deleteTwoFactorWebAuthn(n),[4,e.removePromise];case 3:return r=i.sent(),e.removePromise=null,[4,this.processResponse(r)];case 4:return i.sent(),[3,6];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))},t.prototype.readKey=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:if(null==this.keyIdAvailable)return[2];(e=new l.PasswordVerificationRequest).masterPasswordHash=this.masterPasswordHash,n.label=1;case 1:return n.trys.push([1,3,,4]),this.challengePromise=this.apiService.getTwoFactorWebAuthnChallenge(e),[4,this.challengePromise];case 2:return t=n.sent(),this.readDevice(t),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}}))}))},t.prototype.readDevice=function(e){var t=this;console.log("listening for key..."),this.resetWebAuthn(!0),navigator.credentials.create({publicKey:e}).then((function(e){t.ngZone.run((function(){t.webAuthnListening=!1,t.webAuthnResponse=e}))})).catch((function(e){console.error(e),t.resetWebAuthn(!1),t.webAuthnError=!0}))},t.prototype.resetWebAuthn=function(e){void 0===e&&(e=!1),this.webAuthnResponse=null,this.webAuthnError=!1,this.webAuthnListening=e},t.prototype.processResponse=function(e){this.resetWebAuthn(),this.keys=[],this.keyIdAvailable=null,this.name=null,this.keysConfiguredCount=0;for(var t=function(t){if(null!=e.keys){var r=e.keys.filter((function(e){return e.id===t}));if(r.length>0)return n.keysConfiguredCount++,n.keys.push({id:t,name:r[0].name,configured:!0,migrated:r[0].migrated,removePromise:null}),"continue"}n.keys.push({id:t,name:null,configured:!1,removePromise:null}),null==n.keyIdAvailable&&(n.keyIdAvailable=t)},n=this,r=1;r<=5;r++)t(r);this.enabled=e.enabled},t.ɵfac=function(e){return new(e||t)(d.ɵɵdirectiveInject(m.ApiService),d.ɵɵdirectiveInject(h.I18nService),d.ɵɵdirectiveInject(f.ToasterService),d.ɵɵdirectiveInject(v.PlatformUtilsService),d.ɵɵdirectiveInject(d.NgZone))},t.ɵcmp=d.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-webauthn"]],features:[d.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faU2fTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","2faU2fTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["type","success","icon","fa-check-circle",3,"title",4,"ngIf"],["type","warning"],[1,"mb-0"],["src","images/7.png","alt","",1,"float-right","ml-5"],[1,"fa-ul"],[3,"appApiAction",4,"ngFor","ngForOf"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"disabled","appApiAction","click"],["readKeyBtn",""],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","fa fa-spinner fa-spin","aria-hidden","true",3,"title",4,"ngIf"],["type","button","class","btn btn-outline-secondary btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","fa-check-circle",3,"title"],[3,"appApiAction"],["removeKeyBtn",""],[1,"fa-li","fa","fa-key"],["class","fa fa-spin fa-spinner text-muted fa-fw","aria-hidden","true",3,"title",4,"ngIf"],["href","#","appStopClick","",3,"click"],["aria-hidden","true",1,"fa","fa-spin","fa-spinner","text-muted","fa-fw",3,"title"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted"],["aria-hidden","true",1,"fa","fa-check-circle","text-success"],["aria-hidden","true",1,"fa","fa-warning","text-danger"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["disableBtn",""]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",1),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"div",2),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"div",3),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"h2",4),d.ɵɵtext(9),d.ɵɵpipe(10,"i18n"),d.ɵɵelementStart(11,"small"),d.ɵɵtext(12),d.ɵɵpipe(13,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementStart(16,"button",5),d.ɵɵpipe(17,"i18n"),d.ɵɵtext(18,"\n "),d.ɵɵelementStart(19,"span",6),d.ɵɵtext(20,"×"),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(22,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(23,"\n "),d.ɵɵtemplate(24,E,2,2,"app-two-factor-verify",7),d.ɵɵtext(25,"\n "),d.ɵɵtemplate(26,L,91,43,"form",8),d.ɵɵtext(27,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(28,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(29,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(30,"\n")),2&e&&(d.ɵɵadvance(9),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(13,7,"webAuthnTitle")),d.ɵɵadvance(4),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(17,9,"close")),d.ɵɵadvance(8),d.ɵɵproperty("ngIf",!t.authed),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.authed))},directives:[y.A11yTitleDirective,g.NgIf,x.TwoFactorVerifyComponent,b.NgControlStatusGroup,b.NgForm,S.ApiActionDirective,w.CalloutComponent,g.NgForOf,b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,C.StopClickDirective],pipes:[I.I18nPipe],encapsulation:2}),t}(u.TwoFactorBaseComponent);t.TwoFactorWebAuthnComponent=G},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3),n(5);var s=n(878),l=n(113),c=n(256),p=n(0),u=n(6),d=n(3),m=n(9),h=n(5),f=n(17),v=n(4),y=n(188),g=n(13),x=n(16),b=n(24),S=n(45),w=n(10);function C(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"app-two-factor-verify",9),p.ɵɵlistener("onAuthed",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().auth(e)})),p.ɵɵtext(1,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵproperty("organizationId",r.organizationId)("type",r.type)}}function I(e,t){1&e&&(p.ɵɵelementStart(0,"app-callout",29),p.ɵɵpipe(1,"i18n"),p.ɵɵtext(2),p.ɵɵpipe(3,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(1,2,"enabled")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(3,4,"twoStepLoginProviderEnabled"),"\n "))}function E(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"input",34),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().$implicit.key=e})),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(),i=r.index,o=r.$implicit;p.ɵɵpropertyInterpolate1("id","key",i+1,""),p.ɵɵpropertyInterpolate1("name","Key",i+1,""),p.ɵɵproperty("ngModel",o.key)}}function P(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",35),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"span",36),p.ɵɵtext(3),p.ɵɵelementEnd(),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"button",37),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit;return p.ɵɵnextContext(2).remove(e)})),p.ɵɵpipe(6,"i18n"),p.ɵɵtext(7,"\n "),p.ɵɵelement(8,"i",38),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext().$implicit;p.ɵɵadvance(3),p.ɵɵtextInterpolate(r.existingKey),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(6,2,"remove"))}}function k(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",30),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"label",31),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵtemplate(6,E,1,3,"input",32),p.ɵɵtext(7,"\n "),p.ɵɵtemplate(8,P,11,4,"div",33),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()),2&e){var n=t.$implicit,r=t.index;p.ɵɵadvance(2),p.ɵɵpropertyInterpolate1("for","key",r+1,""),p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind2(4,4,"yubikeyX",r+1)),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!n.existingKey),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.existingKey)}}function _(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",39,40),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).disable()})),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"i",26),p.ɵɵpipe(4,"i18n"),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"span"),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(1),i=p.ɵɵnextContext(2);p.ɵɵproperty("appApiAction",i.disablePromise)("disabled",r.loading),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(4,4,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function A(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",10,11),p.ɵɵlistener("ngSubmit",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().submit()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",12),p.ɵɵtext(4,"\n "),p.ɵɵtemplate(5,I,4,6,"app-callout",13),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"app-callout",14),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"ul",15),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"li"),p.ɵɵtext(16),p.ɵɵpipe(17,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"li"),p.ɵɵtext(20),p.ɵɵpipe(21,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n "),p.ɵɵelement(25,"img",16),p.ɵɵtext(26,"\n "),p.ɵɵelementStart(27,"p"),p.ɵɵtext(28),p.ɵɵpipe(29,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"ol"),p.ɵɵtext(32,"\n "),p.ɵɵelementStart(33,"li"),p.ɵɵtext(34),p.ɵɵpipe(35,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(36,"\n "),p.ɵɵelementStart(37,"li"),p.ɵɵtext(38),p.ɵɵpipe(39,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(40,"\n "),p.ɵɵelementStart(41,"li"),p.ɵɵtext(42),p.ɵɵpipe(43,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(44,"\n "),p.ɵɵelementStart(45,"li"),p.ɵɵtext(46),p.ɵɵpipe(47,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(49,"\n "),p.ɵɵelement(50,"hr"),p.ɵɵtext(51,"\n "),p.ɵɵelementStart(52,"div",17),p.ɵɵtext(53,"\n "),p.ɵɵtemplate(54,k,10,7,"div",18),p.ɵɵtext(55,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(56,"\n "),p.ɵɵelementStart(57,"strong",19),p.ɵɵtext(58),p.ɵɵpipe(59,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(60,"\n "),p.ɵɵelementStart(61,"div",20),p.ɵɵtext(62,"\n "),p.ɵɵelementStart(63,"input",21),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().nfc=e})),p.ɵɵelementEnd(),p.ɵɵtext(64,"\n "),p.ɵɵelementStart(65,"label",22),p.ɵɵtext(66),p.ɵɵpipe(67,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(68,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(69,"\n "),p.ɵɵelementStart(70,"small",23),p.ɵɵtext(71),p.ɵɵpipe(72,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(73,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(74,"\n "),p.ɵɵelementStart(75,"div",24),p.ɵɵtext(76,"\n "),p.ɵɵelementStart(77,"button",25),p.ɵɵtext(78,"\n "),p.ɵɵelement(79,"i",26),p.ɵɵpipe(80,"i18n"),p.ɵɵtext(81,"\n "),p.ɵɵelementStart(82,"span"),p.ɵɵtext(83),p.ɵɵpipe(84,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(85,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(86,"\n "),p.ɵɵtemplate(87,_,10,8,"button",27),p.ɵɵtext(88,"\n "),p.ɵɵelementStart(89,"button",28),p.ɵɵtext(90),p.ɵɵpipe(91,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(92,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(93,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(1),i=p.ɵɵnextContext();p.ɵɵproperty("appApiAction",i.formPromise),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",i.enabled),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,20,"twoFactorYubikeyWarning")),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(17,22,"twoFactorYubikeySupportUsb")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(21,24,"twoFactorYubikeySupportMobile")),p.ɵɵadvance(8),p.ɵɵtextInterpolate1("",p.ɵɵpipeBind1(29,26,"twoFactorYubikeyAdd"),":"),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(35,28,"twoFactorYubikeyPlugIn")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(39,30,"twoFactorYubikeySelectKey")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(43,32,"twoFactorYubikeyTouchButton")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(47,34,"twoFactorYubikeySaveForm")),p.ɵɵadvance(8),p.ɵɵproperty("ngForOf",i.keys),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(59,36,"nfcSupport")),p.ɵɵadvance(5),p.ɵɵproperty("ngModel",i.nfc),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(67,38,"twoFactorYubikeySupportsNfc")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(72,40,"twoFactorYubikeySupportsNfcDesc")),p.ɵɵadvance(6),p.ɵɵproperty("disabled",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(80,42,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(84,44,"save")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",i.enabled),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(91,46,"close"))}}var O=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.type=l.TwoFactorProviderType.Yubikey,o.nfc=!1,o}return i(t,e),t.prototype.auth=function(t){e.prototype.auth.call(this,t),this.processResponse(t.response)},t.prototype.submit=function(){var t=this,n=new s.UpdateTwoFactorYubioOtpRequest;return n.masterPasswordHash=this.masterPasswordHash,n.key1=null!=this.keys&&this.keys.length>0?this.keys[0].key:null,n.key2=null!=this.keys&&this.keys.length>1?this.keys[1].key:null,n.key3=null!=this.keys&&this.keys.length>2?this.keys[2].key:null,n.key4=null!=this.keys&&this.keys.length>3?this.keys[3].key:null,n.key5=null!=this.keys&&this.keys.length>4?this.keys[4].key:null,n.nfc=this.nfc,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorYubiKey(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("yubikeysUpdated")),[2]}}))}))}))},t.prototype.disable=function(){return e.prototype.disable.call(this,this.disablePromise)},t.prototype.remove=function(e){e.existingKey=null,e.key=null},t.prototype.processResponse=function(e){this.enabled=e.enabled,this.keys=[{key:e.key1,existingKey:this.padRight(e.key1)},{key:e.key2,existingKey:this.padRight(e.key2)},{key:e.key3,existingKey:this.padRight(e.key3)},{key:e.key4,existingKey:this.padRight(e.key4)},{key:e.key5,existingKey:this.padRight(e.key5)}],this.nfc=e.nfc||!e.enabled},t.prototype.padRight=function(e,t,n){if(void 0===t&&(t="•"),void 0===n&&(n=44),null==e||null==t||e.length>=n)return e;for(var r=(n-e.length)/t.length,i=0;i<r;i++)e+=t;return e},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(h.PlatformUtilsService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-yubikey"]],features:[p.ɵɵInheritDefinitionFeature],decls:30,vars:8,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","2faYubiKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","2faYubiKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["type","success","icon","fa-check-circle",3,"title",4,"ngIf"],["type","warning"],[1,"mb-0"],["src","images/3.png","alt","",1,"float-right"],[1,"row"],["class","form-group col-6",4,"ngFor","ngForOf"],[1,"d-block","mb-2"],[1,"form-check"],["type","checkbox","id","nfc","name","Nfc",1,"form-check-input",3,"ngModel","ngModelChange"],["for","nfc",1,"form-check-label"],[1,"form-text","text-muted"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","class","btn btn-outline-secondary btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","fa-check-circle",3,"title"],[1,"form-group","col-6"],[3,"for"],["type","password","class","form-control","appInputVerbatim","","autocomplete","new-password",3,"id","name","ngModel","ngModelChange",4,"ngIf"],["class","d-flex",4,"ngIf"],["type","password","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"id","name","ngModel","ngModelChange"],[1,"d-flex"],[1,"mr-2"],["type","button",1,"btn","btn-link","text-danger","ml-auto",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-minus-circle","fa-lg"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["disableBtn",""]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",2),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"div",3),p.ɵɵtext(7,"\n "),p.ɵɵelementStart(8,"h2",4),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementStart(11,"small"),p.ɵɵtext(12,"YubiKey"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"button",5),p.ɵɵpipe(16,"i18n"),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"span",6),p.ɵɵtext(19,"×"),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵtemplate(23,C,2,2,"app-two-factor-verify",7),p.ɵɵtext(24,"\n "),p.ɵɵtemplate(25,A,94,48,"form",8),p.ɵɵtext(26,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(27,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n")),2&e&&(p.ɵɵadvance(9),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(10,4,"twoStepLogin"),"\n "),p.ɵɵadvance(6),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(16,6,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",!t.authed),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.authed))},directives:[f.A11yTitleDirective,v.NgIf,y.TwoFactorVerifyComponent,g.NgControlStatusGroup,g.NgForm,x.ApiActionDirective,b.CalloutComponent,v.NgForOf,g.CheckboxControlValueAccessor,g.NgControlStatus,g.NgModel,g.DefaultValueAccessor,S.InputVerbatimDirective],pipes:[w.I18nPipe],encapsulation:2}),t}(c.TwoFactorBaseComponent);t.TwoFactorYubiKeyComponent=O},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(18),n(71),n(189),n(3),n(5);var s=n(479),l=n(0),c=n(18),p=n(3),u=n(5),d=n(189),m=n(71),h=n(8),f=n(13),v=n(16),y=n(45),g=n(10),x=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o)||this;return s.route=a,s}return i(t,e),t.prototype.ngOnInit=function(){var e=this;this.route.parent.parent.params.subscribe((function(t){return o(e,void 0,void 0,(function(){return a(this,(function(e){return this.organizationId=t.organizationId,[2]}))}))}))},t.prototype.getExportData=function(){return this.exportService.getOrganizationExport(this.organizationId,this.format)},t.prototype.getFileName=function(){return e.prototype.getFileName.call(this,"org")},t.prototype.collectEvent=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2]}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CryptoService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.PlatformUtilsService),l.ɵɵdirectiveInject(d.ExportService),l.ɵɵdirectiveInject(m.EventService),l.ɵɵdirectiveInject(h.ActivatedRoute))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-org-export"]],features:[l.ɵɵInheritDefinitionFeature],decls:59,vars:22,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"page-header"],[1,"row"],[1,"form-group","col-6"],["for","format"],["id","format","name","Format",1,"form-control",3,"ngModel","ngModelChange"],["value","json"],["value","csv"],["value","encrypted_json"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPassword","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"form",0,1),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",2),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"h1"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"p"),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"div",3),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"div",4),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"label",5),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"select",6),l.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),l.ɵɵtext(23,"\n "),l.ɵɵelementStart(24,"option",7),l.ɵɵtext(25,".json"),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementStart(27,"option",8),l.ɵɵtext(28,".csv"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"option",9),l.ɵɵtext(31,".json (Encrypted)"),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"div",3),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"div",4),l.ɵɵtext(39,"\n "),l.ɵɵelementStart(40,"label",10),l.ɵɵtext(41),l.ɵɵpipe(42,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementStart(44,"input",11),l.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n "),l.ɵɵelementStart(48,"button",12),l.ɵɵtext(49,"\n "),l.ɵɵelement(50,"i",13),l.ɵɵpipe(51,"i18n"),l.ɵɵtext(52,"\n "),l.ɵɵelementStart(53,"span"),l.ɵɵtext(54),l.ɵɵpipe(55,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(56,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(57,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n")),2&e){var n=l.ɵɵreference(1);l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,10,"exportVault")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,12,"exportMasterPassword")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(20,14,"fileFormat")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.format),l.ɵɵadvance(19),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(42,16,"masterPass")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.masterPassword),l.ɵɵadvance(4),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(51,18,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(55,20,"exportVault"))}},directives:[f.NgControlStatusGroup,f.NgForm,v.ApiActionDirective,f.SelectControlValueAccessor,f.NgControlStatus,f.NgModel,f.NgSelectOption,f.ɵangular_packages_forms_forms_x,f.DefaultValueAccessor,f.RequiredValidator,y.InputVerbatimDirective],pipes:[g.I18nPipe],encapsulation:2}),t}(s.ExportComponent);t.ExportComponent=x},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(87),n(19),n(14),n(7);var s=n(480),l=n(0),c=n(19),p=n(87),u=n(14),d=n(7),m=n(8),h=n(4),f=n(24),v=n(107),y=n(37),g=n(53),x=n(10);function b(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",8),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"goodNews")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(3,4,"noExposedPasswords"),"\n "))}function S(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"a",19),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(3).selectCipher(e)})),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext().$implicit;l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"editItem")),l.ɵɵadvance(2),l.ɵɵtextInterpolate(r.name)}}function w(e,t){if(1&e&&(l.ɵɵtext(0,"\n "),l.ɵɵelementStart(1,"span"),l.ɵɵtext(2),l.ɵɵelementEnd(),l.ɵɵtext(3,"\n ")),2&e){var n=l.ɵɵnextContext().$implicit;l.ɵɵadvance(2),l.ɵɵtextInterpolate(n.name)}}function C(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",20),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",21),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"shared")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",22),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",21),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"attachments")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",12),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"app-vault-icon",13),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td",14),l.ɵɵtext(8,"\n "),l.ɵɵtemplate(9,S,6,4,"ng-container",15),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,w,4,1,"ng-template",null,16,l.ɵɵtemplateRefExtractor),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,C,9,6,"ng-container",7),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,I,9,6,"ng-container",7),l.ɵɵtext(17,"\n "),l.ɵɵelement(18,"br"),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"small"),l.ɵɵtext(21),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementStart(24,"td",17),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"span",18),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵpipe(29,"number"),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit,r=l.ɵɵreference(12),i=l.ɵɵnextContext(3);l.ɵɵadvance(4),l.ɵɵproperty("cipher",n),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(n))("ngIfElse",r),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!i.organization&&n.organizationId),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.hasAttachments),l.ɵɵadvance(5),l.ɵɵtextInterpolate(n.subTitle),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(28,7,"exposedXTimes",l.ɵɵpipeBind1(29,10,i.exposedPasswordMap.get(n.id))),"\n ")}}function P(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",9),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵpipe(6,"number"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"table",10),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"tbody"),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,E,32,12,"tr",11),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"exposedPasswordsFound")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(5,5,"exposedPasswordsFoundDesc",l.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),l.ɵɵadvance(8),l.ɵɵproperty("ngForOf",n.ciphers)}}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",5),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,b,4,6,"app-callout",6),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,P,16,10,"ng-container",7),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.ciphers.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.ciphers.length)}}function _(e,t){}var A=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o)||this;return s.route=a,s}return i(t,e),t.prototype.ngOnInit=function(){var t=this;this.route.parent.parent.params.subscribe((function(n){return o(t,void 0,void 0,(function(){var t,r;return a(this,(function(i){switch(i.label){case 0:return t=this,[4,this.userService.getOrganization(n.organizationId)];case 1:return t.organization=i.sent(),r=this,[4,this.cipherService.getAll()];case 2:return r.manageableCiphers=i.sent(),e.prototype.ngOnInit.call(this),[2]}}))}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)},t.prototype.canManageCipher=function(e){return this.manageableCiphers.some((function(t){return t.id===e.id}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(p.AuditService),l.ɵɵdirectiveInject(l.ComponentFactoryResolver),l.ɵɵdirectiveInject(u.MessagingService),l.ɵɵdirectiveInject(d.UserService),l.ɵɵdirectiveInject(m.ActivatedRoute))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-exposed-passwords-report"]],features:[l.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["type","button",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],[4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n"),l.ɵɵelementStart(7,"p"),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n"),l.ɵɵelementStart(11,"button",1),l.ɵɵlistener("click",(function(){return t.load()})),l.ɵɵtext(12,"\n "),l.ɵɵelement(13,"i",2),l.ɵɵpipe(14,"i18n"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"span"),l.ɵɵtext(17),l.ɵɵpipe(18,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n"),l.ɵɵtemplate(21,k,6,2,"div",3),l.ɵɵtext(22,"\n"),l.ɵɵtemplate(23,_,0,0,"ng-template",null,4,l.ɵɵtemplateRefExtractor),l.ɵɵtext(25,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),l.ɵɵadvance(3),l.ɵɵproperty("disabled",t.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(14,10,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(18,12,"checkExposedPasswords")),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,f.CalloutComponent,h.NgForOf,v.IconComponent,y.StopClickDirective,g.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(s.ExposedPasswordsReportComponent);t.ExposedPasswordsReportComponent=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.password=e.password,this.lastUsedDate=e.lastUsedDate)};t.PasswordHistoryData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.id=null,this.url=null,this.size=null,this.sizeName=null,this.fileName=null,this.key=null,e&&(this.id=e.id,this.url=e.url,this.size=e.size,this.sizeName=e.sizeName)}return Object.defineProperty(e.prototype,"fileSize",{get:function(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0},enumerable:!0,configurable:!0}),e}();t.AttachmentView=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(595),a=n(81),s=n(490),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.buildDomainModel(r,t,{password:null},n),r.lastUsedDate=new Date(t.lastUsedDate)),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.PasswordHistoryView(this),{password:null},e,t)},t.prototype.toPasswordHistoryData=function(){var e=new o.PasswordHistoryData;return e.lastUsedDate=this.lastUsedDate.toISOString(),this.buildDataModel(this,e,{password:null}),e},t}(a.default);t.Password=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(210),i=function(e){this.cipher=new r.CipherRequest(e),this.collectionIds=e.collectionIds};t.CipherCreateRequest=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.cardholderName=n.getResponseProperty("CardholderName"),n.brand=n.getResponseProperty("Brand"),n.number=n.getResponseProperty("Number"),n.expMonth=n.getResponseProperty("ExpMonth"),n.expYear=n.getResponseProperty("ExpYear"),n.code=n.getResponseProperty("Code")),n}return i(t,e),t}(n(23).BaseResponse);t.CardApi=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.type=n.getResponseProperty("Type"),n.name=n.getResponseProperty("Name"),n.value=n.getResponseProperty("Value")),n}return i(t,e),t}(n(23).BaseResponse);t.FieldApi=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.title=n.getResponseProperty("Title"),n.firstName=n.getResponseProperty("FirstName"),n.middleName=n.getResponseProperty("MiddleName"),n.lastName=n.getResponseProperty("LastName"),n.address1=n.getResponseProperty("Address1"),n.address2=n.getResponseProperty("Address2"),n.address3=n.getResponseProperty("Address3"),n.city=n.getResponseProperty("City"),n.state=n.getResponseProperty("State"),n.postalCode=n.getResponseProperty("PostalCode"),n.country=n.getResponseProperty("Country"),n.company=n.getResponseProperty("Company"),n.email=n.getResponseProperty("Email"),n.phone=n.getResponseProperty("Phone"),n.ssn=n.getResponseProperty("SSN"),n.username=n.getResponseProperty("Username"),n.passportNumber=n.getResponseProperty("PassportNumber"),n.licenseNumber=n.getResponseProperty("LicenseNumber")),n}return i(t,e),t}(n(23).BaseResponse);t.IdentityApi=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(603),s=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;if(null==t)return n;n.username=n.getResponseProperty("Username"),n.password=n.getResponseProperty("Password"),n.passwordRevisionDate=n.getResponseProperty("PasswordRevisionDate"),n.totp=n.getResponseProperty("Totp");var r=n.getResponseProperty("Uris");return null!=r&&(n.uris=r.map((function(e){return new a.LoginUriApi(e)}))),n}return i(t,e),t}(o.BaseResponse);t.LoginApi=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;if(n.match=null,null==t)return n;n.uri=n.getResponseProperty("Uri");var r=n.getResponseProperty("Match");return n.match=null!=r?r:null,n}return i(t,e),t}(n(23).BaseResponse);t.LoginUriApi=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.type=n.getResponseProperty("Type")),n}return i(t,e),t}(n(23).BaseResponse);t.SecureNoteApi=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(e){this.el=e}return e.prototype.onError=function(){this.el.nativeElement.src=this.appFallbackSrc},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(r.ElementRef))},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appFallbackSrc",""]],hostBindings:function(e,t){1&e&&r.ɵɵlistener("error",(function(){return t.onError()}))},inputs:{appFallbackSrc:"appFallbackSrc"}}),e}();t.FallbackSrcDirective=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(3),n(261),n(5),n(7);var s=n(491),l=n(0),c=n(3),p=n(9),u=n(261),d=n(8),m=n(5),h=n(7),f=n(13),v=n(4),y=n(24),g=n(10);function x(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",17),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.id),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",17),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.id),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function S(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"option",18),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,b,2,2,"option",8),l.ɵɵtext(5,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.importOptions)}}function w(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),l.ɵɵelementStart(2,"a",20),l.ɵɵtext(3,"\n https://help.bitwarden.com/article/export-your-data/"),l.ɵɵelementEnd(),l.ɵɵtext(4,"\n "),l.ɵɵelementContainerEnd())}function C(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),l.ɵɵelementStart(2,"a",21),l.ɵɵtext(3,"\n https://help.bitwarden.com/article/import-from-lastpass/"),l.ɵɵelementEnd(),l.ɵɵtext(4,"\n "),l.ɵɵelementContainerEnd())}function I(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the KeePassX desktop application, navigate to "Database" → "Export to CSV file" and save the CSV\n file.\n '),l.ɵɵelementContainerEnd())}function E(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n In the Avira web vault, go to "Settings" → "My Data" → "Export data" and save the CSV file.\n '),l.ɵɵelementContainerEnd())}function P(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n In the Blur web vault, click your username at the top and go to "Settings" → "Export Data", then click\n "Export CSV"\n for your "Accounts".\n '),l.ɵɵelementContainerEnd())}function k(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the SaveInCloud desktop application, navigate to "File" → "Export" → "As XML" and save the\n XML file.\n '),l.ɵɵelementContainerEnd())}function _(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Padlock desktop application, click the hamburger icon in the top left corner and navigate to\n "Settings" →\n "Export" button and save the file "As CSV".\n '),l.ɵɵelementContainerEnd())}function A(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the KeePass 2 desktop application, navigate to "File" → "Export" and select the "KeePass XML\n (2.x)" option.\n '),l.ɵɵelementContainerEnd())}function O(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Universal Password Manager desktop application, navigate to "Database" → "Export" and save\n the CSV file.\n '),l.ɵɵelementContainerEnd())}function T(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the SaferPass browser extension, click the hamburger icon in the top left corner and navigate to\n "Settings". Click the "Export accounts" button to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function M(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Meldium web vault, navigate to "Settings". Locate the "Export data" function and click "Show me my\n data" to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function B(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Navigate to "Backup" (top right) and find the\n "Export to .csv File" option. Click "Export Now" to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function D(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1,"\n The process is exactly the same as importing from Google Chrome.\n "),l.ɵɵelementEnd())}function R(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,D,2,0,"span",9),l.ɵɵtext(3,"\n See detailed instructions on our help site at\n "),l.ɵɵelementStart(4,"a",22),l.ɵɵtext(5,"\n https://help.bitwarden.com/article/import-from-chrome/"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("ngIf","chromecsv"!==n.format)}}function V(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),l.ɵɵelementStart(2,"a",23),l.ɵɵtext(3,"\n https://bitwarden.com/help/article/import-from-firefox/"),l.ɵɵelementEnd(),l.ɵɵtext(4,".\n "),l.ɵɵelementContainerEnd())}function j(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),l.ɵɵelementStart(2,"a",24),l.ɵɵtext(3,"\n https://help.bitwarden.com/article/import-from-1password/"),l.ɵɵelementEnd(),l.ɵɵtext(4,".\n "),l.ɵɵelementContainerEnd())}function F(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Password Dragon desktop application, navigate to "File" → "Export" → "To XML". In the\n dialog that pops up select "All Rows" and check all fields. Click the "Export" button and save the XML file.\n '),l.ɵɵelementContainerEnd())}function U(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Enpass desktop application, navigate to "File" → "Export" → "As CSV". Select "OK" to the\n warning alert and save the CSV file. Note that the importer only supports files exported while Enpass is set\n to the English language, so adjust your settings accordingly.\n '),l.ɵɵelementContainerEnd())}function N(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Enpass 6 desktop application, click the menu button and navigate to "File" → "Export".\n Select the ".json" file format option and save the JSON file.\n '),l.ɵɵelementContainerEnd())}function z(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Password Safe desktop application, navigate to "File" → "Export To" → "XML format..."\n and save the XML file.\n '),l.ɵɵelementContainerEnd())}function L(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Dashlane desktop application, navigate to "File" → "Export" → "Unsecured archive\n (readable) in JSON format" and save the JSON file.\n '),l.ɵɵelementContainerEnd())}function G(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the mSecure desktop application, navigate to "File" → "Export" → "CSV File..." and save the\n CSV file.\n '),l.ɵɵelementContainerEnd())}function K(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Sticky Password desktop application, navigate to "Menu" (top right) → "Export" → "Export\n all". Select the unencrypted format XML option and save the XML file.\n '),l.ɵɵelementContainerEnd())}function q(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the True Key desktop application, click the gear icon (top right) and then navigate to "App Settings".\n Click the "Export" button, enter your password and save the CSV file.\n '),l.ɵɵelementContainerEnd())}function W(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Log into the Clipperz web application (clipperz.is/app). Click the hamburger menu icon in the top right to\n expand the navigation bar. Navigate to "Data" → "Export". Click the "download HTML+JSON" button to save\n the HTML file.\n '),l.ɵɵelementContainerEnd())}function H(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the RoboForm Editor desktop application, navigate to "RoboForm" (top left) → "Options" →\n "Account & Data" and click the "Export" button. Select all of your data, change the "Format" to "CSV\n file" and then click the "Export" button to save the CSV file. Note: RoboForm only allows you to export\n Logins. Other items will not be exported.\n '),l.ɵɵelementContainerEnd())}function $(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Log into the Passbolt web vault and navigate to the "Passwords" listing. Select all of the passwords you\n would like to export and click the "Export" button at the top of the listing. Choose the "csv (lastpass)"\n export format and click the "Export" button.\n '),l.ɵɵelementContainerEnd())}function Y(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Ascendo DataVault desktop application, navigate to "Tools" → "Export". In the dialog that\n pops up, select the "All Items (DVX, CSV)" option. Click the "Ok" button to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function Q(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Password Boss desktop application, navigate to "File" → "Export data" → "Password Boss\n JSON - not encrypted" and save the JSON file.\n '),l.ɵɵelementContainerEnd())}function J(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Log into the Zoho web vault (vault.zoho.com). Navigate to "Tools" → "Export Secrets". Select "All\n Secrets" and click the "Zoho Vault Format CSV" button. Highlight and copy the data from the textarea. Open a\n text editor like Notepad and paste the data. Save the data from the text editor as\n '),l.ɵɵelementStart(2,"code"),l.ɵɵtext(3,"zoho_export.csv"),l.ɵɵelementEnd(),l.ɵɵtext(4,".\n "),l.ɵɵelementContainerEnd())}function X(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the SplashID Safe desktop application, click on the SplashID blue lock logo in the top right corner.\n Navigate to "Export" → "Export as CSV" and save the CSV file.\n '),l.ɵɵelementContainerEnd())}function Z(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the PassKeep mobile app, navigate to "Backup/Restore". Locate the "CSV Backup/Restore" section and\n click "Backup to CSV" to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function ee(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n Make sure you have python-keyring and python-gnomekeyring installed. Save the\n "),l.ɵɵelementStart(2,"a",25),l.ɵɵtext(3,"GNOME Keyring Import/Export"),l.ɵɵelementEnd(),l.ɵɵtext(4," python\n script to your desktop as "),l.ɵɵelementStart(5,"code"),l.ɵɵtext(6,"pw_helper.py"),l.ɵɵelementEnd(),l.ɵɵtext(7,". Open terminal and run\n "),l.ɵɵelementStart(8,"code"),l.ɵɵtext(9,"chmod +rx Desktop/pw_helper.py"),l.ɵɵelementEnd(),l.ɵɵtext(10," and then\n "),l.ɵɵelementStart(11,"code"),l.ɵɵtext(12,"python Desktop/pw_helper.py export Desktop/my_passwords.json"),l.ɵɵelementEnd(),l.ɵɵtext(13,". Then upload the resulting\n "),l.ɵɵelementStart(14,"code"),l.ɵɵtext(15,"my_passwords.json"),l.ɵɵelementEnd(),l.ɵɵtext(16," file here to Bitwarden.\n "),l.ɵɵelementContainerEnd())}function te(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Using the Password Agent desktop application navigate to "File" → "Export", select the "Fields to\n export" button and check all of the fields, change the "Output format" to "CSV", and then click the "Start"\n button to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function ne(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Log into the Passpack website vault and navigate to "Settings" → "Export", then click the "Download"\n button to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function re(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open your Passman vault and click on "Settings" in the bottom left corner. In the "Settings" window switch\n to the "Export credentials" tab and choose "JSON" as the export type. Enter your vault\'s passphrase and\n click the "Export" button to save the JSON file.\n '),l.ɵɵelementContainerEnd())}function ie(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export data". Select\n the "Export" button for the "Export to CSV file" option to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function oe(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export data". Select\n the "Export" button for the "Export to JSON file" option to save the JSON file.\n '),l.ɵɵelementContainerEnd())}function ae(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the F-Secure KEY desktop application and navigate to "Settings" → "Export Passwords". Select the\n "Export" button, enter your master password, and save the FSK file.\n '),l.ɵɵelementContainerEnd())}function se(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the Kaspersky Password Manager desktop application and navigate to "Settings" → "Import/Export".\n Locate the "Export to text file" section and select the "Export" button to save the TXT file.\n '),l.ɵɵelementContainerEnd())}function le(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the RememBear desktop application and navigate to "Settings" → "Account" → "Export".\n Enter your master password and select the "Export Anyway" button to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function ce(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the PasswordWallet desktop application and navigate to "File" → "Export" →\n "Visible entries to text file". Enter your password and select the "Ok" button to save the TXT file.\n '),l.ɵɵelementContainerEnd())}function pe(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the Myki desktop browser extension and navigate to "Advanced" → "Export Accounts" and then scan\n the QR code with your mobile device. Various CSV files will then be saved to your computer\'s\n downloads folder.\n '),l.ɵɵelementContainerEnd())}function ue(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n Export your SecureSafe password safe to a CSV file with a comma delimiter.\n "),l.ɵɵelementContainerEnd())}function de(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the LogMeOnce browser extension, then navigate to "Open Menu" → "Export To" and\n select "CSV File" to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function me(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the BlackBerry Password Keeper application, then navigate to "Settings" → "Import/Export".\n Select "Export Passwords" and follow the instructions on screen to save the unencrypted CSV file.\n '),l.ɵɵelementContainerEnd())}function he(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the Buttercup desktop application and unlock your vault. Right click on your vault\'s icon and\n select "Export" to save the CSV file.\n '),l.ɵɵelementContainerEnd())}function fe(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n Open the Codebook desktop application and log in. Navigate to "File" → "Export all", then click\n "Yes" on the dialog and save the CSV file.\n '),l.ɵɵelementContainerEnd())}function ve(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n Open the newest version of the Encryptr desktop application and allow all of your data to sync.\n Once syncing of your data is complete, the download icon in the top right corner will turn pink. Click\n the download icon and save the CSV file.\n "),l.ɵɵelementContainerEnd())}function ye(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,'\n From the Yoti browser extension, click on "Settings", then "Export Saved Logins" and save the CSV file.\n '),l.ɵɵelementContainerEnd())}function ge(e,t){if(1&e&&(l.ɵɵelementStart(0,"app-callout",19),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,w,5,0,"ng-container",9),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,C,5,0,"ng-container",9),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,I,2,0,"ng-container",9),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,E,2,0,"ng-container",9),l.ɵɵtext(9,"\n "),l.ɵɵtemplate(10,P,2,0,"ng-container",9),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,k,2,0,"ng-container",9),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,_,2,0,"ng-container",9),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,A,2,0,"ng-container",9),l.ɵɵtext(17,"\n "),l.ɵɵtemplate(18,O,2,0,"ng-container",9),l.ɵɵtext(19,"\n "),l.ɵɵtemplate(20,T,2,0,"ng-container",9),l.ɵɵtext(21,"\n "),l.ɵɵtemplate(22,M,2,0,"ng-container",9),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,B,2,0,"ng-container",9),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,R,7,1,"ng-container",9),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,V,5,0,"ng-container",9),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,j,5,0,"ng-container",9),l.ɵɵtext(31,"\n "),l.ɵɵtemplate(32,F,2,0,"ng-container",9),l.ɵɵtext(33,"\n "),l.ɵɵtemplate(34,U,2,0,"ng-container",9),l.ɵɵtext(35,"\n "),l.ɵɵtemplate(36,N,2,0,"ng-container",9),l.ɵɵtext(37,"\n "),l.ɵɵtemplate(38,z,2,0,"ng-container",9),l.ɵɵtext(39,"\n "),l.ɵɵtemplate(40,L,2,0,"ng-container",9),l.ɵɵtext(41,"\n "),l.ɵɵtemplate(42,G,2,0,"ng-container",9),l.ɵɵtext(43,"\n "),l.ɵɵtemplate(44,K,2,0,"ng-container",9),l.ɵɵtext(45,"\n "),l.ɵɵtemplate(46,q,2,0,"ng-container",9),l.ɵɵtext(47,"\n "),l.ɵɵtemplate(48,W,2,0,"ng-container",9),l.ɵɵtext(49,"\n "),l.ɵɵtemplate(50,H,2,0,"ng-container",9),l.ɵɵtext(51,"\n "),l.ɵɵtemplate(52,$,2,0,"ng-container",9),l.ɵɵtext(53,"\n "),l.ɵɵtemplate(54,Y,2,0,"ng-container",9),l.ɵɵtext(55,"\n "),l.ɵɵtemplate(56,Q,2,0,"ng-container",9),l.ɵɵtext(57,"\n "),l.ɵɵtemplate(58,J,5,0,"ng-container",9),l.ɵɵtext(59,"\n "),l.ɵɵtemplate(60,X,2,0,"ng-container",9),l.ɵɵtext(61,"\n "),l.ɵɵtemplate(62,Z,2,0,"ng-container",9),l.ɵɵtext(63,"\n "),l.ɵɵtemplate(64,ee,17,0,"ng-container",9),l.ɵɵtext(65,"\n "),l.ɵɵtemplate(66,te,2,0,"ng-container",9),l.ɵɵtext(67,"\n "),l.ɵɵtemplate(68,ne,2,0,"ng-container",9),l.ɵɵtext(69,"\n "),l.ɵɵtemplate(70,re,2,0,"ng-container",9),l.ɵɵtext(71,"\n "),l.ɵɵtemplate(72,ie,2,0,"ng-container",9),l.ɵɵtext(73,"\n "),l.ɵɵtemplate(74,oe,2,0,"ng-container",9),l.ɵɵtext(75,"\n "),l.ɵɵtemplate(76,ae,2,0,"ng-container",9),l.ɵɵtext(77,"\n "),l.ɵɵtemplate(78,se,2,0,"ng-container",9),l.ɵɵtext(79,"\n "),l.ɵɵtemplate(80,le,2,0,"ng-container",9),l.ɵɵtext(81,"\n "),l.ɵɵtemplate(82,ce,2,0,"ng-container",9),l.ɵɵtext(83,"\n "),l.ɵɵtemplate(84,pe,2,0,"ng-container",9),l.ɵɵtext(85,"\n "),l.ɵɵtemplate(86,ue,2,0,"ng-container",9),l.ɵɵtext(87,"\n "),l.ɵɵtemplate(88,de,2,0,"ng-container",9),l.ɵɵtext(89,"\n "),l.ɵɵtemplate(90,me,2,0,"ng-container",9),l.ɵɵtext(91,"\n "),l.ɵɵtemplate(92,he,2,0,"ng-container",9),l.ɵɵtext(93,"\n "),l.ɵɵtemplate(94,fe,2,0,"ng-container",9),l.ɵɵtext(95,"\n "),l.ɵɵtemplate(96,ve,2,0,"ng-container",9),l.ɵɵtext(97,"\n "),l.ɵɵtemplate(98,ye,2,0,"ng-container",9),l.ɵɵtext(99,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵpropertyInterpolate("title",n.getFormatInstructionTitle()),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","bitwardencsv"===n.format||"bitwardenjson"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","lastpasscsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","keepassxcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","aviracsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","blurcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","safeincloudxml"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","padlockcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","keepass2xml"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","upmcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","saferpasscsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","meldiumcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","keepercsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","chromecsv"===n.format||"operacsv"===n.format||"vivaldicsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","firefoxcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","1password1pif"===n.format||"1passwordwincsv"===n.format||"1passwordmaccsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passworddragonxml"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","enpasscsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","enpassjson"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","pwsafexml"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","dashlanejson"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","msecurecsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","stickypasswordxml"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","truekeycsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","clipperzhtml"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","roboformcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passboltcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","ascendocsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passwordbossjson"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","zohovaultcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","splashidcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passkeepcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","gnomejson"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passwordagentcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passpackcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passmanjson"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","avastcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","avastjson"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","fsecurefsk"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","kasperskytxt"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","remembearcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","passwordwallettxt"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","mykicsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","securesafecsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","logmeoncecsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","blackberrycsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","buttercupcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","codebookcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","encryptrcsv"===n.format),l.ɵɵadvance(2),l.ɵɵproperty("ngIf","yoticsv"===n.format)}}var xe=function(e){function t(t,n,r,i,o,a,s){var l=e.call(this,t,n,r,i,a)||this;return l.route=o,l.userService=s,l}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t,n=this;return a(this,(function(r){switch(r.label){case 0:return this.route.parent.parent.params.subscribe((function(t){return o(n,void 0,void 0,(function(){return a(this,(function(n){return this.organizationId=t.organizationId,this.successNavigate=["organizations",this.organizationId,"vault"],e.prototype.ngOnInit.call(this),[2]}))}))})),[4,this.userService.getOrganization(this.organizationId)];case 1:return t=r.sent(),this.organizationName=t.name,[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("importWarning",this.organizationName),this.i18nService.t("warning"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:return t.sent()?(e.prototype.submit.call(this),[2]):[2]}}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.I18nService),l.ɵɵdirectiveInject(p.ToasterService),l.ɵɵdirectiveInject(u.ImportService),l.ɵɵdirectiveInject(d.Router),l.ɵɵdirectiveInject(d.ActivatedRoute),l.ɵɵdirectiveInject(m.PlatformUtilsService),l.ɵɵdirectiveInject(h.UserService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-org-import"]],features:[l.ɵɵInheritDefinitionFeature],decls:67,vars:24,consts:[[1,"page-header"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[4,"ngIf"],["type","info",3,"title",4,"ngIf"],["for","file"],["type","file","id","file","name","file",1,"form-control-file"],["for","fileContents"],["id","fileContents","name","FileContents",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[3,"ngValue"],["value","-","disabled",""],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/export-your-data/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/import-from-firefox/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n"),l.ɵɵelementStart(7,"form",1,2),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"div",3),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"div",4),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"div",5),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"label",6),l.ɵɵtext(17),l.ɵɵpipe(18,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"select",7),l.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),l.ɵɵtext(21,"\n "),l.ɵɵtemplate(22,x,2,2,"option",8),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,S,6,1,"ng-container",9),l.ɵɵtext(25,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,ge,100,50,"app-callout",10),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"div",3),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"div",4),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"div",5),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"label",11),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelement(42,"input",12),l.ɵɵtext(43,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"div",5),l.ɵɵtext(48,"\n "),l.ɵɵelementStart(49,"label",13),l.ɵɵtext(50),l.ɵɵpipe(51,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(52,"\n "),l.ɵɵelementStart(53,"textarea",14),l.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(55,"\n "),l.ɵɵelementStart(56,"button",15),l.ɵɵtext(57,"\n "),l.ɵɵelement(58,"i",16),l.ɵɵpipe(59,"i18n"),l.ɵɵtext(60,"\n "),l.ɵɵelementStart(61,"span"),l.ɵɵtext(62),l.ɵɵpipe(63,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(64,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(65,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(66,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,12,"importData")),l.ɵɵadvance(14),l.ɵɵtextInterpolate1("1. ",l.ɵɵpipeBind1(18,14,"selectFormat"),""),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.format),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",t.featuredImportOptions),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),l.ɵɵadvance(6),l.ɵɵproperty("ngIf",t.format),l.ɵɵadvance(9),l.ɵɵtextInterpolate1("2. ",l.ɵɵpipeBind1(40,16,"selectImportFile"),""),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(51,18,"orCopyPasteFileContents")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.fileContents),l.ɵɵadvance(3),l.ɵɵproperty("disabled",t.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(59,20,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(63,22,"importData")))},directives:[f.NgControlStatusGroup,f.NgForm,f.SelectControlValueAccessor,f.RequiredValidator,f.NgControlStatus,f.NgModel,v.NgForOf,v.NgIf,f.DefaultValueAccessor,f.NgSelectOption,f.ɵangular_packages_forms_forms_x,y.CalloutComponent],pipes:[g.I18nPipe],encapsulation:2}),t}(s.ImportComponent);t.ImportComponent=xe},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(19),n(14),n(7);var s=n(493),l=n(0),c=n(19),p=n(14),u=n(7),d=n(8),m=n(4),h=n(24),f=n(107),v=n(37),y=n(53),g=n(10);function x(e,t){1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",8),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"goodNews")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(3,4,"noInactive2fa"),"\n "))}function w(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",18),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"shared")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",19),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"attachments")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"attachments")))}function I(e,t){if(1&e&&(l.ɵɵelementStart(0,"a",20),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext().$implicit,r=l.ɵɵnextContext(3);l.ɵɵpropertyInterpolate("href",r.cipherDocs.get(n.id),l.ɵɵsanitizeUrl),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,2,"instructions"),"")}}function E(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",12),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"app-vault-icon",13),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td",14),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"a",15),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(3).selectCipher(e)})),l.ɵɵpipe(10,"i18n"),l.ɵɵtext(11),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵtemplate(13,w,9,6,"ng-container",1),l.ɵɵtext(14,"\n "),l.ɵɵtemplate(15,C,9,6,"ng-container",1),l.ɵɵtext(16,"\n "),l.ɵɵelement(17,"br"),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"small"),l.ɵɵtext(20),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"td",16),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,I,3,4,"a",17),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=l.ɵɵnextContext(3);l.ɵɵadvance(4),l.ɵɵproperty("cipher",r),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(10,7,"editItem")),l.ɵɵadvance(2),l.ɵɵtextInterpolate(r.name),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!i.organization&&r.organizationId),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.hasAttachments),l.ɵɵadvance(5),l.ɵɵtextInterpolate(r.subTitle),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",i.cipherDocs.has(r.id))}}function P(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",9),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵpipe(6,"number"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"table",10),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"tbody"),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,E,28,9,"tr",11),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"inactive2faFound")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(5,5,"inactive2faFoundDesc",l.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),l.ɵɵadvance(8),l.ɵɵproperty("ngForOf",n.ciphers)}}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",6),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,S,4,6,"app-callout",7),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,P,16,10,"ng-container",1),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.ciphers.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.ciphers.length)}}function _(e,t){}var A=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.route=o,a}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(n){return this.route.parent.parent.params.subscribe((function(n){return o(t,void 0,void 0,(function(){var t;return a(this,(function(r){switch(r.label){case 0:return t=this,[4,this.userService.getOrganization(n.organizationId)];case 1:return t.organization=r.sent(),[4,e.prototype.ngOnInit.call(this)];case 2:return r.sent(),[2]}}))}))})),[2]}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(l.ComponentFactoryResolver),l.ɵɵdirectiveInject(p.MessagingService),l.ɵɵdirectiveInject(u.UserService),l.ɵɵdirectiveInject(d.ActivatedRoute))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-inactive-two-factor-report"]],features:[l.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"text-right"],["class","badge badge-primary","target","_blank","rel","noopener",3,"href",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵtemplate(5,x,9,6,"small",1),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementStart(9,"p"),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n"),l.ɵɵtemplate(13,b,9,6,"div",1),l.ɵɵtext(14,"\n"),l.ɵɵtemplate(15,k,6,2,"div",2),l.ɵɵtext(16,"\n"),l.ɵɵtemplate(17,_,0,0,"ng-template",null,3,l.ɵɵtemplateRefExtractor),l.ɵɵtext(19,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,5,"inactive2faReport"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,f.IconComponent,v.StopClickDirective,y.StopPropDirective],pipes:[g.I18nPipe,m.DecimalPipe],encapsulation:2}),t}(s.InactiveTwoFactorReportComponent);t.InactiveTwoFactorReportComponent=A},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(19),n(14),n(7);var s=n(494),l=n(0),c=n(19),p=n(14),u=n(7),d=n(8),m=n(4),h=n(24),f=n(107),v=n(37),y=n(53),g=n(10);function x(e,t){1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",8),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"goodNews")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(3,4,"noReusedPasswords"),"\n "))}function w(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"a",19),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(3).selectCipher(e)})),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext().$implicit;l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"editItem")),l.ɵɵadvance(2),l.ɵɵtextInterpolate(r.name)}}function C(e,t){if(1&e&&(l.ɵɵtext(0,"\n "),l.ɵɵelementStart(1,"span"),l.ɵɵtext(2),l.ɵɵelementEnd(),l.ɵɵtext(3,"\n ")),2&e){var n=l.ɵɵnextContext().$implicit;l.ɵɵadvance(2),l.ɵɵtextInterpolate(n.name)}}function I(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",20),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"shared")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",21),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"attachments")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",12),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"app-vault-icon",13),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td",14),l.ɵɵtext(8,"\n "),l.ɵɵtemplate(9,w,6,4,"ng-container",15),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,C,4,1,"ng-template",null,16,l.ɵɵtemplateRefExtractor),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,I,9,6,"ng-container",1),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,E,9,6,"ng-container",1),l.ɵɵtext(17,"\n "),l.ɵɵelement(18,"br"),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"small"),l.ɵɵtext(21),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementStart(24,"td",17),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"span",18),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit,r=l.ɵɵreference(12),i=l.ɵɵnextContext(3);l.ɵɵadvance(4),l.ɵɵproperty("cipher",n),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(n))("ngIfElse",r),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!i.organization&&n.organizationId),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.hasAttachments),l.ɵɵadvance(5),l.ɵɵtextInterpolate(n.subTitle),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(28,7,"reusedXTimes",i.passwordUseMap.get(n.login.password)),"\n ")}}function k(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",9),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵpipe(6,"number"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"table",10),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"tbody"),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,P,31,10,"tr",11),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"reusedPasswordsFound")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(5,5,"reusedPasswordsFoundDesc",l.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),l.ɵɵadvance(8),l.ɵɵproperty("ngForOf",n.ciphers)}}function _(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",6),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,S,4,6,"app-callout",7),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,k,16,10,"ng-container",1),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.ciphers.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.ciphers.length)}}function A(e,t){}var O=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.route=o,a}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(n){return this.route.parent.parent.params.subscribe((function(n){return o(t,void 0,void 0,(function(){var t,r;return a(this,(function(i){switch(i.label){case 0:return t=this,[4,this.userService.getOrganization(n.organizationId)];case 1:return t.organization=i.sent(),r=this,[4,this.cipherService.getAll()];case 2:return r.manageableCiphers=i.sent(),[4,e.prototype.ngOnInit.call(this)];case 3:return i.sent(),[2]}}))}))})),[2]}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)},t.prototype.canManageCipher=function(e){return this.manageableCiphers.some((function(t){return t.id===e.id}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(l.ComponentFactoryResolver),l.ɵɵdirectiveInject(p.MessagingService),l.ɵɵdirectiveInject(u.UserService),l.ɵɵdirectiveInject(d.ActivatedRoute))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-reused-passwords-report"]],features:[l.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵtemplate(5,x,9,6,"small",1),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementStart(9,"p"),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n"),l.ɵɵtemplate(13,b,9,6,"div",1),l.ɵɵtext(14,"\n"),l.ɵɵtemplate(15,_,6,2,"div",2),l.ɵɵtext(16,"\n"),l.ɵɵtemplate(17,A,0,0,"ng-template",null,3,l.ɵɵtemplateRefExtractor),l.ɵɵtext(19,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,5,"reusedPasswordsReport"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,f.IconComponent,v.StopClickDirective,y.StopPropDirective],pipes:[g.I18nPipe,m.DecimalPipe],encapsulation:2}),t}(s.ReusedPasswordsReportComponent);t.ReusedPasswordsReportComponent=O},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(14),n(7);var o=n(0),a=n(8),s=n(7),l=n(14),c=n(4),p=n(37),u=n(10);function d(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",2),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function m(e,t){1&e&&(o.ɵɵelementStart(0,"div",9),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",10),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",11),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"a",12),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"a",13),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"tools")),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,5,"importData"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(14,7,"exportVault"),"\n "))}function h(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",23),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(3).upgradeOrganization()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function f(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",15),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementStart(5,"div",16),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,h,3,3,"a",17),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",11),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"a",18),o.ɵɵtext(14),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"a",19),o.ɵɵtext(18),o.ɵɵpipe(19,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"a",20),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"a",21),o.ɵɵtext(26),o.ɵɵpipe(27,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"a",22),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,7,"reports"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!n.accessReports),o.ɵɵadvance(7),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(15,9,"exposedPasswordsReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(19,11,"reusedPasswordsReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(23,13,"weakPasswordsReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(27,15,"unsecuredWebsitesReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(31,17,"inactive2faReport"),"\n ")}}function v(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",4),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",5),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,m,17,9,"div",6),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,f,34,19,"div",7),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",8),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"router-outlet"),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementContainerEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(6),o.ɵɵproperty("ngIf",n.organization.canAccessImportExport),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.organization.canAccessReports)}}var y=function(){function e(e,t,n){this.route=e,this.userService=t,this.messagingService=n,this.accessReports=!1,this.loading=!0}return e.prototype.ngOnInit=function(){var e=this;this.route.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this,[4,this.userService.getOrganization(t.organizationId)];case 1:return e.organization=n.sent(),this.accessReports=this.organization.useTotp,this.loading=!1,[2]}}))}))}))},e.prototype.upgradeOrganization=function(){this.messagingService.send("upgradeOrganization",{organizationId:this.organization.id})},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.ActivatedRoute),o.ɵɵdirectiveInject(s.UserService),o.ɵɵdirectiveInject(l.MessagingService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-org-tools"]],decls:7,vars:2,consts:[[1,"container","page-content"],[4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"row"],[1,"col-3"],["class","card mb-4",4,"ngIf"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card","mb-4"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","import","routerLinkActive","active",1,"list-group-item"],["routerLink","export","routerLinkActive","active",1,"list-group-item"],[1,"card"],[1,"card-header","d-flex"],[1,"ml-auto"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],["routerLink","exposed-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","reused-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","weak-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","unsecured-websites-report","routerLinkActive","active",1,"list-group-item"],["routerLink","inactive-two-factor-report","routerLinkActive","active",1,"list-group-item"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,d,9,6,"ng-container",1),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,v,17,2,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n")),2&e&&(o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading))},directives:[c.NgIf,a.RouterOutlet,a.RouterLinkWithHref,a.RouterLinkActive,p.StopClickDirective],pipes:[u.I18nPipe],encapsulation:2}),e}();t.ToolsComponent=y},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(19),n(14),n(7);var s=n(495),l=n(0),c=n(19),p=n(14),u=n(7),d=n(8),m=n(4),h=n(24),f=n(107),v=n(37),y=n(53),g=n(10);function x(e,t){1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",8),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"goodNews")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(3,4,"noUnsecuredWebsites"),"\n "))}function w(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"shared")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",17),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"attachments")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"attachments")))}function I(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",12),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"app-vault-icon",13),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td",14),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"a",15),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(3).selectCipher(e)})),l.ɵɵpipe(10,"i18n"),l.ɵɵtext(11),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵtemplate(13,w,9,6,"ng-container",1),l.ɵɵtext(14,"\n "),l.ɵɵtemplate(15,C,9,6,"ng-container",1),l.ɵɵtext(16,"\n "),l.ɵɵelement(17,"br"),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"small"),l.ɵɵtext(20),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=l.ɵɵnextContext(3);l.ɵɵadvance(4),l.ɵɵproperty("cipher",r),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(10,6,"editItem")),l.ɵɵadvance(2),l.ɵɵtextInterpolate(r.name),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!i.organization&&r.organizationId),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.hasAttachments),l.ɵɵadvance(5),l.ɵɵtextInterpolate(r.subTitle)}}function E(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",9),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵpipe(6,"number"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"table",10),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"tbody"),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,I,23,8,"tr",11),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"unsecuredWebsitesFound")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(5,5,"unsecuredWebsitesFoundDesc",l.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),l.ɵɵadvance(8),l.ɵɵproperty("ngForOf",n.ciphers)}}function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",6),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,S,4,6,"app-callout",7),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,E,16,10,"ng-container",1),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.ciphers.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.ciphers.length)}}function k(e,t){}var _=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.route=o,a}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(n){return this.route.parent.parent.params.subscribe((function(n){return o(t,void 0,void 0,(function(){var t;return a(this,(function(r){switch(r.label){case 0:return t=this,[4,this.userService.getOrganization(n.organizationId)];case 1:return t.organization=r.sent(),[4,e.prototype.ngOnInit.call(this)];case 2:return r.sent(),[2]}}))}))})),[2]}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(l.ComponentFactoryResolver),l.ɵɵdirectiveInject(p.MessagingService),l.ɵɵdirectiveInject(u.UserService),l.ɵɵdirectiveInject(d.ActivatedRoute))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-unsecured-websites-report"]],features:[l.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵtemplate(5,x,9,6,"small",1),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementStart(9,"p"),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n"),l.ɵɵtemplate(13,b,9,6,"div",1),l.ɵɵtext(14,"\n"),l.ɵɵtemplate(15,P,6,2,"div",2),l.ɵɵtext(16,"\n"),l.ɵɵtemplate(17,k,0,0,"ng-template",null,3,l.ɵɵtemplateRefExtractor),l.ɵɵtext(19,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,5,"unsecuredWebsitesReport"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,7,"unsecuredWebsitesReportDesc")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,f.IconComponent,v.StopClickDirective,y.StopPropDirective],pipes:[g.I18nPipe,m.DecimalPipe],encapsulation:2}),t}(s.UnsecuredWebsitesReportComponent);t.UnsecuredWebsitesReportComponent=_},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(19),n(14),n(36),n(7);var s=n(496),l=n(0),c=n(19),p=n(36),u=n(14),d=n(7),m=n(8),h=n(4),f=n(24),v=n(107),y=n(37),g=n(53),x=n(10);function b(e,t){1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",4),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",8),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2),l.ɵɵpipe(3,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"goodNews")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(3,4,"noWeakPasswords"),"\n "))}function C(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"a",18),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(3).selectCipher(e)})),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext().$implicit;l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"editItem")),l.ɵɵadvance(2),l.ɵɵtextInterpolate(r.name)}}function I(e,t){if(1&e&&(l.ɵɵtext(0,"\n "),l.ɵɵelementStart(1,"span"),l.ɵɵtext(2),l.ɵɵelementEnd(),l.ɵɵtext(3,"\n ")),2&e){var n=l.ɵɵnextContext().$implicit;l.ɵɵadvance(2),l.ɵɵtextInterpolate(n.name)}}function E(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",19),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"shared")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"shared")))}function P(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",20),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",5),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementContainerEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"attachments")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"attachments")))}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",12),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"app-vault-icon",13),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td",14),l.ɵɵtext(8,"\n "),l.ɵɵtemplate(9,C,6,4,"ng-container",15),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,I,4,1,"ng-template",null,16,l.ɵɵtemplateRefExtractor),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,E,9,6,"ng-container",1),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,P,9,6,"ng-container",1),l.ɵɵtext(17,"\n "),l.ɵɵelement(18,"br"),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"small"),l.ɵɵtext(21),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementStart(24,"td",17),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"span"),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit,r=l.ɵɵreference(12),i=l.ɵɵnextContext(3);l.ɵɵadvance(4),l.ɵɵproperty("cipher",n),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(n))("ngIfElse",r),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!i.organization&&n.organizationId),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.hasAttachments),l.ɵɵadvance(5),l.ɵɵtextInterpolate(n.subTitle),l.ɵɵadvance(5),l.ɵɵclassMapInterpolate1("badge badge-",i.passwordStrengthMap.get(n.id)[1],""),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(28,10,i.passwordStrengthMap.get(n.id)[0]),"\n ")}}function _(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",9),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵpipe(6,"number"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"table",10),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"tbody"),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,k,31,12,"tr",11),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"weakPasswordsFound")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(5,5,"weakPasswordsFoundDesc",l.ɵɵpipeBind1(6,8,n.ciphers.length)),"\n "),l.ɵɵadvance(8),l.ɵɵproperty("ngForOf",n.ciphers)}}function A(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",6),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,w,4,6,"app-callout",7),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,_,16,10,"ng-container",1),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.ciphers.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.ciphers.length)}}function O(e,t){}var T=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o)||this;return s.route=a,s}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(n){return this.route.parent.parent.params.subscribe((function(n){return o(t,void 0,void 0,(function(){var t,r;return a(this,(function(i){switch(i.label){case 0:return t=this,[4,this.userService.getOrganization(n.organizationId)];case 1:return t.organization=i.sent(),r=this,[4,this.cipherService.getAll()];case 2:return r.manageableCiphers=i.sent(),[4,e.prototype.ngOnInit.call(this)];case 3:return i.sent(),[2]}}))}))})),[2]}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)},t.prototype.canManageCipher=function(e){return this.manageableCiphers.some((function(t){return t.id===e.id}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(p.PasswordGenerationService),l.ɵɵdirectiveInject(l.ComponentFactoryResolver),l.ɵɵdirectiveInject(u.MessagingService),l.ɵɵdirectiveInject(d.UserService),l.ɵɵdirectiveInject(m.ActivatedRoute))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-weak-passwords-report"]],features:[l.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵtemplate(5,b,9,6,"small",1),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n"),l.ɵɵelementStart(9,"p"),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n"),l.ɵɵtemplate(13,S,9,6,"div",1),l.ɵɵtext(14,"\n"),l.ɵɵtemplate(15,A,6,2,"div",2),l.ɵɵtext(16,"\n"),l.ɵɵtemplate(17,O,0,0,"ng-template",null,3,l.ɵɵtemplateRefExtractor),l.ɵɵtext(19,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,5,"weakPasswordsReport"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,f.CalloutComponent,h.NgForOf,v.IconComponent,y.StopClickDirective,g.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(s.WeakPasswordsReportComponent);t.WeakPasswordsReportComponent=T},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(3),n(14),n(5),n(61),n(7),n(112),n(84)),s=n(467),l=n(481),c=n(613),p=n(505),u=n(622),d=n(507),m=n(0),h=n(8),f=n(7),v=n(61),y=n(3),g=n(14),x=n(112),b=n(5),S=n(507),w=n(16),C=n(4),I=n(508),E=n(505),P=n(24),k=n(10),_=["attachments"],A=["cipherAddEdit"],O=["collections"],T=["eventsTemplate"];function M(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",18),m.ɵɵpipe(3,"i18n"),m.ɵɵtext(4,"\n "),m.ɵɵelementStart(5,"span",19),m.ɵɵtext(6),m.ɵɵpipe(7,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementContainerEnd()),2&e&&(m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(3,2,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(7,4,"loading")))}function B(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",20),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext().addCipher()})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",21),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("",m.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function D(e,t){if(1&e&&(m.ɵɵelementStart(0,"app-callout",22),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){var n=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",n.trashCleanupWarning,"\n ")}}function R(e,t){}function V(e,t){}function j(e,t){}function F(e,t){}var U=function(){function e(e,t,n,r,i,o,a,s,l,c,p){this.route=e,this.userService=t,this.router=n,this.changeDetectorRef=r,this.syncService=i,this.i18nService=o,this.componentFactoryResolver=a,this.messagingService=s,this.broadcasterService=l,this.ngZone=c,this.platformUtilsService=p,this.collectionId=null,this.type=null,this.deleted=!1,this.trashCleanupWarning=null,this.modal=null}return e.prototype.ngOnInit=function(){var e=this;this.trashCleanupWarning=this.i18nService.t(this.platformUtilsService.isSelfHost()?"trashCleanupWarningSelfHosted":"trashCleanupWarning");var t=this.route.parent.params.subscribe((function(n){return r(e,void 0,void 0,(function(){var e,o,a=this;return i(this,(function(s){switch(s.label){case 0:return e=this,[4,this.userService.getOrganization(n.organizationId)];case 1:return e.organization=s.sent(),this.groupingsComponent.organization=this.organization,this.ciphersComponent.organization=this.organization,o=this.route.queryParams.subscribe((function(e){return r(a,void 0,void 0,(function(){var t,n,a=this;return i(this,(function(s){switch(s.label){case 0:return this.ciphersComponent.searchText=this.groupingsComponent.searchText=e.search,this.organization.canManageAllCollections?[3,2]:[4,this.syncService.fullSync(!1)];case 1:s.sent(),this.broadcasterService.subscribe("OrgVaultComponent",(function(e){a.ngZone.run((function(){return r(a,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:switch(e.command){case"syncCompleted":return[3,1]}return[3,4];case 1:return e.successfully?[4,Promise.all([this.groupingsComponent.load(),this.ciphersComponent.refresh()])]:[3,3];case 2:t.sent(),this.changeDetectorRef.detectChanges(),t.label=3;case 3:return[3,4];case 4:return[2]}}))}))}))})),s.label=2;case 2:return[4,this.groupingsComponent.load()];case 3:return s.sent(),null!=e?[3,5]:(this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()]);case 4:return s.sent(),[3,13];case 5:return e.deleted?(this.groupingsComponent.selectedTrash=!0,[4,this.filterDeleted(!0)]):[3,7];case 6:return s.sent(),[3,13];case 7:return e.type?(t=parseInt(e.type,null),this.groupingsComponent.selectedType=t,[4,this.filterCipherType(t,!0)]):[3,9];case 8:return s.sent(),[3,13];case 9:return e.collectionId?(this.groupingsComponent.selectedCollectionId=e.collectionId,[4,this.filterCollection(e.collectionId,!0)]):[3,11];case 10:return s.sent(),[3,13];case 11:return this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()];case 12:s.sent(),s.label=13;case 13:return null!=e.viewEvents&&(n=this.ciphersComponent.ciphers.filter((function(t){return t.id===e.viewEvents}))).length>0&&this.viewEvents(n[0]),null!=o&&o.unsubscribe(),[2]}}))}))})),null!=t&&t.unsubscribe(),[2]}}))}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe("OrgVaultComponent")},e.prototype.clearGroupingFilters=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),[4,this.ciphersComponent.applyFilter()];case 1:return e.sent(),this.clearFilters(),this.go(),[2]}}))}))},e.prototype.filterCipherType=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType"),n=function(t){return t.type===e},t?[4,this.ciphersComponent.reload(n)]:[3,2];case 1:return r.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(n)];case 3:r.sent(),r.label=4;case 4:return this.clearFilters(),this.type=e,this.go(),[2]}}))}))},e.prototype.filterCollection=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection"),n=function(t){return"unassigned"===e?null==t.collectionIds||0===t.collectionIds.length:null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1},t?[4,this.ciphersComponent.reload(n)]:[3,2];case 1:return r.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(n)];case 3:r.sent(),r.label=4;case 4:return this.clearFilters(),this.collectionId=e,this.go(),[2]}}))}))},e.prototype.filterDeleted=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),e?[4,this.ciphersComponent.reload(null,!0)]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(null)];case 3:t.sent(),t.label=4;case 4:return this.clearFilters(),this.deleted=!0,this.go(),[2]}}))}))},e.prototype.filterSearchText=function(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)},e.prototype.editCipherAttachments=function(e){var t=this;if(null!=this.organization.maxStorageGb&&0!==this.organization.maxStorageGb){null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.attachmentsModalRef.createComponent(n).instance;var o=this.modal.show(c.AttachmentsComponent,this.attachmentsModalRef);o.organization=this.organization,o.cipherId=e.id;var s=!1;o.onUploadedAttachment.subscribe((function(){return s=!0})),o.onDeletedAttachment.subscribe((function(){return s=!0})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal=null,s?[4,this.ciphersComponent.refresh()]:[3,2];case 1:e.sent(),e.label=2;case 2:return s=!1,[2]}}))}))}))}else this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId})},e.prototype.editCipherCollections=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.collectionsModalRef.createComponent(n).instance;var o=this.modal.show(u.CollectionsComponent,this.collectionsModalRef);this.organization.canManageAllCollections&&(o.collectionIds=e.collectionIds,o.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),o.organization=this.organization,o.cipherId=e.id,o.onSavedCollections.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.addCipher=function(){var e=this.editCipher(null);e.organizationId=this.organization.id,e.type=this.type,this.organization.canManageAllCollections&&(e.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),null!=this.collectionId&&(e.collectionIds=[this.collectionId])},e.prototype.editCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.cipherAddEditModalRef.createComponent(n).instance;var o=this.modal.show(l.AddEditComponent,this.cipherAddEditModalRef);return o.organization=this.organization,o.cipherId=null==e?null:e.id,o.onSavedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onDeletedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onRestoredCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){t.modal=null})),o},e.prototype.cloneCipher=function(e){var t=this.editCipher(e);t.cloneMode=!0,t.organizationId=this.organization.id,this.organization.canManageAllCollections&&(t.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),t.collectionIds=e.collectionIds},e.prototype.viewEvents=function(e){return r(this,void 0,void 0,(function(){var t,n,r=this;return i(this,(function(i){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.eventsModalRef.createComponent(t).instance,(n=this.modal.show(s.EntityEventsComponent,this.eventsModalRef)).name=e.name,n.organizationId=this.organization.id,n.entityId=e.id,n.showUser=!0,n.entity="cipher",this.modal.onClosed.subscribe((function(){r.modal=null})),[2]}))}))},e.prototype.clearFilters=function(){this.collectionId=null,this.type=null,this.deleted=!1},e.prototype.go=function(e){void 0===e&&(e=null),null==e&&(e={type:this.type,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})},e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(h.ActivatedRoute),m.ɵɵdirectiveInject(f.UserService),m.ɵɵdirectiveInject(h.Router),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(v.SyncService),m.ɵɵdirectiveInject(y.I18nService),m.ɵɵdirectiveInject(m.ComponentFactoryResolver),m.ɵɵdirectiveInject(g.MessagingService),m.ɵɵdirectiveInject(x.BroadcasterService),m.ɵɵdirectiveInject(m.NgZone),m.ɵɵdirectiveInject(b.PlatformUtilsService))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["app-org-vault"]],viewQuery:function(e,t){var n;(1&e&&(m.ɵɵstaticViewQuery(d.GroupingsComponent,!0),m.ɵɵstaticViewQuery(p.CiphersComponent,!0),m.ɵɵstaticViewQuery(_,!0,o.ViewContainerRef),m.ɵɵstaticViewQuery(A,!0,o.ViewContainerRef),m.ɵɵstaticViewQuery(O,!0,o.ViewContainerRef),m.ɵɵstaticViewQuery(T,!0,o.ViewContainerRef)),2&e)&&(m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.groupingsComponent=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.ciphersComponent=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.attachmentsModalRef=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.collectionsModalRef=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.eventsModalRef=n.first))},decls:53,vars:14,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[3,"showFolders","showFavorites","showTrash","onAllClicked","onCipherTypeClicked","onCollectionClicked","onSearchTextChanged","onTrashClicked"],[1,"col-9"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","modal","deleted","organization"],["type","button","class","btn btn-outline-primary btn-sm ml-auto",3,"click",4,"ngIf"],["type","warning","icon","fa-warning",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onCollectionsClicked","onEventsClicked","onCloneClicked"],["attachments",""],["cipherAddEdit",""],["collections",""],["eventsTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","ml-auto",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["type","warning","icon","fa-warning"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"div",2),m.ɵɵtext(5,"\n "),m.ɵɵelementStart(6,"app-org-vault-groupings",3),m.ɵɵlistener("onAllClicked",(function(){return t.clearGroupingFilters()}))("onCipherTypeClicked",(function(e){return t.filterCipherType(e)}))("onCollectionClicked",(function(e){return t.filterCollection(e.id)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)}))("onTrashClicked",(function(){return t.filterDeleted()})),m.ɵɵtext(7,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(9,"\n "),m.ɵɵelementStart(10,"div",4),m.ɵɵtext(11,"\n "),m.ɵɵelementStart(12,"div",5),m.ɵɵtext(13,"\n "),m.ɵɵelementStart(14,"h1"),m.ɵɵtext(15),m.ɵɵpipe(16,"i18n"),m.ɵɵelementStart(17,"small",6,7),m.ɵɵtext(19,"\n "),m.ɵɵtemplate(20,M,9,6,"ng-container",8),m.ɵɵtext(21,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(22,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(23,"\n "),m.ɵɵelementStart(24,"div",9),m.ɵɵtext(25,"\n "),m.ɵɵelementStart(26,"app-vault-bulk-actions",10),m.ɵɵtext(27,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(28,"\n "),m.ɵɵtemplate(29,B,5,3,"button",11),m.ɵɵtext(30,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(31,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(32,"\n "),m.ɵɵtemplate(33,D,2,1,"app-callout",12),m.ɵɵtext(34,"\n "),m.ɵɵelementStart(35,"app-org-vault-ciphers",13),m.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onEventsClicked",(function(e){return t.viewEvents(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)})),m.ɵɵtext(36,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(37,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(38,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(39,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(40,"\n"),m.ɵɵtemplate(41,R,0,0,"ng-template",null,14,m.ɵɵtemplateRefExtractor),m.ɵɵtext(43,"\n"),m.ɵɵtemplate(44,V,0,0,"ng-template",null,15,m.ɵɵtemplateRefExtractor),m.ɵɵtext(46,"\n"),m.ɵɵtemplate(47,j,0,0,"ng-template",null,16,m.ɵɵtemplateRefExtractor),m.ɵɵtext(49,"\n"),m.ɵɵtemplate(50,F,0,0,"ng-template",null,17,m.ɵɵtemplateRefExtractor),m.ɵɵtext(52,"\n")),2&e){var n=m.ɵɵreference(18);m.ɵɵadvance(6),m.ɵɵproperty("showFolders",!1)("showFavorites",!1)("showTrash",!0),m.ɵɵadvance(9),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(16,12,"vault"),"\n "),m.ɵɵadvance(2),m.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",n.loading),m.ɵɵadvance(6),m.ɵɵproperty("ciphersComponent",t.ciphersComponent)("modal",t.modal)("deleted",t.deleted)("organization",t.organization),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",!t.deleted),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",t.deleted)}},directives:[S.GroupingsComponent,w.ApiActionDirective,C.NgIf,I.BulkActionsComponent,E.CiphersComponent,P.CalloutComponent],pipes:[k.I18nPipe],encapsulation:2}),e}();t.VaultComponent=U},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(6),n(19),n(18),n(3),n(5),n(7);var s=n(158),l=n(190),c=n(497),p=n(0),u=n(19),d=n(3),m=n(18),h=n(7),f=n(5),v=n(6),y=n(13),g=n(16),x=n(4),b=n(17),S=n(37),w=n(10);function C(e,t){if(1&e&&(p.ɵɵelementStart(0,"small"),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.cipher.name)}}function I(e,t){1&e&&p.ɵɵelement(0,"i",24)}function E(e,t){1&e&&p.ɵɵelement(0,"i",25)}function P(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",26),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"a",27),p.ɵɵtext(3,"\n "),p.ɵɵelement(4,"i",28),p.ɵɵpipe(5,"i18n"),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"span",29),p.ɵɵtext(8),p.ɵɵpipe(9,"i18n"),p.ɵɵelementEnd(),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"button",30,31),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit;return p.ɵɵnextContext(2).reupload(e)})),p.ɵɵtext(13),p.ɵɵpipe(14,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(12),i=p.ɵɵnextContext().$implicit,o=p.ɵɵnextContext(2);p.ɵɵadvance(4),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(5,5,"attachmentFixDesc")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(9,7,"attachmentFixDesc")),p.ɵɵadvance(3),p.ɵɵproperty("appApiAction",o.reuploadPromises[i.id])("disabled",r.loading),p.ɵɵadvance(2),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(14,9,"fix"))}}function k(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"td",32),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"button",33,34),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=p.ɵɵnextContext().$implicit;return p.ɵɵnextContext(2).delete(e)})),p.ɵɵpipe(4,"i18n"),p.ɵɵtext(5,"\n "),p.ɵɵelement(6,"i",35),p.ɵɵtext(7,"\n "),p.ɵɵelement(8,"i",36),p.ɵɵpipe(9,"i18n"),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(11,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵreference(3),i=p.ɵɵnextContext().$implicit,o=p.ɵɵnextContext(2);p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(4,6,"delete")),p.ɵɵproperty("appApiAction",o.deletePromises[i.id])("disabled",r.loading),p.ɵɵadvance(4),p.ɵɵproperty("hidden",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(9,8,"loading")),p.ɵɵproperty("hidden",!r.loading)}}function _(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"td",16),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,I,1,0,"i",17),p.ɵɵtext(5,"\n "),p.ɵɵtemplate(6,E,1,0,"i",18),p.ɵɵtext(7,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"td",19),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"div",20),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"a",21),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(n);var e=t.$implicit;return p.ɵɵnextContext(2).download(e)})),p.ɵɵtext(14),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵtemplate(16,P,16,11,"div",22),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"small"),p.ɵɵtext(20),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵtemplate(23,k,12,10,"td",23),p.ɵɵtext(24,"\n "),p.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=p.ɵɵnextContext(2);p.ɵɵadvance(4),p.ɵɵproperty("ngIf",!r.downloading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.downloading),p.ɵɵadvance(8),p.ɵɵtextInterpolate(r.fileName),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",i.showFixOldAttachments(r)),p.ɵɵadvance(4),p.ɵɵtextInterpolate(r.sizeName),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!i.viewOnly)}}function A(e,t){if(1&e&&(p.ɵɵelementStart(0,"table",14),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"tbody"),p.ɵɵtext(3,"\n "),p.ɵɵtemplate(4,_,25,6,"tr",15),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(4),p.ɵɵproperty("ngForOf",n.cipher.attachments)}}function O(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h3"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"label",37),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelement(10,"input",38),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"small",39),p.ɵɵtext(13),p.ɵɵpipe(14,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,3,"newAttachment")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,5,"file")),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(14,7,"maxFileSize")))}function T(e,t){if(1&e&&(p.ɵɵelementStart(0,"button",40),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",41),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span"),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e){p.ɵɵnextContext();var n=p.ɵɵreference(5);p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,3,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,5,"save"))}}var M=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o,a)||this;return s.viewOnly=!1,s}return i(t,e),t.prototype.reupload=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return this.organization.canManageAllCollections&&this.showFixOldAttachments(t)?[4,e.prototype.reuploadCipherAttachment.call(this,t,!0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},t.prototype.loadCipher=function(){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return this.organization.canManageAllCollections?[3,2]:[4,e.prototype.loadCipher.call(this)];case 1:return[2,n.sent()];case 2:return[4,this.apiService.getCipherAdmin(this.cipherId)];case 3:return t=n.sent(),[2,new l.Cipher(new s.CipherData(t))]}}))}))},t.prototype.saveCipherAttachment=function(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e,this.organization.canManageAllCollections)},t.prototype.deleteCipherAttachment=function(t){return this.organization.canManageAllCollections?this.apiService.deleteCipherAttachmentAdmin(this.cipherId,t):e.prototype.deleteCipherAttachment.call(this,t)},t.prototype.showFixOldAttachments=function(e){return null==e.key&&this.organization.canManageAllCollections},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.CryptoService),p.ɵɵdirectiveInject(h.UserService),p.ɵɵdirectiveInject(f.PlatformUtilsService),p.ɵɵdirectiveInject(v.ApiService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-attachments"]],features:[p.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","fa fa-fw fa-lg fa-file-o","aria-hidden","true",4,"ngIf"],["class","fa fa-spinner fa-lg fa-fw fa-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"fa","fa-fw","fa-lg","fa-file-o"],["aria-hidden","true",1,"fa","fa-spinner","fa-lg","fa-fw","fa-spin"],[1,"ml-2"],["href","https://help.bitwarden.com/article/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵtemplate(12,C,2,1,"small",6),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"button",7),p.ɵɵpipe(16,"i18n"),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"span",8),p.ɵɵtext(19,"×"),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"div",9),p.ɵɵtext(24,"\n "),p.ɵɵtemplate(25,A,7,1,"table",10),p.ɵɵtext(26,"\n "),p.ɵɵtemplate(27,O,16,9,"div",6),p.ɵɵtext(28,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(29,"\n "),p.ɵɵelementStart(30,"div",11),p.ɵɵtext(31,"\n "),p.ɵɵtemplate(32,T,9,7,"button",12),p.ɵɵtext(33,"\n "),p.ɵɵelementStart(34,"button",13),p.ɵɵtext(35),p.ɵɵpipe(36,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(37,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(38,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(39,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(40,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(41,"\n")),2&e&&(p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(11,8,"attachments"),"\n "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.cipher),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(16,10,"close")),p.ɵɵadvance(10),p.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.viewOnly),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",!t.viewOnly),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(36,12,"close")))},directives:[y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.NgIf,b.A11yTitleDirective,x.NgForOf,S.StopClickDirective],pipes:[w.I18nPipe],encapsulation:2}),t}(c.AttachmentsComponent);t.AttachmentsComponent=M},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(6),n(19),n(18),n(3),n(5),n(7),n(882)),s=n(0),l=n(19),c=n(3),p=n(18),u=n(7),d=n(5),m=n(6),h=function(){function e(e,t,n,r,i,a,s){this.cipherService=e,this.i18nService=t,this.cryptoService=n,this.userService=r,this.platformUtilsService=i,this.apiService=a,this.win=s,this.onUploadedAttachment=new o.EventEmitter,this.onDeletedAttachment=new o.EventEmitter,this.onReuploadedAttachment=new o.EventEmitter,this.deletePromises={},this.reuploadPromises={},this.emergencyAccessId=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.init()];case 1:return e.sent(),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:if(!this.hasUpdatedKey)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("updateKey")),[2];if(e=document.getElementById("file"),null==(t=e.files)||0===t.length)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),[2];if(t[0].size>524288e3)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize")),[2];i.label=1;case 1:return i.trys.push([1,4,,5]),this.formPromise=this.saveCipherAttachment(t[0]),n=this,[4,this.formPromise];case 2:return n.cipherDomain=i.sent(),r=this,[4,this.cipherDomain.decrypt()];case 3:return r.cipher=i.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onUploadedAttachment.emit(),[3,5];case 4:return i.sent(),[3,5];case 5:return e.type="",e.type="file",e.value="",[2]}}))}))},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return null!=this.deletePromises[e.id]?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteAttachmentConfirmation"),this.i18nService.t("deleteAttachment"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!n.sent())return[2];n.label=2;case 2:return n.trys.push([2,4,,5]),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),[4,this.deletePromises[e.id]];case 3:return n.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedAttachment")),(t=this.cipher.attachments.indexOf(e))>-1&&this.cipher.attachments.splice(t,1),[3,5];case 4:return n.sent(),[3,5];case 5:return this.deletePromises[e.id]=null,this.onDeletedAttachment.emit(),[2]}}))}))},e.prototype.download=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,s,l,c,p,u;return i(this,(function(i){switch(i.label){case 0:if((t=e).downloading)return[2];if(!this.canAccessAttachments)return this.platformUtilsService.showToast("error",this.i18nService.t("premiumRequired"),this.i18nService.t("premiumRequiredDesc")),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.apiService.getAttachmentData(this.cipher.id,e.id,this.emergencyAccessId)];case 2:return r=i.sent(),n=r.url,[3,4];case 3:if(!((o=i.sent())instanceof a.ErrorResponse&&404===o.statusCode))throw o instanceof a.ErrorResponse?new Error(o.getSingleMessage()):o;return n=e.url,[3,4];case 4:return t.downloading=!0,[4,fetch(new Request(n,{cache:"no-store"}))];case 5:if(200!==(s=i.sent()).status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),t.downloading=!1,[2];i.label=6;case 6:return i.trys.push([6,12,,13]),[4,s.arrayBuffer()];case 7:return l=i.sent(),null==e.key?[3,8]:(p=e.key,[3,10]);case 8:return[4,this.cryptoService.getOrgKey(this.cipher.organizationId)];case 9:p=i.sent(),i.label=10;case 10:return c=p,[4,this.cryptoService.decryptFromBytes(l,c)];case 11:return u=i.sent(),this.platformUtilsService.saveFile(this.win,u,null,e.fileName),[3,13];case 12:return i.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,13];case 13:return t.downloading=!1,[2]}}))}))},e.prototype.init=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this,[4,this.loadCipher()];case 1:return e.cipherDomain=i.sent(),t=this,[4,this.cipherDomain.decrypt()];case 2:return t.cipher=i.sent(),n=this,[4,this.cryptoService.hasEncKey()];case 3:return n.hasUpdatedKey=i.sent(),[4,this.userService.canAccessPremium()];case 4:return r=i.sent(),this.canAccessAttachments=r||null!=this.cipher.organizationId,this.canAccessAttachments?[3,6]:[4,this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"))];case 5:return i.sent()&&this.platformUtilsService.launchUri("https://vault.bitwarden.com/#/?premium=purchase"),[3,8];case 6:return this.hasUpdatedKey?[3,8]:[4,this.platformUtilsService.showDialog(this.i18nService.t("updateKey"),this.i18nService.t("featureUnavailable"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"),"warning")];case 7:i.sent()&&this.platformUtilsService.launchUri("https://help.bitwarden.com/article/update-encryption-key/"),i.label=8;case 8:return[2]}}))}))},e.prototype.reuploadCipherAttachment=function(e,t){return r(this,void 0,void 0,(function(){var n,o=this;return i(this,(function(a){switch(a.label){case 0:if(n=e,null!=e.key||n.downloading||null!=this.reuploadPromises[e.id])return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),this.reuploadPromises[e.id]=Promise.resolve().then((function(){return r(o,void 0,void 0,(function(){var r,o,a,s,l,c,p,u,d;return i(this,(function(i){switch(i.label){case 0:return n.downloading=!0,[4,fetch(new Request(e.url,{cache:"no-store"}))];case 1:if(200!==(r=i.sent()).status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),n.downloading=!1,[2];i.label=2;case 2:return i.trys.push([2,11,,12]),[4,r.arrayBuffer()];case 3:return o=i.sent(),null==e.key?[3,4]:(s=e.key,[3,6]);case 4:return[4,this.cryptoService.getOrgKey(this.cipher.organizationId)];case 5:s=i.sent(),i.label=6;case 6:return a=s,[4,this.cryptoService.decryptFromBytes(o,a)];case 7:return l=i.sent(),c=this,[4,this.cipherService.saveAttachmentRawWithServer(this.cipherDomain,e.fileName,l,t)];case 8:return c.cipherDomain=i.sent(),p=this,[4,this.cipherDomain.decrypt()];case 9:return p.cipher=i.sent(),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),[4,this.deletePromises[e.id]];case 10:return i.sent(),(u=this.cipher.attachments.filter((function(t){return t.id===e.id}))).length>0&&(d=this.cipher.attachments.indexOf(u[0]))>-1&&this.cipher.attachments.splice(d,1),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onReuploadedAttachment.emit(),[3,12];case 11:return i.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,12];case 12:return n.downloading=!1,[2]}}))}))})),[4,this.reuploadPromises[e.id]];case 2:return a.sent(),[3,4];case 3:return a.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.saveCipherAttachment=function(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e)},e.prototype.deleteCipherAttachment=function(e){return this.cipherService.deleteAttachmentWithServer(this.cipher.id,e)},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.UserService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(m.ApiService),s.ɵɵdirectiveInject(Window))},e.ɵdir=s.ɵɵdefineDirective({type:e,inputs:{cipherId:"cipherId"},outputs:{onUploadedAttachment:"onUploadedAttachment",onDeletedAttachment:"onDeletedAttachment",onReuploadedAttachment:"onReuploadedAttachment"}}),e}();t.AttachmentsComponent=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.domains=n.getResponseProperty("Domains"),n.excluded=n.getResponseProperty("Excluded"),n}return i(t,e),t}(n(23).BaseResponse);t.GlobalDomainResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.accessToken=t.access_token,n.expiresIn=t.expires_in,n.refreshToken=t.refresh_token,n.tokenType=t.token_type,n.resetMasterPassword=n.getResponseProperty("ResetMasterPassword"),n.privateKey=n.getResponseProperty("PrivateKey"),n.key=n.getResponseProperty("Key"),n.twoFactorToken=n.getResponseProperty("TwoFactorToken"),n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n}return i(t,e),t}(n(23).BaseResponse);t.IdentityTokenResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;n.twoFactorProviders2=new Map,n.twoFactorProviders=n.getResponseProperty("TwoFactorProviders");var r=n.getResponseProperty("TwoFactorProviders2");if(null!=r)for(var i in r)r.hasOwnProperty(i)&&n.twoFactorProviders2.set(parseInt(i,null),r[i]);return n}return i(t,e),t}(n(23).BaseResponse);t.IdentityTwoFactorResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){var r=e.call(this,t)||this,i=r.getResponseProperty("Data");return r.data=null==i?[]:i.map((function(e){return new n(e)})),r.continuationToken=r.getResponseProperty("ContinuationToken"),r}return i(t,e),t}(n(23).BaseResponse);t.ListResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(468),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.usePolicies=n.getResponseProperty("UsePolicies"),n.useGroups=n.getResponseProperty("UseGroups"),n.useDirectory=n.getResponseProperty("UseDirectory"),n.useEvents=n.getResponseProperty("UseEvents"),n.useTotp=n.getResponseProperty("UseTotp"),n.use2fa=n.getResponseProperty("Use2fa"),n.useApi=n.getResponseProperty("UseApi"),n.useBusinessPortal=n.getResponseProperty("UseBusinessPortal"),n.useSso=n.getResponseProperty("UseSso"),n.selfHost=n.getResponseProperty("SelfHost"),n.usersGetPremium=n.getResponseProperty("UsersGetPremium"),n.seats=n.getResponseProperty("Seats"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.key=n.getResponseProperty("Key"),n.status=n.getResponseProperty("Status"),n.type=n.getResponseProperty("Type"),n.enabled=n.getResponseProperty("Enabled"),n.ssoBound=n.getResponseProperty("SsoBound"),n.identifier=n.getResponseProperty("Identifier"),n.permissions=new a.PermissionsApi(n.getResponseProperty("permissions")),n.resetPasswordKey=n.getResponseProperty("ResetPasswordKey"),n.userId=n.getResponseProperty("UserId"),n}return i(t,e),t}(o.BaseResponse);t.ProfileOrganizationResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(262),s=n(499),l=n(500),c=n(501),p=n(621),u=n(293),d=n(502),m=function(e){function t(t){var n=e.call(this,t)||this;n.folders=[],n.collections=[],n.ciphers=[],n.policies=[],n.sends=[];var r=n.getResponseProperty("Profile");null!=r&&(n.profile=new u.ProfileResponse(r));var i=n.getResponseProperty("Folders");null!=i&&(n.folders=i.map((function(e){return new c.FolderResponse(e)})));var o=n.getResponseProperty("Collections");null!=o&&(n.collections=o.map((function(e){return new s.CollectionDetailsResponse(e)})));var m=n.getResponseProperty("Ciphers");null!=m&&(n.ciphers=m.map((function(e){return new a.CipherResponse(e)})));var h=n.getResponseProperty("Domains");null!=h&&(n.domains=new l.DomainsResponse(h));var f=n.getResponseProperty("Policies");null!=f&&(n.policies=f.map((function(e){return new p.PolicyResponse(e)})));var v=n.getResponseProperty("Sends");return null!=v&&(n.sends=v.map((function(e){return new d.SendResponse(e)}))),n}return i(t,e),t}(o.BaseResponse);t.SyncResponse=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.organizationId=n.getResponseProperty("OrganizationId"),n.type=n.getResponseProperty("Type"),n.data=n.getResponseProperty("Data"),n.enabled=n.getResponseProperty("Enabled"),n}return i(t,e),t}(n(23).BaseResponse);t.PolicyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(6),n(19),n(40),n(3),n(5);var s=n(158),l=n(190),c=n(623),p=n(506),u=n(0),d=n(40),m=n(5),h=n(3),f=n(19),v=n(6),y=n(13),g=n(16),x=n(4),b=n(17),S=n(53),w=n(10);function C(e,t){if(1&e&&(u.ɵɵelementStart(0,"small"),u.ɵɵtext(1),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(1),u.ɵɵtextInterpolate(n.cipher.name)}}function I(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",17),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"button",18),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().selectAll(!0)})),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"button",18),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().selectAll(!1)})),u.ɵɵtext(7),u.ɵɵpipe(8,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,2,"selectAll"),"\n "),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function E(e,t){1&e&&(u.ɵɵelementStart(0,"div"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function P(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"tr",21),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(2).check(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"td",22),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"input",23),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),t.$implicit.checked=e})),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"td"),u.ɵɵtext(8),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;u.ɵɵadvance(4),u.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),u.ɵɵproperty("ngModel",r.checked),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("\n ",r.name,"\n ")}}function k(e,t){if(1&e&&(u.ɵɵelementStart(0,"table",19),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"tbody"),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,P,10,3,"tr",20),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(4),u.ɵɵproperty("ngForOf",n.collections)}}var _=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.apiService=o,a.allowSelectNone=!0,a}return i(t,e),t.prototype.loadCipher=function(){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return this.organization.canManageAllCollections?[3,2]:[4,e.prototype.loadCipher.call(this)];case 1:return[2,n.sent()];case 2:return[4,this.apiService.getCipherAdmin(this.cipherId)];case 3:return t=n.sent(),[2,new l.Cipher(new s.CipherData(t))]}}))}))},t.prototype.loadCipherCollections=function(){return this.organization.canManageAllCollections?this.collectionIds:e.prototype.loadCipherCollections.call(this)},t.prototype.loadCollections=function(){return this.organization.canManageAllCollections?Promise.resolve(this.collections):e.prototype.loadCollections.call(this)},t.prototype.saveCollections=function(){if(this.organization.canManageAllCollections){var t=new c.CipherCollectionsRequest(this.cipherDomain.collectionIds);return this.apiService.putCipherCollectionsAdmin(this.cipherId,t)}return e.prototype.saveCollections.call(this)},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.CollectionService),u.ɵɵdirectiveInject(m.PlatformUtilsService),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(f.CipherService),u.ɵɵdirectiveInject(v.ApiService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-collections"]],features:[u.ɵɵInheritDefinitionFeature],decls:63,vars:27,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","collectionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"form",2,3),u.ɵɵlistener("ngSubmit",(function(){return t.submit()})),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"div",4),u.ɵɵtext(8,"\n "),u.ɵɵelementStart(9,"h2",5),u.ɵɵtext(10),u.ɵɵpipe(11,"i18n"),u.ɵɵtemplate(12,C,2,1,"small",6),u.ɵɵtext(13,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelementStart(15,"button",7),u.ɵɵpipe(16,"i18n"),u.ɵɵtext(17,"\n "),u.ɵɵelementStart(18,"span",8),u.ɵɵtext(19,"×"),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"div",9),u.ɵɵtext(24,"\n "),u.ɵɵelementStart(25,"p"),u.ɵɵtext(26),u.ɵɵpipe(27,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"div",10),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"h3"),u.ɵɵtext(32),u.ɵɵpipe(33,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(34,"\n "),u.ɵɵtemplate(35,I,10,6,"div",11),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵtemplate(38,E,3,3,"div",6),u.ɵɵtext(39,"\n "),u.ɵɵtemplate(40,k,7,1,"table",12),u.ɵɵtext(41,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(42,"\n "),u.ɵɵelementStart(43,"div",13),u.ɵɵtext(44,"\n "),u.ɵɵelementStart(45,"button",14),u.ɵɵtext(46,"\n "),u.ɵɵelement(47,"i",15),u.ɵɵpipe(48,"i18n"),u.ɵɵtext(49,"\n "),u.ɵɵelementStart(50,"span"),u.ɵɵtext(51),u.ɵɵpipe(52,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(53,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(54,"\n "),u.ɵɵelementStart(55,"button",16),u.ɵɵtext(56),u.ɵɵpipe(57,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(58,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(59,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(60,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(61,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(62,"\n")),2&e){var n=u.ɵɵreference(5);u.ɵɵadvance(4),u.ɵɵproperty("appApiAction",t.formPromise),u.ɵɵadvance(6),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(11,13,"collections"),"\n "),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.cipher),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(16,15,"close")),u.ɵɵadvance(11),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(27,17,"collectionsDesc")),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(33,19,"collections")),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",t.collections&&t.collections.length),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",!t.collections||!t.collections.length),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.collections&&t.collections.length),u.ɵɵadvance(5),u.ɵɵproperty("disabled",n.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(48,21,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(52,23,"save")),u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(57,25,"cancel"))}},directives:[y.ɵangular_packages_forms_forms_y,y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.NgIf,b.A11yTitleDirective,x.NgForOf,y.CheckboxControlValueAccessor,S.StopPropDirective,y.NgControlStatus,y.NgModel],pipes:[w.I18nPipe],encapsulation:2}),t}(p.CollectionsComponent);t.CollectionsComponent=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.collectionIds=null==e?[]:e};t.CipherCollectionsRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(19),n(3),n(295),n(625)),s=n(0),l=n(19),c=n(9),p=n(3),u=n(6),d=n(13),m=n(16),h=n(17),f=n(10),v=function(){function e(e,t,n,r){this.cipherService=e,this.toasterService=t,this.i18nService=n,this.apiService=r,this.cipherIds=[],this.permanent=!1,this.onDeleted=new o.EventEmitter}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.organization&&this.organization.canManageAllCollections?[3,2]:[4,this.deleteCiphers()];case 1:return e.sent(),[3,4];case 2:return[4,this.deleteCiphersAdmin()];case 3:e.sent(),e.label=4;case 4:return[4,this.formPromise];case 5:return e.sent(),this.onDeleted.emit(),this.toasterService.popAsync("success",null,this.i18nService.t(this.permanent?"permanentlyDeletedItems":"deletedItems")),[2]}}))}))},e.prototype.deleteCiphers=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.permanent?(e=this,[4,this.cipherService.deleteManyWithServer(this.cipherIds)]):[3,2];case 1:return e.formPromise=n.sent(),[3,4];case 2:return t=this,[4,this.cipherService.softDeleteManyWithServer(this.cipherIds)];case 3:t.formPromise=n.sent(),n.label=4;case 4:return[2]}}))}))},e.prototype.deleteCiphersAdmin=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e=new a.CipherBulkDeleteRequest(this.cipherIds,this.organization.id),this.permanent?(t=this,[4,this.apiService.deleteManyCiphersAdmin(e)]):[3,2];case 1:return t.formPromise=r.sent(),[3,4];case 2:return n=this,[4,this.apiService.putDeleteManyCiphersAdmin(e)];case 3:n.formPromise=r.sent(),r.label=4;case 4:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.ToasterService),s.ɵɵdirectiveInject(p.I18nService),s.ɵɵdirectiveInject(u.ApiService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-vault-bulk-delete"]],inputs:{cipherIds:"cipherIds",permanent:"permanent",organization:"organization"},outputs:{onDeleted:"onDeleted"},decls:45,vars:21,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","deleteSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["appAutoFocus","","type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"button",6),s.ɵɵpipe(14,"i18n"),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"span",7),s.ɵɵtext(17,"×"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"div",8),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"div",9),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"button",10),s.ɵɵtext(28,"\n "),s.ɵɵelement(29,"i",11),s.ɵɵpipe(30,"i18n"),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"span"),s.ɵɵtext(33),s.ɵɵpipe(34,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"button",12),s.ɵɵtext(38),s.ɵɵpipe(39,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n")),2&e){var n=s.ɵɵreference(5);s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(11,8,t.permanent?"permanentlyDeleteSelected":"deleteSelected"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(14,10,"close")),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(23,12,t.permanent?"permanentlyDeleteSelectedItemsDesc":"deleteSelectedItemsDesc",t.cipherIds.length),"\n "),s.ɵɵadvance(5),s.ɵɵproperty("disabled",n.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(30,15,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(34,17,t.permanent?"permanentlyDelete":"delete")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(39,19,"cancel"))}},directives:[d.ɵangular_packages_forms_forms_y,d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.A11yTitleDirective],pipes:[f.I18nPipe],encapsulation:2}),e}();t.BulkDeleteComponent=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.ids=null==e?[]:e,this.organizationId=t};t.CipherBulkDeleteRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(19),n(48),n(3),n(0)),s=n(19),l=n(9),c=n(3),p=n(48),u=n(13),d=n(16),m=n(17),h=n(4),f=n(10);function v(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",17),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵproperty("ngValue",n.id),a.ɵɵadvance(1),a.ɵɵtextInterpolate(n.name)}}var y=function(){function e(e,t,n,r){this.cipherService=e,this.toasterService=t,this.i18nService=n,this.folderService=r,this.cipherIds=[],this.onMoved=new o.EventEmitter,this.folderId=null,this.folders=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.folderService.getAllDecrypted()];case 1:return e.folders=t.sent(),this.folderId=this.folders[0].id,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.formPromise=this.cipherService.moveManyWithServer(this.cipherIds,this.folderId),[4,this.formPromise];case 1:return e.sent(),this.onMoved.emit(),this.toasterService.popAsync("success",null,this.i18nService.t("movedItems")),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.ToasterService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.FolderService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-vault-bulk-move"]],inputs:{cipherIds:"cipherIds"},outputs:{onMoved:"onMoved"},decls:60,vars:26,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","moveSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","moveSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[3,"ngValue"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p"),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"div",9),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"label",10),a.ɵɵtext(30),a.ɵɵpipe(31,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"select",11),a.ɵɵlistener("ngModelChange",(function(e){return t.folderId=e})),a.ɵɵtext(34,"\n "),a.ɵɵtemplate(35,v,2,2,"option",12),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"div",13),a.ɵɵtext(41,"\n "),a.ɵɵelementStart(42,"button",14),a.ɵɵtext(43,"\n "),a.ɵɵelement(44,"i",15),a.ɵɵpipe(45,"i18n"),a.ɵɵtext(46,"\n "),a.ɵɵelementStart(47,"span"),a.ɵɵtext(48),a.ɵɵpipe(49,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n "),a.ɵɵelementStart(52,"button",16),a.ɵɵtext(53),a.ɵɵpipe(54,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,11,"moveSelected"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,13,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(25,15,"moveSelectedItemsDesc",t.cipherIds.length)),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(31,18,"folder")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.folderId),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",t.folders),a.ɵɵadvance(7),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(45,20,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(49,22,"save")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(54,24,"cancel"))}},directives:[u.ɵangular_packages_forms_forms_y,u.NgControlStatusGroup,u.NgForm,d.ApiActionDirective,m.A11yTitleDirective,u.SelectControlValueAccessor,u.NgControlStatus,u.NgModel,h.NgForOf,u.NgSelectOption,u.ɵangular_packages_forms_forms_x],pipes:[f.I18nPipe],encapsulation:2}),e}();t.BulkMoveComponent=y},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(19),n(3),n(0)),s=n(19),l=n(9),c=n(3),p=n(13),u=n(16),d=n(17),m=n(10),h=function(){function e(e,t,n){this.cipherService=e,this.toasterService=t,this.i18nService=n,this.cipherIds=[],this.onRestored=new o.EventEmitter}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.formPromise=this.cipherService.restoreManyWithServer(this.cipherIds),[4,this.formPromise];case 1:return e.sent(),this.onRestored.emit(),this.toasterService.popAsync("success",null,this.i18nService.t("restoredItems")),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.ToasterService),a.ɵɵdirectiveInject(c.I18nService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-vault-bulk-restore"]],inputs:{cipherIds:"cipherIds"},outputs:{onRestored:"onRestored"},decls:45,vars:21,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","restoreSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","restoreSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["appAutoFocus","","type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"div",9),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"button",10),a.ɵɵtext(28,"\n "),a.ɵɵelement(29,"i",11),a.ɵɵpipe(30,"i18n"),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"span"),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementStart(37,"button",12),a.ɵɵtext(38),a.ɵɵpipe(39,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,8,"restoreSelected"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,10,"close")),a.ɵɵadvance(9),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(23,12,"restoreSelectedItemsDesc",t.cipherIds.length),"\n "),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(30,15,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,17,"restore")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(39,19,"cancel"))}},directives:[p.ɵangular_packages_forms_forms_y,p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,d.A11yTitleDirective],pipes:[m.I18nPipe],encapsulation:2}),e}();t.BulkRestoreComponent=h},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(19),n(40),n(3),n(7),n(0)),s=n(19),l=n(9),c=n(3),p=n(40),u=n(7),d=n(13),m=n(16),h=n(17),f=n(4),v=n(53),y=n(10);function g(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",21),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵproperty("ngValue",n.id),a.ɵɵadvance(1),a.ɵɵtextInterpolate(n.name)}}function x(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",22),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"button",23),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().selectAll(!0)})),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"button",23),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().selectAll(!1)})),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,2,"selectAll"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function b(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function S(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr",26),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=t.$implicit;return a.ɵɵnextContext(2).check(e)})),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",27),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"input",28),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),t.$implicit.checked=e})),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td"),a.ɵɵtext(8),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;a.ɵɵadvance(4),a.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),a.ɵɵproperty("ngModel",r.checked),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",r.name,"\n ")}}function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"table",24),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,S,10,3,"tr",25),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",n.collections)}}var C=function(e){return{loading:e}},I=function(){function e(e,t,n,r,i){this.cipherService=e,this.toasterService=t,this.i18nService=n,this.collectionService=r,this.userService=i,this.ciphers=[],this.onShared=new o.EventEmitter,this.nonShareableCount=0,this.collections=[],this.organizations=[],this.shareableCiphers=[],this.writeableCollections=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.shareableCiphers=this.ciphers.filter((function(e){return!e.hasOldAttachments&&null==e.organizationId})),this.nonShareableCount=this.ciphers.length-this.shareableCiphers.length,[4,this.collectionService.getAllDecrypted()];case 1:return e=n.sent(),this.writeableCollections=e.filter((function(e){return!e.readOnly})),t=this,[4,this.userService.getAllOrganizations()];case 2:return t.organizations=n.sent(),null==this.organizationId&&this.organizations.length>0&&(this.organizationId=this.organizations[0].id),this.filterCollections(),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.selectAll(!1)},e.prototype.filterCollections=function(){var e=this;this.selectAll(!1),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((function(t){return t.organizationId===e.organizationId}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:e=this.collections.filter((function(e){return e.checked})).map((function(e){return e.id})),t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.cipherService.shareManyWithServer(this.shareableCiphers,this.organizationId,e),[4,this.formPromise];case 2:return t.sent(),this.onShared.emit(),this.toasterService.popAsync("success",null,this.i18nService.t("sharedItems")),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t},e.prototype.selectAll=function(e){var t=this;(e?this.collections:this.writeableCollections).forEach((function(n){return t.check(n,e)}))},Object.defineProperty(e.prototype,"canSave",{get:function(){if(null!=this.shareableCiphers&&this.shareableCiphers.length>0&&null!=this.collections)for(var e=0;e<this.collections.length;e++)if(this.collections[e].checked)return!0;return!1},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.ToasterService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.CollectionService),a.ɵɵdirectiveInject(u.UserService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-vault-bulk-share"]],inputs:{ciphers:"ciphers",organizationId:"organizationId"},outputs:{onShared:"onShared"},decls:77,vars:40,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","shareSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","shareSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","organization"],["id","organization","name","OrganizationId",1,"form-control",3,"ngModel","ngModelChange","change"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],[4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit","manual",3,"disabled","ngClass"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[3,"ngValue"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p"),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"p"),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",9),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"label",10),a.ɵɵtext(34),a.ɵɵpipe(35,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementStart(37,"select",11),a.ɵɵlistener("ngModelChange",(function(e){return t.organizationId=e}))("change",(function(){return t.filterCollections()})),a.ɵɵtext(38,"\n "),a.ɵɵtemplate(39,g,2,2,"option",12),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"div",13),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"h3"),a.ɵɵtext(46),a.ɵɵpipe(47,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵtemplate(49,x,10,6,"div",14),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n "),a.ɵɵtemplate(52,b,3,3,"div",15),a.ɵɵtext(53,"\n "),a.ɵɵtemplate(54,w,7,1,"table",16),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n "),a.ɵɵelementStart(57,"div",17),a.ɵɵtext(58,"\n "),a.ɵɵelementStart(59,"button",18),a.ɵɵtext(60,"\n "),a.ɵɵelement(61,"i",19),a.ɵɵpipe(62,"i18n"),a.ɵɵtext(63,"\n "),a.ɵɵelementStart(64,"span"),a.ɵɵtext(65),a.ɵɵpipe(66,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(68,"\n "),a.ɵɵelementStart(69,"button",20),a.ɵɵtext(70),a.ɵɵpipe(71,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(72,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(73,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(74,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(75,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(76,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,17,"shareSelected"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,19,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,21,"shareManyDesc")),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind4(29,23,"shareSelectedItemsCountDesc",t.ciphers.length,t.shareableCiphers.length,t.nonShareableCount),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(35,28,"organization")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",t.organizations),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(47,30,"collections")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.collections&&t.collections.length),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.collections||!t.collections.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.collections&&t.collections.length),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading||!t.canSave)("ngClass",a.ɵɵpureFunction1(38,C,n.loading)),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(62,32,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(66,34,"save")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(71,36,"cancel"))}},directives:[d.ɵangular_packages_forms_forms_y,d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.A11yTitleDirective,d.SelectControlValueAccessor,d.NgControlStatus,d.NgModel,f.NgForOf,f.NgIf,f.NgClass,d.NgSelectOption,d.ɵangular_packages_forms_forms_x,d.CheckboxControlValueAccessor,v.StopPropDirective],pipes:[y.I18nPipe],encapsulation:2}),e}();t.BulkShareComponent=I},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(18),n(104),n(3),n(5);var o=n(30),a=n(889),s=n(160),l=n(891),c=n(211),p=n(0),u=n(3),d=n(104),m=n(6),h=n(5),f=n(8),v=n(18),y=n(13),g=n(16),x=n(4),b=n(24),S=n(45),w=n(65),C=n(10);function I(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",16),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"p"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind2(4,1,"sendCreatorIdentifier",n.creatorIdentifier))}}function E(e,t){1&e&&(p.ɵɵelementStart(0,"div",17),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"app-callout",18),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4),p.ɵɵpipe(5,"i18n"),p.ɵɵelementStart(6,"a",19),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,".\n "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,3,"warning")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(5,5,"viewSendHiddenEmailWarning")," \n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,7,"learnMore")))}function P(e,t){1&e&&(p.ɵɵelementStart(0,"div",20),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",21),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",22),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function k(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"div",23),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"p"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"p"),p.ɵɵtext(7),p.ɵɵpipe(8,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"div",24),p.ɵɵtext(11,"\n "),p.ɵɵelementStart(12,"label",25),p.ɵɵtext(13),p.ɵɵpipe(14,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"input",26),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext().password=e})),p.ɵɵelementEnd(),p.ɵɵtext(17,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n "),p.ɵɵelementStart(19,"div",27),p.ɵɵtext(20,"\n "),p.ɵɵelementStart(21,"button",28),p.ɵɵtext(22,"\n "),p.ɵɵelementStart(23,"span"),p.ɵɵtext(24,"\n "),p.ɵɵelement(25,"i",29),p.ɵɵtext(26),p.ɵɵpipe(27,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(28,"\n "),p.ɵɵelement(29,"i",30),p.ɵɵpipe(30,"i18n"),p.ɵɵtext(31,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(),i=p.ɵɵreference(1);p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,7,"sendProtectedPassword")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(8,9,"sendProtectedPasswordDontKnow")),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(14,11,"password")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",r.password),p.ɵɵadvance(5),p.ɵɵproperty("disabled",i.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(27,13,"continue"),"\n "),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(30,15,"loading"))}}function _(e,t){1&e&&(p.ɵɵelementStart(0,"div",23),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"sendAccessUnavailable"),"\n "))}function A(e,t){1&e&&(p.ɵɵelementStart(0,"div",23),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(2,1,"unexpectedError"),"\n "))}function O(e,t){1&e&&(p.ɵɵelementStart(0,"app-callout",38),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(2,1,"sendHiddenByDefault")))}var T=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}};function M(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",36),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(3).toggleText()})),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",39),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(3);p.ɵɵadvance(2),p.ɵɵproperty("ngClass",p.ɵɵpureFunction2(4,T,!r.showText,r.showText)),p.ɵɵadvance(1),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(4,2,"toggleVisibility"),"\n ")}}function B(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵtemplate(2,O,3,3,"app-callout",33),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"div",24),p.ɵɵtext(5,"\n "),p.ɵɵelementStart(6,"textarea",34),p.ɵɵlistener("ngModelChange",(function(e){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).sendText=e})),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵtemplate(9,M,5,7,"button",35),p.ɵɵtext(10,"\n "),p.ɵɵelementStart(11,"button",36),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(2).copyText()})),p.ɵɵtext(12,"\n "),p.ɵɵelement(13,"i",37),p.ɵɵtext(14),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementContainerEnd()}if(2&e){var r=p.ɵɵnextContext(2);p.ɵɵadvance(2),p.ɵɵproperty("ngIf",r.send.text.hidden),p.ɵɵadvance(4),p.ɵɵproperty("ngModel",r.sendText),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",r.send.text.hidden),p.ɵɵadvance(5),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(15,4,"copyValue"),"\n ")}}function D(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",42),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext(3).download()})),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",43),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext(3);p.ɵɵadvance(3),p.ɵɵtextInterpolate2("\n ",p.ɵɵpipeBind1(4,2,"downloadFile")," (",r.send.file.sizeName,")")}}function R(e,t){1&e&&(p.ɵɵelementStart(0,"button",44),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",30),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,1,"loading")))}function V(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"p"),p.ɵɵtext(3),p.ɵɵelementEnd(),p.ɵɵtext(4,"\n "),p.ɵɵtemplate(5,D,5,4,"button",40),p.ɵɵtext(6,"\n "),p.ɵɵtemplate(7,R,5,3,"button",41),p.ɵɵtext(8,"\n "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(3),p.ɵɵtextInterpolate(n.send.file.fileName),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!n.downloading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.downloading)}}function j(e,t){if(1&e&&(p.ɵɵelementStart(0,"p",45),p.ɵɵtext(1),p.ɵɵpipe(2,"date"),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext(2);p.ɵɵadvance(1),p.ɵɵtextInterpolate1("Expires:\n ",p.ɵɵpipeBind2(2,1,n.expirationDate,"medium"),"")}}function F(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",23),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"p",20),p.ɵɵelementStart(3,"b"),p.ɵɵtext(4),p.ɵɵelementEnd(),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n "),p.ɵɵelement(6,"hr"),p.ɵɵtext(7,"\n "),p.ɵɵtext(8,"\n "),p.ɵɵtemplate(9,B,17,6,"ng-container",31),p.ɵɵtext(10,"\n "),p.ɵɵtext(11,"\n "),p.ɵɵtemplate(12,V,9,3,"ng-container",31),p.ɵɵtext(13,"\n "),p.ɵɵtemplate(14,j,3,4,"p",32),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(4),p.ɵɵtextInterpolate(n.send.name),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",n.send.type===n.sendType.Text),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",n.send.type===n.sendType.File),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",n.expirationDate)}}var U=function(){function e(e,t,n,r,i,o){this.i18nService=e,this.cryptoFunctionService=t,this.apiService=n,this.platformUtilsService=r,this.route=i,this.cryptoService=o,this.sendType=s.SendType,this.downloading=!1,this.loading=!0,this.passwordRequired=!1,this.showText=!1,this.unavailable=!1,this.error=!1,this.hideEmail=!1}return Object.defineProperty(e.prototype,"sendText",{get:function(){return null==this.send||null==this.send.text?null:this.showText?this.send.text.text:this.send.text.maskedText},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expirationDate",{get:function(){return null==this.send||null==this.send.expirationDate?null:this.send.expirationDate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"creatorIdentifier",{get:function(){return null==this.send||null==this.send.creatorIdentifier?null:this.send.creatorIdentifier},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.route.params.subscribe((function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.id=t.sendId,this.key=t.key,null==this.key||null==this.id?[2]:[4,this.load()];case 1:return e.sent(),[2]}}))}))}))},e.prototype.download=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return null==this.send||null==this.decKey||this.downloading?[2]:[4,this.apiService.getSendFileDownloadData(this.send,this.accessRequest)];case 1:return e=i.sent(),o.Utils.isNullOrWhitespace(e.url)?(this.platformUtilsService.showToast("error",null,this.i18nService.t("missingSendFile")),[2]):(this.downloading=!0,[4,fetch(new Request(e.url,{cache:"no-store"}))]);case 2:if(200!==(t=i.sent()).status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),this.downloading=!1,[2];i.label=3;case 3:return i.trys.push([3,6,,7]),[4,t.arrayBuffer()];case 4:return n=i.sent(),[4,this.cryptoService.decryptFromBytes(n,this.decKey)];case 5:return r=i.sent(),this.platformUtilsService.saveFile(window,r,null,this.send.file.fileName),[3,7];case 6:return i.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,7];case 7:return this.downloading=!1,[2]}}))}))},e.prototype.copyText=function(){this.platformUtilsService.copyToClipboard(this.send.text.text),this.platformUtilsService.showToast("success",null,this.i18nService.t("valueCopied",this.i18nService.t("sendTypeText")))},e.prototype.toggleText=function(){this.showText=!this.showText},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,s,p,u;return i(this,(function(i){switch(i.label){case 0:return this.unavailable=!1,this.error=!1,this.hideEmail=!1,e=o.Utils.fromUrlB64ToArray(this.key),this.accessRequest=new l.SendAccessRequest,null==this.password?[3,2]:[4,this.cryptoFunctionService.pbkdf2(this.password,e,"sha256",1e5)];case 1:t=i.sent(),this.accessRequest.password=o.Utils.fromBufferToB64(t),i.label=2;case 2:return i.trys.push([2,9,,10]),n=null,this.loading?[4,this.apiService.postSendAccess(this.id,this.accessRequest)]:[3,4];case 3:return n=i.sent(),[3,6];case 4:return this.formPromise=this.apiService.postSendAccess(this.id,this.accessRequest),[4,this.formPromise];case 5:n=i.sent(),i.label=6;case 6:return this.passwordRequired=!1,r=new a.SendAccess(n),s=this,[4,this.cryptoService.makeSendKey(e)];case 7:return s.decKey=i.sent(),p=this,[4,r.decrypt(this.decKey)];case 8:return p.send=i.sent(),this.showText=null==this.send.text||!this.send.text.hidden,[3,10];case 9:return(u=i.sent())instanceof c.ErrorResponse&&(401===u.statusCode?this.passwordRequired=!0:404===u.statusCode?this.unavailable=!0:this.error=!0),[3,10];case 10:return this.loading=!1,this.hideEmail=null==this.creatorIdentifier&&!this.passwordRequired&&!this.loading&&!this.unavailable,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.I18nService),p.ɵɵdirectiveInject(d.CryptoFunctionService),p.ɵɵdirectiveInject(m.ApiService),p.ɵɵdirectiveInject(h.PlatformUtilsService),p.ɵɵdirectiveInject(f.ActivatedRoute),p.ɵɵdirectiveInject(v.CryptoService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-send-access"]],decls:55,vars:23,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-center","mt-5"],[1,"col-12"],[1,"lead","text-center","mb-4"],["class","col-12 text-center",4,"ngIf"],["class","col-8",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-5"],[1,"card","d-block"],["class","card-body","class","text-center",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-12","text-center","mt-5","text-muted"],[1,"mb-0"],["href","https://www.bitwarden.com/products/send?source=web-vault","target","_blank"],["href","https://vault.bitwarden.com/#/register","target","_blank"],[1,"col-12","text-center"],[1,"col-8"],["type","warning",3,"title"],["href","https://bitwarden.com/help/article/receive-send/","target","_blank"],[1,"text-center"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-2x","text-muted",3,"title"],[1,"sr-only"],[1,"card-body"],[1,"form-group"],["for","password"],["id","password","type","password","name","Password","required","","appInputVerbatim","","appAutofocus","",1,"text-monospace","form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-sign-in"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[4,"ngIf"],["class","text-center text-muted",4,"ngIf"],["type","tip",4,"ngIf"],["id","text","rows","8","name","Text","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["class","btn btn-block btn-link","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-block","btn-link",3,"click"],["aria-hidden","true",1,"fa","fa-copy"],["type","tip"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["class","btn btn-primary btn-block","type","button",3,"click",4,"ngIf"],["class","btn btn-primary btn-block","type","button","disabled","true",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-block",3,"click"],["aria-hidden","true",1,"fa","fa-download"],["type","button","disabled","true",1,"btn","btn-primary","btn-block"],[1,"text-center","text-muted"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"form",0,1),p.ɵɵlistener("ngSubmit",(function(){return t.load()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",2),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"div",3),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"p",4),p.ɵɵtext(8,"Bitwarden Send"),p.ɵɵelementEnd(),p.ɵɵtext(9,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(10,"\n "),p.ɵɵtemplate(11,I,6,4,"div",5),p.ɵɵtext(12,"\n "),p.ɵɵtemplate(13,E,11,9,"div",6),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"div",7),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"div",8),p.ɵɵtext(19,"\n "),p.ɵɵelementStart(20,"div",9),p.ɵɵtext(21,"\n "),p.ɵɵtemplate(22,P,9,6,"div",10),p.ɵɵtext(23,"\n "),p.ɵɵtemplate(24,k,34,17,"div",11),p.ɵɵtext(25,"\n "),p.ɵɵtemplate(26,_,3,3,"div",11),p.ɵɵtext(27,"\n "),p.ɵɵtemplate(28,A,3,3,"div",11),p.ɵɵtext(29,"\n "),p.ɵɵtemplate(30,F,16,4,"div",11),p.ɵɵtext(31,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementStart(34,"div",12),p.ɵɵtext(35,"\n "),p.ɵɵelementStart(36,"p",13),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelement(39,"br"),p.ɵɵtext(40),p.ɵɵpipe(41,"i18n"),p.ɵɵelementStart(42,"a",14),p.ɵɵtext(43,"Bitwarden Send"),p.ɵɵelementEnd(),p.ɵɵtext(44),p.ɵɵpipe(45,"i18n"),p.ɵɵelementStart(46,"a",15),p.ɵɵtext(47),p.ɵɵpipe(48,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(49),p.ɵɵpipe(50,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(51,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(52,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(53,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(54,"\n")),2&e&&(p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(11),p.ɵɵproperty("ngIf",null!=t.creatorIdentifier),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hideEmail),p.ɵɵadvance(9),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&t.passwordRequired),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&t.unavailable),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&t.error),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&!t.passwordRequired&&t.send),p.ɵɵadvance(7),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,13,"sendAccessTaglineProductDesc")),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(41,15,"sendAccessTaglineLearnMore")," "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(45,17,"sendAccessTaglineOr")," "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(48,19,"sendAccessTaglineSignUp")),p.ɵɵadvance(2),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(50,21,"sendAccessTaglineTryToday"),"\n "))},directives:[y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.NgIf,b.CalloutComponent,y.DefaultValueAccessor,y.RequiredValidator,S.InputVerbatimDirective,w.AutofocusDirective,y.NgControlStatus,y.NgModel,x.NgClass],pipes:[C.I18nPipe,x.DatePipe],encapsulation:2}),e}();t.AccessComponent=U},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(892),c=n(631),p=n(84),u=(n(64),n(3),n(5),n(43),n(80),n(191),n(7),n(112),n(0)),d=n(191),m=n(3),h=n(5),f=n(64),v=n(80),y=n(43),g=n(7),x=n(112),b=n(4),S=n(13),w=n(65),C=n(37),I=n(16),E=n(53),P=n(17),k=n(10),_=["sendAddEdit"];function A(e,t){1&e&&(u.ɵɵelementStart(0,"div",25),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",26),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",27),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",6),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"span"),u.ɵɵtext(11),u.ɵɵpipe(12,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(5),u.ɵɵtextInterpolate1(" ",u.ɵɵpipeBind1(6,2,"sendDisabled"),"\n "),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(12,4,"sendDisabledWarning")))}function O(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",28),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",29),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function T(e,t){1&e&&u.ɵɵelement(0,"i",49)}function M(e,t){1&e&&u.ɵɵelement(0,"i",50)}function B(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",51),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",29),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"disabled")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"disabled")))}function D(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",52),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",29),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"password")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"password")))}function R(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",53),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",29),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"maxAccessCountReached")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"maxAccessCountReached")))}function V(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",54),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",29),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"expired")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"expired")))}function j(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",55),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",29),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"pendingDeletion")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"pendingDeletion")))}function F(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"a",44),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(2).removePassword(e)})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",56),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,1,"removePassword"),"\n "))}function U(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"tr"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"td",32),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",33),u.ɵɵtext(5,"\n "),u.ɵɵtemplate(6,T,1,0,"i",34),u.ɵɵtext(7,"\n "),u.ɵɵtemplate(8,M,1,0,"i",35),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"td",36),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"a",37),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(2).editSend(e)})),u.ɵɵtext(15),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵtemplate(17,B,9,6,"ng-container",18),u.ɵɵtext(18,"\n "),u.ɵɵtemplate(19,D,9,6,"ng-container",18),u.ɵɵtext(20,"\n "),u.ɵɵtemplate(21,R,9,6,"ng-container",18),u.ɵɵtext(22,"\n "),u.ɵɵtemplate(23,V,9,6,"ng-container",18),u.ɵɵtext(24,"\n "),u.ɵɵtemplate(25,j,9,6,"ng-container",18),u.ɵɵtext(26,"\n "),u.ɵɵelement(27,"br"),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"small",38),u.ɵɵtext(30),u.ɵɵpipe(31,"date"),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(33,"\n "),u.ɵɵelementStart(34,"td",39),u.ɵɵtext(35,"\n "),u.ɵɵelementStart(36,"div",40),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"button",41),u.ɵɵpipe(39,"i18n"),u.ɵɵtext(40,"\n "),u.ɵɵelement(41,"i",42),u.ɵɵtext(42,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(43,"\n "),u.ɵɵelementStart(44,"div",43),u.ɵɵtext(45,"\n "),u.ɵɵelementStart(46,"a",44),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(2).copy(e)})),u.ɵɵtext(47,"\n "),u.ɵɵelement(48,"i",45),u.ɵɵtext(49),u.ɵɵpipe(50,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(51,"\n "),u.ɵɵtemplate(52,F,5,3,"a",46),u.ɵɵtext(53,"\n "),u.ɵɵelementStart(54,"a",47),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(2).delete(e)})),u.ɵɵtext(55,"\n "),u.ɵɵelement(56,"i",48),u.ɵɵtext(57),u.ɵɵpipe(58,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(59,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(60,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(61,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(62,"\n "),u.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=u.ɵɵnextContext(2);u.ɵɵadvance(6),u.ɵɵproperty("ngIf",r.type==i.sendType.File),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.type==i.sendType.Text),u.ɵɵadvance(7),u.ɵɵtextInterpolate(r.name),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.disabled),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.password),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.maxAccessCountReached),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.expired),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.pendingDelete),u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind2(31,13,r.deletionDate,"medium")),u.ɵɵadvance(8),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(39,16,"options")),u.ɵɵadvance(11),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(50,18,"copySendLink"),"\n "),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",r.password&&!i.disableSend),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(58,20,"delete"),"\n ")}}function N(e,t){if(1&e&&(u.ɵɵelementStart(0,"table",30),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"tbody"),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,U,63,22,"tr",31),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(4),u.ɵɵproperty("ngForOf",n.filteredSends)}}function z(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",28),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",29),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function L(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"button",58),u.ɵɵlistener("click",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext(2).addSend()})),u.ɵɵtext(7,"\n "),u.ɵɵelement(8,"i",59),u.ɵɵtext(9),u.ɵɵpipe(10,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵnextContext(2);u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,3,"noSendsInList")),u.ɵɵadvance(3),u.ɵɵproperty("disabled",r.disableSend),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(10,5,"createSend"))}}function G(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",57),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,z,9,6,"ng-container",18),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,L,12,7,"ng-container",18),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!n.loaded),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",n.loaded)}}function K(e,t){}var q=function(e){return{active:e}},W=function(e){function t(t,n,r,i,o,a,s,l,c,p){var u=e.call(this,t,n,r,i,o,a,s,l)||this;return u.componentFactoryResolver=c,u.broadcasterService=p,u.modal=null,u}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(n){switch(n.label){case 0:return[4,e.prototype.ngOnInit.call(this)];case 1:return n.sent(),[4,this.load()];case 2:return n.sent(),this.broadcasterService.subscribe("SendComponent",(function(e){t.ngZone.run((function(){return o(t,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:switch(e.command){case"syncCompleted":return[3,1]}return[3,4];case 1:return e.successfully?[4,this.load()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[3,4];case 4:return[2]}}))}))}))})),[2]}}))}))},t.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe("SendComponent")},t.prototype.addSend=function(){this.disableSend||(this.editSend(null).type=this.type)},t.prototype.editSend=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(p.ModalComponent);this.modal=this.sendAddEditModalRef.createComponent(n).instance;var r=this.modal.show(c.AddEditComponent,this.sendAddEditModalRef);return r.sendId=null==e?null:e.id,r.onSavedSend.subscribe((function(e){return o(t,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.load()];case 1:return e.sent(),[2]}}))}))})),r.onDeletedSend.subscribe((function(e){return o(t,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.load()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){t.modal=null})),r},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.SendService),u.ɵɵdirectiveInject(m.I18nService),u.ɵɵdirectiveInject(h.PlatformUtilsService),u.ɵɵdirectiveInject(f.EnvironmentService),u.ɵɵdirectiveInject(u.NgZone),u.ɵɵdirectiveInject(v.SearchService),u.ɵɵdirectiveInject(y.PolicyService),u.ɵɵdirectiveInject(g.UserService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver),u.ɵɵdirectiveInject(x.BroadcasterService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-send"]],viewQuery:function(e,t){var n;(1&e&&u.ɵɵstaticViewQuery(_,!0,s.ViewContainerRef),2&e)&&(u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.sendAddEditModalRef=n.first))},features:[u.ɵɵInheritDefinitionFeature],decls:94,vars:40,consts:[[1,"container","page-content"],["class","row card border-warning mb-4",4,"ngIf"],[1,"row"],[1,"col-3","groupings"],[1,"card","vault-filters"],[1,"card-header","d-flex"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"fa-ul","card-ul"],[3,"ngClass"],["href","#","appStopClick","",3,"click"],[1,"fa-li","fa","fa-fw","fa-th"],[1,"fa-li","fa","fa-fw","fa-file-text-o"],[1,"fa-li","fa","fa-fw","fa-file-o"],[1,"col-9"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["class","table table-hover table-list",4,"ngIf"],["class","no-items",4,"ngIf"],["sendAddEdit",""],[1,"row","card","border-warning","mb-4"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"fa","fa-warning","fa-fw"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["aria-hidden","true",1,"icon"],["class","fa fa-fw fa-lg fa-file-o",4,"ngIf"],["class","fa fa-fw fa-lg fa-file-text-o",4,"ngIf"],[1,"reduced-lh","wrap"],["href","#","appStopClick","","appStopProp","",3,"click"],["appStopProp",""],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-copy"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"],[1,"fa","fa-fw","fa-lg","fa-file-o"],[1,"fa","fa-fw","fa-lg","fa-file-text-o"],["appStopProp","","aria-hidden","true",1,"fa","fa-warning",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-key",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-ban",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-clock-o",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-trash",3,"title"],["aria-hidden","true",1,"fa","fa-fw","fa-undo"],[1,"no-items"],[1,"btn","btn-outline-primary",3,"disabled","click"],[1,"fa","fa-plus","fa-fw"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,A,15,6,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",2),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",3),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",4),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",5),u.ɵɵtext(11),u.ɵɵpipe(12,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"div",6),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"input",7),u.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),u.ɵɵpipe(17,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"ul",8),u.ɵɵtext(20,"\n "),u.ɵɵelementStart(21,"li",9),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"a",10),u.ɵɵlistener("click",(function(){return t.selectAll()})),u.ɵɵtext(24,"\n "),u.ɵɵelement(25,"i",11),u.ɵɵtext(26),u.ɵɵpipe(27,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(29,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"h3"),u.ɵɵtext(32),u.ɵɵpipe(33,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(34,"\n "),u.ɵɵelementStart(35,"ul",8),u.ɵɵtext(36,"\n "),u.ɵɵelementStart(37,"li",9),u.ɵɵtext(38,"\n "),u.ɵɵelementStart(39,"a",10),u.ɵɵlistener("click",(function(){return t.selectType(t.sendType.Text)})),u.ɵɵtext(40,"\n "),u.ɵɵelement(41,"i",12),u.ɵɵtext(42),u.ɵɵpipe(43,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(44,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(45,"\n "),u.ɵɵelementStart(46,"li",9),u.ɵɵtext(47,"\n "),u.ɵɵelementStart(48,"a",10),u.ɵɵlistener("click",(function(){return t.selectType(t.sendType.File)})),u.ɵɵtext(49,"\n "),u.ɵɵelement(50,"i",13),u.ɵɵtext(51),u.ɵɵpipe(52,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(53,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(54,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(55,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(56,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(57,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(58,"\n "),u.ɵɵelementStart(59,"div",14),u.ɵɵtext(60,"\n "),u.ɵɵelementStart(61,"div",15),u.ɵɵtext(62,"\n "),u.ɵɵelementStart(63,"h1"),u.ɵɵtext(64),u.ɵɵpipe(65,"i18n"),u.ɵɵelementStart(66,"small",16,17),u.ɵɵtext(68,"\n "),u.ɵɵtemplate(69,O,9,6,"ng-container",18),u.ɵɵtext(70,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(71,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(72,"\n "),u.ɵɵelementStart(73,"div",19),u.ɵɵtext(74,"\n "),u.ɵɵelementStart(75,"button",20),u.ɵɵlistener("click",(function(){return t.addSend()})),u.ɵɵtext(76,"\n "),u.ɵɵelement(77,"i",21),u.ɵɵtext(78),u.ɵɵpipe(79,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(80,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(81,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(82,"\n "),u.ɵɵtext(83,"\n "),u.ɵɵtemplate(84,N,7,1,"table",22),u.ɵɵtext(85,"\n "),u.ɵɵtemplate(86,G,6,2,"div",23),u.ɵɵtext(87,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(88,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(89,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(90,"\n"),u.ɵɵtemplate(91,K,0,0,"ng-template",null,24,u.ɵɵtemplateRefExtractor),u.ɵɵtext(93,"\n")),2&e){var n=u.ɵɵreference(67);u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.disableSend),u.ɵɵadvance(9),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(12,18,"filters"),"\n "),u.ɵɵadvance(5),u.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||u.ɵɵpipeBind1(17,20,"searchSends")),u.ɵɵproperty("ngModel",t.searchText),u.ɵɵadvance(5),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(34,q,t.selectedAll)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(27,22,"allSends"),"\n "),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(33,24,"types")),u.ɵɵadvance(5),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(36,q,t.selectedType===t.sendType.Text)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(43,26,"sendTypeText"),"\n "),u.ɵɵadvance(4),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(38,q,t.selectedType===t.sendType.File)),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(52,28,"sendTypeFile"),"\n "),u.ɵɵadvance(13),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(65,30,"send"),"\n "),u.ɵɵadvance(2),u.ɵɵproperty("appApiAction",t.actionPromise),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",n.loading),u.ɵɵadvance(6),u.ɵɵproperty("disabled",t.disableSend),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(79,32,"createSend"),"\n "),u.ɵɵadvance(6),u.ɵɵproperty("ngIf",t.filteredSends&&t.filteredSends.length),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.filteredSends&&!t.filteredSends.length)}},directives:[b.NgIf,S.DefaultValueAccessor,w.AutofocusDirective,S.NgControlStatus,S.NgModel,b.NgClass,C.StopClickDirective,I.ApiActionDirective,b.NgForOf,E.StopPropDirective,P.A11yTitleDirective],pipes:[k.I18nPipe,b.DatePipe],encapsulation:2}),t}(l.SendComponent);t.SendComponent=W},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(4),n(0),n(64),n(3),n(14),n(5),n(43),n(191),n(7);var o=n(893),a=n(0),s=n(3),l=n(5),c=n(64),p=n(4),u=n(191),d=n(7),m=n(14),h=n(43),f=n(13),v=n(16),y=n(17),g=n(37),x=n(24),b=n(10);function S(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"span"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,1,"sendDisabledWarning")))}function w(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"span"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"ul",55),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"li"),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"sendOptionsPolicyInEffect")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,4,"sendDisableHideEmailInEffect")))}function C(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",25),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"input",57),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).send.type=e}))("change",(function(){a.ɵɵrestoreView(n);var e=t.$implicit;return a.ɵɵnextContext(3).typeChanged(e)})),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"label",58),a.ɵɵtext(5),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate1("name","Type_",r.value,""),a.ɵɵpropertyInterpolate1("id","type_",r.value,""),a.ɵɵproperty("ngModel",i.send.type)("value",r.value)("checked",i.send.type===r.value),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate1("for","type_",r.value,""),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",r.name,"\n ")}}function I(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",16),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",17),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"label"),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,C,7,7,"div",56),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(6,2,"whatTypeOfSend")),a.ɵɵadvance(3),a.ɵɵproperty("ngForOf",n.typeOptions)}}function E(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",24),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"label",59),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"textarea",60),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).send.text.text=e})),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"small",20),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"div",24),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"div",25),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"input",61),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).send.text.hidden=e})),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"label",62),a.ɵɵtext(22),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(6,7,"sendTypeText")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.send.text.text)("readOnly",r.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,9,"sendTextDesc")),a.ɵɵadvance(8),a.ɵɵproperty("ngModel",r.send.text.hidden)("disabled",r.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(23,11,"textHiddenByDefault"))}}function P(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"strong",63),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,3,"file")),a.ɵɵadvance(2),a.ɵɵtextInterpolate2("\n ",n.send.file.fileName," (",n.send.file.sizeName,")\n ")}}function k(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"label",64),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelement(6,"input",65),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"small",20),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,4,"file")),a.ɵɵadvance(3),a.ɵɵproperty("disabled",n.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate2("",a.ɵɵpipeBind1(10,6,"sendFileDesc")," ",a.ɵɵpipeBind1(11,8,"maxFileSize"),"")}}function _(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",24),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,P,6,5,"div",15),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,k,13,10,"div",15),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",n.editMode),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.editMode)}}function A(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",24),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"label",66),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"input",67),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).link=e})),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"sendLinkLabel")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.link)}}function O(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"input",69),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).deletionDate=e})),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵproperty("ngModel",r.deletionDate)("readOnly",r.disableSend)}}function T(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",76),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵproperty("value",n.military),a.ɵɵadvance(1),a.ɵɵtextInterpolate(n.standard)}}function M(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"select",74),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).safariDeletionTime=e})),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,T,2,2,"option",75),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("required",!r.editMode)("ngModel",r.safariDeletionTime),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",r.safariDeletionTimeOptions)}}function B(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"input",77),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).deletionTimeFallback=e})),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("ngModel",r.deletionTimeFallback)("readOnly",r.disableSend)}}function D(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",70),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"input",71),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).deletionDateFallback=e})),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,M,4,3,"select",72),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,B,1,2,"input",73),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵproperty("ngModel",r.deletionDateFallback)("readOnly",r.disableSend),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.isSafari),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!r.isSafari)}}function R(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵtemplate(1,O,4,2,"ng-container",15),a.ɵɵtext(2,"\n "),a.ɵɵtemplate(3,D,8,4,"div",68),a.ɵɵtext(4,"\n ")),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵproperty("ngIf",n.isDateTimeLocalSupported),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.isDateTimeLocalSupported)}}function V(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",80),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵproperty("ngValue",n.value),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("",n.name,"\n ")}}function j(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementContainerEnd())}function F(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,j,2,0,"ng-container",81),a.ɵɵtext(3,"\n "),a.ɵɵelementContainerEnd()),2&e){a.ɵɵnextContext(2);var n=a.ɵɵreference(71);a.ɵɵadvance(2),a.ɵɵproperty("ngTemplateOutlet",n)}}function U(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"select",78),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).deletionDateSelect=e})),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,V,2,2,"option",79),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵtemplate(7,F,4,1,"ng-container",15),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵproperty("ngModel",r.deletionDateSelect),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",r.deletionDateOptions),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",0===r.deletionDateSelect)}}function N(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementContainerEnd())}function z(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,N,2,0,"ng-container",81),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd()),2&e){a.ɵɵnextContext();var n=a.ɵɵreference(71);a.ɵɵadvance(2),a.ɵɵproperty("ngTemplateOutlet",n)}}function L(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",82),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).clearExpiration()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"clear"),"\n "))}function G(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"input",83),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).expirationDate=e})),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵproperty("ngModel",r.expirationDate)("readOnly",r.disableSend)}}function K(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",80),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵproperty("ngValue",n.military),a.ɵɵadvance(1),a.ɵɵtextInterpolate(n.standard)}}function q(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"select",87),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).safariExpirationTime=e})),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,K,2,2,"option",79),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("required",!r.editMode)("ngModel",r.safariExpirationTime),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",r.safariExpirationTimeOptions)}}function W(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"input",88),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).expirationTimeFallback=e})),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("ngModel",r.expirationTimeFallback)("required",!r.editMode)("readOnly",r.disableSend)}}function H(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",70),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"input",84),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).expirationDateFallback=e}))("change",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).expirationDateFallbackChanged()})),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,q,4,3,"select",85),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,W,1,3,"input",86),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵproperty("ngModel",r.expirationDateFallback)("required",!r.editMode)("readOnly",r.disableSend),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.isSafari),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!r.isSafari)}}function $(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵtemplate(1,G,4,2,"ng-container",15),a.ɵɵtext(2,"\n "),a.ɵɵtemplate(3,H,8,5,"div",68),a.ɵɵtext(4,"\n ")),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵproperty("ngIf",n.isDateTimeLocalSupported),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.isDateTimeLocalSupported)}}function Y(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",80),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵproperty("ngValue",n.value),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("",n.name,"\n ")}}function Q(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementContainerEnd())}function J(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,Q,2,0,"ng-container",81),a.ɵɵtext(3,"\n "),a.ɵɵelementContainerEnd()),2&e){a.ɵɵnextContext(2);var n=a.ɵɵreference(94);a.ɵɵadvance(2),a.ɵɵproperty("ngTemplateOutlet",n)}}function X(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"select",89),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).expirationDateSelect=e})),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,Y,2,2,"option",79),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵtemplate(7,J,4,1,"ng-container",15),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵproperty("ngModel",r.expirationDateSelect),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",r.expirationDateOptions),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",0===r.expirationDateSelect)}}function Z(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementContainerEnd())}function ee(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,Z,2,0,"ng-container",81),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd()),2&e){a.ɵɵnextContext();var n=a.ɵɵreference(94);a.ɵɵadvance(2),a.ɵɵproperty("ngTemplateOutlet",n)}}function te(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",17),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"label",90),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"input",91),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).send.accessCount=e})),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"currentAccessCount")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.send.accessCount)}}function ne(e,t){1&e&&(a.ɵɵelementStart(0,"label",92),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,"password")))}function re(e,t){1&e&&(a.ɵɵelementStart(0,"label",92),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,1,"newPassword")))}var ie=function(e,t){return{"fa-chevron-down":e,"fa-chevron-up":t}},oe=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}};function ae(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",14),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,S,6,3,"app-callout",15),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,w,13,6,"app-callout",15),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",16),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"div",17),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"label",18),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"input",19),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().send.name=e})),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"small",20),a.ɵɵtext(17),a.ɵɵpipe(18,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵtemplate(22,I,11,4,"div",21),a.ɵɵtext(23,"\n "),a.ɵɵtext(24,"\n "),a.ɵɵtemplate(25,E,27,13,"ng-container",15),a.ɵɵtext(26,"\n "),a.ɵɵtext(27,"\n "),a.ɵɵtemplate(28,_,9,2,"ng-container",15),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"h3",22),a.ɵɵtext(31),a.ɵɵpipe(32,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵtemplate(34,A,8,4,"div",23),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"div",24),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",25),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"input",26),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().copyLink=e})),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementStart(42,"label",27),a.ɵɵtext(43),a.ɵɵpipe(44,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(45,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"div",28),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().toggleOptions()})),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"h3",29),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementStart(54,"a",30),a.ɵɵtext(55,"\n "),a.ɵɵelement(56,"i",31),a.ɵɵtext(57,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementStart(60,"div",32),a.ɵɵtext(61,"\n "),a.ɵɵelementStart(62,"div",16),a.ɵɵtext(63,"\n "),a.ɵɵelementStart(64,"div",17),a.ɵɵtext(65,"\n "),a.ɵɵelementStart(66,"label",33),a.ɵɵtext(67),a.ɵɵpipe(68,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(69,"\n "),a.ɵɵtemplate(70,R,5,2,"ng-template",null,34,a.ɵɵtemplateRefExtractor),a.ɵɵtext(72,"\n "),a.ɵɵtemplate(73,U,9,3,"div",15),a.ɵɵtext(74,"\n "),a.ɵɵtemplate(75,z,4,1,"div",15),a.ɵɵtext(76,"\n "),a.ɵɵelementStart(77,"div",35),a.ɵɵtext(78),a.ɵɵpipe(79,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(80,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(81,"\n "),a.ɵɵelementStart(82,"div",17),a.ɵɵtext(83,"\n "),a.ɵɵelementStart(84,"div",36),a.ɵɵtext(85,"\n "),a.ɵɵelementStart(86,"label",37),a.ɵɵtext(87),a.ɵɵpipe(88,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(89,"\n "),a.ɵɵtemplate(90,L,3,3,"a",38),a.ɵɵtext(91,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(92,"\n "),a.ɵɵtemplate(93,$,5,2,"ng-template",null,39,a.ɵɵtemplateRefExtractor),a.ɵɵtext(95,"\n "),a.ɵɵtemplate(96,X,9,3,"div",15),a.ɵɵtext(97,"\n "),a.ɵɵtemplate(98,ee,4,1,"div",15),a.ɵɵtext(99,"\n "),a.ɵɵelementStart(100,"div",35),a.ɵɵtext(101),a.ɵɵpipe(102,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(103,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(104,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(105,"\n "),a.ɵɵelementStart(106,"div",16),a.ɵɵtext(107,"\n "),a.ɵɵelementStart(108,"div",17),a.ɵɵtext(109,"\n "),a.ɵɵelementStart(110,"label",40),a.ɵɵtext(111),a.ɵɵpipe(112,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(113,"\n "),a.ɵɵelementStart(114,"input",41),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().send.maxAccessCount=e})),a.ɵɵelementEnd(),a.ɵɵtext(115,"\n "),a.ɵɵelementStart(116,"div",35),a.ɵɵtext(117),a.ɵɵpipe(118,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(119,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(120,"\n "),a.ɵɵtemplate(121,te,8,4,"div",42),a.ɵɵtext(122,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(123,"\n "),a.ɵɵelementStart(124,"div",16),a.ɵɵtext(125,"\n "),a.ɵɵelementStart(126,"div",17),a.ɵɵtext(127,"\n "),a.ɵɵtemplate(128,ne,3,3,"label",43),a.ɵɵtext(129,"\n "),a.ɵɵtemplate(130,re,3,3,"label",43),a.ɵɵtext(131,"\n "),a.ɵɵelementStart(132,"div",44),a.ɵɵtext(133,"\n "),a.ɵɵelementStart(134,"input",45),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().password=e})),a.ɵɵelementEnd(),a.ɵɵtext(135,"\n "),a.ɵɵelementStart(136,"div",46),a.ɵɵtext(137,"\n "),a.ɵɵelementStart(138,"button",47),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().togglePasswordVisible()})),a.ɵɵpipe(139,"i18n"),a.ɵɵtext(140,"\n "),a.ɵɵelement(141,"i",48),a.ɵɵtext(142,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(143,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(144,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(145,"\n "),a.ɵɵelementStart(146,"div",35),a.ɵɵtext(147),a.ɵɵpipe(148,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(149,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(150,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(151,"\n "),a.ɵɵelementStart(152,"div",24),a.ɵɵtext(153,"\n "),a.ɵɵelementStart(154,"label",49),a.ɵɵtext(155),a.ɵɵpipe(156,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(157,"\n "),a.ɵɵelementStart(158,"textarea",50),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().send.notes=e})),a.ɵɵelementEnd(),a.ɵɵtext(159,"\n "),a.ɵɵelementStart(160,"div",35),a.ɵɵtext(161),a.ɵɵpipe(162,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(163,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(164,"\n "),a.ɵɵelementStart(165,"div",24),a.ɵɵtext(166,"\n "),a.ɵɵelementStart(167,"div",25),a.ɵɵtext(168,"\n "),a.ɵɵelementStart(169,"input",51),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().send.hideEmail=e})),a.ɵɵelementEnd(),a.ɵɵtext(170,"\n "),a.ɵɵelementStart(171,"label",52),a.ɵɵtext(172),a.ɵɵpipe(173,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(174,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(175,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(176,"\n "),a.ɵɵelementStart(177,"div",24),a.ɵɵtext(178,"\n "),a.ɵɵelementStart(179,"div",25),a.ɵɵtext(180,"\n "),a.ɵɵelementStart(181,"input",53),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().send.disabled=e})),a.ɵɵelementEnd(),a.ɵɵtext(182,"\n "),a.ɵɵelementStart(183,"label",54),a.ɵɵtext(184),a.ɵɵpipe(185,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(186,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(187,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(188,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(189,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.disableSend),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!r.disableSend&&r.disableHideEmail),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,48,"name")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.send.name)("readOnly",r.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(18,50,"sendNameDesc")),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!r.editMode),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",r.send.type===r.sendType.Text),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",r.send.type===r.sendType.File),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(32,52,"share")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",r.link),a.ɵɵadvance(6),a.ɵɵproperty("ngModel",r.copyLink),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(44,54,"copySendLinkOnSave")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,56,"options")),a.ɵɵadvance(5),a.ɵɵproperty("ngClass",a.ɵɵpureFunction2(82,ie,!r.showOptions,r.showOptions)),a.ɵɵadvance(4),a.ɵɵproperty("hidden",!r.showOptions),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(68,58,"deletionDate")),a.ɵɵadvance(6),a.ɵɵproperty("ngIf",!r.editMode),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.editMode),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(79,60,"deletionDateDesc")),a.ɵɵadvance(9),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(88,62,"expirationDate")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",r.editMode&&!r.disableSend),a.ɵɵadvance(6),a.ɵɵproperty("ngIf",!r.editMode),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.editMode),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(102,64,"expirationDateDesc")),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(112,66,"maxAccessCount")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.send.maxAccessCount)("readOnly",r.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(118,68,"maxAccessCountDesc")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",r.editMode),a.ɵɵadvance(7),a.ɵɵproperty("ngIf",!r.hasPassword),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.hasPassword),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),a.ɵɵproperty("ngModel",r.password)("readOnly",r.disableSend),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(139,70,"toggleVisibility")),a.ɵɵadvance(3),a.ɵɵproperty("ngClass",a.ɵɵpureFunction2(85,oe,!r.showPassword,r.showPassword)),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(148,72,"sendPasswordDesc")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(156,74,"notes")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.send.notes)("readOnly",r.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(162,76,"sendNotesDesc")),a.ɵɵadvance(8),a.ɵɵproperty("ngModel",r.send.hideEmail)("disabled",r.disableHideEmail&&!r.send.hideEmail||r.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(173,78,"hideEmail"),"\n "),a.ɵɵadvance(9),a.ɵɵproperty("ngModel",r.send.disabled)("disabled",r.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(185,80,"disableThisSend"))}}function se(e,t){1&e&&(a.ɵɵelementStart(0,"button",93),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"span"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,1,"save")))}function le(e,t){if(1&e&&(a.ɵɵelementStart(0,"button",94),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",95),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span"),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e){a.ɵɵnextContext();var n=a.ɵɵreference(5);a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,5,"save"))}}function ce(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",98,99),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).delete()})),a.ɵɵpipe(2,"i18n"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"i",100),a.ɵɵtext(5,"\n "),a.ɵɵelement(6,"i",101),a.ɵɵpipe(7,"i18n"),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵreference(1),i=a.ɵɵnextContext(2);a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(2,6,"delete")),a.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),a.ɵɵadvance(4),a.ɵɵproperty("hidden",r.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(7,8,"loading")),a.ɵɵproperty("hidden",!r.loading)}}function pe(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",96),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,ce,9,10,"button",97),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.editMode)}}var ue=function(e){function t(t,n,r,i,o,a,s,l){return e.call(this,t,n,r,i,o,a,s,l)||this}return i(t,e),t.prototype.copyLinkToClipboard=function(t){var n=this;window.setTimeout((function(){return e.prototype.copyLinkToClipboard.call(n,t)}),500)},t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.I18nService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.EnvironmentService),a.ɵɵdirectiveInject(p.DatePipe),a.ɵɵdirectiveInject(u.SendService),a.ɵɵdirectiveInject(d.UserService),a.ɵɵdirectiveInject(m.MessagingService),a.ɵɵdirectiveInject(h.PolicyService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-send-add-edit"]],features:[a.ɵɵInheritDefinitionFeature],decls:38,vars:12,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","sendAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","sendAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["class","btn btn-primary disabled","disabled","true",4,"ngIf"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],[4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","readOnly","ngModelChange"],[1,"form-text","text-muted"],["class","row",4,"ngIf"],[1,"mt-5"],["class","form-group",4,"ngIf"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","copy-link","name","CopyLink",1,"form-check-input",3,"ngModel","ngModelChange"],["for","copy-link",1,"form-check-label"],["id","options-header",1,"section-header","d-flex","flex-row","align-items-center","mt-5",3,"click"],[1,"mb-0","mr-2"],["href","#","appStopClick","","role","button",1,"mb-1"],["aria-hidden","true",1,"fa",3,"ngClass"],["id","options",3,"hidden"],["for","deletionDate"],["deletionDateCustom",""],[1,"form-text","text-muted","small"],[1,"d-flex"],["for","expirationDate"],["href","#","appStopClick","","class","ml-auto",3,"click",4,"ngIf"],["expirationDateCustom",""],["for","maxAccessCount"],["id","maxAccessCount","type","number","name","MaxAccessCount","min","1",1,"form-control",3,"ngModel","readOnly","ngModelChange"],["class","col-6 form-group",4,"ngIf"],["for","password",4,"ngIf"],[1,"input-group"],["id","password","name","Password",1,"form-control","text-monospace",3,"type","ngModel","readOnly","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","readOnly","ngModelChange"],["type","checkbox","id","hideEmail","name","HideEmail",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","hideEmail",1,"form-check-label"],["type","checkbox","id","disabled","name","Disabled",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","disabled",1,"form-check-label"],[1,"mb-0"],["class","form-check",4,"ngFor","ngForOf"],["type","radio",1,"form-check-input",3,"ngModel","name","id","value","checked","ngModelChange","change"],[1,"form-check-label",3,"for"],["for","text"],["id","text","name","Text.Text","rows","6",1,"form-control",3,"ngModel","readOnly","ngModelChange"],["type","checkbox","id","text-hidden","name","Text.Hidden",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","text-hidden",1,"form-check-label"],[1,"d-block"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file",3,"disabled"],["for","link"],["type","text","readonly","","id","link","name","Link",1,"form-control",3,"ngModel","ngModelChange"],["class","d-flex justify-content-around",4,"ngIf"],["id","deletionDateCustom","type","datetime-local","name","DeletionDate","required","","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"ngModel","readOnly","ngModelChange"],[1,"d-flex","justify-content-around"],["id","deletionDateCustomFallback","type","date","name","DeletionDateFallback","required","","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"ngModel","readOnly","ngModelChange"],["id","deletionTimeCustomFallback","class","form-control mt-1 ml-1","name","SafariDeletionTime",3,"required","ngModel","ngModelChange",4,"ngIf"],["id","deletionTimeCustomFallback","class","form-control mt-1 ml-1","type","time","name","DeletionTimeDate","required","","placeholder","HH:MM AM/PM",3,"ngModel","readOnly","ngModelChange",4,"ngIf"],["id","deletionTimeCustomFallback","name","SafariDeletionTime",1,"form-control","mt-1","ml-1",3,"required","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["id","deletionTimeCustomFallback","type","time","name","DeletionTimeDate","required","","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"ngModel","readOnly","ngModelChange"],["id","deletionDate","name","DeletionDateSelect","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],[4,"ngTemplateOutlet"],["href","#","appStopClick","",1,"ml-auto",3,"click"],["id","expirationDateCustom","type","datetime-local","name","ExpirationDate","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"ngModel","readOnly","ngModelChange"],["id","expirationDateCustomFallback","type","date","name","ExpirationDateFallback","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"ngModel","required","readOnly","ngModelChange","change"],["id","expirationTimeCustomFallback","class","form-control mt-1 ml-1","name","SafariExpirationTime",3,"required","ngModel","ngModelChange",4,"ngIf"],["id","expirationTimeCustomFallback","class","form-control mt-1 ml-1","type","time","name","ExpirationTimeFallback","placeholder","HH:MM AM/PM",3,"ngModel","required","readOnly","ngModelChange",4,"ngIf"],["id","expirationTimeCustomFallback","name","SafariExpirationTime",1,"form-control","mt-1","ml-1",3,"required","ngModel","ngModelChange"],["id","expirationTimeCustomFallback","type","time","name","ExpirationTimeFallback","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"ngModel","required","readOnly","ngModelChange"],["id","expirationDate","name","ExpirationDateSelect","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","accessCount"],["id","accessCount","type","text","name","AccessCount","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","password"],["disabled","true",1,"btn","btn-primary","disabled"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"button",6),a.ɵɵpipe(13,"i18n"),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"span",7),a.ɵɵtext(16,"×"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵtemplate(20,ae,190,88,"div",8),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"div",9),a.ɵɵtext(23,"\n "),a.ɵɵtemplate(24,se,6,3,"button",10),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,le,9,7,"button",11),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"button",12),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵtemplate(32,pe,4,1,"div",13),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n")),2&e&&(a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(t.title),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(13,8,"close")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",t.send),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.disableSend),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.disableSend),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,10,"cancel"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.send))},directives:[f.NgControlStatusGroup,f.NgForm,v.ApiActionDirective,y.A11yTitleDirective,p.NgIf,f.DefaultValueAccessor,f.RequiredValidator,f.NgControlStatus,f.NgModel,f.CheckboxControlValueAccessor,g.StopClickDirective,p.NgClass,f.NumberValueAccessor,x.CalloutComponent,p.NgForOf,f.RadioControlValueAccessor,f.SelectControlValueAccessor,f.NgSelectOption,f.ɵangular_packages_forms_forms_x,p.NgTemplateOutlet],pipes:[b.I18nPipe],encapsulation:2}),t}(o.AddEditComponent);t.AddEditComponent=ue},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(30),i=n(296),o=n(297),a=function(){function e(e){this.id=null,this.accessId=null,this.name=null,this.notes=null,this.type=null,this.text=new o.SendTextView,this.file=new i.SendFileView,this.maxAccessCount=null,this.accessCount=0,this.revisionDate=null,this.deletionDate=null,this.expirationDate=null,this.password=null,this.disabled=!1,this.hideEmail=!1,e&&(this.id=e.id,this.accessId=e.accessId,this.type=e.type,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.revisionDate=e.revisionDate,this.deletionDate=e.deletionDate,this.expirationDate=e.expirationDate,this.disabled=e.disabled,this.password=e.password,this.hideEmail=e.hideEmail)}return Object.defineProperty(e.prototype,"urlB64Key",{get:function(){return r.Utils.fromBufferToUrlB64(this.key)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxAccessCountReached",{get:function(){return null!=this.maxAccessCount&&this.accessCount>=this.maxAccessCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expired",{get:function(){return null!=this.expirationDate&&this.expirationDate<=new Date},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pendingDelete",{get:function(){return this.deletionDate<=new Date},enumerable:!0,configurable:!0}),e}();t.SendView=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(84),s=n(469),l=n(634),c=n(635),p=n(470),u=(n(6),n(7),n(0)),d=n(6),m=n(7),h=n(636),f=n(637),v=n(639),y=n(646),g=n(10),x=["deauthorizeSessionsTemplate"],b=["purgeVaultTemplate"],S=["deleteAccountTemplate"],w=["viewUserApiKeyTemplate"],C=["rotateUserApiKeyTemplate"];function I(e,t){}function E(e,t){}function P(e,t){}function k(e,t){}function _(e,t){}var A=function(){function e(e,t,n){this.componentFactoryResolver=e,this.apiService=t,this.userService=n,this.modal=null}return e.prototype.deauthorizeSessions=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.deauthModalRef.createComponent(t).instance,this.modal.show(l.DeauthorizeSessionsComponent,this.deauthModalRef),this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.purgeVault=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.purgeModalRef.createComponent(t).instance,this.modal.show(p.PurgeVaultComponent,this.purgeModalRef),this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.deleteAccount=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.deleteModalRef.createComponent(t).instance,this.modal.show(c.DeleteAccountComponent,this.deleteModalRef),this.modal.onClosed.subscribe((function(){return r(e,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.viewUserApiKey=function(){return r(this,void 0,void 0,(function(){var e,t,n,o=this;return i(this,(function(l){switch(l.label){case 0:return null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.viewUserApiKeyModalRef.createComponent(e).instance,(t=this.modal.show(s.ApiKeyComponent,this.viewUserApiKeyModalRef)).keyType="user",n=t,[4,this.userService.getUserId()];case 1:return n.entityId=l.sent(),t.postKey=this.apiService.postUserApiKey.bind(this.apiService),t.scope="api",t.grantType="client_credentials",t.apiKeyTitle="apiKey",t.apiKeyWarning="userApiKeyWarning",t.apiKeyDescription="userApiKeyDesc",this.modal.onClosed.subscribe((function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))})),[2]}}))}))},e.prototype.rotateUserApiKey=function(){return r(this,void 0,void 0,(function(){var e,t,n,o=this;return i(this,(function(l){switch(l.label){case 0:return null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.rotateUserApiKeyModalRef.createComponent(e).instance,(t=this.modal.show(s.ApiKeyComponent,this.rotateUserApiKeyModalRef)).keyType="user",t.isRotation=!0,n=t,[4,this.userService.getUserId()];case 1:return n.entityId=l.sent(),t.postKey=this.apiService.postUserRotateApiKey.bind(this.apiService),t.scope="api",t.grantType="client_credentials",t.apiKeyTitle="apiKey",t.apiKeyWarning="userApiKeyWarning",t.apiKeyDescription="apiKeyRotateDesc",this.modal.onClosed.subscribe((function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))})),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(u.ComponentFactoryResolver),u.ɵɵdirectiveInject(d.ApiService),u.ɵɵdirectiveInject(m.UserService))},e.ɵcmp=u.ɵɵdefineComponent({type:e,selectors:[["app-account"]],viewQuery:function(e,t){var n;(1&e&&(u.ɵɵstaticViewQuery(x,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(b,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(S,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(w,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(C,!0,o.ViewContainerRef)),2&e)&&(u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.deauthModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.purgeModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.deleteModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.viewUserApiKeyModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.rotateUserApiKeyModalRef=n.first))},decls:99,vars:39,consts:[[1,"page-header"],[1,"secondary-header"],[1,"secondary-header","border-0","mb-0"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"secondary-header","text-danger","border-0","mb-0"],[1,"card","border-danger"],[1,"card-body"],["type","button",1,"btn","btn-outline-danger",3,"click"],["deauthorizeSessionsTemplate",""],["purgeVaultTemplate",""],["deleteAccountTemplate",""],["viewUserApiKeyTemplate",""],["rotateUserApiKeyTemplate",""]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h1"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n"),u.ɵɵelement(7,"app-profile"),u.ɵɵtext(8,"\n"),u.ɵɵelementStart(9,"div",1),u.ɵɵtext(10,"\n "),u.ɵɵelementStart(11,"h1"),u.ɵɵtext(12),u.ɵɵpipe(13,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n"),u.ɵɵelement(16,"app-change-email"),u.ɵɵtext(17,"\n"),u.ɵɵelementStart(18,"div",1),u.ɵɵtext(19,"\n "),u.ɵɵelementStart(20,"h1"),u.ɵɵtext(21),u.ɵɵpipe(22,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(23,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(24,"\n"),u.ɵɵelement(25,"app-change-password"),u.ɵɵtext(26,"\n"),u.ɵɵelementStart(27,"div",1),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"h1"),u.ɵɵtext(30),u.ɵɵpipe(31,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(33,"\n"),u.ɵɵelement(34,"app-change-kdf"),u.ɵɵtext(35,"\n"),u.ɵɵelementStart(36,"div",2),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"h1"),u.ɵɵtext(39),u.ɵɵpipe(40,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(42,"\n"),u.ɵɵelementStart(43,"p"),u.ɵɵtext(44),u.ɵɵpipe(45,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(46,"\n"),u.ɵɵelementStart(47,"button",3),u.ɵɵlistener("click",(function(){return t.viewUserApiKey()})),u.ɵɵtext(48),u.ɵɵpipe(49,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n"),u.ɵɵelementStart(51,"button",3),u.ɵɵlistener("click",(function(){return t.rotateUserApiKey()})),u.ɵɵtext(52),u.ɵɵpipe(53,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(54,"\n"),u.ɵɵelementStart(55,"div",4),u.ɵɵtext(56,"\n "),u.ɵɵelementStart(57,"h1"),u.ɵɵtext(58),u.ɵɵpipe(59,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(60,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(61,"\n"),u.ɵɵelementStart(62,"div",5),u.ɵɵtext(63,"\n "),u.ɵɵelementStart(64,"div",6),u.ɵɵtext(65,"\n "),u.ɵɵelementStart(66,"p"),u.ɵɵtext(67),u.ɵɵpipe(68,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(69,"\n "),u.ɵɵelementStart(70,"button",7),u.ɵɵlistener("click",(function(){return t.deauthorizeSessions()})),u.ɵɵtext(71),u.ɵɵpipe(72,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(73,"\n "),u.ɵɵelementStart(74,"button",7),u.ɵɵlistener("click",(function(){return t.purgeVault()})),u.ɵɵtext(75),u.ɵɵpipe(76,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(77,"\n "),u.ɵɵelementStart(78,"button",7),u.ɵɵlistener("click",(function(){return t.deleteAccount()})),u.ɵɵtext(79),u.ɵɵpipe(80,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(81,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(82,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(83,"\n"),u.ɵɵtemplate(84,I,0,0,"ng-template",null,8,u.ɵɵtemplateRefExtractor),u.ɵɵtext(86,"\n"),u.ɵɵtemplate(87,E,0,0,"ng-template",null,9,u.ɵɵtemplateRefExtractor),u.ɵɵtext(89,"\n"),u.ɵɵtemplate(90,P,0,0,"ng-template",null,10,u.ɵɵtemplateRefExtractor),u.ɵɵtext(92,"\n"),u.ɵɵtemplate(93,k,0,0,"ng-template",null,11,u.ɵɵtemplateRefExtractor),u.ɵɵtext(95,"\n"),u.ɵɵtemplate(96,_,0,0,"ng-template",null,12,u.ɵɵtemplateRefExtractor),u.ɵɵtext(98,"\n")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,13,"myAccount")),u.ɵɵadvance(9),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(13,15,"changeEmail")),u.ɵɵadvance(9),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(22,17,"changeMasterPassword")),u.ɵɵadvance(9),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(31,19,"encKeySettings")),u.ɵɵadvance(9),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(40,21,"apiKey")),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(45,23,"userApiKeyDesc"),"\n"),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(49,25,"viewApiKey")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(53,27,"rotateApiKey")),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(59,29,"dangerZone")),u.ɵɵadvance(9),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(68,31,"dangerZoneDesc")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(72,33,"deauthorizeSessions")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(76,35,"purgeVault")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(80,37,"deleteAccount")))},directives:[h.ProfileComponent,f.ChangeEmailComponent,v.ChangePasswordComponent,y.ChangeKdfComponent],pipes:[g.I18nPipe],encapsulation:2}),e}();t.AccountComponent=A},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(18),n(3),n(14);var o=n(79),a=n(0),s=n(6),l=n(3),c=n(9),p=n(18),u=n(14),d=n(13),m=n(16),h=n(17),f=n(24),v=n(45),y=n(10),g=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.messagingService=i}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):(e=new o.PasswordVerificationRequest,t=e,[4,this.cryptoService.hashPassword(this.masterPassword,null)]);case 1:t.masterPasswordHash=n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),this.formPromise=this.apiService.postSecurityStamp(e),[4,this.formPromise];case 3:return n.sent(),this.toasterService.popAsync("success",this.i18nService.t("sessionsDeauthorized"),this.i18nService.t("logBackIn")),this.messagingService.send("logout"),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.CryptoService),a.ɵɵdirectiveInject(u.MessagingService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-deauthorize-sessions"]],decls:58,vars:27,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","deAuthTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deAuthTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutoFocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p"),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"app-callout",9),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"label",10),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"input",11),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",12),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"button",13),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"i",14),a.ɵɵpipe(43,"i18n"),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"span"),a.ɵɵtext(46),a.ɵɵpipe(47,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"button",15),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,11,"deauthorizeSessions")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,13,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,15,"deauthorizeSessionsDesc")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,17,"deauthorizeSessionsWarning")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(33,19,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(43,21,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(47,23,"deauthorizeSessions")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,25,"close"))}},directives:[d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.A11yTitleDirective,f.CalloutComponent,d.DefaultValueAccessor,d.RequiredValidator,v.InputVerbatimDirective,d.NgControlStatus,d.NgModel],pipes:[y.I18nPipe],encapsulation:2}),e}();t.DeauthorizeSessionsComponent=g},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(18),n(3),n(14);var o=n(79),a=n(0),s=n(6),l=n(3),c=n(9),p=n(18),u=n(14),d=n(13),m=n(16),h=n(17),f=n(24),v=n(65),y=n(45),g=n(10),x=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.messagingService=i}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):(e=new o.PasswordVerificationRequest,t=e,[4,this.cryptoService.hashPassword(this.masterPassword,null)]);case 1:t.masterPasswordHash=n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),this.formPromise=this.apiService.deleteAccount(e),[4,this.formPromise];case 3:return n.sent(),this.toasterService.popAsync("success",this.i18nService.t("accountDeleted"),this.i18nService.t("accountDeletedDesc")),this.messagingService.send("logout"),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.CryptoService),a.ɵɵdirectiveInject(u.MessagingService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-delete-account"]],decls:58,vars:27,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","deleteAccountTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteAccountTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"p"),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"app-callout",9),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"label",10),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"input",11),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",12),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"button",13),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"i",14),a.ɵɵpipe(43,"i18n"),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"span"),a.ɵɵtext(46),a.ɵɵpipe(47,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"button",15),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,11,"deleteAccount")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,13,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,15,"deleteAccountDesc")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,17,"deleteAccountWarning")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(33,19,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(43,21,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(47,23,"deleteAccount")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,25,"close"))}},directives:[d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.A11yTitleDirective,f.CalloutComponent,d.DefaultValueAccessor,d.RequiredValidator,v.AutofocusDirective,y.InputVerbatimDirective,d.NgControlStatus,d.NgModel],pipes:[g.I18nPipe],encapsulation:2}),e}();t.DeleteAccountComponent=x},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(18),n(3),n(7);var o=n(894),a=n(0),s=n(6),l=n(3),c=n(9),p=n(7),u=n(18),d=n(4),m=n(13),h=n(16),f=n(139),v=n(17),y=n(10);function g(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",2),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",3),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){if(1&e&&(a.ɵɵelementStart(0,"p"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementStart(3,"a",19),a.ɵɵpipe(4,"i18n"),a.ɵɵtext(5,"\n "),a.ɵɵelement(6,"i",20),a.ɵɵelementEnd(),a.ɵɵelement(7,"br"),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"code"),a.ɵɵtext(10),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,3,"yourAccountsFingerprint"),":\n "),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(4,5,"learnMore")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(n.fingerprint)}}function b(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"form",4,5),a.ɵɵlistener("ngSubmit",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",6),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",7),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",8),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"label",9),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"input",10),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().profile.name=e})),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"div",8),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"label",11),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"input",12),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().profile.email=e})),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"div",8),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"label",13),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"input",14),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().profile.masterPasswordHint=e})),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"div",7),a.ɵɵtext(36,"\n "),a.ɵɵelementStart(37,"div",15),a.ɵɵtext(38,"\n "),a.ɵɵelement(39,"app-avatar",16),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"hr"),a.ɵɵtext(43,"\n "),a.ɵɵtemplate(44,x,12,7,"p",0),a.ɵɵtext(45,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"button",17),a.ɵɵtext(49,"\n "),a.ɵɵelement(50,"i",18),a.ɵɵpipe(51,"i18n"),a.ɵɵtext(52,"\n "),a.ɵɵelementStart(53,"span"),a.ɵɵtext(54),a.ɵɵpipe(55,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n"),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵreference(1),i=a.ɵɵnextContext();a.ɵɵproperty("appApiAction",i.formPromise),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,13,"name")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",i.profile.name),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(20,15,"email")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",i.profile.email),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,17,"masterPassHintLabel")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",i.profile.masterPasswordHint),a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("data",i.profile.name||i.profile.email),a.ɵɵproperty("email",i.profile.email),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",i.fingerprint),a.ɵɵadvance(4),a.ɵɵproperty("disabled",r.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(51,19,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(55,21,"save"))}}var S=function(){function e(e,t,n,r,i){this.apiService=e,this.i18nService=t,this.toasterService=n,this.userService=r,this.cryptoService=i,this.loading=!0}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this,[4,this.apiService.getProfile()];case 1:return e.profile=i.sent(),this.loading=!1,r=(n=this.cryptoService).getFingerprint,[4,this.userService.getUserId()];case 2:return[4,r.apply(n,[i.sent()])];case 3:return null!=(t=i.sent())&&(this.fingerprint=t.join("-")),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),e=new o.UpdateProfileRequest(this.profile.name,this.profile.masterPasswordHint),this.formPromise=this.apiService.putProfile(e),[4,this.formPromise];case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("accountUpdated")),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ToasterService),a.ɵɵdirectiveInject(p.UserService),a.ɵɵdirectiveInject(u.CryptoService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-profile"]],decls:4,vars:2,consts:[[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","ngModelChange"],["for","email"],["id","email","type","text","name","Email","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPasswordHint"],["id","masterPasswordHint","type","text","name","MasterPasswordHint",1,"form-control",3,"ngModel","ngModelChange"],[1,"mb-3"],["dynamic","true","size","75","fontSize","35",3,"data","email"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["href","https://help.bitwarden.com/article/fingerprint-phrase/","target","_blank","rel","noopener",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,g,9,6,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,b,58,23,"form",1),a.ɵɵtext(3,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.profile&&!t.loading))},directives:[d.NgIf,m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,f.AvatarComponent,v.A11yTitleDirective],pipes:[y.I18nPipe],encapsulation:2}),e}();t.ProfileComponent=S},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(18),n(3),n(14),n(7);var o=n(895),a=n(638),s=n(0),l=n(6),c=n(3),p=n(9),u=n(18),d=n(14),m=n(7),h=n(13),f=n(16),v=n(45),y=n(4),g=n(24),x=n(10);function b(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"hr"),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"app-callout",13),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",2),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",3),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",4),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"label",14),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"input",15),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().token=e})),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(6,4,"changeEmailDesc",r.newEmail)),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,7,"loggedOutWarning")),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(20,9,"code")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",r.token)}}function S(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"continue")))}function w(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"changeEmail")))}function C(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",16),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().reset()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"cancel"),"\n "))}var I=function(){function e(e,t,n,r,i,o){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.messagingService=i,this.userService=o,this.tokenSent=!1}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.hasEncKey()];case 1:return i.sent()?(this.newEmail=this.newEmail.trim().toLowerCase(),this.tokenSent?[3,7]:((t=new a.EmailTokenRequest).newEmail=this.newEmail,e=t,[4,this.cryptoService.hashPassword(this.masterPassword,null)])):(this.toasterService.popAsync("error",null,this.i18nService.t("updateKey")),[2]);case 2:e.masterPasswordHash=i.sent(),i.label=3;case 3:return i.trys.push([3,5,,6]),this.formPromise=this.apiService.postEmailToken(t),[4,this.formPromise];case 4:return i.sent(),this.tokenSent=!0,[3,6];case 5:return i.sent(),[3,6];case 6:return[3,17];case 7:return(t=new o.EmailRequest).token=this.token,t.newEmail=this.newEmail,n=t,[4,this.cryptoService.hashPassword(this.masterPassword,null)];case 8:return n.masterPasswordHash=i.sent(),[4,this.userService.getKdf()];case 9:return r=i.sent(),[4,this.userService.getKdfIterations()];case 10:return s=i.sent(),[4,this.cryptoService.makeKey(this.masterPassword,this.newEmail,r,s)];case 11:return l=i.sent(),c=t,[4,this.cryptoService.hashPassword(this.masterPassword,l)];case 12:return c.newMasterPasswordHash=i.sent(),[4,this.cryptoService.remakeEncKey(l)];case 13:p=i.sent(),t.key=p[1].encryptedString,i.label=14;case 14:return i.trys.push([14,16,,17]),this.formPromise=this.apiService.postEmail(t),[4,this.formPromise];case 15:return i.sent(),this.reset(),this.toasterService.popAsync("success",this.i18nService.t("emailChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout"),[3,17];case 16:return i.sent(),[3,17];case 17:return[2]}}))}))},e.prototype.reset=function(){this.token=this.newEmail=this.masterPassword=null,this.tokenSent=!1},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.ToasterService),s.ɵɵdirectiveInject(u.CryptoService),s.ɵɵdirectiveInject(d.MessagingService),s.ɵɵdirectiveInject(m.UserService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-change-email"]],decls:42,vars:19,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","readonly","ngModelChange"],["for","newEmail"],["id","newEmail","type","text","name","NewEmail","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","readonly","ngModelChange"],[4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","warning"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"label",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"input",6),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",4),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"label",7),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"input",8),s.ɵɵlistener("ngModelChange",(function(e){return t.newEmail=e})),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,b,27,11,"ng-container",9),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"button",10),s.ɵɵtext(30,"\n "),s.ɵɵelement(31,"i",11),s.ɵɵpipe(32,"i18n"),s.ɵɵtext(33,"\n "),s.ɵɵtemplate(34,S,3,3,"span",9),s.ɵɵtext(35,"\n "),s.ɵɵtemplate(36,w,3,3,"span",9),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵtemplate(39,C,3,3,"button",12),s.ɵɵtext(40,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n")),2&e){var n=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,13,"masterPass")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.masterPassword)("readonly",t.tokenSent),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(20,15,"newEmail")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.newEmail)("readonly",t.tokenSent),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.tokenSent),s.ɵɵadvance(2),s.ɵɵproperty("disabled",n.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(32,17,"loading")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.tokenSent),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.tokenSent),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.tokenSent)}},directives:[h.NgControlStatusGroup,h.NgForm,f.ApiActionDirective,h.DefaultValueAccessor,h.RequiredValidator,v.InputVerbatimDirective,h.NgControlStatus,h.NgModel,y.NgIf,g.CalloutComponent],pipes:[x.I18nPipe],encapsulation:2}),e}();t.ChangeEmailComponent=I},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.EmailTokenRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(6),n(19),n(18),n(48),n(3),n(14),n(36),n(5),n(43),n(61),n(7);var s=n(464),l=n(640),c=n(30),p=n(511),u=n(641),d=n(642),m=n(643),h=n(644),f=n(645),v=n(0),y=n(3),g=n(18),x=n(14),b=n(7),S=n(36),w=n(5),C=n(43),I=n(48),E=n(19),P=n(61),k=n(6),_=n(24),A=n(4),O=n(13),T=n(16),M=n(45),B=n(250),D=n(17),R=n(10);function V(e,t){if(1&e&&(v.ɵɵelementStart(0,"li"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind2(2,1,"policyInEffectMinComplexity",n.getPasswordScoreAlertDisplay()),"\n ")}}function j(e,t){if(1&e&&(v.ɵɵelementStart(0,"li"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext(2);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind2(2,1,"policyInEffectMinLength",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength.toString()),"\n ")}}function F(e,t){1&e&&(v.ɵɵelementStart(0,"li"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"policyInEffectUppercase")))}function U(e,t){1&e&&(v.ɵɵelementStart(0,"li"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"policyInEffectLowercase")))}function N(e,t){1&e&&(v.ɵɵelementStart(0,"li"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"policyInEffectNumbers")))}function z(e,t){1&e&&(v.ɵɵelementStart(0,"li"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(2,1,"policyInEffectSpecial","!@#$%^&*")))}function L(e,t){if(1&e&&(v.ɵɵelementStart(0,"app-callout",21),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementStart(3,"ul",22),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,V,3,4,"li",23),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,j,3,4,"li",23),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,F,3,3,"li",23),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,U,3,3,"li",23),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,N,3,3,"li",23),v.ɵɵtext(14,"\n "),v.ɵɵtemplate(15,z,3,4,"li",23),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext();v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,7,"masterPasswordPolicyInEffect"),"\n "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minComplexity)>0),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var G=function(e){function t(t,n,r,i,o,a,s,l,c,p,u){var d=e.call(this,t,n,r,i,o,a,s)||this;return d.folderService=l,d.cipherService=c,d.syncService=p,d.apiService=u,d.rotateEncKey=!1,d}return i(t,e),t.prototype.rotateEncKeyClicked=function(){return o(this,void 0,void 0,(function(){var e,t,n;return a(this,(function(r){switch(r.label){case 0:return this.rotateEncKey?[4,this.cipherService.getAllDecrypted()]:[3,5];case 1:if(e=r.sent(),t=!1,null!=e)for(n=0;n<e.length;n++)if(null==e[n].organizationId&&e[n].hasOldAttachments){t=!0;break}return t?[4,this.platformUtilsService.showDialog(this.i18nService.t("oldAttachmentsNeedFixDesc"),null,this.i18nService.t("learnMore"),this.i18nService.t("close"),"warning")]:[3,3];case 2:return r.sent()&&this.platformUtilsService.launchUri("https://help.bitwarden.com/article/attachments/#fixing-old-attachments"),this.rotateEncKey=!1,[2];case 3:return[4,this.platformUtilsService.showDialog(this.i18nService.t("updateEncryptionKeyWarning")+" "+this.i18nService.t("updateEncryptionKeyExportWarning")+" "+this.i18nService.t("rotateEncKeyConfirmation"),this.i18nService.t("rotateEncKeyTitle"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 4:r.sent()||(this.rotateEncKey=!1),r.label=5;case 5:return[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.cryptoService.hasEncKey()];case 1:return t.sent()?[4,e.prototype.submit.call(this)]:(this.platformUtilsService.showToast("error",null,this.i18nService.t("updateKey")),[2]);case 2:return t.sent(),[2]}}))}))},t.prototype.setupSubmitActions=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==this.currentMasterPassword||""===this.currentMasterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2,!1]):this.rotateEncKey?[4,this.syncService.fullSync(!0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,e.prototype.setupSubmitActions.call(this)]}}))}))},t.prototype.performSubmitActions=function(e,t,n){return o(this,void 0,void 0,(function(){var r,i,o=this;return a(this,(function(a){switch(a.label){case 0:return r=new h.PasswordRequest,i=r,[4,this.cryptoService.hashPassword(this.currentMasterPassword,null)];case 1:i.masterPasswordHash=a.sent(),r.newMasterPasswordHash=e,r.key=n[1].encryptedString,a.label=2;case 2:return a.trys.push([2,4,,5]),this.rotateEncKey?this.formPromise=this.apiService.postPassword(r).then((function(){return o.updateKey(t,r.newMasterPasswordHash)})):this.formPromise=this.apiService.postPassword(r),[4,this.formPromise];case 3:return a.sent(),this.platformUtilsService.showToast("success",this.i18nService.t("masterPasswordChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout"),[3,5];case 4:return a.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,5];case 5:return[2]}}))}))},t.prototype.updateKey=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s,l,c,u,m;return a(this,(function(a){switch(a.label){case 0:return[4,this.cryptoService.makeEncKey(e)];case 1:return n=a.sent(),[4,this.cryptoService.getPrivateKey()];case 2:return r=a.sent(),i=null,null==r?[3,4]:[4,this.cryptoService.encrypt(r,n[0])];case 3:i=a.sent(),a.label=4;case 4:return(o=new f.UpdateKeyRequest).privateKey=null!=i?i.encryptedString:null,o.key=n[1].encryptedString,o.masterPasswordHash=t,[4,this.folderService.getAllDecrypted()];case 5:s=a.sent(),u=0,a.label=6;case 6:return u<s.length?null==s[u].id?[3,8]:[4,this.folderService.encrypt(s[u],n[0])]:[3,9];case 7:l=a.sent(),o.folders.push(new d.FolderWithIdRequest(l)),a.label=8;case 8:return u++,[3,6];case 9:return[4,this.cipherService.getAllDecrypted()];case 10:c=a.sent(),u=0,a.label=11;case 11:return u<c.length?null!=c[u].organizationId?[3,13]:[4,this.cipherService.encrypt(c[u],n[0])]:[3,14];case 12:m=a.sent(),o.ciphers.push(new p.CipherWithIdRequest(m)),a.label=13;case 13:return u++,[3,11];case 14:return[4,this.apiService.postAccountKey(o)];case 15:return a.sent(),[4,this.updateEmergencyAccesses(n[0])];case 16:return a.sent(),[4,this.updateAllResetPasswordKeys(n[0])];case 17:return a.sent(),[2]}}))}))},t.prototype.updateEmergencyAccesses=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o,s,p,d,m,h;return a(this,(function(a){switch(a.label){case 0:return[4,this.apiService.getEmergencyAccessTrusted()];case 1:t=a.sent(),n=[l.EmergencyAccessStatusType.Confirmed,l.EmergencyAccessStatusType.RecoveryInitiated,l.EmergencyAccessStatusType.RecoveryApproved],r=t.data.filter((function(e){return n.includes(e.status)})),i=0,o=r,a.label=2;case 2:return i<o.length?(s=o[i],[4,this.apiService.getUserPublicKey(s.granteeId)]):[3,7];case 3:return p=a.sent(),d=c.Utils.fromB64ToArray(p.publicKey),[4,this.cryptoService.rsaEncrypt(e.key,d.buffer)];case 4:return m=a.sent(),(h=new u.EmergencyAccessUpdateRequest).type=s.type,h.waitTimeDays=s.waitTimeDays,h.keyEncrypted=m.encryptedString,[4,this.apiService.putEmergencyAccess(s.id,h)];case 5:a.sent(),a.label=6;case 6:return i++,[3,2];case 7:return[2]}}))}))},t.prototype.updateAllResetPasswordKeys=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o,s,l;return a(this,(function(a){switch(a.label){case 0:return[4,this.userService.getAllOrganizations()];case 1:t=a.sent(),n=0,r=t,a.label=2;case 2:return n<r.length?(i=r[n]).isResetPasswordEnrolled?[4,this.cryptoService.getOrgKey(i.id)]:[3,6]:[3,7];case 3:return o=a.sent(),[4,this.cryptoService.encrypt(e.key,o)];case 4:return s=a.sent(),(l=new m.OrganizationUserResetPasswordEnrollmentRequest).resetPasswordKey=s.encryptedString,[4,this.apiService.putOrganizationUserResetPasswordEnrollment(i.id,i.userId,l)];case 5:a.sent(),a.label=6;case 6:return n++,[3,2];case 7:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(v.ɵɵdirectiveInject(y.I18nService),v.ɵɵdirectiveInject(g.CryptoService),v.ɵɵdirectiveInject(x.MessagingService),v.ɵɵdirectiveInject(b.UserService),v.ɵɵdirectiveInject(S.PasswordGenerationService),v.ɵɵdirectiveInject(w.PlatformUtilsService),v.ɵɵdirectiveInject(C.PolicyService),v.ɵɵdirectiveInject(I.FolderService),v.ɵɵdirectiveInject(E.CipherService),v.ɵɵdirectiveInject(P.SyncService),v.ɵɵdirectiveInject(k.ApiService))},t.ɵcmp=v.ɵɵdefineComponent({type:t,selectors:[["app-change-password"]],features:[v.ɵɵInheritDefinitionFeature],decls:82,vars:33,consts:[["type","warning"],["type","info",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","currentMasterPassword"],["id","currentMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],["id","masterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-check"],["type","checkbox","id","rotateEncKey","name","RotateEncKey",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","rotateEncKey",1,"form-check-label"],["href","https://bitwarden.com/help/article/account-encryption-key/#rotate-your-encryption-key","target","_blank","rel","noopener",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","info"],[1,"mb-0"],[4,"ngIf"]],template:function(e,t){if(1&e&&(v.ɵɵelementStart(0,"app-callout",0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(3,"\n"),v.ɵɵtemplate(4,L,18,9,"app-callout",1),v.ɵɵtext(5,"\n\n"),v.ɵɵelementStart(6,"form",2,3),v.ɵɵlistener("ngSubmit",(function(){return t.submit()})),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"div",4),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"div",5),v.ɵɵtext(12,"\n "),v.ɵɵelementStart(13,"div",6),v.ɵɵtext(14,"\n "),v.ɵɵelementStart(15,"label",7),v.ɵɵtext(16),v.ɵɵpipe(17,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementStart(19,"input",8),v.ɵɵlistener("ngModelChange",(function(e){return t.currentMasterPassword=e})),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(23,"\n "),v.ɵɵelementStart(24,"div",4),v.ɵɵtext(25,"\n "),v.ɵɵelementStart(26,"div",5),v.ɵɵtext(27,"\n "),v.ɵɵelementStart(28,"div",6),v.ɵɵtext(29,"\n "),v.ɵɵelementStart(30,"label",9),v.ɵɵtext(31),v.ɵɵpipe(32,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(33,"\n "),v.ɵɵelementStart(34,"input",10),v.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),v.ɵɵelementEnd(),v.ɵɵtext(35,"\n "),v.ɵɵelement(36,"app-password-strength",11),v.ɵɵtext(37,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(38,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(39,"\n "),v.ɵɵelementStart(40,"div",5),v.ɵɵtext(41,"\n "),v.ɵɵelementStart(42,"div",6),v.ɵɵtext(43,"\n "),v.ɵɵelementStart(44,"label",12),v.ɵɵtext(45),v.ɵɵpipe(46,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(47,"\n "),v.ɵɵelementStart(48,"input",13),v.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),v.ɵɵelementEnd(),v.ɵɵtext(49,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(50,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(51,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(52,"\n "),v.ɵɵelementStart(53,"div",6),v.ɵɵtext(54,"\n "),v.ɵɵelementStart(55,"div",14),v.ɵɵtext(56,"\n "),v.ɵɵelementStart(57,"input",15),v.ɵɵlistener("ngModelChange",(function(e){return t.rotateEncKey=e}))("change",(function(){return t.rotateEncKeyClicked()})),v.ɵɵelementEnd(),v.ɵɵtext(58,"\n "),v.ɵɵelementStart(59,"label",16),v.ɵɵtext(60),v.ɵɵpipe(61,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(62,"\n "),v.ɵɵelementStart(63,"a",17),v.ɵɵpipe(64,"i18n"),v.ɵɵtext(65,"\n "),v.ɵɵelement(66,"i",18),v.ɵɵtext(67,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(68,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(69,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(70,"\n "),v.ɵɵelementStart(71,"button",19),v.ɵɵtext(72,"\n "),v.ɵɵelement(73,"i",20),v.ɵɵpipe(74,"i18n"),v.ɵɵtext(75,"\n "),v.ɵɵelementStart(76,"span"),v.ɵɵtext(77),v.ɵɵpipe(78,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(79,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(80,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(81,"\n")),2&e){var n=v.ɵɵreference(7);v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,17,"loggedOutWarning")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",t.enforcedPolicyOptions),v.ɵɵadvance(2),v.ɵɵproperty("appApiAction",t.formPromise),v.ɵɵadvance(10),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(17,19,"currentMasterPass")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",t.currentMasterPassword),v.ɵɵadvance(12),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(32,21,"newMasterPass")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",t.masterPassword),v.ɵɵadvance(2),v.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),v.ɵɵadvance(9),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(46,23,"confirmNewMasterPass")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",t.masterPasswordRetype),v.ɵɵadvance(9),v.ɵɵproperty("ngModel",t.rotateEncKey),v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(61,25,"rotateAccountEncKey"),"\n "),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(64,27,"learnMore")),v.ɵɵadvance(8),v.ɵɵproperty("disabled",n.loading),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(74,29,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(78,31,"changeMasterPassword"))}},directives:[_.CalloutComponent,A.NgIf,O.NgControlStatusGroup,O.NgForm,T.ApiActionDirective,O.DefaultValueAccessor,O.RequiredValidator,M.InputVerbatimDirective,O.NgControlStatus,O.NgModel,B.PasswordStrengthComponent,O.CheckboxControlValueAccessor,D.A11yTitleDirective],pipes:[R.I18nPipe],encapsulation:2}),t}(s.ChangePasswordComponent);t.ChangePasswordComponent=G},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed",e[e.RecoveryInitiated=3]="RecoveryInitiated",e[e.RecoveryApproved=4]="RecoveryApproved"}(t.EmergencyAccessStatusType||(t.EmergencyAccessStatusType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EmergencyAccessUpdateRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=t.id,n}return i(t,e),t}(n(512).FolderRequest);t.FolderWithIdRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.OrganizationUserResetPasswordEnrollmentRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.PasswordRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.ciphers=[],this.folders=[]};t.UpdateKeyRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(18),n(3),n(14),n(7);var o=n(896),a=n(249),s=n(0),l=n(6),c=n(3),p=n(9),u=n(18),d=n(14),m=n(7),h=n(24),f=n(13),v=n(16),y=n(45),g=n(17),x=n(4),b=n(10);function S(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",21),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=t.$implicit;s.ɵɵproperty("ngValue",n.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(n.name)}}var w=function(){function e(e,t,n,r,i,o){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.messagingService=i,this.userService=o,this.kdf=a.KdfType.PBKDF2_SHA256,this.kdfOptions=[],this.kdfOptions=[{name:"PBKDF2 SHA-256",value:a.KdfType.PBKDF2_SHA256}]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=this,[4,this.userService.getKdf()];case 1:return e.kdf=n.sent(),t=this,[4,this.userService.getKdfIterations()];case 2:return t.kdfIterations=n.sent(),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.hasEncKey()];case 1:return i.sent()?((e=new o.KdfRequest).kdf=this.kdf,e.kdfIterations=this.kdfIterations,t=e,[4,this.cryptoService.hashPassword(this.masterPassword,null)]):(this.toasterService.popAsync("error",null,this.i18nService.t("updateKey")),[2]);case 2:return t.masterPasswordHash=i.sent(),[4,this.userService.getEmail()];case 3:return n=i.sent(),[4,this.cryptoService.makeKey(this.masterPassword,n,this.kdf,this.kdfIterations)];case 4:return r=i.sent(),a=e,[4,this.cryptoService.hashPassword(this.masterPassword,r)];case 5:return a.newMasterPasswordHash=i.sent(),[4,this.cryptoService.remakeEncKey(r)];case 6:s=i.sent(),e.key=s[1].encryptedString,i.label=7;case 7:return i.trys.push([7,9,,10]),this.formPromise=this.apiService.postAccountKdf(e),[4,this.formPromise];case 8:return i.sent(),this.toasterService.popAsync("success",this.i18nService.t("encKeySettingsChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout"),[3,10];case 9:return i.sent(),[3,10];case 10:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.ToasterService),s.ɵɵdirectiveInject(u.CryptoService),s.ɵɵdirectiveInject(d.MessagingService),s.ɵɵdirectiveInject(m.UserService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-change-kdf"]],decls:95,vars:45,consts:[["type","warning"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","kdfMasterPassword"],["id","kdfMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-group","mb-0"],["for","kdf"],["href","https://en.wikipedia.org/wiki/Key_derivation_function","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["id","kdf","name","Kdf","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],["for","kdfIterations"],["href","https://bitwarden.com/help/article/what-encryption-is-used/#pbkdf2","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["id","kdfIterations","type","number","min","5000","max","2000000","name","KdfIterations","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12"],[1,"small","form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[3,"ngValue"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"app-callout",0),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n"),s.ɵɵelementStart(4,"form",1,2),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",3),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"div",4),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"div",5),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"label",6),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"input",7),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",3),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"div",4),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",8),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"label",9),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"a",10),s.ɵɵpipe(33,"i18n"),s.ɵɵtext(34,"\n "),s.ɵɵelement(35,"i",11),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"select",12),s.ɵɵlistener("ngModelChange",(function(e){return t.kdf=e})),s.ɵɵtext(39,"\n "),s.ɵɵtemplate(40,S,2,2,"option",13),s.ɵɵtext(41,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"div",4),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"div",8),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"label",14),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"a",15),s.ɵɵpipe(54,"i18n"),s.ɵɵtext(55,"\n "),s.ɵɵelement(56,"i",11),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"input",16),s.ɵɵlistener("ngModelChange",(function(e){return t.kdfIterations=e})),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"div",17),s.ɵɵtext(64,"\n "),s.ɵɵelementStart(65,"div",5),s.ɵɵtext(66,"\n "),s.ɵɵelementStart(67,"div",18),s.ɵɵtext(68,"\n "),s.ɵɵelementStart(69,"p"),s.ɵɵtext(70),s.ɵɵpipe(71,"i18n"),s.ɵɵpipe(72,"number"),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementStart(74,"strong"),s.ɵɵtext(75),s.ɵɵpipe(76,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(77),s.ɵɵpipe(78,"i18n"),s.ɵɵpipe(79,"number"),s.ɵɵelementEnd(),s.ɵɵtext(80,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(81,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(83,"\n "),s.ɵɵelementStart(84,"button",19),s.ɵɵtext(85,"\n "),s.ɵɵelement(86,"i",20),s.ɵɵpipe(87,"i18n"),s.ɵɵtext(88,"\n "),s.ɵɵelementStart(89,"span"),s.ɵɵtext(90),s.ɵɵpipe(91,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(92,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(93,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(94,"\n")),2&e){var n=s.ɵɵreference(5);s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,17,"loggedOutWarning")),s.ɵɵadvance(3),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(15,19,"masterPass")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.masterPassword),s.ɵɵadvance(12),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,21,"kdfAlgorithm")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(33,23,"learnMore")),s.ɵɵadvance(6),s.ɵɵproperty("ngModel",t.kdf),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.kdfOptions),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(51,25,"kdfIterations")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(54,27,"learnMore")),s.ɵɵadvance(6),s.ɵɵproperty("ngModel",t.kdfIterations),s.ɵɵadvance(11),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(71,29,"kdfIterationsDesc",s.ɵɵpipeBind1(72,32,1e5))),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(76,34,"warning")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(": ",s.ɵɵpipeBind2(78,36,"kdfIterationsWarning",s.ɵɵpipeBind1(79,39,5e4)),"\n "),s.ɵɵadvance(7),s.ɵɵproperty("disabled",n.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(87,41,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(91,43,"changeKdf"))}},directives:[h.CalloutComponent,f.NgControlStatusGroup,f.NgForm,v.ApiActionDirective,f.DefaultValueAccessor,f.RequiredValidator,y.InputVerbatimDirective,f.NgControlStatus,f.NgModel,g.A11yTitleDirective,f.SelectControlValueAccessor,x.NgForOf,f.NumberValueAccessor,f.NgSelectOption,f.ɵangular_packages_forms_forms_x],pipes:[b.I18nPipe,x.DecimalPipe],encapsulation:2}),e}();t.ChangeKdfComponent=w},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8);var o=n(282),a=n(475),s=n(283),l=n(0),c=n(8),p=n(283),u=n(10),d=function(){function e(e){this.route=e}return e.prototype.ngOnInit=function(){var e=this,t=this.route.queryParams.subscribe((function(n){return r(e,void 0,void 0,(function(){return i(this,(function(e){return"families"===n.plan?(this.orgPlansComponent.plan=o.PlanType.FamiliesAnnually,this.orgPlansComponent.product=a.ProductType.Families):"teams"===n.plan?(this.orgPlansComponent.plan=o.PlanType.TeamsAnnually,this.orgPlansComponent.product=a.ProductType.Teams):"enterprise"===n.plan&&(this.orgPlansComponent.plan=o.PlanType.EnterpriseAnnually,this.orgPlansComponent.product=a.ProductType.Enterprise),null!=t&&t.unsubscribe(),[2]}))}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ActivatedRoute))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-create-organization"]],viewQuery:function(e,t){var n;(1&e&&l.ɵɵstaticViewQuery(s.OrganizationPlansComponent,!0),2&e)&&(l.ɵɵqueryRefresh(n=l.ɵɵloadQuery())&&(t.orgPlansComponent=n.first))},decls:13,vars:6,consts:[[1,"page-header"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n"),l.ɵɵelementStart(7,"p"),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n"),l.ɵɵelement(11,"app-organization-plans"),l.ɵɵtext(12,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,2,"newOrganization")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(9,4,"newOrganizationDesc")))},directives:[p.OrganizationPlansComponent],pipes:[u.I18nPipe],encapsulation:2}),e}();t.CreateOrganizationComponent=d},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3);var o=n(897),a=n(0),s=n(6),l=n(3),c=n(9),p=n(13),u=n(16),d=n(4),m=n(17),h=n(37),f=n(10);function v(e,t){1&e&&(a.ɵɵelementStart(0,"p"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",8),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",9),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",14),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",15),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"label",16),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"textarea",17),a.ɵɵlistener("ngModelChange",(function(e){a.ɵɵrestoreView(n);var r=t.index;return a.ɵɵnextContext(2).custom[r]=e})),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"button",18),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=t.index;return a.ɵɵnextContext(2).remove(e)})),a.ɵɵpipe(13,"i18n"),a.ɵɵtext(14,"\n "),a.ɵɵelement(15,"i",19),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd()}if(2&e){var r=t.index,i=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵpropertyInterpolate1("for","customDomain_",r,""),a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(6,7,"customDomainX",r+1)),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate1("name","CustomDomain[",r,"]"),a.ɵɵpropertyInterpolate1("id","customDomain_",r,""),a.ɵɵpropertyInterpolate1("placeholder","",a.ɵɵpipeBind1(9,10,"ex")," google.com, gmail.com"),a.ɵɵproperty("ngModel",i.custom[r]),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(13,12,"remove"))}}function g(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,y,18,14,"div",10),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"button",11),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().add()})),a.ɵɵtext(5,"\n "),a.ɵɵelement(6,"i",12),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"small",13),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",r.custom)("ngForTrackBy",r.indexTrackBy),a.ɵɵadvance(5),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(8,4,"newCustomDomain"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,6,"newCustomDomainDesc"))}}function x(e,t){1&e&&(a.ɵɵelementStart(0,"p"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",8),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",9),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",29),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(2).toggleExcluded(e)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",31),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"exclude"),"\n "))}function S(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",29),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(2).toggleExcluded(e)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",32),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"include"),"\n "))}var w=function(e){return{"table-list-strike":e}};function C(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",22),a.ɵɵtext(3),a.ɵɵelementEnd(),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"td",23),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",24),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"button",25),a.ɵɵpipe(10,"i18n"),a.ɵɵtext(11,"\n "),a.ɵɵelement(12,"i",26),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"div",27),a.ɵɵtext(16,"\n "),a.ɵɵtemplate(17,b,5,3,"a",28),a.ɵɵtext(18,"\n "),a.ɵɵtemplate(19,S,5,3,"a",28),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"a",29),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=t.$implicit;return a.ɵɵnextContext(2).customize(e)})),a.ɵɵtext(22,"\n "),a.ɵɵelement(23,"i",30),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd()}if(2&e){var r=t.$implicit;a.ɵɵadvance(2),a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(10,w,r.excluded)),a.ɵɵadvance(1),a.ɵɵtextInterpolate(r.domains),a.ɵɵadvance(6),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(10,6,"options")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",!r.excluded),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.excluded),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(25,8,"customize"),"\n ")}}function I(e,t){if(1&e&&(a.ɵɵelementStart(0,"table",20),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,C,30,12,"tr",21),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",n.global)}}var E=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n,this.loading=!0,this.custom=[],this.global=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.getSettingsDomains()];case 1:return e=t.sent(),this.loading=!1,null!=e.equivalentDomains&&(this.custom=e.equivalentDomains.map((function(e){return e.join(", ")}))),null!=e.globalEquivalentDomains&&(this.global=e.globalEquivalentDomains.map((function(e){return{domains:e.domains.join(", "),excluded:e.excluded,key:e.type}}))),[2]}}))}))},e.prototype.toggleExcluded=function(e){e.excluded=!e.excluded},e.prototype.customize=function(e){e.excluded=!0,this.custom.push(e.domains)},e.prototype.remove=function(e){this.custom.splice(e,1)},e.prototype.add=function(){this.custom.push("")},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:(e=new o.UpdateDomainsRequest).excludedGlobalEquivalentDomains=this.global.filter((function(e){return e.excluded})).map((function(e){return e.key})),0===e.excludedGlobalEquivalentDomains.length&&(e.excludedGlobalEquivalentDomains=null),e.equivalentDomains=this.custom.filter((function(e){return null!=e&&""!==e.trim()})).map((function(e){return e.split(",").map((function(e){return e.trim()}))})),0===e.equivalentDomains.length&&(e.equivalentDomains=null),t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.apiService.putSettingsDomains(e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("domainsUpdated")),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.indexTrackBy=function(e,t){return e},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.ToasterService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-domain-rules"]],decls:51,vars:31,consts:[[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"spaced-header"],["class","table table-hover table-list",4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["class","form-group d-flex",4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"btn","btn-outline-secondary","btn-sm","mb-2",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],[1,"text-muted","d-block","mb-3"],[1,"form-group","d-flex"],[1,"flex-fill"],[1,"sr-only",3,"for"],["required","",1,"form-control",3,"name","id","ngModel","placeholder","ngModelChange"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-minus-circle","fa-lg"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-scissors"],["aria-hidden","true",1,"fa","fa-fw","fa-close"],["aria-hidden","true",1,"fa","fa-fw","fa-plus"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n"),a.ɵɵelementStart(7,"p"),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n"),a.ɵɵelementStart(11,"form",1,2),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"h2"),a.ɵɵtext(15),a.ɵɵpipe(16,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵtemplate(18,v,9,6,"p",3),a.ɵɵtext(19,"\n "),a.ɵɵtemplate(20,g,14,8,"ng-container",3),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"button",4),a.ɵɵtext(23,"\n "),a.ɵɵelement(24,"i",5),a.ɵɵpipe(25,"i18n"),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"span"),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"h2",6),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵtemplate(36,x,9,6,"p",3),a.ɵɵtext(37,"\n "),a.ɵɵtemplate(38,I,7,1,"table",7),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"button",4),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"i",5),a.ɵɵpipe(43,"i18n"),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"span"),a.ɵɵtext(46),a.ɵɵpipe(47,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n")),2&e){var n=a.ɵɵreference(12);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,15,"domainRules")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,17,"domainRulesDesc")),a.ɵɵadvance(3),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(16,19,"customEqDomains")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading),a.ɵɵadvance(2),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(25,21,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,23,"save")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,25,"globalEqDomains")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading&&t.global.length>0),a.ɵɵadvance(2),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(43,27,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(47,29,"save"))}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,d.NgIf,d.NgForOf,p.DefaultValueAccessor,p.RequiredValidator,p.NgControlStatus,p.NgModel,m.A11yTitleDirective,d.NgClass,h.StopClickDirective],pipes:[f.I18nPipe],encapsulation:2}),e}();t.DomainRulesComponent=E},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(3),n(14),n(5),n(38),n(41),n(93);var o=n(70),a=n(30),s=n(0),l=n(41),c=n(38),p=n(3),u=n(9),d=n(93),m=n(5),h=n(14),f=n(13),v=n(4),y=n(17),g=n(10);function x(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=t.$implicit;s.ɵɵproperty("ngValue",n.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(n.name)}}function b(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=t.$implicit;s.ɵɵproperty("ngValue",n.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(n.name)}}var S=function(){function e(e,t,n,r,i,o,s){this.storageService=e,this.stateService=t,this.i18nService=n,this.toasterService=r,this.vaultTimeoutService=i,this.platformUtilsService=o,this.messagingService=s,this.vaultTimeout=null,this.vaultTimeoutAction="lock",this.vaultTimeouts=[{name:n.t("oneMinute"),value:1},{name:n.t("fiveMinutes"),value:5},{name:n.t("fifteenMinutes"),value:15},{name:n.t("thirtyMinutes"),value:30},{name:n.t("oneHour"),value:60},{name:n.t("fourHours"),value:240},{name:n.t("onRefresh"),value:-1}],this.platformUtilsService.isDev()&&this.vaultTimeouts.push({name:n.t("never"),value:null});var l=[];n.supportedTranslationLocales.forEach((function(e){var t=e;n.localeNames.has(e)&&(t+=" - "+n.localeNames.get(e)),l.push({name:t,value:e})})),l.sort(a.Utils.getSortFunction(n,"name")),l.splice(0,0,{name:n.t("default"),value:null}),this.localeOptions=l}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,a,s,l;return i(this,(function(i){switch(i.label){case 0:return e=this,[4,this.storageService.get(o.ConstantsService.vaultTimeoutKey)];case 1:return e.vaultTimeout=i.sent(),t=this,[4,this.storageService.get(o.ConstantsService.vaultTimeoutActionKey)];case 2:return t.vaultTimeoutAction=i.sent(),n=this,[4,this.storageService.get(o.ConstantsService.disableFaviconKey)];case 3:return n.disableIcons=i.sent(),r=this,[4,this.storageService.get("enableGravatars")];case 4:return r.enableGravatars=i.sent(),a=this,[4,this.storageService.get("enableFullWidth")];case 5:return a.enableFullWidth=i.sent(),s=this,l=this,[4,this.storageService.get(o.ConstantsService.localeKey)];case 6:return s.locale=l.startingLocale=i.sent(),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.vaultTimeoutService.setVaultTimeoutOptions(null!=this.vaultTimeout?this.vaultTimeout:null,this.vaultTimeoutAction)];case 1:return e.sent(),[4,this.storageService.save(o.ConstantsService.disableFaviconKey,this.disableIcons)];case 2:return e.sent(),[4,this.stateService.save(o.ConstantsService.disableFaviconKey,this.disableIcons)];case 3:return e.sent(),[4,this.storageService.save("enableGravatars",this.enableGravatars)];case 4:return e.sent(),[4,this.stateService.save("enableGravatars",this.enableGravatars)];case 5:return e.sent(),[4,this.storageService.save("enableFullWidth",this.enableFullWidth)];case 6:return e.sent(),this.messagingService.send("setFullWidth"),[4,this.storageService.save(o.ConstantsService.localeKey,this.locale)];case 7:return e.sent(),this.locale!==this.startingLocale?window.location.reload():this.toasterService.popAsync("success",null,this.i18nService.t("optionsUpdated")),[2]}}))}))},e.prototype.vaultTimeoutActionChanged=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return"logOut"!==e?[3,2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("vaultTimeoutLogOutConfirmation"),this.i18nService.t("vaultTimeoutLogOutConfirmationTitle"),this.i18nService.t("yes"),this.i18nService.t("cancel"),"warning")];case 1:if(!t.sent())return this.vaultTimeoutAction="lock",[2];t.label=2;case 2:return this.vaultTimeoutAction=e,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.StorageService),s.ɵɵdirectiveInject(c.StateService),s.ɵɵdirectiveInject(p.I18nService),s.ɵɵdirectiveInject(u.ToasterService),s.ɵɵdirectiveInject(d.VaultTimeoutService),s.ɵɵdirectiveInject(m.PlatformUtilsService),s.ɵɵdirectiveInject(h.MessagingService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-options"]],decls:164,vars:72,consts:[[1,"page-header"],["ngNativeValidate","",3,"ngSubmit"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","vaultTimeout"],["id","vaultTimeout","name","VaultTimeout",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-text","text-muted"],[1,"form-check","form-check-block"],["type","radio","name","vaultTimeoutAction","id","vaultTimeoutActionLock","value","lock",1,"form-check-input",3,"ngModel","ngModelChange"],["for","vaultTimeoutActionLock",1,"form-check-label"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","vaultTimeoutAction","id","vaultTimeoutActionLogOut","value","logOut",1,"form-check-input",3,"ngModel","ngModelChange"],["for","vaultTimeoutActionLogOut",1,"form-check-label"],[1,"d-flex"],["for","locale"],["href","https://help.bitwarden.com/article/localization/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["id","locale","name","Locale",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-check"],["type","checkbox","id","disableIcons","name","DisableIcons",1,"form-check-input",3,"ngModel","ngModelChange"],["for","disableIcons",1,"form-check-label"],["href","https://help.bitwarden.com/article/website-icons/","target","_blank","rel","noopener",3,"appA11yTitle"],["type","checkbox","id","enableGravatars","name","enableGravatars",1,"form-check-input",3,"ngModel","ngModelChange"],["for","enableGravatars",1,"form-check-label"],["href","https://gravatar.com/","target","_blank","rel","noopener",3,"appA11yTitle"],["type","checkbox","id","enableFullWidth","name","enableFullWidth",1,"form-check-input",3,"ngModel","ngModelChange"],["for","enableFullWidth",1,"form-check-label"],["type","submit",1,"btn","btn-primary"],[3,"ngValue"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵelementStart(7,"p"),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n"),s.ɵɵelementStart(11,"form",1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",2),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",3),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",4),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"label",5),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"select",6),s.ɵɵlistener("ngModelChange",(function(e){return t.vaultTimeout=e})),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,x,2,2,"option",7),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"small",8),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"div",4),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"label"),s.ɵɵtext(38),s.ɵɵpipe(39,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"div",9),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"input",10),s.ɵɵlistener("ngModelChange",(function(e){return t.vaultTimeoutAction=e})),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"label",11),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementStart(48,"small"),s.ɵɵtext(49),s.ɵɵpipe(50,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementStart(54,"div",12),s.ɵɵtext(55,"\n "),s.ɵɵelementStart(56,"input",13),s.ɵɵlistener("ngModelChange",(function(e){return t.vaultTimeoutAction=e}))("ngModelChange",(function(e){return t.vaultTimeoutActionChanged(e)})),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementStart(58,"label",14),s.ɵɵtext(59),s.ɵɵpipe(60,"i18n"),s.ɵɵelementStart(61,"small"),s.ɵɵtext(62),s.ɵɵpipe(63,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(67,"\n "),s.ɵɵelementStart(68,"div",2),s.ɵɵtext(69,"\n "),s.ɵɵelementStart(70,"div",3),s.ɵɵtext(71,"\n "),s.ɵɵelementStart(72,"div",4),s.ɵɵtext(73,"\n "),s.ɵɵelementStart(74,"div",15),s.ɵɵtext(75,"\n "),s.ɵɵelementStart(76,"label",16),s.ɵɵtext(77),s.ɵɵpipe(78,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(79,"\n "),s.ɵɵelementStart(80,"a",17),s.ɵɵpipe(81,"i18n"),s.ɵɵtext(82,"\n "),s.ɵɵelement(83,"i",18),s.ɵɵtext(84,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(86,"\n "),s.ɵɵelementStart(87,"select",19),s.ɵɵlistener("ngModelChange",(function(e){return t.locale=e})),s.ɵɵtext(88,"\n "),s.ɵɵtemplate(89,b,2,2,"option",7),s.ɵɵtext(90,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"small",8),s.ɵɵtext(93),s.ɵɵpipe(94,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(95,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(96,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(98,"\n "),s.ɵɵelementStart(99,"div",4),s.ɵɵtext(100,"\n "),s.ɵɵelementStart(101,"div",20),s.ɵɵtext(102,"\n "),s.ɵɵelementStart(103,"input",21),s.ɵɵlistener("ngModelChange",(function(e){return t.disableIcons=e})),s.ɵɵelementEnd(),s.ɵɵtext(104,"\n "),s.ɵɵelementStart(105,"label",22),s.ɵɵtext(106),s.ɵɵpipe(107,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(108,"\n "),s.ɵɵelementStart(109,"a",23),s.ɵɵpipe(110,"i18n"),s.ɵɵtext(111,"\n "),s.ɵɵelement(112,"i",18),s.ɵɵtext(113,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(114,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(115,"\n "),s.ɵɵelementStart(116,"small",8),s.ɵɵtext(117),s.ɵɵpipe(118,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(119,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(120,"\n "),s.ɵɵelementStart(121,"div",4),s.ɵɵtext(122,"\n "),s.ɵɵelementStart(123,"div",20),s.ɵɵtext(124,"\n "),s.ɵɵelementStart(125,"input",24),s.ɵɵlistener("ngModelChange",(function(e){return t.enableGravatars=e})),s.ɵɵelementEnd(),s.ɵɵtext(126,"\n "),s.ɵɵelementStart(127,"label",25),s.ɵɵtext(128),s.ɵɵpipe(129,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(130,"\n "),s.ɵɵelementStart(131,"a",26),s.ɵɵpipe(132,"i18n"),s.ɵɵtext(133,"\n "),s.ɵɵelement(134,"i",18),s.ɵɵtext(135,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(136,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(137,"\n "),s.ɵɵelementStart(138,"small",8),s.ɵɵtext(139),s.ɵɵpipe(140,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(141,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(142,"\n\t"),s.ɵɵelementStart(143,"div",4),s.ɵɵtext(144,"\n "),s.ɵɵelementStart(145,"div",20),s.ɵɵtext(146,"\n "),s.ɵɵelementStart(147,"input",27),s.ɵɵlistener("ngModelChange",(function(e){return t.enableFullWidth=e})),s.ɵɵelementEnd(),s.ɵɵtext(148,"\n "),s.ɵɵelementStart(149,"label",28),s.ɵɵtext(150),s.ɵɵpipe(151,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(152,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(153,"\n "),s.ɵɵelementStart(154,"small",8),s.ɵɵtext(155),s.ɵɵpipe(156,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(157,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(158,"\n "),s.ɵɵelementStart(159,"button",29),s.ɵɵtext(160),s.ɵɵpipe(161,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(162,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(163,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,30,"options")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,32,"optionsDesc")),s.ɵɵadvance(12),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(21,34,"vaultTimeout")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.vaultTimeout),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.vaultTimeouts),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,36,"vaultTimeoutDesc")),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(39,38,"vaultTimeoutAction")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",t.vaultTimeoutAction),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(47,40,"lock"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(50,42,"vaultTimeoutActionLockDesc")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.vaultTimeoutAction),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(60,44,"logOut"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(63,46,"vaultTimeoutActionLogOutDesc")),s.ɵɵadvance(15),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(78,48,"language")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(81,50,"learnMore")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.locale),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.localeOptions),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(94,52,"languageDesc")),s.ɵɵadvance(10),s.ɵɵproperty("ngModel",t.disableIcons),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(107,54,"disableIcons"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(110,56,"learnMore")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(118,58,"disableIconsDesc")),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",t.enableGravatars),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(129,60,"enableGravatars"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(132,62,"learnMore")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(140,64,"enableGravatarsDesc")),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",t.enableFullWidth),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(151,66,"enableFullWidth"),"\n "),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(156,68,"enableFullWidthDesc")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(161,70,"save"),"\n "))},directives:[f.NgControlStatusGroup,f.NgForm,f.SelectControlValueAccessor,f.NgControlStatus,f.NgModel,v.NgForOf,f.RadioControlValueAccessor,f.DefaultValueAccessor,y.A11yTitleDirective,f.CheckboxControlValueAccessor,f.NgSelectOption,f.ɵangular_packages_forms_forms_x],pipes:[g.I18nPipe],encapsulation:2}),e}();t.OptionsComponent=S},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(6),n(58),n(104),n(3),n(36),n(5),n(38),n(41);var s=n(555),l=(n(295),n(0)),c=n(5),p=n(3),u=n(6),d=n(58),m=n(8),h=n(104),f=n(36),v=n(41),y=n(38),g=n(37),x=n(10),b=function(e){function t(t,n,r,i,o,a,s,l,c,p){var u=e.call(this,i,o,n,a,c,p,t,r,s,l)||this;return u.returnUri="/settings/organizations",u.returnUri="/settings/organizations",u.redirectUri=window.location.origin+"/sso-connector.html",u.clientId="web",u}return i(t,e),t.prototype.ngAfterContentInit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return this.identifier=this.organization.identifier,[2]}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.PlatformUtilsService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ApiService),l.ɵɵdirectiveInject(d.AuthService),l.ɵɵdirectiveInject(m.Router),l.ɵɵdirectiveInject(m.ActivatedRoute),l.ɵɵdirectiveInject(h.CryptoFunctionService),l.ɵɵdirectiveInject(f.PasswordGenerationService),l.ɵɵdirectiveInject(v.StorageService),l.ɵɵdirectiveInject(y.StateService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-link-sso"]],inputs:{organization:"organization"},features:[l.ɵɵInheritDefinitionFeature],decls:6,vars:3,consts:[["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-link"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"a",0),l.ɵɵlistener("click",(function(){return t.submit(t.returnUri,!0)})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",1),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,1,"linkSso"),"\n"))},directives:[g.StopClickDirective],pipes:[x.I18nPipe],encapsulation:2}),t}(s.SsoComponent);t.LinkSsoComponent=b},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(14),n(5),n(61),n(103),n(7);var o=n(117),a=n(142),s=n(0),l=n(6),c=n(3),p=n(9),u=n(5),d=n(103),m=n(8),h=n(14),f=n(61),v=n(7),y=n(4),g=n(24),x=n(13),b=n(16),S=n(117),w=n(142),C=n(10);function I(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",9),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"youHavePremiumAccess")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(3,4,"alreadyPremiumFromOrg"),"\n"))}function E(e,t){1&e&&(s.ɵɵelementStart(0,"a",10),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"purchasePremium"),"\n "))}function P(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"form",11,12),s.ɵɵlistener("ngSubmit",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().submit()})),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"div",13),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"label",14),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelement(15,"input",15),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"small",16),s.ɵɵtext(18),s.ɵɵpipe(19,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"button",17),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"i",18),s.ɵɵpipe(25,"i18n"),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"span"),s.ɵɵtext(28),s.ɵɵpipe(29,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n"),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵreference(7),i=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,7,"uploadLicenseFilePremium")),s.ɵɵadvance(3),s.ɵɵproperty("appApiAction",i.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,9,"licenseFile")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(19,11,"licenseFileDesc","bitwarden_premium_license.json")),s.ɵɵadvance(4),s.ɵɵproperty("disabled",r.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(25,14,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(29,16,"submit"))}}function k(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",11,12),s.ɵɵlistener("ngSubmit",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"h2",19),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",20),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"div",21),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"label",22),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"input",23),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().additionalStorage=e})),s.ɵɵpipe(16,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"small",24),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵpipe(21,"currency"),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"h2",25),s.ɵɵtext(27),s.ɵɵpipe(28,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵpipe(31,"currency"),s.ɵɵelement(32,"br"),s.ɵɵtext(33),s.ɵɵpipe(34,"i18n"),s.ɵɵpipe(35,"currency"),s.ɵɵpipe(36,"currency"),s.ɵɵelement(37,"hr",26),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"h2",27),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelement(43,"app-payment",28),s.ɵɵtext(44,"\n "),s.ɵɵelement(45,"app-tax-info"),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"div",29),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"div",30),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵpipe(52,"currency"),s.ɵɵelement(53,"br"),s.ɵɵtext(54,"\n "),s.ɵɵelementContainerStart(55),s.ɵɵtext(56),s.ɵɵpipe(57,"i18n"),s.ɵɵpipe(58,"currency"),s.ɵɵelementContainerEnd(),s.ɵɵtext(59,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelement(61,"hr",31),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"p",32),s.ɵɵelementStart(64,"strong"),s.ɵɵtext(65),s.ɵɵpipe(66,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(67),s.ɵɵpipe(68,"currency"),s.ɵɵpipe(69,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(70,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(71,"\n "),s.ɵɵelementStart(72,"small",33),s.ɵɵtext(73),s.ɵɵpipe(74,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementStart(76,"button",17),s.ɵɵtext(77,"\n "),s.ɵɵelement(78,"i",18),s.ɵɵpipe(79,"i18n"),s.ɵɵtext(80,"\n "),s.ɵɵelementStart(81,"span"),s.ɵɵtext(82),s.ɵɵpipe(83,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(84,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵreference(1),i=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",i.formPromise),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(5,26,"addons")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,28,"additionalStorageGb")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("placeholder",s.ɵɵpipeBind1(16,30,"additionalStorageGbDesc")),s.ɵɵproperty("ngModel",i.additionalStorage),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind4(20,32,"additionalStorageIntervalDesc","1 GB",s.ɵɵpipeBind2(21,37,i.storageGbPrice,"$"),s.ɵɵpipeBind1(22,40,"year"))),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(28,42,"summary")),s.ɵɵadvance(2),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(30,44,"premiumMembership"),": ",s.ɵɵpipeBind2(31,46,i.premiumPrice,"$"),"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate4(" ",s.ɵɵpipeBind1(34,49,"additionalStorageGb"),": ",i.additionalStorage||0," GB × ",s.ɵɵpipeBind2(35,51,i.storageGbPrice,"$")," = ",s.ɵɵpipeBind2(36,54,i.additionalStorageTotal,"$"),"\n "),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,57,"paymentInformation")),s.ɵɵadvance(3),s.ɵɵproperty("hideBank",!0),s.ɵɵadvance(7),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(51,59,"planPrice"),": ",s.ɵɵpipeBind2(52,61,i.subtotal,"USD $"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(57,64,"estimatedTax"),": ",s.ɵɵpipeBind2(58,66,i.taxCharges,"USD $"),"\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(66,69,"total"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind2(68,71,i.total,"USD $"),"/",s.ɵɵpipeBind1(69,74,"year"),""),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(74,76,"paymentChargedAnnually")),s.ɵɵadvance(3),s.ɵɵproperty("disabled",r.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(79,78,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(83,80,"submit"))}}var _=function(e){return{"mb-0":e}},A=function(){function e(e,t,n,r,i,o,a,s,l){this.apiService=e,this.i18nService=t,this.toasterService=n,this.tokenService=i,this.router=o,this.messagingService=a,this.syncService=s,this.userService=l,this.canAccessPremium=!1,this.selfHosted=!1,this.premiumPrice=10,this.storageGbPrice=4,this.additionalStorage=0,this.selfHosted=r.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.userService.canAccessPremium()];case 1:return e.canAccessPremium=t.sent(),[4,this.tokenService.getPremium()];case 2:return t.sent()?(this.router.navigate(["/settings/subscription"]),[2]):[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r=this;return i(this,(function(i){switch(i.label){case 0:if(e=null,this.selfHosted&&(t=document.getElementById("file"),null==(e=t.files)||0===e.length))return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),[2];i.label=1;case 1:if(i.trys.push([1,3,,4]),this.selfHosted){if(!this.tokenService.getEmailVerified())return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verifyEmailFirst")),[2];(n=new FormData).append("license",e[0]),this.formPromise=this.apiService.postAccountLicense(n).then((function(){return r.finalizePremium()}))}else this.formPromise=this.paymentComponent.createPaymentToken().then((function(e){var t=new FormData;return t.append("paymentMethodType",e[1].toString()),null!=e[0]&&t.append("paymentToken",e[0]),t.append("additionalStorageGb",(r.additionalStorage||0).toString()),t.append("country",r.taxInfoComponent.taxInfo.country),t.append("postalCode",r.taxInfoComponent.taxInfo.postalCode),r.apiService.postPremium(t)})).then((function(e){return e.success||null==e.paymentIntentClientSecret?r.finalizePremium():r.paymentComponent.handleStripeCardPayment(e.paymentIntentClientSecret,(function(){return r.finalizePremium()}))}));return[4,this.formPromise];case 2:return i.sent(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.finalizePremium=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.apiService.refreshIdentityToken()];case 1:return e.sent(),[4,this.syncService.fullSync(!0)];case 2:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("premiumUpdated")),this.messagingService.send("purchasedPremium"),this.router.navigate(["/settings/subscription"]),[2]}}))}))},Object.defineProperty(e.prototype,"additionalStorageTotal",{get:function(){return this.storageGbPrice*Math.abs(this.additionalStorage||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subtotal",{get:function(){return this.premiumPrice+this.additionalStorageTotal},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"taxCharges",{get:function(){return null!=this.taxInfoComponent&&null!=this.taxInfoComponent.taxRate?this.taxInfoComponent.taxRate/100*this.subtotal:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.subtotal+this.taxCharges||0},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.ToasterService),s.ɵɵdirectiveInject(u.PlatformUtilsService),s.ɵɵdirectiveInject(d.TokenService),s.ɵɵdirectiveInject(m.Router),s.ɵɵdirectiveInject(h.MessagingService),s.ɵɵdirectiveInject(f.SyncService),s.ɵɵdirectiveInject(v.UserService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-premium"]],viewQuery:function(e,t){var n;(1&e&&(s.ɵɵviewQuery(o.PaymentComponent,!0),s.ɵɵviewQuery(a.TaxInfoComponent,!0)),2&e)&&(s.ɵɵqueryRefresh(n=s.ɵɵloadQuery())&&(t.paymentComponent=n.first),s.ɵɵqueryRefresh(n=s.ɵɵloadQuery())&&(t.taxInfoComponent=n.first))},decls:72,vars:41,consts:[[1,"page-header"],["type","info","icon","fa-star",3,"title",4,"ngIf"],["type","success"],[1,"fa-ul"],["aria-hidden","true",1,"fa","fa-check","text-success","fa-li"],[1,"text-lg",3,"ngClass"],["href","https://vault.bitwarden.com/#/settings/premium","target","_blank","rel","noopener","class","btn btn-outline-secondary",4,"ngIf"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["type","info","icon","fa-star",3,"title"],["href","https://vault.bitwarden.com/#/settings/premium","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"mt-5"],[1,"row"],[1,"form-group","col-6"],["for","additionalStorage"],["id","additionalStorage","type","number","name","AdditionalStorageGb","min","0","max","99","step","1",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"text-muted","form-text"],[1,"spaced-header"],[1,"my-3"],[1,"spaced-header","mb-4"],[3,"hideBank"],["id","price",1,"my-4"],[1,"text-muted","text-sm"],[1,"my-1","col-3","ml-0"],[1,"text-lg"],[1,"text-muted","font-italic"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,I,4,6,"app-callout",1),s.ɵɵtext(8,"\n"),s.ɵɵelementStart(9,"app-callout",2),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"p"),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"ul",3),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"li"),s.ɵɵtext(18,"\n "),s.ɵɵelement(19,"i",4),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"li"),s.ɵɵtext(24,"\n "),s.ɵɵelement(25,"i",4),s.ɵɵtext(26),s.ɵɵpipe(27,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"li"),s.ɵɵtext(30,"\n "),s.ɵɵelement(31,"i",4),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"li"),s.ɵɵtext(36,"\n "),s.ɵɵelement(37,"i",4),s.ɵɵtext(38),s.ɵɵpipe(39,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"li"),s.ɵɵtext(42,"\n "),s.ɵɵelement(43,"i",4),s.ɵɵtext(44),s.ɵɵpipe(45,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"li"),s.ɵɵtext(48,"\n "),s.ɵɵelement(49,"i",4),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"li"),s.ɵɵtext(54,"\n "),s.ɵɵelement(55,"i",4),s.ɵɵtext(56),s.ɵɵpipe(57,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n "),s.ɵɵelementStart(60,"p",5),s.ɵɵtext(61),s.ɵɵpipe(62,"i18n"),s.ɵɵpipe(63,"currency"),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵtemplate(65,E,3,3,"a",6),s.ɵɵtext(66,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(67,"\n"),s.ɵɵtemplate(68,P,33,18,"ng-container",7),s.ɵɵtext(69,"\n"),s.ɵɵtemplate(70,k,86,82,"form",8),s.ɵɵtext(71,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,15,"goPremium")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.canAccessPremium),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,17,"premiumUpgradeUnlockFeatures")),s.ɵɵadvance(8),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(21,19,"premiumSignUpStorage"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(27,21,"premiumSignUpTwoStep"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(33,23,"premiumSignUpEmergency"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(39,25,"premiumSignUpReports"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(45,27,"premiumSignUpTotp"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(51,29,"premiumSignUpSupport"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(57,31,"premiumSignUpFuture"),"\n "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(39,_,!t.selfHosted)),s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(62,33,"premiumPrice",s.ɵɵpipeBind2(63,36,t.premiumPrice,"$"))),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.selfHosted),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.selfHosted),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.selfHosted))},directives:[y.NgIf,g.CalloutComponent,y.NgClass,x.NgControlStatusGroup,x.NgForm,b.ApiActionDirective,x.NumberValueAccessor,x.DefaultValueAccessor,x.NgControlStatus,x.NgModel,S.PaymentComponent,w.TaxInfoComponent],pipes:[C.I18nPipe,y.CurrencyPipe],encapsulation:2}),e}();t.PremiumComponent=A},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(5),n(103),n(112);var o=n(0),a=n(103),s=n(112),l=n(5),c=n(8),p=n(4),u=n(10);function d(e,t){1&e&&(o.ɵɵelementStart(0,"a",16),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"premiumMembership"),"\n "))}function m(e,t){1&e&&(o.ɵɵelementStart(0,"a",17),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"goPremium"),"\n "))}function h(e,t){1&e&&(o.ɵɵelementStart(0,"a",18),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"billing"),"\n "))}var f=function(){function e(e,t,n,r){this.tokenService=e,this.broadcasterService=t,this.ngZone=n,this.platformUtilsService=r}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return this.broadcasterService.subscribe("SettingsComponent",(function(e){return r(t,void 0,void 0,(function(){var t=this;return i(this,(function(n){return this.ngZone.run((function(){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:switch(e.command){case"purchasedPremium":return[3,1]}return[3,3];case 1:return[4,this.load()];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))})),[2]}))}))})),e=this,[4,this.platformUtilsService.isSelfHost()];case 1:return e.selfHosted=n.sent(),[4,this.load()];case 2:return n.sent(),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe("SettingsComponent")},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.tokenService.getPremium()];case 1:return e.premium=t.sent(),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.TokenService),o.ɵɵdirectiveInject(s.BroadcasterService),o.ɵɵdirectiveInject(o.NgZone),o.ɵɵdirectiveInject(l.PlatformUtilsService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-settings"]],decls:54,vars:24,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],["routerLink","options","routerLinkActive","active",1,"list-group-item"],["routerLink","organizations","routerLinkActive","active",1,"list-group-item"],["routerLink","subscription","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","premium","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","billing","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","two-factor","routerLinkActive","active",1,"list-group-item"],["routerLink","domain-rules","routerLinkActive","active",1,"list-group-item"],["routerLink","emergency-access","routerLinkActive","active",1,"list-group-item"],[1,"col-9"],["routerLink","subscription","routerLinkActive","active",1,"list-group-item"],["routerLink","premium","routerLinkActive","active",1,"list-group-item"],["routerLink","billing","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",5),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"a",6),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"a",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"a",8),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,d,3,3,"a",9),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,m,3,3,"a",10),o.ɵɵtext(29,"\n "),o.ɵɵtemplate(30,h,3,3,"a",11),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"a",12),o.ɵɵtext(33),o.ɵɵpipe(34,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"a",13),o.ɵɵtext(37),o.ɵɵpipe(38,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"a",14),o.ɵɵtext(41),o.ɵɵpipe(42,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"div",15),o.ɵɵtext(48,"\n "),o.ɵɵelement(49,"router-outlet"),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,10,"settings")),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(16,12,"myAccount"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(20,14,"options"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(24,16,"organizations"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.premium),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.premium),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.selfHosted),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(34,18,"twoStepLogin"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(38,20,"domainRules"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(42,22,"emergencyAccess"),"\n "))},directives:[c.RouterLinkWithHref,c.RouterLinkActive,p.NgIf,c.RouterOutlet],pipes:[u.I18nPipe],encapsulation:2}),e}();t.SettingsComponent=f},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(6),n(3),n(5),n(103);var o=n(0),a=n(103),s=n(6),l=n(5),c=n(3),p=n(9),u=n(8),d=n(4),m=n(24),h=n(16),f=n(17),v=n(474),y=n(476),g=n(10);function x(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",2),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",2),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",6),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"canceled")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"subscriptionCanceled"),""))}function w(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-callout",6),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"p"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"button",7,8),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(2).reinstate()})),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"i",9),o.ɵɵpipe(11,"i18n"),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"span"),o.ɵɵtext(14),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()}if(2&e){var r=o.ɵɵreference(8),i=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,6,"pendingCancellation")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(5,8,"subscriptionPendingCanceled")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",i.reinstatePromise)("disabled",r.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(11,10,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(15,12,"reinstateSubscription"))}}function C(e,t){if(1&e&&(o.ɵɵelementStart(0,"dd"),o.ɵɵtext(1),o.ɵɵpipe(2,"date"),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(2,1,n.sub.expiration,"mediumDate"))}}function I(e,t){1&e&&(o.ɵɵelementStart(0,"dd"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"neverExpires")))}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"dl"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"dt"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,C,3,4,"dd",1),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,I,3,3,"dd",1),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"expiration")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",n.sub.expiration),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.sub.expiration)}}function P(e,t){1&e&&(o.ɵɵelementStart(0,"span",15),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"pendingCancellation")))}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7),o.ɵɵpipe(8,"currency"),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd()),2&e){var n=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate3("\n ",n.name," ",n.quantity>1?"×"+n.quantity:""," @ ",o.ɵɵpipeBind2(4,5,n.amount,"$"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate2("\n ",o.ɵɵpipeBind2(8,8,n.quantity*n.amount,"$")," /",o.ɵɵpipeBind1(9,11,n.interval),"\n ")}}function _(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"strong",17),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"table",18),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"tbody"),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,k,11,13,"tr",19),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"details")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",n.subscription.items)}}function A(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",10),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",11),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"dl"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"dt"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"dd"),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span",12),o.ɵɵtext(13),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,P,3,3,"span",13),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"dt"),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"dd"),o.ɵɵtext(23),o.ɵɵpipe(24,"date"),o.ɵɵpipe(25,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,_,14,4,"div",14),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"status")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(n.subscription&&n.subscription.status||"-"),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,8,"nextCharge")),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("",n.nextInvoice?o.ɵɵpipeBind2(24,10,n.nextInvoice.date,"mediumDate")+", "+o.ɵɵpipeBind2(25,13,n.nextInvoice.amount,"$"):"-","\n "),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",n.subscription)}}function O(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",23),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",24),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"button",25),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(3).closeUpdateLicense(!1)})),o.ɵɵpipe(5,"i18n"),o.ɵɵelementStart(6,"span",26),o.ɵɵtext(7,"×"),o.ɵɵelementEnd(),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h3",27),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"app-update-license",28),o.ɵɵlistener("onUpdated",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(3).closeUpdateLicense(!1)})),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(5,2,"cancel")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,4,"updateLicense")))}function T(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"button",20),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(2).updateLicense()})),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"a",21),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,O,17,6,"div",22),o.ɵɵtext(14,"\n "),o.ɵɵelementContainerEnd()}if(2&e){var r=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,3,"updateLicense"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,5,"manageSubscription"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",r.showUpdateLicense)}}function M(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",20),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(3).downloadLicense()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"downloadLicense"),"\n "))}function B(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",35,36),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(3).cancel()})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",9),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){var r=o.ɵɵreference(1),i=o.ɵɵnextContext(3);o.ɵɵproperty("appApiAction",i.cancelPromise)("disabled",r.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function D(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",29),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",20),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(4).adjustStorage(!0)})),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"button",40),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(4).adjustStorage(!1)})),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,2,"addStorage"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,4,"removeStorage"),"\n "))}function R(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-adjust-storage",41),o.ɵɵlistener("onAdjusted",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext(4).closeStorage(!1)})),o.ɵɵelementEnd()}if(2&e){var r=o.ɵɵnextContext(4);o.ɵɵproperty("storageGbPrice",4)("add",r.adjustStorageAdd)}}function V(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",37),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,D,10,6,"div",38),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,R,1,2,"app-adjust-storage",39),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!n.showAdjustStorage),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.showAdjustStorage)}}var j=function(e){return{width:e}};function F(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",29),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,M,3,3,"button",30),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,B,10,8,"button",31),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",32),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"p"),o.ɵɵtext(14),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",33),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",34),o.ɵɵtext(20),o.ɵɵpipe(21,"percent"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,V,9,2,"ng-container",1),o.ɵɵtext(25,"\n "),o.ɵɵelementContainerEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!n.subscription||!n.subscription.cancelled),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,8,"storage")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind3(15,10,"subscriptionStorage",n.sub.maxStorageGb||0,n.sub.storageName||"0 MB")),o.ɵɵadvance(5),o.ɵɵproperty("ngStyle",o.ɵɵpureFunction1(16,j,n.storageProgressWidth+"%")),o.ɵɵattribute("aria-valuenow",n.storagePercentage),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(21,14,n.storagePercentage/100),""),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel)}}function U(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,S,4,6,"app-callout",4),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,w,18,14,"app-callout",4),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,E,10,5,"dl",1),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,A,31,16,"div",5),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,T,15,7,"ng-container",1),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,F,26,18,"ng-container",1),o.ɵɵtext(13,"\n"),o.ɵɵelementContainerEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.subscription&&n.subscription.cancelled),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.selfHosted),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.selfHosted),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.selfHosted),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.selfHosted)}}var N=function(){function e(e,t,n,r,i,o){this.tokenService=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=r,this.toasterService=i,this.router=o,this.loading=!1,this.firstLoaded=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.selfHosted=!1,this.selfHosted=n.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.loading?[2]:this.tokenService.getPremium()?(this.loading=!0,e=this,[4,this.apiService.getUserSubscription()]):[3,2];case 1:return e.sub=t.sent(),[3,3];case 2:return this.router.navigate(["/settings/premium"]),[2];case 3:return this.loading=!1,[2]}}))}))},e.prototype.reinstate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.usingInAppPurchase?(this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning"),[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel"))];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.reinstatePromise=this.apiService.postReinstatePremium(),[4,this.reinstatePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("reinstated")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.cancel=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.usingInAppPurchase?(this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning"),[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.cancelPromise=this.apiService.postCancelPremium(),[4,this.cancelPromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("canceledSubscription")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.downloadLicense=function(){if(!this.loading){var e=JSON.stringify(this.sub.license,null,2);this.platformUtilsService.saveFile(window,e,null,"bitwarden_premium_license.json")}},e.prototype.updateLicense=function(){this.loading||(this.showUpdateLicense=!0)},e.prototype.closeUpdateLicense=function(e){this.showUpdateLicense=!1,e&&this.load()},e.prototype.adjustStorage=function(e){this.usingInAppPurchase?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t(e?"addStorage":"removeStorage"),null,null,"warning"):(this.adjustStorageAdd=e,this.showAdjustStorage=!0)},e.prototype.closeStorage=function(e){this.showAdjustStorage=!1,e&&this.load()},Object.defineProperty(e.prototype,"subscriptionMarkedForCancel",{get:function(){return null!=this.subscription&&!this.subscription.cancelled&&this.subscription.cancelAtEndDate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subscription",{get:function(){return null!=this.sub?this.sub.subscription:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextInvoice",{get:function(){return null!=this.sub?this.sub.upcomingInvoice:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storagePercentage",{get:function(){return null!=this.sub&&this.sub.maxStorageGb?+(this.sub.storageGb/this.sub.maxStorageGb*100).toFixed(2):0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storageProgressWidth",{get:function(){return this.storagePercentage<5?5:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"usingInAppPurchase",{get:function(){return null!=this.sub&&this.sub.usingInAppPurchase},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.TokenService),o.ɵɵdirectiveInject(s.ApiService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(p.ToasterService),o.ɵɵdirectiveInject(u.Router))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-user-subscription"]],decls:13,vars:6,consts:[[1,"page-header"],[4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","warning",3,"title",4,"ngIf"],["class","row",4,"ngIf"],["type","warning",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["reinstateBtn",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"row"],[1,"col-4"],[1,"text-capitalize"],["class","badge badge-warning",4,"ngIf"],["class","col-8",4,"ngIf"],[1,"badge","badge-warning"],[1,"col-8"],[1,"d-block","mb-1"],[1,"table"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["href","https://vault.bitwarden.com/#/settings/subscription","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["class","card mt-3",4,"ngIf"],[1,"card","mt-3"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"onUpdated","onCanceled"],[1,"d-flex"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","button","class","btn btn-outline-danger btn-submit ml-auto",3,"appApiAction","disabled","click",4,"ngIf"],[1,"spaced-header"],[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","bg-success",3,"ngStyle"],["type","button",1,"btn","btn-outline-danger","btn-submit","ml-auto",3,"appApiAction","disabled","click"],["cancelBtn",""],[1,"mt-3"],["class","d-flex",4,"ngIf"],[3,"storageGbPrice","add","onAdjusted","onCanceled",4,"ngIf"],["type","button",1,"ml-1","btn","btn-outline-secondary",3,"click"],[3,"storageGbPrice","add","onAdjusted","onCanceled"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,x,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵtemplate(9,b,9,6,"ng-container",1),o.ɵɵtext(10,"\n"),o.ɵɵtemplate(11,U,14,6,"ng-container",1),o.ɵɵtext(12,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,4,"premiumMembership"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.sub))},directives:[d.NgIf,m.CalloutComponent,h.ApiActionDirective,d.NgForOf,f.A11yTitleDirective,v.UpdateLicenseComponent,d.NgStyle,y.AdjustStorageComponent],pipes:[g.I18nPipe,d.DatePipe,d.CurrencyPipe,d.PercentPipe],encapsulation:2}),e}();t.UserSubscriptionComponent=N},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(87),n(7);var o=n(0),a=n(87),s=n(7),l=n(13),c=n(16),p=n(4),u=n(24),d=n(10);function m(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(2,1,"reportError"),"..."))}function h(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",16),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(3,4,"breachUsernameNotFound",n.checkedUsername),"\n ")}}function f(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",17),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"breachFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind3(3,4,"breachUsernameFound",n.checkedUsername,n.breachedAccounts.length),"\n ")}}function v(e,t){if(1&e&&(o.ɵɵelementStart(0,"li"),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){var n=t.$implicit;o.ɵɵadvance(1),o.ɵɵtextInterpolate(n)}}function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"li",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",3),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",21),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"img",22),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"div",23),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"h3",24),o.ɵɵtext(12),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelement(14,"p",25),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"p",26),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"ul"),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,v,2,1,"li",27),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",28),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"dl"),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"dt"),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"dd"),o.ɵɵtext(35),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"dt"),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"dd"),o.ɵɵtext(42),o.ɵɵpipe(43,"number"),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"dt"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"dd"),o.ɵɵtext(50),o.ɵɵpipe(51,"date"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelementStart(53,"dt"),o.ɵɵtext(54),o.ɵɵpipe(55,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementStart(57,"dd"),o.ɵɵtext(58),o.ɵɵpipe(59,"date"),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(61,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(62,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(63,"\n "),o.ɵɵelementEnd()),2&e){var n=t.$implicit;o.ɵɵadvance(6),o.ɵɵproperty("src",n.logoPath,o.ɵɵsanitizeUrl),o.ɵɵadvance(6),o.ɵɵtextInterpolate(n.title),o.ɵɵadvance(2),o.ɵɵproperty("innerHTML",n.description,o.ɵɵsanitizeHtml),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(18,13,"compromisedData"),":"),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",n.dataClasses),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,15,"website")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(n.domain),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(39,17,"affectedUsers")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(43,19,n.pwnCount)),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,21,"breachOccurred")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(51,23,n.breachDate,"mediumDate")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(55,26,"breachReported")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(59,28,n.addedDate,"mediumDate"))}}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"ul",18),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,y,64,31,"li",19),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",n.breachedAccounts)}}function x(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,h,4,7,"app-callout",13),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,f,4,8,"app-callout",14),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,g,4,1,"ul",15),o.ɵɵtext(7,"\n "),o.ɵɵelementContainerEnd()),2&e){var n=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.breachedAccounts.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.breachedAccounts.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.breachedAccounts.length)}}function b(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",11),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,m,3,3,"p",12),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,x,8,3,"ng-container",12),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){var n=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.error),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.error)}}var S=function(){function e(e,t){this.auditService=e,this.userService=t,this.error=!1,this.breachedAccounts=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.userService.getEmail()];case 1:return e.username=t.sent(),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:this.error=!1,this.username=this.username.toLowerCase(),t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.auditService.breachedAccounts(this.username),e=this,[4,this.formPromise];case 2:return e.breachedAccounts=t.sent(),[3,4];case 3:return t.sent(),this.error=!0,[3,4];case 4:return this.checkedUsername=this.username,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.AuditService),o.ɵɵdirectiveInject(s.UserService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-breach-report"]],decls:43,vars:22,consts:[[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"form-group","col-6"],["for","username"],["id","username","type","text","name","Username","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["class","mt-4",4,"ngIf"],[1,"mt-4"],[4,"ngIf"],["type","success",3,"title",4,"ngIf"],["type","danger",3,"title",4,"ngIf"],["class","list-group list-group-breach",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"list-group","list-group-breach"],["class","list-group-item min-height-fix",4,"ngFor","ngForOf"],[1,"list-group-item","min-height-fix"],[1,"col-2","text-center"],["alt","",1,"img-fluid",3,"src"],[1,"col-7"],[1,"text-lg"],[3,"innerHTML"],[1,"mb-1"],[4,"ngFor","ngForOf"],[1,"col-3"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵelementStart(7,"p"),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelementStart(11,"form",1,2),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"div",3),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",4),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",5),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"input",6),o.ɵɵlistener("ngModelChange",(function(e){return t.username=e})),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"small",7),o.ɵɵtext(25),o.ɵɵpipe(26,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"button",8),o.ɵɵtext(31,"\n "),o.ɵɵelement(32,"i",9),o.ɵɵpipe(33,"i18n"),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"span"),o.ɵɵtext(36),o.ɵɵpipe(37,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n"),o.ɵɵtemplate(41,b,6,2,"div",10),o.ɵɵtext(42,"\n")),2&e){var n=o.ɵɵreference(12);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,10,"dataBreachReport")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,12,"breachDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,14,"username")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.username),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(26,16,"breachCheckUsernameEmail")),o.ɵɵadvance(5),o.ɵɵproperty("disabled",n.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(33,18,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(37,20,"checkBreaches")),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!n.loading&&t.checkedUsername)}},directives:[l.NgControlStatusGroup,l.NgForm,c.ApiActionDirective,l.DefaultValueAccessor,l.RequiredValidator,l.NgControlStatus,l.NgModel,p.NgIf,u.CalloutComponent,p.NgForOf],pipes:[d.I18nPipe,p.DecimalPipe,p.DatePipe],encapsulation:2}),e}();t.BreachReportComponent=S},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=(n(3),n(36),n(5),n(898)),c=n(84),p=n(656),u=n(0),d=n(36),m=n(5),h=n(3),f=n(4),v=n(513),y=n(13),g=n(17),x=n(24),b=n(10),S=n(514),w=["historyTemplate"];function C(e,t){1&e&&(u.ɵɵelementStart(0,"app-callout",19),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"passwordGeneratorPolicyInEffect"),"\n"))}function I(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",20),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",21),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"label",22),u.ɵɵtext(7),u.ɵɵpipe(8,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"input",23),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.numWords=e}))("blur",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()})),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementStart(13,"div",21),u.ɵɵtext(14,"\n "),u.ɵɵelementStart(15,"label",24),u.ɵɵtext(16),u.ɵɵpipe(17,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"input",25),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.wordSeparator=e}))("blur",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()})),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"div",5),u.ɵɵtext(24,"\n "),u.ɵɵelementStart(25,"div",26),u.ɵɵtext(26,"\n "),u.ɵɵelementStart(27,"input",27),u.ɵɵlistener("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.capitalize=e})),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"label",28),u.ɵɵtext(30),u.ɵɵpipe(31,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(33,"\n "),u.ɵɵelementStart(34,"div",26),u.ɵɵtext(35,"\n "),u.ɵɵelementStart(36,"input",29),u.ɵɵlistener("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.includeNumber=e})),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"label",30),u.ɵɵtext(39),u.ɵɵpipe(40,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(42,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(43,"\n"),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵadvance(7),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(8,10,"numWords")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",r.options.numWords),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(17,12,"wordSeparator")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",r.options.wordSeparator),u.ɵɵadvance(8),u.ɵɵproperty("ngModel",r.options.capitalize)("disabled",null==r.enforcedPolicyOptions?null:r.enforcedPolicyOptions.capitalize),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(31,14,"capitalize")),u.ɵɵadvance(6),u.ɵɵproperty("ngModel",r.options.includeNumber)("disabled",null==r.enforcedPolicyOptions?null:r.enforcedPolicyOptions.includeNumber),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(40,16,"includeNumber"))}}function E(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",20),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",21),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"label",31),u.ɵɵtext(7),u.ɵɵpipe(8,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"input",32),u.ɵɵlistener("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.length=e}))("blur",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().lengthChanged()})),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementStart(13,"div",21),u.ɵɵtext(14,"\n "),u.ɵɵelementStart(15,"label",33),u.ɵɵtext(16),u.ɵɵpipe(17,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"input",34),u.ɵɵlistener("blur",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.minNumber=e}))("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().minNumberChanged()})),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"div",21),u.ɵɵtext(23,"\n "),u.ɵɵelementStart(24,"label",35),u.ɵɵtext(25),u.ɵɵpipe(26,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵelementStart(28,"input",36),u.ɵɵlistener("blur",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.minSpecial=e}))("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().minSpecialChanged()})),u.ɵɵelementEnd(),u.ɵɵtext(29,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(30,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(31,"\n "),u.ɵɵelementStart(32,"div",5),u.ɵɵtext(33,"\n "),u.ɵɵelementStart(34,"div",26),u.ɵɵtext(35,"\n "),u.ɵɵelementStart(36,"input",37),u.ɵɵlistener("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.uppercase=e})),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"label",38),u.ɵɵtext(39,"A-Z"),u.ɵɵelementEnd(),u.ɵɵtext(40,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵelementStart(42,"div",26),u.ɵɵtext(43,"\n "),u.ɵɵelementStart(44,"input",39),u.ɵɵlistener("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.lowercase=e})),u.ɵɵelementEnd(),u.ɵɵtext(45,"\n "),u.ɵɵelementStart(46,"label",40),u.ɵɵtext(47,"a-z"),u.ɵɵelementEnd(),u.ɵɵtext(48,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(49,"\n "),u.ɵɵelementStart(50,"div",26),u.ɵɵtext(51,"\n "),u.ɵɵelementStart(52,"input",41),u.ɵɵlistener("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.number=e})),u.ɵɵelementEnd(),u.ɵɵtext(53,"\n "),u.ɵɵelementStart(54,"label",42),u.ɵɵtext(55,"0-9"),u.ɵɵelementEnd(),u.ɵɵtext(56,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(57,"\n "),u.ɵɵelementStart(58,"div",26),u.ɵɵtext(59,"\n "),u.ɵɵelementStart(60,"input",43),u.ɵɵlistener("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().options.special=e})),u.ɵɵelementEnd(),u.ɵɵtext(61,"\n "),u.ɵɵelementStart(62,"label",44),u.ɵɵtext(63,"!@#$%^&*"),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n "),u.ɵɵelementStart(66,"div",26),u.ɵɵtext(67,"\n "),u.ɵɵelementStart(68,"input",45),u.ɵɵlistener("change",(function(){return u.ɵɵrestoreView(n),u.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(e){return u.ɵɵrestoreView(n),u.ɵɵnextContext().avoidAmbiguous=e})),u.ɵɵelementEnd(),u.ɵɵtext(69,"\n "),u.ɵɵelementStart(70,"label",46),u.ɵɵtext(71),u.ɵɵpipe(72,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(73,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(74,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(75,"\n"),u.ɵɵelementContainerEnd()}if(2&e){var r=u.ɵɵnextContext();u.ɵɵadvance(7),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(8,16,"length")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",r.options.length),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(17,18,"minNumbers")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",r.options.minNumber),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(26,20,"minSpecial")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",r.options.minSpecial),u.ɵɵadvance(8),u.ɵɵproperty("ngModel",r.options.uppercase)("disabled",null==r.enforcedPolicyOptions?null:r.enforcedPolicyOptions.useUppercase),u.ɵɵadvance(8),u.ɵɵproperty("ngModel",r.options.lowercase)("disabled",null==r.enforcedPolicyOptions?null:r.enforcedPolicyOptions.useLowercase),u.ɵɵadvance(8),u.ɵɵproperty("ngModel",r.options.number)("disabled",null==r.enforcedPolicyOptions?null:r.enforcedPolicyOptions.useNumbers),u.ɵɵadvance(8),u.ɵɵproperty("ngModel",r.options.special)("disabled",null==r.enforcedPolicyOptions?null:r.enforcedPolicyOptions.useSpecial),u.ɵɵadvance(8),u.ɵɵproperty("ngModel",r.avoidAmbiguous),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(72,22,"ambiguous"))}}function P(e,t){}var k=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,window)||this;return o.componentFactoryResolver=i,o.modal=null,o}return i(t,e),t.prototype.history=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(c.ModalComponent);this.modal=this.historyModalRef.createComponent(t).instance,this.modal.show(p.PasswordGeneratorHistoryComponent,this.historyModalRef),this.modal.onClosed.subscribe((function(){return o(e,void 0,void 0,(function(){return a(this,(function(e){return this.modal=null,[2]}))}))}))},t.prototype.lengthChanged=function(){document.getElementById("length").focus()},t.prototype.minNumberChanged=function(){document.getElementById("min-number").focus()},t.prototype.minSpecialChanged=function(){document.getElementById("min-special").focus()},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.PasswordGenerationService),u.ɵɵdirectiveInject(m.PlatformUtilsService),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-password-generator"]],viewQuery:function(e,t){var n;(1&e&&u.ɵɵstaticViewQuery(w,!0,s.ViewContainerRef),2&e)&&(u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.historyModalRef=n.first))},features:[u.ɵɵInheritDefinitionFeature],decls:69,vars:26,consts:[[1,"page-header"],["type","info",4,"ngIf"],[1,"card","card-password","bg-light","my-4"],[1,"card-body"],["appSelectCopy","",1,"password-wrapper",3,"innerHTML"],[1,"form-group"],[1,"form-check","form-check-inline"],["id","generate-password","name","type","value","password","type","radio",1,"form-check-input",3,"ngModel","change","ngModelChange"],["for","generate-password",1,"form-check-label"],["id","generate-passphrase","name","type","value","passphrase","type","radio",1,"form-check-input",3,"ngModel","change","ngModelChange"],["for","generate-passphrase",1,"form-check-label"],[4,"ngIf"],[1,"d-flex"],["type","button",1,"btn","btn-primary",3,"click"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-clock-o","fa-lg"],["historyTemplate",""],["type","info"],[1,"row"],[1,"form-group","col-4"],["for","num-words"],["id","num-words","type","number","min","3","max","20",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","word-separator"],["id","word-separator","type","text","maxlength","1",1,"form-control",3,"ngModel","ngModelChange","blur"],[1,"form-check"],["id","capitalize","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","capitalize",1,"form-check-label"],["id","include-number","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","include-number",1,"form-check-label"],["for","length"],["id","length","type","number","min","5","max","128",1,"form-control",3,"ngModel","ngModelChange","blur","change"],["for","min-number"],["id","min-number","type","number","min","0","max","9",1,"form-control",3,"ngModel","blur","ngModelChange","change"],["for","min-special"],["id","min-special","type","number","min","0","max","9",1,"form-control",3,"ngModel","blur","ngModelChange","change"],["id","uppercase","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","uppercase",1,"form-check-label"],["id","lowercase","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","lowercase",1,"form-check-label"],["id","numbers","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","numbers",1,"form-check-label"],["id","special","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","special",1,"form-check-label"],["id","ambiguous","type","checkbox",1,"form-check-input",3,"ngModel","change","ngModelChange"],["for","ambiguous",1,"form-check-label"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h1"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n"),u.ɵɵtemplate(7,C,3,3,"app-callout",1),u.ɵɵtext(8,"\n"),u.ɵɵelementStart(9,"div",2),u.ɵɵtext(10,"\n "),u.ɵɵelementStart(11,"div",3),u.ɵɵtext(12,"\n "),u.ɵɵelement(13,"div",4),u.ɵɵpipe(14,"colorPassword"),u.ɵɵtext(15,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n"),u.ɵɵelementStart(18,"div",5),u.ɵɵtext(19,"\n "),u.ɵɵelementStart(20,"div",6),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"input",7),u.ɵɵlistener("change",(function(){return t.saveOptions()}))("ngModelChange",(function(e){return t.options.type=e})),u.ɵɵelementEnd(),u.ɵɵtext(23,"\n "),u.ɵɵelementStart(24,"label",8),u.ɵɵtext(25),u.ɵɵpipe(26,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"div",6),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"input",9),u.ɵɵlistener("change",(function(){return t.saveOptions()}))("ngModelChange",(function(e){return t.options.type=e})),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"label",10),u.ɵɵtext(34),u.ɵɵpipe(35,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(38,"\n"),u.ɵɵtemplate(39,I,44,18,"ng-container",11),u.ɵɵtext(40,"\n"),u.ɵɵtemplate(41,E,76,24,"ng-container",11),u.ɵɵtext(42,"\n"),u.ɵɵelementStart(43,"div",12),u.ɵɵtext(44,"\n "),u.ɵɵelementStart(45,"div"),u.ɵɵtext(46,"\n "),u.ɵɵelementStart(47,"button",13),u.ɵɵlistener("click",(function(){return t.regenerate()})),u.ɵɵtext(48),u.ɵɵpipe(49,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n "),u.ɵɵelementStart(51,"button",14),u.ɵɵlistener("click",(function(){return t.copy()})),u.ɵɵtext(52),u.ɵɵpipe(53,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(54,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(55,"\n "),u.ɵɵelementStart(56,"div",15),u.ɵɵtext(57,"\n "),u.ɵɵelementStart(58,"button",16),u.ɵɵlistener("click",(function(){return t.history()})),u.ɵɵpipe(59,"i18n"),u.ɵɵtext(60,"\n "),u.ɵɵelement(61,"i",17),u.ɵɵtext(62,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(63,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n"),u.ɵɵtemplate(66,P,0,0,"ng-template",null,18,u.ɵɵtemplateRefExtractor),u.ɵɵtext(68,"\n")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,12,"passwordGenerator")),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",null==t.enforcedPolicyOptions?null:t.enforcedPolicyOptions.inEffect()),u.ɵɵadvance(6),u.ɵɵproperty("innerHTML",u.ɵɵpipeBind1(14,14,t.password),u.ɵɵsanitizeHtml),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",t.options.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(26,16,"password")),u.ɵɵadvance(6),u.ɵɵproperty("ngModel",t.options.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(35,18,"passphrase")),u.ɵɵadvance(5),u.ɵɵproperty("ngIf","passphrase"===t.options.type),u.ɵɵadvance(2),u.ɵɵproperty("ngIf","password"===t.options.type),u.ɵɵadvance(7),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(49,20,"regeneratePassword"),"\n "),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(53,22,"copyPassword"),"\n "),u.ɵɵadvance(6),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(59,24,"passwordHistory")))},directives:[f.NgIf,v.SelectCopyDirective,y.RadioControlValueAccessor,y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,g.A11yTitleDirective,x.CalloutComponent,y.NumberValueAccessor,y.MaxLengthValidator,y.CheckboxControlValueAccessor],pipes:[b.I18nPipe,S.ColorPasswordPipe],encapsulation:2}),t}(l.PasswordGeneratorComponent);t.PasswordGeneratorComponent=k},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(3),n(36),n(5);var o=n(899),a=n(0),s=n(36),l=n(5),c=n(3),p=n(17),u=n(4),d=n(513),m=n(10),h=n(514);function f(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"li",16),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",17),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"div",18),a.ɵɵpipe(5,"colorPassword"),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"small",19),a.ɵɵtext(8),a.ɵɵpipe(9,"date"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",11),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"button",20),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=t.$implicit;return a.ɵɵnextContext(2).copy(e.password)})),a.ɵɵpipe(15,"i18n"),a.ɵɵtext(16,"\n "),a.ɵɵelement(17,"i",21),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd()}if(2&e){var r=t.$implicit;a.ɵɵadvance(4),a.ɵɵproperty("innerHTML",a.ɵɵpipeBind1(5,3,r.password),a.ɵɵsanitizeHtml),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(9,5,r.date,"medium")),a.ɵɵadvance(6),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(15,8,"copyPassword"))}}function v(e,t){if(1&e&&(a.ɵɵelementStart(0,"ul",14),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,f,21,10,"li",15),a.ɵɵtext(3,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",n.history)}}function y(e,t){1&e&&(a.ɵɵelementStart(0,"div",22),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"noPasswordsInList"),"\n "))}var g=function(e){function t(t,n,r){return e.call(this,t,n,r,window)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.PasswordGenerationService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-password-generator-history"]],features:[a.ɵɵInheritDefinitionFeature],decls:43,vars:14,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","passHistoryTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","passHistoryTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","list-group list-group-flush",4,"ngIf"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw"],[1,"list-group","list-group-flush"],["class","list-group-item d-flex",4,"ngFor","ngForOf"],[1,"list-group-item","d-flex"],[1,"password-row"],["appSelectCopy","",1,"text-monospace","password-wrapper",3,"innerHTML"],[1,"text-muted"],[1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],[1,"modal-body"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"h2",4),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"button",5),a.ɵɵpipe(13,"i18n"),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"span",6),a.ɵɵtext(16,"×"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵtemplate(20,v,4,1,"ul",7),a.ɵɵtext(21,"\n "),a.ɵɵtemplate(22,y,3,3,"div",8),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"div",9),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"button",10),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",11),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"button",12),a.ɵɵlistener("click",(function(){return t.clear()})),a.ɵɵpipe(33,"i18n"),a.ɵɵtext(34,"\n "),a.ɵɵelement(35,"i",13),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n")),2&e&&(a.ɵɵadvance(9),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,6,"passwordHistory")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(13,8,"close")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",t.history.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.history.length),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(28,10,"close"),"\n "),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(33,12,"clear")))},directives:[p.A11yTitleDirective,u.NgIf,u.NgForOf,d.SelectCopyDirective],pipes:[m.I18nPipe,h.ColorPasswordPipe,u.DatePipe],encapsulation:2}),t}(o.PasswordGeneratorHistoryComponent);t.PasswordGeneratorHistoryComponent=g},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(14),n(7);var o=n(0),a=n(7),s=n(14),l=n(8),c=n(4),p=n(37),u=n(10);function d(e,t){if(1&e){var n=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",21),o.ɵɵlistener("click",(function(){return o.ɵɵrestoreView(n),o.ɵɵnextContext().premiumRequired()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"premium"),"\n "))}function m(e,t){1&e&&(o.ɵɵelementStart(0,"span",22),o.ɵɵtext(1),o.ɵɵpipe(2,"uppercase"),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,o.ɵɵpipeBind1(3,3,"free")),"\n "))}var h=function(){function e(e,t){this.userService=e,this.messagingService=t,this.canAccessPremium=!1}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.userService.canAccessPremium()];case 1:return e.canAccessPremium=t.sent(),[2]}}))}))},e.prototype.premiumRequired=function(){this.canAccessPremium||this.messagingService.send("premiumRequired")},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.UserService),o.ɵɵdirectiveInject(s.MessagingService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-tools"]],decls:80,vars:35,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card","mb-4"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","generator","routerLinkActive","active",1,"list-group-item"],["routerLink","import","routerLinkActive","active",1,"list-group-item"],["routerLink","export","routerLinkActive","active",1,"list-group-item"],[1,"card"],[1,"card-header","d-flex"],[1,"ml-auto"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],["routerLink","exposed-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","reused-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","weak-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","unsecured-websites-report","routerLinkActive","active",1,"list-group-item"],["routerLink","inactive-two-factor-report","routerLinkActive","active",1,"list-group-item"],["routerLink","breach-report","routerLinkActive","active",1,"list-group-item","d-flex"],["class","badge badge-success",4,"ngIf"],[1,"col-9"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"],[1,"badge","badge-success"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",5),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"a",6),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"a",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"a",8),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"div",9),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",10),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementStart(33,"div",11),o.ɵɵtext(34,"\n "),o.ɵɵtemplate(35,d,3,3,"a",12),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementStart(39,"div",5),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"a",13),o.ɵɵtext(42),o.ɵɵpipe(43,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"a",14),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"a",15),o.ɵɵtext(50),o.ɵɵpipe(51,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelementStart(53,"a",16),o.ɵɵtext(54),o.ɵɵpipe(55,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementStart(57,"a",17),o.ɵɵtext(58),o.ɵɵpipe(59,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementStart(61,"a",18),o.ɵɵtext(62),o.ɵɵpipe(63,"i18n"),o.ɵɵelementStart(64,"div",11),o.ɵɵtext(65,"\n "),o.ɵɵtemplate(66,m,4,5,"span",19),o.ɵɵtext(67,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(69,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(70,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(71,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementStart(73,"div",20),o.ɵɵtext(74,"\n "),o.ɵɵelement(75,"router-outlet"),o.ɵɵtext(76,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(77,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(78,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(79,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,13,"tools")),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(16,15,"passwordGenerator"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(20,17,"importData"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(24,19,"exportVault"),"\n "),o.ɵɵadvance(8),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(32,21,"reports"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!t.canAccessPremium),o.ɵɵadvance(7),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(43,23,"exposedPasswordsReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(47,25,"reusedPasswordsReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(51,27,"weakPasswordsReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(55,29,"unsecuredWebsitesReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(59,31,"inactive2faReport"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(63,33,"dataBreachReport"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!t.canAccessPremium))},directives:[l.RouterLinkWithHref,l.RouterLinkActive,c.NgIf,l.RouterOutlet,p.StopClickDirective],pipes:[u.I18nPipe,c.UpperCasePipe],encapsulation:2}),e}();t.ToolsComponent=h},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(84)),s=n(298),l=n(659),c=n(260),p=n(497),u=n(263),d=n(506),m=n(660),h=n(294),f=n(661),v=(n(18),n(3),n(14),n(5),n(61),n(103),n(7),n(112),n(0)),y=n(61),g=n(8),x=n(3),b=n(103),S=n(18),w=n(14),C=n(7),I=n(5),E=n(112),P=n(294),k=n(16),_=n(4),A=n(508),O=n(263),T=n(662),M=n(17),B=n(298),D=n(24),R=n(663),V=n(10),j=["attachments"],F=["folderAddEdit"],U=["cipherAddEdit"],N=["share"],z=["collections"],L=["updateKeyTemplate"];function G(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",30),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",31),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function K(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"button",32),v.ɵɵlistener("click",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext().addCipher()})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",33),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function q(e,t){if(1&e&&(v.ɵɵelementStart(0,"app-callout",34),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext();v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",n.trashCleanupWarning,"\n ")}}function W(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",35),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",36),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",37),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",22),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"button",38),v.ɵɵlistener("click",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext().updateKey()})),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(6,3,"updateKeyTitle"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"updateEncryptionKeyShortDesc")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"updateEncryptionKey"),"\n "))}function H(e,t){1&e&&v.ɵɵelement(0,"app-verify-email",16)}function $(e,t){1&e&&(v.ɵɵelementStart(0,"div",35),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",36),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",37),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",22),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"a",39),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(6,3,"updateBrowser"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"updateBrowserDesc")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"updateBrowser"),"\n "))}function Y(e,t){1&e&&(v.ɵɵelementStart(0,"div",40),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",41),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",42),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",22),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"a",43),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(6,3,"goPremium"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"premiumUpgradeUnlockFeatures")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"goPremium"),"\n "))}function Q(e,t){}function J(e,t){}function X(e,t){}function Z(e,t){}function ee(e,t){}function te(e,t){}var ne=function(){function e(e,t,n,r,i,o,a,s,l,c,p,u,d){this.syncService=e,this.route=t,this.router=n,this.changeDetectorRef=r,this.i18nService=i,this.componentFactoryResolver=o,this.tokenService=a,this.cryptoService=s,this.messagingService=l,this.userService=c,this.platformUtilsService=p,this.broadcasterService=u,this.ngZone=d,this.favorites=!1,this.type=null,this.folderId=null,this.collectionId=null,this.showVerifyEmail=!1,this.showBrowserOutdated=!1,this.showUpdateKey=!1,this.showPremiumCallout=!1,this.deleted=!1,this.trashCleanupWarning=null,this.modal=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(o){switch(o.label){case 0:return e=this,[4,this.tokenService.getEmailVerified()];case 1:return e.showVerifyEmail=!o.sent(),this.showBrowserOutdated=-1!==window.navigator.userAgent.indexOf("MSIE"),this.trashCleanupWarning=this.i18nService.t(this.platformUtilsService.isSelfHost()?"trashCleanupWarningSelfHosted":"trashCleanupWarning"),t=this.route.queryParams.subscribe((function(e){return r(n,void 0,void 0,(function(){var n,o,a,s=this;return i(this,(function(l){switch(l.label){case 0:return[4,this.syncService.fullSync(!1)];case 1:return l.sent(),n=this,[4,this.cryptoService.hasEncKey()];case 2:return n.showUpdateKey=!l.sent(),[4,this.userService.canAccessPremium()];case 3:return o=l.sent(),this.showPremiumCallout=!this.showVerifyEmail&&!o&&!this.platformUtilsService.isSelfHost(),[4,Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load()])];case 4:return l.sent(),null!=e?[3,6]:(this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()]);case 5:return l.sent(),[3,18];case 6:return e.deleted?(this.groupingsComponent.selectedTrash=!0,[4,this.filterDeleted()]):[3,8];case 7:return l.sent(),[3,18];case 8:return e.favorites?(this.groupingsComponent.selectedFavorites=!0,[4,this.filterFavorites()]):[3,10];case 9:return l.sent(),[3,18];case 10:return e.type?(a=parseInt(e.type,null),this.groupingsComponent.selectedType=a,[4,this.filterCipherType(a)]):[3,12];case 11:return l.sent(),[3,18];case 12:return e.folderId?(this.groupingsComponent.selectedFolder=!0,this.groupingsComponent.selectedFolderId=e.folderId,[4,this.filterFolder(e.folderId)]):[3,14];case 13:return l.sent(),[3,18];case 14:return e.collectionId?(this.groupingsComponent.selectedCollectionId=e.collectionId,[4,this.filterCollection(e.collectionId)]):[3,16];case 15:return l.sent(),[3,18];case 16:return this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()];case 17:l.sent(),l.label=18;case 18:return this.broadcasterService.subscribe("VaultComponent",(function(e){s.ngZone.run((function(){return r(s,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:switch(e.command){case"syncCompleted":return[3,1]}return[3,4];case 1:return e.successfully?[4,Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load(),this.ciphersComponent.load(this.ciphersComponent.filter)])]:[3,3];case 2:t.sent(),this.changeDetectorRef.detectChanges(),t.label=3;case 3:return[3,4];case 4:return[2]}}))}))}))})),null!=t&&t.unsubscribe(),[2]}}))}))})),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe("VaultComponent")},e.prototype.clearGroupingFilters=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),[4,this.ciphersComponent.reload()];case 1:return e.sent(),this.clearFilters(),this.go(),[2]}}))}))},e.prototype.filterFavorites=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFavorites"),[4,this.ciphersComponent.reload((function(e){return e.favorite}))];case 1:return e.sent(),this.clearFilters(),this.favorites=!0,this.go(),[2]}}))}))},e.prototype.filterDeleted=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),[4,this.ciphersComponent.reload(null,!0)];case 1:return e.sent(),this.clearFilters(),this.deleted=!0,this.go(),[2]}}))}))},e.prototype.filterCipherType=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType"),[4,this.ciphersComponent.reload((function(t){return t.type===e}))];case 1:return t.sent(),this.clearFilters(),this.type=e,this.go(),[2]}}))}))},e.prototype.filterFolder=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,e="none"===e?null:e,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFolder"),[4,this.ciphersComponent.reload((function(t){return t.folderId===e}))];case 1:return t.sent(),this.clearFilters(),this.folderId=null==e?"none":e,this.go(),[2]}}))}))},e.prototype.filterCollection=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection"),[4,this.ciphersComponent.reload((function(t){return null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1}))];case 1:return t.sent(),this.clearFilters(),this.collectionId=e,this.go(),[2]}}))}))},e.prototype.filterSearchText=function(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)},e.prototype.editCipherAttachments=function(e){return r(this,void 0,void 0,(function(){var t,n,o,s,l,c=this;return i(this,(function(u){switch(u.label){case 0:return[4,this.userService.canAccessPremium()];case 1:return t=u.sent(),null!=e.organizationId||t?[3,2]:(this.messagingService.send("premiumRequired"),[2]);case 2:return null==e.organizationId?[3,4]:[4,this.userService.getOrganization(e.organizationId)];case 3:if(null!=(n=u.sent())&&(null==n.maxStorageGb||0===n.maxStorageGb))return this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId}),[2];u.label=4;case 4:return null!=this.modal&&this.modal.close(),o=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.attachmentsModalRef.createComponent(o).instance,(s=this.modal.show(p.AttachmentsComponent,this.attachmentsModalRef)).cipherId=e.id,l=!1,s.onUploadedAttachment.subscribe((function(){return l=!0})),s.onDeletedAttachment.subscribe((function(){return l=!0})),s.onReuploadedAttachment.subscribe((function(){return l=!0})),this.modal.onClosed.subscribe((function(){return r(c,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal=null,l?[4,this.ciphersComponent.refresh()]:[3,2];case 1:e.sent(),e.label=2;case 2:return l=!1,[2]}}))}))})),[2]}}))}))},e.prototype.shareCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.shareModalRef.createComponent(n).instance;var o=this.modal.show(f.ShareComponent,this.shareModalRef);o.cipherId=e.id,o.onSharedCipher.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.editCipherCollections=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.collectionsModalRef.createComponent(n).instance;var o=this.modal.show(d.CollectionsComponent,this.collectionsModalRef);o.cipherId=e.id,o.onSavedCollections.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.addFolder=function(){return r(this,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(o){return null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.folderAddEditModalRef.createComponent(e).instance,(t=this.modal.show(m.FolderAddEditComponent,this.folderAddEditModalRef)).folderId=null,t.onSavedFolder.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){n.modal=null})),[2]}))}))},e.prototype.editFolder=function(e){return r(this,void 0,void 0,(function(){var t,n,o=this;return i(this,(function(s){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.folderAddEditModalRef.createComponent(t).instance,(n=this.modal.show(m.FolderAddEditComponent,this.folderAddEditModalRef)).folderId=e,n.onSavedFolder.subscribe((function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[2]}}))}))})),n.onDeletedFolder.subscribe((function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[4,this.filterFolder("none")];case 2:return e.sent(),this.groupingsComponent.selectedFolderId=null,[2]}}))}))})),this.modal.onClosed.subscribe((function(){o.modal=null})),[2]}))}))},e.prototype.addCipher=function(){var e=this,t=this.editCipher(null);if(t.type=this.type,t.folderId="none"===this.folderId?null:this.folderId,null!=this.collectionId){var n=this.groupingsComponent.collections.filter((function(t){return t.id===e.collectionId}));n.length>0&&(t.organizationId=n[0].organizationId,t.collectionIds=[this.collectionId])}},e.prototype.editCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.cipherAddEditModalRef.createComponent(n).instance;var o=this.modal.show(c.AddEditComponent,this.cipherAddEditModalRef);return o.cipherId=null==e?null:e.id,o.onSavedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onDeletedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onRestoredCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){t.modal=null})),o},e.prototype.cloneCipher=function(e){this.editCipher(e).cloneMode=!0},e.prototype.updateKey=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.updateKeyModalRef.createComponent(t).instance,this.modal.show(l.UpdateKeyComponent,this.updateKeyModalRef),this.modal.onClosed.subscribe((function(){e.modal=null}))},e.prototype.clearFilters=function(){this.folderId=null,this.collectionId=null,this.favorites=!1,this.type=null,this.deleted=!1},e.prototype.go=function(e){void 0===e&&(e=null),null==e&&(e={favorites:!!this.favorites||null,type:this.type,folderId:this.folderId,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})},e.ɵfac=function(t){return new(t||e)(v.ɵɵdirectiveInject(y.SyncService),v.ɵɵdirectiveInject(g.ActivatedRoute),v.ɵɵdirectiveInject(g.Router),v.ɵɵdirectiveInject(v.ChangeDetectorRef),v.ɵɵdirectiveInject(x.I18nService),v.ɵɵdirectiveInject(v.ComponentFactoryResolver),v.ɵɵdirectiveInject(b.TokenService),v.ɵɵdirectiveInject(S.CryptoService),v.ɵɵdirectiveInject(w.MessagingService),v.ɵɵdirectiveInject(C.UserService),v.ɵɵdirectiveInject(I.PlatformUtilsService),v.ɵɵdirectiveInject(E.BroadcasterService),v.ɵɵdirectiveInject(v.NgZone))},e.ɵcmp=v.ɵɵdefineComponent({type:e,selectors:[["app-vault"]],viewQuery:function(e,t){var n;(1&e&&(v.ɵɵstaticViewQuery(h.GroupingsComponent,!0),v.ɵɵstaticViewQuery(u.CiphersComponent,!0),v.ɵɵstaticViewQuery(s.OrganizationsComponent,!0),v.ɵɵstaticViewQuery(j,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(F,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(U,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(N,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(z,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(L,!0,o.ViewContainerRef)),2&e)&&(v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.groupingsComponent=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.ciphersComponent=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.organizationsComponent=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.attachmentsModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.folderAddEditModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.shareModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.collectionsModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.updateKeyModalRef=n.first))},decls:90,vars:21,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[3,"onAllClicked","onFavoritesClicked","onCipherTypeClicked","onFolderClicked","onAddFolder","onEditFolder","onCollectionClicked","onSearchTextChanged","onTrashClicked"],[1,"col-6"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","modal","deleted"],["type","button","class","btn btn-outline-primary btn-sm",3,"click",4,"ngIf"],["type","warning","icon","fa-warning",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onShareClicked","onCollectionsClicked","onCloneClicked"],["class","card border-warning mb-4",4,"ngIf"],["class","d-block mb-4",4,"ngIf"],[1,"d-block","mb-4"],["class","card border-success mb-4",4,"ngIf"],[1,"card"],[1,"card-header","d-flex"],["href","https://help.bitwarden.com/article/what-is-an-organization/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"card-body"],[3,"vault"],["attachments",""],["folderAddEdit",""],["cipherAddEdit",""],["share",""],["collections",""],["updateKeyTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["type","warning","icon","fa-warning"],[1,"card","border-warning","mb-4"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"fa","fa-warning","fa-fw"],["type","button",1,"btn","btn-block","btn-outline-secondary",3,"click"],["target","_blank","href","https://browser-update.org/update-browser.html","rel","noopener",1,"btn","btn-block","btn-outline-secondary"],[1,"card","border-success","mb-4"],[1,"card-header","bg-success","text-white"],["aria-hidden","true",1,"fa","fa-star","fa-fw"],["routerLink","/settings/premium",1,"btn","btn-block","btn-outline-secondary"]],template:function(e,t){if(1&e&&(v.ɵɵelementStart(0,"div",0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",1),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"div",2),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"app-vault-groupings",3),v.ɵɵlistener("onAllClicked",(function(){return t.clearGroupingFilters()}))("onFavoritesClicked",(function(){return t.filterFavorites()}))("onCipherTypeClicked",(function(e){return t.filterCipherType(e)}))("onFolderClicked",(function(e){return t.filterFolder(e.id)}))("onAddFolder",(function(){return t.addFolder()}))("onEditFolder",(function(e){return t.editFolder(e.id)}))("onCollectionClicked",(function(e){return t.filterCollection(e.id)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)}))("onTrashClicked",(function(){return t.filterDeleted()})),v.ɵɵtext(7,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"div",4),v.ɵɵtext(11,"\n "),v.ɵɵelementStart(12,"div",5),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"h1"),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementStart(17,"small",6,7),v.ɵɵtext(19,"\n "),v.ɵɵtemplate(20,G,9,6,"ng-container",8),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(23,"\n "),v.ɵɵelementStart(24,"div",9),v.ɵɵtext(25,"\n "),v.ɵɵelementStart(26,"app-vault-bulk-actions",10),v.ɵɵtext(27,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(28,"\n "),v.ɵɵtemplate(29,K,5,3,"button",11),v.ɵɵtext(30,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n "),v.ɵɵtemplate(33,q,2,1,"app-callout",12),v.ɵɵtext(34,"\n "),v.ɵɵelementStart(35,"app-vault-ciphers",13),v.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onShareClicked",(function(e){return t.shareCipher(e)}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)})),v.ɵɵtext(36,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(37,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(38,"\n "),v.ɵɵelementStart(39,"div",2),v.ɵɵtext(40,"\n "),v.ɵɵtemplate(41,W,19,9,"div",14),v.ɵɵtext(42,"\n "),v.ɵɵtemplate(43,H,1,0,"app-verify-email",15),v.ɵɵtext(44,"\n "),v.ɵɵelement(45,"app-send-info",16),v.ɵɵtext(46,"\n "),v.ɵɵtemplate(47,$,19,9,"div",14),v.ɵɵtext(48,"\n "),v.ɵɵtemplate(49,Y,19,9,"div",17),v.ɵɵtext(50,"\n "),v.ɵɵelementStart(51,"div",18),v.ɵɵtext(52,"\n "),v.ɵɵelementStart(53,"div",19),v.ɵɵtext(54),v.ɵɵpipe(55,"i18n"),v.ɵɵelementStart(56,"a",20),v.ɵɵpipe(57,"i18n"),v.ɵɵtext(58,"\n "),v.ɵɵelement(59,"i",21),v.ɵɵtext(60,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(61,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(62,"\n "),v.ɵɵelementStart(63,"div",22),v.ɵɵtext(64,"\n "),v.ɵɵelement(65,"app-organizations",23),v.ɵɵtext(66,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(67,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(68,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(69,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(70,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(71,"\n"),v.ɵɵtemplate(72,Q,0,0,"ng-template",null,24,v.ɵɵtemplateRefExtractor),v.ɵɵtext(74,"\n"),v.ɵɵtemplate(75,J,0,0,"ng-template",null,25,v.ɵɵtemplateRefExtractor),v.ɵɵtext(77,"\n"),v.ɵɵtemplate(78,X,0,0,"ng-template",null,26,v.ɵɵtemplateRefExtractor),v.ɵɵtext(80,"\n"),v.ɵɵtemplate(81,Z,0,0,"ng-template",null,27,v.ɵɵtemplateRefExtractor),v.ɵɵtext(83,"\n"),v.ɵɵtemplate(84,ee,0,0,"ng-template",null,28,v.ɵɵtemplateRefExtractor),v.ɵɵtext(86,"\n"),v.ɵɵtemplate(87,te,0,0,"ng-template",null,29,v.ɵɵtemplateRefExtractor),v.ɵɵtext(89,"\n")),2&e){var n=v.ɵɵreference(18);v.ɵɵadvance(15),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,15,"myVault"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",n.loading),v.ɵɵadvance(6),v.ɵɵproperty("ciphersComponent",t.ciphersComponent)("modal",t.modal)("deleted",t.deleted),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",!t.deleted),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.deleted),v.ɵɵadvance(8),v.ɵɵproperty("ngIf",t.showUpdateKey),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showVerifyEmail),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.showBrowserOutdated),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showPremiumCallout),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(55,17,"organizations"),"\n "),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(57,19,"learnMore")),v.ɵɵadvance(9),v.ɵɵproperty("vault",!0)}},directives:[P.GroupingsComponent,k.ApiActionDirective,_.NgIf,A.BulkActionsComponent,O.CiphersComponent,T.SendInfoComponent,M.A11yTitleDirective,B.OrganizationsComponent,D.CalloutComponent,R.VerifyEmailComponent,g.RouterLinkWithHref],pipes:[V.I18nPipe],encapsulation:2}),e}();t.VaultComponent=ne},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(19),n(18),n(48),n(3),n(14),n(61);var o=n(511),a=n(642),s=n(645),l=n(0),c=n(6),p=n(3),u=n(9),d=n(18),m=n(14),h=n(61),f=n(48),v=n(19),y=n(13),g=n(16),x=n(17),b=n(24),S=n(65),w=n(45),C=n(10),I=function(){function e(e,t,n,r,i,o,a,s){this.apiService=e,this.i18nService=t,this.toasterService=n,this.cryptoService=r,this.messagingService=i,this.syncService=o,this.folderService=a,this.cipherService=s}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.hasEncKey()];case 1:if(n.sent())return[2];if(null==this.masterPassword||""===this.masterPassword)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2];n.label=2;case 2:return n.trys.push([2,4,,5]),this.formPromise=this.makeRequest().then((function(e){return t.apiService.postAccountKey(e)})),[4,this.formPromise];case 3:return n.sent(),e={type:"success",title:this.i18nService.t("keyUpdated"),body:this.i18nService.t("logBackInOthersToo"),timeout:15e3},this.toasterService.popAsync(e),this.messagingService.send("logout"),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.makeRequest=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,l,c,p,u,d,m,h;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.getKey()];case 1:return e=i.sent(),[4,this.cryptoService.makeEncKey(e)];case 2:return t=i.sent(),[4,this.cryptoService.getPrivateKey()];case 3:return n=i.sent(),r=null,null==n?[3,5]:[4,this.cryptoService.encrypt(n,t[0])];case 4:r=i.sent(),i.label=5;case 5:return(l=new s.UpdateKeyRequest).privateKey=null!=r?r.encryptedString:null,l.key=t[1].encryptedString,c=l,[4,this.cryptoService.hashPassword(this.masterPassword,null)];case 6:return c.masterPasswordHash=i.sent(),[4,this.syncService.fullSync(!0)];case 7:return i.sent(),[4,this.folderService.getAllDecrypted()];case 8:p=i.sent(),m=0,i.label=9;case 9:return m<p.length?null==p[m].id?[3,11]:[4,this.folderService.encrypt(p[m],t[0])]:[3,12];case 10:u=i.sent(),l.folders.push(new a.FolderWithIdRequest(u)),i.label=11;case 11:return m++,[3,9];case 12:return[4,this.cipherService.getAllDecrypted()];case 13:d=i.sent(),m=0,i.label=14;case 14:return m<d.length?null!=d[m].organizationId?[3,16]:[4,this.cipherService.encrypt(d[m],t[0])]:[3,17];case 15:h=i.sent(),l.ciphers.push(new o.CipherWithIdRequest(h)),i.label=16;case 16:return m++,[3,14];case 17:return[2,l]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService),l.ɵɵdirectiveInject(d.CryptoService),l.ɵɵdirectiveInject(m.MessagingService),l.ɵɵdirectiveInject(h.SyncService),l.ɵɵdirectiveInject(f.FolderService),l.ɵɵdirectiveInject(v.CipherService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-update-key"]],decls:63,vars:33,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","updateEncKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","updateEncKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://help.bitwarden.com/article/update-encryption-key/","target","_blank","rel","noopener"],["type","warning"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"button",6),l.ɵɵpipe(14,"i18n"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"span",7),l.ɵɵtext(17,"×"),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"div",8),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"p"),l.ɵɵtext(24),l.ɵɵpipe(25,"i18n"),l.ɵɵpipe(26,"i18n"),l.ɵɵelementStart(27,"a",9),l.ɵɵtext(28),l.ɵɵpipe(29,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"app-callout",10),l.ɵɵtext(33),l.ɵɵpipe(34,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"label",11),l.ɵɵtext(37),l.ɵɵpipe(38,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementStart(40,"input",12),l.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementStart(43,"div",13),l.ɵɵtext(44,"\n "),l.ɵɵelementStart(45,"button",14),l.ɵɵtext(46,"\n "),l.ɵɵelement(47,"i",15),l.ɵɵpipe(48,"i18n"),l.ɵɵtext(49,"\n "),l.ɵɵelementStart(50,"span"),l.ɵɵtext(51),l.ɵɵpipe(52,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(53,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"button",16),l.ɵɵtext(56),l.ɵɵpipe(57,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(59,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(60,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(61,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n")),2&e){var n=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(11,13,"updateEncryptionKey")),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(14,15,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate2("",l.ɵɵpipeBind1(25,17,"updateEncryptionKeyShortDesc")," ",l.ɵɵpipeBind1(26,19,"updateEncryptionKeyDesc"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(29,21,"learnMore")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(34,23,"updateEncryptionKeyWarning")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(38,25,"masterPass")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.masterPassword),l.ɵɵadvance(5),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(48,27,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(52,29,"updateEncryptionKey")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(57,31,"close"))}},directives:[y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.A11yTitleDirective,b.CalloutComponent,y.DefaultValueAccessor,y.RequiredValidator,S.AutofocusDirective,w.InputVerbatimDirective,y.NgControlStatus,y.NgModel],pipes:[C.I18nPipe],encapsulation:2}),e}();t.UpdateKeyComponent=I},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(48),n(3),n(5);var o=n(900),a=n(0),s=n(48),l=n(3),c=n(5),p=n(13),u=n(16),d=n(17),m=n(65),h=n(4),f=n(10);function v(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",17,18),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().delete()})),a.ɵɵpipe(2,"i18n"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"i",19),a.ɵɵtext(5,"\n "),a.ɵɵelement(6,"i",20),a.ɵɵpipe(7,"i18n"),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵreference(1),i=a.ɵɵnextContext();a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(2,6,"delete")),a.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),a.ɵɵadvance(4),a.ɵɵproperty("hidden",r.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(7,8,"loading")),a.ɵɵproperty("hidden",!r.loading)}}var y=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.FolderService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-folder-add-edit"]],features:[a.ɵɵInheritDefinitionFeature],decls:54,vars:20,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","folderAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-sm"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","folderAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["for","name"],["id","name","type","text","name","Name","required","","appAutofocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"button",6),a.ɵɵpipe(13,"i18n"),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"span",7),a.ɵɵtext(16,"×"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"div",8),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"label",9),a.ɵɵtext(23),a.ɵɵpipe(24,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"input",10),a.ɵɵlistener("ngModelChange",(function(e){return t.folder.name=e})),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"div",11),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"button",12),a.ɵɵtext(32,"\n "),a.ɵɵelement(33,"i",13),a.ɵɵpipe(34,"i18n"),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"span"),a.ɵɵtext(37),a.ɵɵpipe(38,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementStart(41,"button",14),a.ɵɵtext(42),a.ɵɵpipe(43,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"div",15),a.ɵɵtext(46,"\n "),a.ɵɵtemplate(47,v,9,10,"button",16),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(52,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n")),2&e){var n=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(t.title),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(13,10,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(24,12,"name")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.folder.name),a.ɵɵadvance(5),a.ɵɵproperty("disabled",n.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(34,14,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(38,16,"save")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(43,18,"cancel")),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",t.editMode)}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,d.A11yTitleDirective,p.DefaultValueAccessor,p.RequiredValidator,m.AutofocusDirective,p.NgControlStatus,p.NgModel,h.NgIf],pipes:[f.I18nPipe],encapsulation:2}),t}(o.FolderAddEditComponent);t.FolderAddEditComponent=y},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});n(0),n(19),n(40),n(3),n(5),n(7);var o=n(901),a=n(0),s=n(40),l=n(5),c=n(3),p=n(7),u=n(19),d=n(13),m=n(16),h=n(4),f=n(17),v=n(53),y=n(8),g=n(10);function x(e,t){if(1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵtextInterpolate(n.cipher.name)}}function b(e,t){1&e&&(a.ɵɵelementStart(0,"div",14),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"noOrganizationsList"),"\n "))}function S(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",22),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){var n=t.$implicit;a.ɵɵproperty("ngValue",n.id),a.ɵɵadvance(1),a.ɵɵtextInterpolate(n.name)}}function w(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",23),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"button",24),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).selectAll(!0)})),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"button",24),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).selectAll(!1)})),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,2,"selectAll"),"\n "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function C(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function I(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr",27),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(n);var e=t.$implicit;return a.ɵɵnextContext(3).check(e)})),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",28),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"input",29),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),t.$implicit.checked=e})),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td"),a.ɵɵtext(8),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index;a.ɵɵadvance(4),a.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),a.ɵɵproperty("ngModel",r.checked),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",r.name,"\n ")}}function E(e,t){if(1&e&&(a.ɵɵelementStart(0,"table",25),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,I,10,3,"tr",26),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",n.collections)}}function P(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",14),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",15),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"label",16),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"select",17),a.ɵɵlistener("ngModelChange",(function(e){return a.ɵɵrestoreView(n),a.ɵɵnextContext().organizationId=e}))("change",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext().filterCollections()})),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,S,2,2,"option",18),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",19),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"h3"),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵtemplate(24,w,10,6,"div",20),a.ɵɵtext(25,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵtemplate(27,C,3,3,"div",6),a.ɵɵtext(28,"\n "),a.ɵɵtemplate(29,E,7,1,"table",21),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext();a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,8,"shareDesc")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,10,"organization")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",r.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",r.organizations),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,12,"collections")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",r.collections&&r.collections.length),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!r.collections||!r.collections.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",r.collections&&r.collections.length)}}var k=function(e){return{loading:e}};function _(e,t){if(1&e&&(a.ɵɵelementStart(0,"button",30),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",31),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span"),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(),r=a.ɵɵreference(5);a.ɵɵproperty("disabled",r.loading||!n.canSave)("ngClass",a.ɵɵpureFunction1(8,k,r.loading)),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,4,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,6,"save"))}}function A(e,t){1&e&&(a.ɵɵelementStart(0,"a",32),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"newOrganization"),"\n "))}var O=function(e){function t(t,n,r,i,o){return e.call(this,t,n,r,i,o)||this}return i(t,e),t.prototype.ngOnDestroy=function(){this.selectAll(!1)},t.prototype.check=function(e,t){e.checked=null==t?!e.checked:t},t.prototype.selectAll=function(e){var t=this;(e?this.collections:this.writeableCollections).forEach((function(n){return t.check(n,e)}))},t.ɵfac=function(e){return new(e||t)(a.ɵɵdirectiveInject(s.CollectionService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.UserService),a.ɵɵdirectiveInject(u.CipherService))},t.ɵcmp=a.ɵɵdefineComponent({type:t,selectors:[["app-vault-share"]],features:[a.ɵɵInheritDefinitionFeature],decls:41,vars:15,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","shareTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","shareTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit manual",3,"disabled","ngClass",4,"ngIf"],["href","#","routerLink","/settings/create-organization","class","btn btn-primary",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],[1,"form-group"],["for","organization"],["id","organization","name","OrganizationId",1,"form-control",3,"ngModel","ngModelChange","change"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[3,"ngValue"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit","manual",3,"disabled","ngClass"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-primary"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵtemplate(12,x,2,1,"small",6),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"button",7),a.ɵɵpipe(16,"i18n"),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"span",8),a.ɵɵtext(19,"×"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵtemplate(23,b,3,3,"div",9),a.ɵɵtext(24,"\n "),a.ɵɵtemplate(25,P,31,14,"div",9),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"div",10),a.ɵɵtext(28,"\n "),a.ɵɵtemplate(29,_,9,10,"button",11),a.ɵɵtext(30,"\n "),a.ɵɵtemplate(31,A,3,3,"a",12),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"button",13),a.ɵɵtext(34),a.ɵɵpipe(35,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n")),2&e&&(a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,9,"share"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.cipher),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(16,11,"close")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",!t.organizations||!t.organizations.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.organizations&&t.organizations.length),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.organizations&&t.organizations.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.organizations||!t.organizations.length),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(35,13,"cancel")))},directives:[d.ɵangular_packages_forms_forms_y,d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.NgIf,f.A11yTitleDirective,d.SelectControlValueAccessor,d.NgControlStatus,d.NgModel,h.NgForOf,d.NgSelectOption,d.ɵangular_packages_forms_forms_x,d.CheckboxControlValueAccessor,v.StopPropDirective,h.NgClass,y.RouterLinkWithHref],pipes:[g.I18nPipe],encapsulation:2}),t}(o.ShareComponent);t.ShareComponent=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=n(10),o=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵcmp=r.ɵɵdefineComponent({type:e,selectors:[["app-send-info"]],decls:29,vars:18,consts:[[1,"card","border-primary"],[1,"card-header","bg-primary","text-white"],["aria-hidden","true",1,"fa","fa-paper-plane-o","fa-fw"],["href","/#/sends",1,"text-white"],[1,"card-body"],["href","https://www.bitwarden.com/products/send?source=web-vault","target","_blank"],["href","https://www.youtube.com/watch?v=AFtPP9bcuYM","target","_blank"],["href","/#/sends"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"a",3),r.ɵɵtext(7,"Bitwarden Send"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"div",4),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementStart(13,"a",5),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementStart(18,"a",6),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementStart(23,"a",7),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,".\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n")),2&e&&(r.ɵɵadvance(11),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(12,6,"sendVaultCardProductDesc"),"\n "),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(15,8,"sendVaultCardLearnMore")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1(",\n ",r.ɵɵpipeBind1(17,10,"sendVaultCardSee"),"\n "),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(20,12,"sendVaultCardHowItWorks")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1(",\n ",r.ɵɵpipeBind1(22,14,"sendVaultCardOr"),"\n "),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,16,"sendVaultCardTryItNow")))},pipes:[i.I18nPipe],encapsulation:2}),e}();t.SendInfoComponent=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(9),n(6),n(3);var o=n(0),a=n(6),s=n(3),l=n(9),c=n(16),p=n(10),u=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n}return e.prototype.send=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(null!=this.actionPromise)return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),this.actionPromise=this.apiService.postAccountVerifyEmail(),[4,this.actionPromise];case 2:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("checkInboxForVerification")),[3,4];case 3:return e.sent(),[3,4];case 4:return this.actionPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ToasterService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-verify-email"]],decls:27,vars:14,consts:[[1,"card","border-warning"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"fa","fa-envelope-o","fa-fw"],[1,"card-body"],["type","button",1,"btn","btn-block","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["sendBtn",""],["aria-hidden","true",1,"fa","fa-spin","fa-spinner",3,"title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",2),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"p"),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"button",4,5),o.ɵɵlistener("click",(function(){return t.send()})),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"i",6),o.ɵɵpipe(18,"i18n"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"span"),o.ɵɵtext(21),o.ɵɵpipe(22,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n")),2&e){var n=o.ɵɵreference(15);o.ɵɵadvance(5),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(6,6,"verifyEmail"),"\n "),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,8,"verifyEmailDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",t.actionPromise)("disabled",n.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(18,10,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(22,12,"sendEmail"),"\n ")}},directives:[c.ApiActionDirective],pipes:[p.I18nPipe],encapsulation:2}),e}();t.VerifyEmailComponent=u},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(9),n(3),n(7);var o=n(0),a=n(7),s=n(8),l=n(9),c=n(3),p=function(){function e(e,t,n,r){this.userService=e,this.router=t,this.toasterService=n,this.i18nService=r}return e.prototype.canActivate=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.getOrganization(e.params.organizationId)];case 1:return null==(t=n.sent())?(this.router.navigate(["/"]),[2,!1]):t.isOwner||t.enabled?[2,!0]:(this.toasterService.popAsync("error",null,this.i18nService.t("organizationIsDisabled")),this.router.navigate(["/"]),[2,!1])}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵinject(a.UserService),o.ɵɵinject(s.Router),o.ɵɵinject(l.ToasterService),o.ɵɵinject(c.I18nService))},e.ɵprov=o.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.OrganizationGuardService=p},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(7);var o=n(666),a=n(0),s=n(7),l=n(8),c=function(){function e(e,t){this.userService=e,this.router=t}return e.prototype.canActivate=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getOrganization(e.params.organizationId)];case 1:return t=r.sent(),-1!==(n=null==e.data?null:e.data.permissions).indexOf(o.Permissions.AccessBusinessPortal)&&t.canAccessBusinessPortal||-1!==n.indexOf(o.Permissions.AccessEventLogs)&&t.canAccessEventLogs||-1!==n.indexOf(o.Permissions.AccessImportExport)&&t.canAccessImportExport||-1!==n.indexOf(o.Permissions.AccessReports)&&t.canAccessReports||-1!==n.indexOf(o.Permissions.ManageAllCollections)&&t.canManageAllCollections||-1!==n.indexOf(o.Permissions.ManageAssignedCollections)&&t.canManageAssignedCollections||-1!==n.indexOf(o.Permissions.ManageGroups)&&t.canManageGroups||-1!==n.indexOf(o.Permissions.ManageOrganization)&&t.isOwner||-1!==n.indexOf(o.Permissions.ManagePolicies)&&t.canManagePolicies||-1!==n.indexOf(o.Permissions.ManageUsers)&&t.canManageUsers?[2,!0]:(this.router.navigate(["/organizations",t.id]),[2,!1])}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵinject(s.UserService),a.ɵɵinject(l.Router))},e.ɵprov=a.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.OrganizationTypeGuardService=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.AccessBusinessPortal=0]="AccessBusinessPortal",e[e.AccessEventLogs=1]="AccessEventLogs",e[e.AccessImportExport=2]="AccessImportExport",e[e.AccessReports=3]="AccessReports",e[e.ManageAllCollections=4]="ManageAllCollections",e[e.ManageAssignedCollections=5]="ManageAssignedCollections",e[e.ManageGroups=6]="ManageGroups",e[e.ManageOrganization=7]="ManageOrganization",e[e.ManagePolicies=8]="ManagePolicies",e[e.ManageUsers=9]="ManageUsers"}(t.Permissions||(t.Permissions={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(14),n(7),n(93);var o=n(0),a=n(93),s=n(7),l=n(8),c=n(14),p=function(){function e(e,t,n,r){this.vaultTimeoutService=e,this.userService=t,this.router=n,this.messagingService=r}return e.prototype.canActivate=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return e.sent()?[4,this.vaultTimeoutService.isLocked()]:(this.messagingService.send("authBlocked"),[2,!1]);case 2:return e.sent()?(null!=t&&this.messagingService.send("lockedUrl",{url:t.url}),this.router.navigate(["lock"],{queryParams:{promptBiometric:!0}}),[2,!1]):[2,!0]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵinject(a.VaultTimeoutService),o.ɵɵinject(s.UserService),o.ɵɵinject(l.Router),o.ɵɵinject(c.MessagingService))},e.ɵprov=o.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.AuthGuardService=p},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(7),n(93);var o=n(0),a=n(93),s=n(7),l=n(8),c=function(){function e(e,t,n){this.vaultTimeoutService=e,this.userService=t,this.router=n}return e.prototype.canActivate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.vaultTimeoutService.isLocked()];case 1:return e.sent()?[3,3]:[4,this.userService.isAuthenticated()];case 2:return e.sent()?this.router.navigate(["vault"]):this.router.navigate(["login"]),[2,!1];case 3:return[2,!0]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵinject(a.VaultTimeoutService),o.ɵɵinject(s.UserService),o.ɵɵinject(l.Router))},e.ɵprov=o.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.LockGuardService=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(7),n(93);var o=n(0),a=n(93),s=n(7),l=n(8),c=function(){function e(e,t,n){this.vaultTimeoutService=e,this.userService=t,this.router=n}return e.prototype.canActivate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return e.sent()?[4,this.vaultTimeoutService.isLocked()]:[3,3];case 2:return e.sent()?this.router.navigate(["lock"]):this.router.navigate(["vault"]),[2,!1];case 3:return[2,!0]}}))}))},e.ɵfac=function(t){return new(t||e)(o.ɵɵinject(a.VaultTimeoutService),o.ɵɵinject(s.UserService),o.ɵɵinject(l.Router))},e.ɵprov=o.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.UnauthGuardService=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(8),n(6),n(19),n(18),n(902)),s=n(903),l=n(84),c=n(674),p=n(675),u=n(0),d=n(19),m=n(18),h=n(8),f=n(6),v=n(4),y=n(107),g=n(37),x=n(53),b=n(17),S=n(10),w=["cipherAddEdit"],C=["attachments"];function I(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",13),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",14),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"shared")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",15),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",14),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"attachments")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",16),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"button",17),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelement(5,"i",18),u.ɵɵtext(6,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",19),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"a",20),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=u.ɵɵnextContext().$implicit;return u.ɵɵnextContext(2).viewAttachments(e)})),u.ɵɵtext(11,"\n "),u.ɵɵelement(12,"i",21),u.ɵɵtext(13),u.ɵɵpipe(14,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(3,2,"options")),u.ɵɵadvance(11),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(14,4,"attachments"),"\n "))}function k(e,t){if(1&e){var n=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"tr"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"td",7),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"app-vault-icon",8),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"td",9),u.ɵɵtext(8,"\n "),u.ɵɵelementStart(9,"a",10),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(n);var e=t.$implicit;return u.ɵɵnextContext(2).selectCipher(e)})),u.ɵɵpipe(10,"i18n"),u.ɵɵtext(11),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵtemplate(13,I,9,6,"ng-container",2),u.ɵɵtext(14,"\n "),u.ɵɵtemplate(15,E,9,6,"ng-container",2),u.ɵɵtext(16,"\n "),u.ɵɵelement(17,"br"),u.ɵɵtext(18,"\n "),u.ɵɵelementStart(19,"small"),u.ɵɵtext(20),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"td",11),u.ɵɵtext(24,"\n "),u.ɵɵtemplate(25,P,17,6,"div",12),u.ɵɵtext(26,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=u.ɵɵnextContext(2);u.ɵɵadvance(4),u.ɵɵproperty("cipher",r),u.ɵɵadvance(5),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(10,7,"editItem")),u.ɵɵadvance(2),u.ɵɵtextInterpolate(r.name),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!i.organization&&r.organizationId),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",r.hasAttachments),u.ɵɵadvance(5),u.ɵɵtextInterpolate(r.subTitle),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",r.hasAttachments)}}function _(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"table",5),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"tbody"),u.ɵɵtext(5,"\n "),u.ɵɵtemplate(6,k,28,9,"tr",6),u.ɵɵtext(7,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementContainerEnd()),2&e){var n=u.ɵɵnextContext();u.ɵɵadvance(6),u.ɵɵproperty("ngForOf",n.ciphers)}}function A(e,t){}function O(e,t){}var T=function(){function e(e,t,n,r,i,o){this.cipherService=e,this.cryptoService=t,this.componentFactoryResolver=n,this.router=r,this.route=i,this.apiService=o,this.ciphers=[],this.modal=null}return e.prototype.ngOnInit=function(){var e=this;this.route.params.subscribe((function(t){if(null==t.id)return e.router.navigate(["settings/emergency-access"]);e.id=t.id,e.load()}))},e.prototype.selectCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent);this.modal=this.cipherAddEditModalRef.createComponent(n).instance;var r=this.modal.show(p.EmergencyAddEditComponent,this.cipherAddEditModalRef);return r.cipherId=null==e?null:e.id,r.cipher=e,this.modal.onClosed.subscribe((function(){t.modal=null})),r},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.apiService.postEmergencyAccessView(this.id)];case 1:return e=n.sent(),t=this,[4,this.getAllCiphers(e)];case 2:return t.ciphers=n.sent(),[2]}}))}))},e.prototype.viewAttachments=function(e){return r(this,void 0,void 0,(function(){var t,n,o=this;return i(this,(function(a){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent),this.modal=this.attachmentsModalRef.createComponent(t).instance,(n=this.modal.show(c.EmergencyAccessAttachmentsComponent,this.attachmentsModalRef)).cipher=e,n.emergencyAccessId=this.id,this.modal.onClosed.subscribe((function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))})),[2]}))}))},e.prototype.getAllCiphers=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,l;return i(this,(function(i){switch(i.label){case 0:return t=e.ciphers,n=[],[4,this.cryptoService.rsaDecrypt(e.keyEncrypted)];case 1:return r=i.sent(),o=new s.SymmetricCryptoKey(r),l=[],t.forEach((function(e){var t=new a.CipherData(e),r=new s.Cipher(t);l.push(r.decrypt(o).then((function(e){return n.push(e)})))})),[4,Promise.all(l)];case 2:return i.sent(),n.sort(this.cipherService.getLocaleSortingFunction()),[2,n]}}))}))},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.CipherService),u.ɵɵdirectiveInject(m.CryptoService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver),u.ɵɵdirectiveInject(h.Router),u.ɵɵdirectiveInject(h.ActivatedRoute),u.ɵɵdirectiveInject(f.ApiService))},e.ɵcmp=u.ɵɵdefineComponent({type:e,selectors:[["emergency-access-view"]],viewQuery:function(e,t){var n;(1&e&&(u.ɵɵstaticViewQuery(w,!0,o.ViewContainerRef),u.ɵɵstaticViewQuery(C,!0,o.ViewContainerRef)),2&e)&&(u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.attachmentsModalRef=n.first))},decls:18,vars:4,consts:[[1,"page-header"],[1,"mt-4"],[4,"ngIf"],["cipherAddEdit",""],["attachments",""],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"table-list-options"],["class","dropdown","appListDropdown","",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"fa","fa-share-alt",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-paperclip"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h1"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n"),u.ɵɵelementStart(7,"div",1),u.ɵɵtext(8,"\n "),u.ɵɵtemplate(9,_,10,1,"ng-container",2),u.ɵɵtext(10,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n"),u.ɵɵtemplate(12,A,0,0,"ng-template",null,3,u.ɵɵtemplateRefExtractor),u.ɵɵtext(14,"\n"),u.ɵɵtemplate(15,O,0,0,"ng-template",null,4,u.ɵɵtemplateRefExtractor),u.ɵɵtext(17,"\n")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,2,"vault")),u.ɵɵadvance(6),u.ɵɵproperty("ngIf",t.ciphers.length))},directives:[v.NgIf,v.NgForOf,y.IconComponent,g.StopClickDirective,x.StopPropDirective,b.A11yTitleDirective],pipes:[S.I18nPipe],encapsulation:2}),e}();t.EmergencyAccessViewComponent=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EncryptedObject=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EnvironmentUrls=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.password=e,this.date=t};t.GeneratedPasswordHistory=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(6),n(19),n(18),n(3),n(5),n(7);var s=n(614),l=n(0),c=n(19),p=n(3),u=n(18),d=n(7),m=n(5),h=n(6),f=n(13),v=n(16),y=n(4),g=n(17),x=n(37),b=n(10);function S(e,t){if(1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.cipher.name)}}function w(e,t){1&e&&l.ɵɵelement(0,"i",24)}function C(e,t){1&e&&l.ɵɵelement(0,"i",25)}function I(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",26),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"a",27),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"i",28),l.ɵɵpipe(5,"i18n"),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"span",29),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"button",30,31),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(2).reupload(e)})),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(12),i=l.ɵɵnextContext().$implicit,o=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(5,5,"attachmentFixDesc")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(9,7,"attachmentFixDesc")),l.ɵɵadvance(3),l.ɵɵproperty("appApiAction",o.reuploadPromises[i.id])("disabled",r.loading),l.ɵɵadvance(2),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,9,"fix"))}}function E(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"td",32),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"button",33,34),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(2).delete(e)})),l.ɵɵpipe(4,"i18n"),l.ɵɵtext(5,"\n "),l.ɵɵelement(6,"i",35),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"i",36),l.ɵɵpipe(9,"i18n"),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(3),i=l.ɵɵnextContext().$implicit,o=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(4,6,"delete")),l.ɵɵproperty("appApiAction",o.deletePromises[i.id])("disabled",r.loading),l.ɵɵadvance(4),l.ɵɵproperty("hidden",r.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(9,8,"loading")),l.ɵɵproperty("hidden",!r.loading)}}function P(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",16),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,w,1,0,"i",17),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,C,1,0,"i",18),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td",19),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"div",20),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"a",21),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(2).download(e)})),l.ɵɵtext(14),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,I,16,11,"div",22),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"small"),l.ɵɵtext(20),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵtemplate(23,E,12,10,"td",23),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("ngIf",!r.downloading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.downloading),l.ɵɵadvance(8),l.ɵɵtextInterpolate(r.fileName),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",i.showFixOldAttachments(r)),l.ɵɵadvance(4),l.ɵɵtextInterpolate(r.sizeName),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!i.viewOnly)}}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",14),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,P,25,6,"tr",15),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.cipher.attachments)}}function _(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h3"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",37),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelement(10,"input",38),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"small",39),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"newAttachment")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,5,"file")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,7,"maxFileSize")))}function A(e,t){if(1&e&&(l.ɵɵelementStart(0,"button",40),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",41),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e){l.ɵɵnextContext();var n=l.ɵɵreference(5);l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,5,"save"))}}var O=function(e){function t(t,n,r,i,o,a){var s=e.call(this,t,n,r,i,o,a,window)||this;return s.viewOnly=!0,s.canAccessAttachments=!0,s}return i(t,e),t.prototype.init=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2]}))}))},t.prototype.showFixOldAttachments=function(e){return!1},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.CryptoService),l.ɵɵdirectiveInject(d.UserService),l.ɵɵdirectiveInject(m.PlatformUtilsService),l.ɵɵdirectiveInject(h.ApiService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["emergency-access-attachments"]],features:[l.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","fa fa-fw fa-lg fa-file-o","aria-hidden","true",4,"ngIf"],["class","fa fa-spinner fa-lg fa-fw fa-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"fa","fa-fw","fa-lg","fa-file-o"],["aria-hidden","true",1,"fa","fa-spinner","fa-lg","fa-fw","fa-spin"],[1,"ml-2"],["href","https://help.bitwarden.com/article/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"fa","fa-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,S,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵtemplate(25,k,7,1,"table",10),l.ɵɵtext(26,"\n "),l.ɵɵtemplate(27,_,16,9,"div",6),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"div",11),l.ɵɵtext(31,"\n "),l.ɵɵtemplate(32,A,9,7,"button",12),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"button",13),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n")),2&e&&(l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,8,"attachments"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.cipher),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,10,"close")),l.ɵɵadvance(10),l.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.viewOnly),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!t.viewOnly),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,12,"close")))},directives:[f.NgControlStatusGroup,f.NgForm,v.ApiActionDirective,y.NgIf,g.A11yTitleDirective,y.NgForOf,x.StopClickDirective],pipes:[b.I18nPipe],encapsulation:2}),t}(s.AttachmentsComponent);t.EmergencyAccessAttachmentsComponent=O},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(87),n(19),n(40),n(71),n(48),n(3),n(14),n(36),n(5),n(43),n(38),n(114),n(7);var s=n(260),l=n(0),c=n(19),p=n(48),u=n(3),d=n(5),m=n(87),h=n(38),f=n(7),v=n(40),y=n(114),g=n(36),x=n(14),b=n(71),S=n(43),w=n(13),C=n(16),I=n(17),E=n(4),P=n(24),k=n(65),_=n(45),A=n(37),O=n(267),T=n(291),M=n(10);function B(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",28),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function D(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function R(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",16),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",17),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"label",29),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"select",30),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.type=e})),l.ɵɵtext(9,"\n "),l.ɵɵtemplate(10,D,2,2,"option",31),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(6,4,"whatTypeOfItem")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.type)("disabled",r.cipher.isDeleted),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.typeOptions)}}function V(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.id),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function j(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",17),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"label",33),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"select",34),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.folderId=e})),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,V,2,2,"option",31),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,4,"folder")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.folderId)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.folders)}}function F(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",43),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"button",52),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext(3);return e.copy(e.cipher.login.username,"username","Username")})),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelement(5,"i",46),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(3,1,"copyUsername")))}function U(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",59),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(4).generatePassword()})),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelement(3,"i",60),l.ɵɵtext(4,"\n "),l.ɵɵelementEnd()}2&e&&l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(1,1,"generatePassword"))}function N(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",53),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,U,5,3,"a",54),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"a",55,56),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).checkPassword()})),l.ɵɵpipe(6,"i18n"),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"i",57),l.ɵɵtext(9,"\n "),l.ɵɵelement(10,"i",58),l.ɵɵpipe(11,"i18n"),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(5),i=l.ɵɵnextContext(3);l.ɵɵadvance(2),l.ɵɵproperty("ngIf",i.cipher.viewPassword),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(6,6,"checkPassword")),l.ɵɵproperty("appApiAction",i.checkPasswordPromise),l.ɵɵadvance(4),l.ɵɵproperty("hidden",r.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(11,8,"loading")),l.ɵɵproperty("hidden",!r.loading)}}function z(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",63),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(4).premiumRequired()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"premium"),"\n "))}function L(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",63),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(4).upgradeOrganization()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function G(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"img",61),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵtemplate(5,z,3,3,"a",62),l.ɵɵtext(6,"\n "),l.ɵɵtemplate(7,L,3,3,"a",62),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(3);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"verificationCodeTotp")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.organization&&!n.cipher.organizationId&&!n.canAccessPremium),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.organization&&!n.organization.useTotp||!n.organization&&!n.canAccessPremium&&n.cipher.organizationId&&!n.cipher.organizationUseTotp)}}var K=function(e){return{"stroke-dashoffset.px":e}};function q(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",64),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"span",65),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"span",66),l.ɵɵtext(5),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵnamespaceSVG(),l.ɵɵelementStart(7,"svg"),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"g"),l.ɵɵtext(10,"\n "),l.ɵɵelement(11,"circle",67),l.ɵɵtext(12,"\n "),l.ɵɵelement(13,"circle",68),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵnamespaceHTML(),l.ɵɵelementStart(18,"span",69),l.ɵɵpipe(19,"i18n"),l.ɵɵtext(20),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"button",70),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext(3);return e.copy(e.totpCode,"verificationCodeTotp","TOTP")})),l.ɵɵpipe(23,"i18n"),l.ɵɵtext(24,"\n "),l.ɵɵelement(25,"i",71),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(3);l.ɵɵadvance(5),l.ɵɵtextInterpolate(r.totpSec),l.ɵɵadvance(6),l.ɵɵproperty("ngStyle",l.ɵɵpureFunction1(9,K,r.totpDash)),l.ɵɵadvance(7),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(19,5,"verificationCodeTotp")),l.ɵɵadvance(2),l.ɵɵtextInterpolate(r.totpCodeFormatted),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function W(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("",n.name,"\n ")}}function H(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",82),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(4).removeUri(e)})),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelement(3,"i",83),l.ɵɵtext(4,"\n "),l.ɵɵelementEnd()}2&e&&l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(1,1,"remove"))}function $(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",16),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",73),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"label",74),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"div",36),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"input",75),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),t.$implicit.uri=e})),l.ɵɵpipe(11,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"div",43),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",44),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(4).launch(e)})),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelement(18,"i",76),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"button",52),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(4).copy(e.uri,"uri","URI")})),l.ɵɵpipe(22,"i18n"),l.ɵɵtext(23,"\n "),l.ɵɵelement(24,"i",46),l.ɵɵtext(25,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"div",77),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"div",39),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"label",74),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"a",78),l.ɵɵpipe(39,"i18n"),l.ɵɵtext(40,"\n "),l.ɵɵelement(41,"i",79),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementStart(45,"div",39),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"select",80),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),t.$implicit.match=e}))("change",(function(){l.ɵɵrestoreView(n);var e=t.$implicit;return l.ɵɵnextContext(4).loginUriMatchChanged(e)})),l.ɵɵtext(48,"\n "),l.ɵɵtemplate(49,W,2,2,"option",31),l.ɵɵtext(50,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(51,"\n "),l.ɵɵtemplate(52,H,5,3,"button",81),l.ɵɵtext(53,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(55,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=l.ɵɵnextContext(4);l.ɵɵadvance(4),l.ɵɵpropertyInterpolate1("for","loginUri",i,""),l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind2(6,19,"uriPosition",i+1)),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate1("id","loginUri",i,""),l.ɵɵpropertyInterpolate1("name","Login.Uris[",i,"].Uri"),l.ɵɵpropertyInterpolate1("placeholder","",l.ɵɵpipeBind1(11,22,"ex")," https://google.com"),l.ɵɵproperty("ngModel",r.uri)("disabled",o.cipher.isDeleted||o.viewOnly),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,24,"launch")),l.ɵɵproperty("disabled",!r.canLaunch),l.ɵɵadvance(6),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(22,26,"copyUri")),l.ɵɵadvance(13),l.ɵɵpropertyInterpolate1("for","loginUriMatch",i,""),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(39,30,"learnMore")),l.ɵɵadvance(9),l.ɵɵpropertyInterpolate1("id","loginUriMatch",i,""),l.ɵɵpropertyInterpolate1("name","Login.Uris[",i,"].Match"),l.ɵɵproperty("ngModel",r.match)("disabled",o.cipher.isDeleted||o.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",o.uriMatchOptions),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly)}}function Y(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,$,56,32,"div",72),l.ɵɵtext(3,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(3);l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",n.cipher.login.uris)("ngForTrackBy",n.trackByFunction)}}function Q(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",84),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).addUri()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",85),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(4,1,"newUri"),"\n "))}var J=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},X=function(e){return{low:e}};function Z(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",16),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",17),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",35),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"div",36),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"input",37),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.login.username=e})),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,F,8,3,"div",38),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"div",17),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",39),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"label",40),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,N,14,10,"div",41),l.ɵɵtext(27,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"div",36),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"input",42),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.login.password=e})),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",43),l.ɵɵtext(34,"\n "),l.ɵɵelementStart(35,"button",44),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).togglePassword()})),l.ɵɵpipe(36,"i18n"),l.ɵɵtext(37,"\n "),l.ɵɵelement(38,"i",45),l.ɵɵtext(39,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"button",44),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext(2);return e.copy(e.cipher.login.password,"password","Password")})),l.ɵɵpipe(42,"i18n"),l.ɵɵtext(43,"\n "),l.ɵɵelement(44,"i",46),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"div",16),l.ɵɵtext(52,"\n "),l.ɵɵelementStart(53,"div",17),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"label",47),l.ɵɵtext(56),l.ɵɵpipe(57,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementStart(59,"input",48),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.login.totp=e})),l.ɵɵelementEnd(),l.ɵɵtext(60,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(61,"\n "),l.ɵɵelementStart(62,"div",49),l.ɵɵtext(63,"\n "),l.ɵɵtemplate(64,G,9,5,"div",21),l.ɵɵtext(65,"\n "),l.ɵɵtemplate(66,q,28,11,"div",50),l.ɵɵtext(67,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(68,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(69,"\n "),l.ɵɵtemplate(70,Y,4,2,"ng-container",21),l.ɵɵtext(71,"\n "),l.ɵɵtemplate(72,Q,5,3,"a",51),l.ɵɵtext(73,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,23,"username")),l.ɵɵadvance(5),l.ɵɵproperty("ngModel",r.cipher.login.username)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!r.cipher.isDeleted),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(24,25,"password")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),l.ɵɵproperty("ngModel",r.cipher.login.password)("disabled",r.cipher.isDeleted||!r.cipher.viewPassword||r.viewOnly),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(36,27,"toggleVisibility")),l.ɵɵproperty("disabled",!r.cipher.viewPassword),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(33,J,!r.showPassword,r.showPassword)),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(42,29,"copyPassword")),l.ɵɵproperty("disabled",!r.cipher.viewPassword),l.ɵɵadvance(15),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("type",r.cipher.viewPassword?"text":"password"),l.ɵɵproperty("ngModel",r.cipher.login.totp)("disabled",r.cipher.isDeleted||!r.cipher.viewPassword||r.viewOnly),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(36,X,r.totpLow)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!r.cipher.login.totp||!r.totpCode),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.cipher.login.totp&&r.totpCode),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",r.cipher.login.hasUris),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly)}}function ee(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function te(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function ne(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",16),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",17),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",86),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"input",87),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.card.cardholderName=e})),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"div",17),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"label",88),l.ɵɵtext(16),l.ɵɵpipe(17,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"select",89),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.card.brand=e})),l.ɵɵtext(20,"\n "),l.ɵɵtemplate(21,ee,2,2,"option",31),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",16),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"div",17),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"label",90),l.ɵɵtext(31),l.ɵɵpipe(32,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"div",36),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"input",91),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.card.number=e})),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"div",43),l.ɵɵtext(39,"\n "),l.ɵɵelementStart(40,"button",52),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext(2);return e.copy(e.cipher.card.number,"number","Number")})),l.ɵɵpipe(41,"i18n"),l.ɵɵtext(42,"\n "),l.ɵɵelement(43,"i",46),l.ɵɵtext(44,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementStart(49,"div",92),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"label",93),l.ɵɵtext(52),l.ɵɵpipe(53,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"select",94),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.card.expMonth=e})),l.ɵɵtext(56,"\n "),l.ɵɵtemplate(57,te,2,2,"option",31),l.ɵɵtext(58,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(59,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(60,"\n "),l.ɵɵelementStart(61,"div",92),l.ɵɵtext(62,"\n "),l.ɵɵelementStart(63,"label",95),l.ɵɵtext(64),l.ɵɵpipe(65,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(66,"\n "),l.ɵɵelementStart(67,"input",96),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.card.expYear=e})),l.ɵɵpipe(68,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(69,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(70,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(71,"\n "),l.ɵɵelementStart(72,"div",16),l.ɵɵtext(73,"\n "),l.ɵɵelementStart(74,"div",17),l.ɵɵtext(75,"\n "),l.ɵɵelementStart(76,"label",97),l.ɵɵtext(77),l.ɵɵpipe(78,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(79,"\n "),l.ɵɵelementStart(80,"div",36),l.ɵɵtext(81,"\n "),l.ɵɵelementStart(82,"input",98),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.card.code=e})),l.ɵɵelementEnd(),l.ɵɵtext(83,"\n "),l.ɵɵelementStart(84,"div",43),l.ɵɵtext(85,"\n "),l.ɵɵelementStart(86,"button",52),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).toggleCardCode()})),l.ɵɵpipe(87,"i18n"),l.ɵɵtext(88,"\n "),l.ɵɵelement(89,"i",45),l.ɵɵtext(90,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(91,"\n "),l.ɵɵelementStart(92,"button",52),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext(2);return e.copy(e.cipher.card.code,"securityCode","Security Code")})),l.ɵɵpipe(93,"i18n"),l.ɵɵtext(94,"\n "),l.ɵɵelement(95,"i",46),l.ɵɵtext(96,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(97,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(98,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(99,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(100,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(101,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,26,"cardholderName")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.card.cardholderName)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(17,28,"brand")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.card.brand)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.cardBrandOptions),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(32,30,"number")),l.ɵɵadvance(5),l.ɵɵproperty("ngModel",r.cipher.card.number)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(41,32,"copyNumber")),l.ɵɵadvance(12),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(53,34,"expirationMonth")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.card.expMonth)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.cardExpMonthOptions),l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(65,36,"expirationYear")),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate1("placeholder","",l.ɵɵpipeBind1(68,38,"ex")," 2019"),l.ɵɵproperty("ngModel",r.cipher.card.expYear)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(78,40,"securityCode")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("type",r.showCardCode?"text":"password"),l.ɵɵproperty("ngModel",r.cipher.card.code)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(87,42,"toggleVisibility")),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(46,J,!r.showCardCode,r.showCardCode)),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(93,44,"securityCode"))}}function re(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function ie(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",16),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",99),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",100),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"select",101),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.title=e})),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,re,2,2,"option",31),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"div",16),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"div",99),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"label",102),l.ɵɵtext(22),l.ɵɵpipe(23,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"input",103),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.firstName=e})),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"div",99),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"label",104),l.ɵɵtext(31),l.ɵɵpipe(32,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n "),l.ɵɵelementStart(34,"input",105),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.middleName=e})),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"div",99),l.ɵɵtext(38,"\n "),l.ɵɵelementStart(39,"label",106),l.ɵɵtext(40),l.ɵɵpipe(41,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementStart(43,"input",107),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.lastName=e})),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"div",16),l.ɵɵtext(48,"\n "),l.ɵɵelementStart(49,"div",99),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"label",108),l.ɵɵtext(52),l.ɵɵpipe(53,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"input",109),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.username=e})),l.ɵɵelementEnd(),l.ɵɵtext(56,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(57,"\n "),l.ɵɵelementStart(58,"div",99),l.ɵɵtext(59,"\n "),l.ɵɵelementStart(60,"label",110),l.ɵɵtext(61),l.ɵɵpipe(62,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(63,"\n "),l.ɵɵelementStart(64,"input",111),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.company=e})),l.ɵɵelementEnd(),l.ɵɵtext(65,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(66,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(67,"\n "),l.ɵɵelementStart(68,"div",16),l.ɵɵtext(69,"\n "),l.ɵɵelementStart(70,"div",99),l.ɵɵtext(71,"\n "),l.ɵɵelementStart(72,"label",112),l.ɵɵtext(73),l.ɵɵpipe(74,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(75,"\n "),l.ɵɵelementStart(76,"input",113),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.ssn=e})),l.ɵɵelementEnd(),l.ɵɵtext(77,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(78,"\n "),l.ɵɵelementStart(79,"div",99),l.ɵɵtext(80,"\n "),l.ɵɵelementStart(81,"label",114),l.ɵɵtext(82),l.ɵɵpipe(83,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(84,"\n "),l.ɵɵelementStart(85,"input",115),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.passportNumber=e})),l.ɵɵelementEnd(),l.ɵɵtext(86,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(87,"\n "),l.ɵɵelementStart(88,"div",99),l.ɵɵtext(89,"\n "),l.ɵɵelementStart(90,"label",116),l.ɵɵtext(91),l.ɵɵpipe(92,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(93,"\n "),l.ɵɵelementStart(94,"input",117),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.licenseNumber=e})),l.ɵɵelementEnd(),l.ɵɵtext(95,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(96,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(97,"\n "),l.ɵɵelementStart(98,"div",16),l.ɵɵtext(99,"\n "),l.ɵɵelementStart(100,"div",17),l.ɵɵtext(101,"\n "),l.ɵɵelementStart(102,"label",118),l.ɵɵtext(103),l.ɵɵpipe(104,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(105,"\n "),l.ɵɵelementStart(106,"input",119),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.email=e})),l.ɵɵelementEnd(),l.ɵɵtext(107,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(108,"\n "),l.ɵɵelementStart(109,"div",17),l.ɵɵtext(110,"\n "),l.ɵɵelementStart(111,"label",120),l.ɵɵtext(112),l.ɵɵpipe(113,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(114,"\n "),l.ɵɵelementStart(115,"input",121),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.phone=e})),l.ɵɵelementEnd(),l.ɵɵtext(116,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(117,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(118,"\n "),l.ɵɵelementStart(119,"div",16),l.ɵɵtext(120,"\n "),l.ɵɵelementStart(121,"div",17),l.ɵɵtext(122,"\n "),l.ɵɵelementStart(123,"label",122),l.ɵɵtext(124),l.ɵɵpipe(125,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(126,"\n "),l.ɵɵelementStart(127,"input",123),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.address1=e})),l.ɵɵelementEnd(),l.ɵɵtext(128,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(129,"\n "),l.ɵɵelementStart(130,"div",17),l.ɵɵtext(131,"\n "),l.ɵɵelementStart(132,"label",124),l.ɵɵtext(133),l.ɵɵpipe(134,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(135,"\n "),l.ɵɵelementStart(136,"input",125),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.address2=e})),l.ɵɵelementEnd(),l.ɵɵtext(137,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(138,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(139,"\n "),l.ɵɵelementStart(140,"div",16),l.ɵɵtext(141,"\n "),l.ɵɵelementStart(142,"div",17),l.ɵɵtext(143,"\n "),l.ɵɵelementStart(144,"label",126),l.ɵɵtext(145),l.ɵɵpipe(146,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(147,"\n "),l.ɵɵelementStart(148,"input",127),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.address3=e})),l.ɵɵelementEnd(),l.ɵɵtext(149,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(150,"\n "),l.ɵɵelementStart(151,"div",17),l.ɵɵtext(152,"\n "),l.ɵɵelementStart(153,"label",128),l.ɵɵtext(154),l.ɵɵpipe(155,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(156,"\n "),l.ɵɵelementStart(157,"input",129),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.city=e})),l.ɵɵelementEnd(),l.ɵɵtext(158,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(159,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(160,"\n "),l.ɵɵelementStart(161,"div",16),l.ɵɵtext(162,"\n "),l.ɵɵelementStart(163,"div",17),l.ɵɵtext(164,"\n "),l.ɵɵelementStart(165,"label",130),l.ɵɵtext(166),l.ɵɵpipe(167,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(168,"\n "),l.ɵɵelementStart(169,"input",131),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.state=e})),l.ɵɵelementEnd(),l.ɵɵtext(170,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(171,"\n "),l.ɵɵelementStart(172,"div",17),l.ɵɵtext(173,"\n "),l.ɵɵelementStart(174,"label",132),l.ɵɵtext(175),l.ɵɵpipe(176,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(177,"\n "),l.ɵɵelementStart(178,"input",133),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.postalCode=e})),l.ɵɵelementEnd(),l.ɵɵtext(179,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(180,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(181,"\n "),l.ɵɵelementStart(182,"div",16),l.ɵɵtext(183,"\n "),l.ɵɵelementStart(184,"div",17),l.ɵɵtext(185,"\n "),l.ɵɵelementStart(186,"label",134),l.ɵɵtext(187),l.ɵɵpipe(188,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(189,"\n "),l.ɵɵelementStart(190,"input",135),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.identity.country=e})),l.ɵɵelementEnd(),l.ɵɵtext(191,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(192,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(193,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,55,"title")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.title)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.identityTitleOptions),l.ɵɵadvance(10),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(23,57,"firstName")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.firstName)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(32,59,"middleName")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.middleName)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(41,61,"lastName")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.lastName)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(53,63,"username")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.username)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(62,65,"company")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.company)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(74,67,"ssn")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.ssn)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(83,69,"passportNumber")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.passportNumber)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(92,71,"licenseNumber")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.licenseNumber)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(104,73,"email")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.email)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(113,75,"phone")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.phone)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(125,77,"address1")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.address1)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(134,79,"address2")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.address2)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(146,81,"address3")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.address3)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(155,83,"cityTown")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.city)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(167,85,"stateProvince")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.state)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(176,87,"zipPostalCode")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.postalCode)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(188,89,"country")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.identity.country)("disabled",r.cipher.isDeleted||r.viewOnly)}}function oe(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",36),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"input",140),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().$implicit.value=e})),l.ɵɵelementEnd(),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",43),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"button",52),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(3).copy(e.value,"value","Field")})),l.ɵɵpipe(7,"i18n"),l.ɵɵtext(8,"\n "),l.ɵɵelement(9,"i",46),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(),i=r.index,o=r.$implicit,a=l.ɵɵnextContext(3);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate1("id","fieldValue",i,""),l.ɵɵpropertyInterpolate1("name","Field.Value",i,""),l.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(7,5,"copyValue"))}}function ae(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",36),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"input",145),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().$implicit.value=e})),l.ɵɵelementEnd(),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",43),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"button",44),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(3).toggleFieldValue(e)})),l.ɵɵpipe(7,"i18n"),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"i",45),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"button",44),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit,t=l.ɵɵnextContext(3);return t.copy(e.value,"value",e.type===t.fieldType.Hidden?"H_Field":"Field")})),l.ɵɵpipe(14,"i18n"),l.ɵɵtext(15,"\n "),l.ɵɵelement(16,"i",46),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(),i=r.index,o=r.$implicit,a=l.ɵɵnextContext(3);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate1("id","fieldValue",i,""),l.ɵɵpropertyInterpolate("type",o.showValue?"text":"password"),l.ɵɵpropertyInterpolate1("name","Field.Value",i,""),l.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly||!a.cipher.viewPassword&&!o.newField),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(7,10,"toggleVisibility")),l.ɵɵproperty("disabled",!a.cipher.viewPassword&&!o.newField),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(14,J,!o.showValue,o.showValue)),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(14,12,"copyValue")),l.ɵɵproperty("disabled",!a.cipher.viewPassword&&!o.newField)}}function se(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"input",146),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().$implicit.value=e})),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(),i=r.index,o=r.$implicit,a=l.ɵɵnextContext(3);l.ɵɵpropertyInterpolate1("id","fieldValue",i,""),l.ɵɵpropertyInterpolate1("name","Field.Value",i,""),l.ɵɵproperty("ngModel",o.value)("disabled",a.cipher.isDeleted||a.viewOnly)}}function le(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",82),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(n);var e=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(3).removeField(e)})),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelement(3,"i",83),l.ɵɵtext(4,"\n "),l.ɵɵelementEnd()}2&e&&l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(1,1,"remove"))}function ce(e,t){1&e&&(l.ɵɵelementStart(0,"button",147),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelement(3,"i",148),l.ɵɵtext(4,"\n "),l.ɵɵelementEnd()),2&e&&l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(1,1,"dragToSort"))}function pe(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",138),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",77),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",39),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"label",74),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"a",139),l.ɵɵpipe(11,"i18n"),l.ɵɵtext(12,"\n "),l.ɵɵelement(13,"i",79),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"input",140),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),t.$implicit.name=e})),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",73),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"label",74),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",64),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,oe,13,7,"div",141),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,ae,20,17,"div",141),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"div",142),l.ɵɵtext(33,"\n "),l.ɵɵtemplate(34,se,1,4,"input",143),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵtemplate(37,le,5,3,"button",81),l.ɵɵtext(38,"\n "),l.ɵɵtemplate(39,ce,5,3,"button",144),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=l.ɵɵnextContext(3);l.ɵɵadvance(6),l.ɵɵpropertyInterpolate1("for","fieldName",i,""),l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,14,"name")),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(11,16,"learnMore")),l.ɵɵadvance(7),l.ɵɵpropertyInterpolate1("id","fieldName",i,""),l.ɵɵpropertyInterpolate1("name","Field.Name",i,""),l.ɵɵproperty("ngModel",r.name)("disabled",o.cipher.isDeleted||o.viewOnly),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate1("for","fieldValue",i,""),l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(24,18,"value")),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",r.type===o.fieldType.Text),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.type===o.fieldType.Hidden),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",r.type===o.fieldType.Boolean),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!o.cipher.isDeleted&&!o.viewOnly)}}function ue(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",136),l.ɵɵlistener("cdkDropListDropped",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).drop(e)})),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,pe,43,20,"div",137),l.ɵɵtext(3,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.cipher.fields)("ngForTrackBy",r.trackByFunction)}}function de(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",149),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).addField()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",85),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(4,1,"newCustomField"),"\n "))}function me(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function he(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",16),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",150),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"label",151),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"select",152),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).addFieldType=e})),l.ɵɵtext(9,"\n "),l.ɵɵtemplate(10,me,2,2,"option",31),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(6,3,"type")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.addFieldType),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.addFieldTypeOptions)}}function fe(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",32),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}function ve(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h3",25),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",16),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"div",150),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"label",153),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"select",154),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).cipher.organizationId=e}))("change",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).organizationChanged()})),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,fe,2,2,"option",31),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementContainerEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,5,"ownership")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.organizationId)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",r.ownershipOptions)}}function ye(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function ge(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",156),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"input",157),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),t.$implicit.checked=e})),l.ɵɵelementEnd(),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"label",158),l.ɵɵtext(5),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=t.index,o=l.ɵɵnextContext(4);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate1("id","collection-",i,""),l.ɵɵpropertyInterpolate1("name","Collection[",i,"].Checked"),l.ɵɵproperty("ngModel",r.checked)("disabled",o.cipher.isDeleted||o.viewOnly),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate1("for","collection-",i,""),l.ɵɵadvance(1),l.ɵɵtextInterpolate(r.name)}}function xe(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,ge,7,6,"div",155),l.ɵɵtext(3,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(3);l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",n.collections)}}function be(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h3",25),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,ye,3,3,"div",21),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,xe,4,1,"ng-container",21),l.ɵɵtext(9,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"collections")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!n.collections||!n.collections.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.collections&&n.collections.length)}}function Se(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"b",160),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5),l.ɵɵpipe(6,"date"),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(3);l.ɵɵadvance(3),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(6,4,n.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function we(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"b",160),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"a",162),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(3).viewHistory()})),l.ɵɵpipe(7,"i18n"),l.ɵɵtext(8),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(3);l.ɵɵadvance(3),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(4,3,"passwordHistory"),":"),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(7,5,"view")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",r.cipher.passwordHistory.length,"\n ")}}function Ce(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1),l.ɵɵpipe(2,"date"),l.ɵɵelementStart(3,"span",165),l.ɵɵtext(4),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(2,2,n.lastUsedDate,"short")," -\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate(n.password)}}function Ie(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",163),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,Ce,6,5,"div",164),l.ɵɵtext(3,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(3);l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",n.cipher.passwordHistory)}}function Ee(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",159),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div"),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"b",160),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9),l.ɵɵpipe(10,"date"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵtemplate(12,Se,7,7,"div",21),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,we,10,7,"div",21),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,Ie,4,1,"div",161),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(7),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(8,5,"dateUpdated"),":"),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(10,7,n.cipher.revisionDate,"medium"),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",n.showRevisionDate),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.hasPasswordHistory),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.viewingPasswordHistory)}}function Pe(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",13),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,B,3,3,"app-callout",14),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,R,14,6,"div",15),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",16),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"div",17),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"label",18),l.ɵɵtext(11),l.ɵɵpipe(12,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"input",19),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().cipher.name=e})),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵtemplate(17,j,11,6,"div",20),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵtext(20,"\n "),l.ɵɵtemplate(21,Z,74,38,"ng-container",21),l.ɵɵtext(22,"\n "),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,ne,102,49,"ng-container",21),l.ɵɵtext(25,"\n "),l.ɵɵtext(26,"\n "),l.ɵɵtemplate(27,ie,194,91,"ng-container",21),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"div",22),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"label",23),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n "),l.ɵɵelementStart(35,"textarea",24),l.ɵɵlistener("ngModelChange",(function(e){return l.ɵɵrestoreView(n),l.ɵɵnextContext().cipher.notes=e})),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"h3",25),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵtemplate(42,ue,4,2,"div",26),l.ɵɵtext(43,"\n "),l.ɵɵtemplate(44,de,5,3,"a",27),l.ɵɵtext(45,"\n "),l.ɵɵtemplate(46,he,14,5,"div",15),l.ɵɵtext(47,"\n "),l.ɵɵtemplate(48,ve,21,9,"ng-container",21),l.ɵɵtext(49,"\n "),l.ɵɵtemplate(50,be,10,5,"ng-container",21),l.ɵɵtext(51,"\n "),l.ɵɵtemplate(52,Ee,19,10,"ng-container",21),l.ɵɵtext(53,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.allowOwnershipAssignment()&&!r.allowPersonal),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!r.editMode&&!r.viewOnly),l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(12,19,"name")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.name)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!r.organization),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Login),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Card),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",r.cipher.type===r.cipherType.Identity),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(33,21,"notes")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",r.cipher.notes)("disabled",r.cipher.isDeleted||r.viewOnly),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(40,23,"customFields")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",r.cipher.hasFields),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!r.cipher.isDeleted&&!r.viewOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.allowOwnershipAssignment()),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",(!r.editMode||r.cloneMode)&&r.cipher.organizationId),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",r.editMode)}}function ke(e,t){if(1&e&&(l.ɵɵelementStart(0,"button",166),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",167),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(),r=l.ɵɵreference(5);l.ɵɵproperty("disabled",r.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,5,null!=n.cipher&&n.cipher.isDeleted?"restore":"save"))}}var _e=function(e,t){return{"fa-star":e,"fa-star-o":t}};function Ae(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",70),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).toggleFavorite()})),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelement(3,"i",45),l.ɵɵtext(4,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵnextContext(2);l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(1,2,r.cipher.favorite?"unfavorite":"favorite")),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(4,_e,r.cipher.favorite,!r.cipher.favorite))}}function Oe(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",171,172),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext(2).delete()})),l.ɵɵpipe(2,"i18n"),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"i",173),l.ɵɵtext(5,"\n "),l.ɵɵelement(6,"i",174),l.ɵɵpipe(7,"i18n"),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()}if(2&e){var r=l.ɵɵreference(1),i=l.ɵɵnextContext(2);l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(2,6,i.cipher.isDeleted?"permanentlyDelete":"delete")),l.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),l.ɵɵadvance(4),l.ɵɵproperty("hidden",r.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(7,8,"loading")),l.ɵɵproperty("hidden",!r.loading)}}function Te(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",168),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,Ae,5,7,"button",169),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,Oe,9,10,"button",170),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.organization&&!n.cipher.isDeleted),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",n.editMode&&!n.cloneMode)}}var Me=function(e){function t(t,n,r,i,o,a,s,l,c,p,u,d,m){var h=e.call(this,t,n,r,i,o,a,s,l,c,p,u,d,m)||this;return h.originalCipher=null,h.viewOnly=!0,h}return i(t,e),t.prototype.load=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return this.title=this.i18nService.t("viewItem"),[2]}))}))},t.prototype.loadCipher=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return[2,Promise.resolve(this.originalCipher)]}))}))},t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.CipherService),l.ɵɵdirectiveInject(p.FolderService),l.ɵɵdirectiveInject(u.I18nService),l.ɵɵdirectiveInject(d.PlatformUtilsService),l.ɵɵdirectiveInject(m.AuditService),l.ɵɵdirectiveInject(h.StateService),l.ɵɵdirectiveInject(f.UserService),l.ɵɵdirectiveInject(v.CollectionService),l.ɵɵdirectiveInject(y.TotpService),l.ɵɵdirectiveInject(g.PasswordGenerationService),l.ɵɵdirectiveInject(x.MessagingService),l.ɵɵdirectiveInject(b.EventService),l.ɵɵdirectiveInject(S.PolicyService))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-add-edit"]],features:[l.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],["cdkDropList","",3,"cdkDropListDropped",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-2",3,"click",4,"ngIf"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 fa-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","fa-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-check-circle",3,"hidden"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-spinner","fa-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],["src","images/totp-countdown.png",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"fa","fa-lg","fa-share"],[1,"col-5","form-group"],["href","https://help.bitwarden.com/article/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-minus-circle","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","type","text","name","Card.Number","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],["cdkDropList","",3,"cdkDropListDropped"],["class","row","cdkDrag","",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"row"],["href","https://help.bitwarden.com/article/custom-fields/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],["class","input-group",4,"ngIf"],[1,"flex-fill"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange",4,"ngIf"],["type","button","class","btn btn-link text-muted cursor-move",3,"appA11yTitle",4,"ngIf"],["appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"id","type","name","ngModel","disabled","ngModelChange"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-link","text-muted","cursor-move",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-bars","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-2",3,"click"],[1,"col-5"],["for","addFieldType",1,"sr-only"],["id","addFieldType","name","AddFieldType",1,"form-control",3,"ngModel","ngModelChange"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"button",6),l.ɵɵpipe(13,"i18n"),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"span",7),l.ɵɵtext(16,"×"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵtemplate(20,Pe,54,25,"div",8),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"div",9),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,ke,9,7,"button",10),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"button",11),l.ɵɵtext(27),l.ɵɵpipe(28,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,Te,6,2,"div",12),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(33,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n")),2&e&&(l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate(t.title),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(13,7,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",t.cipher),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",!t.viewOnly),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[w.NgControlStatusGroup,w.NgForm,C.ApiActionDirective,I.A11yTitleDirective,E.NgIf,w.DefaultValueAccessor,w.RequiredValidator,w.NgControlStatus,w.NgModel,P.CalloutComponent,w.SelectControlValueAccessor,k.AutofocusDirective,E.NgForOf,w.NgSelectOption,w.ɵangular_packages_forms_forms_x,_.InputVerbatimDirective,E.NgClass,A.StopClickDirective,E.NgStyle,O.CdkDropList,O.CdkDrag,T.TrueFalseValueDirective,w.CheckboxControlValueAccessor],pipes:[M.I18nPipe,E.DatePipe],encapsulation:2}),t}(s.AddEditComponent);t.EmergencyAddEditComponent=Me},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(18),n(3),n(14),n(5),n(41),n(7),n(640)),s=n(677),l=n(30),c=n(904),p=n(678),u=n(70),d=n(84),m=n(679),h=n(680),f=n(681),v=n(0),y=n(6),g=n(3),x=n(5),b=n(9),S=n(18),w=n(41),C=n(7),I=n(14),E=n(4),P=n(37),k=n(139),_=n(17),A=n(8),O=n(10),T=["addEdit"],M=["takeoverTemplate"],B=["confirmTemplate"];function D(e,t){1&e&&(v.ɵɵelementStart(0,"p"),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"b"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(4,2,"warning"),":"),v.ɵɵadvance(2),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(6,4,"emergencyAccessOwnerWarning"),"\n"))}function R(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",13),v.ɵɵlistener("click",(function(){return v.ɵɵrestoreView(n),v.ɵɵnextContext().premiumRequired()})),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,1,"premium"),"\n "))}function V(e,t){1&e&&(v.ɵɵelementStart(0,"span",34),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"invited")))}function j(e,t){1&e&&(v.ɵɵelementStart(0,"span",35),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"accepted")))}function F(e,t){1&e&&(v.ɵɵelementStart(0,"span",35),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryInitiated")))}function U(e,t){1&e&&(v.ɵɵelementStart(0,"span",36),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryApproved")))}function N(e,t){1&e&&(v.ɵɵelementStart(0,"span",37),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"view")))}function z(e,t){1&e&&(v.ɵɵelementStart(0,"span",37),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"takeover")))}function L(e,t){if(1&e&&(v.ɵɵelementStart(0,"small",38),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext().$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate(n.name)}}function G(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",39),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(2).reinvite(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",40),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function K(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",41),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(2).confirm(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",42),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function q(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",41),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(2).approve(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",42),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"approve"),"\n "))}function W(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",43),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(2).reject(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",33),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"reject"),"\n "))}function H(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"tr"),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"td",16),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"app-avatar",17),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n "),v.ɵɵelementStart(7,"td"),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"a",18),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=t.$implicit;return v.ɵɵnextContext(2).edit(e)})),v.ɵɵtext(10),v.ɵɵelementEnd(),v.ɵɵtext(11,"\n "),v.ɵɵtemplate(12,V,3,3,"span",19),v.ɵɵtext(13,"\n "),v.ɵɵtemplate(14,j,3,3,"span",20),v.ɵɵtext(15,"\n "),v.ɵɵtemplate(16,F,3,3,"span",20),v.ɵɵtext(17,"\n "),v.ɵɵtemplate(18,U,3,3,"span",21),v.ɵɵtext(19,"\n \n "),v.ɵɵtemplate(20,N,3,3,"span",22),v.ɵɵtext(21,"\n "),v.ɵɵtemplate(22,z,3,3,"span",22),v.ɵɵtext(23,"\n\n "),v.ɵɵtemplate(24,L,2,1,"small",23),v.ɵɵtext(25,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(26,"\n "),v.ɵɵelementStart(27,"td",24),v.ɵɵtext(28,"\n "),v.ɵɵelementStart(29,"div",25),v.ɵɵtext(30,"\n "),v.ɵɵelementStart(31,"button",26),v.ɵɵpipe(32,"i18n"),v.ɵɵtext(33,"\n "),v.ɵɵelement(34,"i",27),v.ɵɵtext(35,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(36,"\n "),v.ɵɵelementStart(37,"div",28),v.ɵɵtext(38,"\n "),v.ɵɵtemplate(39,G,5,3,"a",29),v.ɵɵtext(40,"\n "),v.ɵɵtemplate(41,K,5,3,"a",30),v.ɵɵtext(42,"\n "),v.ɵɵtemplate(43,q,5,3,"a",30),v.ɵɵtext(44,"\n "),v.ɵɵtemplate(45,W,5,3,"a",31),v.ɵɵtext(46,"\n "),v.ɵɵelementStart(47,"a",32),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=t.$implicit;return v.ɵɵnextContext(2).remove(e)})),v.ɵɵtext(48,"\n "),v.ɵɵelement(49,"i",33),v.ɵɵtext(50),v.ɵɵpipe(51,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(52,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(53,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(54,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(55,"\n "),v.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=v.ɵɵnextContext(2);v.ɵɵadvance(4),v.ɵɵproperty("data",r.name||r.email)("email",r.email)("circle",!0)("fontSize",14),v.ɵɵadvance(6),v.ɵɵtextInterpolate(r.email),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.Invited),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.Accepted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryInitiated),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryApproved),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.emergencyAccessType.View),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.emergencyAccessType.Takeover),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.name),v.ɵɵadvance(7),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(32,18,"options")),v.ɵɵadvance(8),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.Invited),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.Accepted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryInitiated),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryInitiated||r.status===i.emergencyAccessStatusType.RecoveryApproved),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(51,20,"remove"),"\n ")}}function $(e,t){if(1&e&&(v.ɵɵelementStart(0,"table",14),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"tbody"),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,H,56,22,"tr",15),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext();v.ɵɵadvance(4),v.ɵɵproperty("ngForOf",n.trustedContacts)}}function Y(e,t){1&e&&(v.ɵɵelementStart(0,"p"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"noTrustedContacts")))}function Q(e,t){1&e&&(v.ɵɵelementStart(0,"span",34),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"invited")))}function J(e,t){1&e&&(v.ɵɵelementStart(0,"span",35),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"accepted")))}function X(e,t){1&e&&(v.ɵɵelementStart(0,"span",35),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryInitiated")))}function Z(e,t){1&e&&(v.ɵɵelementStart(0,"span",36),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryApproved")))}function ee(e,t){1&e&&(v.ɵɵelementStart(0,"span",37),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"view")))}function te(e,t){1&e&&(v.ɵɵelementStart(0,"span",37),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"takeover")))}function ne(e,t){if(1&e&&(v.ɵɵelementStart(0,"small",38),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext().$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate(n.name)}}function re(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",39),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(2).requestAccess(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",40),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"requestAccess"),"\n "))}function ie(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"a",39),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=v.ɵɵnextContext().$implicit;return v.ɵɵnextContext(2).takeover(e)})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",45),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,1,"takeover"),"\n "))}function oe(e,t){if(1&e&&(v.ɵɵelementStart(0,"a",46),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",47),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext().$implicit;v.ɵɵproperty("routerLink",n.id),v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,2,"view"),"\n ")}}function ae(e,t){if(1&e){var n=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"tr"),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"td",16),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"app-avatar",17),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n "),v.ɵɵelementStart(7,"td"),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"span"),v.ɵɵtext(10),v.ɵɵelementEnd(),v.ɵɵtext(11,"\n "),v.ɵɵtemplate(12,Q,3,3,"span",19),v.ɵɵtext(13,"\n "),v.ɵɵtemplate(14,J,3,3,"span",20),v.ɵɵtext(15,"\n "),v.ɵɵtemplate(16,X,3,3,"span",20),v.ɵɵtext(17,"\n "),v.ɵɵtemplate(18,Z,3,3,"span",21),v.ɵɵtext(19,"\n \n "),v.ɵɵtemplate(20,ee,3,3,"span",22),v.ɵɵtext(21,"\n "),v.ɵɵtemplate(22,te,3,3,"span",22),v.ɵɵtext(23,"\n\n "),v.ɵɵtemplate(24,ne,2,1,"small",23),v.ɵɵtext(25,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(26,"\n "),v.ɵɵelementStart(27,"td",24),v.ɵɵtext(28,"\n "),v.ɵɵelementStart(29,"div",25),v.ɵɵtext(30,"\n "),v.ɵɵelementStart(31,"button",26),v.ɵɵpipe(32,"i18n"),v.ɵɵtext(33,"\n "),v.ɵɵelement(34,"i",27),v.ɵɵtext(35,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(36,"\n "),v.ɵɵelementStart(37,"div",28),v.ɵɵtext(38,"\n "),v.ɵɵtemplate(39,re,5,3,"a",29),v.ɵɵtext(40,"\n "),v.ɵɵtemplate(41,ie,5,3,"a",29),v.ɵɵtext(42,"\n "),v.ɵɵtemplate(43,oe,5,4,"a",44),v.ɵɵtext(44,"\n "),v.ɵɵelementStart(45,"a",32),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(n);var e=t.$implicit;return v.ɵɵnextContext(2).remove(e)})),v.ɵɵtext(46,"\n "),v.ɵɵelement(47,"i",33),v.ɵɵtext(48),v.ɵɵpipe(49,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(50,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(51,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(52,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(53,"\n "),v.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=v.ɵɵnextContext(2);v.ɵɵadvance(4),v.ɵɵproperty("data",r.name||r.email)("email",r.email)("circle",!0)("fontSize",14),v.ɵɵadvance(6),v.ɵɵtextInterpolate(r.email),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.Invited),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.Accepted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryInitiated),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryApproved),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.emergencyAccessType.View),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.type===i.emergencyAccessType.Takeover),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.name),v.ɵɵadvance(7),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(32,17,"options")),v.ɵɵadvance(8),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.Confirmed),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryApproved&&r.type===i.emergencyAccessType.Takeover),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",r.status===i.emergencyAccessStatusType.RecoveryApproved&&r.type===i.emergencyAccessType.View),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(49,19,"remove"),"\n ")}}function se(e,t){if(1&e&&(v.ɵɵelementStart(0,"table",14),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"tbody"),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,ae,54,21,"tr",15),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n"),v.ɵɵelementEnd()),2&e){var n=v.ɵɵnextContext();v.ɵɵadvance(4),v.ɵɵproperty("ngForOf",n.grantedContacts)}}function le(e,t){1&e&&(v.ɵɵelementStart(0,"p"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"noGrantedAccess")))}function ce(e,t){}function pe(e,t){}function ue(e,t){}var de=function(){function e(e,t,n,r,i,o,l,c,p){this.apiService=e,this.i18nService=t,this.componentFactoryResolver=n,this.platformUtilsService=r,this.toasterService=i,this.cryptoService=o,this.storageService=l,this.userService=c,this.messagingService=p,this.emergencyAccessType=s.EmergencyAccessType,this.emergencyAccessStatusType=a.EmergencyAccessStatusType,this.modal=null}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=this,[4,this.userService.canAccessPremium()];case 1:return e.canAccessPremium=n.sent(),[4,this.userService.getAllOrganizations()];case 2:return t=n.sent(),this.isOrganizationOwner=t.some((function(e){return e.isOwner})),this.load(),[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=this,[4,this.apiService.getEmergencyAccessTrusted()];case 1:return e.trustedContacts=n.sent().data,t=this,[4,this.apiService.getEmergencyAccessGranted()];case 2:return t.grantedContacts=n.sent().data,[2]}}))}))},e.prototype.premiumRequired=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.canAccessPremium||this.messagingService.send("premiumRequired"),[2]}))}))},e.prototype.edit=function(e){var t,n=this;null!=this.modal&&this.modal.close();var r=this.componentFactoryResolver.resolveComponentFactory(d.ModalComponent);this.modal=this.addEditModalRef.createComponent(r).instance;var i=this.modal.show(m.EmergencyAccessAddEditComponent,this.addEditModalRef);i.name=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e?void 0:e.email,i.emergencyAccessId=null==e?void 0:e.id,i.readOnly=!this.canAccessPremium,i.onSaved.subscribe((function(){n.modal.close(),n.load()})),i.onDeleted.subscribe((function(){n.modal.close(),n.remove(e)})),this.modal.onClosed.subscribe((function(){n.modal=null}))},e.prototype.invite=function(){this.edit(null)},e.prototype.reinvite=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise?[2]:(this.actionPromise=this.apiService.postEmergencyAccessReinvite(e.id),[4,this.actionPromise]);case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("hasBeenReinvited",e.email)),this.actionPromise=null,[2]}}))}))},e.prototype.confirm=function(e){var t;return r(this,void 0,void 0,(function(){function n(){e.status=a.EmergencyAccessStatusType.Confirmed}var o,s,l,c=this;return i(this,(function(a){switch(a.label){case 0:return null!=this.actionPromise?[2]:[4,this.storageService.get(u.ConstantsService.autoConfirmFingerprints)];case 1:return null!=(o=a.sent())&&o?(this.actionPromise=this.doConfirmation(e),[4,this.actionPromise]):(null!=this.modal&&this.modal.close(),s=this.componentFactoryResolver.resolveComponentFactory(d.ModalComponent),this.modal=this.confirmModalRef.createComponent(s).instance,(l=this.modal.show(h.EmergencyAccessConfirmComponent,this.confirmModalRef)).name=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e?void 0:e.email,l.emergencyAccessId=e.id,l.userId=null==e?void 0:e.granteeId,l.onConfirmed.subscribe((function(){return r(c,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modal.close(),l.formPromise=this.doConfirmation(e),[4,l.formPromise];case 1:return t.sent(),n(),this.toasterService.popAsync("success",null,this.i18nService.t("hasBeenConfirmed",e.name||e.email)),[2]}}))}))})),this.modal.onClosed.subscribe((function(){c.modal=null})),[2]);case 2:return a.sent(),n(),this.toasterService.popAsync("success",null,this.i18nService.t("hasBeenConfirmed",e.name||e.email)),this.actionPromise=null,[2]}}))}))},e.prototype.remove=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),e.name||e.email,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteEmergencyAccess(e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("removedUserId",e.name||e.email)),e instanceof p.EmergencyAccessGranteeDetailsResponse?this.removeGrantee(e):this.removeGrantor(e),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.requestAccess=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("requestAccessConfirmation",e.waitTimeDays.toString()),e.name||e.email,this.i18nService.t("requestAccess"),this.i18nService.t("no"),"warning")];case 1:return t.sent()?[4,this.apiService.postEmergencyAccessInitiate(e.id)]:[2,!1];case 2:return t.sent(),e.status=a.EmergencyAccessStatusType.RecoveryInitiated,this.toasterService.popAsync("success",null,this.i18nService.t("requestSent",e.name||e.email)),[2]}}))}))},e.prototype.approve=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.i18nService.t(e.type===s.EmergencyAccessType.View?"view":"takeover"),[4,this.platformUtilsService.showDialog(this.i18nService.t("approveAccessConfirmation",e.name||e.email,t),e.name||e.email,this.i18nService.t("approve"),this.i18nService.t("no"),"warning")];case 1:return n.sent()?[4,this.apiService.postEmergencyAccessApprove(e.id)]:[2,!1];case 2:return n.sent(),e.status=a.EmergencyAccessStatusType.RecoveryApproved,this.toasterService.popAsync("success",null,this.i18nService.t("emergencyApproved",e.name||e.email)),[2]}}))}))},e.prototype.reject=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.postEmergencyAccessReject(e.id)];case 1:return t.sent(),e.status=a.EmergencyAccessStatusType.Confirmed,this.toasterService.popAsync("success",null,this.i18nService.t("emergencyRejected",e.name||e.email)),[2]}}))}))},e.prototype.takeover=function(e){return r(this,void 0,void 0,(function(){var t,n,r=this;return i(this,(function(i){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(d.ModalComponent),this.modal=this.addEditModalRef.createComponent(t).instance,(n=this.modal.show(f.EmergencyAccessTakeoverComponent,this.takeoverModalRef)).name=null!=e?e.name||e.email:null,n.email=e.email,n.emergencyAccessId=null!=e?e.id:null,n.onDone.subscribe((function(){r.modal.close(),r.toasterService.popAsync("success",null,r.i18nService.t("passwordResetFor",e.name||e.email))})),this.modal.onClosed.subscribe((function(){r.modal=null})),[2]}))}))},e.prototype.removeGrantee=function(e){var t=this.trustedContacts.indexOf(e);t>-1&&this.trustedContacts.splice(t,1)},e.prototype.removeGrantor=function(e){var t=this.grantedContacts.indexOf(e);t>-1&&this.grantedContacts.splice(t,1)},e.prototype.doConfirmation=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,p,u;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.getEncKey()];case 1:return t=i.sent(),[4,this.apiService.getUserPublicKey(e.granteeId)];case 2:n=i.sent(),r=l.Utils.fromB64ToArray(n.publicKey),i.label=3;case 3:return i.trys.push([3,5,,6]),a=(o=console).log,s="User's fingerprint: ",[4,this.cryptoService.getFingerprint(e.granteeId,r.buffer)];case 4:return a.apply(o,[s+i.sent().join("-")]),[3,6];case 5:return i.sent(),[3,6];case 6:return[4,this.cryptoService.rsaEncrypt(t.key,r.buffer)];case 7:return p=i.sent(),(u=new c.EmergencyAccessConfirmRequest).key=p.encryptedString,[4,this.apiService.postEmergencyAccessConfirm(e.id,u)];case 8:return i.sent(),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(v.ɵɵdirectiveInject(y.ApiService),v.ɵɵdirectiveInject(g.I18nService),v.ɵɵdirectiveInject(v.ComponentFactoryResolver),v.ɵɵdirectiveInject(x.PlatformUtilsService),v.ɵɵdirectiveInject(b.ToasterService),v.ɵɵdirectiveInject(S.CryptoService),v.ɵɵdirectiveInject(w.StorageService),v.ɵɵdirectiveInject(C.UserService),v.ɵɵdirectiveInject(I.MessagingService))},e.ɵcmp=v.ɵɵdefineComponent({type:e,selectors:[["emergency-access"]],viewQuery:function(e,t){var n;(1&e&&(v.ɵɵstaticViewQuery(T,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(M,!0,o.ViewContainerRef),v.ɵɵstaticViewQuery(B,!0,o.ViewContainerRef)),2&e)&&(v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.addEditModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.takeoverModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.confirmModalRef=n.first))},decls:59,vars:25,consts:[[1,"page-header"],["href","https://bitwarden.com/help/article/emergency-access/","target","_blank","rel","noopener"],[4,"ngIf"],[1,"page-header","d-flex"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"page-header","spaced-header"],["addEdit",""],["takeoverTemplate",""],["confirmTemplate",""],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","badge badge-success",4,"ngIf"],["class","badge badge-primary",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-warning","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"badge","badge-success"],[1,"badge","badge-primary"],[1,"text-muted","d-block"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-envelope-o"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-check"],["href","#","appStopClick","",1,"dropdown-item","text-warning",3,"click"],["class","dropdown-item",3,"routerLink",4,"ngIf"],["aria-hidden","true",1,"fa","fa-fw","fa-key"],[1,"dropdown-item",3,"routerLink"],["aria-hidden","true",1,"fa","fa-fw","fa-eye"]],template:function(e,t){1&e&&(v.ɵɵelementStart(0,"div",0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"h1"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n"),v.ɵɵelementStart(7,"p"),v.ɵɵtext(8),v.ɵɵpipe(9,"i18n"),v.ɵɵelementStart(10,"a",1),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(14,"\n\n"),v.ɵɵtemplate(15,D,7,6,"p",2),v.ɵɵtext(16,"\n\n"),v.ɵɵelementStart(17,"div",3),v.ɵɵtext(18,"\n "),v.ɵɵelementStart(19,"h2"),v.ɵɵtext(20),v.ɵɵpipe(21,"i18n"),v.ɵɵtemplate(22,R,3,3,"a",4),v.ɵɵtext(23,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(24,"\n "),v.ɵɵelementStart(25,"div",5),v.ɵɵtext(26,"\n "),v.ɵɵelementStart(27,"button",6),v.ɵɵlistener("click",(function(){return t.invite()})),v.ɵɵtext(28,"\n "),v.ɵɵelement(29,"i",7),v.ɵɵtext(30),v.ɵɵpipe(31,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(33,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(34,"\n\n"),v.ɵɵtemplate(35,$,7,1,"table",8),v.ɵɵtext(36,"\n\n"),v.ɵɵtemplate(37,Y,3,3,"p",2),v.ɵɵtext(38,"\n\n"),v.ɵɵelementStart(39,"div",9),v.ɵɵtext(40,"\n "),v.ɵɵelementStart(41,"h2"),v.ɵɵtext(42),v.ɵɵpipe(43,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(44,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(45,"\n\n"),v.ɵɵtemplate(46,se,7,1,"table",8),v.ɵɵtext(47,"\n\n"),v.ɵɵtemplate(48,le,3,3,"p",2),v.ɵɵtext(49,"\n\n"),v.ɵɵtemplate(50,ce,0,0,"ng-template",null,10,v.ɵɵtemplateRefExtractor),v.ɵɵtext(52,"\n"),v.ɵɵtemplate(53,pe,0,0,"ng-template",null,11,v.ɵɵtemplateRefExtractor),v.ɵɵtext(55,"\n"),v.ɵɵtemplate(56,ue,0,0,"ng-template",null,12,v.ɵɵtemplateRefExtractor),v.ɵɵtext(58,"\n")),2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,13,"emergencyAccess")),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(9,15,"emergencyAccessDesc"),"\n "),v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(12,17,"learnMore"),".\n "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.isOrganizationOwner),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(21,19,"trustedEmergencyContacts"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.canAccessPremium),v.ɵɵadvance(5),v.ɵɵproperty("disabled",!t.canAccessPremium),v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(31,21,"addEmergencyContact"),"\n "),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",t.trustedContacts&&t.trustedContacts.length),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.trustedContacts||!t.trustedContacts.length),v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(43,23,"designatedEmergencyContacts")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.grantedContacts&&t.grantedContacts.length),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.grantedContacts||!t.grantedContacts.length))},directives:[E.NgIf,P.StopClickDirective,E.NgForOf,k.AvatarComponent,_.A11yTitleDirective,A.RouterLinkWithHref],pipes:[O.I18nPipe],encapsulation:2}),e}();t.EmergencyAccessComponent=de},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.View=0]="View",e[e.Takeover=1]="Takeover"}(t.EmergencyAccessType||(t.EmergencyAccessType={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(262),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.granteeId=n.getResponseProperty("GranteeId"),n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.waitTimeDays=n.getResponseProperty("WaitTimeDays"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessGranteeDetailsResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.grantorId=n.getResponseProperty("GrantorId"),n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.waitTimeDays=n.getResponseProperty("WaitTimeDays"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessGrantorDetailsResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.keyEncrypted=n.getResponseProperty("KeyEncrypted"),n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessTakeoverResponse=c;var p=function(e){function t(t){var n=e.call(this,t)||this;n.ciphers=[],n.keyEncrypted=n.getResponseProperty("KeyEncrypted");var r=n.getResponseProperty("Ciphers");return null!=r&&(n.ciphers=r.map((function(e){return new a.CipherResponse(e)}))),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessViewResponse=p},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(9),n(6),n(3),n(677)),s=n(905),l=n(641),c=n(0),p=n(6),u=n(3),d=n(9),m=n(13),h=n(16),f=n(4),v=n(17),y=n(10);function g(e,t){1&e&&(c.ɵɵelementStart(0,"span",19),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"premium")))}function x(e,t){if(1&e&&(c.ɵɵelementStart(0,"small",20),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){var n=c.ɵɵnextContext();c.ɵɵadvance(1),c.ɵɵtextInterpolate(n.name)}}function b(e,t){1&e&&(c.ɵɵelementStart(0,"div",21),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",22),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",35),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"label",36),c.ɵɵtext(9),c.ɵɵpipe(10,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"input",37),c.ɵɵlistener("ngModelChange",(function(e){return c.ɵɵrestoreView(n),c.ɵɵnextContext(2).email=e})),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementContainerEnd()}if(2&e){var r=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,3,"inviteEmergencyContactDesc")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(10,5,"email")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",r.email)}}function w(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",38),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){var n=t.$implicit;c.ɵɵproperty("ngValue",n.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate(n.name)}}function C(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",21),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,S,15,7,"ng-container",15),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"h3"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementStart(7,"a",24),c.ɵɵpipe(8,"i18n"),c.ɵɵtext(9,"\n "),c.ɵɵelement(10,"i",25),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"div",26),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"input",27),c.ɵɵlistener("ngModelChange",(function(e){return c.ɵɵrestoreView(n),c.ɵɵnextContext().type=e})),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"label",28),c.ɵɵtext(19),c.ɵɵpipe(20,"i18n"),c.ɵɵelementStart(21,"small"),c.ɵɵtext(22),c.ɵɵpipe(23,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementStart(27,"div",26),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"input",29),c.ɵɵlistener("ngModelChange",(function(e){return c.ɵɵrestoreView(n),c.ɵɵnextContext().type=e})),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"label",30),c.ɵɵtext(32),c.ɵɵpipe(33,"i18n"),c.ɵɵelementStart(34,"small"),c.ɵɵtext(35),c.ɵɵpipe(36,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(38,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementStart(40,"div",31),c.ɵɵtext(41,"\n "),c.ɵɵelementStart(42,"label",32),c.ɵɵtext(43),c.ɵɵpipe(44,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementStart(46,"select",33),c.ɵɵlistener("ngModelChange",(function(e){return c.ɵɵrestoreView(n),c.ɵɵnextContext().waitTime=e})),c.ɵɵtext(47,"\n "),c.ɵɵtemplate(48,w,2,2,"option",34),c.ɵɵtext(49,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n "),c.ɵɵelementStart(51,"small",20),c.ɵɵtext(52),c.ɵɵpipe(53,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(55,"\n "),c.ɵɵelementEnd()}if(2&e){var r=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!r.editMode),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(6,17,"userAccess"),"\n "),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(8,19,"learnMore")),c.ɵɵadvance(9),c.ɵɵproperty("value",r.emergencyAccessType.View)("ngModel",r.type),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(20,21,"view"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(23,23,"viewDesc")),c.ɵɵadvance(7),c.ɵɵproperty("value",r.emergencyAccessType.Takeover)("ngModel",r.type)("disabled",r.readOnly),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(33,25,"takeover"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(36,27,"takeoverDesc")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(44,29,"waitTime")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",r.waitTime)("disabled",r.readOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",r.waitTimes),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(53,31,"waitTimeDesc"))}}function I(e,t){1&e&&(c.ɵɵelement(0,"i",39),c.ɵɵpipe(1,"i18n")),2&e&&c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,1,"loading"))}function E(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"save")))}function P(e,t){if(1&e){var n=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",40,41),c.ɵɵlistener("click",(function(){return c.ɵɵrestoreView(n),c.ɵɵnextContext().delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",42),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",43),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){var r=c.ɵɵreference(1),i=c.ɵɵnextContext();c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,"delete")),c.ɵɵproperty("disabled",r.loading)("appApiAction",i.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",r.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!r.loading)}}var k=function(){function e(e,t,n){this.apiService=e,this.i18nService=t,this.toasterService=n,this.onSaved=new o.EventEmitter,this.onDeleted=new o.EventEmitter,this.loading=!0,this.readOnly=!1,this.editMode=!1,this.type=a.EmergencyAccessType.View,this.emergencyAccessType=a.EmergencyAccessType}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(this.editMode=this.loading=null!=this.emergencyAccessId,this.waitTimes=[{name:this.i18nService.t("oneDay"),value:1},{name:this.i18nService.t("days","2"),value:2},{name:this.i18nService.t("days","7"),value:7},{name:this.i18nService.t("days","14"),value:14},{name:this.i18nService.t("days","30"),value:30},{name:this.i18nService.t("days","90"),value:90}],!this.editMode)return[3,5];this.editMode=!0,this.title=this.i18nService.t("editEmergencyContact"),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.apiService.getEmergencyAccess(this.emergencyAccessId)];case 2:return e=t.sent(),this.type=e.type,this.waitTime=e.waitTimeDays,[3,4];case 3:return t.sent(),[3,4];case 4:return[3,6];case 5:this.title=this.i18nService.t("inviteEmergencyContact"),this.waitTime=this.waitTimes[2].value,t.label=6;case 6:return this.loading=!1,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.editMode?((e=new l.EmergencyAccessUpdateRequest).type=this.type,e.waitTimeDays=this.waitTime,this.formPromise=this.apiService.putEmergencyAccess(this.emergencyAccessId,e)):((e=new s.EmergencyAccessInviteRequest).email=this.email.trim(),e.type=this.type,e.waitTimeDays=this.waitTime,this.formPromise=this.apiService.postEmergencyAccessInvite(e)),[4,this.formPromise];case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSaved.emit(),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.onDeleted.emit(),[2]}))}))},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(d.ToasterService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["emergency-access-add-edit"]],inputs:{name:"name",emergencyAccessId:"emergencyAccessId"},outputs:{onSaved:"onSaved",onDeleted:"onDeleted"},decls:51,vars:17,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","badge badge-primary",4,"ngIf"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"disabled","appApiAction"],["submitBtn",""],["class","fa fa-spinner fa-spin","aria-hidden","true",3,"title",4,"ngIf"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"badge","badge-primary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/emergency-access/#user-access",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","emergencyTypeView",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","emergencyTypeView",1,"form-check-label"],["type","radio","name","userType","id","emergencyTypeTakeover",1,"form-check-input",3,"value","ngModel","disabled","ngModelChange"],["for","emergencyTypeTakeover",1,"form-check-label"],[1,"form-group","col-6","mt-4"],["for","waitTime"],["id","waitTime","name","waitTime",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-group","mb-4"],["for","email"],["id","email","type","text","name","Email","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,g,3,3,"span",6),c.ɵɵtext(12),c.ɵɵtemplate(13,x,2,1,"small",7),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"button",8),c.ɵɵpipe(17,"i18n"),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"span",9),c.ɵɵtext(20,"×"),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,b,9,6,"div",10),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,C,56,33,"div",10),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"div",11),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"button",12,13),c.ɵɵtext(32,"\n "),c.ɵɵtemplate(33,I,2,3,"i",14),c.ɵɵtext(34,"\n "),c.ɵɵtemplate(35,E,3,3,"span",15),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"button",16),c.ɵɵtext(39),c.ɵɵpipe(40,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(41,"\n "),c.ɵɵelementStart(42,"div",17),c.ɵɵtext(43,"\n "),c.ɵɵtemplate(44,P,9,10,"button",18),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(49,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n")),2&e){var n=c.ɵɵreference(31);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(7),c.ɵɵproperty("ngIf",t.readOnly),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",t.title,"\n "),c.ɵɵadvance(1),c.ɵɵproperty("ngIf",t.name),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(17,13,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(4),c.ɵɵproperty("disabled",t.loading||n.loading||t.readOnly)("appApiAction",t.formPromise),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.loading||n.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&!n.loading),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(40,15,"cancel")),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.editMode)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,f.NgIf,v.A11yTitleDirective,m.RadioControlValueAccessor,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,m.SelectControlValueAccessor,f.NgForOf,m.RequiredValidator,m.NgSelectOption,m.ɵangular_packages_forms_forms_x],pipes:[y.I18nPipe],encapsulation:2}),e}();t.EmergencyAccessAddEditComponent=k},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(70),s=(n(6),n(18),n(41),n(30)),l=n(0),c=n(6),p=n(18),u=n(41),d=n(13),m=n(16),h=n(4),f=n(17),v=n(10);function y(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.name)}}var g=function(){function e(e,t,n){this.apiService=e,this.cryptoService=t,this.storageService=n,this.onConfirmed=new o.EventEmitter,this.dontAskAgain=!1,this.loading=!0}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),[4,this.apiService.getUserPublicKey(this.userId)];case 1:return null==(e=r.sent())?[3,3]:(t=s.Utils.fromB64ToArray(e.publicKey),[4,this.cryptoService.getFingerprint(this.userId,t.buffer)]);case 2:null!=(n=r.sent())&&(this.fingerprint=n.join("-")),r.label=3;case 3:return[3,5];case 4:return r.sent(),[3,5];case 5:return this.loading=!1,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.dontAskAgain?[4,this.storageService.save(a.ConstantsService.autoConfirmFingerprints,!0)]:[3,2];case 1:e.sent(),e.label=2;case 2:try{this.onConfirmed.emit()}catch(t){}return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.CryptoService),l.ɵɵdirectiveInject(u.StorageService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["emergency-access-confirm"]],inputs:{name:"name",userId:"userId",emergencyAccessId:"emergencyAccessId",formPromise:"formPromise"},outputs:{onConfirmed:"onConfirmed"},decls:67,vars:29,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://help.bitwarden.com/article/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"form-check"],["type","checkbox","id","dontAskAgain","name","DontAskAgain",1,"form-check-input",3,"ngModel","ngModelChange"],["for","dontAskAgain",1,"form-check-label"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,y,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"p"),l.ɵɵtext(26),l.ɵɵpipe(27,"i18n"),l.ɵɵelementStart(28,"a",10),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"p"),l.ɵɵelementStart(34,"code"),l.ɵɵtext(35),l.ɵɵelementEnd(),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"div",11),l.ɵɵtext(38,"\n "),l.ɵɵelementStart(39,"input",12),l.ɵɵlistener("ngModelChange",(function(e){return t.dontAskAgain=e})),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"label",13),l.ɵɵtext(42),l.ɵɵpipe(43,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementStart(47,"div",14),l.ɵɵtext(48,"\n "),l.ɵɵelementStart(49,"button",15),l.ɵɵtext(50,"\n "),l.ɵɵelement(51,"i",16),l.ɵɵpipe(52,"i18n"),l.ɵɵtext(53,"\n "),l.ɵɵelementStart(54,"span"),l.ɵɵtext(55),l.ɵɵpipe(56,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(57,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementStart(59,"button",17),l.ɵɵtext(60),l.ɵɵpipe(61,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(63,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(64,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(65,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(66,"\n")),2&e){var n=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,13,"confirmUser"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,15,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(27,17,"fingerprintEnsureIntegrityVerify"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(30,19,"learnMore"),""),l.ɵɵadvance(6),l.ɵɵtextInterpolate(t.fingerprint),l.ɵɵadvance(4),l.ɵɵproperty("ngModel",t.dontAskAgain),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(43,21,"dontAskFingerprintAgain"),"\n "),l.ɵɵadvance(7),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(52,23,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(56,25,"confirm")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(61,27,"cancel"))}},directives:[d.ɵangular_packages_forms_forms_y,d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,h.NgIf,f.A11yTitleDirective,d.CheckboxControlValueAccessor,d.NgControlStatus,d.NgModel],pipes:[v.I18nPipe],encapsulation:2}),e}();t.EmergencyAccessConfirmComponent=g},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=(n(9),n(6),n(18),n(3),n(14),n(36),n(5),n(43),n(7),n(464)),c=(n(249),n(463)),p=n(462),u=n(284),d=n(906),m=n(0),h=n(3),f=n(18),v=n(14),y=n(7),g=n(36),x=n(5),b=n(43),S=n(6),w=n(9),C=n(13),I=n(16),E=n(4),P=n(17),k=n(24),_=n(45),A=n(250),O=n(10);function T(e,t){if(1&e&&(m.ɵɵelementStart(0,"small",24),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){var n=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate(n.name)}}function M(e,t){if(1&e&&(m.ɵɵelementStart(0,"li"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e){var n=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind2(2,1,"policyInEffectMinComplexity",n.getPasswordScoreAlertDisplay()),"\n ")}}function B(e,t){if(1&e&&(m.ɵɵelementStart(0,"li"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e){var n=m.ɵɵnextContext(2);m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind2(2,1,"policyInEffectMinLength",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength.toString()),"\n ")}}function D(e,t){1&e&&(m.ɵɵelementStart(0,"li"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(2,1,"policyInEffectUppercase"),""))}function R(e,t){1&e&&(m.ɵɵelementStart(0,"li"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(2,1,"policyInEffectLowercase"),""))}function V(e,t){1&e&&(m.ɵɵelementStart(0,"li"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(2,1,"policyInEffectNumbers"),""))}function j(e,t){1&e&&(m.ɵɵelementStart(0,"li"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind2(2,1,"policyInEffectSpecial","!@#$%^&*"),""))}function F(e,t){if(1&e&&(m.ɵɵelementStart(0,"app-callout",25),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementStart(3,"ul",26),m.ɵɵtext(4,"\n "),m.ɵɵtemplate(5,M,3,4,"li",27),m.ɵɵtext(6,"\n "),m.ɵɵtemplate(7,B,3,4,"li",27),m.ɵɵtext(8,"\n "),m.ɵɵtemplate(9,D,3,3,"li",27),m.ɵɵtext(10,"\n "),m.ɵɵtemplate(11,R,3,3,"li",27),m.ɵɵtext(12,"\n "),m.ɵɵtemplate(13,V,3,3,"li",27),m.ɵɵtext(14,"\n "),m.ɵɵtemplate(15,j,3,4,"li",27),m.ɵɵtext(16,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(17,"\n "),m.ɵɵelementEnd()),2&e){var n=m.ɵɵnextContext();m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(2,7,"masterPasswordPolicyInEffect"),"\n "),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minComplexity)>0),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var U=function(e){function t(t,n,r,i,o,a,l,c,p){var u=e.call(this,t,n,r,i,o,a,l)||this;return u.apiService=c,u.toasterService=p,u.onDone=new s.EventEmitter,u}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var e,t,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getEmergencyGrantorPolicies(this.emergencyAccessId)];case 1:return null!=(e=r.sent()).data&&e.data.length>0?(t=e.data.map((function(e){return new p.Policy(new c.PolicyData(e))})),n=this,[4,this.policyService.getMasterPasswordPolicyOptions(t)]):[3,3];case 2:n.enforcedPolicyOptions=r.sent(),r.label=3;case 3:return[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return[4,this.strongPassword()];case 1:return a.sent()?[4,this.apiService.postEmergencyAccessTakeover(this.emergencyAccessId)]:[2];case 2:return e=a.sent(),[4,this.cryptoService.rsaDecrypt(e.keyEncrypted)];case 3:return t=a.sent(),null==(n=new u.SymmetricCryptoKey(t))?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("unexpectedError")),[2]):[4,this.cryptoService.makeKey(this.masterPassword,this.email,e.kdf,e.kdfIterations)];case 4:return r=a.sent(),[4,this.cryptoService.hashPassword(this.masterPassword,r)];case 5:return i=a.sent(),[4,this.cryptoService.remakeEncKey(r,n)];case 6:o=a.sent(),(s=new d.EmergencyAccessPasswordRequest).newMasterPasswordHash=i,s.key=o[1].encryptedString,this.apiService.postEmergencyAccessPassword(this.emergencyAccessId,s);try{this.onDone.emit()}catch(l){}return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(m.ɵɵdirectiveInject(h.I18nService),m.ɵɵdirectiveInject(f.CryptoService),m.ɵɵdirectiveInject(v.MessagingService),m.ɵɵdirectiveInject(y.UserService),m.ɵɵdirectiveInject(g.PasswordGenerationService),m.ɵɵdirectiveInject(x.PlatformUtilsService),m.ɵɵdirectiveInject(b.PolicyService),m.ɵɵdirectiveInject(S.ApiService),m.ɵɵdirectiveInject(w.ToasterService))},t.ɵcmp=m.ɵɵdefineComponent({type:t,selectors:[["emergency-access-takeover"]],inputs:{emergencyAccessId:"emergencyAccessId",name:"name",email:"email",kdf:"kdf",kdfIterations:"kdfIterations"},outputs:{onDone:"onDone"},features:[m.ɵɵInheritDefinitionFeature],decls:81,vars:32,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["type","info",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","masterPassword"],["id","masterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info"],[1,"mb-0"],[4,"ngIf"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6,"\n "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8,"\n "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵpipe(11,"i18n"),m.ɵɵtemplate(12,T,2,1,"small",6),m.ɵɵtext(13,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(14,"\n "),m.ɵɵelementStart(15,"button",7),m.ɵɵpipe(16,"i18n"),m.ɵɵtext(17,"\n "),m.ɵɵelementStart(18,"span",8),m.ɵɵtext(19,"×"),m.ɵɵelementEnd(),m.ɵɵtext(20,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(21,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(22,"\n "),m.ɵɵelementStart(23,"div",9),m.ɵɵtext(24,"\n "),m.ɵɵelementStart(25,"app-callout",10),m.ɵɵtext(26),m.ɵɵpipe(27,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(28,"\n "),m.ɵɵtemplate(29,F,18,9,"app-callout",11),m.ɵɵtext(30,"\n "),m.ɵɵelementStart(31,"div",12),m.ɵɵtext(32,"\n "),m.ɵɵelementStart(33,"div",13),m.ɵɵtext(34,"\n "),m.ɵɵelementStart(35,"div",14),m.ɵɵtext(36,"\n "),m.ɵɵelementStart(37,"label",15),m.ɵɵtext(38),m.ɵɵpipe(39,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(40,"\n "),m.ɵɵelementStart(41,"input",16),m.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),m.ɵɵelementEnd(),m.ɵɵtext(42,"\n "),m.ɵɵelement(43,"app-password-strength",17),m.ɵɵtext(44,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(45,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(46,"\n "),m.ɵɵelementStart(47,"div",13),m.ɵɵtext(48,"\n "),m.ɵɵelementStart(49,"div",14),m.ɵɵtext(50,"\n "),m.ɵɵelementStart(51,"label",18),m.ɵɵtext(52),m.ɵɵpipe(53,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(54,"\n "),m.ɵɵelementStart(55,"input",19),m.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),m.ɵɵelementEnd(),m.ɵɵtext(56,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(57,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(58,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(59,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(60,"\n "),m.ɵɵelementStart(61,"div",20),m.ɵɵtext(62,"\n "),m.ɵɵelementStart(63,"button",21),m.ɵɵtext(64,"\n "),m.ɵɵelement(65,"i",22),m.ɵɵpipe(66,"i18n"),m.ɵɵtext(67,"\n "),m.ɵɵelementStart(68,"span"),m.ɵɵtext(69),m.ɵɵpipe(70,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(71,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(72,"\n "),m.ɵɵelementStart(73,"button",23),m.ɵɵtext(74),m.ɵɵpipe(75,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(76,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(77,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(78,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(79,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(80,"\n")),2&e){var n=m.ɵɵreference(5);m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(11,16,"takeover"),"\n "),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",t.name),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(16,18,"close")),m.ɵɵadvance(11),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(27,20,"loggedOutWarning")),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",t.enforcedPolicyOptions),m.ɵɵadvance(9),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(39,22,"newMasterPass")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",t.masterPassword),m.ɵɵadvance(2),m.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),m.ɵɵadvance(9),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(53,24,"confirmNewMasterPass")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",t.masterPasswordRetype),m.ɵɵadvance(8),m.ɵɵproperty("disabled",n.loading),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(66,26,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(70,28,"save")),m.ɵɵadvance(5),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(75,30,"cancel"))}},directives:[C.NgControlStatusGroup,C.NgForm,I.ApiActionDirective,E.NgIf,P.A11yTitleDirective,k.CalloutComponent,C.DefaultValueAccessor,C.RequiredValidator,_.InputVerbatimDirective,C.NgControlStatus,C.NgModel,A.PasswordStrengthComponent],pipes:[O.I18nPipe],encapsulation:2}),t}(l.ChangePasswordComponent);t.EmergencyAccessTakeoverComponent=U},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(280),a=n(30),s=n(912),l=n(498),c=n(913),p=n(914),u=n(915),d=n(262),m=n(499),h=n(500),f=n(678),v=n(211),y=n(916),g=n(501),x=n(917),b=n(616),S=n(617),w=n(618),C=n(683),I=n(918),E=n(919),P=n(920),k=n(684),_=n(621),A=n(921),O=n(293),T=n(292),M=n(922),B=n(923),D=n(924),R=n(502),V=n(685),j=n(620),F=n(925),U=n(926),N=n(927),z=n(928),L=n(929),G=n(930),K=n(931),q=n(686),W=n(686),H=n(932),$=n(933),Y=function(){function e(e,t,n,r){void 0===r&&(r=null),this.tokenService=e,this.platformUtilsService=t,this.logoutCallback=n,this.customUserAgent=r,this.urlsSet=!1,this.isWebClient=!1,this.isDesktopClient=!1,this.usingBaseUrl=!1,this.device=t.getDevice(),this.deviceType=this.device.toString(),this.isWebClient=this.device===o.DeviceType.IEBrowser||this.device===o.DeviceType.ChromeBrowser||this.device===o.DeviceType.EdgeBrowser||this.device===o.DeviceType.FirefoxBrowser||this.device===o.DeviceType.OperaBrowser||this.device===o.DeviceType.SafariBrowser||this.device===o.DeviceType.UnknownBrowser||this.device===o.DeviceType.VivaldiBrowser,this.isDesktopClient=this.device===o.DeviceType.WindowsDesktop||this.device===o.DeviceType.MacOsDesktop||this.device===o.DeviceType.LinuxDesktop}return e.prototype.setUrls=function(e){if(this.urlsSet=!0,null!=e.base)return this.usingBaseUrl=!0,this.apiBaseUrl=e.base+"/api",this.identityBaseUrl=e.base+"/identity",void(this.eventsBaseUrl=e.base+"/events");this.apiBaseUrl=e.api,this.identityBaseUrl=e.identity,this.eventsBaseUrl=e.events,null==this.apiBaseUrl&&(this.apiBaseUrl="https://api.bitwarden.com"),null==this.identityBaseUrl&&(this.identityBaseUrl="https://identity.bitwarden.com"),null==this.eventsBaseUrl&&(this.eventsBaseUrl="https://events.bitwarden.com")},e.prototype.postIdentityToken=function(e){var t;return r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:return n=new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8",Accept:"application/json","Device-Type":this.deviceType}),null!=this.customUserAgent&&n.set("User-Agent",this.customUserAgent),[4,this.fetch(new Request(this.identityBaseUrl+"/connect/token",{body:this.qsStringify(e.toIdentityToken(null!==(t=e.clientId)&&void 0!==t?t:this.platformUtilsService.identityClientId)),credentials:this.getCredentials(),cache:"no-store",headers:n,method:"POST"}))];case 1:return r=i.sent(),o=null,this.isJsonResponse(r)?[4,r.json()]:[3,3];case 2:o=i.sent(),i.label=3;case 3:return null==o?[3,6]:200!==r.status?[3,4]:[2,new b.IdentityTokenResponse(o)];case 4:return 400===r.status&&o.TwoFactorProviders2&&Object.keys(o.TwoFactorProviders2).length?[4,this.tokenService.clearTwoFactorToken(e.email)]:[3,6];case 5:return i.sent(),[2,new S.IdentityTwoFactorResponse(o)];case 6:return[2,Promise.reject(new v.ErrorResponse(o,r.status,!0))]}}))}))},e.prototype.refreshIdentityToken=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.doRefreshToken()];case 1:return e.sent(),[3,3];case 2:return e.sent(),[2,Promise.reject(null)];case 3:return[2]}}))}))},e.prototype.getProfile=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/accounts/profile",null,!0,!0)];case 1:return e=t.sent(),[2,new O.ProfileResponse(e)]}}))}))},e.prototype.getUserBilling=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/accounts/billing",null,!0,!0)];case 1:return e=t.sent(),[2,new p.BillingResponse(e)]}}))}))},e.prototype.getUserSubscription=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/accounts/subscription",null,!0,!0)];case 1:return e=t.sent(),[2,new V.SubscriptionResponse(e)]}}))}))},e.prototype.getTaxInfo=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/accounts/tax",null,!0,!0)];case 1:return e=t.sent(),[2,new F.TaxInfoResponse(e)]}}))}))},e.prototype.putProfile=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/accounts/profile",e,!0,!0)];case 1:return t=n.sent(),[2,new O.ProfileResponse(t)]}}))}))},e.prototype.putTaxInfo=function(e){return this.send("PUT","/accounts/tax",e,!0,!1)},e.prototype.postPrelogin=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/accounts/prelogin",e,!1,!0)];case 1:return t=n.sent(),[2,new A.PreloginResponse(t)]}}))}))},e.prototype.postEmailToken=function(e){return this.send("POST","/accounts/email-token",e,!0,!1)},e.prototype.postEmail=function(e){return this.send("POST","/accounts/email",e,!0,!1)},e.prototype.postPassword=function(e){return this.send("POST","/accounts/password",e,!0,!1)},e.prototype.setPassword=function(e){return this.send("POST","/accounts/set-password",e,!0,!1)},e.prototype.postSecurityStamp=function(e){return this.send("POST","/accounts/security-stamp",e,!0,!1)},e.prototype.deleteAccount=function(e){return this.send("DELETE","/accounts",e,!0,!1)},e.prototype.getAccountRevisionDate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.send("GET","/accounts/revision-date",null,!0,!0)];case 1:return[2,e.sent()]}}))}))},e.prototype.postPasswordHint=function(e){return this.send("POST","/accounts/password-hint",e,!1,!1)},e.prototype.postRegister=function(e){return this.send("POST","/accounts/register",e,!1,!1)},e.prototype.postPremium=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/accounts/premium",e,!0,!0)];case 1:return t=n.sent(),[2,new P.PaymentResponse(t)]}}))}))},e.prototype.postIapCheck=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.send("POST","/accounts/iap-check",e,!0,!1)]}))}))},e.prototype.postReinstatePremium=function(){return this.send("POST","/accounts/reinstate-premium",null,!0,!1)},e.prototype.postCancelPremium=function(){return this.send("POST","/accounts/cancel-premium",null,!0,!1)},e.prototype.postAccountStorage=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/accounts/storage",e,!0,!0)];case 1:return t=n.sent(),[2,new P.PaymentResponse(t)]}}))}))},e.prototype.postAccountPayment=function(e){return this.send("POST","/accounts/payment",e,!0,!1)},e.prototype.postAccountLicense=function(e){return this.send("POST","/accounts/license",e,!0,!1)},e.prototype.postAccountKeys=function(e){return this.send("POST","/accounts/keys",e,!0,!1)},e.prototype.postAccountKey=function(e){return this.send("POST","/accounts/key",e,!0,!1)},e.prototype.postAccountVerifyEmail=function(){return this.send("POST","/accounts/verify-email",null,!0,!1)},e.prototype.postAccountVerifyEmailToken=function(e){return this.send("POST","/accounts/verify-email-token",e,!1,!1)},e.prototype.postAccountVerifyPassword=function(e){return this.send("POST","/accounts/verify-password",e,!0,!1)},e.prototype.postAccountRecoverDelete=function(e){return this.send("POST","/accounts/delete-recover",e,!1,!1)},e.prototype.postAccountRecoverDeleteToken=function(e){return this.send("POST","/accounts/delete-recover-token",e,!1,!1)},e.prototype.postAccountKdf=function(e){return this.send("POST","/accounts/kdf",e,!0,!1)},e.prototype.getEnterprisePortalSignInToken=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.send("GET","/accounts/enterprise-portal-signin-token",null,!0,!0)];case 1:return[2,e.sent()]}}))}))},e.prototype.deleteSsoUser=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.send("DELETE","/accounts/sso/"+e,null,!0,!1)]}))}))},e.prototype.getSsoUserIdentifier=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.send("GET","/accounts/sso/user-identifier",null,!0,!0)]}))}))},e.prototype.postUserApiKey=function(e,t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/accounts/api-key",t,!0,!0)];case 1:return e=n.sent(),[2,new s.ApiKeyResponse(e)]}}))}))},e.prototype.postUserRotateApiKey=function(e,t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/accounts/rotate-api-key",t,!0,!0)];case 1:return e=n.sent(),[2,new s.ApiKeyResponse(e)]}}))}))},e.prototype.getFolder=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/folders/"+e,null,!0,!0)];case 1:return t=n.sent(),[2,new g.FolderResponse(t)]}}))}))},e.prototype.postFolder=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/folders",e,!0,!0)];case 1:return t=n.sent(),[2,new g.FolderResponse(t)]}}))}))},e.prototype.putFolder=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/folders/"+e,t,!0,!0)];case 1:return n=r.sent(),[2,new g.FolderResponse(n)]}}))}))},e.prototype.deleteFolder=function(e){return this.send("DELETE","/folders/"+e,null,!0,!1)},e.prototype.getSend=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/sends/"+e,null,!0,!0)];case 1:return t=n.sent(),[2,new R.SendResponse(t)]}}))}))},e.prototype.postSendAccess=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("POST","/sends/access/"+e,t,!1,!0,n)];case 1:return r=i.sent(),[2,new M.SendAccessResponse(r)]}}))}))},e.prototype.getSendFileDownloadData=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("POST","/sends/"+e.id+"/access/file/"+e.file.id,t,!1,!0,n)];case 1:return r=i.sent(),[2,new B.SendFileDownloadDataResponse(r)]}}))}))},e.prototype.getSends=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/sends",null,!0,!0)];case 1:return e=t.sent(),[2,new w.ListResponse(e,R.SendResponse)]}}))}))},e.prototype.postSend=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/sends",e,!0,!0)];case 1:return t=n.sent(),[2,new R.SendResponse(t)]}}))}))},e.prototype.postFileTypeSend=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/sends/file/v2",e,!0,!0)];case 1:return t=n.sent(),[2,new D.SendFileUploadDataResponse(t)]}}))}))},e.prototype.renewSendFileUploadUrl=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("GET","/sends/"+e+"/file/"+t,null,!0,!0)];case 1:return n=r.sent(),[2,new D.SendFileUploadDataResponse(n)]}}))}))},e.prototype.postSendFile=function(e,t,n){return this.send("POST","/sends/"+e+"/file/"+t,n,!0,!1)},e.prototype.postSendFileLegacy=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/sends/file",e,!0,!0)];case 1:return t=n.sent(),[2,new R.SendResponse(t)]}}))}))},e.prototype.putSend=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/sends/"+e,t,!0,!0)];case 1:return n=r.sent(),[2,new R.SendResponse(n)]}}))}))},e.prototype.putSendRemovePassword=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/sends/"+e+"/remove-password",null,!0,!0)];case 1:return t=n.sent(),[2,new R.SendResponse(t)]}}))}))},e.prototype.deleteSend=function(e){return this.send("DELETE","/sends/"+e,null,!0,!1)},e.prototype.getCipher=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/ciphers/"+e,null,!0,!0)];case 1:return t=n.sent(),[2,new d.CipherResponse(t)]}}))}))},e.prototype.getCipherAdmin=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/ciphers/"+e+"/admin",null,!0,!0)];case 1:return t=n.sent(),[2,new d.CipherResponse(t)]}}))}))},e.prototype.getCiphersOrganization=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/ciphers/organization-details?organizationId="+e,null,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,d.CipherResponse)]}}))}))},e.prototype.postCipher=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/ciphers",e,!0,!0)];case 1:return t=n.sent(),[2,new d.CipherResponse(t)]}}))}))},e.prototype.postCipherCreate=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/ciphers/create",e,!0,!0)];case 1:return t=n.sent(),[2,new d.CipherResponse(t)]}}))}))},e.prototype.postCipherAdmin=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/ciphers/admin",e,!0,!0)];case 1:return t=n.sent(),[2,new d.CipherResponse(t)]}}))}))},e.prototype.putCipher=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/ciphers/"+e,t,!0,!0)];case 1:return n=r.sent(),[2,new d.CipherResponse(n)]}}))}))},e.prototype.putCipherAdmin=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/ciphers/"+e+"/admin",t,!0,!0)];case 1:return n=r.sent(),[2,new d.CipherResponse(n)]}}))}))},e.prototype.deleteCipher=function(e){return this.send("DELETE","/ciphers/"+e,null,!0,!1)},e.prototype.deleteCipherAdmin=function(e){return this.send("DELETE","/ciphers/"+e+"/admin",null,!0,!1)},e.prototype.deleteManyCiphers=function(e){return this.send("DELETE","/ciphers",e,!0,!1)},e.prototype.deleteManyCiphersAdmin=function(e){return this.send("DELETE","/ciphers/admin",e,!0,!1)},e.prototype.putMoveCiphers=function(e){return this.send("PUT","/ciphers/move",e,!0,!1)},e.prototype.putShareCipher=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/ciphers/"+e+"/share",t,!0,!0)];case 1:return n=r.sent(),[2,new d.CipherResponse(n)]}}))}))},e.prototype.putShareCiphers=function(e){return this.send("PUT","/ciphers/share",e,!0,!1)},e.prototype.putCipherCollections=function(e,t){return this.send("PUT","/ciphers/"+e+"/collections",t,!0,!1)},e.prototype.putCipherCollectionsAdmin=function(e,t){return this.send("PUT","/ciphers/"+e+"/collections-admin",t,!0,!1)},e.prototype.postPurgeCiphers=function(e,t){void 0===t&&(t=null);var n="/ciphers/purge";return null!=t&&(n+="?organizationId="+t),this.send("POST",n,e,!0,!1)},e.prototype.postImportCiphers=function(e){return this.send("POST","/ciphers/import",e,!0,!1)},e.prototype.postImportOrganizationCiphers=function(e,t){return this.send("POST","/ciphers/import-organization?organizationId="+e,t,!0,!1)},e.prototype.putDeleteCipher=function(e){return this.send("PUT","/ciphers/"+e+"/delete",null,!0,!1)},e.prototype.putDeleteCipherAdmin=function(e){return this.send("PUT","/ciphers/"+e+"/delete-admin",null,!0,!1)},e.prototype.putDeleteManyCiphers=function(e){return this.send("PUT","/ciphers/delete",e,!0,!1)},e.prototype.putDeleteManyCiphersAdmin=function(e){return this.send("PUT","/ciphers/delete-admin",e,!0,!1)},e.prototype.putRestoreCipher=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/ciphers/"+e+"/restore",null,!0,!0)];case 1:return t=n.sent(),[2,new d.CipherResponse(t)]}}))}))},e.prototype.putRestoreCipherAdmin=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/ciphers/"+e+"/restore-admin",null,!0,!0)];case 1:return t=n.sent(),[2,new d.CipherResponse(t)]}}))}))},e.prototype.putRestoreManyCiphers=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/ciphers/restore",e,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,d.CipherResponse)]}}))}))},e.prototype.getAttachmentData=function(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r=(null!=n?"/emergency-access/"+n+"/":"/ciphers/")+e+"/attachment/"+t,[4,this.send("GET",r,null,!0,!0)];case 1:return o=i.sent(),[2,new l.AttachmentResponse(o)]}}))}))},e.prototype.postCipherAttachment=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/ciphers/"+e+"/attachment/v2",t,!0,!0)];case 1:return n=r.sent(),[2,new c.AttachmentUploadDataResponse(n)]}}))}))},e.prototype.postCipherAttachmentLegacy=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/ciphers/"+e+"/attachment",t,!0,!0)];case 1:return n=r.sent(),[2,new d.CipherResponse(n)]}}))}))},e.prototype.postCipherAttachmentAdminLegacy=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/ciphers/"+e+"/attachment-admin",t,!0,!0)];case 1:return n=r.sent(),[2,new d.CipherResponse(n)]}}))}))},e.prototype.deleteCipherAttachment=function(e,t){return this.send("DELETE","/ciphers/"+e+"/attachment/"+t,null,!0,!1)},e.prototype.deleteCipherAttachmentAdmin=function(e,t){return this.send("DELETE","/ciphers/"+e+"/attachment/"+t+"/admin",null,!0,!1)},e.prototype.postShareCipherAttachment=function(e,t,n,r){return this.send("POST","/ciphers/"+e+"/attachment/"+t+"/share?organizationId="+r,n,!0,!1)},e.prototype.renewAttachmentUploadUrl=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("GET","/ciphers/"+e+"/attachment/"+t+"/renew",null,!0,!0)];case 1:return n=r.sent(),[2,new c.AttachmentUploadDataResponse(n)]}}))}))},e.prototype.postAttachmentFile=function(e,t,n){return this.send("POST","/ciphers/"+e+"/attachment/"+t,n,!0,!1)},e.prototype.getCollectionDetails=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("GET","/organizations/"+e+"/collections/"+t+"/details",null,!0,!0)];case 1:return n=r.sent(),[2,new m.CollectionGroupDetailsResponse(n)]}}))}))},e.prototype.getUserCollections=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/collections",null,!0,!0)];case 1:return e=t.sent(),[2,new w.ListResponse(e,m.CollectionResponse)]}}))}))},e.prototype.getCollections=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/collections",null,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,m.CollectionResponse)]}}))}))},e.prototype.getCollectionUsers=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/collections/"+t+"/users",null,!0,!0)];case 1:return[2,n.sent().map((function(e){return new T.SelectionReadOnlyResponse(e)}))]}}))}))},e.prototype.postCollection=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/collections",t,!0,!0)];case 1:return n=r.sent(),[2,new m.CollectionResponse(n)]}}))}))},e.prototype.putCollection=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("PUT","/organizations/"+e+"/collections/"+t,n,!0,!0)];case 1:return r=i.sent(),[2,new m.CollectionResponse(r)]}}))}))},e.prototype.putCollectionUsers=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/organizations/"+e+"/collections/"+t+"/users",n,!0,!1)];case 1:return r.sent(),[2]}}))}))},e.prototype.deleteCollection=function(e,t){return this.send("DELETE","/organizations/"+e+"/collections/"+t,null,!0,!1)},e.prototype.deleteCollectionUser=function(e,t,n){return this.send("DELETE","/organizations/"+e+"/collections/"+t+"/user/"+n,null,!0,!1)},e.prototype.getGroupDetails=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("GET","/organizations/"+e+"/groups/"+t+"/details",null,!0,!0)];case 1:return n=r.sent(),[2,new x.GroupDetailsResponse(n)]}}))}))},e.prototype.getGroups=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/groups",null,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,x.GroupResponse)]}}))}))},e.prototype.getGroupUsers=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/groups/"+t+"/users",null,!0,!0)];case 1:return[2,n.sent()]}}))}))},e.prototype.postGroup=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/groups",t,!0,!0)];case 1:return n=r.sent(),[2,new x.GroupResponse(n)]}}))}))},e.prototype.putGroup=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("PUT","/organizations/"+e+"/groups/"+t,n,!0,!0)];case 1:return r=i.sent(),[2,new x.GroupResponse(r)]}}))}))},e.prototype.putGroupUsers=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/organizations/"+e+"/groups/"+t+"/users",n,!0,!1)];case 1:return r.sent(),[2]}}))}))},e.prototype.deleteGroup=function(e,t){return this.send("DELETE","/organizations/"+e+"/groups/"+t,null,!0,!1)},e.prototype.deleteGroupUser=function(e,t,n){return this.send("DELETE","/organizations/"+e+"/groups/"+t+"/user/"+n,null,!0,!1)},e.prototype.getPolicy=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("GET","/organizations/"+e+"/policies/"+t,null,!0,!0)];case 1:return n=r.sent(),[2,new _.PolicyResponse(n)]}}))}))},e.prototype.getPolicies=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/policies",null,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,_.PolicyResponse)]}}))}))},e.prototype.getPoliciesByToken=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("GET","/organizations/"+e+"/policies/token?token="+encodeURIComponent(t)+"&email="+encodeURIComponent(n)+"&organizationUserId="+o,null,!1,!0)];case 1:return r=i.sent(),[2,new w.ListResponse(r,_.PolicyResponse)]}}))}))},e.prototype.putPolicy=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("PUT","/organizations/"+e+"/policies/"+t,n,!0,!0)];case 1:return r=i.sent(),[2,new _.PolicyResponse(r)]}}))}))},e.prototype.getOrganizationUser=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("GET","/organizations/"+e+"/users/"+t,null,!0,!0)];case 1:return n=r.sent(),[2,new E.OrganizationUserDetailsResponse(n)]}}))}))},e.prototype.getOrganizationUserGroups=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/users/"+t+"/groups",null,!0,!0)];case 1:return[2,n.sent()]}}))}))},e.prototype.getOrganizationUsers=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/users",null,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,E.OrganizationUserUserDetailsResponse)]}}))}))},e.prototype.postOrganizationUserInvite=function(e,t){return this.send("POST","/organizations/"+e+"/users/invite",t,!0,!1)},e.prototype.postOrganizationUserReinvite=function(e,t){return this.send("POST","/organizations/"+e+"/users/"+t+"/reinvite",null,!0,!1)},e.prototype.postOrganizationUserAccept=function(e,t,n){return this.send("POST","/organizations/"+e+"/users/"+t+"/accept",n,!0,!1)},e.prototype.postOrganizationUserConfirm=function(e,t,n){return this.send("POST","/organizations/"+e+"/users/"+t+"/confirm",n,!0,!1)},e.prototype.putOrganizationUser=function(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t,n,!0,!1)},e.prototype.putOrganizationUserGroups=function(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/groups",n,!0,!1)},e.prototype.putOrganizationUserResetPasswordEnrollment=function(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/reset-password-enrollment",n,!0,!1)},e.prototype.deleteOrganizationUser=function(e,t){return this.send("DELETE","/organizations/"+e+"/users/"+t,null,!0,!1)},e.prototype.getPlans=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/plans/",null,!0,!0)];case 1:return e=t.sent(),[2,new w.ListResponse(e,k.PlanResponse)]}}))}))},e.prototype.postImportDirectory=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.send("POST","/organizations/"+e+"/import",t,!0,!1)]}))}))},e.prototype.getTaxRates=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/plans/sales-tax-rates/",null,!0,!0)];case 1:return e=t.sent(),[2,new w.ListResponse(e,U.TaxRateResponse)]}}))}))},e.prototype.getSettingsDomains=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/settings/domains",null,!0,!0)];case 1:return e=t.sent(),[2,new h.DomainsResponse(e)]}}))}))},e.prototype.putSettingsDomains=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/settings/domains",e,!0,!0)];case 1:return t=n.sent(),[2,new h.DomainsResponse(t)]}}))}))},e.prototype.getSync=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=this.isDesktopClient||this.isWebClient?"/sync?excludeDomains=true":"/sync",[4,this.send("GET",e,null,!0,!0)];case 1:return t=n.sent(),[2,new j.SyncResponse(t)]}}))}))},e.prototype.getTwoFactorProviders=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/two-factor",null,!0,!0)];case 1:return e=t.sent(),[2,new w.ListResponse(e,G.TwoFactorProviderResponse)]}}))}))},e.prototype.getTwoFactorOrganizationProviders=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/two-factor",null,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,G.TwoFactorProviderResponse)]}}))}))},e.prototype.getTwoFactorAuthenticator=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/two-factor/get-authenticator",e,!0,!0)];case 1:return t=n.sent(),[2,new N.TwoFactorAuthenticatorResponse(t)]}}))}))},e.prototype.getTwoFactorEmail=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/two-factor/get-email",e,!0,!0)];case 1:return t=n.sent(),[2,new L.TwoFactorEmailResponse(t)]}}))}))},e.prototype.getTwoFactorDuo=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/two-factor/get-duo",e,!0,!0)];case 1:return t=n.sent(),[2,new z.TwoFactorDuoResponse(t)]}}))}))},e.prototype.getTwoFactorOrganizationDuo=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/two-factor/get-duo",t,!0,!0)];case 1:return n=r.sent(),[2,new z.TwoFactorDuoResponse(n)]}}))}))},e.prototype.getTwoFactorYubiKey=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/two-factor/get-yubikey",e,!0,!0)];case 1:return t=n.sent(),[2,new H.TwoFactorYubiKeyResponse(t)]}}))}))},e.prototype.getTwoFactorWebAuthn=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/two-factor/get-webauthn",e,!0,!0)];case 1:return t=n.sent(),[2,new q.TwoFactorWebAuthnResponse(t)]}}))}))},e.prototype.getTwoFactorWebAuthnChallenge=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/two-factor/get-webauthn-challenge",e,!0,!0)];case 1:return t=n.sent(),[2,new W.ChallengeResponse(t)]}}))}))},e.prototype.getTwoFactorRecover=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/two-factor/get-recover",e,!0,!0)];case 1:return t=n.sent(),[2,new K.TwoFactorRecoverResponse(t)]}}))}))},e.prototype.putTwoFactorAuthenticator=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/two-factor/authenticator",e,!0,!0)];case 1:return t=n.sent(),[2,new N.TwoFactorAuthenticatorResponse(t)]}}))}))},e.prototype.putTwoFactorEmail=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/two-factor/email",e,!0,!0)];case 1:return t=n.sent(),[2,new L.TwoFactorEmailResponse(t)]}}))}))},e.prototype.putTwoFactorDuo=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/two-factor/duo",e,!0,!0)];case 1:return t=n.sent(),[2,new z.TwoFactorDuoResponse(t)]}}))}))},e.prototype.putTwoFactorOrganizationDuo=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/organizations/"+e+"/two-factor/duo",t,!0,!0)];case 1:return n=r.sent(),[2,new z.TwoFactorDuoResponse(n)]}}))}))},e.prototype.putTwoFactorYubiKey=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/two-factor/yubikey",e,!0,!0)];case 1:return t=n.sent(),[2,new H.TwoFactorYubiKeyResponse(t)]}}))}))},e.prototype.putTwoFactorWebAuthn=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=e.deviceResponse.response,(n=Object.assign({},e)).deviceResponse={id:e.deviceResponse.id,rawId:btoa(e.deviceResponse.id),type:e.deviceResponse.type,extensions:e.deviceResponse.getClientExtensionResults(),response:{AttestationObject:a.Utils.fromBufferToB64(t.attestationObject),clientDataJson:a.Utils.fromBufferToB64(t.clientDataJSON)}},[4,this.send("PUT","/two-factor/webauthn",n,!0,!0)];case 1:return r=i.sent(),[2,new q.TwoFactorWebAuthnResponse(r)]}}))}))},e.prototype.deleteTwoFactorWebAuthn=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("DELETE","/two-factor/webauthn",e,!0,!0)];case 1:return t=n.sent(),[2,new q.TwoFactorWebAuthnResponse(t)]}}))}))},e.prototype.putTwoFactorDisable=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("PUT","/two-factor/disable",e,!0,!0)];case 1:return t=n.sent(),[2,new G.TwoFactorProviderResponse(t)]}}))}))},e.prototype.putTwoFactorOrganizationDisable=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/organizations/"+e+"/two-factor/disable",t,!0,!0)];case 1:return n=r.sent(),[2,new G.TwoFactorProviderResponse(n)]}}))}))},e.prototype.postTwoFactorRecover=function(e){return this.send("POST","/two-factor/recover",e,!1,!1)},e.prototype.postTwoFactorEmailSetup=function(e){return this.send("POST","/two-factor/send-email",e,!0,!1)},e.prototype.postTwoFactorEmail=function(e){return this.send("POST","/two-factor/send-email-login",e,!1,!1)},e.prototype.getEmergencyAccessTrusted=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/emergency-access/trusted",null,!0,!0)];case 1:return e=t.sent(),[2,new w.ListResponse(e,f.EmergencyAccessGranteeDetailsResponse)]}}))}))},e.prototype.getEmergencyAccessGranted=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/emergency-access/granted",null,!0,!0)];case 1:return e=t.sent(),[2,new w.ListResponse(e,f.EmergencyAccessGrantorDetailsResponse)]}}))}))},e.prototype.getEmergencyAccess=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/emergency-access/"+e,null,!0,!0)];case 1:return t=n.sent(),[2,new f.EmergencyAccessGranteeDetailsResponse(t)]}}))}))},e.prototype.getEmergencyGrantorPolicies=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/emergency-access/"+e+"/policies",null,!0,!0)];case 1:return t=n.sent(),[2,new w.ListResponse(t,_.PolicyResponse)]}}))}))},e.prototype.putEmergencyAccess=function(e,t){return this.send("PUT","/emergency-access/"+e,t,!0,!1)},e.prototype.deleteEmergencyAccess=function(e){return this.send("DELETE","/emergency-access/"+e,null,!0,!1)},e.prototype.postEmergencyAccessInvite=function(e){return this.send("POST","/emergency-access/invite",e,!0,!1)},e.prototype.postEmergencyAccessReinvite=function(e){return this.send("POST","/emergency-access/"+e+"/reinvite",null,!0,!1)},e.prototype.postEmergencyAccessAccept=function(e,t){return this.send("POST","/emergency-access/"+e+"/accept",t,!0,!1)},e.prototype.postEmergencyAccessConfirm=function(e,t){return this.send("POST","/emergency-access/"+e+"/confirm",t,!0,!1)},e.prototype.postEmergencyAccessInitiate=function(e){return this.send("POST","/emergency-access/"+e+"/initiate",null,!0,!1)},e.prototype.postEmergencyAccessApprove=function(e){return this.send("POST","/emergency-access/"+e+"/approve",null,!0,!1)},e.prototype.postEmergencyAccessReject=function(e){return this.send("POST","/emergency-access/"+e+"/reject",null,!0,!1)},e.prototype.postEmergencyAccessTakeover=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/emergency-access/"+e+"/takeover",null,!0,!0)];case 1:return t=n.sent(),[2,new f.EmergencyAccessTakeoverResponse(t)]}}))}))},e.prototype.postEmergencyAccessPassword=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/emergency-access/"+e+"/password",t,!0,!0)];case 1:return n.sent(),[2]}}))}))},e.prototype.postEmergencyAccessView=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/emergency-access/"+e+"/view",null,!0,!0)];case 1:return t=n.sent(),[2,new f.EmergencyAccessViewResponse(t)]}}))}))},e.prototype.getOrganization=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e,null,!0,!0)];case 1:return t=n.sent(),[2,new C.OrganizationResponse(t)]}}))}))},e.prototype.getOrganizationBilling=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/billing",null,!0,!0)];case 1:return t=n.sent(),[2,new p.BillingResponse(t)]}}))}))},e.prototype.getOrganizationSubscription=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/subscription",null,!0,!0)];case 1:return t=n.sent(),[2,new I.OrganizationSubscriptionResponse(t)]}}))}))},e.prototype.getOrganizationLicense=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.send("GET","/organizations/"+e+"/license?installationId="+t,null,!0,!0)]}))}))},e.prototype.getOrganizationTaxInfo=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/organizations/"+e+"/tax",null,!0,!0)];case 1:return t=n.sent(),[2,new F.TaxInfoResponse(t)]}}))}))},e.prototype.postOrganization=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/organizations",e,!0,!0)];case 1:return t=n.sent(),[2,new C.OrganizationResponse(t)]}}))}))},e.prototype.putOrganization=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("PUT","/organizations/"+e,t,!0,!0)];case 1:return n=r.sent(),[2,new C.OrganizationResponse(n)]}}))}))},e.prototype.putOrganizationTaxInfo=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.send("PUT","/organizations/"+e+"/tax",t,!0,!1)]}))}))},e.prototype.postLeaveOrganization=function(e){return this.send("POST","/organizations/"+e+"/leave",null,!0,!1)},e.prototype.postOrganizationLicense=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("POST","/organizations/license",e,!0,!0)];case 1:return t=n.sent(),[2,new C.OrganizationResponse(t)]}}))}))},e.prototype.postOrganizationLicenseUpdate=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.send("POST","/organizations/"+e+"/license",t,!0,!1)]}))}))},e.prototype.postOrganizationApiKey=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/api-key",t,!0,!0)];case 1:return n=r.sent(),[2,new s.ApiKeyResponse(n)]}}))}))},e.prototype.postOrganizationRotateApiKey=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/rotate-api-key",t,!0,!0)];case 1:return n=r.sent(),[2,new s.ApiKeyResponse(n)]}}))}))},e.prototype.postOrganizationUpgrade=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/upgrade",t,!0,!0)];case 1:return n=r.sent(),[2,new P.PaymentResponse(n)]}}))}))},e.prototype.postOrganizationSeat=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/seat",t,!0,!0)];case 1:return n=r.sent(),[2,new P.PaymentResponse(n)]}}))}))},e.prototype.postOrganizationStorage=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.send("POST","/organizations/"+e+"/storage",t,!0,!0)];case 1:return n=r.sent(),[2,new P.PaymentResponse(n)]}}))}))},e.prototype.postOrganizationPayment=function(e,t){return this.send("POST","/organizations/"+e+"/payment",t,!0,!1)},e.prototype.postOrganizationVerifyBank=function(e,t){return this.send("POST","/organizations/"+e+"/verify-bank",t,!0,!1)},e.prototype.postOrganizationCancel=function(e){return this.send("POST","/organizations/"+e+"/cancel",null,!0,!1)},e.prototype.postOrganizationReinstate=function(e){return this.send("POST","/organizations/"+e+"/reinstate",null,!0,!1)},e.prototype.deleteOrganization=function(e,t){return this.send("DELETE","/organizations/"+e,t,!0,!1)},e.prototype.getEvents=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("GET",this.addEventParameters("/events",e,t,n),null,!0,!0)];case 1:return r=i.sent(),[2,new w.ListResponse(r,y.EventResponse)]}}))}))},e.prototype.getEventsCipher=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("GET",this.addEventParameters("/ciphers/"+e+"/events",t,n,o),null,!0,!0)];case 1:return r=i.sent(),[2,new w.ListResponse(r,y.EventResponse)]}}))}))},e.prototype.getEventsOrganization=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("GET",this.addEventParameters("/organizations/"+e+"/events",t,n,o),null,!0,!0)];case 1:return r=i.sent(),[2,new w.ListResponse(r,y.EventResponse)]}}))}))},e.prototype.getEventsOrganizationUser=function(e,t,n,o,a){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.send("GET",this.addEventParameters("/organizations/"+e+"/users/"+t+"/events",n,o,a),null,!0,!0)];case 1:return r=i.sent(),[2,new w.ListResponse(r,y.EventResponse)]}}))}))},e.prototype.postEventsCollect=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.getActiveBearerToken()];case 1:return t=r.sent(),n=new Headers({"Device-Type":this.deviceType,Authorization:"Bearer "+t,"Content-Type":"application/json; charset=utf-8"}),null!=this.customUserAgent&&n.set("User-Agent",this.customUserAgent),[4,this.fetch(new Request(this.eventsBaseUrl+"/collect",{cache:"no-store",credentials:this.getCredentials(),method:"POST",body:JSON.stringify(e),headers:n}))];case 2:return 200!==r.sent().status?[2,Promise.reject("Event post failed.")]:[2]}}))}))},e.prototype.getUserPublicKey=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.send("GET","/users/"+e+"/public-key",null,!0,!0)];case 1:return t=n.sent(),[2,new $.UserKeyResponse(t)]}}))}))},e.prototype.getHibpBreach=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.send("GET","/hibp/breach?username="+e,null,!0,!0)];case 1:return[2,t.sent().map((function(e){return new u.BreachAccountResponse(e)}))]}}))}))},e.prototype.postBitPayInvoice=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.send("POST","/bitpay-invoice",e,!0,!0)];case 1:return[2,t.sent()]}}))}))},e.prototype.postSetupPayment=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.send("POST","/setup-payment",null,!0,!0)];case 1:return[2,e.sent()]}}))}))},e.prototype.getActiveBearerToken=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.tokenService.getToken()];case 1:return e=n.sent(),this.tokenService.tokenNeedsRefresh()?[4,this.doRefreshToken()]:[3,3];case 2:t=n.sent(),e=t.accessToken,n.label=3;case 3:return[2,e]}}))}))},e.prototype.fetch=function(e){return"GET"===e.method&&(e.headers.set("Cache-Control","no-store"),e.headers.set("Pragma","no-cache")),this.nativeFetch(e)},e.prototype.nativeFetch=function(e){return fetch(e)},e.prototype.preValidateSso=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:if(null==e||""===e)throw new Error("Organization Identifier was not provided.");return t=new Headers({Accept:"application/json","Device-Type":this.deviceType}),null!=this.customUserAgent&&t.set("User-Agent",this.customUserAgent),n="/account/prevalidate?domainHint="+encodeURIComponent(e),[4,this.fetch(new Request(this.identityBaseUrl+n,{cache:"no-store",credentials:this.getCredentials(),headers:t,method:"GET"}))];case 1:return 200!==(r=i.sent()).status?[3,2]:[2,!0];case 2:return[4,this.handleError(r,!1,!0)];case 3:return o=i.sent(),[2,Promise.reject(o)]}}))}))},e.prototype.send=function(e,t,n,o,s,l){return r(this,void 0,void 0,(function(){var r,c,p,u,d;return i(this,(function(i){switch(i.label){case 0:return l=a.Utils.isNullOrWhitespace(l)?this.apiBaseUrl:l,r=new Headers({"Device-Type":this.deviceType}),null!=this.customUserAgent&&r.set("User-Agent",this.customUserAgent),c={cache:"no-store",credentials:this.getCredentials(),method:e},o?[4,this.getActiveBearerToken()]:[3,2];case 1:p=i.sent(),r.set("Authorization","Bearer "+p),i.label=2;case 2:return null!=n&&("string"==typeof n?(c.body=n,r.set("Content-Type","application/x-www-form-urlencoded; charset=utf-8")):"object"==typeof n&&(n instanceof FormData?c.body=n:(r.set("Content-Type","application/json; charset=utf-8"),c.body=JSON.stringify(n)))),s&&r.set("Accept","application/json"),c.headers=r,[4,this.fetch(new Request(l+t,c))];case 3:return u=i.sent(),s&&200===u.status?[4,u.json()]:[3,5];case 4:return[2,i.sent()];case 5:return 200===u.status?[3,7]:[4,this.handleError(u,!1,o)];case 6:return d=i.sent(),[2,Promise.reject(d)];case 7:return[2]}}))}))},e.prototype.handleError=function(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return n&&(t&&400===e.status||401===e.status||403===e.status)?[4,this.logoutCallback(!0)]:[3,2];case 1:return i.sent(),[2,null];case 2:return r=null,this.isJsonResponse(e)?[4,e.json()]:[3,4];case 3:return r=i.sent(),[3,6];case 4:return this.isTextResponse(e)?(o={},[4,e.text()]):[3,6];case 5:o.Message=i.sent(),r=o,i.label=6;case 6:return[2,new v.ErrorResponse(r,e.status,t)]}}))}))},e.prototype.doRefreshToken=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.tokenService.getRefreshToken()];case 1:if(null==(e=i.sent())||""===e)throw new Error;return t=new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8",Accept:"application/json","Device-Type":this.deviceType}),null!=this.customUserAgent&&t.set("User-Agent",this.customUserAgent),n=this.tokenService.decodeToken(),[4,this.fetch(new Request(this.identityBaseUrl+"/connect/token",{body:this.qsStringify({grant_type:"refresh_token",client_id:n.client_id,refresh_token:e}),cache:"no-store",credentials:this.getCredentials(),headers:t,method:"POST"}))];case 2:return 200!==(r=i.sent()).status?[3,5]:[4,r.json()];case 3:return o=i.sent(),a=new b.IdentityTokenResponse(o),[4,this.tokenService.setTokens(a.accessToken,a.refreshToken)];case 4:return i.sent(),[2,a];case 5:return[4,this.handleError(r,!0,!0)];case 6:return s=i.sent(),[2,Promise.reject(s)]}}))}))},e.prototype.qsStringify=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")},e.prototype.getCredentials=function(){if(!this.isWebClient||this.usingBaseUrl)return"include"},e.prototype.addEventParameters=function(e,t,n,r){return null!=t&&(e+="?start="+t),null!=n&&(e+=e.indexOf("?")>-1?"&":"?",e+="end="+n),null!=r&&(e+=e.indexOf("?")>-1?"&":"?",e+="continuationToken="+r),e},e.prototype.isJsonResponse=function(e){var t=e.headers.get("content-type");return null!=t&&t.indexOf("application/json")>-1},e.prototype.isTextResponse=function(e){var t=e.headers.get("content-type");return null!=t&&t.indexOf("text")>-1},e}();t.ApiService=Y},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(684),s=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.getResponseProperty("Id"),n.identifier=n.getResponseProperty("Identifier"),n.name=n.getResponseProperty("Name"),n.businessName=n.getResponseProperty("BusinessName"),n.businessAddress1=n.getResponseProperty("BusinessAddress1"),n.businessAddress2=n.getResponseProperty("BusinessAddress2"),n.businessAddress3=n.getResponseProperty("BusinessAddress3"),n.businessCountry=n.getResponseProperty("BusinessCountry"),n.businessTaxNumber=n.getResponseProperty("BusinessTaxNumber"),n.billingEmail=n.getResponseProperty("BillingEmail");var r=n.getResponseProperty("Plan");return n.plan=null==r?null:new a.PlanResponse(r),n.planType=n.getResponseProperty("PlanType"),n.seats=n.getResponseProperty("Seats"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.useGroups=n.getResponseProperty("UseGroups"),n.useDirectory=n.getResponseProperty("UseDirectory"),n.useEvents=n.getResponseProperty("UseEvents"),n.useTotp=n.getResponseProperty("UseTotp"),n.use2fa=n.getResponseProperty("Use2fa"),n.useApi=n.getResponseProperty("UseApi"),n}return i(t,e),t}(o.BaseResponse);t.OrganizationResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.product=n.getResponseProperty("Product"),n.name=n.getResponseProperty("Name"),n.isAnnual=n.getResponseProperty("IsAnnual"),n.nameLocalizationKey=n.getResponseProperty("NameLocalizationKey"),n.descriptionLocalizationKey=n.getResponseProperty("DescriptionLocalizationKey"),n.canBeUsedByBusiness=n.getResponseProperty("CanBeUsedByBusiness"),n.baseSeats=n.getResponseProperty("BaseSeats"),n.baseStorageGb=n.getResponseProperty("BaseStorageGb"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxUsers=n.getResponseProperty("MaxUsers"),n.hasAdditionalSeatsOption=n.getResponseProperty("HasAdditionalSeatsOption"),n.maxAdditionalSeats=n.getResponseProperty("MaxAdditionalSeats"),n.hasAdditionalStorageOption=n.getResponseProperty("HasAdditionalStorageOption"),n.maxAdditionalStorage=n.getResponseProperty("MaxAdditionalStorage"),n.hasPremiumAccessOption=n.getResponseProperty("HasPremiumAccessOption"),n.trialPeriodDays=n.getResponseProperty("TrialPeriodDays"),n.hasSelfHost=n.getResponseProperty("HasSelfHost"),n.hasPolicies=n.getResponseProperty("HasPolicies"),n.hasGroups=n.getResponseProperty("HasGroups"),n.hasDirectory=n.getResponseProperty("HasDirectory"),n.hasEvents=n.getResponseProperty("HasEvents"),n.hasTotp=n.getResponseProperty("HasTotp"),n.has2fa=n.getResponseProperty("Has2fa"),n.hasApi=n.getResponseProperty("HasApi"),n.hasSso=n.getResponseProperty("HasSso"),n.usersGetPremium=n.getResponseProperty("UsersGetPremium"),n.upgradeSortOrder=n.getResponseProperty("UpgradeSortOrder"),n.displaySortOrder=n.getResponseProperty("SortOrder"),n.legacyYear=n.getResponseProperty("LegacyYear"),n.disabled=n.getResponseProperty("Disabled"),n.stripePlanId=n.getResponseProperty("StripePlanId"),n.stripeSeatPlanId=n.getResponseProperty("StripeSeatPlanId"),n.stripeStoragePlanId=n.getResponseProperty("StripeStoragePlanId"),n.stripePremiumAccessPlanId=n.getResponseProperty("StripePremiumAccessPlanId"),n.basePrice=n.getResponseProperty("BasePrice"),n.seatPrice=n.getResponseProperty("SeatPrice"),n.additionalStoragePricePerGb=n.getResponseProperty("AdditionalStoragePricePerGb"),n.premiumAccessOptionPrice=n.getResponseProperty("PremiumAccessOptionPrice"),n}return i(t,e),t}(n(23).BaseResponse);t.PlanResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=function(e){function t(t){var n=e.call(this,t)||this;n.storageName=n.getResponseProperty("StorageName"),n.storageGb=n.getResponseProperty("StorageGb"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.license=n.getResponseProperty("License"),n.expiration=n.getResponseProperty("Expiration"),n.usingInAppPurchase=n.getResponseProperty("UsingInAppPurchase");var r=n.getResponseProperty("Subscription"),i=n.getResponseProperty("UpcomingInvoice");return n.subscription=null==r?null:new s(r),n.upcomingInvoice=null==i?null:new c(i),n}return i(t,e),t}(o.BaseResponse);t.SubscriptionResponse=a;var s=function(e){function t(t){var n=e.call(this,t)||this;n.items=[],n.trialEndDate=n.getResponseProperty("TrialStartDate"),n.trialEndDate=n.getResponseProperty("TrialEndDate"),n.periodStartDate=n.getResponseProperty("PeriodStartDate"),n.periodEndDate=n.getResponseProperty("PeriodEndDate"),n.cancelledDate=n.getResponseProperty("CancelledDate"),n.cancelAtEndDate=n.getResponseProperty("CancelAtEndDate"),n.status=n.getResponseProperty("Status"),n.cancelled=n.getResponseProperty("Cancelled");var r=n.getResponseProperty("Items");return null!=r&&(n.items=r.map((function(e){return new l(e)}))),n}return i(t,e),t}(o.BaseResponse);t.BillingSubscriptionResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.name=n.getResponseProperty("Name"),n.amount=n.getResponseProperty("Amount"),n.quantity=n.getResponseProperty("Quantity"),n.interval=n.getResponseProperty("Interval"),n}return i(t,e),t}(o.BaseResponse);t.BillingSubscriptionItemResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.date=n.getResponseProperty("Date"),n.amount=n.getResponseProperty("Amount"),n}return i(t,e),t}(o.BaseResponse);t.BillingSubscriptionUpcomingInvoiceResponse=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),a=n(23),s=function(e){function t(t){var n=e.call(this,t)||this;n.enabled=n.getResponseProperty("Enabled");var r=n.getResponseProperty("Keys");return n.keys=null==r?null:r.map((function(e){return new l(e)})),n}return i(t,e),t}(a.BaseResponse);t.TwoFactorWebAuthnResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.name=n.getResponseProperty("Name"),n.id=n.getResponseProperty("Id"),n.migrated=n.getResponseProperty("Migrated"),n}return i(t,e),t}(a.BaseResponse);t.KeyResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;n.attestation=n.getResponseProperty("attestation"),n.authenticatorSelection=n.getResponseProperty("authenticatorSelection"),n.challenge=o.Utils.fromUrlB64ToArray(n.getResponseProperty("challenge")),n.excludeCredentials=n.getResponseProperty("excludeCredentials").map((function(e){return e.id=o.Utils.fromUrlB64ToArray(e.id).buffer,e})),n.extensions=n.getResponseProperty("extensions"),n.pubKeyCredParams=n.getResponseProperty("pubKeyCredParams"),n.rp=n.getResponseProperty("rp"),n.timeout=n.getResponseProperty("timeout");var r=n.getResponseProperty("user");return r.id=o.Utils.fromUrlB64ToArray(r.id),n.user=r,n}return i(t,e),t}(a.BaseResponse);t.ChallengeResponse=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),a=function(){function e(e){this.storageService=e}return e.prototype.getAppId=function(){return this.makeAndGetAppId("appId")},e.prototype.getAnonymousAppId=function(){return this.makeAndGetAppId("anonymousAppId")},e.prototype.makeAndGetAppId=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.storageService.get(e)];case 1:return null!=(t=r.sent())?[2,t]:(n=o.Utils.newGuid(),[4,this.storageService.save(e,n)]);case 2:return r.sent(),[2,n]}}))}))},e}();t.AppIdService=a},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(934),l=n(30),c=function(){function e(e,t){this.cryptoFunctionService=e,this.apiService=t}return e.prototype.passwordLeaked=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return[4,this.cryptoFunctionService.hash(e,"sha1")];case 1:return t=a.sent(),n=l.Utils.fromBufferToHex(t).toUpperCase(),r=n.substr(0,5),i=n.substr(5),[4,this.apiService.nativeFetch(new Request("https://api.pwnedpasswords.com/range/"+r))];case 2:return[4,a.sent().text()];case 3:return o=a.sent(),[2,null!=(s=o.split(/\r?\n/).find((function(e){return e.split(":")[0]===i})))?parseInt(s.split(":")[1],10):0]}}))}))},e.prototype.breachedAccounts=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.apiService.getHibpBreach(e)];case 1:return[2,n.sent()];case 2:if(t=n.sent(),404===t.statusCode)return[2,[]];throw new Error;case 3:return[2]}}))}))},r([s.throttle(100,(function(){return"passwordLeaked"})),i("design:type",Function),i("design:paramtypes",[String]),i("design:returntype",Promise)],e.prototype,"passwordLeaked",null),e}();t.AuditService=c},function(e,t,n){"use strict";(function(e){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(39),l=n(118),c=n(259),p=n(158),u=n(489),d=n(285),m=n(190),h=n(286),f=n(287),v=n(288),y=n(289),g=n(597),x=n(290),b=n(625),S=n(935),w=n(936),C=n(937),I=n(623),E=n(598),P=n(210),k=n(938),_=n(211),A=n(490),O=n(939),T=n(70),M=n(690),B=n(30),D="ciphers_",R="sitesLocalData",V="neverDomains",j=new Map([["google.com",new Set(["script.google.com"])]]),F=function(){function t(e,t,n,r,i,o,a,s){this.cryptoService=e,this.userService=t,this.settingsService=n,this.apiService=r,this.fileUploadService=i,this.storageService=o,this.i18nService=a,this.searchService=s,this.sortedCiphersCache=new O.SortedCiphersCache(this.sortCiphersByLastUsed)}return Object.defineProperty(t.prototype,"decryptedCipherCache",{get:function(){return this._decryptedCipherCache},set:function(e){this._decryptedCipherCache=e,null!=this.searchService&&(null==e?this.searchService().clearIndex():this.searchService().indexCiphers())},enumerable:!0,configurable:!0}),t.prototype.clearCache=function(){this.decryptedCipherCache=null,this.sortedCiphersCache.clear()},t.prototype.encrypt=function(e,t,n){return void 0===n&&(n=null),o(this,void 0,void 0,(function(){var r,i,o,c,p;return a(this,(function(a){switch(a.label){case 0:return null==e.id?[3,5]:null!=n?[3,2]:[4,this.get(e.id)];case 1:n=a.sent(),a.label=2;case 2:return null==n?[3,4]:[4,n.decrypt()];case 3:r=a.sent(),e.passwordHistory=r.passwordHistory||[],e.type===s.CipherType.Login&&r.type===s.CipherType.Login&&(null!=r.login.password&&""!==r.login.password&&r.login.password!==e.login.password?((i=new A.PasswordHistoryView).password=r.login.password,i.lastUsedDate=e.login.passwordRevisionDate=new Date,e.passwordHistory.splice(0,0,i)):e.login.passwordRevisionDate=r.login.passwordRevisionDate),r.hasFields&&(o=r.fields.filter((function(e){return e.type===l.FieldType.Hidden&&null!=e.name&&""!==e.name&&null!=e.value&&""!==e.value})),c=null==e.fields?[]:e.fields.filter((function(e){return e.type===l.FieldType.Hidden&&null!=e.name&&""!==e.name})),o.forEach((function(t){var n=c.find((function(e){return e.name===t.name}));if(null==n||n.value!==t.value){var r=new A.PasswordHistoryView;r.password=t.name+": "+t.value,r.lastUsedDate=new Date,e.passwordHistory.splice(0,0,r)}}))),a.label=4;case 4:null!=e.passwordHistory&&0===e.passwordHistory.length?e.passwordHistory=null:null!=e.passwordHistory&&e.passwordHistory.length>5&&(e.passwordHistory=e.passwordHistory.slice(0,5)),a.label=5;case 5:return(p=new m.Cipher).id=e.id,p.folderId=e.folderId,p.favorite=e.favorite,p.organizationId=e.organizationId,p.type=e.type,p.collectionIds=e.collectionIds,p.revisionDate=e.revisionDate,null!=t||null==p.organizationId?[3,7]:[4,this.cryptoService.getOrgKey(p.organizationId)];case 6:if(null==(t=a.sent()))throw new Error("Cannot encrypt cipher for organization. No key.");a.label=7;case 7:return[4,Promise.all([this.encryptObjProperty(e,p,{name:null,notes:null},t),this.encryptCipherData(p,e,t),this.encryptFields(e.fields,t).then((function(e){p.fields=e})),this.encryptPasswordHistories(e.passwordHistory,t).then((function(e){p.passwordHistory=e})),this.encryptAttachments(e.attachments,t).then((function(e){p.attachments=e}))])];case 8:return a.sent(),[2,p]}}))}))},t.prototype.encryptAttachments=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i=this;return a(this,(function(s){switch(s.label){case 0:return null==e||0===e.length?[2,null]:(n=[],r=[],e.forEach((function(e){return o(i,void 0,void 0,(function(){var i,s,l=this;return a(this,(function(c){return(i=new u.Attachment).id=e.id,i.size=e.size,i.sizeName=e.sizeName,i.url=e.url,s=this.encryptObjProperty(e,i,{fileName:null},t).then((function(){return o(l,void 0,void 0,(function(){var n;return a(this,(function(o){switch(o.label){case 0:return null==e.key?[3,2]:(n=i,[4,this.cryptoService.encrypt(e.key.key,t)]);case 1:n.key=o.sent(),o.label=2;case 2:return r.push(i),[2]}}))}))})),n.push(s),[2]}))}))})),[4,Promise.all(n)]);case 1:return s.sent(),[2,r]}}))}))},t.prototype.encryptFields=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return e&&e.length?(n=this,r=[],[4,e.reduce((function(e,i){return e.then((function(){return n.encryptField(i,t)})).then((function(e){r.push(e)}))}),Promise.resolve())]):[2,null];case 1:return i.sent(),[2,r]}}))}))},t.prototype.encryptField=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return(n=new h.Field).type=e.type,e.type===l.FieldType.Boolean&&"true"!==e.value&&(e.value="false"),[4,this.encryptObjProperty(e,n,{name:null,value:null},t)];case 1:return r.sent(),[2,n]}}))}))},t.prototype.encryptPasswordHistories=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return e&&e.length?(n=this,r=[],[4,e.reduce((function(e,i){return e.then((function(){return n.encryptPasswordHistory(i,t)})).then((function(e){r.push(e)}))}),Promise.resolve())]):[2,null];case 1:return i.sent(),[2,r]}}))}))},t.prototype.encryptPasswordHistory=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return(n=new g.Password).lastUsedDate=e.lastUsedDate,[4,this.encryptObjProperty(e,n,{password:null},t)];case 1:return r.sent(),[2,n]}}))}))},t.prototype.get=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(R)];case 2:return n=i.sent(),[4,this.storageService.get(D+t)];case 3:return null!=(r=i.sent())&&r.hasOwnProperty(e)?[2,new m.Cipher(r[e],!1,n?n[e]:null)]:[2,null]}}))}))},t.prototype.getAll=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.userService.getUserId()];case 1:return e=o.sent(),[4,this.storageService.get(R)];case 2:return t=o.sent(),[4,this.storageService.get(D+e)];case 3:for(i in n=o.sent(),r=[],n)n.hasOwnProperty(i)&&r.push(new m.Cipher(n[i],!1,t?t[i]:null));return[2,r]}}))}))},t.prototype.getAllDecrypted=function(){var e;return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return null==this.decryptedCipherCache?[3,4]:[4,this.userService.getUserId()];case 1:return t=i.sent(),(null!==(e=this.searchService().indexedEntityId)&&void 0!==e?e:t)===t?[3,3]:[4,this.searchService().indexCiphers(t,this.decryptedCipherCache)];case 2:i.sent(),i.label=3;case 3:return[2,this.decryptedCipherCache];case 4:return n=[],[4,this.cryptoService.hasKey()];case 5:if(!i.sent())throw new Error("No key.");return r=[],[4,this.getAll()];case 6:return i.sent().forEach((function(e){r.push(e.decrypt().then((function(e){return n.push(e)})))})),[4,Promise.all(r)];case 7:return i.sent(),n.sort(this.getLocaleSortingFunction()),this.decryptedCipherCache=n,[2,this.decryptedCipherCache]}}))}))},t.prototype.getAllDecryptedForGrouping=function(e,t){return void 0===t&&(t=!0),o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,this.getAllDecrypted()];case 1:return[2,n.sent().filter((function(n){return!n.isDeleted&&(!(!t||n.folderId!==e)||!t&&null!=n.collectionIds&&n.collectionIds.indexOf(e)>-1)}))]}}))}))},t.prototype.getAllDecryptedForUrl=function(e,t,n){return void 0===n&&(n=null),o(this,void 0,void 0,(function(){var r,i,o,l,p;return a(this,(function(a){switch(a.label){case 0:return null==e&&null==t?[2,Promise.resolve([])]:(r=B.Utils.getDomain(e),i=null==r?Promise.resolve([]):this.settingsService.getEquivalentDomains().then((function(e){var t=[];return e.forEach((function(e){e.length&&e.indexOf(r)>=0&&(t=t.concat(e))})),t.length||t.push(r),t})),[4,Promise.all([i,this.getAllDecrypted()])]);case 1:return o=a.sent(),l=o[0],p=o[1],null!=n?[3,3]:[4,this.storageService.get(T.ConstantsService.defaultUriMatch)];case 2:null==(n=a.sent())&&(n=c.UriMatchType.Domain),a.label=3;case 3:return[2,p.filter((function(i){if(null!=i.deletedDate)return!1;if(null!=t&&t.indexOf(i.type)>-1)return!0;if(null!=e&&i.type===s.CipherType.Login&&null!=i.login.uris)for(var o=0;o<i.login.uris.length;o++){var p=i.login.uris[o];if(null!=p.uri)switch(null==p.match?n:p.match){case c.UriMatchType.Domain:if(null!=r&&null!=p.domain&&l.indexOf(p.domain)>-1){if(!j.has(p.domain))return!0;var u=B.Utils.getHost(e);if(!j.get(p.domain).has(u))return!0}break;case c.UriMatchType.Host:var d=B.Utils.getHost(e);if(null!=d&&d===B.Utils.getHost(p.uri))return!0;break;case c.UriMatchType.Exact:if(e===p.uri)return!0;break;case c.UriMatchType.StartsWith:if(e.startsWith(p.uri))return!0;break;case c.UriMatchType.RegularExpression:try{if(new RegExp(p.uri,"i").test(e))return!0}catch(a){}break;case c.UriMatchType.Never:}}return!1}))]}}))}))},t.prototype.getAllFromApiForOrganization=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.apiService.getCiphersOrganization(e)];case 1:return null!=(t=i.sent())&&null!=t.data&&t.data.length?(n=[],r=[],t.data.forEach((function(e){var t=new p.CipherData(e),i=new m.Cipher(t);r.push(i.decrypt().then((function(e){return n.push(e)})))})),[4,Promise.all(r)]):[3,3];case 2:return i.sent(),n.sort(this.getLocaleSortingFunction()),[2,n];case 3:return[2,[]]}}))}))},t.prototype.getLastUsedForUrl=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.getCipherForUrl(e,!0,!1)]}))}))},t.prototype.getLastLaunchedForUrl=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.getCipherForUrl(e,!1,!0)]}))}))},t.prototype.getNextCipherForUrl=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.getCipherForUrl(e,!1,!1)]}))}))},t.prototype.updateLastUsedIndexForUrl=function(e){this.sortedCiphersCache.updateLastUsedIndex(e)},t.prototype.updateLastUsedDate=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.storageService.get(R)];case 1:return(t=i.sent())||(t={}),t[e]?t[e].lastUsedDate=(new Date).getTime():t[e]={lastUsedDate:(new Date).getTime()},[4,this.storageService.save(R,t)];case 2:if(i.sent(),null==this.decryptedCipherCache)return[2];for(n=0;n<this.decryptedCipherCache.length;n++)if((r=this.decryptedCipherCache[n]).id===e){r.localData=t[e];break}return[2]}}))}))},t.prototype.updateLastLaunchedDate=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.storageService.get(R)];case 1:return(t=i.sent())||(t={}),t[e]?t[e].lastLaunched=(new Date).getTime():t[e]={lastUsedDate:(new Date).getTime()},[4,this.storageService.save(R,t)];case 2:if(i.sent(),null==this.decryptedCipherCache)return[2];for(n=0;n<this.decryptedCipherCache.length;n++)if((r=this.decryptedCipherCache[n]).id===e){r.localData=t[e];break}return[2]}}))}))},t.prototype.saveNeverDomain=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return null==e?[2]:[4,this.storageService.get(V)];case 1:return(t=n.sent())||(t={}),t[e]=null,[4,this.storageService.save(V,t)];case 2:return n.sent(),[2]}}))}))},t.prototype.saveWithServer=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(o){switch(o.label){case 0:return null!=e.id?[3,5]:null==e.collectionIds?[3,2]:(n=new E.CipherCreateRequest(e),[4,this.apiService.postCipherCreate(n)]);case 1:return t=o.sent(),[3,4];case 2:return n=new P.CipherRequest(e),[4,this.apiService.postCipher(n)];case 3:t=o.sent(),o.label=4;case 4:return e.id=t.id,[3,7];case 5:return n=new P.CipherRequest(e),[4,this.apiService.putCipher(e.id,n)];case 6:t=o.sent(),o.label=7;case 7:return[4,this.userService.getUserId()];case 8:return r=o.sent(),i=new p.CipherData(t,r,e.collectionIds),[4,this.upsert(i)];case 9:return o.sent(),[2]}}))}))},t.prototype.shareWithServer=function(e,t,n){return o(this,void 0,void 0,(function(){var r,i,o,s,l,c,u=this;return a(this,(function(a){switch(a.label){case 0:return r=[],null!=e.attachments&&e.attachments.forEach((function(n){null==n.key&&r.push(u.shareAttachmentWithServer(n,e.id,t))})),[4,Promise.all(r)];case 1:return a.sent(),e.organizationId=t,e.collectionIds=n,[4,this.encrypt(e)];case 2:return i=a.sent(),o=new k.CipherShareRequest(i),[4,this.apiService.putShareCipher(e.id,o)];case 3:return s=a.sent(),[4,this.userService.getUserId()];case 4:return l=a.sent(),c=new p.CipherData(s,l,n),[4,this.upsert(c)];case 5:return a.sent(),[2]}}))}))},t.prototype.shareManyWithServer=function(e,t,n){return o(this,void 0,void 0,(function(){var r,i,o,s,l,c,p;return a(this,(function(a){switch(a.label){case 0:for(r=[],i=[],o=0,s=e;o<s.length;o++)(l=s[o]).organizationId=t,l.collectionIds=n,r.push(this.encrypt(l).then((function(e){i.push(e)})));return[4,Promise.all(r)];case 1:return a.sent(),c=new C.CipherBulkShareRequest(i,n),[4,this.apiService.putShareCiphers(c)];case 2:return a.sent(),[4,this.userService.getUserId()];case 3:return p=a.sent(),[4,this.upsert(i.map((function(e){return e.toCipherData(p)})))];case 4:return a.sent(),[2]}}))}))},t.prototype.saveAttachmentWithServer=function(e,t,n){var r=this;return void 0===n&&(n=!1),new Promise((function(i,s){var l=new FileReader;l.readAsArrayBuffer(t),l.onload=function(l){return o(r,void 0,void 0,(function(){var r,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.saveAttachmentRawWithServer(e,t.name,l.target.result,n)];case 1:return r=a.sent(),i(r),[3,3];case 2:return o=a.sent(),s(o),[3,3];case 3:return[2]}}))}))},l.onerror=function(e){s("Error reading file.")}}))},t.prototype.saveAttachmentRawWithServer=function(e,t,n,r){return void 0===r&&(r=!1),o(this,void 0,void 0,(function(){var i,o,s,l,c,u,d,h,f,v;return a(this,(function(a){switch(a.label){case 0:return[4,this.cryptoService.getOrgKey(e.organizationId)];case 1:return i=a.sent(),[4,this.cryptoService.encrypt(t,i)];case 2:return o=a.sent(),[4,this.cryptoService.makeEncKey(i)];case 3:return s=a.sent(),[4,this.cryptoService.encryptToBytes(n,s[0])];case 4:l=a.sent(),c={key:s[1].encryptedString,fileName:o.encryptedString,fileSize:l.buffer.byteLength,adminRequest:r},a.label=5;case 5:return a.trys.push([5,8,,12]),[4,this.apiService.postCipherAttachment(e.id,c)];case 6:return d=a.sent(),u=r?d.cipherMiniResponse:d.cipherResponse,[4,this.fileUploadService.uploadCipherAttachment(r,d,t,l)];case 7:return a.sent(),[3,12];case 8:return(h=a.sent())instanceof _.ErrorResponse&&404===h.statusCode||405===h.statusCode?[4,this.legacyServerAttachmentFileUpload(r,e.id,o,l,s[1])]:[3,10];case 9:return u=a.sent(),[3,11];case 10:throw h instanceof _.ErrorResponse?new Error(h.getSingleMessage()):h;case 11:return[3,12];case 12:return[4,this.userService.getUserId()];case 13:return f=a.sent(),v=new p.CipherData(u,f,e.collectionIds),r?[3,15]:[4,this.upsert(v)];case 14:a.sent(),a.label=15;case 15:return[2,new m.Cipher(v)]}}))}))},t.prototype.legacyServerAttachmentFileUpload=function(t,n,r,i,s){return o(this,void 0,void 0,(function(){var o,l,c,p;return a(this,(function(a){switch(a.label){case 0:o=new FormData;try{l=new Blob([i.buffer],{type:"application/octet-stream"}),o.append("key",s.encryptedString),o.append("data",l,r.encryptedString)}catch(u){if(!B.Utils.isNode||B.Utils.isBrowser)throw u;o.append("key",s.encryptedString),o.append("data",e.from(i.buffer),{filepath:r.encryptedString,contentType:"application/octet-stream"})}a.label=1;case 1:return a.trys.push([1,6,,7]),t?[4,this.apiService.postCipherAttachmentAdminLegacy(n,o)]:[3,3];case 2:return c=a.sent(),[3,5];case 3:return[4,this.apiService.postCipherAttachmentLegacy(n,o)];case 4:c=a.sent(),a.label=5;case 5:return[3,7];case 6:throw p=a.sent(),new Error(p.getSingleMessage());case 7:return[2,c]}}))}))},t.prototype.saveCollectionsWithServer=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=new I.CipherCollectionsRequest(e.collectionIds),[4,this.apiService.putCipherCollections(e.id,t)];case 1:return i.sent(),[4,this.userService.getUserId()];case 2:return n=i.sent(),r=e.toCipherData(n),[4,this.upsert(r)];case 3:return i.sent(),[2]}}))}))},t.prototype.upsert=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(D+t)];case 2:return null==(n=i.sent())&&(n={}),e instanceof p.CipherData?n[(r=e).id]=r:e.forEach((function(e){n[e.id]=e})),[4,this.storageService.save(D+t,n)];case 3:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.replace=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,this.userService.getUserId()];case 1:return t=n.sent(),[4,this.storageService.save(D+t,e)];case 2:return n.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.clear=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.storageService.remove(D+e)];case 1:return t.sent(),this.clearCache(),[2]}}))}))},t.prototype.moveManyWithServer=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.apiService.putMoveCiphers(new S.CipherBulkMoveRequest(e,t))];case 1:return i.sent(),[4,this.userService.getUserId()];case 2:return n=i.sent(),[4,this.storageService.get(D+n)];case 3:return null==(r=i.sent())&&(r={}),e.forEach((function(e){r.hasOwnProperty(e)&&(r[e].folderId=t)})),[4,this.storageService.save(D+n,r)];case 4:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.delete=function(e){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.userService.getUserId()];case 1:return t=r.sent(),[4,this.storageService.get(D+t)];case 2:if(null==(n=r.sent()))return[2];if("string"==typeof e){if(null==n[e])return[2];delete n[e]}else e.forEach((function(e){delete n[e]}));return[4,this.storageService.save(D+t,n)];case 3:return r.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.deleteWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.deleteCipher(e)];case 1:return t.sent(),[4,this.delete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.deleteManyWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.deleteManyCiphers(new b.CipherBulkDeleteRequest(e))];case 1:return t.sent(),[4,this.delete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.deleteAttachment=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.userService.getUserId()];case 1:return n=o.sent(),[4,this.storageService.get(D+n)];case 2:if(null==(r=o.sent())||!r.hasOwnProperty(e)||null==r[e].attachments)return[2];for(i=0;i<r[e].attachments.length;i++)r[e].attachments[i].id===t&&r[e].attachments.splice(i,1);return[4,this.storageService.save(D+n,r)];case 3:return o.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.deleteAttachmentWithServer=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.apiService.deleteCipherAttachment(e,t)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),[2,Promise.reject(n.getSingleMessage())];case 3:return[4,this.deleteAttachment(e,t)];case 4:return r.sent(),[2]}}))}))},t.prototype.sortCiphersByLastUsed=function(e,t){var n=e.localData&&e.localData.lastUsedDate?e.localData.lastUsedDate:null,r=t.localData&&t.localData.lastUsedDate?t.localData.lastUsedDate:null,i=null!=n&&null!=r;return i&&n<r?1:null!=n&&null==r||i&&n>r?-1:null!=r&&null==n?1:0},t.prototype.sortCiphersByLastUsedThenName=function(e,t){var n=this.sortCiphersByLastUsed(e,t);return 0!==n?n:this.getLocaleSortingFunction()(e,t)},t.prototype.getLocaleSortingFunction=function(){var e=this;return function(t,n){var r=t.name,i=n.name;if(null==r&&null!=i)return-1;if(null!=r&&null==i)return 1;if(null==r&&null==i)return 0;var o=e.i18nService.collator?e.i18nService.collator.compare(r,i):r.localeCompare(i);return 0!==o||t.type!==s.CipherType.Login||n.type!==s.CipherType.Login?o:(null!=t.login.username&&(r+=t.login.username),null!=n.login.username&&(i+=n.login.username),e.i18nService.collator?e.i18nService.collator.compare(r,i):r.localeCompare(i))}},t.prototype.softDelete=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(D+t)];case 2:return null==(n=i.sent())?[2]:(r=function(e){null!=n[e]&&(n[e].deletedDate=(new Date).toISOString())},"string"==typeof e?r(e):e.forEach(r),[4,this.storageService.save(D+t,n)]);case 3:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.softDeleteWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.putDeleteCipher(e)];case 1:return t.sent(),[4,this.softDelete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.softDeleteManyWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.putDeleteManyCiphers(new b.CipherBulkDeleteRequest(e))];case 1:return t.sent(),[4,this.softDelete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.restore=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(D+t)];case 2:return null==(n=i.sent())?[2]:(r=function(e){null!=n[e.id]&&(n[e.id].deletedDate=null,n[e.id].revisionDate=e.revisionDate)},"Array"===e.constructor.name?e.forEach(r):r(e),[4,this.storageService.save(D+t,n)]);case 3:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.restoreWithServer=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,this.apiService.putRestoreCipher(e)];case 1:return t=n.sent(),[4,this.restore({id:e,revisionDate:t.revisionDate})];case 2:return n.sent(),[2]}}))}))},t.prototype.restoreManyWithServer=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o;return a(this,(function(a){switch(a.label){case 0:return[4,this.apiService.putRestoreManyCiphers(new w.CipherBulkRestoreRequest(e))];case 1:for(t=a.sent(),n=[],r=0,i=t.data;r<i.length;r++)o=i[r],n.push({id:o.id,revisionDate:o.revisionDate});return[4,this.restore(n)];case 2:return a.sent(),[2]}}))}))},t.prototype.shareAttachmentWithServer=function(t,n,r){return o(this,void 0,void 0,(function(){var i,o,s,l,c,p,u,d,m,h;return a(this,(function(a){switch(a.label){case 0:return[4,this.apiService.nativeFetch(new Request(t.url,{cache:"no-store"}))];case 1:if(200!==(i=a.sent()).status)throw Error("Failed to download attachment: "+i.status.toString());return[4,i.arrayBuffer()];case 2:return o=a.sent(),[4,this.cryptoService.decryptFromBytes(o,null)];case 3:return s=a.sent(),[4,this.cryptoService.getOrgKey(r)];case 4:return l=a.sent(),[4,this.cryptoService.encrypt(t.fileName,l)];case 5:return c=a.sent(),[4,this.cryptoService.makeEncKey(l)];case 6:return p=a.sent(),[4,this.cryptoService.encryptToBytes(s,p[0])];case 7:u=a.sent(),d=new FormData;try{m=new Blob([u.buffer],{type:"application/octet-stream"}),d.append("key",p[1].encryptedString),d.append("data",m,c.encryptedString)}catch(f){if(!B.Utils.isNode||B.Utils.isBrowser)throw f;d.append("key",p[1].encryptedString),d.append("data",e.from(u.buffer),{filepath:c.encryptedString,contentType:"application/octet-stream"})}a.label=8;case 8:return a.trys.push([8,10,,11]),[4,this.apiService.postShareCipherAttachment(n,t.id,d,r)];case 9:return a.sent(),[3,11];case 10:throw h=a.sent(),new Error(h.getSingleMessage());case 11:return[2]}}))}))},t.prototype.encryptObjProperty=function(e,t,n,r){return o(this,void 0,void 0,(function(){var i,o,s;return a(this,(function(a){switch(a.label){case 0:for(s in i=[],o=this,n)n.hasOwnProperty(s)&&function(t,a){var s=Promise.resolve().then((function(){var i=e[n[t]||t];return i&&""!==i?o.cryptoService.encrypt(i,r):null})).then((function(e){a[t]=e}));i.push(s)}(s,t);return[4,Promise.all(i)];case 1:return a.sent(),[2]}}))}))},t.prototype.encryptCipherData=function(e,t,n){return o(this,void 0,void 0,(function(){var r,i;return a(this,(function(o){switch(o.label){case 0:switch(e.type){case s.CipherType.Login:return[3,1];case s.CipherType.SecureNote:return[3,7];case s.CipherType.Card:return[3,8];case s.CipherType.Identity:return[3,10]}return[3,12];case 1:return e.login=new v.Login,e.login.passwordRevisionDate=t.login.passwordRevisionDate,[4,this.encryptObjProperty(t.login,e.login,{username:null,password:null,totp:null},n)];case 2:if(o.sent(),null==t.login.uris)return[3,6];e.login.uris=[],r=0,o.label=3;case 3:return r<t.login.uris.length?((i=new y.LoginUri).match=t.login.uris[r].match,[4,this.encryptObjProperty(t.login.uris[r],i,{uri:null},n)]):[3,6];case 4:o.sent(),e.login.uris.push(i),o.label=5;case 5:return r++,[3,3];case 6:return[2];case 7:return e.secureNote=new x.SecureNote,e.secureNote.type=t.secureNote.type,[2];case 8:return e.card=new d.Card,[4,this.encryptObjProperty(t.card,e.card,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},n)];case 9:return o.sent(),[2];case 10:return e.identity=new f.Identity,[4,this.encryptObjProperty(t.identity,e.identity,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},n)];case 11:return o.sent(),[2];case 12:throw new Error("Unknown cipher type.")}}))}))},t.prototype.getCipherForUrl=function(e,t,n){return o(this,void 0,void 0,(function(){var r;return a(this,(function(i){switch(i.label){case 0:return this.sortedCiphersCache.isCached(e)?[3,2]:[4,this.getAllDecryptedForUrl(e)];case 1:if(!(r=i.sent()))return[2,null];this.sortedCiphersCache.addCiphers(e,r),i.label=2;case 2:return n?[2,this.sortedCiphersCache.getLastLaunched(e)]:t?[2,this.sortedCiphersCache.getLastUsed(e)]:[2,this.sortedCiphersCache.getNext(e)]}}))}))},r([M.sequentialize((function(){return"getAllDecrypted"})),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],t.prototype,"getAllDecrypted",null),t}();t.CipherService=F}).call(this,n(95).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequentialize=function(e){return function(t,n,r){var i=r.value,o=new Map,a=function(e){var t=o.get(e);return null!=t||(t=new Map,o.set(e,t)),t};return{value:function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var s=a(this),l=e(n),c=s.get(l);if(null!=c)return c;var p=function(){s.delete(l),0===s.size&&o.delete(t)};return c=i.apply(this,n).then((function(e){return p(),e})).catch((function(e){throw p(),e})),s.set(l,c),c}}}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(155),a=n(140),s=n(156),l=n(692),c=n(30),p="collections_",u=function(){function e(e,t,n,r){this.cryptoService=e,this.userService=t,this.storageService=n,this.i18nService=r}return e.prototype.clearCache=function(){this.decryptedCollectionCache=null},e.prototype.encrypt=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:if(null==e.organizationId)throw new Error("Collection has no organization id.");return[4,this.cryptoService.getOrgKey(e.organizationId)];case 1:if(null==(t=i.sent()))throw new Error("No key for this collection's organization.");return(n=new a.Collection).id=e.id,n.organizationId=e.organizationId,n.readOnly=e.readOnly,r=n,[4,this.cryptoService.encrypt(e.name,t)];case 2:return r.name=i.sent(),[2,n]}}))}))},e.prototype.decryptMany=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return null==e?[2,[]]:(t=[],n=[],e.forEach((function(e){n.push(e.decrypt().then((function(e){return t.push(e)})))})),[4,Promise.all(n)]);case 1:return r.sent(),[2,t.sort(c.Utils.getSortFunction(this.i18nService,"name"))]}}))}))},e.prototype.get=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getUserId()];case 1:return t=r.sent(),[4,this.storageService.get(p+t)];case 2:return null!=(n=r.sent())&&n.hasOwnProperty(e)?[2,new a.Collection(n[e])]:[2,null]}}))}))},e.prototype.getAll=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return e=i.sent(),[4,this.storageService.get(p+e)];case 2:for(r in t=i.sent(),n=[],t)t.hasOwnProperty(r)&&n.push(new a.Collection(t[r]));return[2,n]}}))}))},e.prototype.getAllDecrypted=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null!=this.decryptedCollectionCache?[2,this.decryptedCollectionCache]:[4,this.cryptoService.hasKey()];case 1:if(!n.sent())throw new Error("No key.");return[4,this.getAll()];case 2:return e=n.sent(),t=this,[4,this.decryptMany(e)];case 3:return t.decryptedCollectionCache=n.sent(),[2,this.decryptedCollectionCache]}}))}))},e.prototype.getAllNested=function(e){return void 0===e&&(e=null),r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return null!=e?[3,2]:[4,this.getAllDecrypted()];case 1:e=n.sent(),n.label=2;case 2:return t=[],e.forEach((function(e){var n=new s.CollectionView;n.id=e.id,n.organizationId=e.organizationId;var r=null!=e.name?e.name.replace(/^\/+|\/+$/g,"").split("/"):[];l.ServiceUtils.nestedTraverse(t,0,r,n,null,"/")})),[2,t]}}))}))},e.prototype.getNested=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getAllNested()];case 1:return t=n.sent(),[2,l.ServiceUtils.getTreeNodeObject(t,e)]}}))}))},e.prototype.upsert=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(p+t)];case 2:return null==(n=i.sent())&&(n={}),e instanceof o.CollectionData?n[(r=e).id]=r:e.forEach((function(e){n[e.id]=e})),[4,this.storageService.save(p+t,n)];case 3:return i.sent(),this.decryptedCollectionCache=null,[2]}}))}))},e.prototype.replace=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.getUserId()];case 1:return t=n.sent(),[4,this.storageService.save(p+t,e)];case 2:return n.sent(),this.decryptedCollectionCache=null,[2]}}))}))},e.prototype.clear=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.remove(p+e)];case 1:return t.sent(),this.decryptedCollectionCache=null,[2]}}))}))},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getUserId()];case 1:return t=r.sent(),[4,this.storageService.get(p+t)];case 2:return null==(n=r.sent())?[2]:("string"==typeof e?(e,delete n[e]):e.forEach((function(e){delete n[e]})),[4,this.storageService.save(p+t,n)]);case 3:return r.sent(),this.decryptedCollectionCache=null,[2]}}))}))},e}();t.CollectionService=u},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0});var i=n(940),o=function(){function e(){}return e.nestedTraverse=function(t,n,o,a,s,l){if(!(o.length<=n)){for(var c=n===o.length-1,p=o[n],u=0;u<t.length;u++)if(t[u].node.name===o[n])return c&&t[u].node.id!==a.id?void t.push(new i.TreeNode(a,p,s)):void e.nestedTraverse(t[u].children,n+1,o,a,t[u].node,l);if(0===t.filter((function(e){return e.node.name===p})).length){if(c)return void t.push(new i.TreeNode(a,p,s));var d=o[n]+l+o[n+1];e.nestedTraverse(t,0,r([d],o.slice(n+2)),a,s,l)}}},e.getTreeNodeObject=function(t,n){for(var r=0;r<t.length;r++){if(t[r].node.id===n)return t[r];if(null!=t[r].children){var i=e.getTreeNodeObject(t[r].children,n);if(null!==i)return i}}return null},e}();t.ServiceUtils=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.cryptoService=e}return e.prototype.attachToWindow=function(e){this.attachToGlobal(e)},e.prototype.attachToGlobal=function(e){e.bitwardenContainerService||(e.bitwardenContainerService=this)},e.prototype.getCryptoService=function(){return this.cryptoService},e}();t.ContainerService=r},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(941),l=n(277),c=n(249),p=n(942),u=n(671),d=n(105),m=n(284),h=n(70),f=n(690),v=n(30),y=n(695),g="key",x="encOrgKeys",b="encPrivateKey",S="encKey",w="keyHash",C=function(){function e(e,t,n,r,i){this.storageService=e,this.secureStorageService=t,this.cryptoFunctionService=n,this.platformUtilService=r,this.logService=i}return e.prototype.setKey=function(e){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return this.key=e,[4,this.storageService.get(h.ConstantsService.vaultTimeoutKey)];case 1:return t=r.sent(),[4,this.storageService.get(h.ConstantsService.biometricUnlockKey)];case 2:return n=r.sent(),null==t||n&&this.platformUtilService.supportsSecureStorage()?[2,this.secureStorageService.save(g,e.keyB64)]:[2]}}))}))},e.prototype.setKeyHash=function(e){return this.keyHash=e,this.storageService.save(w,e)},e.prototype.setEncKey=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==e?[2]:[4,this.storageService.save(S,e)];case 1:return t.sent(),this.encKey=null,[2]}}))}))},e.prototype.setEncPrivateKey=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==e?[2]:[4,this.storageService.save(b,e)];case 1:return t.sent(),this.privateKey=null,[2]}}))}))},e.prototype.setOrgKeys=function(e){var t={};return e.forEach((function(e){t[e.id]=e.key})),this.orgKeys=null,this.storageService.save(x,t)},e.prototype.getKey=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return null!=this.key?[2,this.key]:[4,this.secureStorageService.get(g)];case 1:return null!=(e=t.sent())&&(this.key=new m.SymmetricCryptoKey(v.Utils.fromB64ToArray(e).buffer)),[2,null==e?null:this.key]}}))}))},e.prototype.getKeyHash=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return null!=this.keyHash?[2,this.keyHash]:[4,this.storageService.get(w)];case 1:return null!=(e=t.sent())&&(this.keyHash=e),[2,null==e?null:this.keyHash]}}))}))},e.prototype.getEncKey=function(e){return void 0===e&&(e=null),o(this,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(o){switch(o.label){case 0:return null!=this.encKey?[2,this.encKey]:[4,this.storageService.get(S)];case 1:return null==(t=o.sent())?[2,null]:null!=e?[3,3]:[4,this.getKey()];case 2:e=o.sent(),o.label=3;case 3:return null==e?[2,null]:(r=new d.EncString(t)).encryptionType!==l.EncryptionType.AesCbc256_B64?[3,5]:[4,this.decryptToBytes(r,e)];case 4:return n=o.sent(),[3,9];case 5:return r.encryptionType!==l.EncryptionType.AesCbc256_HmacSha256_B64?[3,8]:[4,this.stretchKey(e)];case 6:return i=o.sent(),[4,this.decryptToBytes(r,i)];case 7:return n=o.sent(),[3,9];case 8:throw new Error("Unsupported encKey type.");case 9:return null==n?[2,null]:(this.encKey=new m.SymmetricCryptoKey(n),[2,this.encKey])}}))}))},e.prototype.getPublicKey=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return null!=this.publicKey?[2,this.publicKey]:[4,this.getPrivateKey()];case 1:return null==(e=n.sent())?[2,null]:(t=this,[4,this.cryptoFunctionService.rsaExtractPublicKey(e)]);case 2:return t.publicKey=n.sent(),[2,this.publicKey]}}))}))},e.prototype.getPrivateKey=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return null!=this.privateKey?[2,this.privateKey]:[4,this.storageService.get(b)];case 1:return null==(e=n.sent())?[2,null]:(t=this,[4,this.decryptToBytes(new d.EncString(e),null)]);case 2:return t.privateKey=n.sent(),[2,this.privateKey]}}))}))},e.prototype.getFingerprint=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return null!=t?[3,2]:[4,this.getPublicKey()];case 1:t=i.sent(),i.label=2;case 2:if(null===t)throw new Error("No public key available.");return[4,this.cryptoFunctionService.hash(t,"sha256")];case 3:return n=i.sent(),[4,this.cryptoFunctionService.hkdfExpand(n,e,32,"sha256")];case 4:return r=i.sent(),[2,this.hashPhrase(r)]}}))}))},e.prototype.getOrgKeys=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o,s,l;return a(this,(function(a){switch(a.label){case 0:return null!=this.orgKeys&&this.orgKeys.size>0?[2,this.orgKeys]:[4,this.storageService.get(x)];case 1:if(null==(e=a.sent()))return[2,null];for(i in t=new Map,n=!1,r=[],e)r.push(i);o=0,a.label=2;case 2:return o<r.length?(s=r[o],e.hasOwnProperty(s)?[4,this.rsaDecrypt(e[s])]:[3,4]):[3,5];case 3:l=a.sent(),t.set(s,new m.SymmetricCryptoKey(l)),n=!0,a.label=4;case 4:return o++,[3,2];case 5:return n&&(this.orgKeys=t),[2,this.orgKeys]}}))}))},e.prototype.getOrgKey=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return null==e?[2,null]:[4,this.getOrgKeys()];case 1:return null!=(t=n.sent())&&t.has(e)?[2,t.get(e)]:[2,null]}}))}))},e.prototype.hasKey=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.getKey()];case 1:return[2,null!=e.sent()]}}))}))},e.prototype.hasEncKey=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get(S)];case 1:return[2,null!=e.sent()]}}))}))},e.prototype.clearKey=function(){return this.key=this.legacyEtmKey=null,this.secureStorageService.remove(g)},e.prototype.clearKeyHash=function(){return this.keyHash=null,this.storageService.remove(w)},e.prototype.clearEncKey=function(e){return this.encKey=null,e?Promise.resolve():this.storageService.remove(S)},e.prototype.clearKeyPair=function(e){return this.privateKey=null,this.publicKey=null,e?Promise.resolve():this.storageService.remove(b)},e.prototype.clearOrgKeys=function(e){return this.orgKeys=null,e?Promise.resolve():this.storageService.remove(x)},e.prototype.clearPinProtectedKey=function(){return this.storageService.remove(h.ConstantsService.pinProtectedKey)},e.prototype.clearKeys=function(){return Promise.all([this.clearKey(),this.clearKeyHash(),this.clearOrgKeys(),this.clearEncKey(),this.clearKeyPair(),this.clearPinProtectedKey()])},e.prototype.toggleKey=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return[4,this.getKey()];case 1:return e=n.sent(),[4,this.storageService.get(h.ConstantsService.vaultTimeoutKey)];case 2:return t=n.sent(),[4,this.storageService.get(h.ConstantsService.biometricUnlockKey)];case 3:return n.sent()||!this.platformUtilService.supportsSecureStorage()||null==t&&0!==t?[3,5]:[4,this.clearKey()];case 4:return n.sent(),this.key=e,[2];case 5:return[4,this.setKey(e)];case 6:return n.sent(),[2]}}))}))},e.prototype.makeKey=function(e,t,n,r){return o(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:if(i=null,null!=n&&n!==c.KdfType.PBKDF2_SHA256)return[3,2];if(null==r)r=5e3;else if(r<5e3)throw new Error("PBKDF2 iteration minimum is 5000.");return[4,this.cryptoFunctionService.pbkdf2(e,t,"sha256",r)];case 1:return i=o.sent(),[3,3];case 2:throw new Error("Unknown Kdf.");case 3:return[2,new m.SymmetricCryptoKey(i)]}}))}))},e.prototype.makeKeyFromPin=function(e,t,n,r,i){return void 0===i&&(i=null),o(this,void 0,void 0,(function(){var o,s,l;return a(this,(function(a){switch(a.label){case 0:return null!=i?[3,2]:[4,this.storageService.get(h.ConstantsService.pinProtectedKey)];case 1:if(null==(o=a.sent()))throw new Error("No PIN protected key found.");i=new d.EncString(o),a.label=2;case 2:return[4,this.makePinKey(e,t,n,r)];case 3:return s=a.sent(),[4,this.decryptToBytes(i,s)];case 4:return l=a.sent(),[2,new m.SymmetricCryptoKey(l)]}}))}))},e.prototype.makeShareKey=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return[4,this.cryptoFunctionService.randomBytes(64)];case 1:return e=n.sent(),[4,this.getPublicKey()];case 2:return t=n.sent(),[4,this.rsaEncrypt(e,t)];case 3:return[2,[n.sent(),new m.SymmetricCryptoKey(e)]]}}))}))},e.prototype.makeKeyPair=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.cryptoFunctionService.rsaGenerateKeyPair(2048)];case 1:return t=i.sent(),n=v.Utils.fromBufferToB64(t[0]),[4,this.encrypt(t[1],e)];case 2:return r=i.sent(),[2,[n,r]]}}))}))},e.prototype.makePinKey=function(e,t,n,r){return o(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:return[4,this.makeKey(e,t,n,r)];case 1:return i=o.sent(),[4,this.stretchKey(i)];case 2:return[2,o.sent()]}}))}))},e.prototype.makeSendKey=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,this.cryptoFunctionService.hkdf(e,"bitwarden-send","send",64,"sha256")];case 1:return t=n.sent(),[2,new m.SymmetricCryptoKey(t)]}}))}))},e.prototype.hashPassword=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return null!=t?[3,2]:[4,this.getKey()];case 1:t=r.sent(),r.label=2;case 2:if(null==e||null==t)throw new Error("Invalid parameters.");return[4,this.cryptoFunctionService.pbkdf2(t.key,e,"sha256",1)];case 3:return n=r.sent(),[2,v.Utils.fromBufferToB64(n)]}}))}))},e.prototype.makeEncKey=function(e){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.getKeyForEncryption(e)];case 1:return t=r.sent(),[4,this.cryptoFunctionService.randomBytes(64)];case 2:return n=r.sent(),[2,this.buildEncKey(t,n)]}}))}))},e.prototype.remakeEncKey=function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return null!=t?[3,2]:[4,this.getEncKey()];case 1:t=n.sent(),n.label=2;case 2:return[2,this.buildEncKey(e,t.key)]}}))}))},e.prototype.encrypt=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return null==e?[2,Promise.resolve(null)]:(n="string"==typeof e?v.Utils.fromUtf8ToArray(e).buffer:e,[4,this.aesEncrypt(n,t)]);case 1:return r=a.sent(),i=v.Utils.fromBufferToB64(r.iv),o=v.Utils.fromBufferToB64(r.data),s=null!=r.mac?v.Utils.fromBufferToB64(r.mac):null,[2,new d.EncString(r.key.encType,o,i,s)]}}))}))},e.prototype.encryptToBytes=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.aesEncrypt(e,t)];case 1:return n=o.sent(),r=0,null!=n.mac&&(r=n.mac.byteLength),(i=new Uint8Array(1+n.iv.byteLength+r+n.data.byteLength)).set([n.key.encType]),i.set(new Uint8Array(n.iv),1),null!=n.mac&&i.set(new Uint8Array(n.mac),1+n.iv.byteLength),i.set(new Uint8Array(n.data),1+n.iv.byteLength+r),[2,new p.EncArrayBuffer(i.buffer)]}}))}))},e.prototype.rsaEncrypt=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return null!=t?[3,2]:[4,this.getPublicKey()];case 1:t=r.sent(),r.label=2;case 2:if(null==t)throw new Error("Public key unavailable.");return[4,this.cryptoFunctionService.rsaEncrypt(e,t,"sha1")];case 3:return n=r.sent(),[2,new d.EncString(l.EncryptionType.Rsa2048_OaepSha1_B64,v.Utils.fromBufferToB64(n))]}}))}))},e.prototype.rsaDecrypt=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:if(t=e.split("."),n=null,1===t.length)n=l.EncryptionType.Rsa2048_OaepSha256_B64,r=[t[0]];else if(2===t.length)try{n=parseInt(t[0],null),r=t[1].split("|")}catch(c){}switch(n){case l.EncryptionType.Rsa2048_OaepSha256_B64:case l.EncryptionType.Rsa2048_OaepSha1_B64:case l.EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:case l.EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:break;default:throw new Error("encType unavailable.")}if(null==r||r.length<=0)throw new Error("encPieces unavailable.");return i=v.Utils.fromB64ToArray(r[0]).buffer,[4,this.getPrivateKey()];case 1:if(null==(o=a.sent()))throw new Error("No private key.");switch(s="sha1",n){case l.EncryptionType.Rsa2048_OaepSha256_B64:case l.EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:s="sha256";break;case l.EncryptionType.Rsa2048_OaepSha1_B64:case l.EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:break;default:throw new Error("encType unavailable.")}return[2,this.cryptoFunctionService.rsaDecrypt(i,o,s)]}}))}))},e.prototype.decryptToBytes=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o;return a(this,(function(a){switch(a.label){case 0:return n=v.Utils.fromB64ToArray(e.iv).buffer,r=v.Utils.fromB64ToArray(e.data).buffer,i=e.mac?v.Utils.fromB64ToArray(e.mac).buffer:null,[4,this.aesDecryptToBytes(e.encryptionType,r,n,i,t)];case 1:return null==(o=a.sent())?[2,null]:[2,o]}}))}))},e.prototype.decryptToUtf8=function(e,t){return o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,this.aesDecryptToUtf8(e.encryptionType,e.data,e.iv,e.mac,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.decryptFromBytes=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:if(null==e)throw new Error("no encBuf.");switch(n=new Uint8Array(e),r=n[0],i=null,o=null,s=null,r){case l.EncryptionType.AesCbc128_HmacSha256_B64:case l.EncryptionType.AesCbc256_HmacSha256_B64:if(n.length<=49)return[2,null];o=n.slice(1,17),s=n.slice(17,49),i=n.slice(49);break;case l.EncryptionType.AesCbc256_B64:if(n.length<=17)return[2,null];o=n.slice(1,17),i=n.slice(17);break;default:return[2,null]}return[4,this.aesDecryptToBytes(r,i.buffer,o.buffer,null!=s?s.buffer:null,t)];case 1:return[2,a.sent()]}}))}))},e.prototype.randomNumber=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s,l,c,p,u;return a(this,(function(a){switch(a.label){case 0:if(n=0,r=t-e+1,(i=Math.ceil(Math.log2(r)))>53)throw new Error("We cannot generate numbers larger than 53 bits.");return o=Math.ceil(i/8),s=Math.pow(2,i)-1,c=Uint8Array.bind,[4,this.cryptoFunctionService.randomBytes(o)];case 1:for(l=new(c.apply(Uint8Array,[void 0,a.sent()])),p=8*(o-1),u=0;u<o;u++)n+=l[u]*Math.pow(2,p),p-=8;return(n&=s)>=r?[2,this.randomNumber(e,t)]:[2,e+n]}}))}))},e.prototype.aesEncrypt=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s,l;return a(this,(function(a){switch(a.label){case 0:return n=new u.EncryptedObject,r=n,[4,this.getKeyForEncryption(t)];case 1:return r.key=a.sent(),i=n,[4,this.cryptoFunctionService.randomBytes(16)];case 2:return i.iv=a.sent(),o=n,[4,this.cryptoFunctionService.aesEncrypt(e,n.iv,n.key.encKey)];case 3:return o.data=a.sent(),null==n.key.macKey?[3,5]:((s=new Uint8Array(n.iv.byteLength+n.data.byteLength)).set(new Uint8Array(n.iv),0),s.set(new Uint8Array(n.data),n.iv.byteLength),l=n,[4,this.cryptoFunctionService.hmac(s.buffer,n.key.macKey,"sha256")]);case 4:l.mac=a.sent(),a.label=5;case 5:return[2,n]}}))}))},e.prototype.aesDecryptToUtf8=function(e,t,n,r,i){return o(this,void 0,void 0,(function(){var o,s,l,c;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKeyForEncryption(i)];case 1:return o=a.sent(),null!=(s=this.resolveLegacyKey(e,o)).macKey&&null==r?(this.logService.error("mac required."),[2,null]):s.encType!==e?(this.logService.error("encType unavailable."),[2,null]):null==(l=this.cryptoFunctionService.aesDecryptFastParameters(t,n,r,s)).macKey||null==l.mac?[3,4]:[4,this.cryptoFunctionService.hmacFast(l.macData,l.macKey,"sha256")];case 2:return c=a.sent(),[4,this.cryptoFunctionService.compareFast(l.mac,c)];case 3:if(!a.sent())return this.logService.error("mac failed."),[2,null];a.label=4;case 4:return[2,this.cryptoFunctionService.aesDecryptFast(l)]}}))}))},e.prototype.aesDecryptToBytes=function(e,t,n,r,i){return o(this,void 0,void 0,(function(){var o,s,l,c;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKeyForEncryption(i)];case 1:return o=a.sent(),null!=(s=this.resolveLegacyKey(e,o)).macKey&&null==r?[2,null]:s.encType!==e?[2,null]:null==s.macKey||null==r?[3,4]:((l=new Uint8Array(n.byteLength+t.byteLength)).set(new Uint8Array(n),0),l.set(new Uint8Array(t),n.byteLength),[4,this.cryptoFunctionService.hmac(l.buffer,s.macKey,"sha256")]);case 2:return null===(c=a.sent())?[2,null]:[4,this.cryptoFunctionService.compare(r,c)];case 3:if(!a.sent())return this.logService.error("mac failed."),[2,null];a.label=4;case 4:return[4,this.cryptoFunctionService.aesDecrypt(t,n,s.encKey)];case 5:return[2,a.sent()]}}))}))},e.prototype.getKeyForEncryption=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return null!=e?[2,e]:[4,this.getEncKey()];case 1:return null!=(t=n.sent())?[2,t]:[4,this.getKey()];case 2:return[2,n.sent()]}}))}))},e.prototype.resolveLegacyKey=function(e,t){return e===l.EncryptionType.AesCbc128_HmacSha256_B64&&t.encType===l.EncryptionType.AesCbc256_B64?(null==this.legacyEtmKey&&(this.legacyEtmKey=new m.SymmetricCryptoKey(t.key,l.EncryptionType.AesCbc128_HmacSha256_B64)),this.legacyEtmKey):t},e.prototype.stretchKey=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=new Uint8Array(64),[4,this.cryptoFunctionService.hkdfExpand(e.key,"enc",32,"sha256")];case 1:return n=i.sent(),[4,this.cryptoFunctionService.hkdfExpand(e.key,"mac",32,"sha256")];case 2:return r=i.sent(),t.set(new Uint8Array(n)),t.set(new Uint8Array(r),32),[2,new m.SymmetricCryptoKey(t.buffer)]}}))}))},e.prototype.hashPhrase=function(e,t){return void 0===t&&(t=64),o(this,void 0,void 0,(function(){var n,r,i,o,l,c,p;return a(this,(function(a){if(n=Math.log(y.EEFLongWordList.length)/Math.log(2),r=Math.ceil(t/n),i=Array.from(new Uint8Array(e)),o=4*i.length,r*n>o)throw new Error("Output entropy of hash function is too small");for(l=[],c=s.fromArray(i,256);r--;)p=c.mod(y.EEFLongWordList.length),c=c.divide(y.EEFLongWordList.length),l.push(y.EEFLongWordList[p]);return[2,l]}))}))},e.prototype.buildEncKey=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return n=null,32!==e.key.byteLength?[3,3]:[4,this.stretchKey(e)];case 1:return r=i.sent(),[4,this.encrypt(t,r)];case 2:return n=i.sent(),[3,6];case 3:return 64!==e.key.byteLength?[3,5]:[4,this.encrypt(t,e)];case 4:return n=i.sent(),[3,6];case 5:throw new Error("Invalid key size.");case 6:return[2,[new m.SymmetricCryptoKey(t),n]]}}))}))},r([f.sequentialize((function(){return"getEncKey"})),i("design:type",Function),i("design:paramtypes",[m.SymmetricCryptoKey]),i("design:returntype",Promise)],e.prototype,"getEncKey",null),r([f.sequentialize((function(){return"getOrgKeys"})),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],e.prototype,"getOrgKeys",null),e}();t.CryptoService=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EEFLongWordList=["abacus","abdomen","abdominal","abide","abiding","ability","ablaze","able","abnormal","abrasion","abrasive","abreast","abridge","abroad","abruptly","absence","absentee","absently","absinthe","absolute","absolve","abstain","abstract","absurd","accent","acclaim","acclimate","accompany","account","accuracy","accurate","accustom","acetone","achiness","aching","acid","acorn","acquaint","acquire","acre","acrobat","acronym","acting","action","activate","activator","active","activism","activist","activity","actress","acts","acutely","acuteness","aeration","aerobics","aerosol","aerospace","afar","affair","affected","affecting","affection","affidavit","affiliate","affirm","affix","afflicted","affluent","afford","affront","aflame","afloat","aflutter","afoot","afraid","afterglow","afterlife","aftermath","aftermost","afternoon","aged","ageless","agency","agenda","agent","aggregate","aghast","agile","agility","aging","agnostic","agonize","agonizing","agony","agreeable","agreeably","agreed","agreeing","agreement","aground","ahead","ahoy","aide","aids","aim","ajar","alabaster","alarm","albatross","album","alfalfa","algebra","algorithm","alias","alibi","alienable","alienate","aliens","alike","alive","alkaline","alkalize","almanac","almighty","almost","aloe","aloft","aloha","alone","alongside","aloof","alphabet","alright","although","altitude","alto","aluminum","alumni","always","amaretto","amaze","amazingly","amber","ambiance","ambiguity","ambiguous","ambition","ambitious","ambulance","ambush","amendable","amendment","amends","amenity","amiable","amicably","amid","amigo","amino","amiss","ammonia","ammonium","amnesty","amniotic","among","amount","amperage","ample","amplifier","amplify","amply","amuck","amulet","amusable","amused","amusement","amuser","amusing","anaconda","anaerobic","anagram","anatomist","anatomy","anchor","anchovy","ancient","android","anemia","anemic","aneurism","anew","angelfish","angelic","anger","angled","angler","angles","angling","angrily","angriness","anguished","angular","animal","animate","animating","animation","animator","anime","animosity","ankle","annex","annotate","announcer","annoying","annually","annuity","anointer","another","answering","antacid","antarctic","anteater","antelope","antennae","anthem","anthill","anthology","antibody","antics","antidote","antihero","antiquely","antiques","antiquity","antirust","antitoxic","antitrust","antiviral","antivirus","antler","antonym","antsy","anvil","anybody","anyhow","anymore","anyone","anyplace","anything","anytime","anyway","anywhere","aorta","apache","apostle","appealing","appear","appease","appeasing","appendage","appendix","appetite","appetizer","applaud","applause","apple","appliance","applicant","applied","apply","appointee","appraisal","appraiser","apprehend","approach","approval","approve","apricot","april","apron","aptitude","aptly","aqua","aqueduct","arbitrary","arbitrate","ardently","area","arena","arguable","arguably","argue","arise","armadillo","armband","armchair","armed","armful","armhole","arming","armless","armoire","armored","armory","armrest","army","aroma","arose","around","arousal","arrange","array","arrest","arrival","arrive","arrogance","arrogant","arson","art","ascend","ascension","ascent","ascertain","ashamed","ashen","ashes","ashy","aside","askew","asleep","asparagus","aspect","aspirate","aspire","aspirin","astonish","astound","astride","astrology","astronaut","astronomy","astute","atlantic","atlas","atom","atonable","atop","atrium","atrocious","atrophy","attach","attain","attempt","attendant","attendee","attention","attentive","attest","attic","attire","attitude","attractor","attribute","atypical","auction","audacious","audacity","audible","audibly","audience","audio","audition","augmented","august","authentic","author","autism","autistic","autograph","automaker","automated","automatic","autopilot","available","avalanche","avatar","avenge","avenging","avenue","average","aversion","avert","aviation","aviator","avid","avoid","await","awaken","award","aware","awhile","awkward","awning","awoke","awry","axis","babble","babbling","babied","baboon","backache","backboard","backboned","backdrop","backed","backer","backfield","backfire","backhand","backing","backlands","backlash","backless","backlight","backlit","backlog","backpack","backpedal","backrest","backroom","backshift","backside","backslid","backspace","backspin","backstab","backstage","backtalk","backtrack","backup","backward","backwash","backwater","backyard","bacon","bacteria","bacterium","badass","badge","badland","badly","badness","baffle","baffling","bagel","bagful","baggage","bagged","baggie","bagginess","bagging","baggy","bagpipe","baguette","baked","bakery","bakeshop","baking","balance","balancing","balcony","balmy","balsamic","bamboo","banana","banish","banister","banjo","bankable","bankbook","banked","banker","banking","banknote","bankroll","banner","bannister","banshee","banter","barbecue","barbed","barbell","barber","barcode","barge","bargraph","barista","baritone","barley","barmaid","barman","barn","barometer","barrack","barracuda","barrel","barrette","barricade","barrier","barstool","bartender","barterer","bash","basically","basics","basil","basin","basis","basket","batboy","batch","bath","baton","bats","battalion","battered","battering","battery","batting","battle","bauble","bazooka","blabber","bladder","blade","blah","blame","blaming","blanching","blandness","blank","blaspheme","blasphemy","blast","blatancy","blatantly","blazer","blazing","bleach","bleak","bleep","blemish","blend","bless","blighted","blimp","bling","blinked","blinker","blinking","blinks","blip","blissful","blitz","blizzard","bloated","bloating","blob","blog","bloomers","blooming","blooper","blot","blouse","blubber","bluff","bluish","blunderer","blunt","blurb","blurred","blurry","blurt","blush","blustery","boaster","boastful","boasting","boat","bobbed","bobbing","bobble","bobcat","bobsled","bobtail","bodacious","body","bogged","boggle","bogus","boil","bok","bolster","bolt","bonanza","bonded","bonding","bondless","boned","bonehead","boneless","bonelike","boney","bonfire","bonnet","bonsai","bonus","bony","boogeyman","boogieman","book","boondocks","booted","booth","bootie","booting","bootlace","bootleg","boots","boozy","borax","boring","borough","borrower","borrowing","boss","botanical","botanist","botany","botch","both","bottle","bottling","bottom","bounce","bouncing","bouncy","bounding","boundless","bountiful","bovine","boxcar","boxer","boxing","boxlike","boxy","breach","breath","breeches","breeching","breeder","breeding","breeze","breezy","brethren","brewery","brewing","briar","bribe","brick","bride","bridged","brigade","bright","brilliant","brim","bring","brink","brisket","briskly","briskness","bristle","brittle","broadband","broadcast","broaden","broadly","broadness","broadside","broadways","broiler","broiling","broken","broker","bronchial","bronco","bronze","bronzing","brook","broom","brought","browbeat","brownnose","browse","browsing","bruising","brunch","brunette","brunt","brush","brussels","brute","brutishly","bubble","bubbling","bubbly","buccaneer","bucked","bucket","buckle","buckshot","buckskin","bucktooth","buckwheat","buddhism","buddhist","budding","buddy","budget","buffalo","buffed","buffer","buffing","buffoon","buggy","bulb","bulge","bulginess","bulgur","bulk","bulldog","bulldozer","bullfight","bullfrog","bullhorn","bullion","bullish","bullpen","bullring","bullseye","bullwhip","bully","bunch","bundle","bungee","bunion","bunkbed","bunkhouse","bunkmate","bunny","bunt","busboy","bush","busily","busload","bust","busybody","buzz","cabana","cabbage","cabbie","cabdriver","cable","caboose","cache","cackle","cacti","cactus","caddie","caddy","cadet","cadillac","cadmium","cage","cahoots","cake","calamari","calamity","calcium","calculate","calculus","caliber","calibrate","calm","caloric","calorie","calzone","camcorder","cameo","camera","camisole","camper","campfire","camping","campsite","campus","canal","canary","cancel","candied","candle","candy","cane","canine","canister","cannabis","canned","canning","cannon","cannot","canola","canon","canopener","canopy","canteen","canyon","capable","capably","capacity","cape","capillary","capital","capitol","capped","capricorn","capsize","capsule","caption","captivate","captive","captivity","capture","caramel","carat","caravan","carbon","cardboard","carded","cardiac","cardigan","cardinal","cardstock","carefully","caregiver","careless","caress","caretaker","cargo","caring","carless","carload","carmaker","carnage","carnation","carnival","carnivore","carol","carpenter","carpentry","carpool","carport","carried","carrot","carrousel","carry","cartel","cartload","carton","cartoon","cartridge","cartwheel","carve","carving","carwash","cascade","case","cash","casing","casino","casket","cassette","casually","casualty","catacomb","catalog","catalyst","catalyze","catapult","cataract","catatonic","catcall","catchable","catcher","catching","catchy","caterer","catering","catfight","catfish","cathedral","cathouse","catlike","catnap","catnip","catsup","cattail","cattishly","cattle","catty","catwalk","caucasian","caucus","causal","causation","cause","causing","cauterize","caution","cautious","cavalier","cavalry","caviar","cavity","cedar","celery","celestial","celibacy","celibate","celtic","cement","census","ceramics","ceremony","certainly","certainty","certified","certify","cesarean","cesspool","chafe","chaffing","chain","chair","chalice","challenge","chamber","chamomile","champion","chance","change","channel","chant","chaos","chaperone","chaplain","chapped","chaps","chapter","character","charbroil","charcoal","charger","charging","chariot","charity","charm","charred","charter","charting","chase","chasing","chaste","chastise","chastity","chatroom","chatter","chatting","chatty","cheating","cheddar","cheek","cheer","cheese","cheesy","chef","chemicals","chemist","chemo","cherisher","cherub","chess","chest","chevron","chevy","chewable","chewer","chewing","chewy","chief","chihuahua","childcare","childhood","childish","childless","childlike","chili","chill","chimp","chip","chirping","chirpy","chitchat","chivalry","chive","chloride","chlorine","choice","chokehold","choking","chomp","chooser","choosing","choosy","chop","chosen","chowder","chowtime","chrome","chubby","chuck","chug","chummy","chump","chunk","churn","chute","cider","cilantro","cinch","cinema","cinnamon","circle","circling","circular","circulate","circus","citable","citadel","citation","citizen","citric","citrus","city","civic","civil","clad","claim","clambake","clammy","clamor","clamp","clamshell","clang","clanking","clapped","clapper","clapping","clarify","clarinet","clarity","clash","clasp","class","clatter","clause","clavicle","claw","clay","clean","clear","cleat","cleaver","cleft","clench","clergyman","clerical","clerk","clever","clicker","client","climate","climatic","cling","clinic","clinking","clip","clique","cloak","clobber","clock","clone","cloning","closable","closure","clothes","clothing","cloud","clover","clubbed","clubbing","clubhouse","clump","clumsily","clumsy","clunky","clustered","clutch","clutter","coach","coagulant","coastal","coaster","coasting","coastland","coastline","coat","coauthor","cobalt","cobbler","cobweb","cocoa","coconut","cod","coeditor","coerce","coexist","coffee","cofounder","cognition","cognitive","cogwheel","coherence","coherent","cohesive","coil","coke","cola","cold","coleslaw","coliseum","collage","collapse","collar","collected","collector","collide","collie","collision","colonial","colonist","colonize","colony","colossal","colt","coma","come","comfort","comfy","comic","coming","comma","commence","commend","comment","commerce","commode","commodity","commodore","common","commotion","commute","commuting","compacted","compacter","compactly","compactor","companion","company","compare","compel","compile","comply","component","composed","composer","composite","compost","composure","compound","compress","comprised","computer","computing","comrade","concave","conceal","conceded","concept","concerned","concert","conch","concierge","concise","conclude","concrete","concur","condense","condiment","condition","condone","conducive","conductor","conduit","cone","confess","confetti","confidant","confident","confider","confiding","configure","confined","confining","confirm","conflict","conform","confound","confront","confused","confusing","confusion","congenial","congested","congrats","congress","conical","conjoined","conjure","conjuror","connected","connector","consensus","consent","console","consoling","consonant","constable","constant","constrain","constrict","construct","consult","consumer","consuming","contact","container","contempt","contend","contented","contently","contents","contest","context","contort","contour","contrite","control","contusion","convene","convent","copartner","cope","copied","copier","copilot","coping","copious","copper","copy","coral","cork","cornball","cornbread","corncob","cornea","corned","corner","cornfield","cornflake","cornhusk","cornmeal","cornstalk","corny","coronary","coroner","corporal","corporate","corral","correct","corridor","corrode","corroding","corrosive","corsage","corset","cortex","cosigner","cosmetics","cosmic","cosmos","cosponsor","cost","cottage","cotton","couch","cough","could","countable","countdown","counting","countless","country","county","courier","covenant","cover","coveted","coveting","coyness","cozily","coziness","cozy","crabbing","crabgrass","crablike","crabmeat","cradle","cradling","crafter","craftily","craftsman","craftwork","crafty","cramp","cranberry","crane","cranial","cranium","crank","crate","crave","craving","crawfish","crawlers","crawling","crayfish","crayon","crazed","crazily","craziness","crazy","creamed","creamer","creamlike","crease","creasing","creatable","create","creation","creative","creature","credible","credibly","credit","creed","creme","creole","crepe","crept","crescent","crested","cresting","crestless","crevice","crewless","crewman","crewmate","crib","cricket","cried","crier","crimp","crimson","cringe","cringing","crinkle","crinkly","crisped","crisping","crisply","crispness","crispy","criteria","critter","croak","crock","crook","croon","crop","cross","crouch","crouton","crowbar","crowd","crown","crucial","crudely","crudeness","cruelly","cruelness","cruelty","crumb","crummiest","crummy","crumpet","crumpled","cruncher","crunching","crunchy","crusader","crushable","crushed","crusher","crushing","crust","crux","crying","cryptic","crystal","cubbyhole","cube","cubical","cubicle","cucumber","cuddle","cuddly","cufflink","culinary","culminate","culpable","culprit","cultivate","cultural","culture","cupbearer","cupcake","cupid","cupped","cupping","curable","curator","curdle","cure","curfew","curing","curled","curler","curliness","curling","curly","curry","curse","cursive","cursor","curtain","curtly","curtsy","curvature","curve","curvy","cushy","cusp","cussed","custard","custodian","custody","customary","customer","customize","customs","cut","cycle","cyclic","cycling","cyclist","cylinder","cymbal","cytoplasm","cytoplast","dab","dad","daffodil","dagger","daily","daintily","dainty","dairy","daisy","dallying","dance","dancing","dandelion","dander","dandruff","dandy","danger","dangle","dangling","daredevil","dares","daringly","darkened","darkening","darkish","darkness","darkroom","darling","darn","dart","darwinism","dash","dastardly","data","datebook","dating","daughter","daunting","dawdler","dawn","daybed","daybreak","daycare","daydream","daylight","daylong","dayroom","daytime","dazzler","dazzling","deacon","deafening","deafness","dealer","dealing","dealmaker","dealt","dean","debatable","debate","debating","debit","debrief","debtless","debtor","debug","debunk","decade","decaf","decal","decathlon","decay","deceased","deceit","deceiver","deceiving","december","decency","decent","deception","deceptive","decibel","decidable","decimal","decimeter","decipher","deck","declared","decline","decode","decompose","decorated","decorator","decoy","decrease","decree","dedicate","dedicator","deduce","deduct","deed","deem","deepen","deeply","deepness","deface","defacing","defame","default","defeat","defection","defective","defendant","defender","defense","defensive","deferral","deferred","defiance","defiant","defile","defiling","define","definite","deflate","deflation","deflator","deflected","deflector","defog","deforest","defraud","defrost","deftly","defuse","defy","degraded","degrading","degrease","degree","dehydrate","deity","dejected","delay","delegate","delegator","delete","deletion","delicacy","delicate","delicious","delighted","delirious","delirium","deliverer","delivery","delouse","delta","deluge","delusion","deluxe","demanding","demeaning","demeanor","demise","democracy","democrat","demote","demotion","demystify","denatured","deniable","denial","denim","denote","dense","density","dental","dentist","denture","deny","deodorant","deodorize","departed","departure","depict","deplete","depletion","deplored","deploy","deport","depose","depraved","depravity","deprecate","depress","deprive","depth","deputize","deputy","derail","deranged","derby","derived","desecrate","deserve","deserving","designate","designed","designer","designing","deskbound","desktop","deskwork","desolate","despair","despise","despite","destiny","destitute","destruct","detached","detail","detection","detective","detector","detention","detergent","detest","detonate","detonator","detoxify","detract","deuce","devalue","deviancy","deviant","deviate","deviation","deviator","device","devious","devotedly","devotee","devotion","devourer","devouring","devoutly","dexterity","dexterous","diabetes","diabetic","diabolic","diagnoses","diagnosis","diagram","dial","diameter","diaper","diaphragm","diary","dice","dicing","dictate","dictation","dictator","difficult","diffused","diffuser","diffusion","diffusive","dig","dilation","diligence","diligent","dill","dilute","dime","diminish","dimly","dimmed","dimmer","dimness","dimple","diner","dingbat","dinghy","dinginess","dingo","dingy","dining","dinner","diocese","dioxide","diploma","dipped","dipper","dipping","directed","direction","directive","directly","directory","direness","dirtiness","disabled","disagree","disallow","disarm","disarray","disaster","disband","disbelief","disburse","discard","discern","discharge","disclose","discolor","discount","discourse","discover","discuss","disdain","disengage","disfigure","disgrace","dish","disinfect","disjoin","disk","dislike","disliking","dislocate","dislodge","disloyal","dismantle","dismay","dismiss","dismount","disobey","disorder","disown","disparate","disparity","dispatch","dispense","dispersal","dispersed","disperser","displace","display","displease","disposal","dispose","disprove","dispute","disregard","disrupt","dissuade","distance","distant","distaste","distill","distinct","distort","distract","distress","district","distrust","ditch","ditto","ditzy","dividable","divided","dividend","dividers","dividing","divinely","diving","divinity","divisible","divisibly","division","divisive","divorcee","dizziness","dizzy","doable","docile","dock","doctrine","document","dodge","dodgy","doily","doing","dole","dollar","dollhouse","dollop","dolly","dolphin","domain","domelike","domestic","dominion","dominoes","donated","donation","donator","donor","donut","doodle","doorbell","doorframe","doorknob","doorman","doormat","doornail","doorpost","doorstep","doorstop","doorway","doozy","dork","dormitory","dorsal","dosage","dose","dotted","doubling","douche","dove","down","dowry","doze","drab","dragging","dragonfly","dragonish","dragster","drainable","drainage","drained","drainer","drainpipe","dramatic","dramatize","drank","drapery","drastic","draw","dreaded","dreadful","dreadlock","dreamboat","dreamily","dreamland","dreamless","dreamlike","dreamt","dreamy","drearily","dreary","drench","dress","drew","dribble","dried","drier","drift","driller","drilling","drinkable","drinking","dripping","drippy","drivable","driven","driver","driveway","driving","drizzle","drizzly","drone","drool","droop","drop-down","dropbox","dropkick","droplet","dropout","dropper","drove","drown","drowsily","drudge","drum","dry","dubbed","dubiously","duchess","duckbill","ducking","duckling","ducktail","ducky","duct","dude","duffel","dugout","duh","duke","duller","dullness","duly","dumping","dumpling","dumpster","duo","dupe","duplex","duplicate","duplicity","durable","durably","duration","duress","during","dusk","dust","dutiful","duty","duvet","dwarf","dweeb","dwelled","dweller","dwelling","dwindle","dwindling","dynamic","dynamite","dynasty","dyslexia","dyslexic","each","eagle","earache","eardrum","earflap","earful","earlobe","early","earmark","earmuff","earphone","earpiece","earplugs","earring","earshot","earthen","earthlike","earthling","earthly","earthworm","earthy","earwig","easeful","easel","easiest","easily","easiness","easing","eastbound","eastcoast","easter","eastward","eatable","eaten","eatery","eating","eats","ebay","ebony","ebook","ecard","eccentric","echo","eclair","eclipse","ecologist","ecology","economic","economist","economy","ecosphere","ecosystem","edge","edginess","edging","edgy","edition","editor","educated","education","educator","eel","effective","effects","efficient","effort","eggbeater","egging","eggnog","eggplant","eggshell","egomaniac","egotism","egotistic","either","eject","elaborate","elastic","elated","elbow","eldercare","elderly","eldest","electable","election","elective","elephant","elevate","elevating","elevation","elevator","eleven","elf","eligible","eligibly","eliminate","elite","elitism","elixir","elk","ellipse","elliptic","elm","elongated","elope","eloquence","eloquent","elsewhere","elude","elusive","elves","email","embargo","embark","embassy","embattled","embellish","ember","embezzle","emblaze","emblem","embody","embolism","emboss","embroider","emcee","emerald","emergency","emission","emit","emote","emoticon","emotion","empathic","empathy","emperor","emphases","emphasis","emphasize","emphatic","empirical","employed","employee","employer","emporium","empower","emptier","emptiness","empty","emu","enable","enactment","enamel","enchanted","enchilada","encircle","enclose","enclosure","encode","encore","encounter","encourage","encroach","encrust","encrypt","endanger","endeared","endearing","ended","ending","endless","endnote","endocrine","endorphin","endorse","endowment","endpoint","endurable","endurance","enduring","energetic","energize","energy","enforced","enforcer","engaged","engaging","engine","engorge","engraved","engraver","engraving","engross","engulf","enhance","enigmatic","enjoyable","enjoyably","enjoyer","enjoying","enjoyment","enlarged","enlarging","enlighten","enlisted","enquirer","enrage","enrich","enroll","enslave","ensnare","ensure","entail","entangled","entering","entertain","enticing","entire","entitle","entity","entomb","entourage","entrap","entree","entrench","entrust","entryway","entwine","enunciate","envelope","enviable","enviably","envious","envision","envoy","envy","enzyme","epic","epidemic","epidermal","epidermis","epidural","epilepsy","epileptic","epilogue","epiphany","episode","equal","equate","equation","equator","equinox","equipment","equity","equivocal","eradicate","erasable","erased","eraser","erasure","ergonomic","errand","errant","erratic","error","erupt","escalate","escalator","escapable","escapade","escapist","escargot","eskimo","esophagus","espionage","espresso","esquire","essay","essence","essential","establish","estate","esteemed","estimate","estimator","estranged","estrogen","etching","eternal","eternity","ethanol","ether","ethically","ethics","euphemism","evacuate","evacuee","evade","evaluate","evaluator","evaporate","evasion","evasive","even","everglade","evergreen","everybody","everyday","everyone","evict","evidence","evident","evil","evoke","evolution","evolve","exact","exalted","example","excavate","excavator","exceeding","exception","excess","exchange","excitable","exciting","exclaim","exclude","excluding","exclusion","exclusive","excretion","excretory","excursion","excusable","excusably","excuse","exemplary","exemplify","exemption","exerciser","exert","exes","exfoliate","exhale","exhaust","exhume","exile","existing","exit","exodus","exonerate","exorcism","exorcist","expand","expanse","expansion","expansive","expectant","expedited","expediter","expel","expend","expenses","expensive","expert","expire","expiring","explain","expletive","explicit","explode","exploit","explore","exploring","exponent","exporter","exposable","expose","exposure","express","expulsion","exquisite","extended","extending","extent","extenuate","exterior","external","extinct","extortion","extradite","extras","extrovert","extrude","extruding","exuberant","fable","fabric","fabulous","facebook","facecloth","facedown","faceless","facelift","faceplate","faceted","facial","facility","facing","facsimile","faction","factoid","factor","factsheet","factual","faculty","fade","fading","failing","falcon","fall","false","falsify","fame","familiar","family","famine","famished","fanatic","fancied","fanciness","fancy","fanfare","fang","fanning","fantasize","fantastic","fantasy","fascism","fastball","faster","fasting","fastness","faucet","favorable","favorably","favored","favoring","favorite","fax","feast","federal","fedora","feeble","feed","feel","feisty","feline","felt-tip","feminine","feminism","feminist","feminize","femur","fence","fencing","fender","ferment","fernlike","ferocious","ferocity","ferret","ferris","ferry","fervor","fester","festival","festive","festivity","fetal","fetch","fever","fiber","fiction","fiddle","fiddling","fidelity","fidgeting","fidgety","fifteen","fifth","fiftieth","fifty","figment","figure","figurine","filing","filled","filler","filling","film","filter","filth","filtrate","finale","finalist","finalize","finally","finance","financial","finch","fineness","finer","finicky","finished","finisher","finishing","finite","finless","finlike","fiscally","fit","five","flaccid","flagman","flagpole","flagship","flagstick","flagstone","flail","flakily","flaky","flame","flammable","flanked","flanking","flannels","flap","flaring","flashback","flashbulb","flashcard","flashily","flashing","flashy","flask","flatbed","flatfoot","flatly","flatness","flatten","flattered","flatterer","flattery","flattop","flatware","flatworm","flavored","flavorful","flavoring","flaxseed","fled","fleshed","fleshy","flick","flier","flight","flinch","fling","flint","flip","flirt","float","flock","flogging","flop","floral","florist","floss","flounder","flyable","flyaway","flyer","flying","flyover","flypaper","foam","foe","fog","foil","folic","folk","follicle","follow","fondling","fondly","fondness","fondue","font","food","fool","footage","football","footbath","footboard","footer","footgear","foothill","foothold","footing","footless","footman","footnote","footpad","footpath","footprint","footrest","footsie","footsore","footwear","footwork","fossil","foster","founder","founding","fountain","fox","foyer","fraction","fracture","fragile","fragility","fragment","fragrance","fragrant","frail","frame","framing","frantic","fraternal","frayed","fraying","frays","freckled","freckles","freebase","freebee","freebie","freedom","freefall","freehand","freeing","freeload","freely","freemason","freeness","freestyle","freeware","freeway","freewill","freezable","freezing","freight","french","frenzied","frenzy","frequency","frequent","fresh","fretful","fretted","friction","friday","fridge","fried","friend","frighten","frightful","frigidity","frigidly","frill","fringe","frisbee","frisk","fritter","frivolous","frolic","from","front","frostbite","frosted","frostily","frosting","frostlike","frosty","froth","frown","frozen","fructose","frugality","frugally","fruit","frustrate","frying","gab","gaffe","gag","gainfully","gaining","gains","gala","gallantly","galleria","gallery","galley","gallon","gallows","gallstone","galore","galvanize","gambling","game","gaming","gamma","gander","gangly","gangrene","gangway","gap","garage","garbage","garden","gargle","garland","garlic","garment","garnet","garnish","garter","gas","gatherer","gathering","gating","gauging","gauntlet","gauze","gave","gawk","gazing","gear","gecko","geek","geiger","gem","gender","generic","generous","genetics","genre","gentile","gentleman","gently","gents","geography","geologic","geologist","geology","geometric","geometry","geranium","gerbil","geriatric","germicide","germinate","germless","germproof","gestate","gestation","gesture","getaway","getting","getup","giant","gibberish","giblet","giddily","giddiness","giddy","gift","gigabyte","gigahertz","gigantic","giggle","giggling","giggly","gigolo","gilled","gills","gimmick","girdle","giveaway","given","giver","giving","gizmo","gizzard","glacial","glacier","glade","gladiator","gladly","glamorous","glamour","glance","glancing","glandular","glare","glaring","glass","glaucoma","glazing","gleaming","gleeful","glider","gliding","glimmer","glimpse","glisten","glitch","glitter","glitzy","gloater","gloating","gloomily","gloomy","glorified","glorifier","glorify","glorious","glory","gloss","glove","glowing","glowworm","glucose","glue","gluten","glutinous","glutton","gnarly","gnat","goal","goatskin","goes","goggles","going","goldfish","goldmine","goldsmith","golf","goliath","gonad","gondola","gone","gong","good","gooey","goofball","goofiness","goofy","google","goon","gopher","gore","gorged","gorgeous","gory","gosling","gossip","gothic","gotten","gout","gown","grab","graceful","graceless","gracious","gradation","graded","grader","gradient","grading","gradually","graduate","graffiti","grafted","grafting","grain","granddad","grandkid","grandly","grandma","grandpa","grandson","granite","granny","granola","grant","granular","grape","graph","grapple","grappling","grasp","grass","gratified","gratify","grating","gratitude","gratuity","gravel","graveness","graves","graveyard","gravitate","gravity","gravy","gray","grazing","greasily","greedily","greedless","greedy","green","greeter","greeting","grew","greyhound","grid","grief","grievance","grieving","grievous","grill","grimace","grimacing","grime","griminess","grimy","grinch","grinning","grip","gristle","grit","groggily","groggy","groin","groom","groove","grooving","groovy","grope","ground","grouped","grout","grove","grower","growing","growl","grub","grudge","grudging","grueling","gruffly","grumble","grumbling","grumbly","grumpily","grunge","grunt","guacamole","guidable","guidance","guide","guiding","guileless","guise","gulf","gullible","gully","gulp","gumball","gumdrop","gumminess","gumming","gummy","gurgle","gurgling","guru","gush","gusto","gusty","gutless","guts","gutter","guy","guzzler","gyration","habitable","habitant","habitat","habitual","hacked","hacker","hacking","hacksaw","had","haggler","haiku","half","halogen","halt","halved","halves","hamburger","hamlet","hammock","hamper","hamster","hamstring","handbag","handball","handbook","handbrake","handcart","handclap","handclasp","handcraft","handcuff","handed","handful","handgrip","handgun","handheld","handiness","handiwork","handlebar","handled","handler","handling","handmade","handoff","handpick","handprint","handrail","handsaw","handset","handsfree","handshake","handstand","handwash","handwork","handwoven","handwrite","handyman","hangnail","hangout","hangover","hangup","hankering","hankie","hanky","haphazard","happening","happier","happiest","happily","happiness","happy","harbor","hardcopy","hardcore","hardcover","harddisk","hardened","hardener","hardening","hardhat","hardhead","hardiness","hardly","hardness","hardship","hardware","hardwired","hardwood","hardy","harmful","harmless","harmonica","harmonics","harmonize","harmony","harness","harpist","harsh","harvest","hash","hassle","haste","hastily","hastiness","hasty","hatbox","hatchback","hatchery","hatchet","hatching","hatchling","hate","hatless","hatred","haunt","haven","hazard","hazelnut","hazily","haziness","hazing","hazy","headache","headband","headboard","headcount","headdress","headed","header","headfirst","headgear","heading","headlamp","headless","headlock","headphone","headpiece","headrest","headroom","headscarf","headset","headsman","headstand","headstone","headway","headwear","heap","heat","heave","heavily","heaviness","heaving","hedge","hedging","heftiness","hefty","helium","helmet","helper","helpful","helping","helpless","helpline","hemlock","hemstitch","hence","henchman","henna","herald","herbal","herbicide","herbs","heritage","hermit","heroics","heroism","herring","herself","hertz","hesitancy","hesitant","hesitate","hexagon","hexagram","hubcap","huddle","huddling","huff","hug","hula","hulk","hull","human","humble","humbling","humbly","humid","humiliate","humility","humming","hummus","humongous","humorist","humorless","humorous","humpback","humped","humvee","hunchback","hundredth","hunger","hungrily","hungry","hunk","hunter","hunting","huntress","huntsman","hurdle","hurled","hurler","hurling","hurray","hurricane","hurried","hurry","hurt","husband","hush","husked","huskiness","hut","hybrid","hydrant","hydrated","hydration","hydrogen","hydroxide","hyperlink","hypertext","hyphen","hypnoses","hypnosis","hypnotic","hypnotism","hypnotist","hypnotize","hypocrisy","hypocrite","ibuprofen","ice","iciness","icing","icky","icon","icy","idealism","idealist","idealize","ideally","idealness","identical","identify","identity","ideology","idiocy","idiom","idly","igloo","ignition","ignore","iguana","illicitly","illusion","illusive","image","imaginary","imagines","imaging","imbecile","imitate","imitation","immature","immerse","immersion","imminent","immobile","immodest","immorally","immortal","immovable","immovably","immunity","immunize","impaired","impale","impart","impatient","impeach","impeding","impending","imperfect","imperial","impish","implant","implement","implicate","implicit","implode","implosion","implosive","imply","impolite","important","importer","impose","imposing","impotence","impotency","impotent","impound","imprecise","imprint","imprison","impromptu","improper","improve","improving","improvise","imprudent","impulse","impulsive","impure","impurity","iodine","iodize","ion","ipad","iphone","ipod","irate","irk","iron","irregular","irrigate","irritable","irritably","irritant","irritate","islamic","islamist","isolated","isolating","isolation","isotope","issue","issuing","italicize","italics","item","itinerary","itunes","ivory","ivy","jab","jackal","jacket","jackknife","jackpot","jailbird","jailbreak","jailer","jailhouse","jalapeno","jam","janitor","january","jargon","jarring","jasmine","jaundice","jaunt","java","jawed","jawless","jawline","jaws","jaybird","jaywalker","jazz","jeep","jeeringly","jellied","jelly","jersey","jester","jet","jiffy","jigsaw","jimmy","jingle","jingling","jinx","jitters","jittery","job","jockey","jockstrap","jogger","jogging","john","joining","jokester","jokingly","jolliness","jolly","jolt","jot","jovial","joyfully","joylessly","joyous","joyride","joystick","jubilance","jubilant","judge","judgingly","judicial","judiciary","judo","juggle","juggling","jugular","juice","juiciness","juicy","jujitsu","jukebox","july","jumble","jumbo","jump","junction","juncture","june","junior","juniper","junkie","junkman","junkyard","jurist","juror","jury","justice","justifier","justify","justly","justness","juvenile","kabob","kangaroo","karaoke","karate","karma","kebab","keenly","keenness","keep","keg","kelp","kennel","kept","kerchief","kerosene","kettle","kick","kiln","kilobyte","kilogram","kilometer","kilowatt","kilt","kimono","kindle","kindling","kindly","kindness","kindred","kinetic","kinfolk","king","kinship","kinsman","kinswoman","kissable","kisser","kissing","kitchen","kite","kitten","kitty","kiwi","kleenex","knapsack","knee","knelt","knickers","knoll","koala","kooky","kosher","krypton","kudos","kung","labored","laborer","laboring","laborious","labrador","ladder","ladies","ladle","ladybug","ladylike","lagged","lagging","lagoon","lair","lake","lance","landed","landfall","landfill","landing","landlady","landless","landline","landlord","landmark","landmass","landmine","landowner","landscape","landside","landslide","language","lankiness","lanky","lantern","lapdog","lapel","lapped","lapping","laptop","lard","large","lark","lash","lasso","last","latch","late","lather","latitude","latrine","latter","latticed","launch","launder","laundry","laurel","lavender","lavish","laxative","lazily","laziness","lazy","lecturer","left","legacy","legal","legend","legged","leggings","legible","legibly","legislate","lego","legroom","legume","legwarmer","legwork","lemon","lend","length","lens","lent","leotard","lesser","letdown","lethargic","lethargy","letter","lettuce","level","leverage","levers","levitate","levitator","liability","liable","liberty","librarian","library","licking","licorice","lid","life","lifter","lifting","liftoff","ligament","likely","likeness","likewise","liking","lilac","lilly","lily","limb","limeade","limelight","limes","limit","limping","limpness","line","lingo","linguini","linguist","lining","linked","linoleum","linseed","lint","lion","lip","liquefy","liqueur","liquid","lisp","list","litigate","litigator","litmus","litter","little","livable","lived","lively","liver","livestock","lividly","living","lizard","lubricant","lubricate","lucid","luckily","luckiness","luckless","lucrative","ludicrous","lugged","lukewarm","lullaby","lumber","luminance","luminous","lumpiness","lumping","lumpish","lunacy","lunar","lunchbox","luncheon","lunchroom","lunchtime","lung","lurch","lure","luridness","lurk","lushly","lushness","luster","lustfully","lustily","lustiness","lustrous","lusty","luxurious","luxury","lying","lyrically","lyricism","lyricist","lyrics","macarena","macaroni","macaw","mace","machine","machinist","magazine","magenta","maggot","magical","magician","magma","magnesium","magnetic","magnetism","magnetize","magnifier","magnify","magnitude","magnolia","mahogany","maimed","majestic","majesty","majorette","majority","makeover","maker","makeshift","making","malformed","malt","mama","mammal","mammary","mammogram","manager","managing","manatee","mandarin","mandate","mandatory","mandolin","manger","mangle","mango","mangy","manhandle","manhole","manhood","manhunt","manicotti","manicure","manifesto","manila","mankind","manlike","manliness","manly","manmade","manned","mannish","manor","manpower","mantis","mantra","manual","many","map","marathon","marauding","marbled","marbles","marbling","march","mardi","margarine","margarita","margin","marigold","marina","marine","marital","maritime","marlin","marmalade","maroon","married","marrow","marry","marshland","marshy","marsupial","marvelous","marxism","mascot","masculine","mashed","mashing","massager","masses","massive","mastiff","matador","matchbook","matchbox","matcher","matching","matchless","material","maternal","maternity","math","mating","matriarch","matrimony","matrix","matron","matted","matter","maturely","maturing","maturity","mauve","maverick","maximize","maximum","maybe","mayday","mayflower","moaner","moaning","mobile","mobility","mobilize","mobster","mocha","mocker","mockup","modified","modify","modular","modulator","module","moisten","moistness","moisture","molar","molasses","mold","molecular","molecule","molehill","mollusk","mom","monastery","monday","monetary","monetize","moneybags","moneyless","moneywise","mongoose","mongrel","monitor","monkhood","monogamy","monogram","monologue","monopoly","monorail","monotone","monotype","monoxide","monsieur","monsoon","monstrous","monthly","monument","moocher","moodiness","moody","mooing","moonbeam","mooned","moonlight","moonlike","moonlit","moonrise","moonscape","moonshine","moonstone","moonwalk","mop","morale","morality","morally","morbidity","morbidly","morphine","morphing","morse","mortality","mortally","mortician","mortified","mortify","mortuary","mosaic","mossy","most","mothball","mothproof","motion","motivate","motivator","motive","motocross","motor","motto","mountable","mountain","mounted","mounting","mourner","mournful","mouse","mousiness","moustache","mousy","mouth","movable","move","movie","moving","mower","mowing","much","muck","mud","mug","mulberry","mulch","mule","mulled","mullets","multiple","multiply","multitask","multitude","mumble","mumbling","mumbo","mummified","mummify","mummy","mumps","munchkin","mundane","municipal","muppet","mural","murkiness","murky","murmuring","muscular","museum","mushily","mushiness","mushroom","mushy","music","musket","muskiness","musky","mustang","mustard","muster","mustiness","musty","mutable","mutate","mutation","mute","mutilated","mutilator","mutiny","mutt","mutual","muzzle","myself","myspace","mystified","mystify","myth","nacho","nag","nail","name","naming","nanny","nanometer","nape","napkin","napped","napping","nappy","narrow","nastily","nastiness","national","native","nativity","natural","nature","naturist","nautical","navigate","navigator","navy","nearby","nearest","nearly","nearness","neatly","neatness","nebula","nebulizer","nectar","negate","negation","negative","neglector","negligee","negligent","negotiate","nemeses","nemesis","neon","nephew","nerd","nervous","nervy","nest","net","neurology","neuron","neurosis","neurotic","neuter","neutron","never","next","nibble","nickname","nicotine","niece","nifty","nimble","nimbly","nineteen","ninetieth","ninja","nintendo","ninth","nuclear","nuclei","nucleus","nugget","nullify","number","numbing","numbly","numbness","numeral","numerate","numerator","numeric","numerous","nuptials","nursery","nursing","nurture","nutcase","nutlike","nutmeg","nutrient","nutshell","nuttiness","nutty","nuzzle","nylon","oaf","oak","oasis","oat","obedience","obedient","obituary","object","obligate","obliged","oblivion","oblivious","oblong","obnoxious","oboe","obscure","obscurity","observant","observer","observing","obsessed","obsession","obsessive","obsolete","obstacle","obstinate","obstruct","obtain","obtrusive","obtuse","obvious","occultist","occupancy","occupant","occupier","occupy","ocean","ocelot","octagon","octane","october","octopus","ogle","oil","oink","ointment","okay","old","olive","olympics","omega","omen","ominous","omission","omit","omnivore","onboard","oncoming","ongoing","onion","online","onlooker","only","onscreen","onset","onshore","onslaught","onstage","onto","onward","onyx","oops","ooze","oozy","opacity","opal","open","operable","operate","operating","operation","operative","operator","opium","opossum","opponent","oppose","opposing","opposite","oppressed","oppressor","opt","opulently","osmosis","other","otter","ouch","ought","ounce","outage","outback","outbid","outboard","outbound","outbreak","outburst","outcast","outclass","outcome","outdated","outdoors","outer","outfield","outfit","outflank","outgoing","outgrow","outhouse","outing","outlast","outlet","outline","outlook","outlying","outmatch","outmost","outnumber","outplayed","outpost","outpour","output","outrage","outrank","outreach","outright","outscore","outsell","outshine","outshoot","outsider","outskirts","outsmart","outsource","outspoken","outtakes","outthink","outward","outweigh","outwit","oval","ovary","oven","overact","overall","overarch","overbid","overbill","overbite","overblown","overboard","overbook","overbuilt","overcast","overcoat","overcome","overcook","overcrowd","overdraft","overdrawn","overdress","overdrive","overdue","overeager","overeater","overexert","overfed","overfeed","overfill","overflow","overfull","overgrown","overhand","overhang","overhaul","overhead","overhear","overheat","overhung","overjoyed","overkill","overlabor","overlaid","overlap","overlay","overload","overlook","overlord","overlying","overnight","overpass","overpay","overplant","overplay","overpower","overprice","overrate","overreach","overreact","override","overripe","overrule","overrun","overshoot","overshot","oversight","oversized","oversleep","oversold","overspend","overstate","overstay","overstep","overstock","overstuff","oversweet","overtake","overthrow","overtime","overtly","overtone","overture","overturn","overuse","overvalue","overview","overwrite","owl","oxford","oxidant","oxidation","oxidize","oxidizing","oxygen","oxymoron","oyster","ozone","paced","pacemaker","pacific","pacifier","pacifism","pacifist","pacify","padded","padding","paddle","paddling","padlock","pagan","pager","paging","pajamas","palace","palatable","palm","palpable","palpitate","paltry","pampered","pamperer","pampers","pamphlet","panama","pancake","pancreas","panda","pandemic","pang","panhandle","panic","panning","panorama","panoramic","panther","pantomime","pantry","pants","pantyhose","paparazzi","papaya","paper","paprika","papyrus","parabola","parachute","parade","paradox","paragraph","parakeet","paralegal","paralyses","paralysis","paralyze","paramedic","parameter","paramount","parasail","parasite","parasitic","parcel","parched","parchment","pardon","parish","parka","parking","parkway","parlor","parmesan","parole","parrot","parsley","parsnip","partake","parted","parting","partition","partly","partner","partridge","party","passable","passably","passage","passcode","passenger","passerby","passing","passion","passive","passivism","passover","passport","password","pasta","pasted","pastel","pastime","pastor","pastrami","pasture","pasty","patchwork","patchy","paternal","paternity","path","patience","patient","patio","patriarch","patriot","patrol","patronage","patronize","pauper","pavement","paver","pavestone","pavilion","paving","pawing","payable","payback","paycheck","payday","payee","payer","paying","payment","payphone","payroll","pebble","pebbly","pecan","pectin","peculiar","peddling","pediatric","pedicure","pedigree","pedometer","pegboard","pelican","pellet","pelt","pelvis","penalize","penalty","pencil","pendant","pending","penholder","penknife","pennant","penniless","penny","penpal","pension","pentagon","pentagram","pep","perceive","percent","perch","percolate","perennial","perfected","perfectly","perfume","periscope","perish","perjurer","perjury","perkiness","perky","perm","peroxide","perpetual","perplexed","persecute","persevere","persuaded","persuader","pesky","peso","pessimism","pessimist","pester","pesticide","petal","petite","petition","petri","petroleum","petted","petticoat","pettiness","petty","petunia","phantom","phobia","phoenix","phonebook","phoney","phonics","phoniness","phony","phosphate","photo","phrase","phrasing","placard","placate","placidly","plank","planner","plant","plasma","plaster","plastic","plated","platform","plating","platinum","platonic","platter","platypus","plausible","plausibly","playable","playback","player","playful","playgroup","playhouse","playing","playlist","playmaker","playmate","playoff","playpen","playroom","playset","plaything","playtime","plaza","pleading","pleat","pledge","plentiful","plenty","plethora","plexiglas","pliable","plod","plop","plot","plow","ploy","pluck","plug","plunder","plunging","plural","plus","plutonium","plywood","poach","pod","poem","poet","pogo","pointed","pointer","pointing","pointless","pointy","poise","poison","poker","poking","polar","police","policy","polio","polish","politely","polka","polo","polyester","polygon","polygraph","polymer","poncho","pond","pony","popcorn","pope","poplar","popper","poppy","popsicle","populace","popular","populate","porcupine","pork","porous","porridge","portable","portal","portfolio","porthole","portion","portly","portside","poser","posh","posing","possible","possibly","possum","postage","postal","postbox","postcard","posted","poster","posting","postnasal","posture","postwar","pouch","pounce","pouncing","pound","pouring","pout","powdered","powdering","powdery","power","powwow","pox","praising","prance","prancing","pranker","prankish","prankster","prayer","praying","preacher","preaching","preachy","preamble","precinct","precise","precision","precook","precut","predator","predefine","predict","preface","prefix","preflight","preformed","pregame","pregnancy","pregnant","preheated","prelaunch","prelaw","prelude","premiere","premises","premium","prenatal","preoccupy","preorder","prepaid","prepay","preplan","preppy","preschool","prescribe","preseason","preset","preshow","president","presoak","press","presume","presuming","preteen","pretended","pretender","pretense","pretext","pretty","pretzel","prevail","prevalent","prevent","preview","previous","prewar","prewashed","prideful","pried","primal","primarily","primary","primate","primer","primp","princess","print","prior","prism","prison","prissy","pristine","privacy","private","privatize","prize","proactive","probable","probably","probation","probe","probing","probiotic","problem","procedure","process","proclaim","procreate","procurer","prodigal","prodigy","produce","product","profane","profanity","professed","professor","profile","profound","profusely","progeny","prognosis","program","progress","projector","prologue","prolonged","promenade","prominent","promoter","promotion","prompter","promptly","prone","prong","pronounce","pronto","proofing","proofread","proofs","propeller","properly","property","proponent","proposal","propose","props","prorate","protector","protegee","proton","prototype","protozoan","protract","protrude","proud","provable","proved","proven","provided","provider","providing","province","proving","provoke","provoking","provolone","prowess","prowler","prowling","proximity","proxy","prozac","prude","prudishly","prune","pruning","pry","psychic","public","publisher","pucker","pueblo","pug","pull","pulmonary","pulp","pulsate","pulse","pulverize","puma","pumice","pummel","punch","punctual","punctuate","punctured","pungent","punisher","punk","pupil","puppet","puppy","purchase","pureblood","purebred","purely","pureness","purgatory","purge","purging","purifier","purify","purist","puritan","purity","purple","purplish","purposely","purr","purse","pursuable","pursuant","pursuit","purveyor","pushcart","pushchair","pusher","pushiness","pushing","pushover","pushpin","pushup","pushy","putdown","putt","puzzle","puzzling","pyramid","pyromania","python","quack","quadrant","quail","quaintly","quake","quaking","qualified","qualifier","qualify","quality","qualm","quantum","quarrel","quarry","quartered","quarterly","quarters","quartet","quench","query","quicken","quickly","quickness","quicksand","quickstep","quiet","quill","quilt","quintet","quintuple","quirk","quit","quiver","quizzical","quotable","quotation","quote","rabid","race","racing","racism","rack","racoon","radar","radial","radiance","radiantly","radiated","radiation","radiator","radio","radish","raffle","raft","rage","ragged","raging","ragweed","raider","railcar","railing","railroad","railway","raisin","rake","raking","rally","ramble","rambling","ramp","ramrod","ranch","rancidity","random","ranged","ranger","ranging","ranked","ranking","ransack","ranting","rants","rare","rarity","rascal","rash","rasping","ravage","raven","ravine","raving","ravioli","ravishing","reabsorb","reach","reacquire","reaction","reactive","reactor","reaffirm","ream","reanalyze","reappear","reapply","reappoint","reapprove","rearrange","rearview","reason","reassign","reassure","reattach","reawake","rebalance","rebate","rebel","rebirth","reboot","reborn","rebound","rebuff","rebuild","rebuilt","reburial","rebuttal","recall","recant","recapture","recast","recede","recent","recess","recharger","recipient","recital","recite","reckless","reclaim","recliner","reclining","recluse","reclusive","recognize","recoil","recollect","recolor","reconcile","reconfirm","reconvene","recopy","record","recount","recoup","recovery","recreate","rectal","rectangle","rectified","rectify","recycled","recycler","recycling","reemerge","reenact","reenter","reentry","reexamine","referable","referee","reference","refill","refinance","refined","refinery","refining","refinish","reflected","reflector","reflex","reflux","refocus","refold","reforest","reformat","reformed","reformer","reformist","refract","refrain","refreeze","refresh","refried","refueling","refund","refurbish","refurnish","refusal","refuse","refusing","refutable","refute","regain","regalia","regally","reggae","regime","region","register","registrar","registry","regress","regretful","regroup","regular","regulate","regulator","rehab","reheat","rehire","rehydrate","reimburse","reissue","reiterate","rejoice","rejoicing","rejoin","rekindle","relapse","relapsing","relatable","related","relation","relative","relax","relay","relearn","release","relenting","reliable","reliably","reliance","reliant","relic","relieve","relieving","relight","relish","relive","reload","relocate","relock","reluctant","rely","remake","remark","remarry","rematch","remedial","remedy","remember","reminder","remindful","remission","remix","remnant","remodeler","remold","remorse","remote","removable","removal","removed","remover","removing","rename","renderer","rendering","rendition","renegade","renewable","renewably","renewal","renewed","renounce","renovate","renovator","rentable","rental","rented","renter","reoccupy","reoccur","reopen","reorder","repackage","repacking","repaint","repair","repave","repaying","repayment","repeal","repeated","repeater","repent","rephrase","replace","replay","replica","reply","reporter","repose","repossess","repost","repressed","reprimand","reprint","reprise","reproach","reprocess","reproduce","reprogram","reps","reptile","reptilian","repugnant","repulsion","repulsive","repurpose","reputable","reputably","request","require","requisite","reroute","rerun","resale","resample","rescuer","reseal","research","reselect","reseller","resemble","resend","resent","reset","reshape","reshoot","reshuffle","residence","residency","resident","residual","residue","resigned","resilient","resistant","resisting","resize","resolute","resolved","resonant","resonate","resort","resource","respect","resubmit","result","resume","resupply","resurface","resurrect","retail","retainer","retaining","retake","retaliate","retention","rethink","retinal","retired","retiree","retiring","retold","retool","retorted","retouch","retrace","retract","retrain","retread","retreat","retrial","retrieval","retriever","retry","return","retying","retype","reunion","reunite","reusable","reuse","reveal","reveler","revenge","revenue","reverb","revered","reverence","reverend","reversal","reverse","reversing","reversion","revert","revisable","revise","revision","revisit","revivable","revival","reviver","reviving","revocable","revoke","revolt","revolver","revolving","reward","rewash","rewind","rewire","reword","rework","rewrap","rewrite","rhyme","ribbon","ribcage","rice","riches","richly","richness","rickety","ricotta","riddance","ridden","ride","riding","rifling","rift","rigging","rigid","rigor","rimless","rimmed","rind","rink","rinse","rinsing","riot","ripcord","ripeness","ripening","ripping","ripple","rippling","riptide","rise","rising","risk","risotto","ritalin","ritzy","rival","riverbank","riverbed","riverboat","riverside","riveter","riveting","roamer","roaming","roast","robbing","robe","robin","robotics","robust","rockband","rocker","rocket","rockfish","rockiness","rocking","rocklike","rockslide","rockstar","rocky","rogue","roman","romp","rope","roping","roster","rosy","rotten","rotting","rotunda","roulette","rounding","roundish","roundness","roundup","roundworm","routine","routing","rover","roving","royal","rubbed","rubber","rubbing","rubble","rubdown","ruby","ruckus","rudder","rug","ruined","rule","rumble","rumbling","rummage","rumor","runaround","rundown","runner","running","runny","runt","runway","rupture","rural","ruse","rush","rust","rut","sabbath","sabotage","sacrament","sacred","sacrifice","sadden","saddlebag","saddled","saddling","sadly","sadness","safari","safeguard","safehouse","safely","safeness","saffron","saga","sage","sagging","saggy","said","saint","sake","salad","salami","salaried","salary","saline","salon","saloon","salsa","salt","salutary","salute","salvage","salvaging","salvation","same","sample","sampling","sanction","sanctity","sanctuary","sandal","sandbag","sandbank","sandbar","sandblast","sandbox","sanded","sandfish","sanding","sandlot","sandpaper","sandpit","sandstone","sandstorm","sandworm","sandy","sanitary","sanitizer","sank","santa","sapling","sappiness","sappy","sarcasm","sarcastic","sardine","sash","sasquatch","sassy","satchel","satiable","satin","satirical","satisfied","satisfy","saturate","saturday","sauciness","saucy","sauna","savage","savanna","saved","savings","savior","savor","saxophone","say","scabbed","scabby","scalded","scalding","scale","scaling","scallion","scallop","scalping","scam","scandal","scanner","scanning","scant","scapegoat","scarce","scarcity","scarecrow","scared","scarf","scarily","scariness","scarring","scary","scavenger","scenic","schedule","schematic","scheme","scheming","schilling","schnapps","scholar","science","scientist","scion","scoff","scolding","scone","scoop","scooter","scope","scorch","scorebook","scorecard","scored","scoreless","scorer","scoring","scorn","scorpion","scotch","scoundrel","scoured","scouring","scouting","scouts","scowling","scrabble","scraggly","scrambled","scrambler","scrap","scratch","scrawny","screen","scribble","scribe","scribing","scrimmage","script","scroll","scrooge","scrounger","scrubbed","scrubber","scruffy","scrunch","scrutiny","scuba","scuff","sculptor","sculpture","scurvy","scuttle","secluded","secluding","seclusion","second","secrecy","secret","sectional","sector","secular","securely","security","sedan","sedate","sedation","sedative","sediment","seduce","seducing","segment","seismic","seizing","seldom","selected","selection","selective","selector","self","seltzer","semantic","semester","semicolon","semifinal","seminar","semisoft","semisweet","senate","senator","send","senior","senorita","sensation","sensitive","sensitize","sensually","sensuous","sepia","september","septic","septum","sequel","sequence","sequester","series","sermon","serotonin","serpent","serrated","serve","service","serving","sesame","sessions","setback","setting","settle","settling","setup","sevenfold","seventeen","seventh","seventy","severity","shabby","shack","shaded","shadily","shadiness","shading","shadow","shady","shaft","shakable","shakily","shakiness","shaking","shaky","shale","shallot","shallow","shame","shampoo","shamrock","shank","shanty","shape","shaping","share","sharpener","sharper","sharpie","sharply","sharpness","shawl","sheath","shed","sheep","sheet","shelf","shell","shelter","shelve","shelving","sherry","shield","shifter","shifting","shiftless","shifty","shimmer","shimmy","shindig","shine","shingle","shininess","shining","shiny","ship","shirt","shivering","shock","shone","shoplift","shopper","shopping","shoptalk","shore","shortage","shortcake","shortcut","shorten","shorter","shorthand","shortlist","shortly","shortness","shorts","shortwave","shorty","shout","shove","showbiz","showcase","showdown","shower","showgirl","showing","showman","shown","showoff","showpiece","showplace","showroom","showy","shrank","shrapnel","shredder","shredding","shrewdly","shriek","shrill","shrimp","shrine","shrink","shrivel","shrouded","shrubbery","shrubs","shrug","shrunk","shucking","shudder","shuffle","shuffling","shun","shush","shut","shy","siamese","siberian","sibling","siding","sierra","siesta","sift","sighing","silenced","silencer","silent","silica","silicon","silk","silliness","silly","silo","silt","silver","similarly","simile","simmering","simple","simplify","simply","sincere","sincerity","singer","singing","single","singular","sinister","sinless","sinner","sinuous","sip","siren","sister","sitcom","sitter","sitting","situated","situation","sixfold","sixteen","sixth","sixties","sixtieth","sixtyfold","sizable","sizably","size","sizing","sizzle","sizzling","skater","skating","skedaddle","skeletal","skeleton","skeptic","sketch","skewed","skewer","skid","skied","skier","skies","skiing","skilled","skillet","skillful","skimmed","skimmer","skimming","skimpily","skincare","skinhead","skinless","skinning","skinny","skintight","skipper","skipping","skirmish","skirt","skittle","skydiver","skylight","skyline","skype","skyrocket","skyward","slab","slacked","slacker","slacking","slackness","slacks","slain","slam","slander","slang","slapping","slapstick","slashed","slashing","slate","slather","slaw","sled","sleek","sleep","sleet","sleeve","slept","sliceable","sliced","slicer","slicing","slick","slider","slideshow","sliding","slighted","slighting","slightly","slimness","slimy","slinging","slingshot","slinky","slip","slit","sliver","slobbery","slogan","sloped","sloping","sloppily","sloppy","slot","slouching","slouchy","sludge","slug","slum","slurp","slush","sly","small","smartly","smartness","smasher","smashing","smashup","smell","smelting","smile","smilingly","smirk","smite","smith","smitten","smock","smog","smoked","smokeless","smokiness","smoking","smoky","smolder","smooth","smother","smudge","smudgy","smuggler","smuggling","smugly","smugness","snack","snagged","snaking","snap","snare","snarl","snazzy","sneak","sneer","sneeze","sneezing","snide","sniff","snippet","snipping","snitch","snooper","snooze","snore","snoring","snorkel","snort","snout","snowbird","snowboard","snowbound","snowcap","snowdrift","snowdrop","snowfall","snowfield","snowflake","snowiness","snowless","snowman","snowplow","snowshoe","snowstorm","snowsuit","snowy","snub","snuff","snuggle","snugly","snugness","speak","spearfish","spearhead","spearman","spearmint","species","specimen","specked","speckled","specks","spectacle","spectator","spectrum","speculate","speech","speed","spellbind","speller","spelling","spendable","spender","spending","spent","spew","sphere","spherical","sphinx","spider","spied","spiffy","spill","spilt","spinach","spinal","spindle","spinner","spinning","spinout","spinster","spiny","spiral","spirited","spiritism","spirits","spiritual","splashed","splashing","splashy","splatter","spleen","splendid","splendor","splice","splicing","splinter","splotchy","splurge","spoilage","spoiled","spoiler","spoiling","spoils","spoken","spokesman","sponge","spongy","sponsor","spoof","spookily","spooky","spool","spoon","spore","sporting","sports","sporty","spotless","spotlight","spotted","spotter","spotting","spotty","spousal","spouse","spout","sprain","sprang","sprawl","spray","spree","sprig","spring","sprinkled","sprinkler","sprint","sprite","sprout","spruce","sprung","spry","spud","spur","sputter","spyglass","squabble","squad","squall","squander","squash","squatted","squatter","squatting","squeak","squealer","squealing","squeamish","squeegee","squeeze","squeezing","squid","squiggle","squiggly","squint","squire","squirt","squishier","squishy","stability","stabilize","stable","stack","stadium","staff","stage","staging","stagnant","stagnate","stainable","stained","staining","stainless","stalemate","staleness","stalling","stallion","stamina","stammer","stamp","stand","stank","staple","stapling","starboard","starch","stardom","stardust","starfish","stargazer","staring","stark","starless","starlet","starlight","starlit","starring","starry","starship","starter","starting","startle","startling","startup","starved","starving","stash","state","static","statistic","statue","stature","status","statute","statutory","staunch","stays","steadfast","steadier","steadily","steadying","steam","steed","steep","steerable","steering","steersman","stegosaur","stellar","stem","stench","stencil","step","stereo","sterile","sterility","sterilize","sterling","sternness","sternum","stew","stick","stiffen","stiffly","stiffness","stifle","stifling","stillness","stilt","stimulant","stimulate","stimuli","stimulus","stinger","stingily","stinging","stingray","stingy","stinking","stinky","stipend","stipulate","stir","stitch","stock","stoic","stoke","stole","stomp","stonewall","stoneware","stonework","stoning","stony","stood","stooge","stool","stoop","stoplight","stoppable","stoppage","stopped","stopper","stopping","stopwatch","storable","storage","storeroom","storewide","storm","stout","stove","stowaway","stowing","straddle","straggler","strained","strainer","straining","strangely","stranger","strangle","strategic","strategy","stratus","straw","stray","streak","stream","street","strength","strenuous","strep","stress","stretch","strewn","stricken","strict","stride","strife","strike","striking","strive","striving","strobe","strode","stroller","strongbox","strongly","strongman","struck","structure","strudel","struggle","strum","strung","strut","stubbed","stubble","stubbly","stubborn","stucco","stuck","student","studied","studio","study","stuffed","stuffing","stuffy","stumble","stumbling","stump","stung","stunned","stunner","stunning","stunt","stupor","sturdily","sturdy","styling","stylishly","stylist","stylized","stylus","suave","subarctic","subatomic","subdivide","subdued","subduing","subfloor","subgroup","subheader","subject","sublease","sublet","sublevel","sublime","submarine","submerge","submersed","submitter","subpanel","subpar","subplot","subprime","subscribe","subscript","subsector","subside","subsiding","subsidize","subsidy","subsoil","subsonic","substance","subsystem","subtext","subtitle","subtly","subtotal","subtract","subtype","suburb","subway","subwoofer","subzero","succulent","such","suction","sudden","sudoku","suds","sufferer","suffering","suffice","suffix","suffocate","suffrage","sugar","suggest","suing","suitable","suitably","suitcase","suitor","sulfate","sulfide","sulfite","sulfur","sulk","sullen","sulphate","sulphuric","sultry","superbowl","superglue","superhero","superior","superjet","superman","supermom","supernova","supervise","supper","supplier","supply","support","supremacy","supreme","surcharge","surely","sureness","surface","surfacing","surfboard","surfer","surgery","surgical","surging","surname","surpass","surplus","surprise","surreal","surrender","surrogate","surround","survey","survival","survive","surviving","survivor","sushi","suspect","suspend","suspense","sustained","sustainer","swab","swaddling","swagger","swampland","swan","swapping","swarm","sway","swear","sweat","sweep","swell","swept","swerve","swifter","swiftly","swiftness","swimmable","swimmer","swimming","swimsuit","swimwear","swinger","swinging","swipe","swirl","switch","swivel","swizzle","swooned","swoop","swoosh","swore","sworn","swung","sycamore","sympathy","symphonic","symphony","symptom","synapse","syndrome","synergy","synopses","synopsis","synthesis","synthetic","syrup","system","t-shirt","tabasco","tabby","tableful","tables","tablet","tableware","tabloid","tackiness","tacking","tackle","tackling","tacky","taco","tactful","tactical","tactics","tactile","tactless","tadpole","taekwondo","tag","tainted","take","taking","talcum","talisman","tall","talon","tamale","tameness","tamer","tamper","tank","tanned","tannery","tanning","tantrum","tapeless","tapered","tapering","tapestry","tapioca","tapping","taps","tarantula","target","tarmac","tarnish","tarot","tartar","tartly","tartness","task","tassel","taste","tastiness","tasting","tasty","tattered","tattle","tattling","tattoo","taunt","tavern","thank","that","thaw","theater","theatrics","thee","theft","theme","theology","theorize","thermal","thermos","thesaurus","these","thesis","thespian","thicken","thicket","thickness","thieving","thievish","thigh","thimble","thing","think","thinly","thinner","thinness","thinning","thirstily","thirsting","thirsty","thirteen","thirty","thong","thorn","those","thousand","thrash","thread","threaten","threefold","thrift","thrill","thrive","thriving","throat","throbbing","throng","throttle","throwaway","throwback","thrower","throwing","thud","thumb","thumping","thursday","thus","thwarting","thyself","tiara","tibia","tidal","tidbit","tidiness","tidings","tidy","tiger","tighten","tightly","tightness","tightrope","tightwad","tigress","tile","tiling","till","tilt","timid","timing","timothy","tinderbox","tinfoil","tingle","tingling","tingly","tinker","tinkling","tinsel","tinsmith","tint","tinwork","tiny","tipoff","tipped","tipper","tipping","tiptoeing","tiptop","tiring","tissue","trace","tracing","track","traction","tractor","trade","trading","tradition","traffic","tragedy","trailing","trailside","train","traitor","trance","tranquil","transfer","transform","translate","transpire","transport","transpose","trapdoor","trapeze","trapezoid","trapped","trapper","trapping","traps","trash","travel","traverse","travesty","tray","treachery","treading","treadmill","treason","treat","treble","tree","trekker","tremble","trembling","tremor","trench","trend","trespass","triage","trial","triangle","tribesman","tribunal","tribune","tributary","tribute","triceps","trickery","trickily","tricking","trickle","trickster","tricky","tricolor","tricycle","trident","tried","trifle","trifocals","trillion","trilogy","trimester","trimmer","trimming","trimness","trinity","trio","tripod","tripping","triumph","trivial","trodden","trolling","trombone","trophy","tropical","tropics","trouble","troubling","trough","trousers","trout","trowel","truce","truck","truffle","trump","trunks","trustable","trustee","trustful","trusting","trustless","truth","try","tubby","tubeless","tubular","tucking","tuesday","tug","tuition","tulip","tumble","tumbling","tummy","turban","turbine","turbofan","turbojet","turbulent","turf","turkey","turmoil","turret","turtle","tusk","tutor","tutu","tux","tweak","tweed","tweet","tweezers","twelve","twentieth","twenty","twerp","twice","twiddle","twiddling","twig","twilight","twine","twins","twirl","twistable","twisted","twister","twisting","twisty","twitch","twitter","tycoon","tying","tyke","udder","ultimate","ultimatum","ultra","umbilical","umbrella","umpire","unabashed","unable","unadorned","unadvised","unafraid","unaired","unaligned","unaltered","unarmored","unashamed","unaudited","unawake","unaware","unbaked","unbalance","unbeaten","unbend","unbent","unbiased","unbitten","unblended","unblessed","unblock","unbolted","unbounded","unboxed","unbraided","unbridle","unbroken","unbuckled","unbundle","unburned","unbutton","uncanny","uncapped","uncaring","uncertain","unchain","unchanged","uncharted","uncheck","uncivil","unclad","unclaimed","unclamped","unclasp","uncle","unclip","uncloak","unclog","unclothed","uncoated","uncoiled","uncolored","uncombed","uncommon","uncooked","uncork","uncorrupt","uncounted","uncouple","uncouth","uncover","uncross","uncrown","uncrushed","uncured","uncurious","uncurled","uncut","undamaged","undated","undaunted","undead","undecided","undefined","underage","underarm","undercoat","undercook","undercut","underdog","underdone","underfed","underfeed","underfoot","undergo","undergrad","underhand","underline","underling","undermine","undermost","underpaid","underpass","underpay","underrate","undertake","undertone","undertook","undertow","underuse","underwear","underwent","underwire","undesired","undiluted","undivided","undocked","undoing","undone","undrafted","undress","undrilled","undusted","undying","unearned","unearth","unease","uneasily","uneasy","uneatable","uneaten","unedited","unelected","unending","unengaged","unenvied","unequal","unethical","uneven","unexpired","unexposed","unfailing","unfair","unfasten","unfazed","unfeeling","unfiled","unfilled","unfitted","unfitting","unfixable","unfixed","unflawed","unfocused","unfold","unfounded","unframed","unfreeze","unfrosted","unfrozen","unfunded","unglazed","ungloved","unglue","ungodly","ungraded","ungreased","unguarded","unguided","unhappily","unhappy","unharmed","unhealthy","unheard","unhearing","unheated","unhelpful","unhidden","unhinge","unhitched","unholy","unhook","unicorn","unicycle","unified","unifier","uniformed","uniformly","unify","unimpeded","uninjured","uninstall","uninsured","uninvited","union","uniquely","unisexual","unison","unissued","unit","universal","universe","unjustly","unkempt","unkind","unknotted","unknowing","unknown","unlaced","unlatch","unlawful","unleaded","unlearned","unleash","unless","unleveled","unlighted","unlikable","unlimited","unlined","unlinked","unlisted","unlit","unlivable","unloaded","unloader","unlocked","unlocking","unlovable","unloved","unlovely","unloving","unluckily","unlucky","unmade","unmanaged","unmanned","unmapped","unmarked","unmasked","unmasking","unmatched","unmindful","unmixable","unmixed","unmolded","unmoral","unmovable","unmoved","unmoving","unnamable","unnamed","unnatural","unneeded","unnerve","unnerving","unnoticed","unopened","unopposed","unpack","unpadded","unpaid","unpainted","unpaired","unpaved","unpeeled","unpicked","unpiloted","unpinned","unplanned","unplanted","unpleased","unpledged","unplowed","unplug","unpopular","unproven","unquote","unranked","unrated","unraveled","unreached","unread","unreal","unreeling","unrefined","unrelated","unrented","unrest","unretired","unrevised","unrigged","unripe","unrivaled","unroasted","unrobed","unroll","unruffled","unruly","unrushed","unsaddle","unsafe","unsaid","unsalted","unsaved","unsavory","unscathed","unscented","unscrew","unsealed","unseated","unsecured","unseeing","unseemly","unseen","unselect","unselfish","unsent","unsettled","unshackle","unshaken","unshaved","unshaven","unsheathe","unshipped","unsightly","unsigned","unskilled","unsliced","unsmooth","unsnap","unsocial","unsoiled","unsold","unsolved","unsorted","unspoiled","unspoken","unstable","unstaffed","unstamped","unsteady","unsterile","unstirred","unstitch","unstopped","unstuck","unstuffed","unstylish","unsubtle","unsubtly","unsuited","unsure","unsworn","untagged","untainted","untaken","untamed","untangled","untapped","untaxed","unthawed","unthread","untidy","untie","until","untimed","untimely","untitled","untoasted","untold","untouched","untracked","untrained","untreated","untried","untrimmed","untrue","untruth","unturned","untwist","untying","unusable","unused","unusual","unvalued","unvaried","unvarying","unveiled","unveiling","unvented","unviable","unvisited","unvocal","unwanted","unwarlike","unwary","unwashed","unwatched","unweave","unwed","unwelcome","unwell","unwieldy","unwilling","unwind","unwired","unwitting","unwomanly","unworldly","unworn","unworried","unworthy","unwound","unwoven","unwrapped","unwritten","unzip","upbeat","upchuck","upcoming","upcountry","update","upfront","upgrade","upheaval","upheld","uphill","uphold","uplifted","uplifting","upload","upon","upper","upright","uprising","upriver","uproar","uproot","upscale","upside","upstage","upstairs","upstart","upstate","upstream","upstroke","upswing","uptake","uptight","uptown","upturned","upward","upwind","uranium","urban","urchin","urethane","urgency","urgent","urging","urologist","urology","usable","usage","useable","used","uselessly","user","usher","usual","utensil","utility","utilize","utmost","utopia","utter","vacancy","vacant","vacate","vacation","vagabond","vagrancy","vagrantly","vaguely","vagueness","valiant","valid","valium","valley","valuables","value","vanilla","vanish","vanity","vanquish","vantage","vaporizer","variable","variably","varied","variety","various","varmint","varnish","varsity","varying","vascular","vaseline","vastly","vastness","veal","vegan","veggie","vehicular","velcro","velocity","velvet","vendetta","vending","vendor","veneering","vengeful","venomous","ventricle","venture","venue","venus","verbalize","verbally","verbose","verdict","verify","verse","version","versus","vertebrae","vertical","vertigo","very","vessel","vest","veteran","veto","vexingly","viability","viable","vibes","vice","vicinity","victory","video","viewable","viewer","viewing","viewless","viewpoint","vigorous","village","villain","vindicate","vineyard","vintage","violate","violation","violator","violet","violin","viper","viral","virtual","virtuous","virus","visa","viscosity","viscous","viselike","visible","visibly","vision","visiting","visitor","visor","vista","vitality","vitalize","vitally","vitamins","vivacious","vividly","vividness","vixen","vocalist","vocalize","vocally","vocation","voice","voicing","void","volatile","volley","voltage","volumes","voter","voting","voucher","vowed","vowel","voyage","wackiness","wad","wafer","waffle","waged","wager","wages","waggle","wagon","wake","waking","walk","walmart","walnut","walrus","waltz","wand","wannabe","wanted","wanting","wasabi","washable","washbasin","washboard","washbowl","washcloth","washday","washed","washer","washhouse","washing","washout","washroom","washstand","washtub","wasp","wasting","watch","water","waviness","waving","wavy","whacking","whacky","wham","wharf","wheat","whenever","whiff","whimsical","whinny","whiny","whisking","whoever","whole","whomever","whoopee","whooping","whoops","why","wick","widely","widen","widget","widow","width","wieldable","wielder","wife","wifi","wikipedia","wildcard","wildcat","wilder","wildfire","wildfowl","wildland","wildlife","wildly","wildness","willed","willfully","willing","willow","willpower","wilt","wimp","wince","wincing","wind","wing","winking","winner","winnings","winter","wipe","wired","wireless","wiring","wiry","wisdom","wise","wish","wisplike","wispy","wistful","wizard","wobble","wobbling","wobbly","wok","wolf","wolverine","womanhood","womankind","womanless","womanlike","womanly","womb","woof","wooing","wool","woozy","word","work","worried","worrier","worrisome","worry","worsening","worshiper","worst","wound","woven","wow","wrangle","wrath","wreath","wreckage","wrecker","wrecking","wrench","wriggle","wriggly","wrinkle","wrinkly","wrist","writing","written","wrongdoer","wronged","wrongful","wrongly","wrongness","wrought","xbox","xerox","yahoo","yam","yanking","yapping","yard","yarn","yeah","yearbook","yearling","yearly","yearning","yeast","yelling","yelp","yen","yesterday","yiddish","yield","yin","yippee","yo-yo","yodel","yoga","yogurt","yonder","yoyo","yummy","zap","zealous","zebra","zen","zeppelin","zero","zestfully","zesty","zigzagged","zipfile","zipping","zippy","zips","zit","zodiac","zombie","zone","zoning","zookeeper","zoologist","zoology","zoom"]},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(672),a=n(70),s=function(){function e(e,t,n){this.apiService=e,this.storageService=t,this.notificationsService=n}return e.prototype.getWebVaultUrl=function(){return null!=this.webVaultUrl?this.webVaultUrl:this.baseUrl?this.baseUrl:null},e.prototype.setUrlsFromStorage=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.storageService.get(a.ConstantsService.environmentUrlsKey)];case 1:return e=r.sent(),t=e||{base:null,api:null,identity:null,icons:null,notifications:null,events:null,webVault:null,enterprise:null},n=new o.EnvironmentUrls,t.base?(this.baseUrl=n.base=t.base,this.apiService.setUrls(n),[2]):(this.webVaultUrl=t.webVault,this.apiUrl=n.api=t.api,this.identityUrl=n.identity=t.identity,this.iconsUrl=t.icons,this.notificationsUrl=t.notifications,this.eventsUrl=n.events=t.events,this.enterpriseUrl=t.enterprise,this.apiService.setUrls(n),[2])}}))}))},e.prototype.setUrls=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return e.base=this.formatUrl(e.base),e.webVault=this.formatUrl(e.webVault),e.api=this.formatUrl(e.api),e.identity=this.formatUrl(e.identity),e.icons=this.formatUrl(e.icons),e.notifications=this.formatUrl(e.notifications),e.events=this.formatUrl(e.events),e.enterprise=this.formatUrl(e.enterprise),[4,this.storageService.save(a.ConstantsService.environmentUrlsKey,{base:e.base,api:e.api,identity:e.identity,webVault:e.webVault,icons:e.icons,notifications:e.notifications,events:e.events,enterprise:e.enterprise})];case 1:return n.sent(),this.baseUrl=e.base,this.webVaultUrl=e.webVault,this.apiUrl=e.api,this.identityUrl=e.identity,this.iconsUrl=e.icons,this.notificationsUrl=e.notifications,this.eventsUrl=e.events,this.enterpriseUrl=e.enterprise,t=new o.EnvironmentUrls,this.baseUrl?t.base=this.baseUrl:(t.api=this.apiUrl,t.identity=this.identityUrl,t.events=this.eventsUrl),this.apiService.setUrls(t),null!=this.notificationsService&&this.notificationsService.init(this),[2,e]}}))}))},e.prototype.formatUrl=function(e){return null==e||""===e?null:((e=e.replace(/\/+$/g,"")).startsWith("http://")||e.startsWith("https://")||(e="https://"+e),e.trim())},e}();t.EnvironmentService=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(515),a=n(516),s=n(512),l=n(127),c=n(692),p=n(30),u="folders_",d="ciphers_",m=function(){function e(e,t,n,r,i,o){this.cryptoService=e,this.userService=t,this.apiService=n,this.storageService=r,this.i18nService=i,this.cipherService=o}return e.prototype.clearCache=function(){this.decryptedFolderCache=null},e.prototype.encrypt=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return(n=new a.Folder).id=e.id,r=n,[4,this.cryptoService.encrypt(e.name,t)];case 1:return r.name=i.sent(),[2,n]}}))}))},e.prototype.get=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getUserId()];case 1:return t=r.sent(),[4,this.storageService.get(u+t)];case 2:return null!=(n=r.sent())&&n.hasOwnProperty(e)?[2,new a.Folder(n[e])]:[2,null]}}))}))},e.prototype.getAll=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return e=i.sent(),[4,this.storageService.get(u+e)];case 2:for(r in t=i.sent(),n=[],t)t.hasOwnProperty(r)&&n.push(new a.Folder(t[r]));return[2,n]}}))}))},e.prototype.getAllDecrypted=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return null!=this.decryptedFolderCache?[2,this.decryptedFolderCache]:[4,this.cryptoService.hasKey()];case 1:if(!r.sent())throw new Error("No key.");return e=[],t=[],[4,this.getAll()];case 2:return r.sent().forEach((function(n){t.push(n.decrypt().then((function(t){return e.push(t)})))})),[4,Promise.all(t)];case 3:return r.sent(),e.sort(p.Utils.getSortFunction(this.i18nService,"name")),(n=new l.FolderView).name=this.i18nService.t("noneFolder"),e.push(n),this.decryptedFolderCache=e,[2,this.decryptedFolderCache]}}))}))},e.prototype.getAllNested=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getAllDecrypted()];case 1:return e=n.sent(),t=[],e.forEach((function(e){var n=new l.FolderView;n.id=e.id,n.revisionDate=e.revisionDate;var r=null!=e.name?e.name.replace(/^\/+|\/+$/g,"").split("/"):[];c.ServiceUtils.nestedTraverse(t,0,r,n,null,"/")})),[2,t]}}))}))},e.prototype.getNested=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getAllNested()];case 1:return t=n.sent(),[2,c.ServiceUtils.getTreeNodeObject(t,e)]}}))}))},e.prototype.saveWithServer=function(e){return r(this,void 0,void 0,(function(){var t,n,r,a;return i(this,(function(i){switch(i.label){case 0:return t=new s.FolderRequest(e),null!=e.id?[3,2]:[4,this.apiService.postFolder(t)];case 1:return n=i.sent(),e.id=n.id,[3,4];case 2:return[4,this.apiService.putFolder(e.id,t)];case 3:n=i.sent(),i.label=4;case 4:return[4,this.userService.getUserId()];case 5:return r=i.sent(),a=new o.FolderData(n,r),[4,this.upsert(a)];case 6:return i.sent(),[2]}}))}))},e.prototype.upsert=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(u+t)];case 2:return null==(n=i.sent())&&(n={}),e instanceof o.FolderData?n[(r=e).id]=r:e.forEach((function(e){n[e.id]=e})),[4,this.storageService.save(u+t,n)];case 3:return i.sent(),this.decryptedFolderCache=null,[2]}}))}))},e.prototype.replace=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.getUserId()];case 1:return t=n.sent(),[4,this.storageService.save(u+t,e)];case 2:return n.sent(),this.decryptedFolderCache=null,[2]}}))}))},e.prototype.clear=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.remove(u+e)];case 1:return t.sent(),this.decryptedFolderCache=null,[2]}}))}))},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(u+t)];case 2:if(null==(n=i.sent()))return[2];if("string"==typeof e){if(null==n[e])return[2];delete n[e]}else e.forEach((function(e){delete n[e]}));return[4,this.storageService.save(u+t,n)];case 3:return i.sent(),this.decryptedFolderCache=null,[4,this.storageService.get(d+t)];case 4:if(null!=(r=i.sent())){for(a in o=[],r)r[a].folderId===e&&(r[a].folderId=null,o.push(r[a]));o.length>0&&this.cipherService.upsert(o)}return[2]}}))}))},e.prototype.deleteWithServer=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.deleteFolder(e)];case 1:return t.sent(),[4,this.delete(e)];case 2:return t.sent(),[2]}}))}))},e}();t.FolderService=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n){this.systemLanguage=e,this.localesDirectory=t,this.getLocalesJson=n,this.supportedTranslationLocales=["en"],this.localeNames=new Map([["af","Afrikaans"],["be","Беларуская"],["bg","български"],["ca","català"],["cs","čeština"],["da","dansk"],["de","Deutsch"],["el","Ελληνικά"],["en","English"],["en-GB","English (British)"],["eo","Esperanto"],["es","español"],["et","eesti"],["fa","فارسی"],["fi","suomi"],["fr","français"],["he","עברית"],["hi","हिन्दी"],["hr","hrvatski"],["hu","magyar"],["id","Bahasa Indonesia"],["it","italiano"],["ja","日本語"],["ko","한국어"],["lv","Latvietis"],["ml","മലയാളം"],["nb","norsk (bokmål)"],["nl","Nederlands"],["pl","polski"],["pt-BR","português do Brasil"],["pt-PT","português"],["ro","română"],["ru","русский"],["sk","slovenčina"],["sr","Српски"],["sv","svenska"],["th","ไทย"],["tr","Türkçe"],["uk","українська"],["vi","Tiếng Việt"],["zh-CN","中文(中国大陆)"],["zh-TW","中文(台灣)"]]),this.defaultMessages={},this.localeMessages={},this.systemLanguage=e.replace("_","-")}return e.prototype.init=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:if(this.inited)throw new Error("i18n already initialized.");if(null==this.supportedTranslationLocales||0===this.supportedTranslationLocales.length)throw new Error("supportedTranslationLocales not set.");this.inited=!0,this.locale=this.translationLocale=null!=e?e:this.systemLanguage;try{this.collator=new Intl.Collator(this.locale,{numeric:!0,sensitivity:"base"})}catch(n){this.collator=null}return-1===this.supportedTranslationLocales.indexOf(this.translationLocale)&&(this.translationLocale=this.translationLocale.slice(0,2),-1===this.supportedTranslationLocales.indexOf(this.translationLocale)&&(this.translationLocale=this.supportedTranslationLocales[0])),null==this.localesDirectory?[3,3]:[4,this.loadMessages(this.translationLocale,this.localeMessages)];case 1:return t.sent(),this.translationLocale===this.supportedTranslationLocales[0]?[3,3]:[4,this.loadMessages(this.supportedTranslationLocales[0],this.defaultMessages)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},e.prototype.t=function(e,t,n,r){return this.translate(e,t,n,r)},e.prototype.translate=function(e,t,n,r){var i;return""!==(i=this.localeMessages.hasOwnProperty(e)&&this.localeMessages[e]?this.localeMessages[e]:this.defaultMessages.hasOwnProperty(e)&&this.defaultMessages[e]?this.defaultMessages[e]:"")&&(null!=t&&(i=i.split("__$1__").join(t)),null!=n&&(i=i.split("__$2__").join(n)),null!=r&&(i=i.split("__$3__").join(r))),i},e.prototype.loadMessages=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s,l;return i(this,(function(i){switch(i.label){case 0:return n=e.replace("-","_"),[4,this.getLocalesJson(n)];case 1:for(o in r=i.sent())if(r.hasOwnProperty(o)&&(t[o]=r[o].message,r[o].placeholders))for(a in r[o].placeholders)r[o].placeholders.hasOwnProperty(a)&&r[o].placeholders[a].content&&(s="\\$"+a.toUpperCase()+"\\$","$1"!==(l=r[o].placeholders[a].content)&&"$2"!==l&&"$3"!==l||(l="__$"+l+"__"),t[o]=t[o].replace(new RegExp(s,"g"),l));return[2]}}))}))},e}();t.I18nService=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(943),a=n(105),s=n(673),l=n(948),c=n(695),p=n(141),u={length:14,ambiguous:!1,number:!0,minNumber:1,uppercase:!0,minUppercase:0,lowercase:!0,minLowercase:0,special:!1,minSpecial:1,type:"password",numWords:3,wordSeparator:"-",capitalize:!1,includeNumber:!1},d="passwordGenerationOptions",m="generatedPasswordHistory",h=function(){function e(e,t,n){this.cryptoService=e,this.storageService=t,this.policyService=n}return e.prototype.generatePassword=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,l,c,p,d,m,h;return i(this,(function(i){switch(i.label){case 0:if("passphrase"===(t=Object.assign({},u,e)).type)return[2,this.generatePassphrase(e)];if(this.sanitizePasswordLength(t,!0),n=t.minUppercase+t.minLowercase+t.minNumber+t.minSpecial,t.length<n&&(t.length=n),r=[],t.lowercase&&t.minLowercase>0)for(d=0;d<t.minLowercase;d++)r.push("l");if(t.uppercase&&t.minUppercase>0)for(d=0;d<t.minUppercase;d++)r.push("u");if(t.number&&t.minNumber>0)for(d=0;d<t.minNumber;d++)r.push("n");if(t.special&&t.minSpecial>0)for(d=0;d<t.minSpecial;d++)r.push("s");for(;r.length<t.length;)r.push("a");return[4,this.shuffleArray(r)];case 1:i.sent(),o="",a="abcdefghijkmnopqrstuvwxyz",t.ambiguous&&(a+="l"),t.lowercase&&(o+=a),s="ABCDEFGHJKLMNPQRSTUVWXYZ",t.ambiguous&&(s+="IO"),t.uppercase&&(o+=s),l="23456789",t.ambiguous&&(l+="01"),t.number&&(o+=l),c="!@#$%^&*",t.special&&(o+=c),p="",d=0,i.label=2;case 2:if(!(d<t.length))return[3,5];switch(m=void 0,r[d]){case"l":m=a;break;case"u":m=s;break;case"n":m=l;break;case"s":m=c;break;case"a":m=o}return[4,this.cryptoService.randomNumber(0,m.length-1)];case 3:h=i.sent(),p+=m.charAt(h),i.label=4;case 4:return d++,[3,2];case 5:return[2,p]}}))}))},e.prototype.generatePassphrase=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:(null==(t=Object.assign({},u,e)).numWords||t.numWords<=2)&&(t.numWords=u.numWords),(null==t.wordSeparator||0===t.wordSeparator.length||t.wordSeparator.length>1)&&(t.wordSeparator=" "),null==t.capitalize&&(t.capitalize=!1),null==t.includeNumber&&(t.includeNumber=!1),n=c.EEFLongWordList.length-1,r=new Array(t.numWords),o=0,i.label=1;case 1:return o<t.numWords?[4,this.cryptoService.randomNumber(0,n)]:[3,4];case 2:a=i.sent(),t.capitalize?r[o]=this.capitalize(c.EEFLongWordList[a]):r[o]=c.EEFLongWordList[a],i.label=3;case 3:return o++,[3,1];case 4:return t.includeNumber?[4,this.appendRandomNumberToRandomWord(r)]:[3,6];case 5:i.sent(),i.label=6;case 6:return[2,r.join(t.wordSeparator)]}}))}))},e.prototype.getOptions=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null!=this.optionsCache?[3,2]:[4,this.storageService.get(d)];case 1:e=n.sent(),this.optionsCache=null==e?u:Object.assign({},u,e),n.label=2;case 2:return[4,this.enforcePasswordGeneratorPoliciesOnOptions(this.optionsCache)];case 3:return t=n.sent(),this.optionsCache=t[0],[2,[this.optionsCache,t[1]]]}}))}))},e.prototype.enforcePasswordGeneratorPoliciesOnOptions=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getPasswordGeneratorPolicyOptions()];case 1:return null!=(t=n.sent())?(e.length<t.minLength&&(e.length=t.minLength),t.useUppercase&&(e.uppercase=!0),t.useLowercase&&(e.lowercase=!0),t.useNumbers&&(e.number=!0),e.minNumber<t.numberCount&&(e.minNumber=t.numberCount),t.useSpecial&&(e.special=!0),e.minSpecial<t.specialCount&&(e.minSpecial=t.specialCount),e.minSpecial+e.minNumber>e.length&&(e.minSpecial=e.length-e.minNumber),e.numWords<t.minNumberWords&&(e.numWords=t.minNumberWords),t.capitalize&&(e.capitalize=!0),t.includeNumber&&(e.includeNumber=!0),"password"!==t.defaultType&&"passphrase"!==t.defaultType||(e.type=t.defaultType)):t=new l.PasswordGeneratorPolicyOptions,[2,[e,t]]}}))}))},e.prototype.getPasswordGeneratorPolicyOptions=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return null!=this.policyService?[3,1]:(t=null,[3,3]);case 1:return[4,this.policyService.getAll(p.PolicyType.PasswordGenerator)];case 2:t=r.sent(),r.label=3;case 3:return n=null,null==(e=t)||0===e.length?[2,n]:(e.forEach((function(e){e.enabled&&null!=e.data&&(null==n&&(n=new l.PasswordGeneratorPolicyOptions),null!=e.data.defaultType&&"password"!==n.defaultType&&(n.defaultType=e.data.defaultType),null!=e.data.minLength&&e.data.minLength>n.minLength&&(n.minLength=e.data.minLength),e.data.useUpper&&(n.useUppercase=!0),e.data.useLower&&(n.useLowercase=!0),e.data.useNumbers&&(n.useNumbers=!0),null!=e.data.minNumbers&&e.data.minNumbers>n.numberCount&&(n.numberCount=e.data.minNumbers),e.data.useSpecial&&(n.useSpecial=!0),null!=e.data.minSpecial&&e.data.minSpecial>n.specialCount&&(n.specialCount=e.data.minSpecial),null!=e.data.minNumberWords&&e.data.minNumberWords>n.minNumberWords&&(n.minNumberWords=e.data.minNumberWords),e.data.capitalize&&(n.capitalize=!0),e.data.includeNumber&&(n.includeNumber=!0))})),[2,n])}}))}))},e.prototype.saveOptions=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.save(d,e)];case 1:return t.sent(),this.optionsCache=e,[2]}}))}))},e.prototype.getHistory=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.hasKey()];case 1:return n.sent()?this.history?[3,4]:[4,this.storageService.get(m)]:[2,new Array];case 2:return e=n.sent(),t=this,[4,this.decryptHistory(e)];case 3:t.history=n.sent(),n.label=4;case 4:return[2,this.history||new Array]}}))}))},e.prototype.addHistory=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.cryptoService.hasKey()];case 1:return r.sent()?[4,this.getHistory()]:[2];case 2:return t=r.sent(),this.matchesPrevious(e,t)?[2]:(t.unshift(new s.GeneratedPasswordHistory(e,Date.now())),t.length>100&&t.pop(),[4,this.encryptHistory(t)]);case 3:return n=r.sent(),[4,this.storageService.save(m,n)];case 4:return[2,r.sent()]}}))}))},e.prototype.clear=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.history=[],[4,this.storageService.remove(m)];case 1:return[2,e.sent()]}}))}))},e.prototype.passwordStrength=function(e,t){if(void 0===t&&(t=null),null==e||0===e.length)return null;var n=["bitwarden","bit","warden"];null!=t&&t.length>0&&(n=n.concat(t));var r=Array.from(new Set(n));return o(e,r)},e.prototype.normalizeOptions=function(e,t){e.minLowercase=0,e.minUppercase=0,!e.length||e.length<5?e.length=5:e.length>128&&(e.length=128),e.length<t.minLength&&(e.length=t.minLength),e.minNumber?e.minNumber>e.length?e.minNumber=e.length:e.minNumber>9&&(e.minNumber=9):e.minNumber=0,e.minNumber<t.numberCount&&(e.minNumber=t.numberCount),e.minSpecial?e.minSpecial>e.length?e.minSpecial=e.length:e.minSpecial>9&&(e.minSpecial=9):e.minSpecial=0,e.minSpecial<t.specialCount&&(e.minSpecial=t.specialCount),e.minSpecial+e.minNumber>e.length&&(e.minSpecial=e.length-e.minNumber),null==e.numWords||e.length<3?e.numWords=3:e.numWords>20&&(e.numWords=20),e.numWords<t.minNumberWords&&(e.numWords=t.minNumberWords),null!=e.wordSeparator&&e.wordSeparator.length>1&&(e.wordSeparator=e.wordSeparator[0]),this.sanitizePasswordLength(e,!1)},e.prototype.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.prototype.appendRandomNumberToRandomWord=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return null==e||e.length<=0?[2]:[4,this.cryptoService.randomNumber(0,e.length-1)];case 1:return t=r.sent(),[4,this.cryptoService.randomNumber(0,9)];case 2:return n=r.sent(),e[t]=e[t]+n,[2]}}))}))},e.prototype.encryptHistory=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return null==e||0===e.length?[2,Promise.resolve([])]:(t=e.map((function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.encrypt(e.password)];case 1:return t=n.sent(),[2,new s.GeneratedPasswordHistory(t.encryptedString,e.date)]}}))}))})),[4,Promise.all(t)]);case 1:return[2,o.sent()]}}))}))},e.prototype.decryptHistory=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return null==e||0===e.length?[2,Promise.resolve([])]:(t=e.map((function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.decryptToUtf8(new a.EncString(e.password))];case 1:return t=n.sent(),[2,new s.GeneratedPasswordHistory(t,e.date)]}}))}))})),[4,Promise.all(t)]);case 1:return[2,o.sent()]}}))}))},e.prototype.matchesPrevious=function(e,t){return null!=t&&0!==t.length&&t[t.length-1].password===e},e.prototype.shuffleArray=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:t=e.length-1,i.label=1;case 1:return t>0?[4,this.cryptoService.randomNumber(0,t)]:[3,4];case 2:n=i.sent(),r=[e[n],e[t]],e[t]=r[0],e[n]=r[1],i.label=3;case 3:return t--,[3,1];case 4:return[2]}}))}))},e.prototype.sanitizePasswordLength=function(e,t){var n=0,r=0,i=e.minNumber,o=e.minSpecial;e.uppercase&&e.minUppercase<=0?n=1:e.uppercase||(n=0),e.lowercase&&e.minLowercase<=0?r=1:e.lowercase||(r=0),e.number&&e.minNumber<=0?i=1:e.number||(i=0),e.special&&e.minSpecial<=0?o=1:e.special||(o=0),(!e.length||e.length<1)&&(e.length=10);var a=n+r+i+o;e.length<a&&(e.length=a),t&&(e.minUppercase=n,e.minLowercase=r,e.minNumber=i,e.minSpecial=o)},e}();t.PasswordGenerationService=h},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o="settings_",a="equivalentDomains",s=function(){function e(e,t){this.userService=e,this.storageService=t}return e.prototype.clearCache=function(){this.settingsCache=null},e.prototype.getEquivalentDomains=function(){return this.getSettingsKey(a)},e.prototype.setEquivalentDomains=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.setSettingsKey(a,e)];case 1:return t.sent(),[2]}}))}))},e.prototype.clear=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.remove(o+e)];case 1:return t.sent(),this.clearCache(),[2]}}))}))},e.prototype.getSettings=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.settingsCache?[3,2]:[4,this.userService.getUserId()];case 1:e=t.sent(),this.settingsCache=this.storageService.get(o+e),t.label=2;case 2:return[2,this.settingsCache]}}))}))},e.prototype.getSettingsKey=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getSettings()];case 1:return null!=(t=n.sent())&&t[e]?[2,t[e]]:[2,null]}}))}))},e.prototype.setSettingsKey=function(e,t){return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return n=i.sent(),[4,this.getSettings()];case 2:return(r=i.sent())||(r={}),r[e]=t,[4,this.storageService.save(o+n,r)];case 3:return i.sent(),this.settingsCache=r,[2]}}))}))},e}();t.SettingsService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.state={}}return e.prototype.get=function(e){return this.state.hasOwnProperty(e)?Promise.resolve(this.state[e]):Promise.resolve(null)},e.prototype.save=function(e,t){return this.state[e]=t,Promise.resolve()},e.prototype.remove=function(e){return delete this.state[e],Promise.resolve()},e.prototype.purge=function(){return this.state={},Promise.resolve()},e}();t.StateService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(158),a=n(155),s=n(515),l=n(949),c=n(463),p=n(704),u="lastSync_",d=function(){function e(e,t,n,r,i,o,a,s,l,c,p,u){this.userService=e,this.apiService=t,this.settingsService=n,this.folderService=r,this.cipherService=i,this.cryptoService=o,this.collectionService=a,this.storageService=s,this.messagingService=l,this.policyService=c,this.sendService=p,this.logoutCallback=u,this.syncInProgress=!1}return e.prototype.getLastSync=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.getUserId()];case 1:return null==(e=n.sent())?[2,null]:[4,this.storageService.get(u+e)];case 2:return(t=n.sent())?[2,new Date(t)]:[2,null]}}))}))},e.prototype.setLastSync=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.getUserId()];case 1:return null==(t=n.sent())?[2]:[4,this.storageService.save(u+t,e.toJSON())];case 2:return n.sent(),[2]}}))}))},e.prototype.fullSync=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){var n,r,o,a,s,l;return i(this,(function(i){switch(i.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:if(!i.sent())return[2,this.syncCompleted(!1)];n=new Date,r=!1,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.needsSyncing(e)];case 3:return r=i.sent(),[3,5];case 4:if(o=i.sent(),t)throw o;return[3,5];case 5:return r?[3,7]:[4,this.setLastSync(n)];case 6:return i.sent(),[2,this.syncCompleted(!1)];case 7:return[4,this.userService.getUserId()];case 8:a=i.sent(),i.label=9;case 9:return i.trys.push([9,19,,20]),[4,this.apiService.getSync()];case 10:return s=i.sent(),[4,this.syncProfile(s.profile)];case 11:return i.sent(),[4,this.syncFolders(a,s.folders)];case 12:return i.sent(),[4,this.syncCollections(s.collections)];case 13:return i.sent(),[4,this.syncCiphers(a,s.ciphers)];case 14:return i.sent(),[4,this.syncSends(a,s.sends)];case 15:return i.sent(),[4,this.syncSettings(a,s.domains)];case 16:return i.sent(),[4,this.syncPolicies(s.policies)];case 17:return i.sent(),[4,this.setLastSync(n)];case 18:return i.sent(),[2,this.syncCompleted(!0)];case 19:if(l=i.sent(),t)throw l;return[2,this.syncCompleted(!1)];case 20:return[2]}}))}))},e.prototype.syncUpsertFolder=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:if(!i.sent())return[3,9];i.label=2;case 2:return i.trys.push([2,8,,9]),[4,this.folderService.get(e.id)];case 3:return n=i.sent(),!t&&null==n||t&&null!=n&&n.revisionDate<e.revisionDate?[4,this.apiService.getFolder(e.id)]:[3,7];case 4:return null==(r=i.sent())?[3,7]:[4,this.userService.getUserId()];case 5:return o=i.sent(),[4,this.folderService.upsert(new s.FolderData(r,o))];case 6:return i.sent(),this.messagingService.send("syncedUpsertedFolder",{folderId:e.id}),[2,this.syncCompleted(!0)];case 7:return[3,9];case 8:return i.sent(),[3,9];case 9:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncDeleteFolder=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:return t.sent()?[4,this.folderService.delete(e.id)]:[3,3];case 2:return t.sent(),this.messagingService.send("syncedDeletedFolder",{folderId:e.id}),this.syncCompleted(!0),[2,!0];case 3:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncUpsertCipher=function(e,t){return r(this,void 0,void 0,(function(){var n,r,a,s,l,c,p,u;return i(this,(function(i){switch(i.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:if(!i.sent())return[3,13];i.label=2;case 2:return i.trys.push([2,10,,13]),n=!0,[4,this.cipherService.get(e.id)];case 3:return null!=(r=i.sent())&&r.revisionDate>=e.revisionDate&&(n=!1),a=!1,n&&(t?(n=null!=r,a=!0):null==e.collectionIds||null==e.organizationId?n=null==r:(n=!1,a=!0)),!n&&a&&null!=e.organizationId&&null!=e.collectionIds&&e.collectionIds.length>0?[4,this.collectionService.getAll()]:[3,5];case 4:if(null!=(s=i.sent()))for(l=0;l<s.length;l++)if(e.collectionIds.indexOf(s[l].id)>-1){n=!0;break}i.label=5;case 5:return n?[4,this.apiService.getCipher(e.id)]:[3,9];case 6:return null==(c=i.sent())?[3,9]:[4,this.userService.getUserId()];case 7:return p=i.sent(),[4,this.cipherService.upsert(new o.CipherData(c,p))];case 8:return i.sent(),this.messagingService.send("syncedUpsertedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 9:return[3,13];case 10:return null!=(u=i.sent())&&404===u.statusCode&&t?[4,this.cipherService.delete(e.id)]:[3,12];case 11:return i.sent(),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 12:return[3,13];case 13:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncDeleteCipher=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:return t.sent()?[4,this.cipherService.delete(e.id)]:[3,3];case 2:return t.sent(),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 3:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncUpsertSend=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:if(!i.sent())return[3,9];i.label=2;case 2:return i.trys.push([2,8,,9]),[4,this.sendService.get(e.id)];case 3:return n=i.sent(),!t&&null==n||t&&null!=n&&n.revisionDate<e.revisionDate?[4,this.apiService.getSend(e.id)]:[3,7];case 4:return null==(r=i.sent())?[3,7]:[4,this.userService.getUserId()];case 5:return o=i.sent(),[4,this.sendService.upsert(new p.SendData(r,o))];case 6:return i.sent(),this.messagingService.send("syncedUpsertedSend",{sendId:e.id}),[2,this.syncCompleted(!0)];case 7:return[3,9];case 8:return i.sent(),[3,9];case 9:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncDeleteSend=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:return t.sent()?[4,this.sendService.delete(e.id)]:[3,3];case 2:return t.sent(),this.messagingService.send("syncedDeletedSend",{sendId:e.id}),this.syncCompleted(!0),[2,!0];case 3:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncStarted=function(){this.syncInProgress=!0,this.messagingService.send("syncStarted")},e.prototype.syncCompleted=function(e){return this.syncInProgress=!1,this.messagingService.send("syncCompleted",{successfully:e}),e},e.prototype.needsSyncing=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return e?[2,!0]:[4,this.getLastSync()];case 1:return null==(t=r.sent())||0===t.getTime()?[2,!0]:[4,this.apiService.getAccountRevisionDate()];case 2:return n=r.sent(),new Date(n)<=t?[2,!1]:[2,!0]}}))}))},e.prototype.syncProfile=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getSecurityStamp()];case 1:return null==(t=r.sent())||t===e.securityStamp?[3,4]:null==this.logoutCallback?[3,3]:[4,this.logoutCallback(!0)];case 2:r.sent(),r.label=3;case 3:throw new Error("Stamp has changed");case 4:return[4,this.cryptoService.setEncKey(e.key)];case 5:return r.sent(),[4,this.cryptoService.setEncPrivateKey(e.privateKey)];case 6:return r.sent(),[4,this.cryptoService.setOrgKeys(e.organizations)];case 7:return r.sent(),[4,this.userService.setSecurityStamp(e.securityStamp)];case 8:return r.sent(),[4,this.userService.setEmailVerified(e.emailVerified)];case 9:return r.sent(),n={},e.organizations.forEach((function(e){n[e.id]=new l.OrganizationData(e)})),[4,this.userService.replaceOrganizations(n)];case 10:return[2,r.sent()]}}))}))},e.prototype.syncFolders=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return n={},t.forEach((function(t){n[t.id]=new s.FolderData(t,e)})),[4,this.folderService.replace(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.syncCollections=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t={},e.forEach((function(e){t[e.id]=new a.CollectionData(e)})),[4,this.collectionService.replace(t)];case 1:return[2,n.sent()]}}))}))},e.prototype.syncCiphers=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return n={},t.forEach((function(t){n[t.id]=new o.CipherData(t,e)})),[4,this.cipherService.replace(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.syncSends=function(e,t){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return n={},t.forEach((function(t){n[t.id]=new p.SendData(t,e)})),[4,this.sendService.replace(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.syncSettings=function(e,t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){return e=[],null!=t&&null!=t.equivalentDomains&&(e=e.concat(t.equivalentDomains)),null!=t&&null!=t.globalEquivalentDomains&&t.globalEquivalentDomains.forEach((function(t){t.domains.length>0&&e.push(t.domains)})),[2,this.settingsService.setEquivalentDomains(e)]}))}))},e.prototype.syncPolicies=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t={},null!=e&&e.forEach((function(e){t[e.id]=new c.PolicyData(e)})),[4,this.policyService.replace(t)];case 1:return[2,n.sent()]}}))}))},e}();t.SyncService=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(160),i=n(950),o=n(951),a=function(e,t){if(null!=e)switch(this.id=e.id,this.accessId=e.accessId,this.userId=t,this.type=e.type,this.name=e.name,this.notes=e.notes,this.key=e.key,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.revisionDate=e.revisionDate,this.expirationDate=e.expirationDate,this.deletionDate=e.deletionDate,this.password=e.password,this.disabled=e.disable,this.hideEmail=e.hideEmail,this.type){case r.SendType.Text:this.text=new o.SendTextData(e.text);break;case r.SendType.File:this.file=new i.SendFileData(e.file)}};t.SendData=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(30),s="accessToken",l="refreshToken",c="twoFactorToken_",p=function(){function e(e){this.storageService=e}return e.prototype.setTokens=function(e,t){return Promise.all([this.setToken(e),this.setRefreshToken(t)])},e.prototype.setToken=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.token=e,this.decodedToken=null,[4,this.skipTokenStorage()];case 1:return t.sent()?[2]:[2,this.storageService.save(s,e)]}}))}))},e.prototype.getToken=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.token?[2,this.token]:(e=this,[4,this.storageService.get(s)]);case 1:return e.token=t.sent(),[2,this.token]}}))}))},e.prototype.setRefreshToken=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.refreshToken=e,[4,this.skipTokenStorage()];case 1:return t.sent()?[2]:[2,this.storageService.save(l,e)]}}))}))},e.prototype.getRefreshToken=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.refreshToken?[2,this.refreshToken]:(e=this,[4,this.storageService.get(l)]);case 1:return e.refreshToken=t.sent(),[2,this.refreshToken]}}))}))},e.prototype.toggleTokens=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.getToken()];case 1:return e=i.sent(),[4,this.getRefreshToken()];case 2:return t=i.sent(),[4,this.storageService.get(o.ConstantsService.vaultTimeoutKey)];case 3:return n=i.sent(),[4,this.storageService.get(o.ConstantsService.vaultTimeoutActionKey)];case 4:return r=i.sent(),null==n&&0!==n||"logOut"!==r?[3,6]:[4,this.clearToken()];case 5:return i.sent(),this.token=e,this.refreshToken=t,[2];case 6:return[4,this.setToken(e)];case 7:return i.sent(),[4,this.setRefreshToken(t)];case 8:return i.sent(),[2]}}))}))},e.prototype.setTwoFactorToken=function(e,t){return this.storageService.save(c+t,e)},e.prototype.getTwoFactorToken=function(e){return this.storageService.get(c+e)},e.prototype.clearTwoFactorToken=function(e){return this.storageService.remove(c+e)},e.prototype.clearToken=function(){return this.token=null,this.decodedToken=null,this.refreshToken=null,Promise.all([this.storageService.remove(s),this.storageService.remove(l)])},e.prototype.decodeToken=function(){if(this.decodedToken)return this.decodedToken;if(null==this.token)throw new Error("Token not found.");var e=this.token.split(".");if(3!==e.length)throw new Error("JWT must have 3 parts");var t=a.Utils.fromUrlB64ToUtf8(e[1]);if(null==t)throw new Error("Cannot decode the token");return this.decodedToken=JSON.parse(t),this.decodedToken},e.prototype.getTokenExpirationDate=function(){var e=this.decodeToken();if(void 0===e.exp)return null;var t=new Date(0);return t.setUTCSeconds(e.exp),t},e.prototype.tokenSecondsRemaining=function(e){void 0===e&&(e=0);var t=this.getTokenExpirationDate();if(null==t)return 0;var n=t.valueOf()-((new Date).valueOf()+1e3*e);return Math.round(n/1e3)},e.prototype.tokenNeedsRefresh=function(e){return void 0===e&&(e=5),this.tokenSecondsRemaining()<60*e},e.prototype.getUserId=function(){var e=this.decodeToken();if(void 0===e.sub)throw new Error("No user id found");return e.sub},e.prototype.getEmail=function(){var e=this.decodeToken();if(void 0===e.email)throw new Error("No email found");return e.email},e.prototype.getEmailVerified=function(){var e=this.decodeToken();if(void 0===e.email_verified)throw new Error("No email verification found");return e.email_verified},e.prototype.getName=function(){var e=this.decodeToken();return void 0===e.name?null:e.name},e.prototype.getPremium=function(){var e=this.decodeToken();return void 0!==e.premium&&e.premium},e.prototype.getIssuer=function(){var e=this.decodeToken();if(void 0===e.iss)throw new Error("No issuer found");return e.iss},e.prototype.skipTokenStorage=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.storageService.get(o.ConstantsService.vaultTimeoutKey)];case 1:return e=n.sent(),[4,this.storageService.get(o.ConstantsService.vaultTimeoutActionKey)];case 2:return t=n.sent(),[2,null!=e&&"logOut"===t]}}))}))},e}();t.TokenService=p},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(30),s="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",l="23456789BCDFGHJKMNPQRTVWXY",c=function(){function e(e,t){this.storageService=e,this.cryptoFunctionService=t}return e.prototype.getCode=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,s,c,p,u,d,m,h,f,v,y,g,x,b,S,w,C;return i(this,(function(i){switch(i.label){case 0:if(null==e)return[2,null];if(t=30,n="sha1",r=6,o=e,s=0===e.toLowerCase().indexOf("otpauth://"),c=!s&&0===e.toLowerCase().indexOf("steam://"),s){if((p=a.Utils.getQueryParams(e)).has("digits")&&null!=p.get("digits"))try{(u=parseInt(p.get("digits").trim(),null))>10?r=10:u>0&&(r=u)}catch(I){}if(p.has("period")&&null!=p.get("period"))try{(d=parseInt(p.get("period").trim(),null))>0&&(t=d)}catch(E){}p.has("secret")&&null!=p.get("secret")&&(o=p.get("secret")),p.has("algorithm")&&null!=p.get("algorithm")&&("sha1"!==(m=p.get("algorithm").toLowerCase())&&"sha256"!==m&&"sha512"!==m||(n=m))}else c&&(o=e.substr("steam://".length),r=5);return h=Math.round((new Date).getTime()/1e3),f=this.leftPad(this.decToHex(Math.floor(h/t)),16,"0"),v=a.Utils.fromHexToArray(f),(y=this.b32ToBytes(o)).length&&v.length?[4,this.sign(y,v,n)]:[2,null];case 1:if(0===(g=i.sent()).length)return[2,null];if(x=15&g[g.length-1],b=(127&g[x])<<24|(255&g[x+1])<<16|(255&g[x+2])<<8|255&g[x+3],S="",c)for(w=2147483647&b,C=0;C<r;C++)S+=l[w%l.length],w=Math.trunc(w/l.length);else S=(b%Math.pow(10,r)).toString(),S=this.leftPad(S,r,"0");return[2,S]}}))}))},e.prototype.getTimeInterval=function(e){var t=30;if(null!=e&&0===e.toLowerCase().indexOf("otpauth://")){var n=a.Utils.getQueryParams(e);if(n.has("period")&&null!=n.get("period"))try{t=parseInt(n.get("period").trim(),null)}catch(r){}}return t},e.prototype.isAutoCopyEnabled=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get(o.ConstantsService.disableAutoTotpCopyKey)];case 1:return[2,!e.sent()]}}))}))},e.prototype.leftPad=function(e,t,n){return t+1>=e.length&&(e=Array(t+1-e.length).join(n)+e),e},e.prototype.decToHex=function(e){return(e<15.5?"0":"")+Math.round(e).toString(16)},e.prototype.b32ToHex=function(e){e=e.toUpperCase();for(var t="",n=0;n<e.length;n++)s.indexOf(e[n])<0||(t+=e[n]);e=t;var r="",i="";for(n=0;n<e.length;n++){var o=s.indexOf(e.charAt(n));o<0||(r+=this.leftPad(o.toString(2),5,"0"))}for(n=0;n+4<=r.length;n+=4){var a=r.substr(n,4);i+=parseInt(a,2).toString(16)}return i},e.prototype.b32ToBytes=function(e){return a.Utils.fromHexToArray(this.b32ToHex(e))},e.prototype.sign=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoFunctionService.hmac(t.buffer,e.buffer,n)];case 1:return r=i.sent(),[2,new Uint8Array(r)]}}))}))},e}();t.TotpService=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(295),a="userId",s="userEmail",l="securityStamp",c="kdf",p="kdfIterations",u="organizations_",d="emailVerified",m=function(){function e(e,t){this.tokenService=e,this.storageService=t}return e.prototype.setInformation=function(e,t,n,r){return this.email=t,this.userId=e,this.kdf=n,this.kdfIterations=r,Promise.all([this.storageService.save(s,t),this.storageService.save(a,e),this.storageService.save(c,n),this.storageService.save(p,r)])},e.prototype.setSecurityStamp=function(e){return this.stamp=e,this.storageService.save(l,e)},e.prototype.setEmailVerified=function(e){return this.emailVerified=e,this.storageService.save(d,e)},e.prototype.getUserId=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.userId?[3,2]:(e=this,[4,this.storageService.get(a)]);case 1:e.userId=t.sent(),t.label=2;case 2:return[2,this.userId]}}))}))},e.prototype.getEmail=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.email?[3,2]:(e=this,[4,this.storageService.get(s)]);case 1:e.email=t.sent(),t.label=2;case 2:return[2,this.email]}}))}))},e.prototype.getSecurityStamp=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.stamp?[3,2]:(e=this,[4,this.storageService.get(l)]);case 1:e.stamp=t.sent(),t.label=2;case 2:return[2,this.stamp]}}))}))},e.prototype.getKdf=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.kdf?[3,2]:(e=this,[4,this.storageService.get(c)]);case 1:e.kdf=t.sent(),t.label=2;case 2:return[2,this.kdf]}}))}))},e.prototype.getKdfIterations=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.kdfIterations?[3,2]:(e=this,[4,this.storageService.get(p)]);case 1:e.kdfIterations=t.sent(),t.label=2;case 2:return[2,this.kdfIterations]}}))}))},e.prototype.getEmailVerified=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.emailVerified?[3,2]:(e=this,[4,this.storageService.get(d)]);case 1:e.emailVerified=t.sent(),t.label=2;case 2:return[2,this.emailVerified]}}))}))},e.prototype.clear=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getUserId()];case 1:return e=t.sent(),[4,Promise.all([this.storageService.remove(a),this.storageService.remove(s),this.storageService.remove(l),this.storageService.remove(c),this.storageService.remove(p),this.clearOrganizations(e)])];case 2:return t.sent(),this.userId=this.email=this.stamp=null,this.kdf=null,this.kdfIterations=null,[2]}}))}))},e.prototype.isAuthenticated=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.tokenService.getToken()];case 1:return null==e.sent()?[2,!1]:[4,this.getUserId()];case 2:return[2,null!=e.sent()]}}))}))},e.prototype.canAccessPremium=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.isAuthenticated()];case 1:return n.sent()?this.tokenService.getPremium()?[2,!0]:[4,this.getAllOrganizations()]:[2,!1];case 2:for(e=n.sent(),t=0;t<e.length;t++)if(e[t].usersGetPremium&&e[t].enabled)return[2,!0];return[2,!1]}}))}))},e.prototype.getOrganization=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.getUserId()];case 1:return t=r.sent(),[4,this.storageService.get(u+t)];case 2:return null!=(n=r.sent())&&n.hasOwnProperty(e)?[2,new o.Organization(n[e])]:[2,null]}}))}))},e.prototype.getAllOrganizations=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.getUserId()];case 1:return e=i.sent(),[4,this.storageService.get(u+e)];case 2:for(r in t=i.sent(),n=[],t)t.hasOwnProperty(r)&&n.push(new o.Organization(t[r]));return[2,n]}}))}))},e.prototype.replaceOrganizations=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getUserId()];case 1:return t=n.sent(),[4,this.storageService.save(u+t,e)];case 2:return n.sent(),[2]}}))}))},e.prototype.clearOrganizations=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.remove(u+e)];case 1:return t.sent(),[2]}}))}))},e}();t.UserService=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=function(){function e(e,t,n,r,i,o,a,s,l,c,p,u){void 0===p&&(p=null),void 0===u&&(u=null),this.cipherService=e,this.folderService=t,this.collectionService=n,this.cryptoService=r,this.platformUtilsService=i,this.storageService=o,this.messagingService=a,this.searchService=s,this.userService=l,this.tokenService=c,this.lockedCallback=p,this.loggedOutCallback=u,this.pinProtectedKey=null,this.biometricLocked=!0,this.inited=!1}return e.prototype.init=function(e){this.inited||(this.inited=!0,e&&this.startCheck())},e.prototype.startCheck=function(){var e=this;this.checkVaultTimeout(),setInterval((function(){return e.checkVaultTimeout()}),1e4)},e.prototype.isLocked=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.cryptoService.hasKey()];case 1:return(e=t.sent())?[4,this.isBiometricLockSet()]:[3,3];case 2:if(t.sent()&&this.biometricLocked)return[2,!0];t.label=3;case 3:return[2,!e]}}))}))},e.prototype.checkVaultTimeout=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.platformUtilsService.isViewOpen()];case 1:return r.sent()?[2]:[4,this.userService.isAuthenticated()];case 2:return r.sent()?[4,this.isLocked()]:[2];case 3:return r.sent()?[2]:null!=(e=this.platformUtilsService.lockTimeout())?[3,5]:[4,this.storageService.get(o.ConstantsService.vaultTimeoutKey)];case 4:e=r.sent(),r.label=5;case 5:return null==e||e<0?[2]:[4,this.storageService.get(o.ConstantsService.lastActiveKey)];case 6:return null==(t=r.sent())?[2]:(n=60*e,((new Date).getTime()-t)/1e3>=n?[4,this.storageService.get(o.ConstantsService.vaultTimeoutActionKey)]:[3,12]);case 7:return"logOut"!==r.sent()?[3,9]:[4,this.logOut()];case 8:return r.sent(),[3,11];case 9:return[4,this.lock(!0)];case 10:r.sent(),r.label=11;case 11:r.label=12;case 12:return[2]}}))}))},e.prototype.lock=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return t.sent()?(this.biometricLocked=!0,e?[4,this.isBiometricLockSet()]:[3,5]):[2];case 2:return t.sent()&&this.platformUtilsService.supportsSecureStorage()?(this.messagingService.send("locked"),null==this.lockedCallback?[3,4]:[4,this.lockedCallback()]):[3,5];case 3:t.sent(),t.label=4;case 4:return[2];case 5:return[4,Promise.all([this.cryptoService.clearKey(),this.cryptoService.clearOrgKeys(!0),this.cryptoService.clearKeyPair(!0),this.cryptoService.clearEncKey(!0)])];case 6:return t.sent(),this.folderService.clearCache(),this.cipherService.clearCache(),this.collectionService.clearCache(),this.searchService.clearIndex(),this.messagingService.send("locked"),null==this.lockedCallback?[3,8]:[4,this.lockedCallback()];case 7:t.sent(),t.label=8;case 8:return[2]}}))}))},e.prototype.logOut=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null==this.loggedOutCallback?[3,2]:[4,this.loggedOutCallback()];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.setVaultTimeoutOptions=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.storageService.save(o.ConstantsService.vaultTimeoutKey,e)];case 1:return n.sent(),[4,this.storageService.save(o.ConstantsService.vaultTimeoutActionKey,t)];case 2:return n.sent(),[4,this.cryptoService.toggleKey()];case 3:return n.sent(),[4,this.tokenService.toggleTokens()];case 4:return n.sent(),[2]}}))}))},e.prototype.isPinLockSet=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.storageService.get(o.ConstantsService.protectedPin)];case 1:return e=n.sent(),[4,this.storageService.get(o.ConstantsService.pinProtectedKey)];case 2:return t=n.sent(),[2,[null!=e,null!=t]]}}))}))},e.prototype.isBiometricLockSet=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get(o.ConstantsService.biometricUnlockKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.clear=function(){return this.pinProtectedKey=null,this.storageService.remove(o.ConstantsService.protectedPin)},e}();t.VaultTimeoutService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(710),i=n(955),o=function(){function e(e,t){void 0===t&&(t=null),this.isDev=e,this.filter=t,this.timersMap=new Map}return e.prototype.debug=function(e){this.isDev&&this.write(r.LogLevelType.Debug,e)},e.prototype.info=function(e){this.write(r.LogLevelType.Info,e)},e.prototype.warning=function(e){this.write(r.LogLevelType.Warning,e)},e.prototype.error=function(e){this.write(r.LogLevelType.Error,e)},e.prototype.write=function(e,t){if(null==this.filter||!this.filter(e))switch(e){case r.LogLevelType.Debug:case r.LogLevelType.Info:console.log(t);break;case r.LogLevelType.Warning:console.warn(t);break;case r.LogLevelType.Error:console.error(t)}},e.prototype.time=function(e){void 0===e&&(e="default"),this.timersMap.has(e)||this.timersMap.set(e,i())},e.prototype.timeEnd=function(e){void 0===e&&(e="default");var t=i(this.timersMap.get(e));return this.timersMap.delete(e),this.write(r.LogLevelType.Info,e+": "+(1e3*t[0]+t[1]/1e7)+"ms"),t},e}();t.ConsoleLogService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(t.LogLevelType||(t.LogLevelType={}))},,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.build=function(t){this.id=t.id,e.prototype.build.call(this,t),this.collectionIds=t.collectionIds},t}(n(960).Cipher);t.CipherWithIds=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.build=function(t){this.id=t.id,e.prototype.build.call(this,t)},t}(n(967).Collection);t.CollectionWithId=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.build=function(t){this.id=t.id,e.prototype.build.call(this,t)},t}(n(968).Folder);t.FolderWithId=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(26),a=n(25),s=n(39),l=n(118),c=n(1007);t.IgnoredProperties=["ainfo","autosubmit","notesplain","ps","scope","tags","title","uuid","notes"];var p=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.loginPropertyParsers=[t.setLoginUsername,t.setLoginPassword,t.setLoginUris],t.creditCardPropertyParsers=[t.setCreditCardNumber,t.setCreditCardVerification,t.setCreditCardCardholderName,t.setCreditCardExpiry],t.identityPropertyParsers=[t.setIdentityFirstName,t.setIdentityInitial,t.setIdentityLastName,t.setIdentityUserName,t.setIdentityEmail,t.setIdentityPhone,t.setIdentityCompany],t}return i(n,e),n.prototype.parse=function(e){var t=this,n=new o.ImportResult,r=this.parseCsv(e,!0,{quoteChar:'"',escapeChar:"\\"});return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(t.getProp(e,"title"))){var r=t.initLoginCipher();r.name=t.getValueOrDefault(t.getProp(e,"title"),"--"),t.setNotes(e,r),t.setCipherType(e,r);var i=null;for(var o in e)if(e.hasOwnProperty(o)&&!t.isNullOrWhitespace(e[o])){var a=new c.CipherImportContext(e,o,r);r.type===s.CipherType.Login&&t.setKnownLoginValue(a)||r.type===s.CipherType.Card&&t.setKnownCreditCardValue(a)||r.type===s.CipherType.Identity&&t.setKnownIdentityValue(a)||(i=t.setUnknownValue(a,i))}r.type===s.CipherType.Login&&!t.isNullOrWhitespace(i)&&t.isNullOrWhitespace(r.login.username)&&-1===i.indexOf("://")&&(r.login.username=i),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},n.prototype.getProp=function(e,t){return Object.entries(e).reduce((function(e,t){return e[t[0].toLowerCase()]=t[1],e}),{})[t.toLowerCase()]},n.prototype.getPropByRegexp=function(e,t){var n=Object.keys(e).reduce((function(e,n){return n.match(t)&&e.push(n),e}),[]);return 0===n.length?null:e[n[0]]},n.prototype.getPropIncluding=function(e,t){var n=Object.keys(e).reduce((function(e,n){return n.toLowerCase().includes(t.toLowerCase())&&e.push(n),e}),[]);return 0===n.length?null:e[n[0]]},n.prototype.setNotes=function(e,t){t.notes=this.getValueOrDefault(this.getProp(e,"notesPlain"),"")+"\n"+this.getValueOrDefault(this.getProp(e,"notes"),"")+"\n",t.notes.trim()},n.prototype.setKnownLoginValue=function(e){var t=this;return this.loginPropertyParsers.reduce((function(n,r){return n||(n=r.bind(t)(e)),n}),!1)},n.prototype.setKnownCreditCardValue=function(e){var t=this;return this.creditCardPropertyParsers.reduce((function(n,r){return n||(n=r.bind(t)(e)),n}),!1)},n.prototype.setKnownIdentityValue=function(e){var t=this;return this.identityPropertyParsers.reduce((function(n,r){return n||(n=r.bind(t)(e)),n}),!1)},n.prototype.setUnknownValue=function(e,n){if(-1===t.IgnoredProperties.indexOf(e.lowerProperty)&&!e.lowerProperty.startsWith("section:")&&!e.lowerProperty.startsWith("section ")){if(null==n&&"email"===e.lowerProperty)return e.importRecord[e.property];if("created date"===e.lowerProperty||"modified date"===e.lowerProperty){var r=new Date(1e3*parseInt(e.importRecord[e.property],10)).toUTCString();return this.processKvp(e.cipher,"1Password "+e.property,r),null}e.lowerProperty.includes("password")||e.lowerProperty.includes("key")||e.lowerProperty.includes("secret")?this.processKvp(e.cipher,e.property,e.importRecord[e.property],l.FieldType.Hidden):this.processKvp(e.cipher,e.property,e.importRecord[e.property])}return null},n.prototype.setIdentityFirstName=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.firstName)||!e.lowerProperty.includes("first name"))&&(e.cipher.identity.firstName=e.importRecord[e.property],!0)},n.prototype.setIdentityInitial=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.middleName)||!e.lowerProperty.includes("initial"))&&(e.cipher.identity.middleName=e.importRecord[e.property],!0)},n.prototype.setIdentityLastName=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.lastName)||!e.lowerProperty.includes("last name"))&&(e.cipher.identity.lastName=e.importRecord[e.property],!0)},n.prototype.setIdentityUserName=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.username)||!e.lowerProperty.includes("username"))&&(e.cipher.identity.username=e.importRecord[e.property],!0)},n.prototype.setIdentityCompany=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.company)||!e.lowerProperty.includes("company"))&&(e.cipher.identity.company=e.importRecord[e.property],!0)},n.prototype.setIdentityPhone=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.phone)||!e.lowerProperty.includes("default phone"))&&(e.cipher.identity.phone=e.importRecord[e.property],!0)},n.prototype.setIdentityEmail=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.email)||!e.lowerProperty.includes("email"))&&(e.cipher.identity.email=e.importRecord[e.property],!0)},n.prototype.setCreditCardNumber=function(e){return!(!this.isNullOrWhitespace(e.cipher.card.number)||!e.lowerProperty.includes("number"))&&(e.cipher.card.number=e.importRecord[e.property],e.cipher.card.brand=this.getCardBrand(e.cipher.card.number),!0)},n.prototype.setCreditCardVerification=function(e){return!(!this.isNullOrWhitespace(e.cipher.card.code)||!e.lowerProperty.includes("verification number"))&&(e.cipher.card.code=e.importRecord[e.property],!0)},n.prototype.setCreditCardCardholderName=function(e){return!(!this.isNullOrWhitespace(e.cipher.card.cardholderName)||!e.lowerProperty.includes("cardholder name"))&&(e.cipher.card.cardholderName=e.importRecord[e.property],!0)},n.prototype.setCreditCardExpiry=function(e){return!(!this.isNullOrWhitespace(e.cipher.card.expiration)||!e.lowerProperty.includes("expiry date")||7!==e.importRecord[e.property].length)&&(e.cipher.card.expMonth=e.importRecord[e.property].substr(0,2),"0"===e.cipher.card.expMonth[0]&&(e.cipher.card.expMonth=e.cipher.card.expMonth.substr(1,1)),e.cipher.card.expYear=e.importRecord[e.property].substr(3,4),!0)},n.prototype.setLoginPassword=function(e){return!(!this.isNullOrWhitespace(e.cipher.login.password)||"password"!==e.lowerProperty)&&(e.cipher.login.password=e.importRecord[e.property],!0)},n.prototype.setLoginUsername=function(e){return!(!this.isNullOrWhitespace(e.cipher.login.username)||"username"!==e.lowerProperty)&&(e.cipher.login.username=e.importRecord[e.property],!0)},n.prototype.setLoginUris=function(e){if((null==e.cipher.login.uris||0===e.cipher.login.uris.length)&&"urls"===e.lowerProperty){var t=e.importRecord[e.property].split(this.newLineRegex);return e.cipher.login.uris=this.makeUriArray(t),!0}return"url"===e.lowerProperty&&(null==e.cipher.login.uris&&(e.cipher.login.uris=[]),e.cipher.login.uris.concat(this.makeUriArray(e.importRecord[e.property])),!0)},n}(a.BaseImporter);t.OnePasswordCsvImporter=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(596);t.AttachmentView=r.AttachmentView;var i=n(88);t.CardView=i.CardView;var o=n(143);t.CipherView=o.CipherView;var a=n(209);t.FieldView=a.FieldView;var s=n(144);t.IdentityView=s.IdentityView;var l=n(258);t.LoginUriView=l.LoginUriView;var c=n(159);t.LoginView=c.LoginView;var p=n(94);t.SecureNoteView=p.SecureNoteView;var u=n(1008);t.View=u.View},,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.SyncCipherUpdate=0]="SyncCipherUpdate",e[e.SyncCipherCreate=1]="SyncCipherCreate",e[e.SyncLoginDelete=2]="SyncLoginDelete",e[e.SyncFolderDelete=3]="SyncFolderDelete",e[e.SyncCiphers=4]="SyncCiphers",e[e.SyncVault=5]="SyncVault",e[e.SyncOrgKeys=6]="SyncOrgKeys",e[e.SyncFolderCreate=7]="SyncFolderCreate",e[e.SyncFolderUpdate=8]="SyncFolderUpdate",e[e.SyncCipherDelete=9]="SyncCipherDelete",e[e.SyncSettings=10]="SyncSettings",e[e.LogOut=11]="LogOut",e[e.SyncSendCreate=12]="SyncSendCreate",e[e.SyncSendUpdate=13]="SyncSendUpdate",e[e.SyncSendDelete=14]="SyncSendDelete"}(t.NotificationType||(t.NotificationType={}))},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(754),n(273),n(530),n(755);var i=n(756),o=n(72);r.enableProdMode(),o.platformBrowser().bootstrapModule(i.AppModule,{preserveWhitespaces:!0})},,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(757);var r=n(9),i=n(214),o=n(822),a=n(267),s=(n(0),n(13)),l=n(72),c=n(907),p=n(908),u=n(1065),d=n(84),m=n(139),h=n(250),f=n(460),v=n(540),y=n(459),g=n(541),x=n(544),b=n(545),S=n(546),w=n(547),C=n(548),I=n(549),E=n(550),P=n(551),k=n(552),_=n(553),A=n(554),O=n(557),T=n(556),M=n(560),B=n(561),D=n(563),R=n(562),V=n(467),j=n(466),F=n(565),U=n(567),N=n(566),z=n(568),L=n(569),G=n(573),K=n(575),q=n(570),W=n(571),H=n(572),$=n(576),Y=n(585),Q=n(583),J=n(579),X=n(584),Z=n(580),ee=n(582),te=n(586),ne=n(587),re=n(593),ie=n(594),oe=n(606),ae=n(607),se=n(608),le=n(609),ce=n(610),pe=n(611),ue=n(481),de=n(613),me=n(505),he=n(622),fe=n(507),ve=n(612),ye=n(629),ge=n(631),xe=n(630),be=n(633),Se=n(472),we=n(473),Ce=n(476),Ie=n(469),Ee=n(637),Pe=n(646),ke=n(639),_e=n(647),Ae=n(634),Oe=n(635),Te=n(648),Me=n(679),Be=n(674),De=n(680),Re=n(681),Ve=n(670),je=n(676),Fe=n(675),Ue=n(650),Ne=n(649),ze=n(283),Le=n(298),Ge=n(117),Ke=n(651),qe=n(636),We=n(470),He=n(652),$e=n(142),Ye=n(588),Qe=n(477),Je=n(589),Xe=n(590),Ze=n(478),et=n(188),tt=n(591),nt=n(592),rt=n(659),it=n(474),ot=n(471),at=n(653),st=n(663),lt=n(654),ct=n(479),pt=n(480),ut=n(491),dt=n(493),mt=n(656),ht=n(655),ft=n(494),vt=n(657),yt=n(495),gt=n(496),xt=n(260),bt=n(497),St=n(508),wt=n(624),Ct=n(626),It=n(627),Et=n(628),Pt=n(263),kt=n(506),_t=n(660),At=n(294),Ot=n(662),Tt=n(661),Mt=n(658),Bt=n(24),Dt=n(107),Rt=n(17),Vt=n(16),jt=n(65),Ft=n(1066),Ut=n(1067),Nt=n(605),zt=n(45),Lt=n(513),Gt=n(37),Kt=n(53),qt=n(291),Wt=n(514),Ht=n(10),$t=n(1068),Yt=n(252),Qt=n(4),Jt=n(1069),Xt=n(1070),Zt=n(1071),en=n(1072),tn=n(1073),nn=n(1074),rn=n(1075),on=n(1076),an=n(1077),sn=n(1078),ln=n(1079),cn=n(1080),pn=n(1081),un=n(1082),dn=n(1083),mn=n(1084),hn=n(1085),fn=n(1086),vn=n(1087),yn=n(1088),gn=n(1089),xn=n(1090),bn=n(1091),Sn=n(1092),wn=n(1093),Cn=n(1094),In=n(0),En=n(9);Qt.registerLocaleData(Jt.default,"ca"),Qt.registerLocaleData(Xt.default,"cs"),Qt.registerLocaleData(Zt.default,"da"),Qt.registerLocaleData(en.default,"de"),Qt.registerLocaleData(tn.default,"el"),Qt.registerLocaleData(nn.default,"en-GB"),Qt.registerLocaleData(rn.default,"es"),Qt.registerLocaleData(on.default,"et"),Qt.registerLocaleData(an.default,"fr"),Qt.registerLocaleData(sn.default,"he"),Qt.registerLocaleData(ln.default,"it"),Qt.registerLocaleData(cn.default,"ja"),Qt.registerLocaleData(pn.default,"ko"),Qt.registerLocaleData(un.default,"lv"),Qt.registerLocaleData(dn.default,"ml"),Qt.registerLocaleData(mn.default,"nb"),Qt.registerLocaleData(hn.default,"nl"),Qt.registerLocaleData(fn.default,"pl"),Qt.registerLocaleData(vn.default,"pt-BR"),Qt.registerLocaleData(yn.default,"pt-PT"),Qt.registerLocaleData(gn.default,"ru"),Qt.registerLocaleData(xn.default,"sk"),Qt.registerLocaleData(bn.default,"sv"),Qt.registerLocaleData(Sn.default,"uk"),Qt.registerLocaleData(wn.default,"zh-CN"),Qt.registerLocaleData(Cn.default,"zh-TW");var Pn=function(){function e(){}return e.ɵmod=In.ɵɵdefineNgModule({type:e,bootstrap:[u.AppComponent]}),e.ɵinj=In.ɵɵdefineInjector({factory:function(t){return new(t||e)},providers:[Qt.DatePipe],imports:[[l.BrowserModule,c.BrowserAnimationsModule,s.FormsModule,o.AppRoutingModule,p.ServicesModule,r.ToasterModule.forRoot(),i.InfiniteScrollModule,a.DragDropModule]]}),e}();t.AppModule=Pn,("undefined"==typeof ngJitMode||ngJitMode)&&In.ɵɵsetNgModuleScope(Pn,{declarations:[Rt.A11yTitleDirective,b.AcceptEmergencyComponent,ye.AccessComponent,S.AcceptOrganizationComponent,be.AccountComponent,_.SetPasswordComponent,Se.AddCreditComponent,xt.AddEditComponent,we.AdjustPaymentComponent,Y.AdjustSeatsComponent,Ce.AdjustStorageComponent,Vt.ApiActionDirective,Ie.ApiKeyComponent,u.AppComponent,bt.AttachmentsComponent,jt.AutofocusDirective,m.AvatarComponent,Ft.BlurClickDirective,Ut.BoxRowDirective,lt.BreachReportComponent,St.BulkActionsComponent,wt.BulkDeleteComponent,Ct.BulkMoveComponent,It.BulkRestoreComponent,Et.BulkShareComponent,Bt.CalloutComponent,Ee.ChangeEmailComponent,Pe.ChangeKdfComponent,ke.ChangePasswordComponent,Q.ChangePlanComponent,Pt.CiphersComponent,kt.CollectionsComponent,Wt.ColorPasswordPipe,_e.CreateOrganizationComponent,Ae.DeauthorizeSessionsComponent,Oe.DeleteAccountComponent,J.DeleteOrganizationComponent,Te.DomainRulesComponent,X.DownloadLicenseComponent,Me.EmergencyAccessAddEditComponent,Be.EmergencyAccessAttachmentsComponent,je.EmergencyAccessComponent,De.EmergencyAccessConfirmComponent,Re.EmergencyAccessTakeoverComponent,Ve.EmergencyAccessViewComponent,Fe.EmergencyAddEditComponent,ct.ExportComponent,pt.ExposedPasswordsReportComponent,Nt.FallbackSrcDirective,_t.FolderAddEditComponent,f.FooterComponent,v.FrontendLayoutComponent,At.GroupingsComponent,w.HintComponent,Ht.I18nPipe,Dt.IconComponent,ut.ImportComponent,dt.InactiveTwoFactorReportComponent,zt.InputVerbatimDirective,Ue.LinkSsoComponent,C.LockComponent,I.LoginComponent,d.ModalComponent,y.NavbarComponent,Ne.OptionsComponent,$.AccountComponent,ue.AddEditComponent,Z.OrganizationBillingComponent,ze.OrganizationPlansComponent,ee.OrganizationSubscriptionComponent,de.AttachmentsComponent,me.CiphersComponent,D.CollectionAddEditComponent,he.CollectionsComponent,V.EntityEventsComponent,j.EntityUsersComponent,F.EventsComponent,re.ExportComponent,ie.ExposedPasswordsReportComponent,oe.ImportComponent,ae.InactiveTwoFactorReportComponent,U.GroupAddEditComponent,fe.GroupingsComponent,N.GroupsComponent,R.CollectionsComponent,z.ManageComponent,L.PeopleComponent,K.PolicyEditComponent,G.PoliciesComponent,se.ReusedPasswordsReportComponent,te.SettingsComponent,le.ToolsComponent,ne.TwoFactorSetupComponent,q.UserAddEditComponent,W.UserConfirmComponent,H.UserGroupsComponent,Le.OrganizationsComponent,g.OrganizationLayoutComponent,ce.UnsecuredWebsitesReportComponent,ve.VaultComponent,pe.WeakPasswordsReportComponent,ht.PasswordGeneratorComponent,mt.PasswordGeneratorHistoryComponent,h.PasswordStrengthComponent,Ge.PaymentComponent,Ke.PremiumComponent,qe.ProfileComponent,We.PurgeVaultComponent,E.RecoverDeleteComponent,P.RecoverTwoFactorComponent,k.RegisterComponent,ft.ReusedPasswordsReportComponent,$t.SearchCiphersPipe,Yt.SearchPipe,Lt.SelectCopyDirective,ge.AddEditComponent,xe.SendComponent,Ot.SendInfoComponent,He.SettingsComponent,Tt.ShareComponent,A.SsoComponent,Gt.StopClickDirective,Kt.StopPropDirective,$e.TaxInfoComponent,vt.ToolsComponent,qt.TrueFalseValueDirective,Ye.TwoFactorAuthenticatorComponent,T.TwoFactorComponent,Qe.TwoFactorDuoComponent,Je.TwoFactorEmailComponent,O.TwoFactorOptionsComponent,Xe.TwoFactorRecoveryComponent,Ze.TwoFactorSetupComponent,et.TwoFactorVerifyComponent,tt.TwoFactorWebAuthnComponent,nt.TwoFactorYubiKeyComponent,yt.UnsecuredWebsitesReportComponent,rt.UpdateKeyComponent,it.UpdateLicenseComponent,ot.UserBillingComponent,x.UserLayoutComponent,at.UserSubscriptionComponent,Mt.VaultComponent,st.VerifyEmailComponent,M.VerifyEmailTokenComponent,B.VerifyRecoverDeleteComponent,gt.WeakPasswordsReportComponent],imports:[l.BrowserModule,c.BrowserAnimationsModule,s.FormsModule,o.AppRoutingModule,p.ServicesModule,En.ToasterModule,i.InfiniteScrollModule,a.DragDropModule]})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(8),i=n(540),o=n(541),a=n(544),s=n(545),l=n(546),c=n(547),p=n(548),u=n(549),d=n(550),m=n(551),h=n(552),f=n(553),v=n(554),y=n(556),g=n(560),x=n(561),b=n(562),S=n(565),w=n(566),C=n(568),I=n(569),E=n(573),P=n(576),k=n(580),_=n(582),A=n(586),O=n(587),T=n(593),M=n(594),B=n(606),D=n(607),R=n(608),V=n(609),j=n(610),F=n(611),U=n(612),N=n(629),z=n(630),L=n(633),G=n(647),K=n(648),q=n(649),W=n(298),H=n(651),$=n(652),Y=n(478),Q=n(471),J=n(653),X=n(654),Z=n(479),ee=n(480),te=n(491),ne=n(493),re=n(655),ie=n(494),oe=n(657),ae=n(495),se=n(496),le=n(658),ce=n(664),pe=n(665),ue=n(667),de=n(668),me=n(669),he=n(666),fe=n(670),ve=n(676),ye=n(0),ge=n(8),xe=[{path:"",component:i.FrontendLayoutComponent,children:[{path:"",pathMatch:"full",component:u.LoginComponent,canActivate:[me.UnauthGuardService]},{path:"2fa",component:y.TwoFactorComponent,canActivate:[me.UnauthGuardService]},{path:"register",component:h.RegisterComponent,canActivate:[me.UnauthGuardService],data:{titleId:"createAccount"}},{path:"sso",component:v.SsoComponent,canActivate:[me.UnauthGuardService],data:{titleId:"enterpriseSingleSignOn"}},{path:"set-password",component:f.SetPasswordComponent,data:{titleId:"setMasterPassword"}},{path:"hint",component:c.HintComponent,canActivate:[me.UnauthGuardService],data:{titleId:"passwordHint"}},{path:"lock",component:p.LockComponent,canActivate:[de.LockGuardService]},{path:"verify-email",component:g.VerifyEmailTokenComponent},{path:"accept-organization",component:l.AcceptOrganizationComponent,data:{titleId:"joinOrganization"}},{path:"accept-emergency",component:s.AcceptEmergencyComponent,data:{titleId:"acceptEmergency"}},{path:"recover",pathMatch:"full",redirectTo:"recover-2fa"},{path:"recover-2fa",component:m.RecoverTwoFactorComponent,canActivate:[me.UnauthGuardService],data:{titleId:"recoverAccountTwoStep"}},{path:"recover-delete",component:d.RecoverDeleteComponent,canActivate:[me.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"verify-recover-delete",component:x.VerifyRecoverDeleteComponent,canActivate:[me.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"send/:sendId/:key",component:N.AccessComponent,data:{title:"Bitwarden Send"}}]},{path:"",component:a.UserLayoutComponent,canActivate:[ue.AuthGuardService],children:[{path:"vault",component:le.VaultComponent,data:{titleId:"myVault"}},{path:"sends",component:z.SendComponent,data:{title:"Send"}},{path:"settings",component:$.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:L.AccountComponent,data:{titleId:"myAccount"}},{path:"options",component:q.OptionsComponent,data:{titleId:"options"}},{path:"domain-rules",component:K.DomainRulesComponent,data:{titleId:"domainRules"}},{path:"two-factor",component:Y.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"premium",component:H.PremiumComponent,data:{titleId:"goPremium"}},{path:"billing",component:Q.UserBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:J.UserSubscriptionComponent,data:{titleId:"premiumMembership"}},{path:"organizations",component:W.OrganizationsComponent,data:{titleId:"organizations"}},{path:"create-organization",component:G.CreateOrganizationComponent,data:{titleId:"newOrganization"}},{path:"emergency-access",children:[{path:"",component:ve.EmergencyAccessComponent,data:{titleId:"emergencyAccess"}},{path:":id",component:fe.EmergencyAccessViewComponent,data:{titleId:"emergencyAccess"}}]}]},{path:"tools",component:oe.ToolsComponent,canActivate:[ue.AuthGuardService],children:[{path:"",pathMatch:"full",redirectTo:"generator"},{path:"import",component:te.ImportComponent,data:{titleId:"importData"}},{path:"export",component:Z.ExportComponent,data:{titleId:"exportVault"}},{path:"generator",component:re.PasswordGeneratorComponent,data:{titleId:"passwordGenerator"}},{path:"breach-report",component:X.BreachReportComponent,data:{titleId:"dataBreachReport"}},{path:"reused-passwords-report",component:ie.ReusedPasswordsReportComponent,data:{titleId:"reusedPasswordsReport"}},{path:"unsecured-websites-report",component:ae.UnsecuredWebsitesReportComponent,data:{titleId:"unsecuredWebsitesReport"}},{path:"weak-passwords-report",component:se.WeakPasswordsReportComponent,data:{titleId:"weakPasswordsReport"}},{path:"exposed-passwords-report",component:ee.ExposedPasswordsReportComponent,data:{titleId:"exposedPasswordsReport"}},{path:"inactive-two-factor-report",component:ne.InactiveTwoFactorReportComponent,data:{titleId:"inactive2faReport"}}]}]},{path:"organizations/:organizationId",component:o.OrganizationLayoutComponent,canActivate:[ue.AuthGuardService,ce.OrganizationGuardService],children:[{path:"",pathMatch:"full",redirectTo:"vault"},{path:"vault",component:U.VaultComponent,data:{titleId:"vault"}},{path:"tools",component:V.ToolsComponent,canActivate:[pe.OrganizationTypeGuardService],data:{permissions:[he.Permissions.AccessImportExport,he.Permissions.AccessReports]},children:[{path:"",pathMatch:"full",redirectTo:"import"},{path:"import",component:B.ImportComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"importData",permissions:[he.Permissions.AccessImportExport]}},{path:"export",component:T.ExportComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"exportVault",permissions:[he.Permissions.AccessImportExport]}},{path:"exposed-passwords-report",component:M.ExposedPasswordsReportComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"exposedPasswordsReport",permissions:[he.Permissions.AccessReports]}},{path:"inactive-two-factor-report",component:D.InactiveTwoFactorReportComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"inactive2faReport",permissions:[he.Permissions.AccessReports]}},{path:"reused-passwords-report",component:R.ReusedPasswordsReportComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"reusedPasswordsReport",permissions:[he.Permissions.AccessReports]}},{path:"unsecured-websites-report",component:j.UnsecuredWebsitesReportComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"unsecuredWebsitesReport",permissions:[he.Permissions.AccessReports]}},{path:"weak-passwords-report",component:F.WeakPasswordsReportComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"weakPasswordsReport",permissions:[he.Permissions.AccessReports]}}]},{path:"manage",component:C.ManageComponent,canActivate:[pe.OrganizationTypeGuardService],data:{permissions:[he.Permissions.ManageAssignedCollections,he.Permissions.ManageAllCollections,he.Permissions.AccessEventLogs,he.Permissions.ManageGroups,he.Permissions.ManageUsers,he.Permissions.ManagePolicies]},children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"collections",component:b.CollectionsComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"collections",permissions:[he.Permissions.ManageAssignedCollections,he.Permissions.ManageAllCollections]}},{path:"events",component:S.EventsComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"eventLogs",permissions:[he.Permissions.AccessEventLogs]}},{path:"groups",component:w.GroupsComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"groups",permissions:[he.Permissions.ManageGroups]}},{path:"people",component:I.PeopleComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"people",permissions:[he.Permissions.ManageUsers]}},{path:"policies",component:E.PoliciesComponent,canActivate:[pe.OrganizationTypeGuardService],data:{titleId:"policies",permissions:[he.Permissions.ManagePolicies]}}]},{path:"settings",component:A.SettingsComponent,canActivate:[pe.OrganizationTypeGuardService],data:{permissions:[he.Permissions.ManageOrganization]},children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:P.AccountComponent,data:{titleId:"myOrganization"}},{path:"two-factor",component:O.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"billing",component:k.OrganizationBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:_.OrganizationSubscriptionComponent,data:{titleId:"subscription"}}]}]},{path:"**",redirectTo:""}],be=function(){function e(){}return e.ɵmod=ye.ɵɵdefineNgModule({type:e}),e.ɵinj=ye.ɵɵdefineInjector({factory:function(t){return new(t||e)},imports:[[r.RouterModule.forRoot(xe,{useHash:!0,paramsInheritanceStrategy:"always"})],r.RouterModule]}),e}();t.AppRoutingModule=be,("undefined"==typeof ngJitMode||ngJitMode)&&ye.ɵɵsetNgModuleScope(be,{imports:[ge.RouterModule],exports:[r.RouterModule]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.subscribers=new Map}return e.prototype.send=function(e,t){null==t?this.subscribers.forEach((function(t){t(e)})):this.subscribers.has(t)&&this.subscribers.get(t)(e)},e.prototype.subscribe=function(e,t){this.subscribers.set(e,t)},e.prototype.unsubscribe=function(e){this.subscribers.has(e)&&this.subscribers.delete(e)},e}();t.BroadcasterService=r},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomain=function(e){return null}},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EmergencyAccessAcceptRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.OrganizationUserAcceptRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(836),a=function(){function e(e,t,n,r){this.router=e,this.i18nService=t,this.apiService=n,this.platformUtilsService=r,this.email="",this.successRoute="login"}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(null==this.email||""===this.email)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired")),[2];if(-1===this.email.indexOf("@"))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail")),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),this.formPromise=this.apiService.postPasswordHint(new o.PasswordHintRequest(this.email)),[4,this.formPromise];case 2:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("masterPassSent")),null!=this.onSuccessfulSubmit?this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute]),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},e}();t.HintComponent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.email=e};t.PasswordHintRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(105),s=n(79),l=n(30),c=n(0),p=n(8),u=n(3),d=n(5),m=n(14),h=n(7),f=n(18),v=n(41),y=n(93),g=n(64),x=n(38),b=n(6),S=function(){function e(e,t,n,r,i,o,a,s,l,c,p){this.router=e,this.i18nService=t,this.platformUtilsService=n,this.messagingService=r,this.userService=i,this.cryptoService=o,this.storageService=a,this.vaultTimeoutService=s,this.environmentService=l,this.stateService=c,this.apiService=p,this.masterPassword="",this.pin="",this.showPassword=!1,this.pinLock=!1,this.webVaultHostname="",this.successRoute="vault",this.invalidPinAttempts=0}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,a,s,c;return i(this,(function(i){switch(i.label){case 0:return e=this,[4,this.vaultTimeoutService.isPinLockSet()];case 1:return e.pinSet=i.sent(),this.pinLock=this.pinSet[0]&&null!=this.vaultTimeoutService.pinProtectedKey||this.pinSet[1],t=this,[4,this.platformUtilsService.supportsBiometric()];case 2:return t.supportsBiometric=i.sent(),n=this,[4,this.vaultTimeoutService.isBiometricLockSet()];case 3:return(r=i.sent())?[4,this.cryptoService.hasKey()]:[3,5];case 4:r=i.sent()||!this.platformUtilsService.supportsSecureStorage(),i.label=5;case 5:return n.biometricLock=r,a=this,[4,this.storageService.get(o.ConstantsService.biometricText)];case 6:return a.biometricText=i.sent(),s=this,[4,this.userService.getEmail()];case 7:return s.email=i.sent(),null==(c=this.environmentService.getWebVaultUrl())&&(c="https://bitwarden.com"),this.webVaultHostname=l.Utils.getHostname(c),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,l,c,p,u,d,m,h,f,v;return i(this,(function(i){switch(i.label){case 0:return!this.pinLock||null!=this.pin&&""!==this.pin?this.pinLock||null!=this.masterPassword&&""!==this.masterPassword?[4,this.userService.getKdf()]:(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("pinRequired")),[2]);case 1:return e=i.sent(),[4,this.userService.getKdfIterations()];case 2:if(t=i.sent(),!this.pinLock)return[3,16];n=!0,i.label=3;case 3:return i.trys.push([3,14,,15]),this.pinSet[0]?[4,this.cryptoService.makeKeyFromPin(this.pin,this.email,e,t,this.vaultTimeoutService.pinProtectedKey)]:[3,10];case 4:return r=i.sent(),[4,this.cryptoService.getEncKey(r)];case 5:return m=i.sent(),[4,this.storageService.get(o.ConstantsService.protectedPin)];case 6:return d=i.sent(),[4,this.cryptoService.decryptToUtf8(new a.EncString(d),m)];case 7:return h=i.sent(),(n=h!==this.pin)?[3,9]:[4,this.setKeyAndContinue(r)];case 8:i.sent(),i.label=9;case 9:return[3,13];case 10:return[4,this.cryptoService.makeKeyFromPin(this.pin,this.email,e,t)];case 11:return r=i.sent(),n=!1,[4,this.setKeyAndContinue(r)];case 12:i.sent(),i.label=13;case 13:return[3,15];case 14:return i.sent(),n=!0,[3,15];case 15:if(n){if(this.invalidPinAttempts++,this.invalidPinAttempts>=5)return this.messagingService.send("logout"),[2];this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidPin"))}return[3,33];case 16:return[4,this.cryptoService.makeKey(this.masterPassword,this.email,e,t)];case 17:return r=i.sent(),[4,this.cryptoService.hashPassword(this.masterPassword,r)];case 18:return l=i.sent(),c=!1,null==l?[3,25]:[4,this.cryptoService.getKeyHash()];case 19:return null==(p=i.sent())?[3,20]:(c=p===l,[3,25]);case 20:(u=new s.PasswordVerificationRequest).masterPasswordHash=l,i.label=21;case 21:return i.trys.push([21,24,,25]),this.formPromise=this.apiService.postAccountVerifyPassword(u),[4,this.formPromise];case 22:return i.sent(),c=!0,[4,this.cryptoService.setKeyHash(l)];case 23:return i.sent(),[3,25];case 24:return i.sent(),[3,25];case 25:return c?this.pinSet[0]?[4,this.storageService.get(o.ConstantsService.protectedPin)]:[3,31]:[3,32];case 26:return d=i.sent(),[4,this.cryptoService.getEncKey(r)];case 27:return m=i.sent(),[4,this.cryptoService.decryptToUtf8(new a.EncString(d),m)];case 28:return h=i.sent(),[4,this.cryptoService.makePinKey(h,this.email,e,t)];case 29:return f=i.sent(),v=this.vaultTimeoutService,[4,this.cryptoService.encrypt(r.key,f)];case 30:v.pinProtectedKey=i.sent(),i.label=31;case 31:return this.setKeyAndContinue(r),[3,33];case 32:this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword")),i.label=33;case 33:return[2]}}))}))},e.prototype.logOut=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel"))];case 1:return e.sent()&&this.messagingService.send("logout"),[2]}}))}))},e.prototype.unlockBiometric=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.biometricLock?[4,this.platformUtilsService.authenticateBiometric()]:[2];case 1:return e.sent()?[4,this.doContinue()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById(this.pinLock?"pin":"masterPassword").focus()},e.prototype.setKeyAndContinue=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.cryptoService.setKey(e)];case 1:return t.sent(),this.doContinue(),[2]}}))}))},e.prototype.doContinue=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.vaultTimeoutService.biometricLocked=!1,[4,this.storageService.get(o.ConstantsService.disableFaviconKey)];case 1:return e=t.sent(),[4,this.stateService.save(o.ConstantsService.disableFaviconKey,!!e)];case 2:return t.sent(),this.messagingService.send("unlocked"),null!=this.onSuccessfulSubmit?this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute]),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.Router),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(d.PlatformUtilsService),c.ɵɵdirectiveInject(m.MessagingService),c.ɵɵdirectiveInject(h.UserService),c.ɵɵdirectiveInject(f.CryptoService),c.ɵɵdirectiveInject(v.StorageService),c.ɵɵdirectiveInject(y.VaultTimeoutService),c.ɵɵdirectiveInject(g.EnvironmentService),c.ɵɵdirectiveInject(x.StateService),c.ɵɵdirectiveInject(b.ApiService))},e.ɵdir=c.ɵɵdefineDirective({type:e}),e}();t.LockComponent=S},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});n(0),n(8),n(58),n(104),n(64),n(3),n(36),n(5),n(38),n(41);var o=n(70),a=n(30),s=n(0),l=n(58),c=n(8),p=n(5),u=n(3),d=n(38),m=n(64),h=n(36),f=n(104),v=n(41),y="rememberedEmail",g="rememberEmail",x=function(){function e(e,t,n,r,i,o,a,s,l){this.authService=e,this.router=t,this.platformUtilsService=n,this.i18nService=r,this.stateService=i,this.environmentService=o,this.passwordGenerationService=a,this.cryptoFunctionService=s,this.storageService=l,this.email="",this.rememberEmail=!0,this.masterPassword="",this.showPassword=!1,this.twoFactorRoute="2fa",this.successRoute="vault"}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null!=this.email&&""!==this.email?[3,2]:(e=this,[4,this.storageService.get(y)]);case 1:e.email=n.sent(),null==this.email&&(this.email=""),n.label=2;case 2:return t=this,[4,this.storageService.get(g)];case 3:return t.rememberEmail=n.sent(),null==this.rememberEmail&&(this.rememberEmail=!0),a.Utils.isBrowser&&document.getElementById(null==this.email||""===this.email?"email":"masterPassword").focus(),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null==this.email||""===this.email)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired")),[2];if(-1===this.email.indexOf("@"))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail")),[2];if(null==this.masterPassword||""===this.masterPassword)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2];n.label=1;case 1:return n.trys.push([1,12,,13]),this.formPromise=this.authService.logIn(this.email,this.masterPassword),[4,this.formPromise];case 2:return e=n.sent(),[4,this.storageService.save(g,this.rememberEmail)];case 3:return n.sent(),this.rememberEmail?[4,this.storageService.save(y,this.email)]:[3,5];case 4:return n.sent(),[3,7];case 5:return[4,this.storageService.remove(y)];case 6:n.sent(),n.label=7;case 7:return e.twoFactor?(null!=this.onSuccessfulLoginTwoFactorNavigate?this.onSuccessfulLoginTwoFactorNavigate():this.router.navigate([this.twoFactorRoute]),[3,11]):[3,8];case 8:return[4,this.storageService.get(o.ConstantsService.disableFaviconKey)];case 9:return t=n.sent(),[4,this.stateService.save(o.ConstantsService.disableFaviconKey,!!t)];case 10:n.sent(),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute]),n.label=11;case 11:return[3,13];case 12:return n.sent(),[3,13];case 13:return[2]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("masterPassword").focus()},e.prototype.launchSsoBrowser=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return n={type:"password",length:64,uppercase:!0,lowercase:!0,numbers:!0,special:!1},[4,this.passwordGenerationService.generatePassword(n)];case 1:return r=i.sent(),[4,this.passwordGenerationService.generatePassword(n)];case 2:return s=i.sent(),[4,this.cryptoFunctionService.hash(s,"sha256")];case 3:return l=i.sent(),c=a.Utils.fromBufferToUrlB64(l),[4,this.storageService.save(o.ConstantsService.ssoStateKey,r)];case 4:return i.sent(),[4,this.storageService.save(o.ConstantsService.ssoCodeVerifierKey,s)];case 5:return i.sent(),p=null==this.environmentService.getWebVaultUrl()?"https://vault.bitwarden.com":this.environmentService.getWebVaultUrl(),this.platformUtilsService.launchUri(p+"/#/sso?clientId="+e+"&redirectUri="+encodeURIComponent(t)+"&state="+r+"&codeChallenge="+c),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.I18nService),s.ɵɵdirectiveInject(d.StateService),s.ɵɵdirectiveInject(m.EnvironmentService),s.ɵɵdirectiveInject(h.PasswordGenerationService),s.ɵɵdirectiveInject(f.CryptoFunctionService),s.ɵɵdirectiveInject(v.StorageService))},e.ɵdir=s.ɵɵdefineDirective({type:e,inputs:{email:"email",rememberEmail:"rememberEmail"}}),e}();t.LoginComponent=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.DeleteRecoverRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.TwoFactorRecoveryRequest=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(461),a=n(842),s=n(249),l=function(){function e(e,t,n,r,i,o,a,s){this.authService=e,this.router=t,this.i18nService=n,this.cryptoService=r,this.apiService=i,this.stateService=o,this.platformUtilsService=a,this.passwordGenerationService=s,this.name="",this.email="",this.masterPassword="",this.confirmMasterPassword="",this.hint="",this.showPassword=!1,this.showTerms=!0,this.acceptPolicies=!1,this.successRoute="login",this.showTerms=!a.isSelfHost()}return Object.defineProperty(e.prototype,"masterPasswordScoreWidth",{get:function(){return null==this.masterPasswordScore?0:20*(this.masterPasswordScore+1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"masterPasswordScoreColor",{get:function(){switch(this.masterPasswordScore){case 4:return"success";case 3:return"primary";case 2:return"warning";default:return"danger"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"masterPasswordScoreText",{get:function(){switch(this.masterPasswordScore){case 4:return this.i18nService.t("strong");case 3:return this.i18nService.t("good");case 2:return this.i18nService.t("weak");default:return null!=this.masterPasswordScore?this.i18nService.t("weak"):null}},enumerable:!0,configurable:!0}),e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,l,c,p,u,d,m;return i(this,(function(i){switch(i.label){case 0:return!this.acceptPolicies&&this.showTerms?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("acceptPoliciesError")),[2]):null==this.email||""===this.email?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired")),[2]):-1===this.email.indexOf("@")?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail")),[2]):null==this.masterPassword||""===this.masterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2]):this.masterPassword.length<8?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength")),[2]):this.masterPassword!==this.confirmMasterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassDoesntMatch")),[2]):null!=(e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput()))&&e.score<3?[4,this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[3,2];case 1:if(!i.sent())return[2];i.label=2;case 2:return this.hint===this.masterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("hintEqualsPassword")),[2]):(this.name=""===this.name?null:this.name,this.email=this.email.trim().toLowerCase(),t=s.KdfType.PBKDF2_SHA256,n=this.platformUtilsService.isIE(),r=n?1e4:1e5,[4,this.cryptoService.makeKey(this.masterPassword,this.email,t,r)]);case 3:return l=i.sent(),[4,this.cryptoService.makeEncKey(l)];case 4:return c=i.sent(),[4,this.cryptoService.hashPassword(this.masterPassword,l)];case 5:return p=i.sent(),[4,this.cryptoService.makeKeyPair(c[0])];case 6:return u=i.sent(),(d=new a.RegisterRequest(this.email,this.name,p,this.hint,c[1].encryptedString,t,r,this.referenceData)).keys=new o.KeysRequest(u[0],u[1].encryptedString),[4,this.stateService.get("orgInvitation")];case 7:null!=(m=i.sent())&&null!=m.token&&null!=m.organizationUserId&&(d.token=m.token,d.organizationUserId=m.organizationUserId),i.label=8;case 8:return i.trys.push([8,10,,11]),this.formPromise=this.apiService.postRegister(d),[4,this.formPromise];case 9:return i.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("newAccountCreated")),this.router.navigate([this.successRoute],{queryParams:{email:this.email}}),[3,11];case 10:return i.sent(),[3,11];case 11:return[2]}}))}))},e.prototype.togglePassword=function(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()},e.prototype.updatePasswordStrength=function(){var e=this;null!=this.masterPasswordStrengthTimeout&&clearTimeout(this.masterPasswordStrengthTimeout),this.masterPasswordStrengthTimeout=setTimeout((function(){var t=e.passwordGenerationService.passwordStrength(e.masterPassword,e.getPasswordStrengthUserInput());e.masterPasswordScore=null==t?null:t.score}),300)},e.prototype.getPasswordStrengthUserInput=function(){var e=[],t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),null!=this.name&&""!==this.name&&(e=e.concat(this.name.trim().toLowerCase().split(" "))),e},e}();t.RegisterComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n,r,i,o,a,s){this.name=t,this.email=e,this.masterPasswordHash=n,this.masterPasswordHint=r||null,this.key=i,this.kdf=o,this.kdfIterations=a,this.referenceData=s};t.RegisterRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.ReferenceEventRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(461),l=n(845),c=n(464),p=n(249),u=n(0),d=n(3),m=n(18),h=n(14),f=n(7),v=n(36),y=n(5),g=n(43),x=n(8),b=n(6),S=n(61),w=function(e){function t(t,n,r,i,o,a,s,l,c,p,u){var d=e.call(this,t,n,r,i,o,a,s)||this;return d.router=l,d.apiService=c,d.syncService=p,d.route=u,d.syncLoading=!0,d.showPassword=!1,d.hint="",d.identifier=null,d.successRoute="vault",d}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t,n=this;return a(this,(function(r){switch(r.label){case 0:return[4,this.syncService.fullSync(!0)];case 1:return r.sent(),this.syncLoading=!1,t=this.route.queryParams.subscribe((function(e){return o(n,void 0,void 0,(function(){return a(this,(function(n){return null!=e.identifier&&(this.identifier=e.identifier),null!=t&&t.unsubscribe(),[2]}))}))})),e.prototype.ngOnInit.call(this),[2]}}))}))},t.prototype.setupSubmitActions=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){return this.kdf=p.KdfType.PBKDF2_SHA256,e=this.platformUtilsService.isIE(),this.kdfIterations=e?1e4:1e5,[2,!0]}))}))},t.prototype.performSubmitActions=function(e,t,n){return o(this,void 0,void 0,(function(){var r,i,o,c,p;return a(this,(function(a){switch(a.label){case 0:return(r=new l.SetPasswordRequest).masterPasswordHash=e,r.key=n[1].encryptedString,r.masterPasswordHint=this.hint,r.kdf=this.kdf,r.kdfIterations=this.kdfIterations,r.orgIdentifier=this.identifier,[4,this.cryptoService.makeKeyPair(n[0])];case 1:i=a.sent(),r.keys=new s.KeysRequest(i[0],i[1].encryptedString),a.label=2;case 2:return a.trys.push([2,11,,12]),this.formPromise=this.apiService.setPassword(r),[4,this.formPromise];case 3:return a.sent(),c=(o=this.userService).setInformation,[4,this.userService.getUserId()];case 4:return p=[a.sent()],[4,this.userService.getEmail()];case 5:return[4,c.apply(o,p.concat([a.sent(),this.kdf,this.kdfIterations]))];case 6:return a.sent(),[4,this.cryptoService.setKey(t)];case 7:return a.sent(),[4,this.cryptoService.setKeyHash(e)];case 8:return a.sent(),[4,this.cryptoService.setEncKey(n[1].encryptedString)];case 9:return a.sent(),[4,this.cryptoService.setEncPrivateKey(i[1].encryptedString)];case 10:return a.sent(),null!=this.onSuccessfulChangePassword?this.onSuccessfulChangePassword():this.router.navigate([this.successRoute]),[3,12];case 11:return a.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,12];case 12:return[2]}}))}))},t.prototype.togglePassword=function(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.I18nService),u.ɵɵdirectiveInject(m.CryptoService),u.ɵɵdirectiveInject(h.MessagingService),u.ɵɵdirectiveInject(f.UserService),u.ɵɵdirectiveInject(v.PasswordGenerationService),u.ɵɵdirectiveInject(y.PlatformUtilsService),u.ɵɵdirectiveInject(g.PolicyService),u.ɵɵdirectiveInject(x.Router),u.ɵɵdirectiveInject(b.ApiService),u.ɵɵdirectiveInject(S.SyncService),u.ɵɵdirectiveInject(x.ActivatedRoute))},t.ɵdir=u.ɵɵdefineDirective({type:t,features:[u.ɵɵInheritDefinitionFeature]}),t}(c.ChangePasswordComponent);t.SetPasswordComponent=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.SetPasswordRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=(n(8),n(58),n(3),n(5),n(0)),o=n(58),a=n(8),s=n(3),l=n(5),c=function(){function e(e,t,n,i,o){this.authService=e,this.router=t,this.i18nService=n,this.platformUtilsService=i,this.win=o,this.onProviderSelected=new r.EventEmitter,this.onRecoverSelected=new r.EventEmitter,this.providers=[]}return e.prototype.ngOnInit=function(){this.providers=this.authService.getSupportedTwoFactorProviders(this.win)},e.prototype.choose=function(e){this.onProviderSelected.emit(e.type)},e.prototype.recover=function(){this.platformUtilsService.launchUri("https://help.bitwarden.com/article/lost-two-step-device/"),this.onRecoverSelected.emit()},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(o.AuthService),i.ɵɵdirectiveInject(a.Router),i.ɵɵdirectiveInject(s.I18nService),i.ɵɵdirectiveInject(l.PlatformUtilsService),i.ɵɵdirectiveInject(Window))},e.ɵdir=i.ɵɵdefineDirective({type:e,outputs:{onProviderSelected:"onProviderSelected",onRecoverSelected:"onRecoverSelected"}}),e}();t.TwoFactorOptionsComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=(n(14),n(0)),o=n(14),a=["container"];function s(e,t){}var l=function(){function e(e,t){this.componentFactoryResolver=e,this.messagingService=t,this.onClose=new r.EventEmitter,this.onClosed=new r.EventEmitter,this.onShow=new r.EventEmitter,this.onShown=new r.EventEmitter,this.parentContainer=null,this.fade=!0}return e.prototype.ngOnDestroy=function(){document.body.classList.remove("modal-open"),document.body.removeChild(document.querySelector(".modal-backdrop"))},e.prototype.show=function(e,t,n,r){var i=this;void 0===n&&(n=!0),void 0===r&&(r=null),this.onShow.emit(),this.messagingService.send("modalShow"),this.parentContainer=t,this.fade=n,document.body.classList.add("modal-open");var o=document.createElement("div");o.className="modal-backdrop"+(this.fade?" fade":""),document.body.appendChild(o);var a=this.componentFactoryResolver.resolveComponentFactory(e),s=this.container.createComponent(a);null!=r&&r(s.instance),document.querySelector(".modal-dialog").addEventListener("click",(function(e){e.stopPropagation()}));for(var l=0,c=Array.from(document.querySelectorAll('.modal, .modal *[data-dismiss="modal"]'));l<c.length;l++){c[l].addEventListener("click",(function(e){i.close()}))}return this.onShown.emit(),this.messagingService.send("modalShown"),s.instance},e.prototype.close=function(){this.onClose.emit(),this.messagingService.send("modalClose"),this.onClosed.emit(),this.messagingService.send("modalClosed"),null!=this.parentContainer&&this.parentContainer.clear()},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(i.ComponentFactoryResolver),i.ɵɵdirectiveInject(o.MessagingService))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["app-modal"]],viewQuery:function(e,t){var n;(1&e&&i.ɵɵstaticViewQuery(a,!0,r.ViewContainerRef),2&e)&&(i.ɵɵqueryRefresh(n=i.ɵɵloadQuery())&&(t.container=n.first))},outputs:{onClose:"onClose",onClosed:"onClosed",onShow:"onShow",onShown:"onShown"},decls:2,vars:0,consts:[["container",""]],template:function(e,t){1&e&&i.ɵɵtemplate(0,s,0,0,"ng-template",null,0,i.ɵɵtemplateRefExtractor)},encapsulation:2}),e}();t.ModalComponent=l},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(113),a=n(558),s=n(278),l=n(70),c=n(465),p=n(852),u=n(0),d=n(58),m=n(8),h=n(3),f=n(6),v=n(5),y=n(64),g=n(38),x=n(41),b=function(){function e(e,t,n,r,i,a,l,c,p,u){this.authService=e,this.router=t,this.i18nService=n,this.apiService=r,this.platformUtilsService=i,this.win=a,this.environmentService=l,this.stateService=c,this.storageService=p,this.route=u,this.token="",this.remember=!1,this.webAuthnReady=!1,this.webAuthnNewTab=!1,this.providers=s.TwoFactorProviders,this.providerType=o.TwoFactorProviderType,this.selectedProviderType=o.TwoFactorProviderType.Authenticator,this.webAuthnSupported=!1,this.webAuthn=null,this.title="",this.twoFactorEmail=null,this.identifier=null,this.loginRoute="login",this.successRoute="vault",this.webAuthnSupported=this.platformUtilsService.supportsWebAuthn(a)}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(o){switch(o.label){case 0:return this.authing&&null!=this.authService.twoFactorProvidersData?(e=this.route.queryParams.subscribe((function(t){return r(n,void 0,void 0,(function(){return i(this,(function(n){return null!=t.identifier&&(this.identifier=t.identifier),null!=e&&e.unsubscribe(),[2]}))}))})),this.needsLock&&(this.successRoute="lock"),null!=this.win&&this.webAuthnSupported&&(null==(t=this.environmentService.getWebVaultUrl())&&(t="https://vault.bitwarden.com"),this.webAuthn=new p.WebAuthn(this.win,t,this.webAuthnNewTab,this.platformUtilsService,this.i18nService,(function(e){n.token=e,n.submit()}),(function(e){n.platformUtilsService.showToast("error",n.i18nService.t("errorOccurred"),e)}),(function(e){"ready"===e&&(n.webAuthnReady=!0)}))),this.selectedProviderType=this.authService.getDefaultTwoFactorProvider(this.webAuthnSupported),[4,this.init()]):(this.router.navigate([this.loginRoute]),[2]);case 1:return o.sent(),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.cleanupWebAuthn(),this.webAuthn=null},e.prototype.init=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:if(null==this.selectedProviderType)return this.title=this.i18nService.t("loginUnavailable"),[2];switch(this.cleanupWebAuthn(),this.title=s.TwoFactorProviders[this.selectedProviderType].name,e=this.authService.twoFactorProvidersData.get(this.selectedProviderType),this.selectedProviderType){case o.TwoFactorProviderType.WebAuthn:return[3,1];case o.TwoFactorProviderType.Duo:case o.TwoFactorProviderType.OrganizationDuo:return[3,2];case o.TwoFactorProviderType.Email:return[3,3]}return[3,6];case 1:return this.webAuthnSupported&&null!=this.webAuthn?(setTimeout((function(){t.webAuthn.init(e)}),500),[3,7]):[3,7];case 2:return setTimeout((function(){c.init({iframe:void 0,host:e.Host,sig_request:e.Signature,submit_callback:function(e){return r(t,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return null==(t=e.querySelector('input[name="sig_response"]'))?[3,2]:(this.token=t.value,[4,this.submit()]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}})}),0),[3,7];case 3:return this.twoFactorEmail=e.Email,this.authService.twoFactorProvidersData.size>1?[4,this.sendEmail(!1)]:[3,5];case 4:n.sent(),n.label=5;case 5:case 6:return[3,7];case 7:return[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(null==this.token||""===this.token)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verificationCodeRequired")),[2];if(this.selectedProviderType===o.TwoFactorProviderType.WebAuthn){if(null==this.webAuthn)return[2];this.webAuthn.stop()}else this.selectedProviderType!==o.TwoFactorProviderType.Email&&this.selectedProviderType!==o.TwoFactorProviderType.Authenticator||(this.token=this.token.replace(" ","").trim());e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.doSubmit()];case 2:return e.sent(),[3,4];case 3:return e.sent(),this.selectedProviderType===o.TwoFactorProviderType.WebAuthn&&null!=this.webAuthn&&this.webAuthn.start(),[3,4];case 4:return[2]}}))}))},e.prototype.doSubmit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.formPromise=this.authService.logInTwoFactor(this.selectedProviderType,this.token,this.remember),[4,this.formPromise];case 1:return e=n.sent(),[4,this.storageService.get(l.ConstantsService.disableFaviconKey)];case 2:return t=n.sent(),[4,this.stateService.save(l.ConstantsService.disableFaviconKey,!!t)];case 3:return n.sent(),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),e.resetMasterPassword&&(this.successRoute="set-password"),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}}),[2]}}))}))},e.prototype.sendEmail=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(this.selectedProviderType!==o.TwoFactorProviderType.Email)return[2];if(null!=this.emailPromise)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),t=new a.TwoFactorEmailRequest(this.authService.email,this.authService.masterPasswordHash),this.emailPromise=this.apiService.postTwoFactorEmail(t),[4,this.emailPromise];case 2:return n.sent(),e&&this.platformUtilsService.showToast("success",null,this.i18nService.t("verificationCodeEmailSent",this.twoFactorEmail)),[3,4];case 3:return n.sent(),[3,4];case 4:return this.emailPromise=null,[2]}}))}))},e.prototype.cleanupWebAuthn=function(){null!=this.webAuthn&&(this.webAuthn.stop(),this.webAuthn.cleanup())},Object.defineProperty(e.prototype,"authing",{get:function(){return this.authService.authingWithPassword()||this.authService.authingWithSso()||this.authService.authingWithApiKey()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"needsLock",{get:function(){return this.authService.authingWithSso()||this.authService.authingWithApiKey()},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.AuthService),u.ɵɵdirectiveInject(m.Router),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(f.ApiService),u.ɵɵdirectiveInject(v.PlatformUtilsService),u.ɵɵdirectiveInject(Window),u.ɵɵdirectiveInject(y.EnvironmentService),u.ɵɵdirectiveInject(g.StateService),u.ɵɵdirectiveInject(x.StorageService),u.ɵɵdirectiveInject(m.ActivatedRoute))},e.ɵdir=u.ɵɵdefineDirective({type:e}),e}();t.TwoFactorComponent=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.type=t.getDevice(),this.name=t.getDeviceString(),this.identifier=e,this.pushToken=null};t.DeviceRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.email=e};t.PreloginRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,i,o,a){null!=e&&e.length>1?(this.email=e[0],this.masterPasswordHash=e[1]):null!=t&&t.length>2?(this.code=t[0],this.codeVerifier=t[1],this.redirectUri=t[2]):null!=n&&n.length>1&&(this.clientId=n[0],this.clientSecret=n[1]),this.token=i,this.provider=r,this.remember=o,this.device=null!=a?a:null}return e.prototype.toIdentityToken=function(e){var t={scope:"api offline_access",client_id:e};if(null!=this.clientSecret)t.scope="api",t.grant_type="client_credentials",t.client_secret=this.clientSecret;else if(null!=this.masterPasswordHash&&null!=this.email)t.grant_type="password",t.username=this.email,t.password=this.masterPasswordHash;else{if(null==this.code||null==this.codeVerifier||null==this.redirectUri)throw new Error("must provide credentials or codes");t.grant_type="authorization_code",t.code=this.code,t.code_verifier=this.codeVerifier,t.redirect_uri=this.redirectUri}return this.device&&(t.deviceType=this.device.type,t.deviceIdentifier=this.device.identifier,t.deviceName=this.device.name),this.token&&null!=this.provider&&(t.twoFactorToken=this.token,t.twoFactorProvider=this.provider,t.twoFactorRemember=this.remember?"1":"0"),t},e}();t.TokenRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,i,o,a,s){this.win=e,this.webVaultUrl=t,this.webAuthnNewTab=n,this.platformUtilsService=r,this.i18nService=i,this.successCallback=o,this.errorCallback=a,this.infoCallback=s,this.iframe=null,this.parseFunction=this.parseMessage.bind(this),this.connectorLink=e.document.createElement("a")}return e.prototype.init=function(e){var t=new URLSearchParams({data:this.base64Encode(JSON.stringify(e)),parent:encodeURIComponent(this.win.document.location.href),btnText:encodeURIComponent(this.i18nService.t("webAuthnAuthenticate")),v:"1"});this.webAuthnNewTab?(t.append("locale",this.i18nService.translationLocale),this.platformUtilsService.launchUri(this.webVaultUrl+"/webauthn-fallback-connector.html?"+t)):(this.connectorLink.href=this.webVaultUrl+"/webauthn-connector.html?"+t,this.iframe=this.win.document.getElementById("webauthn_iframe"),this.iframe.allow="publickey-credentials-get "+new URL(this.webVaultUrl).origin,this.iframe.src=this.connectorLink.href,this.win.addEventListener("message",this.parseFunction,!1))},e.prototype.stop=function(){this.sendMessage("stop")},e.prototype.start=function(){this.sendMessage("start")},e.prototype.sendMessage=function(e){this.iframe&&this.iframe.src&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(e,this.iframe.src)},e.prototype.base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})))},e.prototype.cleanup=function(){this.win.removeEventListener("message",this.parseFunction,!1)},e.prototype.parseMessage=function(e){if(this.validMessage(e)){var t=e.data.split("|");"success"===t[0]&&this.successCallback?this.successCallback(t[1]):"error"===t[0]&&this.errorCallback?this.errorCallback(t[1]):"info"===t[0]&&this.infoCallback&&this.infoCallback(t[1])}},e.prototype.validMessage=function(e){return null!=e.origin&&""!==e.origin&&e.origin===this.connectorLink.origin&&null!=e.data&&"string"==typeof e.data&&(0===e.data.indexOf("success|")||0===e.data.indexOf("error|")||0===e.data.indexOf("info|"))},e}();t.WebAuthn=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.userId=e,this.token=t};t.VerifyEmailRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.userId=e,this.token=t};t.VerifyDeleteRecoverRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.collections=[]};t.GroupRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.OrganizationUserConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.emails=[],this.collections=[]};t.OrganizationUserInviteRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.collections=[]};t.OrganizationUserUpdateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.groupIds=[]};t.OrganizationUserUpdateGroupsRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.AppIdService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.LogService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.PolicyRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.OrganizationUpdateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Charge=0]="Charge",e[e.Credit=1]="Credit",e[e.PromotionalCredit=2]="PromotionalCredit",e[e.ReferralCredit=3]="ReferralCredit",e[e.Refund=4]="Refund"}(t.TransactionType||(t.TransactionType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.VerifyBankRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.BitPayInvoiceRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(577).OrganizationTaxInfoUpdateRequest);t.PaymentRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.OrganizationCreateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.OrganizationUpgradeRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.SeatRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.StorageRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.UpdateTwoFactorDuoRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.TwoFactorProviderRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.UpdateTwoFactorAuthenticatorRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.UpdateTwoFactorEmailRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.UpdateTwoFactorWebAuthnDeleteRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.UpdateTwoFactorWebAuthnRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(79).PasswordVerificationRequest);t.UpdateTwoFactorYubioOtpRequest=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(18),n(71),n(189),n(3),n(5),n(254)),s=n(0),l=n(18),c=n(3),p=n(5),u=n(189),d=n(71),m=function(){function e(e,t,n,r,i,a){this.cryptoService=e,this.i18nService=t,this.platformUtilsService=n,this.exportService=r,this.eventService=i,this.win=a,this.onSaved=new o.EventEmitter,this.format="json",this.showPassword=!1}return Object.defineProperty(e.prototype,"encryptedFormat",{get:function(){return"encrypted_json"===this.format},enumerable:!0,configurable:!0}),e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return null==this.masterPassword||""===this.masterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword")),[2]):[4,this.warningDialog()];case 1:return r.sent()?[4,this.cryptoService.hashPassword(this.masterPassword,null)]:[2];case 2:return e=r.sent(),[4,this.cryptoService.getKeyHash()];case 3:if(null==(t=r.sent())||null==e||t!==e)return[3,9];r.label=4;case 4:return r.trys.push([4,7,,8]),this.formPromise=this.getExportData(),[4,this.formPromise];case 5:return n=r.sent(),this.downloadFile(n),this.saved(),[4,this.collectEvent()];case 6:return r.sent(),[3,8];case 7:return r.sent(),[3,8];case 8:return[3,10];case 9:this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword")),r.label=10;case 10:return[2]}}))}))},e.prototype.warningDialog=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.encryptedFormat?[4,this.platformUtilsService.showDialog("<p>"+this.i18nService.t("encExportKeyWarningDesc")+"<p>"+this.i18nService.t("encExportAccountWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning",!0)]:[3,2];case 1:return[2,e.sent()];case 2:return[4,this.platformUtilsService.showDialog(this.i18nService.t("exportWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning")];case 3:return[2,e.sent()]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("masterPassword").focus()},e.prototype.saved=function(){this.onSaved.emit()},e.prototype.getExportData=function(){return this.exportService.getExport(this.format)},e.prototype.getFileName=function(e){var t=this.format;return"encrypted_json"===this.format&&(e=null==e?"encrypted":"encrypted_"+e,t="json"),this.exportService.getFileName(e,t)},e.prototype.collectEvent=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.eventService.collect(a.EventType.User_ClientExportedVault)];case 1:return e.sent(),[2]}}))}))},e.prototype.downloadFile=function(e){var t=this.getFileName();this.platformUtilsService.saveFile(this.win,e,{type:"text/plain"},t)},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.CryptoService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.ExportService),s.ɵɵdirectiveInject(d.EventService),s.ɵɵdirectiveInject(Window))},e.ɵdir=s.ɵɵdefineDirective({type:e,outputs:{onSaved:"onSaved"}}),e}();t.ExportComponent=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.AttachmentRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(267),a=n(0),s=n(39),l=n(254),c=n(118),p=n(157),u=n(141),d=n(106),m=n(259),h=(n(87),n(19),n(40),n(71),n(48),n(3),n(14),n(5),n(43),n(38),n(7),n(88)),f=n(143),v=n(209),y=n(144),g=n(258),x=n(159),b=n(94),S=n(30),w=n(0),C=n(19),I=n(48),E=n(3),P=n(5),k=n(87),_=n(38),A=n(7),O=n(40),T=n(14),M=n(71),B=n(43),D=function(){function e(e,t,n,r,i,o,l,p,u,d,h){this.cipherService=e,this.folderService=t,this.i18nService=n,this.platformUtilsService=r,this.auditService=i,this.stateService=o,this.userService=l,this.collectionService=p,this.messagingService=u,this.eventService=d,this.policyService=h,this.cloneMode=!1,this.folderId=null,this.organizationId=null,this.onSavedCipher=new a.EventEmitter,this.onDeletedCipher=new a.EventEmitter,this.onRestoredCipher=new a.EventEmitter,this.onCancelled=new a.EventEmitter,this.onEditAttachments=new a.EventEmitter,this.onShareCipher=new a.EventEmitter,this.onEditCollections=new a.EventEmitter,this.onGeneratePassword=new a.EventEmitter,this.editMode=!1,this.collections=[],this.showPassword=!1,this.showCardCode=!1,this.cipherType=s.CipherType,this.fieldType=c.FieldType,this.addFieldType=c.FieldType.Text,this.ownershipOptions=[],this.currentDate=new Date,this.allowPersonal=!0,this.typeOptions=[{name:n.t("typeLogin"),value:s.CipherType.Login},{name:n.t("typeCard"),value:s.CipherType.Card},{name:n.t("typeIdentity"),value:s.CipherType.Identity},{name:n.t("typeSecureNote"),value:s.CipherType.SecureNote}],this.cardBrandOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:"Visa",value:"Visa"},{name:"Mastercard",value:"Mastercard"},{name:"American Express",value:"Amex"},{name:"Discover",value:"Discover"},{name:"Diners Club",value:"Diners Club"},{name:"JCB",value:"JCB"},{name:"Maestro",value:"Maestro"},{name:"UnionPay",value:"UnionPay"},{name:n.t("other"),value:"Other"}],this.cardExpMonthOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:"01 - "+n.t("january"),value:"1"},{name:"02 - "+n.t("february"),value:"2"},{name:"03 - "+n.t("march"),value:"3"},{name:"04 - "+n.t("april"),value:"4"},{name:"05 - "+n.t("may"),value:"5"},{name:"06 - "+n.t("june"),value:"6"},{name:"07 - "+n.t("july"),value:"7"},{name:"08 - "+n.t("august"),value:"8"},{name:"09 - "+n.t("september"),value:"9"},{name:"10 - "+n.t("october"),value:"10"},{name:"11 - "+n.t("november"),value:"11"},{name:"12 - "+n.t("december"),value:"12"}],this.identityTitleOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:n.t("mr"),value:n.t("mr")},{name:n.t("mrs"),value:n.t("mrs")},{name:n.t("ms"),value:n.t("ms")},{name:n.t("dr"),value:n.t("dr")}],this.addFieldTypeOptions=[{name:n.t("cfTypeText"),value:c.FieldType.Text},{name:n.t("cfTypeHidden"),value:c.FieldType.Hidden},{name:n.t("cfTypeBoolean"),value:c.FieldType.Boolean}],this.uriMatchOptions=[{name:n.t("defaultMatchDetection"),value:null},{name:n.t("baseDomain"),value:m.UriMatchType.Domain},{name:n.t("host"),value:m.UriMatchType.Host},{name:n.t("startsWith"),value:m.UriMatchType.StartsWith},{name:n.t("regEx"),value:m.UriMatchType.RegularExpression},{name:n.t("exact"),value:m.UriMatchType.Exact},{name:n.t("never"),value:m.UriMatchType.Never}]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.init()];case 1:return e.sent(),[2]}}))}))},e.prototype.init=function(){return r(this,void 0,void 0,(function(){var e,t,n,r=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.policyService.getAll(u.PolicyType.PersonalOwnership)];case 1:return e=i.sent(),[4,this.userService.getEmail()];case 2:return t=i.sent(),this.ownershipOptions.push({name:t,value:null}),[4,this.userService.getAllOrganizations()];case 3:return i.sent().sort(S.Utils.getSortFunction(this.i18nService,"name")).forEach((function(t){if(t.enabled&&t.status===p.OrganizationUserStatusType.Confirmed&&(r.ownershipOptions.push({name:t.name,value:t.id}),null!=e&&t.usePolicies&&!t.canManagePolicies&&r.allowPersonal))for(var n=0,i=e;n<i.length;n++){var o=i[n];if(o.organizationId===t.id&&o.enabled){r.allowPersonal=!1,r.ownershipOptions.splice(0,1),null==r.organizationId&&(r.organizationId=t.id);break}}})),n=this,[4,this.loadCollections()];case 4:return n.writeableCollections=i.sent(),[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o=this;return i(this,(function(i){switch(i.label){case 0:return this.editMode=null!=this.cipherId,this.editMode?(this.editMode=!0,this.cloneMode?(this.cloneMode=!0,this.title=this.i18nService.t("addItem")):this.title=this.i18nService.t("editItem")):this.title=this.i18nService.t("addItem"),[4,this.stateService.get("addEditCipherInfo")];case 1:return null!=(e=i.sent())&&(this.cipher=e.cipher,this.collectionIds=e.collectionIds),[4,this.stateService.remove("addEditCipherInfo")];case 2:return i.sent(),null!=this.cipher?[3,6]:this.editMode?[4,this.loadCipher()]:[3,5];case 3:return t=i.sent(),n=this,[4,t.decrypt()];case 4:return n.cipher=i.sent(),this.cloneMode&&(this.cipher.name+=" - "+this.i18nService.t("clone"),null!=this.cipher.organizationId||this.allowPersonal||(this.cipher.organizationId=this.organizationId)),[3,6];case 5:this.cipher=new f.CipherView,this.cipher.organizationId=null==this.organizationId?null:this.organizationId,this.cipher.folderId=this.folderId,this.cipher.type=null==this.type?s.CipherType.Login:this.type,this.cipher.login=new x.LoginView,this.cipher.login.uris=[new g.LoginUriView],this.cipher.card=new h.CardView,this.cipher.identity=new y.IdentityView,this.cipher.secureNote=new b.SecureNoteView,this.cipher.secureNote.type=d.SecureNoteType.Generic,i.label=6;case 6:return null==this.cipher||this.editMode&&null==e&&!this.cloneMode?[3,8]:[4,this.organizationChanged()];case 7:i.sent(),null!=this.collectionIds&&this.collectionIds.length>0&&this.collections.length>0&&this.collections.forEach((function(e){o.collectionIds.indexOf(e.id)>-1&&(e.checked=!0)})),i.label=8;case 8:return r=this,[4,this.folderService.getAllDecrypted()];case 9:return r.folders=i.sent(),this.editMode&&this.previousCipherId!==this.cipherId&&this.eventService.collect(l.EventType.Cipher_ClientViewed,this.cipherId),this.previousCipherId=this.cipherId,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.cipher.isDeleted?[2,this.restore()]:null==this.cipher.name||""===this.cipher.name?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),[2,!1]):this.editMode&&!this.cloneMode||this.allowPersonal||null!=this.cipher.organizationId?(this.editMode&&!this.cloneMode||this.cipher.type!==s.CipherType.Login||null==this.cipher.login.uris||1!==this.cipher.login.uris.length||null!=this.cipher.login.uris[0].uri&&""!==this.cipher.login.uris[0].uri||(this.cipher.login.uris=null),this.editMode&&!this.cloneMode||null==this.cipher.organizationId||(this.cipher.collectionIds=null==this.collections?[]:this.collections.filter((function(e){return e.checked})).map((function(e){return e.id}))),this.cloneMode&&(this.cipher.id=null),[4,this.encryptCipher()]):(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("personalOwnershipSubmitError")),[2,!1]);case 1:e=t.sent(),t.label=2;case 2:return t.trys.push([2,4,,5]),this.formPromise=this.saveCipher(e),[4,this.formPromise];case 3:return t.sent(),this.cipher.id=e.id,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode&&!this.cloneMode?"editedItem":"addedItem")),this.onSavedCipher.emit(this.cipher),this.messagingService.send(this.editMode&&!this.cloneMode?"editedCipher":"addedCipher"),[2,!0];case 4:return t.sent(),[3,5];case 5:return[2,!1]}}))}))},e.prototype.addUri=function(){this.cipher.type===s.CipherType.Login&&(null==this.cipher.login.uris&&(this.cipher.login.uris=[]),this.cipher.login.uris.push(new g.LoginUriView))},e.prototype.removeUri=function(e){if(this.cipher.type===s.CipherType.Login&&null!=this.cipher.login.uris){var t=this.cipher.login.uris.indexOf(e);t>-1&&this.cipher.login.uris.splice(t,1)}},e.prototype.addField=function(){null==this.cipher.fields&&(this.cipher.fields=[]);var e=new v.FieldView;e.type=this.addFieldType,e.newField=!0,this.cipher.fields.push(e)},e.prototype.removeField=function(e){var t=this.cipher.fields.indexOf(e);t>-1&&this.cipher.fields.splice(t,1)},e.prototype.trackByFunction=function(e,t){return e},e.prototype.cancel=function(){this.onCancelled.emit(this.cipher)},e.prototype.attachments=function(){this.onEditAttachments.emit(this.cipher)},e.prototype.share=function(){this.onShareCipher.emit(this.cipher)},e.prototype.editCollections=function(){this.onEditCollections.emit(this.cipher)},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t(this.cipher.isDeleted?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t("deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.deleteCipher(),[4,this.deletePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t(this.cipher.isDeleted?"permanentlyDeletedItem":"deletedItem")),this.onDeletedCipher.emit(this.cipher),this.messagingService.send(this.cipher.isDeleted?"permanentlyDeletedCipher":"deletedCipher"),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,!0]}}))}))},e.prototype.restore=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.cipher.isDeleted?[4,this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2,!1];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.restorePromise=this.restoreCipher(),[4,this.restorePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItem")),this.onRestoredCipher.emit(this.cipher),this.messagingService.send("restoredCipher"),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,!0]}}))}))},e.prototype.generatePassword=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null!=this.cipher.login&&null!=this.cipher.login.password&&this.cipher.login.password.length?[4,this.platformUtilsService.showDialog(this.i18nService.t("overwritePasswordConfirmation"),this.i18nService.t("overwritePassword"),this.i18nService.t("yes"),this.i18nService.t("no"))]:[3,2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return this.onGeneratePassword.emit(),[2,!0]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("loginPassword").focus(),this.editMode&&this.showPassword&&this.eventService.collect(l.EventType.Cipher_ClientToggledPasswordVisible,this.cipherId)},e.prototype.toggleCardCode=function(){this.showCardCode=!this.showCardCode,document.getElementById("cardCode").focus(),this.editMode&&this.showCardCode&&this.eventService.collect(l.EventType.Cipher_ClientToggledCardCodeVisible,this.cipherId)},e.prototype.toggleFieldValue=function(e){var t=e;t.showValue=!t.showValue,this.editMode&&t.showValue&&this.eventService.collect(l.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipherId)},e.prototype.toggleUriOptions=function(e){var t=e;t.showOptions=(null!=t.showOptions||null==e.match)&&!t.showOptions},e.prototype.loginUriMatchChanged=function(e){var t=e;t.showOptions=null==t.showOptions||t.showOptions},e.prototype.drop=function(e){o.moveItemInArray(this.cipher.fields,e.previousIndex,e.currentIndex)},e.prototype.organizationChanged=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return null!=this.writeableCollections&&this.writeableCollections.forEach((function(e){return e.checked=!1})),null==this.cipher.organizationId?[3,2]:(this.collections=this.writeableCollections.filter((function(e){return e.organizationId===t.cipher.organizationId})),[4,this.userService.getOrganization(this.cipher.organizationId)]);case 1:return null!=(e=n.sent())&&(this.cipher.organizationUseTotp=e.useTotp),[3,3];case 2:this.collections=[],n.label=3;case 3:return[2]}}))}))},e.prototype.checkPassword=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.checkPasswordPromise||(null==this.cipher.login||null==this.cipher.login.password||""===this.cipher.login.password)?[2]:(this.checkPasswordPromise=this.auditService.passwordLeaked(this.cipher.login.password),[4,this.checkPasswordPromise]);case 1:return e=t.sent(),this.checkPasswordPromise=null,e>0?this.platformUtilsService.showToast("warning",null,this.i18nService.t("passwordExposed",e.toString())):this.platformUtilsService.showToast("success",null,this.i18nService.t("passwordSafe")),[2]}}))}))},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.collectionService.getAllDecrypted()];case 1:return[2,e.sent().filter((function(e){return!e.readOnly}))]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.encryptCipher=function(){return this.cipherService.encrypt(this.cipher)},e.prototype.saveCipher=function(e){return this.cipherService.saveWithServer(e)},e.prototype.deleteCipher=function(){return this.cipher.isDeleted?this.cipherService.deleteWithServer(this.cipher.id):this.cipherService.softDeleteWithServer(this.cipher.id)},e.prototype.restoreCipher=function(){return this.cipherService.restoreWithServer(this.cipher.id)},e.ɵfac=function(t){return new(t||e)(w.ɵɵdirectiveInject(C.CipherService),w.ɵɵdirectiveInject(I.FolderService),w.ɵɵdirectiveInject(E.I18nService),w.ɵɵdirectiveInject(P.PlatformUtilsService),w.ɵɵdirectiveInject(k.AuditService),w.ɵɵdirectiveInject(_.StateService),w.ɵɵdirectiveInject(A.UserService),w.ɵɵdirectiveInject(O.CollectionService),w.ɵɵdirectiveInject(T.MessagingService),w.ɵɵdirectiveInject(M.EventService),w.ɵɵdirectiveInject(B.PolicyService))},e.ɵdir=w.ɵɵdefineDirective({type:e,inputs:{cloneMode:"cloneMode",folderId:"folderId",cipherId:"cipherId",type:"type",collectionIds:"collectionIds",organizationId:"organizationId"},outputs:{onSavedCipher:"onSavedCipher",onDeletedCipher:"onDeletedCipher",onRestoredCipher:"onRestoredCipher",onCancelled:"onCancelled",onEditAttachments:"onEditAttachments",onShareCipher:"onShareCipher",onEditCollections:"onEditCollections",onGeneratePassword:"onGeneratePassword"}}),e}();t.AddEditComponent=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(498);t.AttachmentResponse=r.AttachmentResponse;var i=n(262);t.CipherResponse=i.CipherResponse;var o=n(499);t.CollectionResponse=o.CollectionResponse;var a=n(884);t.DeviceResponse=a.DeviceResponse;var s=n(500);t.DomainsResponse=s.DomainsResponse;var l=n(211);t.ErrorResponse=l.ErrorResponse;var c=n(501);t.FolderResponse=c.FolderResponse;var p=n(615);t.GlobalDomainResponse=p.GlobalDomainResponse;var u=n(616);t.IdentityTokenResponse=u.IdentityTokenResponse;var d=n(617);t.IdentityTwoFactorResponse=d.IdentityTwoFactorResponse;var m=n(885);t.KeysResponse=m.KeysResponse;var h=n(618);t.ListResponse=h.ListResponse;var f=n(619);t.ProfileOrganizationResponse=f.ProfileOrganizationResponse;var v=n(293);t.ProfileResponse=v.ProfileResponse;var y=n(620);t.SyncResponse=y.SyncResponse},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.password=n.getResponseProperty("Password"),n.lastUsedDate=n.getResponseProperty("LastUsedDate"),n}return i(t,e),t}(n(23).BaseResponse);t.PasswordHistoryResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.identifier=n.getResponseProperty("Identifier"),n.type=n.getResponseProperty("Type"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(n(23).BaseResponse);t.DeviceResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.privateKey=n.getResponseProperty("PrivateKey"),n.publicKey=n.getResponseProperty("PublicKey"),n}return i(t,e),t}(n(23).BaseResponse);t.KeysResponse=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(80),n(0)),s=n(80),l=function(){function e(e){this.searchService=e,this.activeCipherId=null,this.onCipherClicked=new o.EventEmitter,this.onCipherRightClicked=new o.EventEmitter,this.onAddCipher=new o.EventEmitter,this.onAddCipherOptions=new o.EventEmitter,this.loaded=!1,this.ciphers=[],this.pagedCiphers=[],this.searchPlaceholder=null,this.filter=null,this.deleted=!1,this.searchPending=!1,this.didScroll=!1,this.pageSize=100,this.searchTimeout=null,this.pagedCiphersCount=0,this.refreshing=!1}return e.prototype.load=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return this.deleted=t||!1,[4,this.applyFilter(e)];case 1:return n.sent(),this.loaded=!0,[2]}}))}))},e.prototype.loadMore=function(){if(!(this.ciphers.length<=this.pageSize)){var e=this.pagedCiphers.length,t=this.pageSize;this.refreshing&&0===e&&this.pagedCiphersCount>this.pageSize&&(t=this.pagedCiphersCount),this.ciphers.length>e&&(this.pagedCiphers=this.pagedCiphers.concat(this.ciphers.slice(e,e+t))),this.pagedCiphersCount=this.pagedCiphers.length,this.didScroll=this.pagedCiphers.length>this.pageSize}},e.prototype.reload=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return this.loaded=!1,this.ciphers=[],[4,this.load(e,t)];case 1:return n.sent(),[2]}}))}))},e.prototype.refresh=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,,2,3]),this.refreshing=!0,[4,this.reload(this.filter,this.deleted)];case 1:return e.sent(),[3,3];case 2:return this.refreshing=!1,[7];case 3:return[2]}}))}))},e.prototype.applyFilter=function(e){return void 0===e&&(e=null),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.filter=e,[4,this.search(null)];case 1:return t.sent(),[2]}}))}))},e.prototype.search=function(e,t){return void 0===e&&(e=null),r(this,void 0,void 0,(function(){var n,o,a=this;return i(this,(function(s){switch(s.label){case 0:return this.searchPending=!1,null!=this.searchTimeout&&clearTimeout(this.searchTimeout),n=function(e){return e.isDeleted===a.deleted},null!=e?[3,3]:(o=this,[4,this.searchService.searchCiphers(this.searchText,[this.filter,n],t)]);case 1:return o.ciphers=s.sent(),[4,this.resetPaging()];case 2:return s.sent(),[2];case 3:return this.searchPending=!0,this.searchTimeout=setTimeout((function(){return r(a,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=this,[4,this.searchService.searchCiphers(this.searchText,[this.filter,n],t)];case 1:return e.ciphers=r.sent(),[4,this.resetPaging()];case 2:return r.sent(),this.searchPending=!1,[2]}}))}))}),e),[2]}}))}))},e.prototype.selectCipher=function(e){this.onCipherClicked.emit(e)},e.prototype.rightClickCipher=function(e){this.onCipherRightClicked.emit(e)},e.prototype.addCipher=function(){this.onAddCipher.emit()},e.prototype.addCipherOptions=function(){this.onAddCipherOptions.emit()},e.prototype.isSearching=function(){return!this.searchPending&&this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.ciphers.length>this.pageSize},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedCiphers=[],this.loadMore(),[2]}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.SearchService))},e.ɵdir=a.ɵɵdefineDirective({type:e,inputs:{activeCipherId:"activeCipherId"},outputs:{onCipherClicked:"onCipherClicked",onCipherRightClicked:"onCipherRightClicked",onAddCipher:"onAddCipher",onAddCipherOptions:"onAddCipherOptions"}}),e}();t.CiphersComponent=l},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(19),n(40),n(3),n(5),n(0)),s=n(40),l=n(5),c=n(3),p=n(19),u=function(){function e(e,t,n,r){this.collectionService=e,this.platformUtilsService=t,this.i18nService=n,this.cipherService=r,this.allowSelectNone=!1,this.onSavedCollections=new o.EventEmitter,this.collections=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r=this;return i(this,(function(i){switch(i.label){case 0:return e=this,[4,this.loadCipher()];case 1:return e.cipherDomain=i.sent(),this.collectionIds=this.loadCipherCollections(),t=this,[4,this.cipherDomain.decrypt()];case 2:return t.cipher=i.sent(),n=this,[4,this.loadCollections()];case 3:return n.collections=i.sent(),this.collections.forEach((function(e){return e.checked=!1})),null!=this.collectionIds&&this.collections.forEach((function(e){e.checked=null!=r.collectionIds&&r.collectionIds.indexOf(e.id)>-1})),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(e=this.collections.filter((function(e){return!!e.checked})).map((function(e){return e.id})),!this.allowSelectNone&&0===e.length)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection")),[2];this.cipherDomain.collectionIds=e,t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.saveCollections(),[4,this.formPromise];case 2:return t.sent(),this.onSavedCollections.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("editedItem")),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.loadCipherCollections=function(){return this.cipherDomain.collectionIds},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){switch(t.label){case 0:return[4,this.collectionService.getAllDecrypted()];case 1:return[2,t.sent().filter((function(t){return!t.readOnly&&t.organizationId===e.cipher.organizationId}))]}}))}))},e.prototype.saveCollections=function(){return this.cipherService.saveCollectionsWithServer(this.cipherDomain)},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.CollectionService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.CipherService))},e.ɵdir=a.ɵɵdefineDirective({type:e,inputs:{cipherId:"cipherId",allowSelectNone:"allowSelectNone"},outputs:{onSavedCollections:"onSavedCollections"}}),e}();t.CollectionsComponent=u},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(39),s=(n(40),n(48),n(41),n(7),n(70)),l=n(0),c=n(40),p=n(48),u=n(41),d=n(7),m=function(){function e(e,t,n,r){this.collectionService=e,this.folderService=t,this.storageService=n,this.userService=r,this.showFolders=!0,this.showCollections=!0,this.showFavorites=!0,this.showTrash=!0,this.onAllClicked=new o.EventEmitter,this.onFavoritesClicked=new o.EventEmitter,this.onTrashClicked=new o.EventEmitter,this.onCipherTypeClicked=new o.EventEmitter,this.onFolderClicked=new o.EventEmitter,this.onAddFolder=new o.EventEmitter,this.onEditFolder=new o.EventEmitter,this.onCollectionClicked=new o.EventEmitter,this.loaded=!1,this.cipherType=a.CipherType,this.selectedAll=!1,this.selectedFavorites=!1,this.selectedTrash=!1,this.selectedType=null,this.selectedFolder=!1,this.selectedFolderId=null,this.selectedCollectionId=null}return e.prototype.load=function(e){return void 0===e&&(e=!0),r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getUserId()];case 1:return t=r.sent(),this.collapsedGroupingsKey=s.ConstantsService.collapsedGroupingsKey+"_"+t,[4,this.storageService.get(this.collapsedGroupingsKey)];case 2:return n=r.sent(),this.collapsedGroupings=null==n?new Set:new Set(n),[4,this.loadFolders()];case 3:return r.sent(),[4,this.loadCollections()];case 4:return r.sent(),e&&(this.loaded=!0),[2]}}))}))},e.prototype.loadCollections=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return this.showCollections?[4,this.collectionService.getAllDecrypted()]:[2];case 1:return t=r.sent(),this.collections=null!=e?t.filter((function(t){return t.organizationId===e})):t,n=this,[4,this.collectionService.getAllNested(this.collections)];case 2:return n.nestedCollections=r.sent(),[2]}}))}))},e.prototype.loadFolders=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.showFolders?(e=this,[4,this.folderService.getAllDecrypted()]):[2];case 1:return e.folders=n.sent(),t=this,[4,this.folderService.getAllNested()];case 2:return t.nestedFolders=n.sent(),[2]}}))}))},e.prototype.selectAll=function(){this.clearSelections(),this.selectedAll=!0,this.onAllClicked.emit()},e.prototype.selectFavorites=function(){this.clearSelections(),this.selectedFavorites=!0,this.onFavoritesClicked.emit()},e.prototype.selectTrash=function(){this.clearSelections(),this.selectedTrash=!0,this.onTrashClicked.emit()},e.prototype.selectType=function(e){this.clearSelections(),this.selectedType=e,this.onCipherTypeClicked.emit(e)},e.prototype.selectFolder=function(e){this.clearSelections(),this.selectedFolder=!0,this.selectedFolderId=e.id,this.onFolderClicked.emit(e)},e.prototype.addFolder=function(){this.onAddFolder.emit()},e.prototype.editFolder=function(e){this.onEditFolder.emit(e)},e.prototype.selectCollection=function(e){this.clearSelections(),this.selectedCollectionId=e.id,this.onCollectionClicked.emit(e)},e.prototype.clearSelections=function(){this.selectedAll=!1,this.selectedFavorites=!1,this.selectedTrash=!1,this.selectedType=null,this.selectedFolder=!1,this.selectedFolderId=null,this.selectedCollectionId=null},e.prototype.collapse=function(e,t){if(void 0===t&&(t=""),null!=e.id){var n=t+e.id;this.isCollapsed(e,t)?this.collapsedGroupings.delete(n):this.collapsedGroupings.add(n),this.storageService.save(this.collapsedGroupingsKey,this.collapsedGroupings)}},e.prototype.isCollapsed=function(e,t){return void 0===t&&(t=""),this.collapsedGroupings.has(t+e.id)},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.CollectionService),l.ɵɵdirectiveInject(p.FolderService),l.ɵɵdirectiveInject(u.StorageService),l.ɵɵdirectiveInject(d.UserService))},e.ɵdir=l.ɵɵdefineDirective({type:e,inputs:{showFolders:"showFolders",showCollections:"showCollections",showFavorites:"showFavorites",showTrash:"showTrash"},outputs:{onAllClicked:"onAllClicked",onFavoritesClicked:"onFavoritesClicked",onTrashClicked:"onTrashClicked",onCipherTypeClicked:"onCipherTypeClicked",onFolderClicked:"onFolderClicked",onAddFolder:"onAddFolder",onEditFolder:"onEditFolder",onCollectionClicked:"onCollectionClicked"}}),e}();t.GroupingsComponent=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(160),l=n(890),c=n(81),p=n(509),u=n(510),d=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;if(null==t)return r;switch(r.buildDomainModel(r,t,{id:null,name:null,expirationDate:null,creatorIdentifier:null},n,["id","expirationDate","creatorIdentifier"]),r.type=t.type,r.type){case s.SendType.Text:r.text=new u.SendText(t.text,n);break;case s.SendType.File:r.file=new p.SendFile(t.file,n)}return r}return i(t,e),t.prototype.decrypt=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=new l.SendAccessView(this),[4,this.decryptObj(t,{name:null},null,e)];case 1:switch(i.sent(),this.type){case s.SendType.File:return[3,2];case s.SendType.Text:return[3,4]}return[3,6];case 2:return n=t,[4,this.file.decrypt(e)];case 3:return n.file=i.sent(),[3,7];case 4:return r=t,[4,this.text.decrypt(e)];case 5:return r.text=i.sent(),[3,7];case 6:return[3,7];case 7:return[2,t]}}))}))},t}(c.default);t.SendAccess=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(296),i=n(297),o=function(e){this.id=null,this.name=null,this.type=null,this.text=new i.SendTextView,this.file=new r.SendFileView,this.expirationDate=null,this.creatorIdentifier=null,e&&(this.id=e.id,this.type=e.type,this.expirationDate=e.expirationDate,this.creatorIdentifier=e.creatorIdentifier)};t.SendAccessView=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.SendAccessRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(157),a=n(141),s=n(160),l=n(0),c=n(191),p=n(3),u=n(5),d=n(64),m=n(80),h=n(43),f=n(7),v=function(){function e(e,t,n,r,i,o,a,l){this.sendService=e,this.i18nService=t,this.platformUtilsService=n,this.environmentService=r,this.ngZone=i,this.searchService=o,this.policyService=a,this.userService=l,this.disableSend=!1,this.sendType=s.SendType,this.loaded=!1,this.loading=!0,this.refreshing=!1,this.expired=!1,this.type=null,this.sends=[],this.filteredSends=[],this.searchPending=!1,this.hasSearched=!1}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.policyService.getAll(a.PolicyType.DisableSend)];case 1:return e=n.sent(),[4,this.userService.getAllOrganizations()];case 2:return t=n.sent(),this.disableSend=t.some((function(t){return t.enabled&&t.status===o.OrganizationUserStatusType.Confirmed&&t.usePolicies&&!t.canManagePolicies&&e.some((function(e){return e.organizationId===t.id&&e.enabled}))})),[2]}}))}))},e.prototype.load=function(e){return void 0===e&&(e=null),r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.loading=!0,[4,this.sendService.getAllDecrypted()];case 1:return e=t.sent(),this.sends=e,null==this.onSuccessfulLoad?[3,3]:[4,this.onSuccessfulLoad()];case 2:return t.sent(),[3,4];case 3:this.selectAll(),t.label=4;case 4:return this.loading=!1,this.loaded=!0,[2]}}))}))},e.prototype.reload=function(e){return void 0===e&&(e=null),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.loaded=!1,this.sends=[],[4,this.load(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.refresh=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,,2,3]),this.refreshing=!0,[4,this.reload(this.filter)];case 1:return e.sent(),[3,3];case 2:return this.refreshing=!1,[7];case 3:return[2]}}))}))},e.prototype.applyFilter=function(e){return void 0===e&&(e=null),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.filter=e,[4,this.search(null)];case 1:return t.sent(),[2]}}))}))},e.prototype.search=function(e){return void 0===e&&(e=null),r(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return this.searchPending=!1,null!=this.searchTimeout&&clearTimeout(this.searchTimeout),null==e?(this.hasSearched=this.searchService.isSearchable(this.searchText),this.filteredSends=this.sends.filter((function(e){return null==t.filter||t.filter(e)})),this.applyTextSearch(),[2]):(this.searchPending=!0,this.searchTimeout=setTimeout((function(){return r(t,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.hasSearched=this.searchService.isSearchable(this.searchText),this.filteredSends=this.sends.filter((function(t){return null==e.filter||e.filter(t)})),this.applyTextSearch(),this.searchPending=!1,[2]}))}))}),e),[2])}))}))},e.prototype.removePassword=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise||null==e.password?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("removePasswordConfirmation"),this.i18nService.t("removePassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,7,,8]),this.actionPromise=this.sendService.removePasswordWithServer(e.id),[4,this.actionPromise];case 3:return t.sent(),null==this.onSuccessfulRemovePassword?[3,4]:(this.onSuccessfulRemovePassword(),[3,6]);case 4:return this.platformUtilsService.showToast("success",null,this.i18nService.t("removedPassword")),[4,this.load()];case 5:t.sent(),t.label=6;case 6:return[3,8];case 7:return t.sent(),[3,8];case 8:return this.actionPromise=null,[2]}}))}))},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return null!=this.actionPromise?[2,!1]:[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,7,,8]),this.actionPromise=this.sendService.deleteWithServer(e.id),[4,this.actionPromise];case 3:return t.sent(),null==this.onSuccessfulDelete?[3,4]:(this.onSuccessfulDelete(),[3,6]);case 4:return this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),[4,this.refresh()];case 5:t.sent(),t.label=6;case 6:return[3,8];case 7:return t.sent(),[3,8];case 8:return this.actionPromise=null,[2,!0]}}))}))},e.prototype.copy=function(e){var t="https://send.bitwarden.com/#",n=this.environmentService.getWebVaultUrl();null!=n&&(t=n+"/#/send/");var r=t+e.accessId+"/"+e.urlB64Key;this.platformUtilsService.copyToClipboard(r),this.platformUtilsService.showToast("success",null,this.i18nService.t("valueCopied",this.i18nService.t("sendLink")))},e.prototype.searchTextChanged=function(){this.search(200)},e.prototype.selectAll=function(){this.clearSelections(),this.selectedAll=!0,this.applyFilter(null)},e.prototype.selectType=function(e){this.clearSelections(),this.selectedType=e,this.applyFilter((function(t){return t.type===e}))},e.prototype.clearSelections=function(){this.selectedAll=!1,this.selectedType=null},e.prototype.applyTextSearch=function(){null!=this.searchText&&(this.filteredSends=this.searchService.searchSends(this.filteredSends,this.searchText))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.SendService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.PlatformUtilsService),l.ɵɵdirectiveInject(d.EnvironmentService),l.ɵɵdirectiveInject(l.NgZone),l.ɵɵdirectiveInject(m.SearchService),l.ɵɵdirectiveInject(h.PolicyService),l.ɵɵdirectiveInject(f.UserService))},e.ɵdir=l.ɵɵdefineDirective({type:e}),e}();t.SendComponent=v},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r};Object.defineProperty(t,"__esModule",{value:!0});var a,s=n(0),l=n(157),c=n(141),p=n(160),u=n(296),d=n(297),m=n(632),h=n(0),f=n(3),v=n(5),y=n(64),g=n(4),x=n(191),b=n(7),S=n(14),w=n(43);!function(e){e.DeletionDate="deletion",e.ExpriationDate="expiration"}(a||(a={}));var C=function(){function e(e,t,n,r,i,a,l,c){this.i18nService=e,this.platformUtilsService=t,this.environmentService=n,this.datePipe=r,this.sendService=i,this.userService=a,this.messagingService=l,this.policyService=c,this.onSavedSend=new s.EventEmitter,this.onDeletedSend=new s.EventEmitter,this.onCancelled=new s.EventEmitter,this.copyLink=!1,this.disableSend=!1,this.disableHideEmail=!1,this.expirationDate=null,this.showPassword=!1,this.sendType=p.SendType,this.deletionDateSelect=168,this.expirationDateSelect=null,this.canAccessPremium=!0,this.emailVerified=!0,this.alertShown=!1,this.showOptions=!1,this.typeOptions=[{name:e.t("sendTypeFile"),value:p.SendType.File},{name:e.t("sendTypeText"),value:p.SendType.Text}],this.deletionDateOptions=this.expirationDateOptions=[{name:e.t("oneHour"),value:1},{name:e.t("oneDay"),value:24},{name:e.t("days","2"),value:48},{name:e.t("days","3"),value:72},{name:e.t("days","7"),value:168},{name:e.t("days","30"),value:720},{name:e.t("custom"),value:0}],this.expirationDateOptions=[{name:e.t("never"),value:null}].concat(o(this.deletionDateOptions));var u=this.environmentService.getWebVaultUrl();this.sendLinkBaseUrl=null==u?"https://send.bitwarden.com/#":u+"/#/send/"}return Object.defineProperty(e.prototype,"link",{get:function(){return null!=this.send.id&&null!=this.send.accessId?this.sendLinkBaseUrl+this.send.accessId+"/"+this.send.urlB64Key:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSafari",{get:function(){return this.platformUtilsService.isSafari()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDateTimeLocalSupported",{get:function(){return!(this.platformUtilsService.isFirefox()||this.platformUtilsService.isSafari())},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),[2]}}))}))},Object.defineProperty(e.prototype,"editMode",{get:function(){return null!=this.sendId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.i18nService.t(this.editMode?"editSend":"createSend")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expirationDateTimeFallback",{get:function(){return this.nullOrWhiteSpaceCount([this.expirationDateFallback,this.expirationTimeFallback])>0?null:this.formatDateFallbacks(this.expirationDateFallback)+"T"+this.expirationTimeFallback},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"deletionDateTimeFallback",{get:function(){return this.nullOrWhiteSpaceCount([this.deletionDateFallback,this.deletionTimeFallback])>0?null:this.formatDateFallbacks(this.deletionDateFallback)+"T"+this.deletionTimeFallback},enumerable:!0,configurable:!0}),e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o,s,h,f,v,y;return i(this,(function(i){switch(i.label){case 0:return[4,this.policyService.getAll(c.PolicyType.DisableSend)];case 1:return e=i.sent(),[4,this.userService.getAllOrganizations()];case 2:return t=i.sent(),this.disableSend=t.some((function(t){return t.enabled&&t.status===l.OrganizationUserStatusType.Confirmed&&t.usePolicies&&!t.canManagePolicies&&e.some((function(e){return e.organizationId===t.id&&e.enabled}))})),[4,this.policyService.getAll(c.PolicyType.SendOptions)];case 3:return n=i.sent(),r=this,[4,t.some((function(e){return e.enabled&&e.status===l.OrganizationUserStatusType.Confirmed&&e.usePolicies&&!e.canManagePolicies&&n.some((function(t){return t.organizationId===e.id&&t.enabled&&t.data.disableHideEmail}))}))];case 4:return r.disableHideEmail=i.sent(),o=this,[4,this.userService.canAccessPremium()];case 5:return o.canAccessPremium=i.sent(),s=this,[4,this.userService.getEmailVerified()];case 6:return s.emailVerified=i.sent(),this.canAccessPremium&&this.emailVerified||(this.type=p.SendType.Text),null!=this.send?[3,10]:this.editMode?[4,this.loadSend()]:[3,9];case 7:return h=i.sent(),f=this,[4,h.decrypt()];case 8:return f.send=i.sent(),[3,10];case 9:this.send=new m.SendView,this.send.type=null==this.type?p.SendType.File:this.type,this.send.file=new u.SendFileView,this.send.text=new d.SendTextView,this.send.deletionDate=new Date,this.send.deletionDate.setDate(this.send.deletionDate.getDate()+7),i.label=10;case 10:return this.hasPassword=null!=this.send.password&&""!==this.send.password.trim(),this.isDateTimeLocalSupported?(this.deletionDate=this.dateToString(this.send.deletionDate),this.expirationDate=this.dateToString(this.send.expirationDate)):(void 0!==(v=this.dateToSplitString(this.send.deletionDate))&&v.length>0&&(this.deletionDateFallback=v[0],this.deletionTimeFallback=v[1],this.isSafari&&(this.safariDeletionTime=this.deletionTimeFallback)),void 0!==(y=this.dateToSplitString(this.send.expirationDate))&&y.length>0&&(this.expirationDateFallback=y[0],this.expirationTimeFallback=y[1],this.isSafari&&(this.safariExpirationTime=this.expirationTimeFallback))),this.isSafari&&(this.safariDeletionTimeOptions=this.safariTimeOptions(a.DeletionDate),this.safariExpirationTimeOptions=this.safariTimeOptions(a.ExpriationDate)),[2]}}))}))},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,r,o,a,s,l;return i(this,(function(i){switch(i.label){case 0:if(!this.isDateTimeLocalSupported){if(this.isSafari&&(this.expirationTimeFallback=null!==(e=this.safariExpirationTime)&&void 0!==e?e:this.expirationTimeFallback,this.deletionTimeFallback=null!==(t=this.safariDeletionTime)&&void 0!==t?t:this.deletionTimeFallback),this.deletionDate=this.deletionDateTimeFallback,null!=this.expirationDateTimeFallback&&isNaN(Date.parse(this.expirationDateTimeFallback)))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("expirationDateIsInvalid")),[2];if(isNaN(Date.parse(this.deletionDateTimeFallback)))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("deletionDateIsInvalid")),[2];if(1===this.nullOrWhiteSpaceCount([this.expirationDateFallback,this.expirationTimeFallback]))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("expirationDateAndTimeRequired")),[2];(this.editMode||0===this.expirationDateSelect)&&(this.expirationDate=this.expirationDateTimeFallback)}if(this.disableSend)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("sendDisabledWarning")),[2,!1];if(null==this.send.name||""===this.send.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),[2,!1];if(n=null,this.send.type===p.SendType.File&&!this.editMode){if(r=document.getElementById("file"),null==(o=r.files)||0===o.length)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),[2];if(n=o[0],o[0].size>524288e3)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize")),[2]}return this.editMode||(a=new Date,this.deletionDateSelect>0&&((s=new Date).setHours(a.getHours()+this.deletionDateSelect),this.deletionDate=this.dateToString(s)),null!=this.expirationDateSelect&&this.expirationDateSelect>0&&((s=new Date).setHours(a.getHours()+this.expirationDateSelect),this.expirationDate=this.dateToString(s))),null!=this.password&&""===this.password.trim()&&(this.password=null),[4,this.encryptSend(n)];case 1:l=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),this.formPromise=this.sendService.saveWithServer(l),[4,this.formPromise];case 3:return i.sent(),null==this.send.id&&(this.send.id=l[0].id),null==this.send.accessId&&(this.send.accessId=l[0].accessId),this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedSend":"createdSend")),this.onSavedSend.emit(this.send),this.copyLink&&this.copyLinkToClipboard(this.link),[2,!0];case 4:return i.sent(),[3,5];case 5:return[2,!1]}}))}))},e.prototype.clearExpiration=function(){this.expirationDate=null,this.expirationDateFallback=null,this.expirationTimeFallback=null,this.safariExpirationTime=null},e.prototype.copyLinkToClipboard=function(e){null!=e&&this.platformUtilsService.copyToClipboard(e)},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null!=this.deletePromise?[2,!1]:[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,5,,6]),this.deletePromise=this.sendService.deleteWithServer(this.send.id),[4,this.deletePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),[4,this.load()];case 4:return e.sent(),this.onDeletedSend.emit(this.send),[2,!0];case 5:return e.sent(),[3,6];case 6:return[2,!1]}}))}))},e.prototype.typeChanged=function(){this.send.type!==p.SendType.File||this.alertShown||(this.canAccessPremium?this.emailVerified||(this.alertShown=!0,this.messagingService.send("emailVerificationRequired")):(this.alertShown=!0,this.messagingService.send("premiumRequired")))},e.prototype.toggleOptions=function(){this.showOptions=!this.showOptions},e.prototype.expirationDateFallbackChanged=function(){var e,t;this.isSafari?this.safariExpirationTime=null!==(e=this.safariExpirationTime)&&void 0!==e?e:"00:00":this.expirationTimeFallback=null!==(t=this.expirationTimeFallback)&&void 0!==t?t:this.datePipe.transform(new Date,"HH:mm")},e.prototype.loadSend=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.sendService.get(this.sendId)]}))}))},e.prototype.encryptSend=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.sendService.encrypt(this.send,e,this.password,null)];case 1:t=n.sent();try{t[0].deletionDate=null==this.deletionDate?null:new Date(this.deletionDate)}catch(r){t[0].deletionDate=null}try{t[0].expirationDate=null==this.expirationDate?null:new Date(this.expirationDate)}catch(i){t[0].expirationDate=null}return[2,t]}}))}))},e.prototype.dateToString=function(e){return null==e?null:this.datePipe.transform(e,"yyyy-MM-ddTHH:mm")},e.prototype.formatDateFallbacks=function(e){try{return this.isSafari||(e+=" 00:00"),this.datePipe.transform(new Date(e),"yyyy-MM-dd")}catch(t){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("dateParsingError"))}},e.prototype.dateToSplitString=function(e){if(null!=e)return[this.isSafari?this.datePipe.transform(e,"MM/dd/yyyy"):this.datePipe.transform(e,"yyyy-MM-dd"),this.datePipe.transform(e,"HH:mm")]},e.prototype.togglePasswordVisible=function(){this.showPassword=!this.showPassword,document.getElementById("password").focus()},e.prototype.nullOrWhiteSpaceCount=function(e){return e.filter((function(e){return null==e||""===e.trim()})).length},e.prototype.safariTimeOptions=function(e){for(var t=[],n=[],r=[],i=[],s=1;s<=12;s++)for(var l=0;l<60;l+=15){var c=s.toString(),p=l.toString();if(s<10&&(c="0"+c),l<10&&(p="0"+p),12===s){var u={standard:c+":"+p+" AM",military:"00:"+p};n.push(u);var d={standard:c+":"+p+" PM",military:c+":"+p};t.push(d)}else{var m={standard:c+":"+p+" AM",military:c+":"+p};r.push(m);var h={standard:c+":"+p+" PM",military:s+12+":"+p};i.push(h)}}var f=o(n,r,t,i);if(e===a.ExpriationDate&&null!=this.expirationDateTimeFallback&&this.editMode){var v={standard:this.datePipe.transform(this.expirationDateTimeFallback,"hh:mm a"),military:this.datePipe.transform(this.expirationDateTimeFallback,"HH:mm")};return o([v,{standard:null,military:null}],f)}if(e===a.DeletionDate&&null!=this.deletionDateTimeFallback&&this.editMode){v={standard:this.datePipe.transform(this.deletionDateTimeFallback,"hh:mm a"),military:this.datePipe.transform(this.deletionDateTimeFallback,"HH:mm")};return o([v],f)}return o([{standard:null,military:null}],f)},e.ɵfac=function(t){return new(t||e)(h.ɵɵdirectiveInject(f.I18nService),h.ɵɵdirectiveInject(v.PlatformUtilsService),h.ɵɵdirectiveInject(y.EnvironmentService),h.ɵɵdirectiveInject(g.DatePipe),h.ɵɵdirectiveInject(x.SendService),h.ɵɵdirectiveInject(b.UserService),h.ɵɵdirectiveInject(S.MessagingService),h.ɵɵdirectiveInject(w.PolicyService))},e.ɵdir=h.ɵɵdefineDirective({type:e,inputs:{sendId:"sendId",type:"type"},outputs:{onSavedSend:"onSavedSend",onDeletedSend:"onDeletedSend",onCancelled:"onCancelled"}}),e}();t.AddEditComponent=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.culture="en-US",this.name=e,this.masterPasswordHint=t||null};t.UpdateProfileRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(638).EmailTokenRequest);t.EmailRequest=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(n(644).PasswordRequest);t.KdfRequest=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.UpdateDomainsRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(3),n(36),n(5),n(0)),s=n(36),l=n(5),c=n(3),p=function(){function e(e,t,n,r){this.passwordGenerationService=e,this.platformUtilsService=t,this.i18nService=n,this.win=r,this.showSelect=!1,this.onSelected=new o.EventEmitter,this.options={},this.password="-",this.showOptions=!1,this.avoidAmbiguous=!1}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.passwordGenerationService.getOptions()];case 1:return e=n.sent(),this.options=e[0],this.enforcedPolicyOptions=e[1],this.avoidAmbiguous=!this.options.ambiguous,this.options.type="passphrase"===this.options.type?"passphrase":"password",t=this,[4,this.passwordGenerationService.generatePassword(this.options)];case 2:return t.password=n.sent(),[4,this.passwordGenerationService.addHistory(this.password)];case 3:return n.sent(),[2]}}))}))},e.prototype.sliderChanged=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.saveOptions(!1),[4,this.passwordGenerationService.addHistory(this.password)];case 1:return e.sent(),[2]}}))}))},e.prototype.sliderInput=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.normalizeOptions(),e=this,[4,this.passwordGenerationService.generatePassword(this.options)];case 1:return e.password=t.sent(),[2]}}))}))},e.prototype.saveOptions=function(e){return void 0===e&&(e=!0),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.normalizeOptions(),[4,this.passwordGenerationService.saveOptions(this.options)];case 1:return t.sent(),e?[4,this.regenerate()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},e.prototype.regenerate=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.passwordGenerationService.generatePassword(this.options)];case 1:return e.password=t.sent(),[4,this.passwordGenerationService.addHistory(this.password)];case 2:return t.sent(),[2]}}))}))},e.prototype.copy=function(){var e=null!=this.win?{window:this.win}:null;this.platformUtilsService.copyToClipboard(this.password,e),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password")))},e.prototype.select=function(){this.onSelected.emit(this.password)},e.prototype.toggleOptions=function(){this.showOptions=!this.showOptions},e.prototype.normalizeOptions=function(){if(this.options.ambiguous=!this.avoidAmbiguous,!(this.options.uppercase||this.options.lowercase||this.options.number||this.options.special)&&(this.options.lowercase=!0,null!=this.win)){var e=this.win.document.querySelector("#lowercase");e&&(e.checked=!0)}this.passwordGenerationService.normalizeOptions(this.options,this.enforcedPolicyOptions)},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.PasswordGenerationService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(Window))},e.ɵdir=a.ɵɵdefineDirective({type:e,inputs:{showSelect:"showSelect"},outputs:{onSelected:"onSelected"}}),e}();t.PasswordGeneratorComponent=p},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(36),s=n(5),l=n(3),c=function(){function e(e,t,n,r){this.passwordGenerationService=e,this.platformUtilsService=t,this.i18nService=n,this.win=r,this.history=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.passwordGenerationService.getHistory()];case 1:return e.history=t.sent(),[2]}}))}))},e.prototype.clear=function(){this.history=[],this.passwordGenerationService.clear()},e.prototype.copy=function(e){var t=null!=this.win?{window:this.win}:null;this.platformUtilsService.copyToClipboard(e,t),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password")))},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.PasswordGenerationService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(Window))},e.ɵdir=o.ɵɵdefineDirective({type:e}),e}();t.PasswordGeneratorHistoryComponent=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=(n(48),n(3),n(5),n(127)),s=n(0),l=n(48),c=n(3),p=n(5),u=function(){function e(e,t,n){this.folderService=e,this.i18nService=t,this.platformUtilsService=n,this.onSavedFolder=new o.EventEmitter,this.onDeletedFolder=new o.EventEmitter,this.editMode=!1,this.folder=new a.FolderView}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.init()];case 1:return e.sent(),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(null==this.folder.name||""===this.folder.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),[2,!1];t.label=1;case 1:return t.trys.push([1,4,,5]),[4,this.folderService.encrypt(this.folder)];case 2:return e=t.sent(),this.formPromise=this.folderService.saveWithServer(e),[4,this.formPromise];case 3:return t.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedFolder":"addedFolder")),this.onSavedFolder.emit(this.folder),[2,!0];case 4:return t.sent(),[3,5];case 5:return[2,!1]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteFolderConfirmation"),this.i18nService.t("deleteFolder"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.folderService.deleteWithServer(this.folder.id),[4,this.deletePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedFolder")),this.onDeletedFolder.emit(this.folder),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,!0]}}))}))},e.prototype.init=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.editMode=null!=this.folderId,this.editMode?(this.editMode=!0,this.title=this.i18nService.t("editFolder"),[4,this.folderService.get(this.folderId)]):[3,3];case 1:return e=n.sent(),t=this,[4,e.decrypt()];case 2:return t.folder=n.sent(),[3,4];case 3:this.title=this.i18nService.t("addFolder"),n.label=4;case 4:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.FolderService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.PlatformUtilsService))},e.ɵdir=s.ɵɵdefineDirective({type:e,inputs:{folderId:"folderId"},outputs:{onSavedFolder:"onSavedFolder",onDeletedFolder:"onDeletedFolder"}}),e}();t.FolderAddEditComponent=u},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(157),s=(n(19),n(40),n(3),n(5),n(7),n(30)),l=n(0),c=n(40),p=n(5),u=n(3),d=n(7),m=n(19),h=function(){function e(e,t,n,r,i){this.collectionService=e,this.platformUtilsService=t,this.i18nService=n,this.userService=r,this.cipherService=i,this.onSharedCipher=new o.EventEmitter,this.collections=[],this.organizations=[],this.writeableCollections=[]}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.collectionService.getAllDecrypted()];case 1:return e=i.sent(),this.writeableCollections=e.map((function(e){return e})).filter((function(e){return!e.readOnly})),[4,this.userService.getAllOrganizations()];case 2:return t=i.sent(),this.organizations=t.sort(s.Utils.getSortFunction(this.i18nService,"name")).filter((function(e){return e.enabled&&e.status===a.OrganizationUserStatusType.Confirmed})),[4,this.cipherService.get(this.cipherId)];case 3:return n=i.sent(),r=this,[4,n.decrypt()];case 4:return r.cipher=i.sent(),null==this.organizationId&&this.organizations.length>0&&(this.organizationId=this.organizations[0].id),this.filterCollections(),[2]}}))}))},e.prototype.filterCollections=function(){var e=this;this.writeableCollections.forEach((function(e){return e.checked=!1})),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((function(t){return t.organizationId===e.organizationId}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(o){switch(o.label){case 0:return 0===(e=this.collections.filter((function(e){return!!e.checked})).map((function(e){return e.id}))).length?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection")),[2]):[4,this.cipherService.get(this.cipherId)];case 1:return[4,o.sent().decrypt()];case 2:t=o.sent(),o.label=3;case 3:return o.trys.push([3,5,,6]),this.formPromise=this.cipherService.shareWithServer(t,this.organizationId,e).then((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return this.onSharedCipher.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("sharedItem")),[2]}))}))})),[4,this.formPromise];case 4:return o.sent(),[2,!0];case 5:return o.sent(),[3,6];case 6:return[2,!1]}}))}))},Object.defineProperty(e.prototype,"canSave",{get:function(){if(null!=this.collections)for(var e=0;e<this.collections.length;e++)if(this.collections[e].checked)return!0;return!1},enumerable:!0,configurable:!0}),e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.CollectionService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.I18nService),l.ɵɵdirectiveInject(d.UserService),l.ɵɵdirectiveInject(m.CipherService))},e.ɵdir=l.ɵɵdefineDirective({type:e,inputs:{cipherId:"cipherId",organizationId:"organizationId"},outputs:{onSharedCipher:"onSharedCipher"}}),e}();t.ShareComponent=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(482);t.AttachmentData=r.AttachmentData;var i=n(483);t.CardData=i.CardData;var o=n(158);t.CipherData=o.CipherData;var a=n(155);t.CollectionData=a.CollectionData;var s=n(484);t.FieldData=s.FieldData;var l=n(515);t.FolderData=l.FolderData;var c=n(485);t.IdentityData=c.IdentityData;var p=n(486);t.LoginData=p.LoginData;var u=n(487);t.LoginUriData=u.LoginUriData;var d=n(488);t.SecureNoteData=d.SecureNoteData},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(489);t.Attachment=r.Attachment;var i=n(559);t.AuthResult=i.AuthResult;var o=n(285);t.Card=o.Card;var a=n(190);t.Cipher=a.Cipher;var s=n(105);t.EncString=s.EncString;var l=n(140);t.Collection=l.Collection;var c=n(671);t.EncryptedObject=c.EncryptedObject;var p=n(672);t.EnvironmentUrls=p.EnvironmentUrls;var u=n(286);t.Field=u.Field;var d=n(516);t.Folder=d.Folder;var m=n(287);t.Identity=m.Identity;var h=n(288);t.Login=h.Login;var f=n(289);t.LoginUri=f.LoginUri;var v=n(673);t.GeneratedPasswordHistory=v.GeneratedPasswordHistory;var y=n(290);t.SecureNote=y.SecureNote;var g=n(284);t.SymmetricCryptoKey=g.SymmetricCryptoKey},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EmergencyAccessConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EmergencyAccessInviteRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EmergencyAccessPasswordRequest=r},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(9),s=n(909),l=n(910),c=n(952),p=n(953),u=n(954),d=n(253),m=n(664),h=n(665),f=n(248),v=n(667),y=n(112),g=n(668),x=n(669),b=n(247),S=n(682),w=n(687),C=n(688),I=n(278),E=n(689),P=n(691),k=n(709),_=n(70),A=n(693),O=n(694),T=n(696),M=n(956),B=n(959),D=n(969),R=n(697),V=n(973),j=n(1031),F=n(699),U=n(1044),N=n(1046),z=n(1048),L=n(701),G=n(702),K=n(703),q=n(705),W=n(706),H=n(707),$=n(708),Y=n(1051),Q=n(6),J=n(87),X=n(58),Z=n(19),ee=n(40),te=n(18),ne=n(104),re=n(64),ie=n(71),oe=n(189),ae=n(1064),se=n(48),le=n(3),ce=n(261),pe=n(14),ue=n(525),de=n(36),me=n(5),he=n(43),fe=n(80),ve=n(191),ye=n(281),ge=n(38),xe=n(41),be=n(61),Se=n(103),we=n(114),Ce=n(7),Ie=n(93),Ee=n(0),Pe=new c.I18nService(window.navigator.language,"locales"),ke=new G.StateService,_e=new y.BroadcasterService,Ae=new s.BroadcasterMessagingService(_e),Oe=new u.WebPlatformUtilsService(Pe,Ae),Te=new l.HtmlStorageService(Oe),Me=new p.MemoryStorageService,Be=new Y.WebCryptoFunctionService(window,Oe),De=new k.ConsoleLogService(!1),Re=new O.CryptoService(Te,Oe.isDev()?Te:Me,Be,Oe,De),Ve=new q.TokenService(Te),je=new w.AppIdService(Te),Fe=new S.ApiService(Ve,Oe,(function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){return[2,Ae.send("logout",{expired:e})]}))}))})),Ue=new H.UserService(Ve,Te),Ne=new L.SettingsService(Ue,Te);t.searchService=null;var ze=new D.FileUploadService(De,Fe),Le=new E.CipherService(Re,Ue,Ne,Fe,ze,Te,Pe,(function(){return t.searchService})),Ge=new R.FolderService(Re,Ue,Fe,Te,Pe,Le),Ke=new P.CollectionService(Re,Ue,Te,Pe);t.searchService=new N.SearchService(Le,De,Pe);var qe=new U.PolicyService(Ue,Te),We=new z.SendService(Re,Ue,Fe,ze,Te,Pe,Be),He=new $.VaultTimeoutService(Le,Ge,Ke,Re,Oe,Te,Ae,t.searchService,Ue,Ve,null,(function(){return r(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,Ae.send("logout",{expired:!1})]}))}))})),$e=new K.SyncService(Ue,Fe,Ne,Ge,Le,Re,Ke,Te,Ae,qe,We,(function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){return[2,Ae.send("logout",{expired:e})]}))}))})),Ye=new F.PasswordGenerationService(Re,Te,qe),Qe=new W.TotpService(Te,Be),Je=new A.ContainerService(Re),Xe=new I.AuthService(Re,Fe,Ue,Ve,je,Pe,Oe,Ae,He,De),Ze=new B.ExportService(Ge,Le,Fe),et=new V.ImportService(Le,Ge,Fe,Pe,Ke,Oe),tt=new j.NotificationsService(Ue,$e,je,Fe,He,(function(){return r(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,Ae.send("logout",{expired:!0})]}))}))}),De),nt=new T.EnvironmentService(Fe,Te,tt),rt=new C.AuditService(Be,Fe),it=new M.EventService(Te,Fe,Ue,Le);function ot(){var e=this;return function(){return r(e,void 0,void 0,(function(){var e,t,n,r,o,a,s,l,c;return i(this,(function(i){switch(i.label){case 0:return[4,Te.init()];case 1:return i.sent(),Oe.isDev()||Oe.isSelfHost()?nt.baseUrl=window.location.origin:(nt.notificationsUrl="https://notifications.bitwarden.com",nt.enterpriseUrl="https://portal.bitwarden.com"),Fe.setUrls({base:window.location.origin,api:null,identity:null,events:null}),setTimeout((function(){return tt.init(nt)}),3e3),He.init(!0),[4,Te.get(_.ConstantsService.localeKey)];case 2:return e=i.sent(),[4,Pe.init(e)];case 3:return i.sent(),it.init(!0),Xe.init(),(t=window.document.documentElement).classList.add("locale_"+Pe.translationLocale),[4,Te.get(_.ConstantsService.themeKey)];case 4:return null==(n=i.sent())&&(n="light"),t.classList.add("theme_"+n),o=(r=ke).save,a=[_.ConstantsService.disableFaviconKey],[4,Te.get(_.ConstantsService.disableFaviconKey)];case 5:return o.apply(r,a.concat([i.sent()])),l=(s=ke).save,c=["enableGravatars"],[4,Te.get("enableGravatars")];case 6:return l.apply(s,c.concat([i.sent()])),[2]}}))}))}}Je.attachToWindow(window),t.initFactory=ot;var at=function(){function e(){}return e.ɵmod=Ee.ɵɵdefineNgModule({type:e}),e.ɵinj=Ee.ɵɵdefineInjector({factory:function(t){return new(t||e)},providers:[b.ValidationService,v.AuthGuardService,m.OrganizationGuardService,h.OrganizationTypeGuardService,x.UnauthGuardService,f.RouterService,d.EventService,g.LockGuardService,{provide:J.AuditService,useValue:rt},{provide:X.AuthService,useValue:Xe},{provide:Z.CipherService,useValue:Le},{provide:se.FolderService,useValue:Ge},{provide:ee.CollectionService,useValue:Ke},{provide:re.EnvironmentService,useValue:nt},{provide:we.TotpService,useValue:Qe},{provide:Se.TokenService,useValue:Ve},{provide:le.I18nService,useValue:Pe},{provide:te.CryptoService,useValue:Re},{provide:me.PlatformUtilsService,useValue:Oe},{provide:de.PasswordGenerationService,useValue:Ye},{provide:Q.ApiService,useValue:Fe},{provide:ae.FileUploadService,useValue:ze},{provide:be.SyncService,useValue:$e},{provide:Ce.UserService,useValue:Ue},{provide:pe.MessagingService,useValue:Ae},{provide:y.BroadcasterService,useValue:_e},{provide:ye.SettingsService,useValue:Ne},{provide:Ie.VaultTimeoutService,useValue:He},{provide:xe.StorageService,useValue:Te},{provide:ge.StateService,useValue:ke},{provide:oe.ExportService,useValue:Ze},{provide:fe.SearchService,useValue:t.searchService},{provide:ce.ImportService,useValue:et},{provide:ue.NotificationsService,useValue:tt},{provide:ne.CryptoFunctionService,useValue:Be},{provide:ie.EventService,useValue:it},{provide:he.PolicyService,useValue:qe},{provide:ve.SendService,useValue:We},{provide:o.APP_INITIALIZER,useFactory:ot,deps:[],multi:!0},{provide:o.LOCALE_ID,useFactory:function(){return Pe.translationLocale},deps:[]}],imports:[[a.ToasterModule]]}),e}();t.ServicesModule=at,("undefined"==typeof ngJitMode||ngJitMode)&&Ee.ɵɵsetNgModuleScope(at,{imports:[a.ToasterModule]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.broadcasterService=e}return e.prototype.send=function(e,t){void 0===t&&(t={});var n=Object.assign({},{command:e},t);this.broadcasterService.send(n)},e}();t.BroadcasterMessagingService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(911),a=function(){function e(e){this.platformUtilsService=e,this.localStorageKeys=new Set(["appId","anonymousAppId","rememberedEmail","passwordGenerationOptions",o.ConstantsService.disableFaviconKey,"rememberEmail","enableGravatars","enableFullWidth",o.ConstantsService.localeKey,o.ConstantsService.autoConfirmFingerprints,o.ConstantsService.vaultTimeoutKey,o.ConstantsService.vaultTimeoutActionKey,o.ConstantsService.ssoCodeVerifierKey,o.ConstantsService.ssoStateKey,"ssoOrgIdentifier"]),this.localStorageStartsWithKeys=["twoFactorToken_",o.ConstantsService.collapsedGroupingsKey+"_"],this.memoryStorageStartsWithKeys=["ciphers_","folders_","collections_","settings_","lastSync_"],this.memoryStorage=new Map}return e.prototype.init=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.get(o.ConstantsService.vaultTimeoutKey)];case 1:return null!=e.sent()||this.platformUtilsService.isDev()?[3,3]:[4,this.save(o.ConstantsService.vaultTimeoutKey,15)];case 2:e.sent(),e.label=3;case 3:return[4,this.get(o.ConstantsService.vaultTimeoutActionKey)];case 4:return null!=e.sent()?[3,6]:[4,this.save(o.ConstantsService.vaultTimeoutActionKey,"lock")];case 5:e.sent(),e.label=6;case 6:return[2]}}))}))},e.prototype.get=function(e){var t=null;if(null!=(t=this.isLocalStorage(e)?window.localStorage.getItem(e):this.isMemoryStorage(e)?this.memoryStorage.get(e):window.sessionStorage.getItem(e))){var n=JSON.parse(t);return Promise.resolve(n)}return Promise.resolve(null)},e.prototype.save=function(e,t){if(null==t)return this.remove(e);var n=JSON.stringify(t);return this.isLocalStorage(e)?window.localStorage.setItem(e,n):this.isMemoryStorage(e)?this.memoryStorage.set(e,n):window.sessionStorage.setItem(e,n),Promise.resolve()},e.prototype.remove=function(e){return this.isLocalStorage(e)?window.localStorage.removeItem(e):this.isMemoryStorage(e)?this.memoryStorage.delete(e):window.sessionStorage.removeItem(e),Promise.resolve()},e.prototype.isLocalStorage=function(e){if(this.localStorageKeys.has(e))return!0;for(var t=0,n=this.localStorageStartsWithKeys;t<n.length;t++){var r=n[t];if(e.startsWith(r))return!0}return!1},e.prototype.isMemoryStorage=function(e){for(var t=0,n=this.memoryStorageStartsWithKeys;t<n.length;t++){var r=n[t];if(e.startsWith(r))return!0}return!1},e}();t.HtmlStorageService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(682);t.ApiService=r.ApiService;var i=n(687);t.AppIdService=i.AppIdService;var o=n(688);t.AuditService=o.AuditService;var a=n(278);t.AuthService=a.AuthService;var s=n(689);t.CipherService=s.CipherService;var l=n(691);t.CollectionService=l.CollectionService;var c=n(70);t.ConstantsService=c.ConstantsService;var p=n(693);t.ContainerService=p.ContainerService;var u=n(694);t.CryptoService=u.CryptoService;var d=n(696);t.EnvironmentService=d.EnvironmentService;var m=n(697);t.FolderService=m.FolderService;var h=n(698);t.I18nService=h.I18nService;var f=n(699);t.PasswordGenerationService=f.PasswordGenerationService;var v=n(701);t.SettingsService=v.SettingsService;var y=n(702);t.StateService=y.StateService;var g=n(703);t.SyncService=g.SyncService;var x=n(705);t.TokenService=x.TokenService;var b=n(706);t.TotpService=b.TotpService;var S=n(707);t.UserService=S.UserService;var w=n(708);t.VaultTimeoutService=w.VaultTimeoutService},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.apiKey=n.getResponseProperty("ApiKey"),n}return i(t,e),t}(n(23).BaseResponse);t.ApiKeyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(262),s=function(e){function t(t){var n=e.call(this,t)||this;n.url=null,n.attachmentId=n.getResponseProperty("AttachmentId"),n.fileUploadType=n.getResponseProperty("FileUploadType");var r=n.getResponseProperty("CipherResponse"),i=n.getResponseProperty("CipherMiniResponse");return n.cipherResponse=null==r?null:new a.CipherResponse(r),n.cipherMiniResponse=null==i?null:new a.CipherResponse(i),n.url=n.getResponseProperty("Url"),n}return i(t,e),t}(o.BaseResponse);t.AttachmentUploadDataResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=function(e){function t(t){var n=e.call(this,t)||this;n.invoices=[],n.transactions=[],n.balance=n.getResponseProperty("Balance");var r=n.getResponseProperty("PaymentSource"),i=n.getResponseProperty("Transactions"),o=n.getResponseProperty("Invoices");return n.paymentSource=null==r?null:new s(r),null!=i&&(n.transactions=i.map((function(e){return new c(e)}))),null!=o&&(n.invoices=o.map((function(e){return new l(e)}))),n}return i(t,e),t}(o.BaseResponse);t.BillingResponse=a;var s=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.cardBrand=n.getResponseProperty("CardBrand"),n.description=n.getResponseProperty("Description"),n.needsVerification=n.getResponseProperty("NeedsVerification"),n}return i(t,e),t}(o.BaseResponse);t.BillingSourceResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.url=n.getResponseProperty("Url"),n.pdfUrl=n.getResponseProperty("PdfUrl"),n.number=n.getResponseProperty("Number"),n.paid=n.getResponseProperty("Paid"),n.date=n.getResponseProperty("Date"),n.amount=n.getResponseProperty("Amount"),n}return i(t,e),t}(o.BaseResponse);t.BillingInvoiceResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.createdDate=n.getResponseProperty("CreatedDate"),n.amount=n.getResponseProperty("Amount"),n.refunded=n.getResponseProperty("Refunded"),n.partiallyRefunded=n.getResponseProperty("PartiallyRefunded"),n.refundedAmount=n.getResponseProperty("RefundedAmount"),n.type=n.getResponseProperty("Type"),n.paymentMethodType=n.getResponseProperty("PaymentMethodType"),n.details=n.getResponseProperty("Details"),n}return i(t,e),t}(o.BaseResponse);t.BillingTransactionResponse=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.addedDate=n.getResponseProperty("AddedDate"),n.breachDate=n.getResponseProperty("BreachDate"),n.dataClasses=n.getResponseProperty("DataClasses"),n.description=n.getResponseProperty("Description"),n.domain=n.getResponseProperty("Domain"),n.isActive=n.getResponseProperty("IsActive"),n.isVerified=n.getResponseProperty("IsVerified"),n.logoPath=n.getResponseProperty("LogoPath"),n.modifiedDate=n.getResponseProperty("ModifiedDate"),n.name=n.getResponseProperty("Name"),n.pwnCount=n.getResponseProperty("PwnCount"),n.title=n.getResponseProperty("Title"),n}return i(t,e),t}(n(23).BaseResponse);t.BreachAccountResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.userId=n.getResponseProperty("UserId"),n.organizationId=n.getResponseProperty("OrganizationId"),n.cipherId=n.getResponseProperty("CipherId"),n.collectionId=n.getResponseProperty("CollectionId"),n.groupId=n.getResponseProperty("GroupId"),n.policyId=n.getResponseProperty("PolicyId"),n.organizationUserId=n.getResponseProperty("OrganizationUserId"),n.actingUserId=n.getResponseProperty("ActingUserId"),n.date=n.getResponseProperty("Date"),n.deviceType=n.getResponseProperty("DeviceType"),n.ipAddress=n.getResponseProperty("IpAddress"),n}return i(t,e),t}(n(23).BaseResponse);t.EventResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(292),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.organizationId=n.getResponseProperty("OrganizationId"),n.name=n.getResponseProperty("Name"),n.accessAll=n.getResponseProperty("AccessAll"),n.externalId=n.getResponseProperty("ExternalId"),n}return i(t,e),t}(o.BaseResponse);t.GroupResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;n.collections=[];var r=n.getResponseProperty("Collections");return null!=r&&(n.collections=r.map((function(e){return new a.SelectionReadOnlyResponse(e)}))),n}return i(t,e),t}(s);t.GroupDetailsResponse=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(683),a=n(685),s=function(e){function t(t){var n=e.call(this,t)||this;n.storageName=n.getResponseProperty("StorageName"),n.storageGb=n.getResponseProperty("StorageGb");var r=n.getResponseProperty("Subscription");n.subscription=null==r?null:new a.BillingSubscriptionResponse(r);var i=n.getResponseProperty("UpcomingInvoice");return n.upcomingInvoice=null==i?null:new a.BillingSubscriptionUpcomingInvoiceResponse(i),n.expiration=n.getResponseProperty("Expiration"),n}return i(t,e),t}(o.OrganizationResponse);t.OrganizationSubscriptionResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(292),s=n(468),l=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.userId=n.getResponseProperty("UserId"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.permissions=new s.PermissionsApi(n.getResponseProperty("Permissions")),n.accessAll=n.getResponseProperty("AccessAll"),n}return i(t,e),t}(o.BaseResponse);t.OrganizationUserResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.twoFactorEnabled=n.getResponseProperty("TwoFactorEnabled"),n}return i(t,e),t}(l);t.OrganizationUserUserDetailsResponse=c;var p=function(e){function t(t){var n=e.call(this,t)||this;n.collections=[];var r=n.getResponseProperty("Collections");return null!=r&&(n.collections=r.map((function(e){return new a.SelectionReadOnlyResponse(e)}))),n}return i(t,e),t}(l);t.OrganizationUserDetailsResponse=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(293),s=function(e){function t(t){var n=e.call(this,t)||this,r=n.getResponseProperty("UserProfile");return null!=r&&(n.userProfile=new a.ProfileResponse(r)),n.paymentIntentClientSecret=n.getResponseProperty("PaymentIntentClientSecret"),n.success=n.getResponseProperty("Success"),n}return i(t,e),t}(o.BaseResponse);t.PaymentResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n}return i(t,e),t}(n(23).BaseResponse);t.PreloginResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(503),s=n(504),l=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.getResponseProperty("Id"),n.type=n.getResponseProperty("Type"),n.name=n.getResponseProperty("Name");var r=n.getResponseProperty("Text");null!=r&&(n.text=new s.SendTextApi(r));var i=n.getResponseProperty("File");return null!=i&&(n.file=new a.SendFileApi(i)),n.expirationDate=n.getResponseProperty("ExpirationDate"),n.creatorIdentifier=n.getResponseProperty("CreatorIdentifier"),n}return i(t,e),t}(o.BaseResponse);t.SendAccessResponse=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=null,n.url=null,n.id=n.getResponseProperty("Id"),n.url=n.getResponseProperty("Url"),n}return i(t,e),t}(n(23).BaseResponse);t.SendFileDownloadDataResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(502),s=function(e){function t(t){var n=e.call(this,t)||this;n.url=null,n.fileUploadType=n.getResponseProperty("FileUploadType");var r=n.getResponseProperty("SendResponse");return n.sendResponse=null==r?null:new a.SendResponse(r),n.url=n.getResponseProperty("Url"),n}return i(t,e),t}(o.BaseResponse);t.SendFileUploadDataResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.taxId=n.getResponseProperty("TaxIdNumber"),n.taxIdType=n.getResponseProperty("TaxIdType"),n.line1=n.getResponseProperty("Line1"),n.line2=n.getResponseProperty("Line2"),n.city=n.getResponseProperty("City"),n.state=n.getResponseProperty("State"),n.postalCode=n.getResponseProperty("PostalCode"),n.country=n.getResponseProperty("Country"),n}return i(t,e),t}(n(23).BaseResponse);t.TaxInfoResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.country=n.getResponseProperty("Country"),n.state=n.getResponseProperty("State"),n.postalCode=n.getResponseProperty("PostalCode"),n.rate=n.getResponseProperty("Rate"),n}return i(t,e),t}(n(23).BaseResponse);t.TaxRateResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.key=n.getResponseProperty("Key"),n}return i(t,e),t}(n(23).BaseResponse);t.TwoFactorAuthenticatorResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.host=n.getResponseProperty("Host"),n.secretKey=n.getResponseProperty("SecretKey"),n.integrationKey=n.getResponseProperty("IntegrationKey"),n}return i(t,e),t}(n(23).BaseResponse);t.TwoFactorDuoResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.email=n.getResponseProperty("Email"),n}return i(t,e),t}(n(23).BaseResponse);t.TwoFactorEmailResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.type=n.getResponseProperty("Type"),n}return i(t,e),t}(n(23).BaseResponse);t.TwoFactorProviderResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.code=n.getResponseProperty("Code"),n}return i(t,e),t}(n(23).BaseResponse);t.TwoFactorRecoverResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.enabled=n.getResponseProperty("Enabled"),n.key1=n.getResponseProperty("Key1"),n.key2=n.getResponseProperty("Key2"),n.key3=n.getResponseProperty("Key3"),n.key4=n.getResponseProperty("Key4"),n.key5=n.getResponseProperty("Key5"),n.nfc=n.getResponseProperty("Nfc"),n}return i(t,e),t}(n(23).BaseResponse);t.TwoFactorYubiKeyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.userId=n.getResponseProperty("UserId"),n.publicKey=n.getResponseProperty("PublicKey"),n}return i(t,e),t}(n(23).BaseResponse);t.UserKeyResponse=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=function(e,t){return function(n,r,i){var o=i.value,a=new Map,s=function(e){var t=a.get(e);return null!=t||(t=new Map,a.set(e,t)),t};return{value:function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var l=s(this),c=t(r),p=l.get(c);return null==p&&(p=[],l.set(c,p)),new Promise((function(t,i){var s=function(){var u=function(){p.splice(p.indexOf(s),1),p.length>=e?p[e-1]():0===p.length&&(l.delete(c),0===l.size&&a.delete(n))};o.apply(n,r).then((function(e){return u(),e})).catch((function(e){throw u(),e})).then(t,i)};p.push(s),p.length<=e&&s()}))}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.ids=null==e?[]:e,this.folderId=t};t.CipherBulkMoveRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.ids=null==e?[]:e};t.CipherBulkRestoreRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(511),i=function(e,t){var n=this;null!=e&&(this.ciphers=[],e.forEach((function(e){n.ciphers.push(new r.CipherWithIdRequest(e))}))),this.collectionIds=t};t.CipherBulkShareRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(210),i=function(e){this.cipher=new r.CipherRequest(e),this.collectionIds=e.collectionIds};t.CipherShareRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.comparator=e,this.sortedCiphersByUrl=new Map,this.timeouts=new Map}return e.prototype.isCached=function(e){return this.sortedCiphersByUrl.has(e)},e.prototype.addCiphers=function(e,t){t.sort(this.comparator),this.sortedCiphersByUrl.set(e,new i(t)),this.resetTimer(e)},e.prototype.getLastUsed=function(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastUsed():null},e.prototype.getLastLaunched=function(e){return this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastLaunched():null},e.prototype.getNext=function(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getNext():null},e.prototype.updateLastUsedIndex=function(e){this.isCached(e)&&this.sortedCiphersByUrl.get(e).updateLastUsedIndex()},e.prototype.clear=function(){this.sortedCiphersByUrl.clear(),this.timeouts.clear()},e.prototype.resetTimer=function(e){var t=this;clearTimeout(this.timeouts.get(e)),this.timeouts.set(e,setTimeout((function(){t.sortedCiphersByUrl.delete(e),t.timeouts.delete(e)}),3e3))},e}();t.SortedCiphersCache=r;var i=function(){function e(e){this.ciphers=e,this.lastUsedIndex=-1}return e.prototype.getLastUsed=function(){return this.lastUsedIndex=Math.max(this.lastUsedIndex,0),this.ciphers[this.lastUsedIndex]},e.prototype.getLastLaunched=function(){return this.ciphers.filter((function(e){var t;return null===(t=e.localData)||void 0===t?void 0:t.lastLaunched})).sort((function(e,t){return t.localData.lastLaunched.valueOf()-e.localData.lastLaunched.valueOf()}))[0]},e.prototype.getNextIndex=function(){return(this.lastUsedIndex+1)%this.ciphers.length},e.prototype.getNext=function(){return this.ciphers[this.getNextIndex()]},e.prototype.updateLastUsedIndex=function(){this.lastUsedIndex=this.getNextIndex()},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){this.children=[],this.parent=n,this.node=e,this.node.name=t};t.TreeNode=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.buffer=e};t.EncArrayBuffer=r},,,,,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defaultType="",t.minLength=0,t.useUppercase=!1,t.useLowercase=!1,t.useNumbers=!1,t.numberCount=0,t.useSpecial=!1,t.specialCount=0,t.minNumberWords=0,t.capitalize=!1,t.includeNumber=!1,t}return i(t,e),t.prototype.inEffect=function(){return""!==this.defaultType||this.minLength>0||this.numberCount>0||this.specialCount>0||this.useUppercase||this.useLowercase||this.useNumbers||this.useSpecial||this.minNumberWords>0||this.capitalize||this.includeNumber},t}(n(81).default);t.PasswordGeneratorPolicyOptions=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.usePolicies=e.usePolicies,this.useGroups=e.useGroups,this.useDirectory=e.useDirectory,this.useEvents=e.useEvents,this.useTotp=e.useTotp,this.use2fa=e.use2fa,this.useApi=e.useApi,this.useBusinessPortal=e.useBusinessPortal,this.useSso=e.useSso,this.selfHost=e.selfHost,this.usersGetPremium=e.usersGetPremium,this.seats=e.seats,this.maxCollections=e.maxCollections,this.maxStorageGb=e.maxStorageGb,this.ssoBound=e.ssoBound,this.identifier=e.identifier,this.permissions=e.permissions,this.resetPasswordKey=e.resetPasswordKey,this.userId=e.userId};t.OrganizationData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.id=e.id,this.fileName=e.fileName,this.key=e.key,this.size=e.size,this.sizeName=e.sizeName)};t.SendFileData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){null!=e&&(this.text=e.text,this.hidden=e.hidden)};t.SendTextData=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t,n){var r=e.call(this,t||"en-US",n,(function(e){return o(r,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return t=this.localesDirectory+"/"+e+"/messages.json?cache=z5t3yc",[4,fetch(t)];case 1:return[4,n.sent().json()];case 2:return[2,n.sent()]}}))}))}))||this;return r.supportedTranslationLocales=["en","ca","cs","da","de","el","en-GB","es","et","fr","he","it","ja","ko","lv","ml","nb","nl","pl","pt-PT","pt-BR","ru","sk","sv","uk","zh-CN","zh-TW"],r}return i(t,e),t}(n(698).I18nService);t.I18nService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.store=new Map}return e.prototype.get=function(e){if(this.store.has(e)){var t=this.store.get(e);return Promise.resolve(t)}return Promise.resolve(null)},e.prototype.save=function(e,t){return null==t?this.remove(e):(this.store.set(e,t),Promise.resolve())},e.prototype.remove=function(e){return this.store.delete(e),Promise.resolve()},e}();t.MemoryStorageService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(492),a=n(280),s=function(){function e(e,t){this.i18nService=e,this.messagingService=t,this.identityClientId="web",this.browserCache=null}return e.prototype.getDevice=function(){return null!=this.browserCache||(-1!==navigator.userAgent.indexOf(" Firefox/")||-1!==navigator.userAgent.indexOf(" Gecko/")?this.browserCache=a.DeviceType.FirefoxBrowser:navigator.userAgent.indexOf(" OPR/")>=0?this.browserCache=a.DeviceType.OperaBrowser:-1!==navigator.userAgent.indexOf(" Edg/")?this.browserCache=a.DeviceType.EdgeBrowser:-1!==navigator.userAgent.indexOf(" Vivaldi/")?this.browserCache=a.DeviceType.VivaldiBrowser:-1!==navigator.userAgent.indexOf(" Safari/")&&-1===navigator.userAgent.indexOf("Chrome")?this.browserCache=a.DeviceType.SafariBrowser:window.chrome&&-1!==navigator.userAgent.indexOf(" Chrome/")?this.browserCache=a.DeviceType.ChromeBrowser:-1!==navigator.userAgent.indexOf(" Trident/")?this.browserCache=a.DeviceType.IEBrowser:this.browserCache=a.DeviceType.UnknownBrowser),this.browserCache},e.prototype.getDeviceString=function(){return a.DeviceType[this.getDevice()].toLowerCase().replace("browser","")},e.prototype.isFirefox=function(){return this.getDevice()===a.DeviceType.FirefoxBrowser},e.prototype.isChrome=function(){return this.getDevice()===a.DeviceType.ChromeBrowser},e.prototype.isEdge=function(){return this.getDevice()===a.DeviceType.EdgeBrowser},e.prototype.isOpera=function(){return this.getDevice()===a.DeviceType.OperaBrowser},e.prototype.isVivaldi=function(){return this.getDevice()===a.DeviceType.VivaldiBrowser},e.prototype.isSafari=function(){return this.getDevice()===a.DeviceType.SafariBrowser},e.prototype.isIE=function(){return this.getDevice()===a.DeviceType.IEBrowser},e.prototype.isMacAppStore=function(){return!1},e.prototype.isViewOpen=function(){return Promise.resolve(!1)},e.prototype.lockTimeout=function(){return null},e.prototype.launchUri=function(e,t){var n=document.createElement("a");n.href=e,null!=t&&t.sameWindow||(n.target="_blank",n.rel="noreferrer noopener"),n.classList.add("d-none"),document.body.appendChild(n),n.click(),document.body.removeChild(n)},e.prototype.saveFile=function(e,t,n,r){var i=null,o=null,a=r.toLowerCase(),s=!0;if(a.endsWith(".pdf")?(o="application/pdf",s=!1):a.endsWith(".xlsx")?o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":a.endsWith(".docx")?o="application/vnd.openxmlformats-officedocument.wordprocessingml.document":a.endsWith(".pptx")?o="application/vnd.openxmlformats-officedocument.presentationml.presentation":a.endsWith(".csv")?o="text/csv":a.endsWith(".png")?o="image/png":a.endsWith(".jpg")||a.endsWith(".jpeg")?o="image/jpeg":a.endsWith(".gif")&&(o="image/gif"),null!=o&&null==(n=n||{}).type&&(n.type=o),i=null==n||this.isIE()?new Blob([t]):new Blob([t],n),navigator.msSaveOrOpenBlob)navigator.msSaveBlob(i,r);else{var l=e.document.createElement("a");s?l.download=r:this.isSafari()||(l.target="_blank"),l.href=URL.createObjectURL(i),l.style.position="fixed",e.document.body.appendChild(l),l.click(),e.document.body.removeChild(l)}},e.prototype.getApplicationVersion=function(){return Promise.resolve("2.20.3")},e.prototype.supportsWebAuthn=function(e){return"undefined"!=typeof PublicKeyCredential},e.prototype.supportsDuo=function(){return!0},e.prototype.showToast=function(e,t,n,r){this.messagingService.send("showToast",{text:n,title:t,type:e,options:r})},e.prototype.showDialog=function(e,t,n,a,s,l){return void 0===l&&(l=!1),r(this,void 0,void 0,(function(){var r,c;return i(this,(function(i){switch(i.label){case 0:if(r=null,null!=s)switch(s){case"success":r="fa-check text-success";break;case"warning":r="fa-warning text-warning";break;case"error":r="fa-bolt text-danger";break;case"info":r="fa-info-circle text-info"}return c=null!=r?'<i class="swal-custom-icon fa '+r+'"></i>':void 0,[4,o.default.fire({heightAuto:!1,buttonsStyling:!1,icon:s,iconHtml:c,text:l?null:e,html:l?e:null,title:t,showCancelButton:null!=a,cancelButtonText:a,showConfirmButton:!0,confirmButtonText:null==n?this.i18nService.t("ok"):n})];case 1:return[2,i.sent().value]}}))}))},e.prototype.isDev=function(){return!1},e.prototype.isSelfHost=function(){return"true"===(!1).toString()},e.prototype.copyToClipboard=function(e,t){var n=window,r=window.document;if(t&&(t.window||t.win)?r=(n=t.window||t.win).document:t&&t.doc&&(r=t.doc),n.clipboardData&&n.clipboardData.setData)n.clipboardData.setData("Text",e);else if(r.queryCommandSupported&&r.queryCommandSupported("copy")){var i=r.createElement("textarea");i.textContent=e,i.style.position="fixed";var o=r.body;r.body.classList.contains("modal-open")&&(o=r.body.querySelector(".modal")),o.appendChild(i),i.select();try{r.execCommand("copy")}catch(a){console.warn("Copy to clipboard failed.",a)}finally{o.removeChild(i)}}},e.prototype.readFromClipboard=function(e){throw new Error("Cannot read from clipboard on web.")},e.prototype.supportsBiometric=function(){return Promise.resolve(!1)},e.prototype.authenticateBiometric=function(){return Promise.resolve(!1)},e.prototype.supportsSecureStorage=function(){return!1},e.prototype.getDefaultSystemTheme=function(){return Promise.resolve(null)},e.prototype.onDefaultSystemThemeChange=function(){},e}();t.WebPlatformUtilsService=s},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(957),a=n(958),s=n(70),l=function(){function e(e,t,n,r){this.storageService=e,this.apiService=t,this.userService=n,this.cipherService=r,this.inited=!1}return e.prototype.init=function(e){var t=this;this.inited||(this.inited=!0,e&&(this.uploadEvents(),setInterval((function(){return t.uploadEvents()}),6e4)))},e.prototype.collect=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=!1),r(this,void 0,void 0,(function(){var r,a,l,c,p;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return i.sent()?[4,this.userService.getAllOrganizations()]:[2];case 2:return null==(r=i.sent())||0===(a=new Set(r.filter((function(e){return e.useEvents})).map((function(e){return e.id})))).size?[2]:null==t?[3,4]:[4,this.cipherService.get(t)];case 3:if(null==(l=i.sent())||null==l.organizationId||!a.has(l.organizationId))return[2];i.label=4;case 4:return[4,this.storageService.get(s.ConstantsService.eventCollectionKey)];case 5:return null==(c=i.sent())&&(c=[]),(p=new o.EventData).type=e,p.cipherId=t,p.date=(new Date).toISOString(),c.push(p),[4,this.storageService.save(s.ConstantsService.eventCollectionKey,c)];case 6:return i.sent(),n?[4,this.uploadEvents()]:[3,8];case 7:i.sent(),i.label=8;case 8:return[2]}}))}))},e.prototype.uploadEvents=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return n.sent()?[4,this.storageService.get(s.ConstantsService.eventCollectionKey)]:[2];case 2:if(null==(e=n.sent())||0===e.length)return[2];t=e.map((function(e){var t=new a.EventRequest;return t.type=e.type,t.cipherId=e.cipherId,t.date=e.date,t})),n.label=3;case 3:return n.trys.push([3,5,,6]),[4,this.apiService.postEventsCollect(t)];case 4:return n.sent(),this.clearEvents(),[3,6];case 5:return n.sent(),[3,6];case 6:return[2]}}))}))},e.prototype.clearEvents=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.remove(s.ConstantsService.eventCollectionKey)];case 1:return e.sent(),[2]}}))}))},e}();t.EventService=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EventData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.EventRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(711),a=n(39),s=n(190),l=n(140),c=n(158),p=n(155),u=n(712),d=n(713),m=n(714),h=function(){function e(e,t,n){this.folderService=e,this.cipherService=t,this.apiService=n}return e.prototype.getExport=function(e){return void 0===e&&(e="csv"),r(this,void 0,void 0,(function(){return i(this,(function(t){return"encrypted_json"===e?[2,this.getEncryptedExport()]:[2,this.getDecryptedExport(e)]}))}))},e.prototype.getOrganizationExport=function(e,t){return void 0===t&&(t="csv"),r(this,void 0,void 0,(function(){return i(this,(function(n){return"encrypted_json"===t?[2,this.getOrganizationEncryptedExport(e)]:[2,this.getOrganizationDecryptedExport(e,t)]}))}))},e.prototype.getFileName=function(e,t){void 0===e&&(e=null),void 0===t&&(t="csv");var n=new Date;return"bitwarden"+(e?"_"+e:"")+"_export_"+(n.getFullYear()+""+this.padNumber(n.getMonth()+1,2)+this.padNumber(n.getDate(),2)+this.padNumber(n.getHours(),2)+this.padNumber(n.getMinutes(),2)+this.padNumber(n.getSeconds(),2))+"."+t},e.prototype.getDecryptedExport=function(e){return r(this,void 0,void 0,(function(){var t,n,r,s,l,c,p=this;return i(this,(function(i){switch(i.label){case 0:return t=[],n=[],(r=[]).push(this.folderService.getAllDecrypted().then((function(e){t=e}))),r.push(this.cipherService.getAllDecrypted().then((function(e){n=e.filter((function(e){return null==e.deletedDate}))}))),[4,Promise.all(r)];case 1:return i.sent(),"csv"===e?(s=new Map,t.forEach((function(e){null!=e.id&&s.set(e.id,e)})),l=[],n.forEach((function(e){if((e.type===a.CipherType.Login||e.type===a.CipherType.SecureNote)&&null==e.organizationId){var t={};t.folder=null!=e.folderId&&s.has(e.folderId)?s.get(e.folderId).name:null,t.favorite=e.favorite?1:null,p.buildCommonCipher(t,e),l.push(t)}})),[2,o.unparse(l)]):(c={encrypted:!1,folders:[],items:[]},t.forEach((function(e){if(null!=e.id){var t=new m.FolderWithId;t.build(e),c.folders.push(t)}})),n.forEach((function(e){if(null==e.organizationId){var t=new u.CipherWithIds;t.build(e),t.collectionIds=null,c.items.push(t)}})),[2,JSON.stringify(c,null," ")])}}))}))},e.prototype.getEncryptedExport=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=[],t=[],(n=[]).push(this.folderService.getAll().then((function(t){e=t}))),n.push(this.cipherService.getAll().then((function(e){t=e.filter((function(e){return null==e.deletedDate}))}))),[4,Promise.all(n)];case 1:return i.sent(),r={encrypted:!0,folders:[],items:[]},e.forEach((function(e){if(null!=e.id){var t=new m.FolderWithId;t.build(e),r.folders.push(t)}})),t.forEach((function(e){if(null==e.organizationId){var t=new u.CipherWithIds;t.build(e),t.collectionIds=null,r.items.push(t)}})),[2,JSON.stringify(r,null," ")]}}))}))},e.prototype.getOrganizationDecryptedExport=function(e,t){return r(this,void 0,void 0,(function(){var n,r,m,h,f,v,y=this;return i(this,(function(i){switch(i.label){case 0:return n=[],r=[],(m=[]).push(this.apiService.getCollections(e).then((function(e){var t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((function(e){var r=new l.Collection(new p.CollectionData(e));t.push(r.decrypt().then((function(e){n.push(e)})))})),Promise.all(t)}))),m.push(this.apiService.getCiphersOrganization(e).then((function(e){var t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((function(e){return null===e.deletedDate})).forEach((function(e){var n=new s.Cipher(new c.CipherData(e));t.push(n.decrypt().then((function(e){r.push(e)})))})),Promise.all(t)}))),[4,Promise.all(m)];case 1:return i.sent(),"csv"===t?(h=new Map,n.forEach((function(e){h.set(e.id,e)})),f=[],r.forEach((function(e){if(e.type===a.CipherType.Login||e.type===a.CipherType.SecureNote){var t={collections:[]};null!=e.collectionIds&&(t.collections=e.collectionIds.filter((function(e){return h.has(e)})).map((function(e){return h.get(e).name}))),y.buildCommonCipher(t,e),f.push(t)}})),[2,o.unparse(f)]):(v={encrypted:!1,collections:[],items:[]},n.forEach((function(e){var t=new d.CollectionWithId;t.build(e),v.collections.push(t)})),r.forEach((function(e){var t=new u.CipherWithIds;t.build(e),v.items.push(t)})),[2,JSON.stringify(v,null," ")])}}))}))},e.prototype.getOrganizationEncryptedExport=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return t=[],n=[],(r=[]).push(this.apiService.getCollections(e).then((function(e){return null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((function(e){var n=new l.Collection(new p.CollectionData(e));t.push(n)})),Promise.all([])}))),r.push(this.apiService.getCiphersOrganization(e).then((function(e){return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((function(e){return null===e.deletedDate})).forEach((function(e){var t=new s.Cipher(new c.CipherData(e));n.push(t)})),Promise.all([])}))),[4,Promise.all(r)];case 1:return i.sent(),o={encrypted:!0,collections:[],items:[]},t.forEach((function(e){var t=new d.CollectionWithId;t.build(e),o.collections.push(t)})),n.forEach((function(e){var t=new u.CipherWithIds;t.build(e),o.items.push(t)})),[2,JSON.stringify(o,null," ")]}}))}))},e.prototype.padNumber=function(e,t,n){void 0===n&&(n="0");var r=e.toString();return r.length>=t?r:new Array(t-r.length+1).join(n)+r},e.prototype.buildCommonCipher=function(e,t){switch(e.type=null,e.name=t.name,e.notes=t.notes,e.fields=null,e.login_uri=null,e.login_username=null,e.login_password=null,e.login_totp=null,t.fields&&t.fields.forEach((function(t){e.fields?e.fields+="\n":e.fields="",e.fields+=(t.name||"")+": "+t.value})),t.type){case a.CipherType.Login:e.type="login",e.login_username=t.login.username,e.login_password=t.login.password,e.login_totp=t.login.totp,t.login.uris&&(e.login_uri=[],t.login.uris.forEach((function(t){e.login_uri.push(t.uri)})));break;case a.CipherType.SecureNote:e.type="note";break;default:return}return e},e}();t.ExportService=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(39),i=n(143),o=n(190),a=n(105),s=n(961),l=n(962),c=n(963),p=n(964),u=n(966),d=function(){function e(){}return e.template=function(){var t=new e;return t.organizationId=null,t.collectionIds=null,t.folderId=null,t.type=r.CipherType.Login,t.name="Item name",t.notes="Some notes about this item.",t.favorite=!1,t.fields=[],t.login=null,t.secureNote=null,t.card=null,t.identity=null,t},e.toView=function(e,t){var n,o;if(void 0===t&&(t=new i.CipherView),t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.collectionIds||e.collectionIds){var a=new Set((null!==(n=t.collectionIds)&&void 0!==n?n:[]).concat(null!==(o=e.collectionIds)&&void 0!==o?o:[]));t.collectionIds=Array.from(a.values())}switch(t.name=e.name,t.notes=e.notes,t.favorite=e.favorite,null!=e.fields&&(t.fields=e.fields.map((function(e){return l.Field.toView(e)}))),e.type){case r.CipherType.Login:t.login=p.Login.toView(e.login);break;case r.CipherType.SecureNote:t.secureNote=u.SecureNote.toView(e.secureNote);break;case r.CipherType.Card:t.card=s.Card.toView(e.card);break;case r.CipherType.Identity:t.identity=c.Identity.toView(e.identity)}return t},e.toDomain=function(e,t){switch(void 0===t&&(t=new o.Cipher),t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.name=null!=e.name?new a.EncString(e.name):null,t.notes=null!=e.notes?new a.EncString(e.notes):null,t.favorite=e.favorite,null!=e.fields&&(t.fields=e.fields.map((function(e){return l.Field.toDomain(e)}))),e.type){case r.CipherType.Login:t.login=p.Login.toDomain(e.login);break;case r.CipherType.SecureNote:t.secureNote=u.SecureNote.toDomain(e.secureNote);break;case r.CipherType.Card:t.card=s.Card.toDomain(e.card);break;case r.CipherType.Identity:t.identity=c.Identity.toDomain(e.identity)}return t},e.prototype.build=function(e){var t,n;switch(this.organizationId=e.organizationId,this.folderId=e.folderId,this.type=e.type,e instanceof i.CipherView?(this.name=e.name,this.notes=e.notes):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.notes=null===(n=e.notes)||void 0===n?void 0:n.encryptedString),this.favorite=e.favorite,null!=e.fields&&(i.CipherView,this.fields=e.fields.map((function(e){return new l.Field(e)}))),e.type){case r.CipherType.Login:this.login=new p.Login(e.login);break;case r.CipherType.SecureNote:this.secureNote=new u.SecureNote(e.secureNote);break;case r.CipherType.Card:this.card=new s.Card(e.card);break;case r.CipherType.Identity:this.identity=new c.Identity(e.identity)}},e}();t.Cipher=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88),i=n(285),o=n(105),a=function(){function e(e){var t,n,i,o,a,s;null!=e&&(e instanceof r.CardView?(this.cardholderName=e.cardholderName,this.brand=e.brand,this.number=e.number,this.expMonth=e.expMonth,this.expYear=e.expYear,this.code=e.code):(this.cardholderName=null===(t=e.cardholderName)||void 0===t?void 0:t.encryptedString,this.brand=null===(n=e.brand)||void 0===n?void 0:n.encryptedString,this.number=null===(i=e.number)||void 0===i?void 0:i.encryptedString,this.expMonth=null===(o=e.expMonth)||void 0===o?void 0:o.encryptedString,this.expYear=null===(a=e.expYear)||void 0===a?void 0:a.encryptedString,this.code=null===(s=e.code)||void 0===s?void 0:s.encryptedString))}return e.template=function(){var t=new e;return t.cardholderName="John Doe",t.brand="visa",t.number="4242424242424242",t.expMonth="04",t.expYear="2023",t.code="123",t},e.toView=function(e,t){return void 0===t&&(t=new r.CardView),t.cardholderName=e.cardholderName,t.brand=e.brand,t.number=e.number,t.expMonth=e.expMonth,t.expYear=e.expYear,t.code=e.code,t},e.toDomain=function(e,t){return void 0===t&&(t=new i.Card),t.cardholderName=null!=e.cardholderName?new o.EncString(e.cardholderName):null,t.brand=null!=e.brand?new o.EncString(e.brand):null,t.number=null!=e.number?new o.EncString(e.number):null,t.expMonth=null!=e.expMonth?new o.EncString(e.expMonth):null,t.expYear=null!=e.expYear?new o.EncString(e.expYear):null,t.code=null!=e.code?new o.EncString(e.code):null,t},e}();t.Card=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(118),i=n(209),o=n(105),a=n(286),s=function(){function e(e){var t,n;null!=e&&(e instanceof i.FieldView?(this.name=e.name,this.value=e.value):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.value=null===(n=e.value)||void 0===n?void 0:n.encryptedString),this.type=e.type)}return e.template=function(){var t=new e;return t.name="Field name",t.value="Some value",t.type=r.FieldType.Text,t},e.toView=function(e,t){return void 0===t&&(t=new i.FieldView),t.type=e.type,t.value=e.value,t.name=e.name,t},e.toDomain=function(e,t){return void 0===t&&(t=new a.Field),t.type=e.type,t.value=null!=e.value?new o.EncString(e.value):null,t.name=null!=e.name?new o.EncString(e.name):null,t},e}();t.Field=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(144),i=n(105),o=n(287),a=function(){function e(e){var t,n,i,o,a,s,l,c,p,u,d,m,h,f,v,y,g,x;null!=e&&(e instanceof r.IdentityView?(this.title=e.title,this.firstName=e.firstName,this.middleName=e.middleName,this.lastName=e.lastName,this.address1=e.address1,this.address2=e.address2,this.address3=e.address3,this.city=e.city,this.state=e.state,this.postalCode=e.postalCode,this.country=e.country,this.company=e.company,this.email=e.email,this.phone=e.phone,this.ssn=e.ssn,this.username=e.username,this.passportNumber=e.passportNumber,this.licenseNumber=e.licenseNumber):(this.title=null===(t=e.title)||void 0===t?void 0:t.encryptedString,this.firstName=null===(n=e.firstName)||void 0===n?void 0:n.encryptedString,this.middleName=null===(i=e.middleName)||void 0===i?void 0:i.encryptedString,this.lastName=null===(o=e.lastName)||void 0===o?void 0:o.encryptedString,this.address1=null===(a=e.address1)||void 0===a?void 0:a.encryptedString,this.address2=null===(s=e.address2)||void 0===s?void 0:s.encryptedString,this.address3=null===(l=e.address3)||void 0===l?void 0:l.encryptedString,this.city=null===(c=e.city)||void 0===c?void 0:c.encryptedString,this.state=null===(p=e.state)||void 0===p?void 0:p.encryptedString,this.postalCode=null===(u=e.postalCode)||void 0===u?void 0:u.encryptedString,this.country=null===(d=e.country)||void 0===d?void 0:d.encryptedString,this.company=null===(m=e.company)||void 0===m?void 0:m.encryptedString,this.email=null===(h=e.email)||void 0===h?void 0:h.encryptedString,this.phone=null===(f=e.phone)||void 0===f?void 0:f.encryptedString,this.ssn=null===(v=e.ssn)||void 0===v?void 0:v.encryptedString,this.username=null===(y=e.username)||void 0===y?void 0:y.encryptedString,this.passportNumber=null===(g=e.passportNumber)||void 0===g?void 0:g.encryptedString,this.licenseNumber=null===(x=e.licenseNumber)||void 0===x?void 0:x.encryptedString))}return e.template=function(){var t=new e;return t.title="Mr",t.firstName="John",t.middleName="William",t.lastName="Doe",t.address1="123 Any St",t.address2="Apt #123",t.address3=null,t.city="New York",t.state="NY",t.postalCode="10001",t.country="US",t.company="Acme Inc.",t.email="john@company.com",t.phone="5555551234",t.ssn="000-123-4567",t.username="jdoe",t.passportNumber="US-123456789",t.licenseNumber="D123-12-123-12333",t},e.toView=function(e,t){return void 0===t&&(t=new r.IdentityView),t.title=e.title,t.firstName=e.firstName,t.middleName=e.middleName,t.lastName=e.lastName,t.address1=e.address1,t.address2=e.address2,t.address3=e.address3,t.city=e.city,t.state=e.state,t.postalCode=e.postalCode,t.country=e.country,t.company=e.company,t.email=e.email,t.phone=e.phone,t.ssn=e.ssn,t.username=e.username,t.passportNumber=e.passportNumber,t.licenseNumber=e.licenseNumber,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.Identity),t.title=null!=e.title?new i.EncString(e.title):null,t.firstName=null!=e.firstName?new i.EncString(e.firstName):null,t.middleName=null!=e.middleName?new i.EncString(e.middleName):null,t.lastName=null!=e.lastName?new i.EncString(e.lastName):null,t.address1=null!=e.address1?new i.EncString(e.address1):null,t.address2=null!=e.address2?new i.EncString(e.address2):null,t.address3=null!=e.address3?new i.EncString(e.address3):null,t.city=null!=e.city?new i.EncString(e.city):null,t.state=null!=e.state?new i.EncString(e.state):null,t.postalCode=null!=e.postalCode?new i.EncString(e.postalCode):null,t.country=null!=e.country?new i.EncString(e.country):null,t.company=null!=e.company?new i.EncString(e.company):null,t.email=null!=e.email?new i.EncString(e.email):null,t.phone=null!=e.phone?new i.EncString(e.phone):null,t.ssn=null!=e.ssn?new i.EncString(e.ssn):null,t.username=null!=e.username?new i.EncString(e.username):null,t.passportNumber=null!=e.passportNumber?new i.EncString(e.passportNumber):null,t.licenseNumber=null!=e.licenseNumber?new i.EncString(e.licenseNumber):null,t},e}();t.Identity=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(965),i=n(159),o=n(105),a=n(288),s=function(){function e(e){var t,n,o;null!=e&&(null!=e.uris&&(i.LoginView,this.uris=e.uris.map((function(e){return new r.LoginUri(e)}))),e instanceof i.LoginView?(this.username=e.username,this.password=e.password,this.totp=e.totp):(this.username=null===(t=e.username)||void 0===t?void 0:t.encryptedString,this.password=null===(n=e.password)||void 0===n?void 0:n.encryptedString,this.totp=null===(o=e.totp)||void 0===o?void 0:o.encryptedString))}return e.template=function(){var t=new e;return t.uris=[],t.username="jdoe",t.password="myp@ssword123",t.totp="JBSWY3DPEHPK3PXP",t},e.toView=function(e,t){return void 0===t&&(t=new i.LoginView),null!=e.uris&&(t.uris=e.uris.map((function(e){return r.LoginUri.toView(e)}))),t.username=e.username,t.password=e.password,t.totp=e.totp,t},e.toDomain=function(e,t){return void 0===t&&(t=new a.Login),null!=e.uris&&(t.uris=e.uris.map((function(e){return r.LoginUri.toDomain(e)}))),t.username=null!=e.username?new o.EncString(e.username):null,t.password=null!=e.password?new o.EncString(e.password):null,t.totp=null!=e.totp?new o.EncString(e.totp):null,t},e}();t.Login=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(258),i=n(105),o=n(289),a=function(){function e(e){var t;this.match=null,null!=e&&(e instanceof r.LoginUriView?this.uri=e.uri:this.uri=null===(t=e.uri)||void 0===t?void 0:t.encryptedString,this.match=e.match)}return e.template=function(){var t=new e;return t.uri="https://google.com",t.match=null,t},e.toView=function(e,t){return void 0===t&&(t=new r.LoginUriView),t.uri=e.uri,t.match=e.match,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.LoginUri),t.uri=null!=e.uri?new i.EncString(e.uri):null,t.match=e.match,t},e}();t.LoginUri=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(106),i=n(94),o=n(290),a=function(){function e(e){null!=e&&(this.type=e.type)}return e.template=function(){var t=new e;return t.type=r.SecureNoteType.Generic,t},e.toView=function(e,t){return void 0===t&&(t=new i.SecureNoteView),t.type=e.type,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.SecureNote),t.type=e.type,t},e}();t.SecureNote=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(156),i=n(140),o=n(105),a=function(){function e(){}return e.template=function(){var t=new e;return t.organizationId="00000000-0000-0000-0000-000000000000",t.name="Collection name",t.externalId=null,t},e.toView=function(e,t){return void 0===t&&(t=new r.CollectionView),t.name=e.name,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t},e.toDomain=function(e,t){return void 0===t&&(t=new i.Collection),t.name=null!=e.name?new o.EncString(e.name):null,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t},e.prototype.build=function(e){var t;this.organizationId=e.organizationId,e instanceof r.CollectionView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.externalId=e.externalId},e}();t.Collection=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(127),i=n(105),o=n(516),a=function(){function e(){}return e.template=function(){var t=new e;return t.name="Folder name",t},e.toView=function(e,t){return void 0===t&&(t=new r.FolderView),t.name=e.name,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.Folder),t.name=null!=e.name?new i.EncString(e.name):null,t},e.prototype.build=function(e){var t;e instanceof r.FolderView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString},e}();t.Folder=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(970),a=n(971),s=n(972),l=function(){function e(e,t){this.logService=e,this.apiService=t,this.azureFileUploadService=new a.AzureFileUploadService(e),this.bitwardenFileUploadService=new s.BitwardenFileUploadService(t)}return e.prototype.uploadSendFile=function(e,t,n){return r(this,void 0,void 0,(function(){var a,s,l=this;return i(this,(function(c){switch(c.label){case 0:switch(c.trys.push([0,7,,9]),e.fileUploadType){case o.FileUploadType.Direct:return[3,1];case o.FileUploadType.Azure:return[3,3]}return[3,5];case 1:return[4,this.bitwardenFileUploadService.upload(t.encryptedString,n,(function(t){return l.apiService.postSendFile(e.sendResponse.id,e.sendResponse.file.id,t)}))];case 2:return c.sent(),[3,6];case 3:return a=function(){return r(l,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.renewSendFileUploadUrl(e.sendResponse.id,e.sendResponse.file.id)];case 1:return[2,t.sent().url]}}))}))},[4,this.azureFileUploadService.upload(e.url,n,a)];case 4:return c.sent(),[3,6];case 5:throw new Error("Unknown file upload type");case 6:return[3,9];case 7:return s=c.sent(),[4,this.apiService.deleteSend(e.sendResponse.id)];case 8:throw c.sent(),s;case 9:return[2]}}))}))},e.prototype.uploadCipherAttachment=function(e,t,n,a){return r(this,void 0,void 0,(function(){var s,l,c,p=this;return i(this,(function(u){switch(u.label){case 0:s=e?t.cipherMiniResponse:t.cipherResponse,u.label=1;case 1:switch(u.trys.push([1,8,,13]),t.fileUploadType){case o.FileUploadType.Direct:return[3,2];case o.FileUploadType.Azure:return[3,4]}return[3,6];case 2:return[4,this.bitwardenFileUploadService.upload(n,a,(function(e){return p.apiService.postAttachmentFile(s.id,t.attachmentId,e)}))];case 3:return u.sent(),[3,7];case 4:return l=function(){return r(p,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.apiService.renewAttachmentUploadUrl(s.id,t.attachmentId)];case 1:return[2,e.sent().url]}}))}))},[4,this.azureFileUploadService.upload(t.url,a,l)];case 5:return u.sent(),[3,7];case 6:throw new Error("Unknown file upload type.");case 7:return[3,13];case 8:return c=u.sent(),e?[4,this.apiService.deleteCipherAttachmentAdmin(s.id,t.attachmentId)]:[3,10];case 9:return u.sent(),[3,12];case 10:return[4,this.apiService.deleteCipherAttachment(s.id,t.attachmentId)];case 11:u.sent(),u.label=12;case 12:throw c;case 13:return[2]}}))}))},e}();t.FileUploadService=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Direct=0]="Direct",e[e.Azure=1]="Azure"}(t.FileUploadType||(t.FileUploadType={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),a=function(){function e(e){this.logService=e}return e.prototype.upload=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return t.buffer.byteLength<=268435456?[4,this.azureUploadBlob(e,t)]:[3,2];case 1:return[2,r.sent()];case 2:return[4,this.azureUploadBlocks(e,t,n)];case 3:return[2,r.sent()]}}))}))},e.prototype.azureUploadBlob=function(e,t){return r(this,void 0,void 0,(function(){var n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return n=o.Utils.getUrl(e),r=new Headers({"x-ms-date":(new Date).toUTCString(),"x-ms-version":n.searchParams.get("sv"),"Content-Length":t.buffer.byteLength.toString(),"x-ms-blob-type":"BlockBlob"}),a=new Request(e,{body:t.buffer,cache:"no-store",method:"PUT",headers:r}),[4,fetch(a)];case 1:if(201!==(s=i.sent()).status)throw new Error("Failed to create Azure blob: "+s.status);return[2]}}))}))},e.prototype.azureUploadBlocks=function(e,t,n){return r(this,void 0,void 0,(function(){var r,a,s,l,c,p,u,d,m,h,f,v,y,g,x,b,S,w,C,I,E,P,k,_;return i(this,(function(i){switch(i.label){case 0:if(r=o.Utils.getUrl(e),a=this.getMaxBlockSize(r.searchParams.get("sv")),s=0,l=Math.ceil(t.buffer.byteLength/a),c=[],l>5e4)throw new Error("Cannot upload file, exceeds maximum size of "+5e4*a);i.label=1;case 1:i.trys.push([1,12,,13]),i.label=2;case 2:return s<l?[4,this.renewUrlIfNecessary(e,n)]:[3,7];case 3:return e=i.sent(),p=o.Utils.getUrl(e),u=this.encodedBlockId(s),p.searchParams.append("comp","block"),p.searchParams.append("blockid",u),d=s*a,m=t.buffer.slice(d,d+a),h=new Headers({"x-ms-date":(new Date).toUTCString(),"x-ms-version":p.searchParams.get("sv"),"Content-Length":m.byteLength.toString()}),f=new Request(p.toString(),{body:m,cache:"no-store",method:"PUT",headers:h}),[4,fetch(f)];case 4:return 201===(v=i.sent()).status?[3,6]:(E="Unsuccessful block PUT. Received status "+v.status,g=(y=this.logService).error,x=E+"\n",[4,v.json()]);case 5:throw g.apply(y,[x+i.sent()]),new Error(E);case 6:return c.push(u),s++,[3,2];case 7:return[4,this.renewUrlIfNecessary(e,n)];case 8:return e=i.sent(),b=o.Utils.getUrl(e),S=this.blockListXml(c),b.searchParams.append("comp","blocklist"),w=new Headers({"x-ms-date":(new Date).toUTCString(),"x-ms-version":b.searchParams.get("sv"),"Content-Length":S.length.toString()}),C=new Request(b.toString(),{body:S,cache:"no-store",method:"PUT",headers:w}),[4,fetch(C)];case 9:return 201===(I=i.sent()).status?[3,11]:(E="Unsuccessful block list PUT. Received status "+I.status,k=(P=this.logService).error,_=E+"\n",[4,I.json()]);case 10:throw k.apply(P,[_+i.sent()]),new Error(E);case 11:return[3,13];case 12:throw i.sent();case 13:return[2]}}))}))},e.prototype.renewUrlIfNecessary=function(e,t){var n;return r(this,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return r=o.Utils.getUrl(e),a=new Date(null!==(n=r.searchParams.get("se"))&&void 0!==n?n:""),isNaN(a.getTime())&&a.setTime(Date.now()+36e5),a.getTime()<Date.now()+1e3?[4,t()]:[3,2];case 1:return[2,i.sent()];case 2:return[2,e]}}))}))},e.prototype.encodedBlockId=function(e){var t=("000000000000000000000000000000000000000000000000"+e.toString()).slice(-48);return o.Utils.fromUtf8ToB64(t)},e.prototype.blockListXml=function(e){var t='<?xml version="1.0" encoding="utf-8"?><BlockList>';return e.forEach((function(e){t+="<Latest>"+e+"</Latest>"})),t+="</BlockList>"},e.prototype.getMaxBlockSize=function(e){return s.compare(e,"2019-12-12")>=0?4194304e3:s.compare(e,"2016-05-31")>=0?104857600:4194304},e}();t.AzureFileUploadService=a;var s=function(){function e(e){this.year=0,this.month=0,this.day=0;try{var t=e.split("-").map((function(e){return Number.parseInt(e,10)}));this.year=t[0],this.month=t[1],this.day=t[2]}catch(n){}}return e.compare=function(t,n){return"string"==typeof t&&(t=new e(t)),"string"==typeof n&&(n=new e(n)),t.year!==n.year?t.year-n.year:t.month!==n.month?t.month-n.month:t.day!==n.day?t.day-n.day:0},e.prototype.compare=function(t){return e.compare(this,t)},e}()},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),a=function(){function t(e){this.apiService=e}return t.prototype.upload=function(t,n,a){return r(this,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:r=new FormData;try{s=new Blob([n.buffer],{type:"application/octet-stream"}),r.append("data",s,t)}catch(l){if(!o.Utils.isNode||o.Utils.isBrowser)throw l;r.append("data",e.from(n.buffer),{filepath:t,contentType:"application/octet-stream"})}return[4,a(r)];case 1:return i.sent(),[2]}}))}))},t}();t.BitwardenFileUploadService=a}).call(this,n(95).Buffer)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(39),a=n(30),s=n(210),l=n(564),c=n(512),p=n(974),u=n(975),d=n(976),m=n(211),h=n(977),f=n(978),v=n(979),y=n(980),g=n(981),x=n(982),b=n(983),S=n(984),w=n(985),C=n(986),I=n(987),E=n(988),P=n(989),k=n(990),_=n(991),A=n(992),O=n(993),T=n(994),M=n(995),B=n(996),D=n(997),R=n(998),V=n(999),j=n(1e3),F=n(1001),U=n(1002),N=n(1003),z=n(1004),L=n(1005),G=n(1006),K=n(1009),q=n(1010),W=n(1011),H=n(1012),$=n(1013),Y=n(1014),Q=n(1015),J=n(1016),X=n(1017),Z=n(1018),ee=n(1019),te=n(1020),ne=n(1021),re=n(1023),ie=n(1024),oe=n(1025),ae=n(1026),se=n(1027),le=n(1028),ce=n(1029),pe=n(1030),ue=function(){function e(e,t,n,r,i,o){this.cipherService=e,this.folderService=t,this.apiService=n,this.i18nService=r,this.collectionService=i,this.platformUtilsService=o,this.featuredImportOptions=[{id:"bitwardenjson",name:"Bitwarden (json)"},{id:"bitwardencsv",name:"Bitwarden (csv)"},{id:"lastpasscsv",name:"LastPass (csv)"},{id:"chromecsv",name:"Chrome (csv)"},{id:"firefoxcsv",name:"Firefox (csv)"},{id:"keepass2xml",name:"KeePass 2 (xml)"},{id:"1password1pif",name:"1Password (1pif)"},{id:"dashlanejson",name:"Dashlane (json)"}],this.regularImportOptions=[{id:"keepassxcsv",name:"KeePassX (csv)"},{id:"1passwordwincsv",name:"1Password 6 and 7 Windows (csv)"},{id:"1passwordmaccsv",name:"1Password 6 and 7 Mac (csv)"},{id:"roboformcsv",name:"RoboForm (csv)"},{id:"keepercsv",name:"Keeper (csv)"},{id:"enpasscsv",name:"Enpass (csv)"},{id:"enpassjson",name:"Enpass (json)"},{id:"safeincloudxml",name:"SafeInCloud (xml)"},{id:"pwsafexml",name:"Password Safe (xml)"},{id:"stickypasswordxml",name:"Sticky Password (xml)"},{id:"msecurecsv",name:"mSecure (csv)"},{id:"truekeycsv",name:"True Key (csv)"},{id:"passwordbossjson",name:"Password Boss (json)"},{id:"zohovaultcsv",name:"Zoho Vault (csv)"},{id:"splashidcsv",name:"SplashID (csv)"},{id:"passworddragonxml",name:"Password Dragon (xml)"},{id:"padlockcsv",name:"Padlock (csv)"},{id:"passboltcsv",name:"Passbolt (csv)"},{id:"clipperzhtml",name:"Clipperz (html)"},{id:"aviracsv",name:"Avira (csv)"},{id:"saferpasscsv",name:"SaferPass (csv)"},{id:"upmcsv",name:"Universal Password Manager (csv)"},{id:"ascendocsv",name:"Ascendo DataVault (csv)"},{id:"meldiumcsv",name:"Meldium (csv)"},{id:"passkeepcsv",name:"PassKeep (csv)"},{id:"operacsv",name:"Opera (csv)"},{id:"vivaldicsv",name:"Vivaldi (csv)"},{id:"gnomejson",name:"GNOME Passwords and Keys/Seahorse (json)"},{id:"blurcsv",name:"Blur (csv)"},{id:"passwordagentcsv",name:"Password Agent (csv)"},{id:"passpackcsv",name:"Passpack (csv)"},{id:"passmanjson",name:"Passman (json)"},{id:"avastcsv",name:"Avast Passwords (csv)"},{id:"avastjson",name:"Avast Passwords (json)"},{id:"fsecurefsk",name:"F-Secure KEY (fsk)"},{id:"kasperskytxt",name:"Kaspersky Password Manager (txt)"},{id:"remembearcsv",name:"RememBear (csv)"},{id:"passwordwallettxt",name:"PasswordWallet (txt)"},{id:"mykicsv",name:"Myki (csv)"},{id:"securesafecsv",name:"SecureSafe (csv)"},{id:"logmeoncecsv",name:"LogMeOnce (csv)"},{id:"blackberrycsv",name:"BlackBerry Password Keeper (csv)"},{id:"buttercupcsv",name:"Buttercup (csv)"},{id:"codebookcsv",name:"Codebook (csv)"},{id:"encryptrcsv",name:"Encryptr (csv)"},{id:"yoticsv",name:"Yoti (csv)"}]}return e.prototype.getImportOptions=function(){return this.featuredImportOptions.concat(this.regularImportOptions)},e.prototype.import=function(e,t,n){return void 0===n&&(n=null),r(this,void 0,void 0,(function(){var r,o,a,s,l;return i(this,(function(i){switch(i.label){case 0:return[4,e.parse(t)];case 1:if(!(r=i.sent()).success)return[3,6];if(0===r.folders.length&&0===r.ciphers.length)return[2,new Error(this.i18nService.t("importNothingError"))];if(r.ciphers.length>0&&(o=Math.floor(r.ciphers.length/2),a=r.ciphers.length-1,this.badData(r.ciphers[0])&&this.badData(r.ciphers[o])&&this.badData(r.ciphers[a])))return[2,new Error(this.i18nService.t("importFormatError"))];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.postImport(r,n)];case 3:return i.sent(),[3,5];case 4:return s=i.sent(),l=new m.ErrorResponse(s,400),[2,this.handleServerError(l,r)];case 5:return[2,null];case 6:return[2,new Error(this.i18nService.t("importFormatError"))]}}))}))},e.prototype.getImporter=function(e,t){void 0===t&&(t=null);var n=this.getImporterInstance(e);return null==n?null:(n.organizationId=t,n)},e.prototype.getImporterInstance=function(e){if(null==e||""===e)return null;switch(e){case"bitwardencsv":return new g.BitwardenCsvImporter;case"bitwardenjson":return new x.BitwardenJsonImporter;case"lastpasscsv":case"passboltcsv":return new j.LastPassCsvImporter;case"keepassxcsv":return new R.KeePassXCsvImporter;case"aviracsv":return new y.AviraCsvImporter;case"blurcsv":return new S.BlurCsvImporter;case"safeincloudxml":return new ne.SafeInCloudXmlImporter;case"padlockcsv":return new q.PadlockCsvImporter;case"keepass2xml":return new D.KeePass2XmlImporter;case"chromecsv":case"operacsv":case"vivaldicsv":return new C.ChromeCsvImporter;case"firefoxcsv":return new O.FirefoxCsvImporter;case"upmcsv":return new le.UpmCsvImporter;case"saferpasscsv":return new re.SaferPassCsvImporter;case"meldiumcsv":return new U.MeldiumCsvImporter;case"1password1pif":return new L.OnePassword1PifImporter;case"1passwordwincsv":return new K.OnePasswordWinCsvImporter;case"1passwordmaccsv":return new G.OnePasswordMacCsvImporter;case"keepercsv":return new V.KeeperCsvImporter;case"passworddragonxml":return new J.PasswordDragonXmlImporter;case"enpasscsv":return new _.EnpassCsvImporter;case"enpassjson":return new A.EnpassJsonImporter;case"pwsafexml":return new X.PasswordSafeXmlImporter;case"dashlanejson":return new P.DashlaneJsonImporter;case"msecurecsv":return new N.MSecureCsvImporter;case"stickypasswordxml":return new ae.StickyPasswordXmlImporter;case"truekeycsv":return new se.TrueKeyCsvImporter;case"clipperzhtml":return new I.ClipperzHtmlImporter;case"roboformcsv":return new te.RoboFormCsvImporter;case"ascendocsv":return new h.AscendoCsvImporter;case"passwordbossjson":return new Q.PasswordBossJsonImporter;case"zohovaultcsv":return new pe.ZohoVaultCsvImporter;case"splashidcsv":return new oe.SplashIdCsvImporter;case"passkeepcsv":return new W.PassKeepCsvImporter;case"gnomejson":return new M.GnomeJsonImporter;case"passwordagentcsv":return new Y.PasswordAgentCsvImporter;case"passpackcsv":return new $.PasspackCsvImporter;case"passmanjson":return new H.PassmanJsonImporter;case"avastcsv":return new f.AvastCsvImporter;case"avastjson":return new v.AvastJsonImporter;case"fsecurefsk":return new T.FSecureFskImporter;case"kasperskytxt":return new B.KasperskyTxtImporter;case"remembearcsv":return new ee.RememBearCsvImporter;case"passwordwallettxt":return new Z.PasswordWalletTxtImporter;case"mykicsv":return new z.MykiCsvImporter;case"securesafecsv":return new ie.SecureSafeCsvImporter;case"logmeoncecsv":return new F.LogMeOnceCsvImporter;case"blackberrycsv":return new b.BlackBerryCsvImporter;case"buttercupcsv":return new w.ButtercupCsvImporter;case"codebookcsv":return new E.CodebookCsvImporter;case"encryptrcsv":return new k.EncryptrCsvImporter;case"yoticsv":return new ce.YotiCsvImporter;default:return null}},e.prototype.postImport=function(e,t){return void 0===t&&(t=null),r(this,void 0,void 0,(function(){var n,r,o,a,m;return i(this,(function(i){switch(i.label){case 0:if(null!=t)return[3,10];n=new p.ImportCiphersRequest,a=0,i.label=1;case 1:return a<e.ciphers.length?[4,this.cipherService.encrypt(e.ciphers[a])]:[3,4];case 2:m=i.sent(),n.ciphers.push(new s.CipherRequest(m)),i.label=3;case 3:return a++,[3,1];case 4:if(null==e.folders)return[3,8];a=0,i.label=5;case 5:return a<e.folders.length?[4,this.folderService.encrypt(e.folders[a])]:[3,8];case 6:r=i.sent(),n.folders.push(new c.FolderRequest(r)),i.label=7;case 7:return a++,[3,5];case 8:return null!=e.folderRelationships&&e.folderRelationships.forEach((function(e){return n.folderRelationships.push(new d.KvpRequest(e[0],e[1]))})),[4,this.apiService.postImportCiphers(n)];case 9:return[2,i.sent()];case 10:o=new u.ImportOrganizationCiphersRequest,a=0,i.label=11;case 11:return a<e.ciphers.length?(e.ciphers[a].organizationId=t,[4,this.cipherService.encrypt(e.ciphers[a])]):[3,14];case 12:m=i.sent(),o.ciphers.push(new s.CipherRequest(m)),i.label=13;case 13:return a++,[3,11];case 14:if(null==e.collections)return[3,18];a=0,i.label=15;case 15:return a<e.collections.length?(e.collections[a].organizationId=t,[4,this.collectionService.encrypt(e.collections[a])]):[3,18];case 16:m=i.sent(),o.collections.push(new l.CollectionRequest(m)),i.label=17;case 17:return a++,[3,15];case 18:return null!=e.collectionRelationships&&e.collectionRelationships.forEach((function(e){return o.collectionRelationships.push(new d.KvpRequest(e[0],e[1]))})),[4,this.apiService.postImportOrganizationCiphers(t,o)];case 19:return[2,i.sent()]}}))}))},e.prototype.badData=function(e){return(null==e.name||"--"===e.name)&&e.type===o.CipherType.Login&&null!=e.login&&a.Utils.isNullOrWhitespace(e.login.password)},e.prototype.handleServerError=function(e,t){if(null==e.validationErrors)return new Error(e.message);var n="";return Object.entries(e.validationErrors).forEach((function(e,r){var i,a,s=e[0],l=e[1],c=Number(s.match(/[0-9]+/)[0]);switch(s.match(/^\w+/)[0]){case"Ciphers":i=t.ciphers[c],a=o.CipherType[i.type];break;case"Folders":i=t.folders[c],a="Folder";break;case"Collections":i=t.collections[c],a="Collection";break;default:return}r>0&&(n+="\n\n"),"Folder"!==a&&"Collection"!==a&&(n+="["+(c+1)+"] "),n+="["+a+'] "'+i.name+'": '+l})),new Error(n)},e}();t.ImportService=ue},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.ciphers=[],this.folders=[],this.folderRelationships=[]};t.ImportCiphersRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){this.ciphers=[],this.collections=[],this.collectionRelationships=[]};t.ImportOrganizationCiphersRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){this.key=e,this.value=t};t.KvpRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<2)){var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[e.length-1]),r.name=t.getValueOrDefault(e[0],"--"),e.length>2&&e.length%2==0)for(var i=0;i<e.length-2;i+=2){var o=e[i+2],a=e[i+1];if(!t.isNullOrWhitespace(o)&&!t.isNullOrWhitespace(a)){var s=a.toLowerCase();null==r.login.password&&t.passwordFieldNames.indexOf(s)>-1?r.login.password=t.getValueOrDefault(o):null==r.login.username&&t.usernameFieldNames.indexOf(s)>-1?r.login.username=t.getValueOrDefault(o):(null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(s)>-1?r.login.uris=t.makeUriArray(o):t.processKvp(r,a,o)}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AscendoCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name),r.login.uris=t.makeUriArray(e.web),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.login),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AvastCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(39),l=n(106),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);return null==r?(n.success=!1,Promise.resolve(n)):(null!=r.logins&&r.logins.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.custName),r.notes=t.getValueOrDefault(e.note),r.login.uris=t.makeUriArray(e.url),r.login.password=t.getValueOrDefault(e.pwd),r.login.username=t.getValueOrDefault(e.loginName),t.cleanupCipher(r),n.ciphers.push(r)})),null!=r.notes&&r.notes.forEach((function(e){var r=t.initLoginCipher();r.type=s.CipherType.SecureNote,r.secureNote.type=l.SecureNoteType.Generic,r.name=t.getValueOrDefault(e.label),r.notes=t.getValueOrDefault(e.text),t.cleanupCipher(r),n.ciphers.push(r)})),null!=r.cards&&r.cards.forEach((function(e){var r=t.initLoginCipher();r.type=s.CipherType.Card,r.name=t.getValueOrDefault(e.custName),r.notes=t.getValueOrDefault(e.note),r.card.cardholderName=t.getValueOrDefault(e.holderName),r.card.number=t.getValueOrDefault(e.cardNumber),r.card.code=t.getValueOrDefault(e.cvv),r.card.brand=t.getCardBrand(r.card.number),null!=e.expirationDate&&(null!=e.expirationDate.month&&(r.card.expMonth=e.expirationDate.month+""),null!=e.expirationDate.year&&(r.card.expYear=e.expirationDate.year+"")),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AvastJsonImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name,t.getValueOrDefault(t.nameFromUrl(e.website),"--")),r.login.uris=t.makeUriArray(e.website),r.login.password=t.getValueOrDefault(e.password),t.isNullOrWhitespace(e.username)&&!t.isNullOrWhitespace(e.secondary_username)?r.login.username=e.secondary_username:(r.login.username=t.getValueOrDefault(e.username),r.notes=t.getValueOrDefault(e.secondary_username)),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AviraCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(143),l=n(156),c=n(209),p=n(159),u=n(94),d=n(39),m=n(118),h=n(106),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.organization&&!t.isNullOrWhitespace(e.collections)?e.collections.split(",").forEach((function(e){for(var t=!0,r=n.collections.length,i=0;i<n.collections.length;i++)if(n.collections[i].name===e){t=!1,r=i;break}if(t){var o=new l.CollectionView;o.name=e,n.collections.push(o)}n.collectionRelationships.push([n.ciphers.length,r])})):t.organization||t.processFolder(n,e.folder);var r=new s.CipherView;if(r.favorite=!t.organization&&"0"!==t.getValueOrDefault(e.favorite,"0"),r.type=d.CipherType.Login,r.notes=t.getValueOrDefault(e.notes),r.name=t.getValueOrDefault(e.name,"--"),!t.isNullOrWhitespace(e.fields))for(var i=t.splitNewLine(e.fields),o=0;o<i.length;o++)if(!t.isNullOrWhitespace(i[o])){var a=i[o].lastIndexOf(": ");if(-1!==a){null==r.fields&&(r.fields=[]);var f=new c.FieldView;f.name=i[o].substr(0,a),f.value=null,f.type=m.FieldType.Text,i[o].length>a+2&&(f.value=i[o].substr(a+2)),r.fields.push(f)}}switch(null!=e.type?e.type.toLowerCase():null){case"note":r.type=d.CipherType.SecureNote,r.secureNote=new u.SecureNoteView,r.secureNote.type=h.SecureNoteType.Generic;break;default:r.type=d.CipherType.Login,r.login=new p.LoginView,r.login.totp=t.getValueOrDefault(e.login_totp||e.totp),r.login.username=t.getValueOrDefault(e.login_username||e.username),r.login.password=t.getValueOrDefault(e.login_password||e.password);var v=t.parseSingleRowCsv(e.login_uri||e.uri);r.login.uris=t.makeUriArray(v)}n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BitwardenCsvImporter=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(25),l=n(26),c=n(712),p=n(713),u=n(714),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return this.result=new l.ImportResult,this.results=JSON.parse(e),null==this.results||null==this.results.items||0===this.results.items.length?(this.result.success=!1,[2,this.result]):this.results.encrypted?[4,this.parseEncrypted()]:[3,2];case 1:return t.sent(),[3,3];case 2:this.parseDecrypted(),t.label=3;case 3:return this.result.success=!0,[2,this.result]}}))}))},t.prototype.parseEncrypted=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o,s,l,d,m,h,f,v,y=this;return a(this,(function(a){switch(a.label){case 0:if(e=new Map,!this.organization||null==this.results.collections)return[3,5];t=0,n=this.results.collections,a.label=1;case 1:return t<n.length?(h=n[t],null==(r=p.CollectionWithId.toDomain(h))?[3,3]:(r.id=null,r.organizationId=this.organizationId,[4,r.decrypt()])):[3,4];case 2:v=a.sent(),e.set(h.id,this.result.collections.length),this.result.collections.push(v),a.label=3;case 3:return t++,[3,1];case 4:return[3,9];case 5:if(this.organization||null==this.results.folders)return[3,9];i=0,o=this.results.folders,a.label=6;case 6:return i<o.length?(s=o[i],null==(l=u.FolderWithId.toDomain(s))?[3,8]:(l.id=null,[4,l.decrypt()])):[3,9];case 7:v=a.sent(),e.set(s.id,this.result.folders.length),this.result.folders.push(v),a.label=8;case 8:return i++,[3,6];case 9:d=0,m=this.results.items,a.label=10;case 10:return d<m.length?(h=m[d],(f=c.CipherWithIds.toDomain(h)).id=null,f.folderId=null,f.organizationId=this.organizationId,f.collectionIds=null,null!=f.passwordHistory&&f.passwordHistory.length>5&&(f.passwordHistory=f.passwordHistory.slice(0,5)),!this.organization&&null!=h.folderId&&e.has(h.folderId)?this.result.folderRelationships.push([this.result.ciphers.length,e.get(h.folderId)]):this.organization&&null!=h.collectionIds&&h.collectionIds.forEach((function(t){e.has(t)&&y.result.collectionRelationships.push([y.result.ciphers.length,e.get(t)])})),[4,f.decrypt()]):[3,13];case 11:v=a.sent(),this.cleanupCipher(v),this.result.ciphers.push(v),a.label=12;case 12:return d++,[3,10];case 13:return[2]}}))}))},t.prototype.parseDecrypted=function(){var e=this,t=new Map;this.organization&&null!=this.results.collections?this.results.collections.forEach((function(n){var r=p.CollectionWithId.toView(n);null!=r&&(r.id=null,r.organizationId=null,t.set(n.id,e.result.collections.length),e.result.collections.push(r))})):this.organization||null==this.results.folders||this.results.folders.forEach((function(n){var r=u.FolderWithId.toView(n);null!=r&&(r.id=null,t.set(n.id,e.result.folders.length),e.result.folders.push(r))})),this.results.items.forEach((function(n){var r=c.CipherWithIds.toView(n);r.id=null,r.folderId=null,r.organizationId=null,r.collectionIds=null,null!=r.passwordHistory&&r.passwordHistory.length>5&&(r.passwordHistory=r.passwordHistory.slice(0,5)),!e.organization&&null!=n.folderId&&t.has(n.folderId)?e.result.folderRelationships.push([e.result.ciphers.length,t.get(n.folderId)]):e.organization&&null!=n.collectionIds&&n.collectionIds.forEach((function(n){t.has(n)&&e.result.collectionRelationships.push([e.result.ciphers.length,t.get(n)])})),e.cleanupCipher(r),e.result.ciphers.push(r)}))},t}(s.BaseImporter);t.BitwardenJsonImporter=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if("list"!==e.grouping){var r=t.initLoginCipher();r.favorite="1"===e.fav,r.name=t.getValueOrDefault(e.name),r.notes=t.getValueOrDefault(e.extra),"note"!==e.grouping&&(r.login.uris=t.makeUriArray(e.url),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.username)),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BlackBerryCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){"null"===e.label&&(e.label=null);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.label,t.getValueOrDefault(t.nameFromUrl(e.domain),"--")),r.login.uris=t.makeUriArray(e.domain),r.login.password=t.getValueOrDefault(e.password),t.isNullOrWhitespace(e.email)&&!t.isNullOrWhitespace(e.username)?r.login.username=e.username:(r.login.username=t.getValueOrDefault(e.email),r.notes=t.getValueOrDefault(e.username)),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BlurCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=["!group_id","!group_name","title","username","password","URL","id"],l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValueOrDefault(e["!group_name"]));var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.title,"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.URL);var i=!1;for(var o in e)e.hasOwnProperty(o)&&(i||-1!==s.indexOf(o)||(i=!0),i&&t.processKvp(r,o,e[o]));t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ButtercupCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name,"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.url),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ChromeCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelector("textarea");return null==i||this.isNullOrWhitespace(i.textContent)?(n.errorMessage="Missing textarea.",n.success=!1,Promise.resolve(n)):(JSON.parse(i.textContent).forEach((function(e){var r=t.initLoginCipher();if(t.isNullOrWhitespace(e.label)||(r.name=e.label.split(" ")[0]),null==e.data||t.isNullOrWhitespace(e.data.notes)||(r.notes=e.data.notes.split("\\n").join("\n")),null!=e.currentVersion&&null!=e.currentVersion.fields)for(var i in e.currentVersion.fields)if(e.currentVersion.fields.hasOwnProperty(i)){var o=e.currentVersion.fields[i];switch(null!=o.actionType?o.actionType.toLowerCase():null){case"password":r.login.password=t.getValueOrDefault(o.value);break;case"email":case"username":case"user":case"name":r.login.username=t.getValueOrDefault(o.value);break;case"url":r.login.uris=t.makeUriArray(o.value);break;default:var a=null!=o.label?o.label.toLowerCase():null;null==r.login.password&&t.passwordFieldNames.indexOf(a)>-1?r.login.password=t.getValueOrDefault(o.value):null==r.login.username&&t.usernameFieldNames.indexOf(a)>-1?r.login.username=t.getValueOrDefault(o.value):(null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(a)>-1?r.login.uris=t.makeUriArray(o.value):t.processKvp(r,o.label,o.value)}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ClipperzHtmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValueOrDefault(e.Category));var r=t.initLoginCipher();r.favorite="True"===t.getValueOrDefault(e.Favorite),r.name=t.getValueOrDefault(e.Entry,"--"),r.notes=t.getValueOrDefault(e.Note),r.login.username=t.getValueOrDefault(e.Username,e.Email),r.login.password=t.getValueOrDefault(e.Password),r.login.totp=t.getValueOrDefault(e.TOTP),r.login.uris=t.makeUriArray(e.Website),t.isNullOrWhitespace(e.Username)||t.processKvp(r,"Email",e.Email),t.processKvp(r,"Phone",e.Phone),t.processKvp(r,"PIN",e.PIN),t.processKvp(r,"Account",e.Account),t.processKvp(r,"Date",e.Date),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.CodebookCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(143),c=n(144),p=n(94),u=n(39),d=n(106),m=new Set(["ADDRESS","AUTHENTIFIANT","BANKSTATEMENT","IDCARD","IDENTITY","PAYMENTMEANS_CREDITCARD","PAYMENTMEAN_PAYPAL","EMAIL"]),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){this.result=new a.ImportResult;var t=JSON.parse(e);if(null==t||0===t.length)return this.result.success=!1,Promise.resolve(this.result);for(var n in null!=t.ADDRESS&&this.processAddress(t.ADDRESS),null!=t.AUTHENTIFIANT&&this.processAuth(t.AUTHENTIFIANT),null!=t.BANKSTATEMENT&&this.processNote(t.BANKSTATEMENT,"BankAccountName"),null!=t.IDCARD&&this.processNote(t.IDCARD,"Fullname"),null!=t.PAYMENTMEANS_CREDITCARD&&this.processCard(t.PAYMENTMEANS_CREDITCARD),null!=t.IDENTITY&&this.processIdentity(t.IDENTITY),t)t.hasOwnProperty(n)&&!m.has(n)&&this.processNote(t[n],null,"Generic Note");return this.result.success=!0,Promise.resolve(this.result)},t.prototype.processAuth=function(e){var t=this;e.forEach((function(e){var n=t.initLoginCipher();n.name=t.getValueOrDefault(e.title),n.login.username=t.getValueOrDefault(e.login,t.getValueOrDefault(e.secondaryLogin)),t.isNullOrWhitespace(n.login.username)?n.login.username=t.getValueOrDefault(e.email):t.isNullOrWhitespace(e.email)||(n.notes="Email: "+e.email+"\n"),n.login.password=t.getValueOrDefault(e.password),n.login.uris=t.makeUriArray(e.domain),n.notes+=t.getValueOrDefault(e.note,""),t.convertToNoteIfNeeded(n),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processIdentity=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.identity=new c.IdentityView,n.type=u.CipherType.Identity,n.name=t.getValueOrDefault(e.fullName,"");var r=n.name.split(" ");r.length>0&&(n.identity.firstName=t.getValueOrDefault(r[0])),2===r.length?n.identity.lastName=t.getValueOrDefault(r[1]):3===r.length&&(n.identity.middleName=t.getValueOrDefault(r[1]),n.identity.lastName=t.getValueOrDefault(r[2])),n.identity.username=t.getValueOrDefault(e.pseudo),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processAddress=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.identity=new c.IdentityView,n.type=u.CipherType.Identity,n.name=t.getValueOrDefault(e.addressName),n.identity.address1=t.getValueOrDefault(e.addressFull),n.identity.city=t.getValueOrDefault(e.city),n.identity.state=t.getValueOrDefault(e.state),n.identity.postalCode=t.getValueOrDefault(e.zipcode),n.identity.country=t.getValueOrDefault(e.country),null!=n.identity.country&&(n.identity.country=n.identity.country.toUpperCase()),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processCard=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.card=new s.CardView,n.type=u.CipherType.Card,n.name=t.getValueOrDefault(e.bank),n.card.number=t.getValueOrDefault(e.cardNumber),n.card.brand=t.getCardBrand(n.card.number),n.card.cardholderName=t.getValueOrDefault(e.owner),t.isNullOrWhitespace(n.card.brand)||(t.isNullOrWhitespace(n.name)?n.name=n.card.brand:n.name+=" - "+n.card.brand),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processNote=function(e,t,n){var r=this;void 0===n&&(n=null),e.forEach((function(e){var i=new l.CipherView;for(var o in i.secureNote=new p.SecureNoteView,i.type=u.CipherType.SecureNote,i.secureNote.type=d.SecureNoteType.Generic,i.name=null!=n?n:r.getValueOrDefault(e[t]),e)e.hasOwnProperty(o)&&o!==t&&r.processKvp(i,o,e[o].toString());r.cleanupCipher(i),r.result.ciphers.push(i)}))},t}(o.BaseImporter);t.DashlaneJsonImporter=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(39),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.Label,"--"),r.notes=t.getValueOrDefault(e.Notes);var i=t.getValueOrDefault(e.Text);t.isNullOrWhitespace(i)||(t.isNullOrWhitespace(r.notes)?r.notes=i:r.notes+="\n\n"+i);var o=e["Entry Type"];if("Password"===o)r.login.username=t.getValueOrDefault(e.Username),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e["Site URL"]);else if("Credit Card"===o){r.type=l.CipherType.Card,r.card=new s.CardView,r.card.cardholderName=t.getValueOrDefault(e["Name on card"]),r.card.number=t.getValueOrDefault(e["Card Number"]),r.card.brand=t.getCardBrand(r.card.number),r.card.code=t.getValueOrDefault(e.CVV);var a=t.getValueOrDefault(e.Expiry);if(!t.isNullOrWhitespace(a)){var c=a.split("/");c.length>1&&(r.card.expMonth=parseInt(c[0],null).toString(),r.card.expYear=(2e3+parseInt(c[1],null)).toString())}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.EncryptrCsvImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(39),l=n(106),c=n(88),p=n(94),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=!0;return r.forEach((function(e){if(e.length<2||i&&("Title"===e[0]||"title"===e[0]))i=!1;else{var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[e.length-1]),r.name=t.getValueOrDefault(e[0],"--"),2!==e.length&&(t.containsField(e,"username")||t.containsField(e,"password")||t.containsField(e,"email")||t.containsField(e,"url"))||(r.type=s.CipherType.SecureNote,r.secureNote=new p.SecureNoteView,r.secureNote.type=l.SecureNoteType.Generic),t.containsField(e,"cardholder")&&t.containsField(e,"number")&&t.containsField(e,"expiry date")&&(r.type=s.CipherType.Card,r.card=new c.CardView),e.length>2&&e.length%2==0)for(var o=0;o<e.length-2;o+=2){var a=e[o+2];if(!t.isNullOrWhitespace(a)){var u=e[o+1],d=u.toLowerCase();if(r.type===s.CipherType.Login){if("url"===d&&(null==r.login.uris||0===r.login.uris.length)){r.login.uris=t.makeUriArray(a);continue}if(("username"===d||"email"===d)&&t.isNullOrWhitespace(r.login.username)){r.login.username=a;continue}if("password"===d&&t.isNullOrWhitespace(r.login.password)){r.login.password=a;continue}if("totp"===d&&t.isNullOrWhitespace(r.login.totp)){r.login.totp=a;continue}}else if(r.type===s.CipherType.Card){if("cardholder"===d&&t.isNullOrWhitespace(r.card.cardholderName)){r.card.cardholderName=a;continue}if("number"===d&&t.isNullOrWhitespace(r.card.number)){r.card.number=a,r.card.brand=t.getCardBrand(a);continue}if("cvc"===d&&t.isNullOrWhitespace(r.card.code)){r.card.code=a;continue}if("expiry date"===d&&t.isNullOrWhitespace(r.card.expMonth)&&t.isNullOrWhitespace(r.card.expYear)){if(t.setCardExpiration(r,a))continue}else if("type"===d)continue}t.processKvp(r,u,a)}}t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n)},t.prototype.containsField=function(e,t){var n=this;return null!=e&&null!=t&&e.filter((function(e){return!n.isNullOrWhitespace(e)&&e.toLowerCase()===t.toLowerCase()})).length>0},t}(o.BaseImporter);t.EnpassCsvImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(127),c=n(39),p=n(118),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||null==r.items||0===r.items.length)return n.success=!1,Promise.resolve(n);var i=new Map,o=new Map,s=this.buildFolderTree(r.folders);return this.flattenFolderTree(null,s,i),i.forEach((function(e,t){o.set(t,n.folders.length);var r=new l.FolderView;r.name=e,n.folders.push(r)})),r.items.forEach((function(e){null!=e.folders&&e.folders.length>0&&o.has(e.folders[0])&&n.folderRelationships.push([n.ciphers.length,o.get(e.folders[0])]);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.title),r.favorite=e.favorite>0,null!=e.template_type&&null!=e.fields&&e.fields.length>0&&(0===e.template_type.indexOf("login.")||0===e.template_type.indexOf("password.")?t.processLogin(r,e.fields):0===e.template_type.indexOf("creditcard.")?t.processCard(r,e.fields):e.template_type.indexOf("identity.")<0&&e.fields.some((function(e){return"password"===e.type&&!t.isNullOrWhitespace(e.value)}))?t.processLogin(r,e.fields):t.processNote(r,e.fields)),r.notes+="\n"+t.getValueOrDefault(e.note,""),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n)},t.prototype.processLogin=function(e,t){var n=this,r=[];t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||("username"!==t.type&&"email"!==t.type||!n.isNullOrWhitespace(e.login.username)?"password"===t.type&&n.isNullOrWhitespace(e.login.password)?e.login.password=t.value:"totp"===t.type&&n.isNullOrWhitespace(e.login.totp)?e.login.totp=t.value:"url"===t.type?r.push(t.value):n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text):e.login.username=t.value)})),e.login.uris=this.makeUriArray(r)},t.prototype.processCard=function(e,t){var n=this;e.card=new s.CardView,e.type=c.CipherType.Card,t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||"ccType"===t.type||("ccName"===t.type&&n.isNullOrWhitespace(e.card.cardholderName)?e.card.cardholderName=t.value:"ccNumber"===t.type&&n.isNullOrWhitespace(e.card.number)?(e.card.number=t.value,e.card.brand=n.getCardBrand(e.card.number)):"ccCvc"===t.type&&n.isNullOrWhitespace(e.card.code)?e.card.code=t.value:"ccExpiry"===t.type&&n.isNullOrWhitespace(e.card.expYear)&&n.setCardExpiration(e,t.value)||n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text))}))},t.prototype.processNote=function(e,t){var n=this;t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text)}))},t.prototype.buildFolderTree=function(e){if(null==e)return[];var t=[],n=new Map([]);return e.forEach((function(e){n.set(e.uuid,e),e.children=[]})),e.forEach((function(e){null!=e.parent_uuid&&""!==e.parent_uuid&&n.has(e.parent_uuid)?n.get(e.parent_uuid).children.push(e):t.push(e)})),t},t.prototype.flattenFolderTree=function(e,t,n){var r=this;null!=t&&t.forEach((function(t){if(null!=t.title&&""!==t.title.trim()){var i=t.title.trim();null!=e&&""!==e.trim()&&(i=e+"/"+i),n.set(t.uuid,i),null!=t.children&&0!==t.children.length&&r.flattenFolderTree(i,t.children,n)}}))},t}(o.BaseImporter);t.EnpassJsonImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.filter((function(e){return"chrome://FirefoxAccounts"!==e.url})).forEach((function(e){var r=t.initLoginCipher(),i=t.getValueOrDefault(e.url,t.getValueOrDefault(e.hostname));r.name=t.getValueOrDefault(t.nameFromUrl(i),"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(i),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.FirefoxCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(39),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=new a.ImportResult,n=JSON.parse(e);if(null==n||null==n.data)return t.success=!1,Promise.resolve(t);for(var r in n.data)if(n.data.hasOwnProperty(r)){var i=n.data[r],o=this.initLoginCipher();if(o.name=this.getValueOrDefault(i.service),o.notes=this.getValueOrDefault(i.notes),"website"===i.style)o.login.username=this.getValueOrDefault(i.username),o.login.password=this.getValueOrDefault(i.password),o.login.uris=this.makeUriArray(i.url);else{if("creditcard"!==i.style)continue;o.type=l.CipherType.Card,o.card=new s.CardView,o.card.cardholderName=this.getValueOrDefault(i.username),o.card.number=this.getValueOrDefault(i.creditNumber),o.card.brand=this.getCardBrand(o.card.number),o.card.code=this.getValueOrDefault(i.creditCvv),this.isNullOrWhitespace(i.creditExpiry)||this.setCardExpiration(o,i.creditExpiry)||this.processKvp(o,"Expiration",i.creditExpiry),this.isNullOrWhitespace(i.password)||this.processKvp(o,"PIN",i.password)}this.convertToNoteIfNeeded(o),this.cleanupCipher(o),t.ciphers.push(o)}return t.success=!0,Promise.resolve(t)},t}(o.BaseImporter);t.FSecureFskImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||0===Object.keys(r).length)return n.success=!1,Promise.resolve(n);var i=function(e){if(!r.hasOwnProperty(e)||o.isNullOrWhitespace(e)||0===r[e].length)return"continue";r[e].forEach((function(r){if(!t.isNullOrWhitespace(r.display_name)&&0===r.display_name.indexOf("http")){t.processFolder(n,e);var i=t.initLoginCipher();if(i.name=r.display_name.replace("http://","").replace("https://",""),i.name.length>30&&(i.name=i.name.substring(0,30)),i.login.password=t.getValueOrDefault(r.secret),i.login.uris=t.makeUriArray(r.display_name),null!=r.attributes)for(var o in i.login.username=null!=r.attributes?t.getValueOrDefault(r.attributes.username_value):null,r.attributes)r.attributes.hasOwnProperty(o)&&"username_value"!==o&&"xdg:schema"!==o&&t.processKvp(i,o,r.attributes[o]);t.convertToNoteIfNeeded(i),t.cleanupCipher(i),n.ciphers.push(i)}}))},o=this;for(var s in r)i(s);return this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.GnomeJsonImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t,n,r,i,o=this,s=new a.ImportResult,l=this.splitNewLine(e).join("\n");-1!==l.indexOf("Notes\n\n")&&((i=l.split("Notes\n\n")).length>1&&(l=i[0],t=i[1]));-1!==l.indexOf("Applications\n\n")&&((i=l.split("Applications\n\n")).length>1&&(l=i[0],n=i[1]));0===l.indexOf("Websites\n\n")&&((i=l.split("Websites\n\n")).length>1&&(l=i[0],r=i[1]));var c=this.parseDataCategory(t),p=this.parseDataCategory(n),u=this.parseDataCategory(r);return c.forEach((function(e){var t=o.initLoginCipher();t.name=o.getValueOrDefault(e.get("Name")),t.notes=o.getValueOrDefault(e.get("Text")),o.cleanupCipher(t),s.ciphers.push(t)})),u.concat(p).forEach((function(e){var t=o.initLoginCipher(),n=e.has("Website name")?"Website name":"Application";t.name=o.getValueOrDefault(e.get(n),""),o.isNullOrWhitespace(e.get("Login name"))||(o.isNullOrWhitespace(t.name)||(t.name+=": "),t.name+=e.get("Login name")),t.notes=o.getValueOrDefault(e.get("Comment")),e.has("Website URL")&&(t.login.uris=o.makeUriArray(e.get("Website URL"))),t.login.username=o.getValueOrDefault(e.get("Login")),t.login.password=o.getValueOrDefault(e.get("Password")),o.cleanupCipher(t),s.ciphers.push(t)})),s.success=!0,Promise.resolve(s)},t.prototype.parseDataCategory=function(e){if(this.isNullOrWhitespace(e)||-1===e.indexOf("\n---\n"))return[];var t=[];return e.split("\n---\n").forEach((function(e){if(-1!==e.indexOf("\n")){var n,r,i=new Map;e.split("\n").forEach((function(e){if(null==n){var t,o,a=e.indexOf(":");-1!==a&&(t=e.substring(0,a),e.length>a+1&&(o=e.substring(a+2)),null!=t&&i.set(t,o),"Comment"!==t&&"Text"!==t||(n=o,r=t))}else n+="\n"+e})),null!=n&&null!=r&&i.set(r,n),0!==i.size&&t.push(i)}})),t},t}(o.BaseImporter);t.KasperskyTxtImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(118),s=n(26),l=n(127),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.result=new s.ImportResult,t}return i(t,e),t.prototype.parse=function(e){var t=this.parseXml(e);if(null==t)return this.result.success=!1,Promise.resolve(this.result);var n=t.querySelector("KeePassFile > Root > Group");return null==n?(this.result.errorMessage="Missing `KeePassFile > Root > Group` node.",this.result.success=!1,Promise.resolve(this.result)):(this.traverse(n,!0,""),this.organization&&this.moveFoldersToCollections(this.result),this.result.success=!0,Promise.resolve(this.result))},t.prototype.traverse=function(e,t,n){var r=this,i=this.result.folders.length,o=n;if(!t){""!==o&&(o+="/");var s=this.querySelectorDirectChild(e,"Name");o+=null==s?"-":s.textContent;var c=new l.FolderView;c.name=o,this.result.folders.push(c)}this.querySelectorAllDirectChild(e,"Entry").forEach((function(e){var n=r.result.ciphers.length,o=r.initLoginCipher();r.querySelectorAllDirectChild(e,"String").forEach((function(e){var t=r.querySelectorDirectChild(e,"Value"),n=null!=t?t.textContent:null;if(!r.isNullOrWhitespace(n)){var i=r.querySelectorDirectChild(e,"Key"),s=null!=i?i.textContent:null;if("URL"===s)o.login.uris=r.makeUriArray(n);else if("UserName"===s)o.login.username=n;else if("Password"===s)o.login.password=n;else if("otp"===s)o.login.totp=n.replace("key=","");else if("Title"===s)o.name=n;else if("Notes"===s)o.notes+=n+"\n";else{var l=a.FieldType.Text,c=t.attributes;c.length>0&&null!=c.ProtectInMemory&&"True"===c.ProtectInMemory.value&&(l=a.FieldType.Hidden),r.processKvp(o,s,n,l)}}})),r.cleanupCipher(o),r.result.ciphers.push(o),t||r.result.folderRelationships.push([n,i])})),this.querySelectorAllDirectChild(e,"Group").forEach((function(e){r.traverse(e,!1,o)}))},t}(o.BaseImporter);t.KeePass2XmlImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(e.Title)){e.Group=!t.isNullOrWhitespace(e.Group)&&e.Group.startsWith("Root/")?e.Group.replace("Root/",""):e.Group;var r=t.isNullOrWhitespace(e.Group)?null:e.Group;t.processFolder(n,r);var i=t.initLoginCipher();i.notes=t.getValueOrDefault(e.Notes),i.name=t.getValueOrDefault(e.Title,"--"),i.login.username=t.getValueOrDefault(e.Username),i.login.password=t.getValueOrDefault(e.Password),i.login.uris=t.makeUriArray(e.URL),t.cleanupCipher(i),n.ciphers.push(i)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.KeePassXCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<6)){t.processFolder(n,e[0]);var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[5])+"\n",r.name=t.getValueOrDefault(e[1],"--"),r.login.username=t.getValueOrDefault(e[2]),r.login.password=t.getValueOrDefault(e[3]),r.login.uris=t.makeUriArray(e[4]),e.length>7)for(var i=7;i<e.length;i+=2)t.processKvp(r,e[i],e[i+1]);t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.KeeperCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(143),c=n(127),p=n(144),u=n(159),d=n(94),m=n(39),h=n(106),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e,r){var i=n.ciphers.length,o=n.folders.length,a=e.grouping;null!=a&&(a=a.replace(/\\/g,"/").replace(/[\x00-\x1F\x7F-\x9F]/g,""));var s="(none)"!==t.getValueOrDefault(a,"(none)"),l=s;if(s)for(var p=0;p<n.folders.length;p++)if(n.folders[p].name===a){l=!1,o=p;break}var d=t.buildBaseCipher(e);if(d.type===m.CipherType.Login)d.notes=t.getValueOrDefault(e.extra),d.login=new u.LoginView,d.login.uris=t.makeUriArray(e.url),d.login.username=t.getValueOrDefault(e.username),d.login.password=t.getValueOrDefault(e.password);else if(d.type===m.CipherType.SecureNote)t.parseSecureNote(e,d);else if(d.type===m.CipherType.Card)d.card=t.parseCard(e),d.notes=t.getValueOrDefault(e.notes);else if(d.type===m.CipherType.Identity&&(d.identity=t.parseIdentity(e),d.notes=t.getValueOrDefault(e.notes),!t.isNullOrWhitespace(e.ccnum))){var h=t.buildBaseCipher(e);h.identity=null,h.type=m.CipherType.Card,h.card=t.parseCard(e),n.ciphers.push(h)}if(n.ciphers.push(d),l){var f=new c.FolderView;f.name=a,n.folders.push(f)}s&&n.folderRelationships.push([i,o])})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.buildBaseCipher=function(e){var t=new l.CipherView;return e.hasOwnProperty("profilename")&&e.hasOwnProperty("profilelanguage")?(t.favorite=!1,t.name=this.getValueOrDefault(e.profilename,"--"),t.type=m.CipherType.Card,this.isNullOrWhitespace(e.title)&&this.isNullOrWhitespace(e.firstname)&&this.isNullOrWhitespace(e.lastname)&&this.isNullOrWhitespace(e.address1)&&this.isNullOrWhitespace(e.phone)&&this.isNullOrWhitespace(e.username)&&this.isNullOrWhitespace(e.email)||(t.type=m.CipherType.Identity)):(t.favorite=!this.organization&&"1"===this.getValueOrDefault(e.fav,"0"),t.name=this.getValueOrDefault(e.name,"--"),t.type="http://sn"===e.url?m.CipherType.SecureNote:m.CipherType.Login),t},t.prototype.parseCard=function(e){var t=new s.CardView;if(t.cardholderName=this.getValueOrDefault(e.ccname),t.number=this.getValueOrDefault(e.ccnum),t.code=this.getValueOrDefault(e.cccsc),t.brand=this.getCardBrand(e.ccnum),!this.isNullOrWhitespace(e.ccexp)&&e.ccexp.indexOf("-")>-1){var n=e.ccexp.split("-");n.length>1&&(t.expYear=n[0],t.expMonth=n[1],2===t.expMonth.length&&"0"===t.expMonth[0]&&(t.expMonth=t.expMonth[1]))}return t},t.prototype.parseIdentity=function(e){var t=new p.IdentityView;return t.title=this.getValueOrDefault(e.title),t.firstName=this.getValueOrDefault(e.firstname),t.middleName=this.getValueOrDefault(e.middlename),t.lastName=this.getValueOrDefault(e.lastname),t.username=this.getValueOrDefault(e.username),t.company=this.getValueOrDefault(e.company),t.ssn=this.getValueOrDefault(e.ssn),t.address1=this.getValueOrDefault(e.address1),t.address2=this.getValueOrDefault(e.address2),t.address3=this.getValueOrDefault(e.address3),t.city=this.getValueOrDefault(e.city),t.state=this.getValueOrDefault(e.state),t.postalCode=this.getValueOrDefault(e.zip),t.country=this.getValueOrDefault(e.country),t.email=this.getValueOrDefault(e.email),t.phone=this.getValueOrDefault(e.phone),this.isNullOrWhitespace(t.title)||(t.title=t.title.charAt(0).toUpperCase()+t.title.slice(1)),t},t.prototype.parseSecureNote=function(e,t){var n=this.splitNewLine(e.extra),r=!1;if(n.length){var i=n[0].split(":");if(i.length>1&&"NoteType"===i[0]&&("Credit Card"===i[1]||"Address"===i[1])){if("Credit Card"===i[1]){var o=this.parseSecureNoteMapping(t,n,{Number:"number","Name on Card":"cardholderName","Security Code":"code","Expiration Date":"expMonth"});if(this.isNullOrWhitespace(o.expMonth)||","===o.expMonth)o.expMonth=void 0;else{var a=o.expMonth.split(","),s=a[0],l=a[1];if(this.isNullOrWhitespace(s))o.expMonth=void 0;else{var c=new Date(Date.parse(s.trim()+" 1, 2012")).getMonth()+1;isNaN(c)?o.expMonth=void 0:o.expMonth=c.toString()}this.isNullOrWhitespace(l)||(o.expYear=l)}t.type=m.CipherType.Card,t.card=o}else if("Address"===i[1]){o=this.parseSecureNoteMapping(t,n,{Title:"title","First Name":"firstName","Last Name":"lastName","Middle Name":"middleName",Company:"company","Address 1":"address1","Address 2":"address2","Address 3":"address3","City / Town":"city",State:"state","Zip / Postal Code":"postalCode",Country:"country","Email Address":"email",Username:"username"});t.type=m.CipherType.Identity,t.identity=o}r=!0}}r||(t.secureNote=new d.SecureNoteView,t.secureNote.type=h.SecureNoteType.Generic,t.notes=this.getValueOrDefault(e.extra))},t.prototype.parseSecureNoteMapping=function(e,t,n){var r=this,i={},o=!1;return t.forEach((function(t){var a=null,s=null;if(!o){if(r.isNullOrWhitespace(t))return;var l=t.indexOf(":");if(-1===l?a=t:(a=t.substring(0,l),t.length>l&&(s=t.substring(l+1))),r.isNullOrWhitespace(a)||r.isNullOrWhitespace(s)||"NoteType"===a)return}o?e.notes+="\n"+t:"Notes"===a?(r.isNullOrWhitespace(e.notes)?e.notes=s:e.notes+="\n"+s,o=!0):n.hasOwnProperty(a)?i[n[a]]=s:r.processKvp(e,a,s)})),i},t}(o.BaseImporter);t.LastPassCsvImporter=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<4)){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),r.login.username=t.getValueOrDefault(e[2]),r.login.password=t.getValueOrDefault(e[3]),r.login.uris=t.makeUriArray(e[1]),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.LogMeOnceCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.DisplayName,"--"),r.notes=t.getValueOrDefault(e.Notes),r.login.username=t.getValueOrDefault(e.UserName),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e.Url),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.MeldiumCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(39),l=n(106),c=n(94),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<3)){var r="Unassigned"!==t.getValueOrDefault(e[0],"Unassigned")?e[0]:null;t.processFolder(n,r);var i=t.initLoginCipher();if(i.name=t.getValueOrDefault(e[2],"--"),"Web Logins"===e[1]||"Login"===e[1])i.login.uris=t.makeUriArray(e[4]),i.login.username=t.getValueOrDefault(e[5]),i.login.password=t.getValueOrDefault(e[6]),i.notes=t.isNullOrWhitespace(e[3])?null:e[3].split("\\n").join("\n");else if(e.length>3){i.type=s.CipherType.SecureNote,i.secureNote=new c.SecureNoteView,i.secureNote.type=l.SecureNoteType.Generic;for(var o=3;o<e.length;o++)t.isNullOrWhitespace(e[o])||(i.notes+=e[o]+"\n")}t.isNullOrWhitespace(e[1])||i.type===s.CipherType.Login||(i.name=e[1]+": "+i.name),t.cleanupCipher(i),n.ciphers.push(i)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.MSecureCsvImporter=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(39),s=n(106),l=n(88),c=n(144),p=n(94),u=n(26),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new u.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();if(r.name=t.getValueOrDefault(e.nickname,"--"),r.notes=t.getValueOrDefault(e.additionalInfo),void 0!==e.url)r.login.uris=t.makeUriArray(e.url),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.totp=t.getValueOrDefault(e.twoFactAuthToken);else if(void 0!==e.cardNumber)r.card=new l.CardView,r.type=a.CipherType.Card,r.card.cardholderName=t.getValueOrDefault(e.cardName),r.card.number=t.getValueOrDefault(e.cardNumber),r.card.brand=t.getCardBrand(r.card.number),r.card.expMonth=t.getValueOrDefault(e.exp_month),r.card.expYear=t.getValueOrDefault(e.exp_year),r.card.code=t.getValueOrDefault(e.cvv);else if(void 0!==e.firstName)r.identity=new c.IdentityView,r.type=a.CipherType.Identity,r.identity.title=t.getValueOrDefault(e.title),r.identity.firstName=t.getValueOrDefault(e.firstName),r.identity.middleName=t.getValueOrDefault(e.middleName),r.identity.lastName=t.getValueOrDefault(e.lastName),r.identity.phone=t.getValueOrDefault(e.number),r.identity.email=t.getValueOrDefault(e.email),r.identity.address1=t.getValueOrDefault(e.firstAddressLine),r.identity.address2=t.getValueOrDefault(e.secondAddressLine),r.identity.city=t.getValueOrDefault(e.city),r.identity.country=t.getValueOrDefault(e.country),r.identity.postalCode=t.getValueOrDefault(e.zipCode);else{if(void 0===e.content)return;r.secureNote=new p.SecureNoteView,r.type=a.CipherType.SecureNote,r.secureNote.type=s.SecureNoteType.Generic,r.name=t.getValueOrDefault(e.title,"--"),r.notes=t.getValueOrDefault(e.content)}t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.MykiCsvImporter=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(144),c=n(490),p=n(94),u=n(39),d=n(118),m=n(106),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.result=new a.ImportResult,t}return i(t,e),t.prototype.parse=function(e){var t=this;return e.split(this.newLineRegex).forEach((function(e){if(!t.isNullOrWhitespace(e)&&"{"===e[0]){var n=JSON.parse(e);if(!0!==n.trashed){var r=t.initLoginCipher();t.isNullOrWhitespace(n.hmac)?t.processStandardItem(n,r):t.processWinOpVaultItem(n,r),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),t.result.ciphers.push(r)}}})),this.result.success=!0,Promise.resolve(this.result)},t.prototype.processWinOpVaultItem=function(e,t){var n=this;if(null!=e.overview&&(t.name=this.getValueOrDefault(e.overview.title),null!=e.overview.URLs)){var r=[];e.overview.URLs.forEach((function(e){n.isNullOrWhitespace(e.u)||r.push(e.u)})),t.login.uris=this.makeUriArray(r)}null!=e.details&&(null!=e.details.passwordHistory&&this.parsePasswordHistory(e.details.passwordHistory,t),this.isNullOrWhitespace(e.details.ccnum)&&this.isNullOrWhitespace(e.details.cvv)?this.isNullOrWhitespace(e.details.firstname)&&this.isNullOrWhitespace(e.details.address1)||(t.type=u.CipherType.Identity,t.identity=new l.IdentityView):(t.type=u.CipherType.Card,t.card=new s.CardView),t.type!==u.CipherType.Login||this.isNullOrWhitespace(e.details.password)||(t.login.password=e.details.password),this.isNullOrWhitespace(e.details.notesPlain)||(t.notes=e.details.notesPlain.split(this.newLineRegex).join("\n")+"\n"),null!=e.details.fields&&this.parseFields(e.details.fields,t,"designation","value","name"),null!=e.details.sections&&e.details.sections.forEach((function(e){null!=e.fields&&n.parseFields(e.fields,t,"n","v","t")})))},t.prototype.processStandardItem=function(e,t){var n=this;if(t.favorite=!(!e.openContents||!e.openContents.faveIndex),t.name=this.getValueOrDefault(e.title),"securenotes.SecureNote"===e.typeName?(t.type=u.CipherType.SecureNote,t.secureNote=new p.SecureNoteView,t.secureNote.type=m.SecureNoteType.Generic):"wallet.financial.CreditCard"===e.typeName?(t.type=u.CipherType.Card,t.card=new s.CardView):"identities.Identity"===e.typeName?(t.type=u.CipherType.Identity,t.identity=new l.IdentityView):t.login.uris=this.makeUriArray(e.location),null!=e.secureContents){if(null!=e.secureContents.passwordHistory&&this.parsePasswordHistory(e.secureContents.passwordHistory,t),this.isNullOrWhitespace(e.secureContents.notesPlain)||(t.notes=e.secureContents.notesPlain.split(this.newLineRegex).join("\n")+"\n"),t.type===u.CipherType.Login&&(this.isNullOrWhitespace(e.secureContents.password)||(t.login.password=e.secureContents.password),null!=e.secureContents.URLs)){var r=[];e.secureContents.URLs.forEach((function(e){n.isNullOrWhitespace(e.url)||r.push(e.url)})),r.length>0&&(t.login.uris=this.makeUriArray(r))}null!=e.secureContents.fields&&this.parseFields(e.secureContents.fields,t,"designation","value","name"),null!=e.secureContents.sections&&e.secureContents.sections.forEach((function(e){null!=e.fields&&n.parseFields(e.fields,t,"n","v","t")}))}},t.prototype.parsePasswordHistory=function(e,t){var n=this,r=e.length>5?5:e.length;t.passwordHistory=e.filter((function(e){return!n.isNullOrWhitespace(e.value)&&null!=e.time})).sort((function(e,t){return t.time-e.time})).slice(0,r).map((function(e){var t=new c.PasswordHistoryView;return t.password=e.value,t.lastUsedDate=new Date((""+e.time).length>=13?e.time:1e3*e.time),t}))},t.prototype.parseFields=function(e,t,n,r,i){var o=this;e.forEach((function(e){if(null!=e[r]&&""!==e[r].toString().trim()){var a=e[r].toString(),s=null!=e[n]?e[n].toString():null;if(t.type===u.CipherType.Login){if(o.isNullOrWhitespace(t.login.username)&&"username"===s)return void(t.login.username=a);if(o.isNullOrWhitespace(t.login.password)&&"password"===s)return void(t.login.password=a);if(o.isNullOrWhitespace(t.login.totp)&&null!=s&&s.startsWith("TOTP_"))return void(t.login.totp=a)}else if(t.type===u.CipherType.Card){if(o.isNullOrWhitespace(t.card.number)&&"ccnum"===s)return t.card.number=a,void(t.card.brand=o.getCardBrand(a));if(o.isNullOrWhitespace(t.card.code)&&"cvv"===s)return void(t.card.code=a);if(o.isNullOrWhitespace(t.card.cardholderName)&&"cardholder"===s)return void(t.card.cardholderName=a);if(o.isNullOrWhitespace(t.card.expiration)&&"expiry"===s&&6===a.length)return t.card.expMonth=a.substr(4,2),"0"===t.card.expMonth[0]&&(t.card.expMonth=t.card.expMonth.substr(1,1)),void(t.card.expYear=a.substr(0,4));if("type"===s)return}else if(t.type===u.CipherType.Identity){var l=t.identity;if(o.isNullOrWhitespace(l.firstName)&&"firstname"===s)return void(l.firstName=a);if(o.isNullOrWhitespace(l.lastName)&&"lastname"===s)return void(l.lastName=a);if(o.isNullOrWhitespace(l.middleName)&&"initial"===s)return void(l.middleName=a);if(o.isNullOrWhitespace(l.phone)&&"defphone"===s)return void(l.phone=a);if(o.isNullOrWhitespace(l.company)&&"company"===s)return void(l.company=a);if(o.isNullOrWhitespace(l.email)&&"email"===s)return void(l.email=a);if(o.isNullOrWhitespace(l.username)&&"username"===s)return void(l.username=a);if("address"===s){var c=e[r],p=c.street,m=c.city,h=c.country,f=c.zip;return l.address1=o.getValueOrDefault(p),l.city=o.getValueOrDefault(m),o.isNullOrWhitespace(h)||(l.country=h.toUpperCase()),void(l.postalCode=o.getValueOrDefault(f))}}var v=o.isNullOrWhitespace(e[i])?"no_name":e[i];if("password"!==v||null==t.passwordHistory||!t.passwordHistory.some((function(e){return e.password===a}))){var y="concealed"===e.k?d.FieldType.Hidden:d.FieldType.Text;o.processKvp(t,v,a,y)}}}))},t}(o.BaseImporter);t.OnePassword1PifImporter=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(715),a=n(39),s=n(716),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setCipherType=function(e,t){switch(this.getValueOrDefault(this.getProp(e,"type"),"Login")){case"Credit Card":t.type=a.CipherType.Card,t.card=new s.CardView,o.IgnoredProperties.push("type");break;case"Identity":t.type=a.CipherType.Identity,t.identity=new s.IdentityView,o.IgnoredProperties.push("type");break;case"Login":case"Secure Note":o.IgnoredProperties.push("type")}},t}(o.OnePasswordCsvImporter);t.OnePasswordMacCsvImporter=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){this.importRecord=e,this.property=t,this.cipher=n,this.lowerProperty=t.toLowerCase()};t.CipherImportContext=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.View=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(715),a=n(39),s=n(716),l=function(e){function t(){var t=e.call(this)||this;return t.identityPropertyParsers.push(t.setIdentityAddress),t}return i(t,e),t.prototype.setCipherType=function(e,t){t.type=a.CipherType.Login,t.login=new s.LoginView,this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: number/i))||this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: expiry date/i))||(t.type=a.CipherType.Card,t.card=new s.CardView),this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: first name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: initial/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: last name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/internet \d+: email/i))||(t.type=a.CipherType.Identity,t.identity=new s.IdentityView)},t.prototype.setIdentityAddress=function(e){return!!e.lowerProperty.match(/address \d+: address/i)&&(this.processKvp(e.cipher,"address",e.importRecord[e.property]),!0)},t.prototype.setCreditCardExpiry=function(e){if(this.isNullOrWhitespace(e.cipher.card.expiration)&&e.lowerProperty.includes("expiry date")){var t=e.importRecord[e.property].split("/");return e.cipher.card.expMonth=t[0],"0"===e.cipher.card.expMonth[0]&&2===e.cipher.card.expMonth.length&&(e.cipher.card.expMonth=e.cipher.card.expMonth.substr(1,1)),e.cipher.card.expYear=t[2].length>4?t[2].substr(0,4):t[2],!0}return!1},t}(o.OnePasswordCsvImporter);t.OnePasswordWinCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(156),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=null;return r.forEach((function(e){if(null!=i){if(!(e.length<2||e.length!==i.length)){if(!t.isNullOrWhitespace(e[1]))if(t.organization){(r=e[1].split(",")).forEach((function(e){e=e.trim();for(var t=!0,r=n.collections.length,i=0;i<n.collections.length;i++)if(n.collections[i].name===e){t=!1,r=i;break}if(t){var o=new s.CollectionView;o.name=e,n.collections.push(o)}n.collectionRelationships.push([n.ciphers.length,r])}))}else{var r,o=(r=e[1].split(",")).length>0?r[0].trim():null;t.processFolder(n,o)}var a=t.initLoginCipher();a.name=t.getValueOrDefault(e[0],"--");for(var l=2;l<e.length;l++){var c=i[l].trim().toLowerCase();t.isNullOrWhitespace(e[l])||t.isNullOrWhitespace(c)||(t.usernameFieldNames.indexOf(c)>-1?a.login.username=e[l]:t.passwordFieldNames.indexOf(c)>-1?a.login.password=e[l]:t.uriFieldNames.indexOf(c)>-1?a.login.uris=t.makeUriArray(e[l]):t.processKvp(a,i[l],e[l]))}t.cleanupCipher(a),n.ciphers.push(a)}}else i=e.map((function(e){return e}))})),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PadlockCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValue("category",e));var r=t.initLoginCipher();r.notes=t.getValue("description",e),r.name=t.getValueOrDefault(t.getValue("title",e),"--"),r.login.username=t.getValue("username",e),r.login.password=t.getValue("password",e),r.login.uris=t.makeUriArray(t.getValue("site",e)),t.processKvp(r,"Password 2",t.getValue("password2",e)),t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.getValue=function(e,t){return this.getValueOrDefault(t[e],this.getValueOrDefault(t[" "+e]))},t}(o.BaseImporter);t.PassKeepCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);return null==r||0===r.length?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(null!=e.tags&&e.tags.length>0){var r=e.tags[0].text;t.processFolder(n,r)}var i=t.initLoginCipher();i.name=e.label,i.login.username=t.getValueOrDefault(e.username),t.isNullOrWhitespace(i.login.username)?i.login.username=t.getValueOrDefault(e.email):t.isNullOrWhitespace(e.email)||(i.notes="Email: "+e.email+"\n"),i.login.password=t.getValueOrDefault(e.password),i.login.uris=t.makeUriArray(e.url),i.notes+=t.getValueOrDefault(e.description,""),null!=e.otp&&(i.login.totp=t.getValueOrDefault(e.otp.secret)),null!=e.custom_fields&&e.custom_fields.forEach((function(e){switch(e.field_type){case"text":case"password":t.processKvp(i,e.label,e.value)}})),t.convertToNoteIfNeeded(i),t.cleanupCipher(i),n.ciphers.push(i)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PassmanJsonImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(156),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.isNullOrWhitespace(e.Tags)?null:JSON.parse(e.Tags),i=null!=r&&null!=r.tags&&r.tags.length>0?r.tags.map((function(e){try{var n=JSON.parse(e);return t.getValueOrDefault(n.tag)}catch(r){}return null})).filter((function(e){return!t.isNullOrWhitespace(e)})):null;t.organization&&null!=i&&i.length>0?i.forEach((function(e){for(var t=!0,r=n.collections.length,i=0;i<n.collections.length;i++)if(n.collections[i].name===e){t=!1,r=i;break}if(t){var o=new s.CollectionView;o.name=e,n.collections.push(o)}n.collectionRelationships.push([n.ciphers.length,r])})):!t.organization&&null!=i&&i.length>0&&t.processFolder(n,i[0]);var o=t.initLoginCipher();o.notes=t.getValueOrDefault(e.Notes,""),o.notes+="\n\n"+t.getValueOrDefault(e["Shared Notes"],"")+"\n",o.name=t.getValueOrDefault(e["Entry Name"],"--"),o.login.username=t.getValueOrDefault(e["User ID"]),o.login.password=t.getValueOrDefault(e.Password),o.login.uris=t.makeUriArray(e.URL),null!=e.__parsed_extra&&e.__parsed_extra.length>0&&e.__parsed_extra.forEach((function(e){t.isNullOrWhitespace(e)||(o.notes+="\n"+e)}));var a=t.isNullOrWhitespace(e["Extra Fields"])?null:JSON.parse(e["Extra Fields"]),l=null!=a&&null!=a.extraFields&&a.extraFields.length>0?a.extraFields.map((function(e){try{return JSON.parse(e)}catch(t){}return null})):null;null!=l&&l.forEach((function(e){null!=e&&t.processKvp(o,e.name,e.data)})),t.cleanupCipher(o),n.ciphers.push(o)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PasspackCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=!0;return r.forEach((function(e){if(!(5!==e.length&&e.length<9)){var r=10===e.length&&"0"===e[0],o=t.initLoginCipher();if(o.name=t.getValueOrDefault(e[r?1:0],"--"),o.login.username=t.getValueOrDefault(e[r?2:1]),o.login.password=t.getValueOrDefault(e[r?3:2]),5===e.length)i=!1,o.notes=t.getValueOrDefault(e[4]),o.login.uris=t.makeUriArray(e[3]);else{var a=t.getValueOrDefault(e[r?9:8],"(None)"),s="(None)"!==a?a.split("\\").join("/"):null;null!=s&&(s=a.split(" > ").join("/"),s=a.split(">").join("/")),t.processFolder(n,s),o.notes=t.getValueOrDefault(e[r?5:3]),o.login.uris=t.makeUriArray(e[4])}t.convertToNoteIfNeeded(o),t.cleanupCipher(o),n.ciphers.push(o)}})),i&&this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordAgentCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(127),c=n(39),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||null==r.items)return n.success=!1,Promise.resolve(n);var i=new Map;r.folders.forEach((function(e){i.set(e.id,e.name)}));var o=new Map;return i.forEach((function(e,t){o.set(t,n.folders.length);var r=new l.FolderView;r.name=e,n.folders.push(r)})),r.items.forEach((function(e){var r=t.initLoginCipher();if(r.name=t.getValueOrDefault(e.name,"--"),r.login.uris=t.makeUriArray(e.login_url),null!=e.folder&&o.has(e.folder)&&n.folderRelationships.push([n.ciphers.length,o.get(e.folder)]),null!=e.identifiers){for(var i in t.isNullOrWhitespace(e.identifiers.notes)||(r.notes=e.identifiers.notes.split("\\r\\n").join("\n").split("\\n").join("\n")),"CreditCard"===e.type&&(r.card=new s.CardView,r.type=c.CipherType.Card),e.identifiers)if(e.identifiers.hasOwnProperty(i)){var a=e.identifiers[i],l=null!=a?a.toString():null;if(!t.isNullOrWhitespace(l)&&"notes"!==i&&"ignoreItemInSecurityScore"!==i)if("custom_fields"!==i){if(r.type===c.CipherType.Card){if("cardNumber"===i){r.card.number=l,r.card.brand=t.getCardBrand(l);continue}if("nameOnCard"===i){r.card.cardholderName=l;continue}if("security_code"===i){r.card.code=l;continue}if("expires"===i){try{var p=new Date(l);r.card.expYear=p.getFullYear().toString(),r.card.expMonth=(p.getMonth()+1).toString()}catch(u){}continue}if("cardType"===i)continue}else{if(("username"===i||"email"===i)&&t.isNullOrWhitespace(r.login.username)){r.login.username=l;continue}if("password"===i){r.login.password=l;continue}if("totp"===i){r.login.totp=l;continue}if((null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(i)>-1){r.login.uris=t.makeUriArray(l);continue}}t.processKvp(r,i,l)}else a.forEach((function(e){t.processKvp(r,e.name,e.value)}))}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordBossJsonImporter=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelectorAll("PasswordManager > record");return Array.from(i).forEach((function(e){var r=t.querySelectorDirectChild(e,"Category"),i=null==r||t.isNullOrWhitespace(r.textContent)||"Unfiled"===r.textContent?null:r.textContent;t.processFolder(n,i);var o=t.querySelectorDirectChild(e,"Account-Name"),a=t.querySelectorDirectChild(e,"User-Id"),s=t.querySelectorDirectChild(e,"Password"),l=t.querySelectorDirectChild(e,"URL"),c=t.querySelectorDirectChild(e,"Notes"),p=t.initLoginCipher();p.name=null!=o?t.getValueOrDefault(o.textContent,"--"):"--",p.notes=null!=c?t.getValueOrDefault(c.textContent):"",p.login.username=null!=a?t.getValueOrDefault(a.textContent):null,p.login.password=null!=s?t.getValueOrDefault(s.textContent):null,p.login.uris=null!=l?t.makeUriArray(l.textContent):null;for(var u=[],d=1;d<=10;d++)u.push("Attribute-"+d);t.querySelectorAllDirectChild(e,u.join(",")).forEach((function(e){t.isNullOrWhitespace(e.textContent)||"null"===e.textContent||t.processKvp(p,e.tagName,e.textContent)})),t.cleanupCipher(p),n.ciphers.push(p)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordDragonXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelector("passwordsafe");if(null==i)return n.errorMessage="Missing `passwordsafe` node.",n.success=!1,Promise.resolve(n);var o=i.getAttribute("delimiter"),s=r.querySelectorAll("passwordsafe > entry");return Array.from(s).forEach((function(e){var r=t.querySelectorDirectChild(e,"group"),i=null==r||t.isNullOrWhitespace(r.textContent)?null:r.textContent.split(".").join("/");t.processFolder(n,i);var a=t.querySelectorDirectChild(e,"title"),s=t.querySelectorDirectChild(e,"username"),l=t.querySelectorDirectChild(e,"email"),c=t.querySelectorDirectChild(e,"password"),p=t.querySelectorDirectChild(e,"url"),u=t.querySelectorDirectChild(e,"notes"),d=t.initLoginCipher();d.name=null!=a?t.getValueOrDefault(a.textContent,"--"):"--",d.notes=null!=u?t.getValueOrDefault(u.textContent,"").split(o).join("\n"):null,d.login.username=null!=s?t.getValueOrDefault(s.textContent):null,d.login.password=null!=c?t.getValueOrDefault(c.textContent):null,d.login.uris=null!=p?t.makeUriArray(p.textContent):null,t.isNullOrWhitespace(d.login.username)&&null!=l?d.login.username=t.getValueOrDefault(l.textContent):null==l||t.isNullOrWhitespace(l.textContent)||(d.notes=t.isNullOrWhitespace(d.notes)?"Email: "+l.textContent:d.notes+"\nEmail: "+l.textContent),t.cleanupCipher(d),n.ciphers.push(d)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordSafeXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<1)){e.length>5&&t.processFolder(n,e[5]);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),e.length>4&&(r.notes=t.getValueOrDefault(e[4],"").split("¬").join("\n")),e.length>2&&(r.login.username=t.getValueOrDefault(e[2])),e.length>3&&(r.login.password=t.getValueOrDefault(e[3])),e.length>1&&(r.login.uris=t.makeUriArray(e[1])),t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PasswordWalletTxtImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(39),s=n(26),l=n(88),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new s.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if("true"!==e.trash){var r=t.initLoginCipher();if(r.name=t.getValueOrDefault(e.name),r.notes=t.getValueOrDefault(e.notes),"LoginItem"===e.type)r.login.uris=t.makeUriArray(e.website),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.username);else if("CreditCardItem"===e.type){r.type=a.CipherType.Card,r.card=new l.CardView,r.card.cardholderName=t.getValueOrDefault(e.cardholder),r.card.number=t.getValueOrDefault(e.number),r.card.brand=t.getCardBrand(r.card.number),r.card.code=t.getValueOrDefault(e.verification);try{var i=t.getValueOrDefault(e.expiryMonth);if(null!=i){var o=parseInt(i,null);null!=o&&o>=1&&o<=12&&(r.card.expMonth=o.toString())}}catch(d){}try{var s=t.getValueOrDefault(e.expiryYear);if(null!=s){var c=parseInt(s,null);null!=c&&(r.card.expYear=c.toString())}}catch(m){}var p=t.getValueOrDefault(e.pin);null!=p&&t.processKvp(r,"PIN",p);var u=t.getValueOrDefault(e.zipCode);null!=u&&t.processKvp(r,"Zip Code",u)}t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.RememBearCsvImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);if(null==r)return n.success=!1,Promise.resolve(n);var i=1;return r.forEach((function(e){var o=!t.isNullOrWhitespace(e.Folder)&&e.Folder.startsWith("/")?e.Folder.replace("/",""):e.Folder,a=t.isNullOrWhitespace(o)?null:o;t.processFolder(n,a);var s=t.initLoginCipher();if(s.notes=t.getValueOrDefault(e.Note),s.name=t.getValueOrDefault(e.Name,"--"),s.login.username=t.getValueOrDefault(e.Login),s.login.password=t.getValueOrDefault(e.Pwd),s.login.uris=t.makeUriArray(e.Url),!t.isNullOrWhitespace(e.Rf_fields)){var l=[e.Rf_fields];null!=e.__parsed_extra&&e.__parsed_extra.length>0&&(l=l.concat(e.__parsed_extra)),l.forEach((function(e){var n=e.split(":");if(!(n.length<3)){var r="-no-name-"===n[0]?null:n[0],i=4===n.length&&"rck"===n[2]?n[1]:n[2];t.processKvp(s,r,i)}}))}t.convertToNoteIfNeeded(s),t.cleanupCipher(s),i===r.length&&"--"===s.name&&t.isNullOrWhitespace(s.login.password)||(n.ciphers.push(s),i++)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.RoboFormCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(127),l=n(94),c=n(39),p=n(106),u=n(1022),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);if(null==r.querySelector("database"))return n.errorMessage="Missing `database` node.",n.success=!1,Promise.resolve(n);var i=new Map;return Array.from(r.querySelectorAll("database > label")).forEach((function(e){var r=e.getAttribute("name"),o=e.getAttribute("id");if(!t.isNullOrWhitespace(r)&&!t.isNullOrWhitespace(o)){i.set(o,n.folders.length);var a=new s.FolderView;a.name=r,n.folders.push(a)}})),Array.from(r.querySelectorAll("database > card")).forEach((function(e){if("true"!==e.getAttribute("template")&&"true"!==e.getAttribute("deleted")){var r=t.querySelectorDirectChild(e,"label_id");if(null!=r){var o=r.textContent;!t.isNullOrWhitespace(o)&&i.has(o)&&n.folderRelationships.push([n.ciphers.length,i.get(o)])}var a=t.initLoginCipher();a.name=t.getValueOrDefault(e.getAttribute("title"),"--"),"true"===e.getAttribute("star")&&(a.favorite=!0),"note"===e.getAttribute("type")?(a.type=c.CipherType.SecureNote,a.secureNote=new l.SecureNoteView,a.secureNote.type=p.SecureNoteType.Generic):Array.from(t.querySelectorAllDirectChild(e,"field")).forEach((function(e){var n=e.textContent;if(!t.isNullOrWhitespace(n)){var r=e.getAttribute("name"),i=t.getValueOrDefault(e.getAttribute("type"),"").toLowerCase();"login"===i?a.login.username=n:"password"===i||"secret"===i?t.processKvp(a,r,n,u.FieldType.Hidden):"one_time_password"===i?a.login.totp=n:"notes"===i?a.notes+=n+"\n":"weblogin"===i||"website"===i?a.login.uris=t.makeUriArray(n):t.processKvp(a,r,n)}})),Array.from(t.querySelectorAllDirectChild(e,"notes")).forEach((function(e){a.notes+=e.textContent+"\n"})),t.setPassword(a),t.cleanupCipher(a),n.ciphers.push(a)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t.prototype.setPassword=function(e){var t=e.fields.filter((function(e){return e.type===u.FieldType.Hidden}));if(t.length){for(var n,r=0,i=t;r<i.length;r++){var o=i[r];if(this.passwordFieldNames.includes(o.name.toLowerCase())){n=o,e.fields=e.fields.filter((function(e){return e!==n}));break}}n||(n=t[0]),e.login.password=n.value}},t}(o.BaseImporter);t.SafeInCloudXmlImporter=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(39);t.CipherType=r.CipherType;var i=n(280);t.DeviceType=i.DeviceType;var o=n(277);t.EncryptionType=o.EncryptionType;var a=n(118);t.FieldType=a.FieldType;var s=n(710);t.LogLevelType=s.LogLevelType;var l=n(106);t.SecureNoteType=l.SecureNoteType;var c=n(113);t.TwoFactorProviderType=c.TwoFactorProviderType;var p=n(259);t.UriMatchType=p.UriMatchType},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(t.nameFromUrl(e.url),"--"),r.notes=t.getValueOrDefault(e.notes),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.url),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.SaferPassCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.Title),r.notes=t.getValueOrDefault(e.Comment),r.login.uris=t.makeUriArray(e.Url),r.login.password=t.getValueOrDefault(e.Password),r.login.username=t.getValueOrDefault(e.Username),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.SecureSafeCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<3)){t.processFolder(n,t.getValueOrDefault(e[e.length-1]));var r=t.initLoginCipher();r.notes=t.getValueOrDefault(e[e.length-2],""),r.name=t.getValueOrDefault(e[1],"--"),"Web Logins"===e[0]||"Servers"===e[0]||"Email Accounts"===e[0]?(r.login.username=t.getValueOrDefault(e[2]),r.login.password=t.getValueOrDefault(e[3]),r.login.uris=t.makeUriArray(e[4]),t.parseFieldsToNotes(r,5,e)):t.parseFieldsToNotes(r,2,e),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.parseFieldsToNotes=function(e,t,n){for(var r=t;r<n.length-3;r++)this.isNullOrWhitespace(n[r])||(e.notes+=n[r]+"\n")},t}(o.BaseImporter);t.SplashIdCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelectorAll("root > Database > Logins > Login");return Array.from(i).forEach((function(e){var i=e.getAttribute("ID");if(!t.isNullOrWhitespace(i)){var o=e.getAttribute("Name"),a=e.getAttribute("Password"),s=null,l=null,c=null,p=null,u=null,d=r.querySelector('root > Database > Accounts > Account > LoginLinks > Login[SourceLoginID="'+i+'"]');if(null!=d){var m=d.parentElement.parentElement;null!=m&&(s=m.getAttribute("Name"),l=m.getAttribute("Link"),p=m.getAttribute("ParentID"),c=m.getAttribute("Comments"),t.isNullOrWhitespace(c)||(c=c.split("/n").join("\n")))}t.isNullOrWhitespace(p)||(u=t.buildGroupText(r,p,""),t.processFolder(n,u));var h=t.initLoginCipher();h.name=t.getValueOrDefault(s,"--"),h.notes=t.getValueOrDefault(c),h.login.username=t.getValueOrDefault(o),h.login.password=t.getValueOrDefault(a),h.login.uris=t.makeUriArray(l),t.cleanupCipher(h),n.ciphers.push(h)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t.prototype.buildGroupText=function(e,t,n){var r=e.querySelector('root > Database > Groups > Group[ID="'+t+'"]');return null==r?n:(this.isNullOrWhitespace(n)||(n="/"+n),n=r.getAttribute("Name")+n,this.buildGroupText(e,r.getAttribute("ParentID"),n))},t}(o.BaseImporter);t.StickyPasswordXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=n(88),l=n(94),c=n(39),p=n(106),u=["kind","autologin","favorite","hexcolor","protectedwithpassword","subdomainonly","type","tk_export_version","note","title","document_content"],d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();if(r.favorite="true"===t.getValueOrDefault(e.favorite,"").toLowerCase(),r.name=t.getValueOrDefault(e.name,"--"),r.notes=t.getValueOrDefault(e.memo,""),r.login.username=t.getValueOrDefault(e.login),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.url),"login"!==e.kind&&(r.name=t.getValueOrDefault(e.title,"--"),r.notes=t.getValueOrDefault(e.note,"")),"cc"===e.kind){if(r.type=c.CipherType.Card,r.card=new s.CardView,r.card.cardholderName=t.getValueOrDefault(e.cardholder),r.card.number=t.getValueOrDefault(e.number),r.card.brand=t.getCardBrand(r.card.number),!t.isNullOrWhitespace(e.expiryDate))try{var i=new Date(e.expiryDate);r.card.expYear=i.getFullYear().toString(),r.card.expMonth=(i.getMonth()+1).toString()}catch(a){}}else if("login"!==e.kind)for(var o in r.type=c.CipherType.SecureNote,r.secureNote=new l.SecureNoteView,r.secureNote.type=p.SecureNoteType.Generic,t.isNullOrWhitespace(r.notes)||(r.notes=t.getValueOrDefault(e.document_content,"")),e)e.hasOwnProperty(o)&&u.indexOf(o.toLowerCase())<0&&!t.isNullOrWhitespace(e[o])&&t.processKvp(r,o,e[o]);t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.TrueKeyCsvImporter=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(5===e.length){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),r.notes=t.getValueOrDefault(e[4]),r.login.username=t.getValueOrDefault(e[1]),r.login.password=t.getValueOrDefault(e[2]),r.login.uris=t.makeUriArray(e[3]),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.UpmCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.Name,"--"),r.login.username=t.getValueOrDefault(e["User name"]),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e.URL),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.YotiCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(25),a=n(26),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(e["Password Name"])||!t.isNullOrWhitespace(e["Secret Name"])){t.processFolder(n,t.getValueOrDefault(e.ChamberName));var r=t.initLoginCipher();r.favorite="1"===t.getValueOrDefault(e.Favorite,"0"),r.notes=t.getValueOrDefault(e.Notes),r.name=t.getValueOrDefault(e["Password Name"],t.getValueOrDefault(e["Secret Name"],"--")),r.login.uris=t.makeUriArray(t.getValueOrDefault(e["Password URL"],t.getValueOrDefault(e["Secret URL"]))),t.parseData(r,e.SecretData),t.parseData(r,e.CustomData),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.parseData=function(e,t){var n=this;this.isNullOrWhitespace(t)||this.splitNewLine(t).forEach((function(t){var r=t.indexOf(":");if(!(r<0)){var i=t.substring(0,r),o=t.length>r?t.substring(r+1):null;if(!n.isNullOrWhitespace(i)&&!n.isNullOrWhitespace(o)&&"SecretType"!==i){var a=i.toLowerCase();null==e.login.username&&n.usernameFieldNames.indexOf(a)>-1?e.login.username=o:null==e.login.password&&n.passwordFieldNames.indexOf(a)>-1?e.login.password=o:n.processKvp(e,i,o)}}}))},t}(o.BaseImporter);t.ZohoVaultCsvImporter=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(46),a=n(1102),s=n(726),l=n(1043),c=function(){function e(e,t,n,r,i,o,a){this.userService=e,this.syncService=t,this.appIdService=n,this.apiService=r,this.vaultTimeoutService=i,this.logoutCallback=o,this.logService=a,this.connected=!1,this.inited=!1,this.inactive=!1,this.reconnectTimer=null}return e.prototype.init=function(e){return r(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){switch(n.label){case 0:return this.inited=!1,this.url="https://notifications.bitwarden.com",null!=e.notificationsUrl?this.url=e.notificationsUrl:null!=e.baseUrl&&(this.url=e.baseUrl+"/notifications"),"https://-"===this.url?[2]:null==this.signalrConnection?[3,2]:(this.signalrConnection.off("ReceiveMessage"),this.signalrConnection.off("Heartbeat"),[4,this.signalrConnection.stop()]);case 1:n.sent(),this.connected=!1,this.signalrConnection=null,n.label=2;case 2:return this.signalrConnection=(new o.HubConnectionBuilder).withUrl(this.url+"/hub",{accessTokenFactory:function(){return t.apiService.getActiveBearerToken()},skipNegotiation:!0,transport:o.HttpTransportType.WebSockets}).withHubProtocol(new a.MessagePackHubProtocol).build(),this.signalrConnection.on("ReceiveMessage",(function(e){return t.processNotification(new l.NotificationResponse(e))})),this.signalrConnection.on("Heartbeat",(function(e){})),this.signalrConnection.onclose((function(){t.connected=!1,t.reconnect(!0)})),this.inited=!0,[4,this.isAuthedAndUnlocked()];case 3:return n.sent()?[4,this.reconnect(!1)]:[3,5];case 4:n.sent(),n.label=5;case 5:return[2]}}))}))},e.prototype.updateConnection=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(!this.inited)return[2];n.label=1;case 1:return n.trys.push([1,7,,8]),[4,this.isAuthedAndUnlocked()];case 2:return n.sent()?[4,this.reconnect(e)]:[3,4];case 3:return n.sent(),[3,6];case 4:return[4,this.signalrConnection.stop()];case 5:n.sent(),n.label=6;case 6:return[3,8];case 7:return t=n.sent(),this.logService.error(t.toString()),[3,8];case 8:return[2]}}))}))},e.prototype.reconnectFromActivity=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.inactive=!1,!this.inited||this.connected?[3,2]:[4,this.reconnect(!0)];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.disconnectFromInactivity=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.inactive=!0,this.inited&&this.connected?[4,this.signalrConnection.stop()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.processNotification=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,this.appIdService.getAppId()];case 1:return t=i.sent(),null==e||e.contextId===t?[2]:[4,this.userService.isAuthenticated()];case 2:return n=i.sent(),r=e.payload.userId||e.payload.UserId,[4,this.userService.getUserId()];case 3:if(o=i.sent(),n&&null!=r&&r!==o)return[2];switch(e.type){case s.NotificationType.SyncCipherCreate:case s.NotificationType.SyncCipherUpdate:return[3,4];case s.NotificationType.SyncCipherDelete:case s.NotificationType.SyncLoginDelete:return[3,6];case s.NotificationType.SyncFolderCreate:case s.NotificationType.SyncFolderUpdate:return[3,8];case s.NotificationType.SyncFolderDelete:return[3,10];case s.NotificationType.SyncVault:case s.NotificationType.SyncCiphers:case s.NotificationType.SyncSettings:return[3,12];case s.NotificationType.SyncOrgKeys:return[3,15];case s.NotificationType.LogOut:return[3,20];case s.NotificationType.SyncSendCreate:case s.NotificationType.SyncSendUpdate:return[3,21];case s.NotificationType.SyncSendDelete:return[3,23]}return[3,25];case 4:return[4,this.syncService.syncUpsertCipher(e.payload,e.type===s.NotificationType.SyncCipherUpdate)];case 5:return i.sent(),[3,26];case 6:return[4,this.syncService.syncDeleteCipher(e.payload)];case 7:return i.sent(),[3,26];case 8:return[4,this.syncService.syncUpsertFolder(e.payload,e.type===s.NotificationType.SyncFolderUpdate)];case 9:return i.sent(),[3,26];case 10:return[4,this.syncService.syncDeleteFolder(e.payload)];case 11:return i.sent(),[3,26];case 12:return n?[4,this.syncService.fullSync(!1)]:[3,14];case 13:i.sent(),i.label=14;case 14:return[3,26];case 15:return n?[4,this.apiService.refreshIdentityToken()]:[3,19];case 16:return i.sent(),[4,this.syncService.fullSync(!0)];case 17:return i.sent(),[4,this.signalrConnection.stop()];case 18:i.sent(),i.label=19;case 19:return[3,26];case 20:return n&&this.logoutCallback(),[3,26];case 21:return[4,this.syncService.syncUpsertSend(e.payload,e.type===s.NotificationType.SyncSendUpdate)];case 22:return i.sent(),[3,26];case 23:return[4,this.syncService.syncDeleteSend(e.payload)];case 24:i.sent(),i.label=25;case 25:return[3,26];case 26:return[2]}}))}))},e.prototype.reconnect=function(e){return r(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){switch(n.label){case 0:return null!=this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.connected||!this.inited||this.inactive?[2]:[4,this.isAuthedAndUnlocked()];case 1:if(!n.sent())return[2];n.label=2;case 2:return n.trys.push([2,6,,7]),[4,this.signalrConnection.start()];case 3:return n.sent(),this.connected=!0,e?[4,this.syncService.fullSync(!1)]:[3,5];case 4:n.sent(),n.label=5;case 5:return[3,7];case 6:return n.sent(),[3,7];case 7:return this.connected||(this.reconnectTimer=setTimeout((function(){return t.reconnect(e)}),this.random(12e4,3e5))),[2]}}))}))},e.prototype.isAuthedAndUnlocked=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return e.sent()?[4,this.vaultTimeoutService.isLocked()]:[3,3];case 2:return[2,!e.sent()];case 3:return[2,!1]}}))}))},e.prototype.random=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e},e}();t.NotificationsService=c},,,function(e,t){},,function(e,t){},,,,,,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(23),a=n(726),s=function(e){function t(t){var n=e.call(this,t)||this;n.contextId=n.getResponseProperty("ContextId"),n.type=n.getResponseProperty("Type");var r=n.getResponseProperty("Payload");switch(n.type){case a.NotificationType.SyncCipherCreate:case a.NotificationType.SyncCipherDelete:case a.NotificationType.SyncCipherUpdate:case a.NotificationType.SyncLoginDelete:n.payload=new l(r);break;case a.NotificationType.SyncFolderCreate:case a.NotificationType.SyncFolderDelete:case a.NotificationType.SyncFolderUpdate:n.payload=new c(r);break;case a.NotificationType.SyncVault:case a.NotificationType.SyncCiphers:case a.NotificationType.SyncOrgKeys:case a.NotificationType.SyncSettings:case a.NotificationType.LogOut:n.payload=new p(r);break;case a.NotificationType.SyncSendCreate:case a.NotificationType.SyncSendUpdate:case a.NotificationType.SyncSendDelete:n.payload=new u(r)}return n}return i(t,e),t}(o.BaseResponse);t.NotificationResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.userId=n.getResponseProperty("UserId"),n.organizationId=n.getResponseProperty("OrganizationId"),n.collectionIds=n.getResponseProperty("CollectionIds"),n.revisionDate=new Date(n.getResponseProperty("RevisionDate")),n}return i(t,e),t}(o.BaseResponse);t.SyncCipherNotification=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.userId=n.getResponseProperty("UserId"),n.revisionDate=new Date(n.getResponseProperty("RevisionDate")),n}return i(t,e),t}(o.BaseResponse);t.SyncFolderNotification=c;var p=function(e){function t(t){var n=e.call(this,t)||this;return n.userId=n.getResponseProperty("UserId"),n.date=new Date(n.getResponseProperty("Date")),n}return i(t,e),t}(o.BaseResponse);t.UserNotification=p;var u=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.userId=n.getResponseProperty("UserId"),n.revisionDate=new Date(n.getResponseProperty("RevisionDate")),n}return i(t,e),t}(o.BaseResponse);t.SyncSendNotification=u},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1045),a=n(462),s=n(141),l="policies_",c=function(){function e(e,t){this.userService=e,this.storageService=t}return e.prototype.clearCache=function(){this.policyCache=null},e.prototype.getAll=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return null!=this.policyCache?[3,3]:[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(l+t)];case 2:for(o in n=i.sent(),r=[],n)n.hasOwnProperty(o)&&r.push(new a.Policy(n[o]));this.policyCache=r,i.label=3;case 3:return null!=e?[2,this.policyCache.filter((function(t){return t.type===e}))]:[2,this.policyCache]}}))}))},e.prototype.replace=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.getUserId()];case 1:return t=n.sent(),[4,this.storageService.save(l+t,e)];case 2:return n.sent(),this.policyCache=null,[2]}}))}))},e.prototype.clear=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.remove(l+e)];case 1:return t.sent(),this.policyCache=null,[2]}}))}))},e.prototype.getMasterPasswordPolicyOptions=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=null,null!=e?[3,2]:[4,this.getAll(s.PolicyType.MasterPassword)];case 1:return e=n.sent(),[3,3];case 2:e=e.filter((function(e){return e.type===s.PolicyType.MasterPassword})),n.label=3;case 3:return null==e||0===e.length||e.forEach((function(e){e.enabled&&null!=e.data&&(null==t&&(t=new o.MasterPasswordPolicyOptions),null!=e.data.minComplexity&&e.data.minComplexity>t.minComplexity&&(t.minComplexity=e.data.minComplexity),null!=e.data.minLength&&e.data.minLength>t.minLength&&(t.minLength=e.data.minLength),e.data.requireUpper&&(t.requireUpper=!0),e.data.requireLower&&(t.requireLower=!0),e.data.requireNumbers&&(t.requireNumbers=!0),e.data.requireSpecial&&(t.requireSpecial=!0))})),[2,t]}}))}))},e.prototype.evaluateMasterPassword=function(e,t,n){return null==n||!(n.minComplexity>0&&n.minComplexity>e)&&(!(n.minLength>0&&n.minLength>t.length)&&((!n.requireUpper||t.toLocaleLowerCase()!==t)&&((!n.requireLower||t.toLocaleUpperCase()!==t)&&(!(n.requireNumbers&&!/[0-9]/.test(t))&&!(n.requireSpecial&&!/[!@#$%\^&*]/g.test(t))))))},e}();t.PolicyService=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.minComplexity=0,t.minLength=0,t.requireUpper=!1,t.requireLower=!1,t.requireNumbers=!1,t.requireSpecial=!1,t}return i(t,e),t}(n(81).default);t.MasterPasswordPolicyOptions=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1047),a=n(39),s=n(118),l=n(259),c=function(){function e(e,t,n){this.cipherService=e,this.logService=t,this.i18nService=n,this.indexedEntityId=null,this.indexing=!1,this.index=null,this.searchableMinLength=2,-1!==["zh-CN","zh-TW"].indexOf(n.locale)&&(this.searchableMinLength=1)}return e.prototype.clearIndex=function(){this.indexedEntityId=null,this.index=null},e.prototype.isSearchable=function(e){return!(null==e||null==this.index&&e.length<this.searchableMinLength||null!=this.index&&e.length<this.searchableMinLength&&0!==e.indexOf(">"))},e.prototype.indexCiphers=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s=this;return i(this,(function(i){switch(i.label){case 0:return this.indexing?[2]:(this.logService.time("search indexing"),this.indexing=!0,this.indexedEntityId=e,this.index=null,(n=new o.Builder).ref("id"),n.field("shortid",{boost:100,extractor:function(e){return e.id.substr(0,8)}}),n.field("name",{boost:10}),n.field("subtitle",{boost:5,extractor:function(e){return null!=e.subTitle&&e.type===a.CipherType.Card?e.subTitle.replace(/\*/g,""):e.subTitle}}),n.field("notes"),n.field("login.username",{extractor:function(e){return e.type===a.CipherType.Login&&null!=e.login?e.login.username:null}}),n.field("login.uris",{boost:2,extractor:function(e){return s.uriExtractor(e)}}),n.field("fields",{extractor:function(e){return s.fieldExtractor(e,!1)}}),n.field("fields_joined",{extractor:function(e){return s.fieldExtractor(e,!0)}}),n.field("attachments",{extractor:function(e){return s.attachmentExtractor(e,!1)}}),n.field("attachments_joined",{extractor:function(e){return s.attachmentExtractor(e,!0)}}),n.field("organizationid",{extractor:function(e){return e.organizationId}}),(r=t)?[3,2]:[4,this.cipherService.getAllDecrypted()]);case 1:r=i.sent(),i.label=2;case 2:return(t=r).forEach((function(e){return n.add(e)})),this.index=n.build(),this.indexing=!1,this.logService.timeEnd("search indexing"),[2]}}))}))},e.prototype.searchCiphers=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),r(this,void 0,void 0,(function(){var r,a,s,l,c;return i(this,(function(i){switch(i.label){case 0:return r=[],null!=e&&(e=e.trim().toLowerCase()),""===e&&(e=null),null!=n?[3,2]:[4,this.cipherService.getAllDecrypted()];case 1:n=i.sent(),i.label=2;case 2:return null!=t&&Array.isArray(t)&&t.length>0?n=n.filter((function(e){return t.every((function(t){return null==t||t(e)}))})):null!=t&&(n=n.filter(t)),this.isSearchable(e)?this.indexing?[4,new Promise((function(e){return setTimeout(e,250)}))]:[3,5]:[2,n];case 3:return i.sent(),this.indexing?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,5];case 4:i.sent(),i.label=5;case 5:if(null==(a=this.getIndexForSearch()))return[2,this.searchCiphersBasic(n,e)];if(s=new Map,n.forEach((function(e){return s.set(e.id,e)})),l=null,null!=e&&e.length>1&&0===e.indexOf(">"))try{l=a.search(e.substr(1).trim())}catch(p){}else c=o.Query.wildcard.LEADING|o.Query.wildcard.TRAILING,l=a.query((function(t){o.tokenizer(e).forEach((function(e){var n=e.toString();t.term(n,{fields:["name"],wildcard:c}),t.term(n,{fields:["subtitle"],wildcard:c}),t.term(n,{fields:["login.uris"],wildcard:c}),t.term(n,{})}))}));return null!=l&&l.forEach((function(e){s.has(e.ref)&&r.push(s.get(e.ref))})),[2,r]}}))}))},e.prototype.searchCiphersBasic=function(e,t,n){return void 0===n&&(n=!1),t=t.trim().toLowerCase(),e.filter((function(e){return n===e.isDeleted&&(null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&e.id.startsWith(t))||(null!=e.subTitle&&e.subTitle.toLowerCase().indexOf(t)>-1||!!(e.login&&null!=e.login.uri&&e.login.uri.toLowerCase().indexOf(t)>-1))))}))},e.prototype.searchSends=function(e,t){return t=t.trim().toLocaleLowerCase(),e.filter((function(e){var n,r,i;return null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&(e.id.startsWith(t)||e.accessId.toLocaleLowerCase().startsWith(t)||null!=(null===(n=e.file)||void 0===n?void 0:n.id)&&e.file.id.startsWith(t)))||(null!=e.notes&&e.notes.toLowerCase().indexOf(t)>-1||(null!=(null===(r=e.text)||void 0===r?void 0:r.text)&&e.text.text.toLowerCase().indexOf(t)>-1||(null!=(null===(i=e.file)||void 0===i?void 0:i.fileName)&&e.file.fileName.toLowerCase().indexOf(t)>-1||void 0))))}))},e.prototype.getIndexForSearch=function(){return this.index},e.prototype.fieldExtractor=function(e,t){if(!e.hasFields)return null;var n=[];return e.fields.forEach((function(e){null!=e.name&&n.push(e.name),e.type===s.FieldType.Text&&null!=e.value&&n.push(e.value)})),0===(n=n.filter((function(e){return""!==e.trim()}))).length?null:t?n.join(" "):n},e.prototype.attachmentExtractor=function(e,t){if(!e.hasAttachments)return null;var n=[];return e.attachments.forEach((function(e){null!=e&&null!=e.fileName&&(t&&e.fileName.indexOf(".")>-1?n.push(e.fileName.substr(0,e.fileName.lastIndexOf("."))):n.push(e.fileName))})),0===(n=n.filter((function(e){return""!==e.trim()}))).length?null:t?n.join(" "):n},e.prototype.uriExtractor=function(e){if(e.type!==a.CipherType.Login||null==e.login||!e.login.hasUris)return null;var t=[];return e.login.uris.forEach((function(e){if(null!=e.uri&&""!==e.uri)if(null==e.hostname){var n=e.uri;if(e.match!==l.UriMatchType.RegularExpression){var r=n.indexOf("://");r>-1&&(n=n.substr(r+3));var i=n.search(/\?|&|#/);i>-1&&(n=n.substring(0,i))}t.push(n)}else t.push(e.hostname)})),t.length>0?t:null},e}();t.SearchService=c},,function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(704),a=n(1049),s=n(211),l=n(1050),c=n(509),p=n(510),u=n(160),d=n(30),m="sends_",h=function(){function t(e,t,n,r,i,o,a){this.cryptoService=e,this.userService=t,this.apiService=n,this.fileUploadService=r,this.storageService=i,this.i18nService=o,this.cryptoFunctionService=a}return t.prototype.clearCache=function(){this.decryptedSendCache=null},t.prototype.encrypt=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a,s,m,h,f,v,y,g,x,b,S;return i(this,(function(i){switch(i.label){case 0:return r=null,(a=new l.Send).id=e.id,a.type=e.type,a.disabled=e.disabled,a.hideEmail=e.hideEmail,a.maxAccessCount=e.maxAccessCount,null!=e.key?[3,3]:(s=e,[4,this.cryptoFunctionService.randomBytes(16)]);case 1:return s.key=i.sent(),m=e,[4,this.cryptoService.makeSendKey(e.key)];case 2:m.cryptoKey=i.sent(),i.label=3;case 3:return null==n?[3,5]:[4,this.cryptoFunctionService.pbkdf2(n,e.key,"sha256",1e5)];case 4:h=i.sent(),a.password=d.Utils.fromBufferToB64(h),i.label=5;case 5:return f=a,[4,this.cryptoService.encrypt(e.key,o)];case 6:return f.key=i.sent(),v=a,[4,this.cryptoService.encrypt(e.name,e.cryptoKey)];case 7:return v.name=i.sent(),y=a,[4,this.cryptoService.encrypt(e.notes,e.cryptoKey)];case 8:return y.notes=i.sent(),a.type!==u.SendType.Text?[3,10]:(a.text=new p.SendText,g=a.text,[4,this.cryptoService.encrypt(e.text.text,e.cryptoKey)]);case 9:return g.text=i.sent(),a.text.hidden=e.text.hidden,[3,14];case 10:return a.type!==u.SendType.File?[3,14]:(a.file=new c.SendFile,null==t?[3,14]:t instanceof ArrayBuffer?[4,this.encryptFileData(e.file.fileName,t,e.cryptoKey)]:[3,12]);case 11:return x=i.sent(),b=x[0],S=x[1],a.file.fileName=b,r=S,[3,14];case 12:return[4,this.parseFile(a,t,e.cryptoKey)];case 13:r=i.sent(),i.label=14;case 14:return[2,[a,r]]}}))}))},t.prototype.get=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getUserId()];case 1:return t=r.sent(),[4,this.storageService.get(m+t)];case 2:return null!=(n=r.sent())&&n.hasOwnProperty(e)?[2,new l.Send(n[e])]:[2,null]}}))}))},t.prototype.getAll=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return e=i.sent(),[4,this.storageService.get(m+e)];case 2:for(r in t=i.sent(),n=[],t)t.hasOwnProperty(r)&&n.push(new l.Send(t[r]));return[2,n]}}))}))},t.prototype.getAllDecrypted=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return null!=this.decryptedSendCache?[2,this.decryptedSendCache]:[4,this.cryptoService.hasKey()];case 1:if(!n.sent())throw new Error("No key.");return e=[],t=[],[4,this.getAll()];case 2:return n.sent().forEach((function(n){t.push(n.decrypt().then((function(t){return e.push(t)})))})),[4,Promise.all(t)];case 3:return n.sent(),e.sort(d.Utils.getSortFunction(this.i18nService,"name")),this.decryptedSendCache=e,[2,this.decryptedSendCache]}}))}))},t.prototype.saveWithServer=function(e){var t;return r(this,void 0,void 0,(function(){var n,r,l,c,p,d;return i(this,(function(i){switch(i.label){case 0:return n=new a.SendRequest(e[0],null===(t=e[1])||void 0===t?void 0:t.buffer.byteLength),null!=e[0].id?[3,10]:e[0].type!==u.SendType.Text?[3,2]:[4,this.apiService.postSend(n)];case 1:return r=i.sent(),[3,9];case 2:return i.trys.push([2,5,,9]),[4,this.apiService.postFileTypeSend(n)];case 3:return l=i.sent(),r=l.sendResponse,[4,this.fileUploadService.uploadSendFile(l,e[0].file.fileName,e[1])];case 4:return i.sent(),[3,9];case 5:return(c=i.sent())instanceof s.ErrorResponse&&404===c.statusCode?[4,this.legacyServerSendFileUpload(e,n)]:[3,7];case 6:return r=i.sent(),[3,8];case 7:throw c instanceof s.ErrorResponse?new Error(c.getSingleMessage()):c;case 8:return[3,9];case 9:return e[0].id=r.id,e[0].accessId=r.accessId,[3,12];case 10:return[4,this.apiService.putSend(e[0].id,n)];case 11:r=i.sent(),i.label=12;case 12:return[4,this.userService.getUserId()];case 13:return p=i.sent(),d=new o.SendData(r,p),[4,this.upsert(d)];case 14:return i.sent(),[2]}}))}))},t.prototype.legacyServerSendFileUpload=function(t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:r=new FormData;try{o=new Blob([t[1].buffer],{type:"application/octet-stream"}),r.append("model",JSON.stringify(n)),r.append("data",o,t[0].file.fileName.encryptedString)}catch(a){if(!d.Utils.isNode||d.Utils.isBrowser)throw a;r.append("model",JSON.stringify(n)),r.append("data",e.from(t[1].buffer),{filepath:t[0].file.fileName.encryptedString,contentType:"application/octet-stream"})}return[4,this.apiService.postSendFileLegacy(r)];case 1:return[2,i.sent()]}}))}))},t.prototype.upsert=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(m+t)];case 2:return null==(n=i.sent())&&(n={}),e instanceof o.SendData?n[(r=e).id]=r:e.forEach((function(e){n[e.id]=e})),[4,this.storageService.save(m+t,n)];case 3:return i.sent(),this.decryptedSendCache=null,[2]}}))}))},t.prototype.replace=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.userService.getUserId()];case 1:return t=n.sent(),[4,this.storageService.save(m+t,e)];case 2:return n.sent(),this.decryptedSendCache=null,[2]}}))}))},t.prototype.clear=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.remove(m+e)];case 1:return t.sent(),this.decryptedSendCache=null,[2]}}))}))},t.prototype.delete=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.userService.getUserId()];case 1:return t=r.sent(),[4,this.storageService.get(m+t)];case 2:if(null==(n=r.sent()))return[2];if("string"==typeof e){if(null==n[e])return[2];delete n[e]}else e.forEach((function(e){delete n[e]}));return[4,this.storageService.save(m+t,n)];case 3:return r.sent(),this.decryptedSendCache=null,[2]}}))}))},t.prototype.deleteWithServer=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.deleteSend(e)];case 1:return t.sent(),[4,this.delete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.removePasswordWithServer=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.apiService.putSendRemovePassword(e)];case 1:return t=i.sent(),[4,this.userService.getUserId()];case 2:return n=i.sent(),r=new o.SendData(t,n),[4,this.upsert(r)];case 3:return i.sent(),[2]}}))}))},t.prototype.parseFile=function(e,t,n){var o=this;return new Promise((function(a,s){var l=new FileReader;l.readAsArrayBuffer(t),l.onload=function(l){return r(o,void 0,void 0,(function(){var r,o,c,p;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.encryptFileData(t.name,l.target.result,n)];case 1:return r=i.sent(),o=r[0],c=r[1],e.file.fileName=o,a(c),[3,3];case 2:return p=i.sent(),s(p),[3,3];case 3:return[2]}}))}))},l.onerror=function(e){s("Error reading file.")}}))},t.prototype.encryptFileData=function(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.encrypt(e,n)];case 1:return r=i.sent(),[4,this.cryptoService.encryptToBytes(t,n)];case 2:return o=i.sent(),[2,[r,o]]}}))}))},t}();t.SendService=h}).call(this,n(95).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(160),i=n(503),o=n(504),a=function(e,t){switch(this.type=e.type,this.fileLength=t,this.name=e.name?e.name.encryptedString:null,this.notes=e.notes?e.notes.encryptedString:null,this.maxAccessCount=e.maxAccessCount,this.expirationDate=null!=e.expirationDate?e.expirationDate.toISOString():null,this.deletionDate=null!=e.deletionDate?e.deletionDate.toISOString():null,this.key=null!=e.key?e.key.encryptedString:null,this.password=e.password,this.disabled=e.disabled,this.hideEmail=e.hideEmail,this.type){case r.SendType.Text:this.text=new o.SendTextApi,this.text.text=null!=e.text.text?e.text.text.encryptedString:null,this.text.hidden=e.text.hidden;break;case r.SendType.File:this.file=new i.SendFileApi,this.file.fileName=null!=e.file.fileName?e.file.fileName.encryptedString:null}};t.SendRequest=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(160),l=n(30),c=n(632),p=n(81),u=n(509),d=n(510),m=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;if(null==t)return r;switch(r.buildDomainModel(r,t,{id:null,accessId:null,userId:null,name:null,notes:null,key:null},n,["id","accessId","userId"]),r.type=t.type,r.maxAccessCount=t.maxAccessCount,r.accessCount=t.accessCount,r.password=t.password,r.disabled=t.disabled,r.revisionDate=null!=t.revisionDate?new Date(t.revisionDate):null,r.deletionDate=null!=t.deletionDate?new Date(t.deletionDate):null,r.expirationDate=null!=t.expirationDate?new Date(t.expirationDate):null,r.hideEmail=t.hideEmail,r.type){case s.SendType.Text:r.text=new d.SendText(t.text,n);break;case s.SendType.File:r.file=new u.SendFile(t.file,n)}return r}return i(t,e),t.prototype.decrypt=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o,p;return a(this,(function(a){switch(a.label){case 0:if(e=new c.SendView(this),!(n=l.Utils.global.bitwardenContainerService))throw new Error("global bitwardenContainerService not initialized.");t=n.getCryptoService(),a.label=1;case 1:return a.trys.push([1,4,,5]),r=e,[4,t.decryptToBytes(this.key,null)];case 2:return r.key=a.sent(),i=e,[4,t.makeSendKey(e.key)];case 3:return i.cryptoKey=a.sent(),[3,5];case 4:return a.sent(),[3,5];case 5:return[4,this.decryptObj(e,{name:null,notes:null},null,e.cryptoKey)];case 6:switch(a.sent(),this.type){case s.SendType.File:return[3,7];case s.SendType.Text:return[3,9]}return[3,11];case 7:return o=e,[4,this.file.decrypt(e.cryptoKey)];case 8:return o.file=a.sent(),[3,12];case 9:return p=e,[4,this.text.decrypt(e.cryptoKey)];case 10:return p.text=a.sent(),[3,12];case 11:return[3,12];case 12:return[2,e]}}))}))},t}(p.default);t.Send=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1052),a=n(30),s=n(1063),l=function(){function e(e,t){this.win=e,this.platformUtilsService=t,this.crypto=void 0!==e.crypto?e.crypto:null,this.subtle=this.crypto&&void 0!==e.crypto.subtle?e.crypto.subtle:null,this.isIE=t.isIE();var n=e.navigator.userAgent;this.isOldSafari=t.isSafari()&&(n.indexOf(" Version/10.")>-1||n.indexOf(" Version/9.")>-1)}return e.prototype.pbkdf2=function(e,t,n,s){return r(this,void 0,void 0,(function(){var r,l,c,p,u,d,m,h,f;return i(this,(function(i){switch(i.label){case 0:return this.isIE||this.isOldSafari?(r="sha256"===n?32:64,l=this.toByteString(e),c=this.toByteString(t),p=o.pbkdf2(l,c,s,r,n),[2,a.Utils.fromByteStringToArray(p).buffer]):(u="sha256"===n?256:512,d=this.toBuf(e),m=this.toBuf(t),h={name:"PBKDF2",salt:m,iterations:s,hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("raw",d,{name:"PBKDF2"},!1,["deriveBits"])]);case 1:return f=i.sent(),[4,this.subtle.deriveBits(h,f,u)];case 2:return[2,i.sent()]}}))}))},e.prototype.hkdf=function(e,t,n,o,a){return r(this,void 0,void 0,(function(){var r,s,l,c;return i(this,(function(i){switch(i.label){case 0:return r=this.toBuf(t),s=this.toBuf(n),l={name:"HKDF",salt:r,info:s,hash:{name:this.toWebCryptoAlgorithm(a)}},[4,this.subtle.importKey("raw",e,{name:"HKDF"},!1,["deriveBits"])];case 1:return c=i.sent(),[4,this.subtle.deriveBits(l,c,8*o)];case 2:return[2,i.sent()]}}))}))},e.prototype.hkdfExpand=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a,s,l,c,p,u,d,m,h;return i(this,(function(i){switch(i.label){case 0:if(n>255*(r="sha256"===o?32:64))throw new Error("outputByteSize is too large.");if(new Uint8Array(e).length<r)throw new Error("prk is too small.");a=this.toBuf(t),s=new Uint8Array(a),l=0,c=new Uint8Array(0),p=Math.ceil(n/r),u=new Uint8Array(p*r),d=0,i.label=1;case 1:return d<p?((m=new Uint8Array(c.length+s.length+1)).set(c),m.set(s,c.length),m.set([d+1],m.length-1),h=Uint8Array.bind,[4,this.hmac(m.buffer,e,o)]):[3,4];case 2:if(c=new(h.apply(Uint8Array,[void 0,i.sent()])),u.set(c,l),(l+=c.length)>=n)return[3,4];i.label=3;case 3:return d++,[3,1];case 4:return[2,u.slice(0,n).buffer]}}))}))},e.prototype.hash=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.isIE&&"sha1"===t||"md5"===t?(n="md5"===t?o.md.md5.create():o.md.sha1.create(),r=this.toByteString(e),n.update(r,"raw"),[2,a.Utils.fromByteStringToArray(n.digest().data).buffer]):(s=this.toBuf(e),[4,this.subtle.digest({name:this.toWebCryptoAlgorithm(t)},s)]);case 1:return[2,i.sent()]}}))}))},e.prototype.hmac=function(e,t,n){return r(this,void 0,void 0,(function(){var r,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return this.isIE&&"sha512"===n?(r=o.hmac.create(),s=this.toByteString(t),l=this.toByteString(e),r.start(n,s),r.update(l,"raw"),[2,a.Utils.fromByteStringToArray(r.digest().data).buffer]):(c={name:"HMAC",hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("raw",t,c,!1,["sign"])]);case 1:return p=i.sent(),[4,this.subtle.sign(c,p,e)];case 2:return[2,i.sent()]}}))}))},e.prototype.compare=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return[4,this.randomBytes(32)];case 1:return n=i.sent(),r={name:"HMAC",hash:{name:"SHA-256"}},[4,this.subtle.importKey("raw",n,r,!1,["sign"])];case 2:return o=i.sent(),[4,this.subtle.sign(r,o,e)];case 3:return a=i.sent(),[4,this.subtle.sign(r,o,t)];case 4:if(s=i.sent(),a.byteLength!==s.byteLength)return[2,!1];for(l=new Uint8Array(a),c=new Uint8Array(s),p=0;p<c.length;p++)if(l[p]!==c[p])return[2,!1];return[2,!0]}}))}))},e.prototype.hmacFast=function(e,t,n){var r=o.hmac.create();r.start(n,t),r.update(e);var i=r.digest().getBytes();return Promise.resolve(i)},e.prototype.compareFast=function(e,t){return r(this,void 0,void 0,(function(){var n,r,a,s,l,c,p,u;return i(this,(function(i){switch(i.label){case 0:return[4,this.randomBytes(32)];case 1:for(n=i.sent(),r=new Uint32Array(n),a=o.util.createBuffer(),s=0;s<r.length;s++)a.putInt32(r[s]);return l=a.getBytes(),(c=o.hmac.create()).start("sha256",l),c.update(e),p=c.digest().getBytes(),c.start(null,null),c.update(t),u=c.digest().getBytes(),[2,p===u]}}))}))},e.prototype.aesEncrypt=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.subtle.importKey("raw",n,{name:"AES-CBC"},!1,["encrypt"])];case 1:return r=i.sent(),[4,this.subtle.encrypt({name:"AES-CBC",iv:t},r,e)];case 2:return[2,i.sent()]}}))}))},e.prototype.aesDecryptFastParameters=function(e,t,n,r){var i=new s.DecryptParameters;return null!=r.meta&&(i.encKey=r.meta.encKeyByteString,i.macKey=r.meta.macKeyByteString),null==i.encKey&&(i.encKey=o.util.decode64(r.encKeyB64)),i.data=o.util.decode64(e),i.iv=o.util.decode64(t),i.macData=i.iv+i.data,null==i.macKey&&null!=r.macKeyB64&&(i.macKey=o.util.decode64(r.macKeyB64)),null!=n&&(i.mac=o.util.decode64(n)),null==r.meta&&(r.meta={}),null==r.meta.encKeyByteString&&(r.meta.encKeyByteString=i.encKey),null!=i.macKey&&null==r.meta.macKeyByteString&&(r.meta.macKeyByteString=i.macKey),i},e.prototype.aesDecryptFast=function(e){var t=o.util.createBuffer(e.data),n=o.cipher.createDecipher("AES-CBC",e.encKey);n.start({iv:e.iv}),n.update(t),n.finish();var r=n.output.toString("utf8");return Promise.resolve(r)},e.prototype.aesDecrypt=function(e,t,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,this.subtle.importKey("raw",n,{name:"AES-CBC"},!1,["decrypt"])];case 1:return r=i.sent(),[4,this.subtle.decrypt({name:"AES-CBC",iv:t},r,e)];case 2:return[2,i.sent()]}}))}))},e.prototype.rsaEncrypt=function(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r={name:"RSA-OAEP",hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("spki",t,r,!1,["encrypt"])];case 1:return o=i.sent(),[4,this.subtle.encrypt(r,o,e)];case 2:return[2,i.sent()]}}))}))},e.prototype.rsaDecrypt=function(e,t,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return r={name:"RSA-OAEP",hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("pkcs8",t,r,!1,["decrypt"])];case 1:return o=i.sent(),[4,this.subtle.decrypt(r,o,e)];case 2:return[2,i.sent()]}}))}))},e.prototype.rsaExtractPublicKey=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return t={name:"RSA-OAEP",hash:{name:this.toWebCryptoAlgorithm("sha1")}},[4,this.subtle.importKey("pkcs8",e,t,!0,["decrypt"])];case 1:return n=i.sent(),[4,this.subtle.exportKey("jwk",n)];case 2:return r=i.sent(),o={kty:"RSA",e:r.e,n:r.n,alg:"RSA-OAEP",ext:!0},[4,this.subtle.importKey("jwk",o,t,!0,["encrypt"])];case 3:return a=i.sent(),[4,this.subtle.exportKey("spki",a)];case 4:return[2,i.sent()]}}))}))},e.prototype.rsaGenerateKeyPair=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return t={name:"RSA-OAEP",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:this.toWebCryptoAlgorithm("sha1")}},[4,this.subtle.generateKey(t,!0,["encrypt","decrypt"])];case 1:return n=i.sent(),[4,this.subtle.exportKey("spki",n.publicKey)];case 2:return r=i.sent(),[4,this.subtle.exportKey("pkcs8",n.privateKey)];case 3:return o=i.sent(),[2,[r,o]]}}))}))},e.prototype.randomBytes=function(e){var t=new Uint8Array(e);return this.crypto.getRandomValues(t),Promise.resolve(t.buffer)},e.prototype.toBuf=function(e){return"string"==typeof e?a.Utils.fromUtf8ToArray(e).buffer:e},e.prototype.toByteString=function(e){return"string"==typeof e?o.util.encodeUtf8(e):a.Utils.fromBufferToByteString(e)},e.prototype.toWebCryptoAlgorithm=function(e){if("md5"===e)throw new Error("MD5 is not supported in WebCrypto.");return"sha1"===e?"SHA-1":"sha256"===e?"SHA-256":"SHA-512"},e}();t.WebCryptoFunctionService=l},,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.DecryptParameters=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){};t.FileUploadService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(273),a=n(492),s=n(9),l=n(0),c=(n(72),n(8)),p=(n(112),n(41),n(58),n(19),n(40),n(18),n(71),n(48),n(3),n(525),n(36),n(5),n(43),n(80),n(281),n(38),n(61),n(103),n(7),n(93),n(70)),u=(n(248),n(0)),d=n(112),m=n(7),h=n(103),f=n(48),v=n(281),y=n(61),g=n(36),x=n(19),b=n(58),S=n(8),w=n(9),C=n(3),I=n(5),E=n(93),P=n(41),k=n(18),_=n(40),A=n(72),O=n(80),T=n(525),M=n(248),B=n(38),D=n(71),R=n(43),V=function(){function e(e,t,n,r,i,o,a,l,c,p,u,d,m,h,f,v,y,g,x,b,S,w,C,I,E){this.broadcasterService=e,this.userService=t,this.tokenService=n,this.folderService=r,this.settingsService=i,this.syncService=o,this.passwordGenerationService=a,this.cipherService=l,this.authService=c,this.router=p,this.toasterService=u,this.i18nService=d,this.platformUtilsService=m,this.ngZone=h,this.vaultTimeoutService=f,this.storageService=v,this.cryptoService=y,this.collectionService=g,this.sanitizer=x,this.searchService=b,this.notificationsService=S,this.routerService=w,this.stateService=C,this.eventService=I,this.policyService=E,this.toasterConfig=new s.ToasterConfig({showCloseButton:!0,mouseoverTimerStop:!0,animation:"flyRight",limit:5}),this.lastActivity=null,this.idleTimer=null,this.isIdle=!1}return e.prototype.ngOnInit=function(){var e=this;this.ngZone.runOutsideAngular((function(){window.onmousemove=function(){return e.recordActivity()},window.onmousedown=function(){return e.recordActivity()},window.ontouchstart=function(){return e.recordActivity()},window.onclick=function(){return e.recordActivity()},window.onscroll=function(){return e.recordActivity()},window.onkeypress=function(){return e.recordActivity()}})),this.broadcasterService.subscribe("AppComponent",(function(t){return r(e,void 0,void 0,(function(){var e=this;return i(this,(function(n){return this.ngZone.run((function(){return r(e,void 0,void 0,(function(){var e=this;return i(this,(function(n){switch(n.label){case 0:switch(t.command){case"loggedIn":case"loggedOut":case"unlocked":return[3,1];case"authBlocked":return[3,2];case"logout":return[3,3];case"lockVault":return[3,4];case"locked":return[3,6];case"lockedUrl":return[3,7];case"syncStarted":return[3,8];case"syncCompleted":return[3,9];case"upgradeOrganization":return[3,10];case"premiumRequired":return[3,12];case"emailVerificationRequired":return[3,14];case"showToast":return[3,16];case"setFullWidth":return[3,17]}return[3,18];case 1:return this.notificationsService.updateConnection(!1),[3,19];case 2:return this.router.navigate(["/"]),[3,19];case 3:return this.logOut(!!t.expired),[3,19];case 4:return[4,this.vaultTimeoutService.lock()];case 5:return n.sent(),[3,19];case 6:return this.notificationsService.updateConnection(!1),this.router.navigate(["lock"]),[3,19];case 7:return window.setTimeout((function(){return e.routerService.setPreviousUrl(t.url)}),500),[3,19];case 8:case 9:return[3,19];case 10:return[4,this.platformUtilsService.showDialog(this.i18nService.t("upgradeOrganizationDesc"),this.i18nService.t("upgradeOrganization"),this.i18nService.t("upgradeOrganization"),this.i18nService.t("cancel"))];case 11:return n.sent()&&this.router.navigate(["organizations",t.organizationId,"settings","billing"]),[3,19];case 12:return[4,this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"))];case 13:return n.sent()&&this.router.navigate(["settings/premium"]),[3,19];case 14:return[4,this.platformUtilsService.showDialog(this.i18nService.t("emailVerificationRequiredDesc"),this.i18nService.t("emailVerificationRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"))];case 15:return n.sent()&&this.platformUtilsService.launchUri("https://bitwarden.com/help/article/create-bitwarden-account/"),[3,19];case 16:return this.showToast(t),[3,19];case 17:return this.setFullWidth(),[3,19];case 18:return[3,19];case 19:return[2]}}))}))})),[2]}))}))})),this.router.events.subscribe((function(e){if(e instanceof c.NavigationEnd){for(var t=0,n=Array.from(document.querySelectorAll(".modal"));t<n.length;t++){var r=n[t];o(r).modal("hide")}null!=document.querySelector(".swal-modal")&&a.default.close(void 0)}})),this.setFullWidth()},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe("AppComponent")},e.prototype.logOut=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return[4,this.eventService.uploadEvents()];case 1:return o.sent(),[4,this.userService.getUserId()];case 2:return t=o.sent(),[4,Promise.all([this.eventService.clearEvents(),this.syncService.setLastSync(new Date(0)),this.tokenService.clearToken(),this.cryptoService.clearKeys(),this.userService.clear(),this.settingsService.clear(t),this.cipherService.clear(t),this.folderService.clear(t),this.collectionService.clear(t),this.policyService.clear(t),this.passwordGenerationService.clear(),this.stateService.purge()])];case 3:return o.sent(),this.searchService.clearIndex(),this.authService.logOut((function(){return r(n,void 0,void 0,(function(){return i(this,(function(t){return e&&this.toasterService.popAsync("warning",this.i18nService.t("loggedOut"),this.i18nService.t("loginExpired")),a.default.close(),this.router.navigate(["/"]),[2]}))}))})),[2]}}))}))},e.prototype.recordActivity=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){return e=(new Date).getTime(),null!=this.lastActivity&&e-this.lastActivity<250||(this.lastActivity=e,this.storageService.save(p.ConstantsService.lastActiveKey,e),this.isIdle&&(this.isIdle=!1,this.idleStateChanged()),null!=this.idleTimer&&(window.clearTimeout(this.idleTimer),this.idleTimer=null),this.idleTimer=window.setTimeout((function(){t.isIdle||(t.isIdle=!0,t.idleStateChanged())}),6e5)),[2]}))}))},e.prototype.showToast=function(e){var t=this,n={type:e.type,title:e.title};if("string"==typeof e.text)n.body=e.text;else if(1===e.text.length)n.body=e.text[0];else{var r="";e.text.forEach((function(e){return r+="<p>"+t.sanitizer.sanitize(l.SecurityContext.HTML,e)+"</p>"})),n.body=r,n.bodyOutputType=s.BodyOutputType.TrustedHtml}null!=e.options&&(!0===e.options.trustedHtml&&(n.bodyOutputType=s.BodyOutputType.TrustedHtml),null!=e.options.timeout&&e.options.timeout>0&&(n.timeout=e.options.timeout)),this.toasterService.popAsync(n)},e.prototype.idleStateChanged=function(){this.isIdle?this.notificationsService.disconnectFromInactivity():this.notificationsService.reconnectFromActivity()},e.prototype.setFullWidth=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get("enableFullWidth")];case 1:return e.sent()?document.body.classList.add("full-width"):document.body.classList.remove("full-width"),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.BroadcasterService),u.ɵɵdirectiveInject(m.UserService),u.ɵɵdirectiveInject(h.TokenService),u.ɵɵdirectiveInject(f.FolderService),u.ɵɵdirectiveInject(v.SettingsService),u.ɵɵdirectiveInject(y.SyncService),u.ɵɵdirectiveInject(g.PasswordGenerationService),u.ɵɵdirectiveInject(x.CipherService),u.ɵɵdirectiveInject(b.AuthService),u.ɵɵdirectiveInject(S.Router),u.ɵɵdirectiveInject(w.ToasterService),u.ɵɵdirectiveInject(C.I18nService),u.ɵɵdirectiveInject(I.PlatformUtilsService),u.ɵɵdirectiveInject(u.NgZone),u.ɵɵdirectiveInject(E.VaultTimeoutService),u.ɵɵdirectiveInject(P.StorageService),u.ɵɵdirectiveInject(k.CryptoService),u.ɵɵdirectiveInject(_.CollectionService),u.ɵɵdirectiveInject(A.DomSanitizer),u.ɵɵdirectiveInject(O.SearchService),u.ɵɵdirectiveInject(T.NotificationsService),u.ɵɵdirectiveInject(M.RouterService),u.ɵɵdirectiveInject(B.StateService),u.ɵɵdirectiveInject(D.EventService),u.ɵɵdirectiveInject(R.PolicyService))},e.ɵcmp=u.ɵɵdefineComponent({type:e,selectors:[["app-root"]],decls:4,vars:1,consts:[["aria-live","polite",3,"toasterconfig"]],template:function(e,t){1&e&&(u.ɵɵelement(0,"toaster-container",0),u.ɵɵtext(1,"\n"),u.ɵɵelement(2,"router-outlet"),u.ɵɵtext(3,"\n")),2&e&&u.ɵɵproperty("toasterconfig",t.toasterConfig)},directives:[w.ToasterContainerComponent,S.RouterOutlet],encapsulation:2}),e}();t.AppComponent=V},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(e){this.el=e}return e.prototype.onClick=function(){this.el.nativeElement.blur()},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(r.ElementRef))},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appBlurClick",""]],hostBindings:function(e,t){1&e&&r.ɵɵlistener("click",(function(){return t.onClick()}))}}),e}();t.BlurClickDirective=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(e){this.elRef=e,this.el=null,this.el=e.nativeElement}return e.prototype.ngOnInit=function(){var e=this;this.formEls=Array.from(this.el.querySelectorAll('input:not([type="hidden"]), select, textarea')),this.formEls.forEach((function(t){t.addEventListener("focus",(function(t){e.el.classList.add("active")}),!1),t.addEventListener("blur",(function(t){e.el.classList.remove("active")}),!1)}))},e.prototype.onClick=function(e){var t=e.target;if((t===this.el||t.classList.contains("progress")||t.classList.contains("progress-bar"))&&this.formEls.length>0){var n=this.formEls[0];if("input"===n.tagName.toLowerCase()){var r=n;if(null!=r.type&&"checkbox"===r.type.toLowerCase())return void r.click()}n.focus()}},e.ɵfac=function(t){return new(t||e)(r.ɵɵdirectiveInject(r.ElementRef))},e.ɵdir=r.ɵɵdefineDirective({type:e,selectors:[["","appBoxRow",""]],hostBindings:function(e,t){1&e&&r.ɵɵlistener("click",(function(e){return t.onClick(e)}))}}),e}();t.BoxRowDirective=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(0);var r=n(0),i=function(){function e(){}return e.prototype.transform=function(e,t,n){return void 0===n&&(n=!1),null==e||0===e.length?[]:null==t||t.length<2?e.filter((function(e){return n!==e.isDeleted})):(t=t.trim().toLowerCase(),e.filter((function(e){return n===e.isDeleted&&(null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&e.id.startsWith(t))||(null!=e.subTitle&&e.subTitle.toLowerCase().indexOf(t)>-1||!!(e.login&&null!=e.login.uri&&e.login.uri.toLowerCase().indexOf(t)>-1))))})))},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=r.ɵɵdefinePipe({name:"searchCiphers",type:e,pure:!0}),e}();t.SearchCiphersPipe=i}]);
//# sourceMappingURL=main.cc71efde7ad30ee0876f.js.map